Image encoding / decoding apparatus and apparatus for transmitting data for image

By restricting the maximum size of the color change block, the image encoding/decoding efficiency is improved, the problem of increasing the cost of transmission and storage of high -resolution image, and achieved more efficient image data processing.

CN119342209APending Publication Date: 2025-01-21LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411713276.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-06-24
Filing Date
2020-06-24
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

With the improvement of image resolution and quality, the amount of information or bits transmitted and stored increases, resulting in an increase in transmission and storage costs, and the prior art is difficult to effectively solve this problem.

Method used

By restricting the maximum size of the color change block, the image encoding/decoding efficiency is improved. The specific method includes determining the predictive mode of the current block, generating predictive blocks and residual blocks, and reconstructing the current block based on these blocks.

Benefits of technology

Improved the efficiency of image coding/decoding, reduced the amount of transmission and storage, thereby reducing costs, and ensuring the maintenance of image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342209A_ABST
    Figure CN119342209A_ABST
Patent Text Reader

Abstract

The invention relates to an image encoding / decoding apparatus and an apparatus for transmitting data for an image. A method and apparatus for encoding / decoding a video are provided. A video decoding method performed by an image decoding apparatus according to the present disclosure may comprise the steps of: determining a prediction mode of a current block; generating a prediction block of the current block based on inter prediction mode information when the prediction mode of the current block is the inter prediction mode; generating a residual block of the current block based on the transform block of the current block; and reconstructing the current block based on the residual block and the prediction block of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application with the original application number 202080058307.0 (International application number: PCT / KR2020 / 008233, application date: June 24, 2020, invention name: Method and device for encoding / decoding video using the maximum size limit of chroma transform block and method for sending bit stream). Technical Field

[0002] 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 size of a chroma transform block, and a method for transmitting a bit stream generated by the image encoding method / apparatus of the present disclosure. Background Art

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

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

[0005] Technical issues

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

[0007] An object of the present disclosure is to provide an image encoding / decoding method and apparatus capable of improving encoding / decoding efficiency by limiting the maximum size of a chroma transform block.

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

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

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

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

[0012] Technical Solution

[0013] According to an aspect of the present disclosure, an image decoding method performed by an image decoding device may include the following steps: determining a prediction mode of a current block; based on the prediction mode of the current block being an inter-frame prediction mode, generating a prediction block of the current block based on inter-frame prediction mode information; generating a residual block of the current block based on a transform block of the current block; and reconstructing the current block based on the prediction block and the residual block of the current block. In this case, the size of the transform block may be determined based on the color component of the current block.

[0014] An image decoding device according to an aspect of the present disclosure may include a memory and at least one processor. The at least one processor may determine a prediction mode of a current block, based on the prediction mode of the current block being an inter-frame prediction mode, generate a prediction block of the current block based on the inter-frame prediction mode information, generate a residual block of the current block based on a transform block of the current block, and reconstruct the current block based on the prediction block and the residual block of the current block. In this case, the size of the transform block may be determined based on a color component of the current block.

[0015] According to an aspect of the present disclosure, an image encoding method performed by an image encoding device may include the following steps: determining a current block by dividing an image; generating an inter-frame prediction block of the current block; generating a residual block of the current block based on the inter-frame prediction block; and encoding inter-frame prediction mode information of the current block. In this case, the residual block may be encoded based on the size of the transform block of the current block, and the size of the transform block may be determined based on the color component of the current block.

[0016] In addition, a transmission method according to another aspect of the present disclosure may transmit a bit stream generated by the image encoding device or the image encoding method of the present disclosure.

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

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

[0019] Beneficial Effects

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

[0021] According to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus capable of improving encoding / decoding efficiency by limiting the maximum size of a chroma transform block.

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

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

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

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

[0026] Figure 1 is a diagram schematically showing a video encoding system to which an embodiment of the present disclosure is applicable.

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

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

[0029] Figure 4 is a view showing a segmentation structure of an image according to an embodiment.

[0030] Figure 5 is a view showing an embodiment of a partition type of a block according to a multi-type tree structure.

[0031] Figure 6 is a diagram illustrating a signaling mechanism of block partitioning information in a quadtree having a nested multi-type tree structure according to the present disclosure.

[0032] Figure 7 is a diagram showing an embodiment of dividing a CTU into a plurality of CUs.

[0033] Figure 8 is a view illustrating an embodiment of a redundancy division pattern.

[0034] Fig. 9 is a flowchart illustrating a video / image encoding method based on inter-frame prediction.

[0035] Fig.10 is a view illustrating a configuration of the inter prediction unit 180 according to the present disclosure.

[0036] Fig.11is a flowchart illustrating a video / image decoding method based on inter-frame prediction.

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

[0038] Fig.13 is a view illustrating neighboring blocks that may be used as spatial merging candidates according to an embodiment.

[0039] Fig.14 is a view schematically illustrating a method for constructing a merge candidate list according to an embodiment.

[0040] Fig.15 FIG. 1 is a view schematically illustrating a method for constructing a motion vector predictor candidate list according to an embodiment.

[0041] Fig.16 is a view illustrating a syntax structure for transmitting an MVD from an image encoding apparatus to an image decoding apparatus according to an embodiment.

[0042] Fig.17 is a flowchart illustrating an IBC-based video / image encoding method according to an embodiment.

[0043] Fig.18 is a view illustrating a configuration of a prediction unit for performing an IBC-based video / image encoding method according to an embodiment.

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

[0045] Fig. 20 is a view illustrating a configuration of a prediction unit for performing an IBC-based video / image decoding method according to an embodiment.

[0046] Fig.21 is a view illustrating the syntax of chroma format signaling according to an embodiment.

[0047] Fig. 22 is a view illustrating a chroma format classification table according to an embodiment.

[0048] Fig.23 is a view illustrating a division restriction example of a CU for virtual pipeline processing.

[0049] Figure 24 to Figure 26 is a view illustrating a division example of a CU and a TU according to an embodiment.

[0050] Fig. 27 and Fig.28is a flowchart illustrating IBC prediction and intra prediction to which a maximum transform size according to an embodiment is applied.

[0051] Fig.29 is a flowchart illustrating a method of encoding an image by an encoding device according to an embodiment.

[0052] Fig.30 is a flowchart illustrating a method of decoding an image by a decoding device according to an embodiment.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0068] Video Coding System Overview

[0069] Figure 1 is a diagram schematically illustrating a video encoding system according to the present disclosure.

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

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

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

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

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

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

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

[0077] Overview of Image Coding Equipment

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0096] Overview of Image Decoding Equipment

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0113] Overview of Image Segmentation

[0114] The video / image encoding method according to the present disclosure can be performed based on the image segmentation structure as follows. Specifically, the prediction, residual processing ((inverse) transform, (de)quantization, etc.), syntax element encoding and filtering processes described later can be performed based on the CTU, CU (and / or TU, PU) derived from the image segmentation structure. The image can be segmented in block units and the block segmentation process can be performed in the image segmentor 110 of the encoding device. The segmentation related information can be encoded by the entropy encoder 190 and sent to the decoding device in the form of a bitstream. The entropy decoder 210 of the decoding device can derive the block segmentation structure of the current picture based on the segmentation related information obtained from the bitstream, and based on this, a series of processes (e.g., prediction, residual processing, block / picture reconstruction, in-loop filtering, etc.) can be performed to perform image decoding.

[0115] A picture may be partitioned into a sequence of coding tree units (CTUs). Figure 4 An example of a picture being partitioned into CTUs is shown. A CTU may correspond to a coding tree block (CTB). Alternatively, a CTU may include a coding tree block of luma samples and two corresponding coding tree blocks of chroma samples. For example, for a picture containing three sample arrays, a CTU may include one N×N block of luma samples and two corresponding blocks of chroma samples.

[0116] Overview of CTU Segmentation

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

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

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

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

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

[0122] Figure 6 is a diagram illustrating a signaling mechanism of block partitioning information in a quadtree having a nested multi-type tree structure according to the present disclosure.

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

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

[0125] [Table 1]

[0126]

[0127]

[0128] Figure 7is a view showing an example of splitting a CTU into a plurality of CUs by applying a multi-type tree after applying a quadtree. Figure 7 , the bold block edge 710 represents quadtree partitioning, and the remaining edge 720 represents multi-type tree partitioning. The CU may correspond to a coding block (CB). In an embodiment, the CU may include one coding block of luma samples and two coding blocks of chroma samples corresponding to the luma samples. The chroma component (sample) CB or TB size may be derived based on the luma component (sample) CB or TB size based on the component ratio according to the color format (chroma format, e.g., 4:4:4, 4:2:2, 4:2:0, etc.) of the picture / image. In the case of a 4:4:4 color format, the chroma component CB / TB size may be set equal to the luma component CB / TB size. In the case of a 4:2:2 color format, the width of the chroma component CB / TB may be set to half the width of the luma component CB / TB and the height of the chroma component CB / TB may be set to the height of the luma component CB / TB. In the case of a 4:2:0 color format, the width of the chroma component CB / TB may be set to half the width of the luma component CB / TB and the height of the chroma component CB / TB may be set to half the height of the luma component CB / TB.

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

[0130] Furthermore, in an embodiment, the CU size and the TU size may be the same. Alternatively, there may be multiple TUs in a CU region. The TU size generally indicates the luma component (sample) transform block (TB) size.

[0131] The TU size can be derived based on the maximum allowed TB size maxTbSize as a predetermined value. For example, when the CU size is larger than maxTbSize, multiple TUs (TBs) with maxTbSize can be derived from the CU, and transform / inverse transform can be performed in units of TU (TB). For example, the maximum allowed luma TB size may be 64×64 and the maximum allowed chroma TB size may be 32×32. If the width or height of the CB split according to the tree structure is larger than the maximum transform width or height, the CB may be automatically (or implicitly) split until the TB size limits in the horizontal and vertical directions are met.

[0132] In addition, for example, when intra prediction is applied, the intra prediction mode / type may be derived in units of CU (or CB), and the neighboring reference sample derivation and prediction sample generation process may be performed in units of TU (or TB). In this case, there may be one or more TUs (or TBs) in a CU (or CB) region, and in this case, multiple TUs or (TBs) may share the same intra prediction mode / type.

[0133] In addition, for a quadtree coding tree scheme with nested multi-type trees, the following parameters may be signaled from an encoding device to a decoding device as SPS syntax elements. For example, at least one of a CTU size as a parameter representing the root node size of a quadtree, a MinQTSize as a parameter representing the minimum allowed quadtree leaf node size, a MaxBtSize as a parameter representing the maximum allowed binary tree root node size, a MaxTtSize as a parameter representing the maximum allowed ternary tree root node size, a MaxMttDepth as a parameter representing the maximum allowed hierarchical depth of multi-type tree partitioning from a quadtree leaf node, a MinBtSize as a parameter representing the minimum allowed binary tree leaf node size, or a MinTtSize as a parameter representing the minimum allowed ternary tree leaf node size may be signaled.

[0134] As an embodiment using a 4:2:0 chroma format, the CTU size may be set to 128×128 luminance blocks and two 64×64 chrominance blocks corresponding to these luminance blocks. In this case, MinOTSize may be set to 16×16, MaxBtSize may be set to 128×128, MaxTtSzie may be set to 64×64, MinBtSize and MinTtSize may be set to 4×4, and MaxMttDepth may be set to 4. Quadtree partitioning may be applied to the CTU to generate a quadtree leaf node. The quadtree leaf node may be referred to as a leaf QT node. The size of the quadtree leaf node may be from 16×16 size (e.g., MinOTSize) to 128×128 size (e.g., CTU size). If the leaf QT node is 128×128, it may not be additionally partitioned into a binary tree / ternary tree. This is because, in this case, even if it is partitioned, it exceeds MaxBtsize and MaxTtszie (e.g., 64×64). In other cases, the leaf QT node can be further split into a multi-type tree. Therefore, the leaf QT node is the root node of the multi-type tree, and the leaf QT node can have a multi-type tree depth (mttDepth) value of 0. If the multi-type tree depth reaches MaxMttdepth (for example, 4), further splitting can be ignored. If the width of the multi-type tree node is equal to MinBtSize and is less than or equal to 2xMinTtSize, further horizontal splitting can be ignored. If the height of the multi-type tree node is equal to MinBtSize and is less than or equal to 2xMinTtSize, further vertical splitting can be ignored. When splitting is not considered, the encoding device can skip the signaling of the splitting information. In this case, the decoding device can derive splitting information with a predetermined value.

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

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

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

[0138] The quadtree coding block structure with multi-type trees can provide a very flexible block segmentation structure. Due to the segmentation types supported in the multi-type tree, different segmentation patterns can potentially produce the same coding block structure in some cases. In the encoding device and the decoding device, the amount of data of the segmentation information can be reduced by limiting the occurrence of such redundant segmentation patterns.

[0139] For example, Figure 8 The redundant partitioning patterns that may appear in binary tree partitioning and ternary tree partitioning are shown. Figure 8 As shown, the continuous binary partitions 810 and 820 for one direction of the two-step level have the same coding block structure as the binary partition for the center partition after the ternary partition. In this case, the binary tree partition for the center blocks 830 and 840 of the ternary tree partition can be prohibited. This prohibition applies to CUs of all pictures. When this particular partition is prohibited, the signaling of the corresponding syntax element can be modified by reflecting this prohibition, thereby reducing the number of bits for signaling the partition. For example, as Figure 8 As shown in the example shown in , when binary tree partitioning for the center block of a CU is prohibited, the syntax element mtt_split_cu_binary_flag specifying whether the partition is binary partitioning or ternary partitioning is not signaled and its value can be derived as 0 by the decoding device.

[0140] Overview of Inter Prediction

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

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

[0143] Inter-frame prediction can 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 can be equal to the motion information of the selected neighboring block. In the case of skip mode, unlike merge mode, a residual signal may not be sent. In the case of motion information prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor and the motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference. In the present disclosure, MVP mode may have the same meaning as advanced motion vector prediction (AMVP).

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

[0145] Fig. 9 is a flowchart illustrating a video / image encoding method based on inter-frame prediction.

[0146] Fig.10 is a view illustrating a configuration of the inter prediction unit 180 according to the present disclosure.

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

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

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

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

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

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

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

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

[0155] Fig.11 is a flowchart illustrating a video / image decoding method based on inter-frame prediction.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0172] Fig.13 is a view illustrating neighboring blocks that can be used as spatial merging candidates.

[0173] Fig.14 is a view schematically illustrating a method for constructing a merge candidate list according to an example of the present disclosure.

[0174] The image encoding / decoding apparatus may insert the spatial merging candidate derived by searching the spatial neighboring blocks of the current block into the merging candidate list (S1110). Fig.13As shown, the spatial neighboring blocks may include a lower left neighboring block A0, a left neighboring block A1, an upper right neighboring block B0, an upper neighboring block B1, and an upper left neighboring block B2 of the current block. However, this is an example, and in addition to the above-mentioned spatial neighboring blocks, additional neighboring blocks such as a right neighboring block, a lower neighboring block, and a lower right neighboring block may be further used as spatial neighboring blocks. The image encoding / decoding device may detect available blocks by searching the spatial neighboring blocks based on priority, and derive motion information of the detected blocks as spatial merging candidates. For example, the image encoding / decoding device may detect available blocks by searching in the order of A1, B1, B0, A0, and B2. Fig.13 The five blocks shown are used and the available candidates are indexed sequentially to build a merge candidate list.

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

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

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

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

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

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

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

[0182] Fig.15 is a view schematically illustrating a method for constructing a motion vector predictor candidate list according to an example of the present disclosure.

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

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

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

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

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

[0188] exist Fig.16 In the , abs_mvd_greater0_flag[0] specifies whether the absolute value of the x component of the MVD is greater than 0, and abs_mvd_greater0_flag[1] specifies whether the absolute value of the y component of the MVD is greater than 0. Similarly, abs_mvd_greater1_flag[0] specifies whether the absolute value of the x component of the MVD is greater than 1, and abs_mvd_greater1_flag[1] specifies whether the absolute value of the y component of the MVD is greater than 1. Fig.16As shown in the figure, abs_mvd_greater1_flag can be sent only when abs_mvd_greater0_flag is 1. Fig.16 In , abs_mvd_minus2 can specify the value obtained by subtracting 2 from the absolute value of MVD, and mvd_sign_flag specifies whether the sign of MVD is positive or negative. Fig.16 The grammatical structure shown can derive the MVD as shown in the following formula 1.

[0189] [Formula 1]

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

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

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

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

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

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

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

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

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

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

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

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

[0202] In the case of IBC skip / merge mode, a merge candidate index may be signaled to specify a block vector to be used for prediction of the current luma block among the block vectors included in the merge candidate list. In this case, the merge candidate list may include neighboring blocks encoded by IBC. The merge candidate list may be configured to include spatial merge candidates but not temporal merge candidates. In addition, the merge candidate list may also include history-based motion vector predictor (HMVP) candidates and / or paired candidates.

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

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

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

[0206] Fig.17 is a flowchart illustrating a video / image encoding method based on IBC.

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

[0208] Fig.17 The encoding method can be Figure 2 The image encoding device of the present invention may be performed. Specifically, step S1410 may be performed by a prediction unit and step S1420 may be performed by a residual processor. Specifically, step S1420 may be performed by a subtractor 115. Step S1430 may be performed by an entropy encoder 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 processor. The residual information is information about residual samples. The residual information may include information about quantized transform coefficients for the residual samples. As described above, the residual samples may be derived by transform coefficients via the transformer 120 of the image encoding device, and the transform coefficients may be derived by transform coefficients quantized by the quantizer 130. The information about the quantized transform coefficients may be encoded by the entropy encoder 190 through a residual encoding process.

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

[0210] For example, when a skip mode or a merge mode is applied to the current block, the image encoding device may derive a merge candidate from a neighboring block of the current block, and use the derived merge candidate to construct a merge candidate list. In addition, the image encoding device may derive a reference block whose difference with the current block is equal to or less than a specific criterion or minimum value among the reference blocks indicated by the merge candidate 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 specifying the selected merge candidate may be generated and signaled to the image decoding device. Using the motion vector of the selected merge candidate, the motion vector of the current block may be derived.

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

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

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

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

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

[0216] Fig.19 is a flowchart illustrating a video / image decoding method based on IBC.

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

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

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

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

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

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

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

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

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

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

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

[0228] Overview of Chroma Formats

[0229] Hereinafter, the chroma format will be described. An image may be encoded as encoded data including a luminance component (e.g., Y) array and two chroma component (e.g., Cb and Cr) arrays. For example, one pixel of an encoded image may include a luminance sample and a chroma sample. A chroma format may be used to represent a configuration format of luminance samples and chroma samples, and a chroma format may be referred to as a color format.

[0230] In an embodiment, an image may be encoded in various chroma formats such as monochrome, 4:2:0, 4:2:2, or 4:4:4. In monochrome sampling, there may be one sample array and the sample array may be a luma array. In 4:2:0 sampling, there may be one luma sample array and two chroma sample arrays, each of which may have a height equal to half of the luma array and a width equal to half of the luma array. In 4:2:2 sampling, there may be one luma sample array and two chroma sample arrays, each of which may have a height equal to half of the luma array and a width equal to half of the luma array. In 4:4:4 sampling, there may be one luma sample array and two chroma sample arrays, and each of which may have a height and width equal to the luma array.

[0231] For example, in 4:2:0 sampling, a chroma sample may be located below its corresponding luma sample. In 4:2:2 sampling, a chroma sample may be positioned to overlap with its corresponding luma sample. In 4:4:4 sampling, both luma and chroma samples may be located in overlapping positions.

[0232] 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 to be adaptively used in the encoding device and the decoding device. In an embodiment, the chroma format may be signaled based on at least one of chroma_format_idc or separate_colour_plane_flag. At least one of chroma_format_idc or separate_colour_plane_flag may be signaled via a high-level syntax such as DPS, VPS, SPS, or PPS. For example, chroma_format_idc and separate_colour_plane_flag may be included in Fig.21 In the SPS syntax shown.

[0233] also, Fig. 22An embodiment of chroma format classification using signaling of chroma_format_idc and separate_colour_plane_flag is shown. chroma_format_idc may be information specifying a chroma format applied to a coded image. separate_colour_plane_flag may specify 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 specify monochrome sampling. A second value (e.g., 1) of chroma_format_idc may specify 4:2:0 sampling. A third value (e.g., 2) of chroma_format_idc may specify 4:2:2 sampling. A fourth value (e.g., 3) of chroma_format_idc may specify 4:4:4 sampling.

[0234] In 4:4:4, based on the value of separate_colour_plane_flag, the following may apply. 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 specifies the type of the chroma sample array, may be set equal to chroma_format_idc. If the value of separate_colour_plane_flag is a second value (e.g., 1), the luma sample array, Cb sample array, and Cr sample array may be processed separately as well as together with a monochrome sampled picture. In this case, ChromaArrayType may be set to 0.

[0235] Intra prediction of chroma blocks

[0236] When intra prediction is performed on the current block, prediction of the luminance component block (luminance block) and prediction of the chrominance component block (chrominance block) of the current block can be performed. In this case, the intra prediction mode of the chrominance block can be set separately from the intra prediction mode of the luminance block.

[0237] For example, the intra prediction mode of the chroma block can be specified based on the intra chroma prediction mode information, and the intra chroma prediction mode information can be signaled in the form of an intra_chroma_pred_mode syntax element. For example, the intra chroma prediction mode information can represent one of a plane mode, a DC mode, a vertical mode, a horizontal mode, a derivation mode (DM), and a cross-component linear model (CCLM) mode. Here, the plane mode can specify intra prediction mode #0, the DC mode can specify intra prediction mode #1, the vertical mode can specify intra prediction mode #26, and the horizontal mode can specify intra prediction mode #10. DM can also be called a direct mode. CCLM can also be called a linear model (LM).

[0238] In addition, DM and CCLM are related intra prediction modes that use information about the luma block to predict the chroma block. DM may indicate a mode that applies the same intra prediction mode as the intra prediction mode of the luma component as the intra prediction mode of the chroma component. In addition, CCLM may indicate an intra prediction mode that uses samples derived by downsampling the reconstructed samples of the luma block and then applying CCLM parameters α and β to the downsampled samples in the process of generating the prediction block of the chroma block as the prediction samples of the chroma block.

[0239] [Formula 2]

[0240] pred c (i, j) = α·rec L ′(i, j)+β

[0241] Among them, pred c (i, j) can represent the predicted sample of the (i, j) coordinate of the current chroma block in the current CU. L '(i,j) can represent the reconstructed sample of the (i,j) coordinate of the current luminance block in the CU. For example, rec L '(i,j) may represent the downsampled reconstructed sample of the current luma block. The linear model coefficients α and β may be signaled or derived from neighboring samples.

[0242] Virtual Pipeline Data Unit

[0243] A virtual pipeline data unit (VPDU) can be defined for pipeline processing within a picture. A VPDU can be defined as a non-overlapping unit within a picture. In a hardware decoding device, consecutive VPDUs can be processed simultaneously by multiple pipeline stages. In most pipeline stages, the VPDU size can be roughly proportional to the buffer size. Therefore, from a hardware perspective, it is important to keep the VPDU size small when considering the buffer size. 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 luminance samples) in size. Alternatively, in VVC, the above-mentioned ternary tree (TT) and / or binary tree (BT) partitioning can be considered to change (increase or decrease) the VPDU size.

[0244] Additionally, to keep the VPDU size to 64×64 luma samples, you can limit Fig.23 Partitioning of the CU shown. More specifically, at least one of the following restrictions may apply.

[0245] Restriction 1: For CUs with width or height of 128 or width and height of 128, ternary tree (TT) partitioning is not allowed.

[0246] Restriction 2: For a CU with 128×N (where N is an integer equal to or less than 64 and greater than 0), horizontal binary tree (BT) partitioning is not allowed (eg, for a CU with a width of 128 and a height less than 128, horizontal binary tree partitioning is not allowed).

[0247] Restriction 3: For a CU with N×128 (where N is an integer equal to or less than 64 and greater than 0), vertical binary tree (BT) partitioning is not allowed (eg, for a CU with a height of 128 and a width less than 128, vertical binary tree partitioning is not allowed).

[0248] Maximum size limit for chroma blocks used in pipeline processing

[0249] As described above with respect to the partitioning structure and transform processing, the CU may be divided to generate multiple TUs. When the size of the CU is larger than the maximum TU size, the CU may be divided into multiple TUs. Therefore, a transform and / or inverse transform may be performed on each TU. Typically, the maximum TU size of the luminance block may be set to the maximum available transform size, which may be performed by the encoding device and / or the decoding device. An example of dividing the CU and TU according to an embodiment is shown in Figure 24 to Figure 26 middle.

[0250] Fig.24An example of a TU generated by dividing a luma CU and a chroma CU according to an embodiment is shown. In an embodiment, the maximum size of the luma CU may be 64×64, the maximum available transform size may be 32×32, and non-square TUs may not be allowed. Therefore, the maximum size of the luma component transform block may be 32×32. In this embodiment, the maximum TU size may be set as shown in the following formula.

[0251] [Formula 3]

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

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

[0254] According to the above formula, in the above embodiment, in the case of a luminance block, the maximum size of the transform block can be set to the maximum size of the luminance component transform block. Here, the maximum size of the luminance component transform block is a value set during encoding and can be notified to the decoding device by a signal from the encoding device through a bitstream.

[0255] In addition, in the above-mentioned 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 luminance component transform block by the larger value of SubWidthC and SubHeightC. Here, 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 through the bitstream, as shown in FIG. Fig.23 shown.

[0256] According to the above formula, in the above embodiment, the maximum size of the transform block can be determined as any one of the minimum width and the minimum height of the transform block. Therefore, the TU division of the luminance block and the chrominance block in the above embodiment can be as follows Fig.24 For example, Fig.24As shown, in the case of a chroma block having a 4:2:2 format, when the maximum size of a transform block is determined to be 16, the chroma CU may be divided into a plurality of transform blocks in a manner different from that in which the luma CU is divided into transform blocks.

[0257] Fig.25 An example of a TU generated by dividing a luma CU and a chroma CU according to another embodiment is shown. In an embodiment, the maximum size of the luma CU may be 128×128, the maximum available transform size may be 64×64, and non-square TUs may not be allowed. Therefore, the maximum size of the luma component transform block may be 64×64. In this embodiment, the maximum size of the 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.

[0258] [Formula 4]

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

[0260] In addition, according to the above formula, when the larger value of the width and height of the corresponding block is applied as the maximum size of the transform block, it can be as follows Fig.25 In the example of , the luma CU and the chroma CU are divided into multiple TUs.

[0261] exist Fig.24 and Fig.25 In the example of , when a chroma CU having a 4:2:2 format is divided into TUs, it is divided in a form different from the form in which the corresponding luma CU is divided into TUs. However, when encoding / decoding of a chroma block is performed with reference to a luma block as in the DM mode or CCLM mode for prediction of a chroma block described above, in order to reduce delays in pipeline processing and save memory, it is efficient to perform encoding (or decoding) of the corresponding chroma block immediately after encoding (or decoding) of a luma block corresponding to the chroma block.

[0262] However, in Fig.24 In the example of , the encoding of two chrominance blocks 2421 and 2423 should be performed after the encoding of one luma transform block 2411, which requires separate processing related to different color formats (4:4:4 or 4:2:0). Fig.25 In the example of , encoding of one chroma transform block 2521 should be performed after encoding of two luminance transform blocks 2511 and 2512. Thus, in the above-mentioned TU partitioning method, when the 4:2:2 format is used, since the luminance block and the chroma block corresponding thereto do not match, a separate process may be added to perform pipeline processing, or pipeline processing may not be performed.

[0263] Maximum size limit for chroma transform blocks used for pipeline processing

[0264] Hereinafter, a method of setting the size of the maximum transform block of the chroma CU to satisfy the conditions for performing the above-mentioned VPDU will be described.

[0265] Fig.26 An example of a TU generated by splitting a luma CU and a chroma CU according to another embodiment is shown. In an embodiment, the maximum size of the luma CU may be 128×128, the maximum available transform size may be 64×64, and splitting into non-square TUs may be allowed. Therefore, the maximum size of the luma component transform block may be 64×64.

[0266] like Fig.26 As shown, in order to be divided into non-square TUs, the maximum size of the transform block can be defined for width and height. For example, the maximum width (maxTbWidth) of the transform block and the maximum height (maxTbHeight) of the transform block can be defined as shown in the following formula, thereby defining the maximum size of the transform block.

[0267] [Formula 5]

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

[0269] [Formula 6]

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

[0271] As in the above embodiment, by defining the maximum size of the transform block as width and height, such as Fig.26 As shown in the example of , even in the case of a chroma CU having a 4:2:2 format, the chroma CU can be divided into TUs in the form in which the corresponding luma CU is divided into TUs. Therefore, by dividing the chroma CU into TUs to correspond to the TUs of the luma CU, encoding (or decoding) of the chroma block corresponding thereto can be performed immediately after encoding (or decoding) of the luma block, thereby reducing the delay in pipeline processing.

[0272] Maximum size limit for chroma transform blocks in inter prediction mode and IBC prediction mode

[0273] Hereinafter, the execution of the inter prediction mode and the IBC prediction mode to which the maximum size restriction of the chroma transform block for the above-mentioned chroma pipeline processing is applied will be described. The encoding device and the decoding device may perform inter prediction and IBC prediction by restricting the maximum size of the chroma transform block according to the following description, and their operations may correspond to each other. In addition, the following description of the inter prediction may be variably applied to the IBC prediction mode. Therefore, the inter prediction operation of the decoding device according to the embodiment will be described below.

[0274] The decoding device according to the embodiment may generate a luma prediction block predSamplesL of size (cbWidth)×(cbHeight) and chroma prediction blocks predSamplesCb and predSamplesCr of size (cbWidth / SubWidthC)×(cbHeight / SubHeightC) by performing inter-frame prediction. Here, cbWidth may be the width of the current CU, and cbHeight may be the height of the current CU.

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

[0276] Hereinafter, a method of limiting the maximum size of a chroma transform block to generate a residual block of a CU encoded by a decoding device in an inter prediction mode according to an embodiment will be described. The decoding device can generate a reconstructed block using the residual block generated in this step.

[0277] The decoding device according to the embodiment may directly obtain the following information from the bitstream or derive the following information from other information obtained from the bitstream to generate a residual block of a size of (nTbW)×(nTbH) for a CU encoded in an inter-frame prediction mode. Here, nTbW and nTbH may be set to the width cbWidth of the current CU and the height cbHeight of the current CU.

[0278] - Sample position (xTb0, yTb0) specifies 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

[0279] -Parameter nTbW specifies the width of the current transform block

[0280] -Parameter nTbH specifies the height of the current transform block

[0281] -Parameter cIdx specifies the color component of the current CU

[0282] The decoding device may derive a maximum width maxTbWidth of the transform block and a maximum height maxTbHeight of the transform block from the received information as follows.

[0283] [Formula 7]

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

[0285] [Formula 8]

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

[0287] Furthermore, the decoding apparatus may derive an upper-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.

[0288] [Formula 9]

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

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

[0291] Next, the decoding device can generate a residual block by performing the following process. Fig. 27 Description. First, the decoding device may determine whether the current transform block is divided (S2710). For example, the decoding device may determine whether the current transform block is divided based on whether the width and height of the current transform block are greater than the width and height of the maximum transform block. For example, when nTbW is greater than maxTbWidth or nTbH is greater than maxTbHeight, the decoding device may determine to generate a lower-layer transform block by dividing the current transform block.

[0292] When the current transform block is divided into lower layer transform blocks, as described above, the decoding apparatus may derive a width newTbW of the lower layer transform block and a height newTbH of the lower layer transform block as shown in the following equation ( S2720 ).

[0293] [Formula 10]

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

[0295] [Formula 11]

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

[0297] Next, the decoding device may generate a residual block using the lower layer transform block divided from the current transform block (S2730). Fig.26 As shown, 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 layer transform blocks may be first to fourth lower layer transform blocks 2621 to 2624 obtained by dividing the current transform block into four in a non-square form.

[0298] First, the decoding device may generate a residual block of the first lower layer transform block. Fig.26 , the first lower layer transform block 2621 may be specified by a sample position (xTb0, yTb0), a width newTbW of the lower layer transform block, and a height newTbH of the lower layer transform block. The decoding device may generate a residual block of the first lower layer transform block 2621 using the color component cIdx of the current CU. Based on this, the decoding device may generate a modified reconstructed picture. Thereafter, in-loop filtering may be performed on the modified reconstructed picture.

[0299] Next, when nTbW is greater than maxTbWidth, the decoding device may generate a residual block of the second lower transform block. The second lower transform block 2622 may be specified by the sample position (xTb0+newTbW, yTb0), the width newTbW of the lower transform block, and the height newTbH of the lower transform block. The decoding device may use the color component cIdx of the current CU to generate a residual block of the second lower transform block 2622. Based on this, the decoding device may generate a modified reconstructed picture. Thereafter, in-loop filtering may be performed on the modified reconstructed picture.

[0300] Next, when nTbH is greater than maxTbHeight, the decoding device may generate a residual block of the third lower transform block. The third lower transform block 2623 may be specified by a sample position (xTb0, yTb0+newTbH), a width newTbW of the lower transform block, and a height newTbH of the lower transform block. Similar to the above description, the decoding device may use the color component cIdx of the current CU to generate a residual block.

[0301] Next, when nTbW is greater than maxTbWidth and nTbH is greater than maxTbHeight, the decoding device may generate a residual block for the fourth lower layer transform block. The fourth lower layer transform block 2624 may be specified by a sample position (xTb0+newTbW, yTb0+newTbH), a width newTbW of the lower layer transform block, and a height newTbH of the lower layer transform block. Similar to the above description, the decoding device may use the color component cIdx of the current CU to generate a residual block.

[0302] In addition, when the division of the current transform block is not performed, the decoding device may perform inter-frame prediction as follows. For example, when nTbW is less than maxTbWidth and nTbH is less than maxTbHeight, the current transform block may not be divided. In this case, the decoding device may generate a residual block for the inter-frame prediction mode by performing scaling and transformation processing 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. Based on this, the decoding device may generate a modified reconstructed picture. Thereafter, in-loop filtering may be performed on the modified reconstructed picture.

[0303] Maximum size limit for chroma transform blocks in intra prediction mode

[0304] Hereinafter, the execution of the intra prediction mode to which the maximum size restriction of the chroma transform block for the above-mentioned chroma pipeline processing is applied will be described. The encoding device and the decoding device can perform intra prediction by restricting the maximum size of the chroma transform block according to the following description, and their operations can correspond to each other. Therefore, below, the operation of the decoding device will be described.

[0305] The decoding device according to the embodiment may generate a reconstructed picture by performing intra-frame prediction. In-loop filtering may be performed on the reconstructed picture. The decoding device according to the embodiment may directly obtain the following information from the bitstream or derive the following information from other information obtained from the bitstream to perform intra-frame prediction.

[0306] - Sample position (xTb0, yTb0) specifies 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

[0307] -Parameter nTbW specifies the width of the current transform block

[0308] -Parameter nTbH specifies the height of the current transform block

[0309] -Parameter predModeIntra specifies the intra prediction mode of the current CU

[0310] -Parameter cIdx specifies the color component of the current CU

[0311] The decoding device may derive a maximum width maxTbWidth of the transform block and a maximum height maxTbHeight of the transform block from the received information as follows.

[0312] [Formula 12]

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

[0314] [Formula 13]

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

[0316] Furthermore, the decoding apparatus may derive an upper-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.

[0317] [Formula 14]

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

[0319] Next, the decoding device may perform intra-frame prediction by performing the following process. Fig.28 Description. First, the decoding device may determine whether the current transform block is divided (S2810). For example, the decoding device may determine whether the current transform block is divided 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 device may determine whether to perform the division by further considering whether intra sub-partitioning (ISP) is applied to the current CU. For example, when nTbW is greater than maxTbWidth or nTbH is greater than maxTbHeight, the decoding device may determine that intra prediction is performed by dividing the current transform block. In addition, even in this case, the decoding device may determine that intra prediction is performed by dividing the current transform block only when ISP is not applied to the current CU (for example, the value of IntraSubpartitonSplitType is NO_ISP_SPLIT, that is, ISP is not applied to the current CU).

[0320] When the current transform block is divided into lower layer transform blocks, the decoding apparatus may derive a width newTbW of the lower layer transform block and a height newTbH of the lower layer transform block as shown in the following equation ( S2820 ).

[0321] [Formula 15]

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

[0323] [Formula 16]

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

[0325] It will refer to Fig.26 Description. In an embodiment, the width nTbW of the current transform block may be the width of the chroma CU, and the height nTbH of the current transform block may be the height of the 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 as the width and height of the transform block 2621 divided from the chroma CU. That is, in this embodiment, the current transform block may be a transform block having the width and height of the 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 obtained by dividing the current transform block into four in a non-square form.

[0326] Next, the decoding device may perform intra prediction using the lower layer transform block divided from the current transform block (S2830). First, the decoding device may perform intra prediction on the first lower layer transform block. Fig.26 , the first lower layer transform block 2621 may be specified by a sample position (xTb0, yTb0), a width newTbW of the lower layer transform block, and a height newTbH of the lower layer transform block. The decoding device may perform intra prediction of the first lower layer transform block 2621 using the intra prediction mode predModeIntra of the current CU and the color component cIdx of the CU. Thus, a modified reconstructed picture of the first lower layer transform block 2621 may be generated.

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

[0328] In addition, the decoding device may generate a residual sample matrix reSamples of size (newTbW)×(newTbH) by performing scaling and transform processing. For example, the decoding device may perform scaling and transform processing 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.

[0329] In addition, the decoding device may generate a reconstructed picture by performing picture reconstruction processing on the color component. For example, the decoding device may set the transform block position to (xTb0, yTb0), set the transform block width (nTbW) to newTbW, set the transform block height (nTbH) to newTbH, use the value of the parameter cIdx, use a prediction sample matrix predSamples of size (newTbW)×(newTbH), and use a residual sample matrix reSamples of size (newTbW)×(newTbH), thereby performing picture reconstruction processing on the color component.

[0330] Next, when nTbW is greater than maxTbWidth, the decoding device may perform intra prediction on the second lower layer transform block. The second lower layer transform block 2622 may be specified by the sample position (xTb0+newTbW, yTb0), the width newTbW of the lower layer transform block, and the height newTbH of the lower layer transform block. The decoding device may perform intra prediction of the second lower layer transform block 2622 using the intra prediction mode predModeIntra of the current CU and the color component cIdx of the current CU. Intra prediction of the second lower layer transform block 2622 may be performed on its sample position similar to intra prediction of the first lower layer transform block 2621. Therefore, a modified reconstructed picture of the second lower layer transform block 2622 may be generated.

[0331] Next, when 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 by the sample position (xTb0, yTb0+newTbH), the width newTbW of the lower transform block, and the height newTbH of the lower transform block. Similar to the above description, 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.

[0332] Next, when nTbW is greater than maxTbWidth and nTbH is greater than maxTbHeight, the decoding device may perform intra prediction on the fourth lower layer transform block. The fourth lower layer transform block 2624 may be specified by a sample position (xTb0+newTbW, yTb0+newTbH), a width newTbW of the lower layer transform block, and a height newTbH of the lower layer transform block. Similar to the above description, 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.

[0333] In addition, when the current transform block is not split, the decoding device may perform intra prediction as follows. For example, when nTbW is less than maxTbWidth and nTbH is less than maxTbHeight or ISP is applied to the current CU (eg, the value of IntraSubpartitonSplitType is not NO_ISP_SPLIT), the current transform block may not be split.

[0334] First, the decoding device may derive parameters nW, nH, numPartsX, and numPartsY as shown in the following equations.

[0335] [Formula 17]

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

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

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

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

[0340] In the above formula, IntraSubPartitionsSplitType specifies the ISP split type of the current CU, ISP_VER_SPLIT specifies the vertical ISP split, ISP_HOR_SPLIT specifies the horizontal ISP split. NumIntraSubPartitions specifies the number of ISP sub-splits.

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

[0342] Next, the decoding device may generate a residual sample matrix reSamples of size (nTbW)×(nTbH) by performing scaling and transform processing. For example, the decoding device may perform scaling and transform processing based on the sample position (xTbY+nW*xPartIdx, yTbY+nH*yPartIdx), the value of the parameter cIdx, the transform block width (nTbW)nW, and the transform block height (nTbH)nH.

[0343] Next, the decoding device may generate a reconstructed picture by performing picture reconstruction processing on the color component. For example, the decoding device may set the transform block position to (xTb0+nW*xPartIdx, yTb0+nH*yPartIdx), set the transform block width (nTbW) to nW, set the transform block height (nTbH) to nH, use the preset cIdx value, and use a prediction sample matrix predSamples of size (nTbW)×(nTbH) and a residual sample matrix reSamples of size (nTbW)×(nTbH), thereby performing picture reconstruction processing on the color component.

[0344] Encoding method

[0345] Below, we will refer to Fig.29A method in which an encoding device according to an embodiment performs encoding using the above method is described. The encoding device according to an embodiment may include a memory and at least one processor, and the at least one processor may perform the following encoding method.

[0346] First, the encoding device may determine the current block by dividing the image (S2910). Next, the encoding device may generate an inter-frame prediction block of the current block (S2920). Next, the encoding device may generate a residual block of the current block based on the inter-frame prediction block (S2930). Next, the encoding device may encode the inter-frame prediction mode information of the current block (S2940). In this case, the residual block may be encoded based on the size of the transform block of the current block, and the size of the transform block may be determined based on the color component of the current block.

[0347] More specifically, the position of the upper left sample of the transform block may be determined based on the position and color format of the upper left sample of the luma block corresponding to the current block.

[0348] In addition, 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. For example, the maximum width of the transform block may be determined based on the maximum size and color format of the transform block of the luminance 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 luminance block corresponding to the current block.

[0349] In addition, when the current block is a chroma block and the width of the transform block is greater than the maximum width of the transform block, a plurality of lower transform blocks may be generated by vertically dividing the current block. 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 is determined as the maximum width of the transform block, and the upper left coordinate of the second lower transform block may be determined as a value of the maximum width of the transform block shifted right from the upper left coordinate of the first transform block.

[0350] In addition, when the current block is a chroma block and the height of the transform block is greater than the maximum height of the transform block, a plurality of lower transform blocks may be generated by horizontally dividing the current block. 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 may be determined as the maximum height of the transform block, and the upper left coordinate of the fourth lower transform block may be determined as a value shifted downward from the upper left coordinate of the first transform block by the maximum height of the transform block.

[0351] In addition, when the color component of the current block is a chrominance component, the size of the transform block can be determined based on the color format. More specifically, the width of the transform block can be determined based on the maximum width of the transform block, and the maximum width of the transform block can be determined based on the maximum size and color format of the transform block of the luminance block corresponding to the current block.

[0352] In addition, when the color component of the current block is a chrominance component, the height of the transform block may be determined based on the maximum height of the transform 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 luminance block corresponding to the current block.

[0353] For example, when the color format of the current block is a format that specifies that the width of the chrominance block is half the width of the corresponding luminance block, since the maximum size of the transform block of the luminance block is 64×64, the maximum size of the transform block of the chrominance block can be determined to be 32×64.

[0354] Decoding method

[0355] Below, we will refer to Fig.30 A method in which a decoding device according to an embodiment performs decoding using the above method is described. A decoding device according to an embodiment may include a memory and at least one processor, and the at least one processor may perform the following decoding method.

[0356] First, the decoding device may determine a prediction mode of the current block (S3010). Next, when the prediction mode of the current block is an inter-frame prediction mode, the decoding device may generate a prediction block of the current block based on the inter-frame prediction mode information (S3020). Next, the decoding device may generate a residual block of the current block based on a transform block of the current block (S3030). Next, the decoding device may reconstruct the current block based on the prediction block and the residual block of the current block (S3040). In this case, the size of the transform block may be determined based on the color component of the current block.

[0357] The position of the upper left sample of the transform block may be determined based on the position and color format of the upper left sample of the luminance block corresponding to the current block. In addition, 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. For example, the maximum width of the transform block may be determined based on the maximum size and color format of the transform block of the luminance 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 luminance block corresponding to the current block.

[0358] In addition, when the current block is a chroma block and the width of the transform block is greater than the maximum width of the transform block, a plurality of lower transform blocks may be generated by vertically dividing the current block. 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 is determined as the maximum width of the transform block, and the upper left coordinate of the second lower transform block may be determined as a value of the maximum width of the transform block shifted right from the upper left coordinate of the first transform block.

[0359] In addition, when the current block is a chroma block and the height of the transform block is greater than the maximum height of the transform block, a plurality of lower transform blocks may be generated by horizontally dividing the current block. 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 may be determined as the maximum height of the transform block, and the upper left coordinate of the fourth lower transform block may be determined as a value shifted downward from the upper left coordinate of the first transform block by the maximum height of the transform block.

[0360] In addition, when the color component of the current block is a chrominance component, the size of the transform block can be determined based on the color format. More specifically, the width of the transform block can be determined based on the maximum width of the transform block, and the maximum width of the transform block can be determined based on the maximum size and color format of the transform block of the luminance block corresponding to the current block.

[0361] In addition, when the color component of the current block is a chrominance component, the height of the transform block may be determined based on the maximum height of the transform 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 luminance block corresponding to the current block.

[0362] For example, when the color format of the current block is a format that specifies that the width of the chrominance block is half the width of the corresponding luminance block, since the maximum size of the transform block of the luminance block is 64×64, the maximum size of the transform block of the chrominance block can be determined to be 32×64.

[0363] Application Implementation

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

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

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

[0367] Various embodiments of the present disclosure may be implemented in hardware, firmware, software or a combination thereof. In the case of implementing the present disclosure in hardware, the present disclosure may be implemented in an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a general purpose processor, a controller, a microcontroller, a microprocessor, etc.

[0368] 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 transmission and reception device, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camera, a video on demand (VoD) service provider, an OTT video (over the top video) device, an Internet streaming service provider, a three-dimensional (3D) video device, a video phone video device, a medical video device, etc., and may be used to process a video signal or a data signal. For example, an OTT video device may include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smart phone, a tablet PC, a digital video recorder (DVR), etc.

[0369] Fig.31 is a diagram showing a content streaming system to which an embodiment of the present disclosure can be applied.

[0370] like Fig.31 As shown in , a content streaming system to which the embodiments of the present disclosure are applied may mainly include an encoding server, a streaming server, a network server, a media storage device, a user device, and a multimedia input device.

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

[0372] The bitstream may be generated by the image encoding method or the image encoding device to which the embodiments of the present disclosure are applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

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

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

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

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

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

[0378] Industrial Applicability

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

Claims

1. An image decoding device (200) for image decoding, the image decoding device comprising: Memory; as well as at least one processor, the at least one processor connected to the memory, the at least one processor configured to: (a) Determine the prediction mode of the current block; (b) based on the prediction mode of the current block being an inter-frame prediction mode, generating a prediction block of the current block based on inter-frame prediction mode information; (c) generating a residual block of the current block based on the transform block of the current block; and (d) reconstructing the current block based on the prediction block and the residual block of the current block, It is characterized in that based on the fact that the color component of the current block is a chrominance component, the maximum width and maximum height of the transform block are determined respectively based on the maximum size of the luminance transform block corresponding to the current block and the color format of the current block.

2. An image encoding device (100) for image encoding, the image encoding device comprising: Memory; as well as at least one processor, the at least one processor connected to the memory, the at least one processor configured to: (a) Determine the current block by dividing the image; (b) generating an inter-frame prediction block of the current block; (c) generating a residual block of the current block based on the inter-frame prediction block; and (d) encoding the inter-frame prediction mode information of the current block, Characterized in that the residual block is encoded based on the size of the transform block of the current block, Based on the color components of the current block being chrominance components, the maximum width and the maximum height of the transform block are respectively determined based on the maximum size of a luminance transform block corresponding to the current block and the color format of the current block.

3. A device for transmitting data for an image, the device comprising: at least one processor configured to obtain a bit stream generated by an image encoding method; as well as a transmitter configured to transmit the bit stream, Wherein, the image encoding method comprises: (a) Determine the current block by dividing the image; (b) generating an inter-frame prediction block of the current block; (c) generating a residual block of the current block based on the inter-frame prediction block; and (d) encoding the inter-frame prediction mode information of the current block into the bitstream, Characterized in that the residual block is encoded into the bitstream based on the size of the transform block of the current block, Based on the color components of the current block being chrominance components, the maximum width and the maximum height of the transform block are respectively determined based on the maximum size of a luminance transform block corresponding to the current block and the color format of the current block.