Image encoding / decoding method and device using maximum transform size setting of chroma block and method for transmitting bit stream
By setting the maximum size of the transform block of the chroma block, the image encoding and decoding efficiency is improved, and the inefficiency problem in high-resolution and high-quality image transmission and storage is solved, reducing costs.
Patent Information
- Application Number
- CN202080058311.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-06-24
- Filing Date
- 2020-06-24
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2040-06-24
AI Technical Summary
The prior art is inefficient in the transmission and storage of high resolution and high quality images, resulting in increased costs.
Image encoding and decoding efficiency is improved by setting the maximum size of the transform block of the chroma block, including dividing the image blocks, determining the prediction mode, generating intra prediction and residual blocks, and determining the transform block size based on the color components.
Improves the efficiency of image encoding and decoding, and reduces transmission and storage costs.
Smart Images

Figure CN114270827B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an image encoding / decoding method and apparatus, and more particularly, to a method and apparatus for encoding / decoding an image by setting a maximum size of a transform block for a chrominance block, and a method for transmitting a bitstream generated by the image encoding method / apparatus of the present disclosure. Background Art
[0002] Recently, demand for high-resolution and high-quality images, such as high-definition (HD) and ultra-high-definition (UHD), is increasing across various fields. As the resolution and quality of image data improve, the amount of information or bits transmitted increases relative to existing image data. This increase in the amount of information or bits transmitted leads to increased transmission and storage costs.
[0003] Therefore, efficient image compression techniques are needed to effectively transmit, store, and reproduce information about high-resolution and high-quality images. Summary of the Invention
[0004] Technical issues
[0005] An object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0006] An object of the present disclosure is to provide an image encoding / decoding method and apparatus capable of improving encoding / decoding efficiency by setting a maximum size of a transform block of a chroma block.
[0007] Another object of the present disclosure is to provide a method for transmitting a bit stream generated by the image encoding method or apparatus according to the present disclosure.
[0008] Another object of the present disclosure is to provide a recording medium storing a bit stream generated by the image encoding method or apparatus according to the present disclosure.
[0009] Another object of the present disclosure is to provide a recording medium that stores a bit stream received and decoded by the image decoding apparatus according to the present disclosure and used to reconstruct an image.
[0010] The technical problems solved by the present disclosure are not limited to the above-mentioned technical problems, and those skilled in the art will understand other technical problems not described here through the following description.
[0011] Technical Solution
[0012] According to one aspect of the present disclosure, an image decoding method performed by an image decoding device may include the following steps: obtaining a current block by dividing an image; determining a prediction mode for the current block; generating an intra-prediction block for the current block based on whether the prediction mode of the current block is an intra-prediction mode; generating a residual block for the current block; and reconstructing the current block based on the intra-prediction block and the residual block of the current block. In this case, the intra-prediction block and the residual block may be generated based on the size of a transform block of the current block, and the size of the transform block may be determined based on the color components of the current block.
[0013] An image decoding device according to one aspect of the present disclosure may include a memory and at least one processor. The at least one processor may obtain a current block by dividing an image, determine a prediction mode for the current block, generate an intra-prediction block for the current block based on whether the prediction mode of the current block is an intra-prediction mode, generate a residual block for the current block, and reconstruct the current block based on the intra-prediction block and the residual block of the current block. In this case, the intra-prediction block and the residual block may be generated based on the size of a transform block of the current block, and the size of the transform block may be determined based on the color components of the current block.
[0014] According to one 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 intra-frame prediction block for the current block; generating a residual block for the current block based on the intra-frame prediction block; and encoding intra-frame prediction mode information for the current block. In this case, the intra-frame prediction block and 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 components of the current block.
[0015] In addition, a transmission method according to another aspect of the present disclosure may transmit a bit stream generated by the image encoding apparatus or the image encoding method of the present disclosure.
[0016] 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 apparatus or the image encoding method of the present disclosure.
[0017] The features of the above 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.
[0018] Beneficial effects
[0019] According to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0020] According to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus capable of improving encoding / decoding efficiency by setting a maximum size of a transform block of a chroma block.
[0021] Furthermore, according to the present disclosure, it is possible to provide a method of transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.
[0022] 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.
[0023] 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 apparatus according to the present disclosure and used to reconstruct an image.
[0024] Those skilled in the art will understand that the effects that can be achieved through the present disclosure are not limited to the contents that have 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
[0025] Figure 1 FIG. 1 is a diagram schematically illustrating a video encoding system to which embodiments of the present disclosure are applicable.
[0026] Figure 2 is a diagram schematically showing an image encoding device to which an embodiment of the present disclosure is applicable.
[0027] Figure 3 FIG. 1 is a diagram schematically showing an image decoding device to which an embodiment of the present disclosure is applicable.
[0028] Figure 4 is a diagram illustrating a segmentation structure of an image according to an embodiment.
[0029] Figure 5 is a view showing an embodiment of a partition type of a block according to a multi-type tree structure.
[0030] 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.
[0031] Figure 7 FIG. 1 is a diagram illustrating an embodiment of dividing a CTU into a plurality of CUs.
[0032] Figure 8 is a view illustrating an embodiment of a redundancy partitioning pattern.
[0033] Figure 9 is a flowchart illustrating a video / image encoding method based on inter-frame prediction.
[0034] Figure 10 is a view illustrating a configuration of the inter prediction unit 180 according to the present disclosure.
[0035] Figure 11is a flowchart illustrating a video / image decoding method based on inter-frame prediction.
[0036] Figure 12 is a view illustrating a configuration of the inter prediction unit 260 according to the present disclosure.
[0037] Figure 13 is a view illustrating neighboring blocks that may be used as spatial merging candidates according to an embodiment.
[0038] Figure 14 is a view schematically illustrating a method for constructing a merge candidate list according to an embodiment.
[0039] Figure 15 FIG. 1 is a diagram schematically illustrating a method for constructing a motion vector predictor candidate list according to an embodiment.
[0040] Figure 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.
[0041] Figure 17 is a flowchart illustrating an IBC-based video / image encoding method according to an embodiment.
[0042] Figure 18 is a view illustrating a configuration of a prediction unit for performing an IBC-based video / image encoding method according to an embodiment.
[0043] Figure 19 is a flowchart illustrating an IBC-based video / image decoding method according to an embodiment.
[0044] Figure 20 is a view illustrating a configuration of a prediction unit for performing an IBC-based video / image decoding method according to an embodiment.
[0045] Figure 21 is a view illustrating the syntax of chroma format signaling according to an embodiment.
[0046] Figure 22 is a view illustrating a chroma format classification table according to an embodiment.
[0047] Figure 23 is a diagram illustrating an example of division restriction of CUs for virtual pipeline processing.
[0048] Figures 24 to 26 is a diagram illustrating a division example of a CU and a TU according to an embodiment.
[0049] Figure 27 and Figure 28is a flowchart illustrating IBC prediction and intra prediction to which a maximum transform size according to an embodiment is applied.
[0050] Figure 29 is a flowchart illustrating a method of encoding an image by an encoding apparatus according to an embodiment.
[0051] Figure 30 is a flowchart illustrating a method of decoding an image by a decoding device according to an embodiment.
[0052] Figure 31 is a diagram illustrating a content streaming system to which embodiments of the present disclosure are applicable. DETAILED DESCRIPTION
[0053] 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.
[0054] 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, its detailed description will be omitted. In the drawings, parts not related to the description of the present disclosure are omitted, and like reference numerals are given to like parts.
[0055] In this 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.
[0056] In the present disclosure, the terms first, second, etc. are used only to distinguish one component from other components and do not limit the order or importance of the components unless otherwise specified. Accordingly, within the scope of the present disclosure, the first component in one embodiment may be referred to as the second component in another embodiment, and similarly, the second component in one embodiment may be referred to as the first component in another embodiment.
[0057] In this disclosure, components that are distinguished from each other are intended to clearly describe each feature and do not necessarily mean that the components must be separated. That is, multiple components can be integrated and implemented in a single hardware or software unit, or a 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 this disclosure.
[0058] In the present disclosure, the components described in the various embodiments are not necessarily essential components, and some components may be optional components. Therefore, embodiments consisting of a subset of the components described in the embodiments are also included in the scope of the present disclosure. In addition, embodiments that include other components in addition to the components described in the various embodiments are included in the scope of the present disclosure.
[0059] 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.
[0060] In this disclosure, a "picture" generally refers to a unit representing an image within a specific time period, while a slice / tile is a coding unit that constitutes a portion of a picture. A picture can be composed of one or more slices / tiles. In addition, a slice / tile can include one or more coding tree units (CTUs).
[0061] In the present disclosure, "pixel" or "picture element (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.
[0062] In this 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.
[0063] In the present disclosure, the term "current block" may refer to one of the following: "current coding block," "current coding unit," "encoding target block," "decoding target block," or "processing target block." When prediction is performed, the term "current block" may refer to either the "current prediction block" or the "prediction target block." When transform (inverse transform) / quantization (dequantization) is performed, the term "current block" may refer to either the "current transform block" or the "transform target block." When filtering is performed, the term "current block" may refer to the "filtering target block."
[0064] In addition, 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 the chroma block such as "chroma block" or "current chroma block."
[0065] 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".
[0066] In the present disclosure, the term "or" should be interpreted to mean "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 mean "additionally or alternatively".
[0067] Video Coding System Overview
[0068] Figure 1 is a diagram schematically illustrating a video encoding system according to the present disclosure.
[0069] 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 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 stream.
[0070] 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 referred to as a video / image encoding unit, and the decoding unit 22 may be referred to as 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.
[0071] The video source generator 11 can obtain video / images by capturing, synthesizing, or generating video / images. The video source generator 11 may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generation device may include, for example, a computer, a tablet computer, and a smartphone, and may generate videos / images (electronically). For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capture process may be replaced by a process for generating relevant data.
[0072] The encoding unit 12 may encode the input video / image. For compression and coding efficiency, the encoding unit 12 may perform a series of processes such as prediction, transformation, and quantization. The encoding unit 12 may output the encoded data (encoded video / image information) in the form of a bitstream.
[0073] The transmitter 13 transmits the encoded video / image information or data, output in the form of a bitstream, to the receiver 21 of the decoding device 20 in the form of a file or stream via 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 components for generating a media file in a predetermined file format and may also include components for transmission via a broadcast / communication network. The receiver 21 may extract / receive the bitstream from the storage medium or network and transmit the bitstream to the decoding unit 22.
[0074] 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.
[0075] The renderer 23 may render the decoded video / image. The rendered video / image may be displayed on a display.
[0076] Overview of Image Coding Devices
[0077] Figure 2 FIG. 1 is a diagram schematically illustrating an image encoding device to which an embodiment of the present disclosure is applicable.
[0078] like Figure 2 As shown, the image encoding apparatus 100 may include an image splitter 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 further include a subtractor 115.
[0079] 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.
[0080] The image splitter 110 may split the input image (or picture or frame) input to the image encoding device 100 into one or more processing units. For example, a processing unit may be referred to as a coding unit (CU). A coding unit may be obtained by recursively splitting a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree, binary tree, or ternary tree (QT / BT / TT) structure. For example, a coding unit may be split into multiple coding units of a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. For the splitting of the coding unit, a quadtree structure may be applied first, and then a binary tree structure and / or a ternary tree structure may be applied. The encoding process according to the present disclosure may be performed based on the final coding unit that is no longer split. The maximum coding unit may be used as the final coding unit, or a coding unit of a deeper depth obtained by splitting the maximum coding unit may be used as the final coding unit. Here, the encoding process may include the prediction, transform, and reconstruction processes described later. As another example, the processing unit of the encoding process may be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit. 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.
[0081] 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.
[0082] The intra-frame prediction unit 185 can predict the current block by referring to samples in the current picture. Depending on the intra-frame prediction mode and / or intra-frame prediction technology, the reference samples can be located in the neighborhood of the current block or can be placed separately. The intra-frame 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 planar 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 merely an example, and more or fewer directional prediction modes may be used depending on the settings. The intra-frame prediction unit 185 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0083] The inter-frame prediction unit 180 can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can 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 can include a motion vector and a reference picture index. The motion information can also include information about the inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter-frame prediction, neighboring blocks can include spatially neighboring blocks in the current picture and temporally neighboring blocks in the reference picture. The reference picture including the reference block and the reference picture including the temporally neighboring block can be the same or different. Temporally neighboring blocks can be referred to as collocated reference blocks, collocated CUs (colCUs), etc. A reference picture including temporally neighboring blocks can be referred to as collocated pictures (colPics). For example, the inter-frame prediction unit 180 can configure a motion information candidate list based on the neighboring blocks and generate information specifying which candidate to use to derive the motion vector and / or reference picture index for the current block. Inter-frame prediction can be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter-frame prediction unit 180 can use the motion information of the neighboring block as the motion information of the current block. In the case of skip mode, unlike 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 a 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.
[0084] The prediction unit can generate a prediction signal based on various prediction methods and prediction techniques described below. For example, the prediction unit can apply not only intra-frame prediction or inter-frame prediction, but also both intra-frame prediction and inter-frame prediction simultaneously to predict the current block. The prediction method that simultaneously applies both intra-frame prediction and inter-frame prediction to predict the current block can be referred to as combined inter-frame and intra-frame prediction (CIIP). In addition, the prediction unit can perform intra-frame block copying (IBC) to predict the current block. Intra-frame block copying can be used for content image / video encoding such as games, such as screen content coding (SCC). IBC is a method that uses a previously reconstructed reference block in the current picture at a predetermined distance from the current block to predict the current picture. When IBC is applied, the position of the reference block in the current picture can be encoded as a vector (block vector) corresponding to the predetermined distance. IBC essentially performs prediction in the current picture, but can be performed similarly to inter-frame prediction because the reference block is derived within the current picture. That is, IBC can use at least one of the inter-frame prediction techniques described in this disclosure.
[0085] The prediction signal generated by the prediction unit can be used to generate a reconstructed signal or 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.
[0086] 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 the 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 to blocks of variable size other than square.
[0087] 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 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.
[0088] The entropy encoder 190 can 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 can encode information required for video / image reconstruction (e.g., values of syntax elements, etc.) other than quantized transform coefficients together or separately. The encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in units of a network abstraction layer (NAL). The video / image information may also include information about various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The signaled information, transmitted information, and / or syntax elements described in the present disclosure may be encoded through the above-mentioned encoding process and included in the bitstream.
[0089] The bitstream may be transmitted over a network or 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.
[0090] 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 transform to the quantized transform coefficients through the dequantizer 140 and the inverse transformer 150.
[0091] 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 skip mode is applied, the prediction block can be used as the 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 through filtering as described below.
[0092] 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 bitstream.
[0093] 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.
[0094] 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 spatially adjacent block or the motion information of the temporally adjacent block. The memory 170 may store the reconstructed samples of the reconstructed block in the current picture and may transmit the reconstructed samples to the intra-frame prediction unit 185.
[0095] Overview of Image Decoding Equipment
[0096] Figure 3 FIG. 1 is a diagram schematically illustrating an image decoding device to which an embodiment of the present disclosure is applicable.
[0097] like Figure 3 As shown, the image decoding apparatus 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.
[0098] According to an embodiment, all or at least some of the 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.
[0099] The image decoding apparatus 200 having received a bit stream including video / image information may decode the image by performing the same operation as that performed by Figure 2 The image is reconstructed by processing corresponding to the processing performed by the image encoding device 100. For example, the image decoding device 200 can perform decoding using the processing unit applied in the image encoding device. Therefore, the processing unit of decoding can be, for example, a coding unit. The coding unit can be obtained by dividing the coding tree unit or the maximum coding unit. The reconstructed image signal decoded and output by the image decoding device 200 can be reproduced by a reproduction device (not shown).
[0100] The image decoding device 200 can receive the image in the form of a bit stream from Figure 2The received signal can be decoded by the entropy decoder 210. For example, the entropy decoder 210 can parse the bitstream to derive the information required for image reconstruction (or picture reconstruction) (for example, video / image information). 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 signaled / received information and / or syntax elements described in the present disclosure can be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 210 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs the values of the syntax elements required for image reconstruction and the quantized values of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method can receive a bin corresponding to each syntax element in the bitstream, use the decoding target syntax element information, the decoding information of the neighboring blocks and the decoding target block, or the information of the symbol / bin decoded at 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, after determining the context model, 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. 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 decoder 210, that is, the quantized transform coefficient and 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 .
[0101] 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.
[0102] 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 using quantization parameters (e.g., quantization step size information) and obtain the transform coefficients.
[0103] The inverse transformer 230 may inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0104] 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).
[0105] 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.
[0106] 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.
[0107] The inter-frame prediction unit 260 can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, to reduce the amount of motion information transmitted in the inter-frame prediction mode, motion information can 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 information on the inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks 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.
[0108] The adder 235 can generate a reconstructed 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 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 through filtering as described below.
[0109] 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.
[0110] The (modified) reconstructed picture stored in the DPB of the memory 250 can be used as a reference picture in the inter-frame prediction unit 260. The memory 250 can 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 can 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 can store the reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra-frame prediction unit 265.
[0111] In the present disclosure, the embodiments described in the filter 160, the inter-frame prediction unit 180 and the intra-frame prediction unit 185 of the image encoding device 100 can be applied equally or correspondingly to the filter 240, the inter-frame prediction unit 260 and the intra-frame prediction unit 265 of the image decoding device 200.
[0112] Overview of Image Segmentation
[0113] 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 according to 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 bit stream. 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 bit stream, and based on this, a series of processes (for example, prediction, residual processing, block / picture reconstruction, in-loop filtering, etc.) can be performed to perform image decoding.
[0114] 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.
[0115] Overview of CTU Segmentation
[0116] As described above, a coding unit (CTU) or a largest coding unit (LCU) may be obtained by recursively partitioning the coding tree unit (CTU) or the largest coding unit (LCU) according to a quadtree / binarytree / ternarytree (QT / BT / TT) structure. For example, the CTU may be first partitioned into a quadtree structure. Thereafter, the leaf nodes of the quadtree structure may be further partitioned using a multi-type tree structure.
[0117] Splitting according to the quadtree means that the current CU (or CTU) is equally split into four. By splitting according to the quadtree, the current CU can be split into four CUs with the same width and the same height. When the current CU is no longer split into the quadtree structure, the current CU corresponds to the leaf node of the quadtree structure. The CU corresponding to the leaf node of the quadtree structure can no longer be split and can be used as the final coding unit mentioned above. Alternatively, the CU corresponding to the leaf node of the quadtree structure can be further split by a multi-type tree structure.
[0118] Figure 5 1 is a diagram illustrating 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.
[0119] 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, by vertical binary splitting, two CUs with the same height as the current CU and half the width of the current CU can be generated. Horizontal binary splitting (SPLIT_BT_HOR) means that the current CU is equally split into two in the horizontal direction. Figure 5 As shown, through horizontal binary 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.
[0120] 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 trifurcated partitioning, 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 trifurcated partitioning (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 partitioning, two CUs with a height of 1 / 4 of the current CU and the same width as the current CU and one CU with a height of half the current CU and the same width as the current CU can be generated.
[0121] 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.
[0122] 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) that specifies whether quadtree partitioning is performed on the current CU (CTU or node (QT_node) of the quadtree) is notified by a signal. 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) can be signaled to specify the split direction. For example, the split direction can 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) can be signaled to specify whether the split type is a binary split type or a ternary split type. For example, the split type can 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 can 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 can be used as the above-mentioned final coding unit.
[0123] Based on mtt_split_cu_vertical_flag and mtt_split_cu_binary_flag, a multi-type tree partition mode (MttSplitMode) of a CU may be derived as shown in the following Table 1. In the following description, a multi-type tree partition mode may be referred to as a multi-tree partition type or a partition type.
[0124] [Table 1]
[0125] MttSplitMode mtt_split_cu_vertical_flag mtt_split_cu_binary_flag SPLIT_TT_HOR 0 0 SPLIT_BT_HOR 0 1 SPLIT_TT_VER 1 0 SPLIT_BT_VER 1 1
[0126] Figure 7 is a diagram showing an example of partitioning 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, while the remaining edges 720 represent 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, for example, 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 to be 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.
[0127] In an embodiment, when the size of the CTU is based on a luma sample unit of 128, the size of the CU may be 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 be from 64×64 to 2×2.
[0128] 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 represents the luma component (sample) transform block (TB) size.
[0129] 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 transformation / inverse transformation can be performed in units of TUs (TBs). For example, the maximum allowed luma TB size can be 64×64 and the maximum allowed chroma TB size can 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 can be automatically (or implicitly) split until the TB size limits in the horizontal and vertical directions are met.
[0130] In addition, for example, when intra prediction is applied, the intra prediction mode / type can be derived in units of CU (or CB), and the neighboring reference sample derivation and prediction sample generation process can be performed in units of TU (or TB). In this case, there can be one or more TUs (or TBs) in a CU (or CB) area, and in this case, multiple TUs or (TBs) can share the same intra prediction mode / type.
[0131] In addition, for a quadtree coding tree scheme with nested multi-type trees, the following parameters may be signaled from the encoding device to the decoding device as SPS syntax elements. For example, at least one of the following parameters may be signaled: CTU size as a parameter representing the root node size of the quadtree, MinQTSize as a parameter representing the minimum allowed quadtree leaf node size, MaxBtSize as a parameter representing the maximum allowed binary tree root node size, MaxTtSize as a parameter representing the maximum allowed ternary tree root node size, MaxMttDepth as a parameter representing the maximum allowed hierarchical depth of multi-type tree partitioning from a quadtree leaf node, MinBtSize as a parameter representing the minimum allowed binary tree leaf node size, or MinTtSize as a parameter representing the minimum allowed ternary tree leaf node size.
[0132] As an embodiment using a 4:2:0 chroma format, the CTU size can be set to 128×128 luminance blocks and two 64×64 chroma blocks corresponding to these luminance blocks. In this case, MinOTSize can be set to 16×16, MaxBtSize can be set to 128×128, MaxTtSzie can be set to 64×64, MinBtSize and MinTtSize can be set to 4×4, and MaxMttDepth can be set to 4. Quadtree partitioning can be applied to the CTU to generate quadtree leaf nodes. Quadtree leaf nodes can be referred to as leaf QT nodes. The size of the quadtree leaf node can range 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 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.
[0133] 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-mentioned coding tree scheme may be applied equally or separately to the luma blocks and chroma blocks of the current CU. Specifically, the luma blocks and chroma blocks 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 blocks and chroma blocks 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 / tile groups, the luma blocks and chroma blocks in one CTU may be restricted to have the same coding tree structure. However, for I slices / patch groups, luma blocks and chroma blocks can have separate block tree structures. If a separate block tree structure is applied, luma CTBs can be split into CUs based on a specific coding tree structure, and chroma CTBs can be split 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 can include coding blocks for the luma component or coding blocks for two chroma components, and a CU in a P or B slice / patch group can include blocks for three color components (one luma component and two chroma components).
[0134] Although a quadtree coding tree structure with nested multi-type trees has been described, the structure for partitioning a CU is not limited thereto. For example, the BT structure and the TT structure may be interpreted as concepts included in a multi-partition tree (MPT) structure, and the CU may be interpreted as being partitioned using the QT structure and the MPT structure. In the example where the CU is partitioned using 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 direction a leaf node of the QT structure is partitioned into, may be signaled to determine the partition structure.
[0135] In another example, the CU may be split in a manner different from the QT structure, the BT structure, or the TT structure. That is, instead of splitting a CU of a lower depth into 1 / 4 of a CU of a higher depth according to the QT structure, splitting a CU of a lower depth into 1 / 2 of a CU of a higher depth according to the BT structure, or splitting a CU of a lower depth into 1 / 4 or 1 / 2 of a CU of a higher depth according to the TT structure, in some cases the CU of a lower depth may be split 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 splitting the CU is not limited thereto.
[0136] The quadtree coding block structure with multiple tree types can provide a very flexible block segmentation structure. Due to the supported segmentation types in the multi-type tree, different segmentation patterns can potentially produce the same coding block structure in some cases. By limiting the occurrence of such redundant segmentation patterns in encoding and decoding devices, the amount of segmentation information data can be reduced.
[0137] For example, Figure 8 The following shows the possible redundant partitioning patterns that may appear in binary tree partitioning and ternary tree partitioning. 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 specific partition is prohibited, the signaling of the corresponding syntax element can be modified by reflecting this prohibition, thereby reducing the number of bits signaled for the partition. For example, 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 or ternary is not signaled and its value may be derived as 0 by the decoding device.
[0138] Overview of Inter-frame Prediction
[0139] Hereinafter, inter prediction according to the present disclosure will be described.
[0140] The prediction unit of the image encoding device / image decoding device according to the present disclosure can perform inter-frame prediction on a block-by-block basis to derive prediction samples. Inter-frame prediction may refer to 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 a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, the motion information of the current block can be predicted on a block, sub-block, or sample basis 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 information on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). When inter-frame prediction is applied, the neighboring blocks may include spatially neighboring blocks in the current picture and temporally neighboring blocks in the reference picture. The reference picture including the reference block and the reference picture including the temporally neighboring blocks 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 the 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 for the current block.
[0141] 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 can be used as a motion vector predictor and the motion vector difference can be signaled. In this case, the motion vector of the current block can 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).
[0142] Depending on 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. A motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, while a motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as L0 prediction, prediction based on the L1 motion vector may be referred to as L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be referred to as Bi prediction. Here, the L0 motion vector may specify a motion vector associated with reference picture list L0 (L0), while the L1 motion vector may specify a motion vector associated with reference picture list L1 (L1). Reference picture list L0 may include pictures preceding the current picture in output order as reference pictures, while reference picture list L1 may include pictures following the current picture in output order. The previous picture may be referred to as a forward (reference) picture, while the subsequent picture may be referred to as a backward (reference) picture. Reference picture list L0 may also include pictures following the current picture in output order as reference pictures. In this case, in 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 pictures preceding the current picture in the output order as reference pictures. In this case, in 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 the picture order count (POC) order.
[0143] Figure 9 is a flowchart illustrating a video / image encoding method based on inter-frame prediction.
[0144] Figure 10 is a view illustrating a configuration of the inter prediction unit 180 according to the present disclosure.
[0145] Figure 9 The encoding method can be Figure 2 The image encoding device is performed. Specifically, step S610 can be performed by the inter-frame prediction unit 180, and step S620 can be performed by the residual processor. Specifically, step S620 can be performed by the subtractor 115. Step S630 can be performed by the entropy encoder 190. The prediction information of step S630 can be derived by the inter-frame prediction unit 180, and the residual information of step S630 can 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 can be derived as a transform coefficient by the transformer 120 of the image encoding device, and the transform coefficient can be derived as a quantized transform coefficient by the quantizer 130. The information about the quantized transform coefficient can be encoded by the entropy encoder 190 through the residual encoding process.
[0146] 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 prediction samples of the current block. Here, the inter-frame prediction mode determination, motion information derivation, and prediction sample generation processes may be performed simultaneously or any one of them may be performed before the other processes. For example, Figure 10 As shown, the inter-frame prediction unit 180 of the image coding 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 for the current block, the motion information derivation unit 182 may derive motion information for the current block, and the prediction sample derivation unit 183 may derive prediction samples for the current block. For example, the inter-frame prediction unit 180 of the image coding device may search for a block similar to the current block within a predetermined area (search area) of a 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 minimum value. Based on this, a reference picture index of the reference picture in which the reference block is located may be derived, and a motion vector may be derived based on the positional difference between the reference block and the current block. The image coding device may determine a mode to be applied to the current block from among various prediction modes. The image coding device may compare rate-distortion (RD) costs for the various prediction modes and determine the optimal prediction mode for the current block. However, the method by which the image coding device determines the prediction mode for the current block is not limited to the above example, and various methods may be used.
[0147] For example, when 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 construct a merge candidate list using the derived merge candidate. 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 among 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.
[0148] As another example, when the MVP mode is applied to the current block, the image encoding device may derive motion vector predictor (MVP) candidates from neighboring blocks of the current block and use the derived MVP candidates to construct an MVP candidate list. Furthermore, the image encoding device may use the motion vector of an MVP candidate selected from among the MVP candidates included in the MVP candidate list as the MVP for the current block. In this case, for example, the motion vector of the reference block derived through the above-described 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 be the selected MVP candidate. A motion vector difference (MVD) may be derived as the difference obtained by subtracting the MVP from the motion vector of the current block. In this case, index information specifying the selected MVP candidate and information regarding the MVD may be signaled to the image decoding device. Furthermore, when the MVP mode is applied, the value of the reference picture index may be constructed as reference picture index information and separately signaled to the image decoding device.
[0149] 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.
[0150] The image encoding device may encode image information including prediction information and 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) and information about motion information as information related to the prediction process. Among the prediction mode information, the skip flag specifies whether skip mode is applied to the current block, while the merge flag specifies whether merge mode is applied to the current block. Alternatively, the prediction mode information may specify one of multiple prediction modes, such as a mode index. When the skip flag and the merge flag are 0, it can be determined that MVP mode is applied to the current block. The information about motion information may include candidate selection information (e.g., a merge index, an MVP flag, or an MVP index), which is information used to derive a motion vector. Among the candidate selection information, the merge index may be signaled when merge mode is applied to the current block and may be information used to select one of the merge candidates included in the merge candidate list. Among the candidate selection information, the MVP flag or MVP index may be signaled when MVP mode is applied to the current block and may be information used to select one of the MVP candidates in the MVP candidate list. In addition, the information about motion information may include information about the MVD and / or reference picture index information. In addition, the information about motion information may include information specifying whether L0 prediction, L1 prediction, or Bi prediction is applied. The residual information is information about residual samples. The residual information may include information about quantized transform coefficients used for the residual samples.
[0151] 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.
[0152] As described above, the image encoding device can generate a reconstructed picture (a picture including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples. This is so that the image encoding device can derive the same prediction result as the prediction result performed by the image decoding device, thereby improving encoding efficiency. Therefore, the image encoding device can store the reconstructed picture (or reconstructed samples and reconstructed blocks) 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.
[0153] Figure 11 is a flowchart illustrating a video / image decoding method based on inter-frame prediction.
[0154] Figure 12 is a view illustrating a configuration of the inter prediction unit 260 according to the present disclosure.
[0155] 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.
[0156] Figure 11 The decoding method can be obtained by Figure 3 The image decoding device is performed. Steps S810 to S830 can be performed by the inter-frame prediction unit 260, and the prediction information of step S810 and the residual information of step S840 can be obtained from the bit stream by the entropy decoder 210. The residual processor of the image decoding device can derive the residual samples of the current block based on the residual information (S840). Specifically, the dequantizer 220 of the residual processor can 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 can perform inverse transform on the transform coefficient to derive the residual sample of the current block. Step S850 can be performed by the adder 235 or the reconstructor.
[0157] 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 to apply to the current block based on prediction mode information in the prediction information.
[0158] For example, whether skip mode is applied to the current block can be determined based on a skip flag. Furthermore, whether merge mode or MVP mode is applied to the current block can be determined based on a merge flag. Alternatively, one of various inter-frame prediction mode candidates can be selected based on a mode index. Inter-frame prediction mode candidates can include skip mode, merge mode, and / or MVP mode, or can include various inter-frame prediction modes described below.
[0159] The image decoding device may derive motion information of the current block based on the determined inter-frame 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.
[0160] As another example, when the MVP mode is applied to the current block, the image decoding device can 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 can be performed based on the above-mentioned candidate selection information (MVP flag or MVP index). In this case, the MVD of the current block can be derived based on the information about the MVD, and the motion vector of the current block can be derived based on the MVP and MVD of the current block. In addition, the reference picture index of the current block can 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 can be derived as the reference picture referenced for inter-frame prediction of the current block.
[0161] The image decoding apparatus may generate prediction samples 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 the prediction samples of the current block may be derived using samples of the reference block indicated by the motion vector of the current block on the reference picture. In some cases, a prediction sample filtering process may also be performed on all or some of the prediction samples of the current block.
[0162] For example, Figure 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 a prediction mode of a current block based on the received prediction mode information, the motion information derivation unit 262 may derive motion information (motion vector and / or reference picture index, etc.) of the current block based on the received motion information, and the prediction sample derivation unit 263 may derive a prediction sample of the current block.
[0163] 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.
[0164] As described above, the inter-frame prediction process may include the steps of determining an inter-frame prediction mode, deriving motion information according to the determined prediction mode, and 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.
[0165] Hereinafter, the steps of deriving motion information according to the prediction mode will be described in more detail.
[0166] As described above, inter-frame prediction can be performed using the motion information of the current block. The image encoding device can derive the optimal 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 smallest 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.
[0167] When the merge mode is applied to the current block, the motion information of the current block is not directly transmitted, 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 transmitting flag information specifying that the merge mode is used and candidate selection information (e.g., a 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.
[0168] The image coding device may search for merge candidate blocks for deriving motion information of the current block to execute merge mode. For example, up to five merge candidate blocks may be used, but this is not limited to this. The maximum number of merge candidate blocks may be sent in a slice header or a tile group header, but this is not limited to this. After finding the merge candidate blocks, the image coding device may generate a merge candidate list and select the merge candidate block with the minimum RD cost as the final merge candidate block.
[0169] The present disclosure provides various embodiments for configuring a merge candidate list of merge candidate blocks. The merge candidate list may include, for example, five merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate may be used.
[0170] Figure 13 is a view illustrating neighboring blocks that can be used as spatial merging candidates.
[0171] Figure 14 is a view schematically illustrating a method for constructing a merge candidate list according to an example of the present disclosure.
[0172] 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). Figure 13As shown, the spatial neighboring blocks may include the lower left neighboring block A0, the left neighboring block A1, the upper right neighboring block B0, the upper neighboring block B1, and the 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 the right neighboring block, the lower neighboring block, and the 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. Figure 13 The five blocks shown are used and the available candidates are sequentially indexed to build a merge candidate list.
[0173] The image encoding / decoding device may insert temporal merge candidates derived by searching temporally neighboring blocks of the current block into a merge candidate list (S1120). The temporally neighboring blocks 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 temporally neighboring blocks are located may be referred to as a collocated picture or a collocated picture. The temporally 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. Furthermore, when motion data compression is applied to reduce memory load, specific motion information may be stored as representative motion information for each predetermined storage unit of the col picture. In this case, it is not necessary to store motion information for all blocks in the predetermined storage unit, thereby achieving a motion data compression effect. In this case, the predetermined storage unit may be predetermined, for example, as a 16×16 sample unit or an 8×8 sample unit, or the size of the predetermined storage unit may be signaled from the image encoding device to the image decoding device. When motion data compression is applied, the motion information of the temporally neighboring blocks may be replaced with the representative motion information of the predetermined storage unit in which the temporally neighboring blocks are located. That is, in this case, from the perspective of implementation, a temporal merging candidate can be derived based on the motion information of a prediction block covering the arithmetically left-shifted position after being arithmetically right-shifted by a predetermined value based on the coordinates (upper left sample position) of the temporally adjacent block (instead of the prediction block located on the coordinates of the temporally adjacent block). For example, when the predetermined storage unit is 2 n ×2 nWhen the coordinates of the sample unit and the temporally neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb >> n) << n), (yTnb >> n) << n)) can be used for temporal merge candidates. Specifically, for example, when the predetermined storage unit is a 16×16 sample unit and the coordinates of the temporally neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb >> 4) << 4), (yTnb >> 4) << 4)) can be used for temporal merge candidates. Alternatively, for example, when the predetermined storage unit is an 8×8 sample unit and the coordinates of the temporally neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb >> 3) << 3), (yTnb >> 3) << 3)) can be used for temporal merge candidates.
[0174] Referring again to Figure 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.
[0175] 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).
[0176] 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 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.
[0177] 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 samples of the current block may be derived based on the motion information of the current block. The image encoding device may derive residual samples of the current block based on the prediction samples, and signal the residual information of the residual samples to the image decoding device. As described above, the image decoding device may generate reconstructed samples based on the residual samples derived from the residual information and the prediction samples, and generate a reconstructed picture based on the reconstructed samples.
[0178] When skip mode is applied to the current block, the motion information of the current block can be derived using the same method as when 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.
[0179] When the MVP mode is applied to the current block, the reconstructed spatial neighboring blocks (e.g., Figure 13 The motion vector predictor (MVP) candidate list is generated based on the motion vector of the reconstructed 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 separately and used. 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 prediction information 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 specified reference picture from the prediction information.
[0180] Figure 15 is a diagram schematically illustrating a method for constructing a motion vector predictor candidate list according to an example of the present disclosure.
[0181] 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.
[0182] In step S1220, when the number of available spatial candidate blocks is less than 2, a temporal candidate block of the current block may be searched and the available candidate blocks may be inserted into the MVP candidate list (S1230). When the temporal candidate block is not available, a zero motion vector may be inserted into the MVP candidate list, thereby completing the construction of the MVP candidate list.
[0183] In addition, when MVP mode is applied, the reference picture index can be explicitly signaled. In this case, the reference picture index refidxL0 for L0 prediction and the reference picture index refidxL1 for L1 prediction can be signaled separately. For example, when MVP mode is applied and Bi prediction is applied, information about refidxL0 and information about refidxL1 can be signaled.
[0184] As described above, when the MVP mode is applied, information regarding the MVP derived by the image encoding device can be signaled to the image decoding device. For example, the information regarding the MVD can include information specifying the x and y components of the absolute value (MVD absolute value) and the sign of the MVD. In this case, when the MVD absolute value is greater than 0, information specifying whether the MVD absolute value is greater than 1 and the MVD remainder can be signaled in a step-by-step manner. For example, information specifying whether the MVD absolute value is greater than 1 can be signaled only when the value of the flag information specifying whether the MVD absolute value is greater than 0 is 1.
[0185] Figure 16 is a diagram illustrating a syntax structure for transmitting an MVD from an image encoding apparatus to an image decoding apparatus according to an embodiment of the present disclosure.
[0186] exist Figure 16 In , 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. Figure 16As shown in Figure 1, abs_mvd_greater1_flag can be sent only when abs_mvd_greater0_flag is 1. Figure 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. Figure 16 The grammatical structure shown can be used to derive MVD as shown in the following formula 1.
[0187] [Formula 1]
[0188] MVD[compIdx]=abs_mvd_greater0_flag[compIdx]*(abs_mvd_minus2[compIdx]+2)*(1-2*mvd_sign_flag[compIdx])
[0189] In addition, the MVD (MVDL0) for L0 prediction and the MVD (MVDL1) for L1 prediction may be signaled separately, and the information about the MVD may include information about MVDL0 and / or information about MVDL1. For example, when the MVP mode is applied to the current block and BI prediction is applied, information about MVDL0 and information about MVDL1 may be signaled.
[0190] Overview of Intra Block Copy (IBC) Prediction
[0191] Hereinafter, IBC prediction according to the present disclosure will be described.
[0192] 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 current picture reference (CPR).
[0193] For IBC, the image encoding device may perform block matching (BM) and derive an optimal block vector (or motion vector) for the current block (e.g., CU). The derived block vector (or motion vector) may be signaled to the image decoding device via the bitstream using a method similar to the signaling of motion information (motion vector) in inter-frame prediction described above. The image decoding device may derive a reference block for the current block in the current picture using the signaled block vector (motion vector), and thereby derive a prediction signal (prediction block or prediction sample) for the current block. Here, a block vector (or motion vector) may specify the displacement from the current block to a reference block located in an already reconstructed region of the current picture. Therefore, a block vector (or motion vector) may be referred to as a displacement vector. Hereinafter, in IBC, a motion vector may correspond to a block vector or a displacement vector. The motion vector of the current block may include a motion vector for the luma component (luma motion vector) or a motion vector for the chroma component (chroma motion vector). For example, the luma motion vector of an IBC-encoded CU may be in integer sample units (i.e., integer precision). Chroma motion vectors may be pruned in integer sample units. As described above, IBC may use at least one of the inter-frame prediction techniques, and for example, may use the above-described merge mode or MVP mode to encode / decode the luma motion vector.
[0194] When applying a merge mode to a luma IBC block, it can be similar to the reference Figure 14 The merging candidate list in the inter mode described above constructs the merging candidate list for the luma IBC block. However, in the case of the luma IBC block, temporally neighboring blocks may not be used as merging candidates.
[0195] When MVP mode is applied to the luminance IBC block, it can be similar to the reference Figure 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.
[0196] In IBC, reference blocks are derived from already reconstructed regions in the current picture. To reduce memory consumption and complexity in the image decoding device, only predefined regions within the reconstructed regions in the current picture can be referenced. This predefined region can include the current CTU in which the current block is included. By limiting the referenceable reconstructed region to the predefined region, IBC mode can be implemented in hardware using local on-chip memory.
[0197] 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.
[0198] Whether IBC is applied to the current block can be signaled as IBC execution information at the CU level. Information about the signaling method (IBC MVP mode or IBC skip / merge mode) for the motion vector of the current block can be signaled. The IBC execution information can be used to determine the prediction mode of the current block. Therefore, the IBC execution information can be included in the information about the prediction mode of the current block.
[0199] 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 IBC-encoded neighboring blocks. 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.
[0200] In the case of the IBC MVP mode, the block vector difference can be encoded using the same method as the motion vector difference of the inter-frame mode described above. The block vector prediction method can be constructed similarly to the MVP mode of the inter-frame mode and use an MVP candidate list including two candidates as predictors. One of the two candidates can be derived from the left neighboring block, and the other candidate can be derived from the 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 specifying one of the two block vector predictors (e.g., a flag) is signaled similarly to the MVP mode of the inter-frame mode and used as candidate selection information. The MVP candidate list may include an HMVP candidate and / or a zero motion vector as a default block vector.
[0201] The HMVP candidate may be referred to as a history-based MVP candidate, and the MVP candidate, merge candidate, or 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 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 MVP candidate list of the current block.
[0202] 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.
[0203] Figure 17 is a flowchart illustrating a video / image encoding method based on IBC.
[0204] Figure 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.
[0205] Figure 17 The encoding method can be Figure 2 The image encoding device of . Specifically, step S1410 can be performed by the prediction unit and step S1420 can be performed by the residual processor. Specifically, step S1420 can be performed by the subtractor 115. Step S1430 can be performed by the entropy encoder 190. The prediction information of step S1430 can be derived by the prediction unit and the residual information of step S1430 can 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 can be derived through the transform coefficient via the transformer 120 of the image encoding device, and the transform coefficient can be derived through the transform coefficient quantized by the quantizer 130. The information about the quantized transform coefficient can be encoded by the entropy encoder 190 through the residual encoding process.
[0206] 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, Figure 18 As shown, the prediction unit of an image encoding device for performing an IBC-based video / image encoding method 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 a reconstruction area (or a certain area (search area) of the reconstruction area) of the current picture and derive a reference block whose difference with the current block is equal to or less than a specific criterion or minimum value. The image encoding device may derive a motion vector based on the displacement difference between the reference block and the current block. The image encoding device may determine a mode to be applied to the current block from among various prediction modes. The image encoding device may compare RD costs for various prediction modes and determine the optimal prediction mode for the current block. However, the method by which the image encoding device determines the prediction mode of the current block is not limited to the above example and various methods may be used.
[0207] For example, when 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 construct a merge candidate list using the derived merge candidate. 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 from among the reference blocks indicated by the merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information 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.
[0208] As another example, when the MVP mode is applied to the current block, the image encoding device may derive a motion vector predictor (MVP) candidate from a neighboring block of the current block and use the derived MVP candidate to construct an MVP candidate list. In addition, the image encoding device may use the motion vector of an MVP candidate selected from among the MVP candidates included in the MVP candidate list as the MVP of the current block. In this case, for example, the motion vector indicating the reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block, and the MVP candidate with the smallest difference from the motion vector of the current block among the MVP candidates may become the selected MVP candidate. A motion vector difference (MVD) obtained by subtracting the 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 the MVD may be signaled to the image decoding device.
[0209] 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.
[0210] The image encoding device may encode image information including prediction information and 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, the MVP flag or MVP index may be signaled when applying the MVP mode 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.
[0211] 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.
[0212] Furthermore, as described above, the image encoding device can generate a reconstructed picture (a picture including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples. This is so that the image encoding device can derive the same prediction result as the prediction result performed by the image decoding device, thereby improving coding efficiency. Therefore, the image encoding device can store the reconstructed picture (or reconstructed samples and reconstructed blocks) 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.
[0213] Figure 19 is a flowchart illustrating a video / image decoding method based on IBC.
[0214] Figure 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.
[0215] The image decoding apparatus may perform an operation corresponding to the operation performed by the image encoding apparatus.The image decoding apparatus may perform IBC prediction on the current block based on the received prediction information to derive a prediction sample.
[0216] Figure 19 The decoding method can be obtained by Figure 3 The image decoding device of the present invention is performed. Steps S1610 to S1630 can be performed by the prediction unit, and the prediction information of step S1610 and the residual information of step S1640 can be obtained from the bit stream by the entropy decoder 210. The residual processor of the image decoding device can derive the residual samples of the current block based on the residual information (S1640). Specifically, the dequantizer 220 of the residual processor can 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 can perform inverse transform on the transform coefficient to derive the residual sample of the current block. Step S1650 can be performed by the adder 235 or the reconstructor.
[0217] 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.
[0218] For example, whether to apply skip mode to the current block can be determined based on a skip flag. Alternatively, whether to apply merge node or MVP mode to the current block can be determined based on a merge flag. Alternatively, one of various prediction mode candidates can be selected based on a mode index. Prediction mode candidates can include skip mode, merge mode, and / or MVP mode, or can include the various inter-frame prediction modes described above.
[0219] The image encoding device may derive the motion vector of the current block based on the determined prediction mode (S1620). For example, when the skip mode or merge mode is applied to the current block, the image decoding device may construct the above-mentioned merge candidate list and select one of the merge modes included in the merge candidate list. The selection may be performed based on the above-mentioned candidate selection information (merge index). The motion vector of the selected merge candidate may be used to derive the motion vector of the current block. For example, the motion vector of the selected merge candidate may be used as the motion vector of the current block.
[0220] 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.
[0221] The image decoding apparatus may generate prediction samples of the current block based on the motion vector of the current block (S1630). The prediction samples of the current block may be derived using samples of a reference block 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 on all or some of the prediction samples of the current block.
[0222] For example, Figure 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 a prediction mode for a current block based on received prediction mode information in the prediction mode determination unit, derive a motion vector for the current block based on received information about the motion vector in the motion vector derivation unit, and derive a prediction sample for the current block in the prediction sample derivation unit.
[0223] The image decoding device may generate residual samples of the current block based on the received residual information (S1640). 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 on the samples (S1650). Thereafter, as described above, the in-loop filtering process is also applied to the reconstructed picture.
[0224] As described above, one unit (e.g., coding unit (CU)) may include a luma block (luma coding block (CB)) and a chroma block (chroma CB). In this case, the luma block and the corresponding chroma block 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 corresponding chroma block have the same motion information.
[0225] Overview of Chroma Formats
[0226] The following will describe the chroma format. An image can be encoded as coded data including a luma component (e.g., Y) array and two chroma component (e.g., Cb and Cr) arrays. For example, one pixel of the encoded image can include a luma sample and a chroma sample. The chroma format can be used to represent the arrangement format of the luma sample and the chroma sample, and the chroma format can be referred to as a color format.
[0227] 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 the luma array and a width equal to half 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 the luma array and a width equal to half 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 equal to and a width equal to the luma array.
[0228] For example, in 4:2:0 sampling, chroma samples can be located below their corresponding luma samples. In 4:2:2 sampling, chroma samples can be positioned to overlap with their corresponding luma samples. In 4:4:4 sampling, both luma and chroma samples can be located in overlapping positions.
[0229] The chroma format used in the encoding device and the decoding device may be predetermined. Alternatively, the chroma format may be signaled from the encoding device to the decoding device for adaptive use in the encoding device and the decoding device. In 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 Figure 21 In the SPS syntax shown.
[0230] also, Figure 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 the chroma format to be applied to the coded image. separate_colour_plane_flag may specify whether the color arrays are processed separately in a particular chroma format. For example, a first value of chroma_format_idc (e.g., 0) may specify monochrome sampling. A second value of chroma_format_idc (e.g., 1) may specify 4:2:0 sampling. A third value of chroma_format_idc (e.g., 2) may specify 4:2:2 sampling. A fourth value of chroma_format_idc (e.g., 3) may specify 4:4:4 sampling.
[0231] 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 and together with a monochrome sampled picture. In this case, ChromaArrayType may be set to 0.
[0232] Intra prediction of chroma blocks
[0233] When intra prediction is performed on the current block, the prediction of the luminance component block (luminance block) and the 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.
[0234] For example, the intra prediction mode of a chroma block may be specified based on intra chroma prediction mode information, and the intra chroma prediction mode information may be signaled in the form of an intra_chroma_pred_mode syntax element. For example, the intra chroma prediction mode information may indicate one of a planar mode, a DC mode, a vertical mode, a horizontal mode, a derived mode (DM), and a cross-component linear model (CCLM) mode. Here, the planar mode may specify intra prediction mode #0, the DC mode may specify intra prediction mode #1, the vertical mode may specify intra prediction mode #26, and the horizontal mode may specify intra prediction mode #10. DM may also be referred to as a direct mode. CCLM may also be referred to as a linear model (LM).
[0235] DM and CCLM are related intra-prediction modes that use information about luma blocks to predict chroma blocks. DM may indicate a mode that applies the same intra-prediction mode as the luma component as the chroma component's intra-prediction mode. CCLM, on the other hand, 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 generating the prediction blocks for the chroma blocks as the prediction samples for the chroma blocks.
[0236] [Formula 2]
[0237] pred c (i, j) = α·rec L ′(i, j)+β
[0238] 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.
[0239] Virtual Pipeline Data Unit
[0240] 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.
[0241] Additionally, to keep the VPDU size to 64×64 luma samples, you can limit Figure 23 Partitioning of the CU shown. More specifically, at least one of the following restrictions may apply.
[0242] Restriction 1: For a CU with a width or height of 128 or a width and height of 128, ternary tree (TT) partitioning is not allowed.
[0243] 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 (e.g., for a CU with a width of 128 and a height less than 128, horizontal binary tree partitioning is not allowed).
[0244] 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 (e.g., for a CU with a height of 128 and a width less than 128, vertical binary tree partitioning is not allowed).
[0245] The maximum size limit of chroma blocks for pipeline processing
[0246] As described above with respect to the partitioning structure and transform processing, the CU can be divided to generate multiple TUs. When the size of the CU is larger than the maximum TU size, the CU can be divided into multiple TUs. Therefore, transformation and / or inverse transformation can be performed on each TU. Generally, the maximum TU size of the luminance block can be set to the maximum available transform size, which can be performed by the encoding device and / or decoding device. An example of dividing CU and TU according to an embodiment is shown in FIG. Figures 24 to 26 middle.
[0247] Figure 24An example of a TU generated by splitting a luma CU and a chroma CU according to an embodiment is shown. In an embodiment, the maximum size of a luma CU may be 64×64, the maximum available transform size may be 32×32, and non-square TUs may not be allowed. Therefore, the maximum size of a luma component transform block may be 32×32. In this embodiment, the maximum TU size may be set as shown in the following equation.
[0248] [Formula 3]
[0249] maxTbSize=(cIdx==0)? MaxTbSizeY:MaxTbSizeY / max(SubWidthC,SubHeightC)
[0250] In the above formula, maxTbSize may be the maximum size of a transform block (TB), and cIdx may be the color component of the corresponding block. cIdx 0 may represent the luma component, 1 may represent the Cb chroma component, and 2 may represent the Cr chroma component. MaxTbSizeY may represent the maximum size of a transform block for the luma component, SubWidthC may represent the ratio of the width of the luma block to the width of the chroma block, SubHeightC may represent the ratio of the height of the luma block to the height of the chroma block, and max(A,B) may represent a function that returns the larger value of A or B as the result value.
[0251] 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 signaled from the encoding device to the decoding device via the bitstream.
[0252] In addition, in the above embodiment, the maximum size of the transform block of the chroma block can 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 can 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. Figure 23 shown.
[0253] 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 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 Figure 24 For example, Figure 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 of dividing the luma CU into transform blocks.
[0254] Figure 25 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 a 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 a luma component transform block may be 64×64. In this embodiment, the maximum size of a transform block may be set as shown in the following equation. In the following equation, min(A, B) may be a function that returns the smaller value of A and B.
[0255] [Formula 4]
[0256] maxTbSize=(cIdx==0)? MaxTbSizeY:MaxTbSizeY / min(SubWidthC,SubHeightC)
[0257] 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 Figure 25 In the example, the luma CU and chroma CU are divided into multiple TUs.
[0258] exist Figure 24 and Figure 25 In the example of , when a chroma CU having a 4:2:2 format is divided into TUs, the division is performed in a different form from the division of the corresponding luma CU 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 the chroma block described above, in order to reduce delay 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 the luma block corresponding to the chroma block.
[0259] However, in Figure 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). Figure 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-described TU partitioning method, when the 4:2:2 format is used, since the luminance block and the corresponding chroma block do not match, separate processing may be added to perform pipeline processing, or pipeline processing may not be performed.
[0260] Maximum size limit for chroma transform blocks used for pipeline processing
[0261] Hereinafter, a method of setting the size of the maximum transform block of the chroma CU so as to satisfy the conditions for executing the above-mentioned VPDU will be described.
[0262] Figure 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 a luma CU may be 128×128, the maximum available transform size may be 64×64, and partitioning into non-square TUs may be allowed. Therefore, the maximum size of a luma component transform block may be 64×64.
[0263] like Figure 26 As shown, in order to be divided into non-square TUs, the maximum size of the transform block can be defined in terms of 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.
[0264] [Formula 5]
[0265] maxTbWidth=(cIdx==0)? MaxTbSizeY:MaxTbSizeY / SubWidthC
[0266] [Formula 6]
[0267] maxTbHeight=(cIdx==0)? MaxTbSizeY:MaxTbSizeY / SubHeightC
[0268] As in the above embodiment, by defining the maximum size of the transform block as width and height, such as Figure 26 As shown in the example of , even in the case of a chroma CU with a 4:2:2 format, the chroma CU can be divided into TUs in the same manner as 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 corresponding chroma block can be performed immediately after encoding (or decoding) of the luma block, thereby reducing delay in pipeline processing.
[0269] Maximum size limit for chroma transform blocks in intra prediction mode
[0270] The following describes the execution of intra-frame prediction mode with the maximum size restriction of chroma transform blocks used for the chroma pipeline processing described above. The encoding and decoding devices can perform intra-frame prediction by restricting the maximum size of chroma transform blocks as described below, and their operations can correspond to each other. Therefore, the following describes the operation of the decoding device.
[0271] The decoding device according to the embodiment can generate a reconstructed picture by performing intra-frame prediction. In-loop filtering can be performed on the reconstructed picture. The decoding device according to the embodiment can obtain the following information directly from the bitstream or derive the following information from other information obtained from the bitstream to perform intra-frame prediction.
[0272] - 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
[0273] -Parameter nTbW specifies the width of the current transform block
[0274] -Parameter nTbH specifies the height of the current transform block
[0275] -Parameter predModeIntra specifies the intra prediction mode of the current CU
[0276] -Parameter cIdx specifies the color component of the current CU
[0277] 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.
[0278] [Formula 7]
[0279] maxTbWidth=(cIdx==0)? MaxTbSizeY:MaxTbSizeY / SubWidthC
[0280] [Formula 8]
[0281] maxTbHeight=(cIdx==0)? MaxTbSizeY:MaxTbSizeY / SubHeightC
[0282] Furthermore, the decoding apparatus may derive the 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.
[0283] [Formula 9]
[0284] (xTbY,yTbY)=(cIdx==0)? (xTb0,yTb0):(xTb0*SubWidthC,yTb0*SubHeightC)
[0285] Hereinafter, the decoding device may perform intra prediction by performing the following process. 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. 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 to perform intra prediction by dividing the current transform block. In addition, even in this case, the decoding device may determine to perform intra prediction 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).
[0286] 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 ( S2720 ).
[0287] [Equation 10]
[0288] newTbW=(nTbW>maxTbWidth)? (nTbW / 2):nTbW
[0289] [Equation 11]
[0290] newTbH=(nTbH>maxTbHeight)? (nTbH / 2):nTbH
[0291] It will refer to Figure 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-layer transform block and the height newTbH of the lower-layer 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-layer transform blocks may be the first lower-layer transform block 2621 to the fourth lower-layer transform block 2624 obtained by dividing the current transform block into four in a non-square form.
[0292] Next, the decoding apparatus may perform intra prediction using the lower layer transform blocks divided from the current transform block (S2730). First, the decoding apparatus may perform intra prediction on the first lower layer transform block. Figure 26, the first lower layer transform block 2621 can be specified by the sample position (xTb0, yTb0), the width newTbW of the lower layer transform block, and the height newTbH of the lower layer transform block. The decoding device can use the intra prediction mode predModeIntra of the current CU and the color component cIdx of the CU to perform intra prediction of the first lower layer transform block 2621. Therefore, a modified reconstructed picture of the first lower layer transform block 2621 can be generated.
[0293] 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 perform the intra-frame sample prediction process using 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, the coding block height (nCbH)nTbH, and the value of the parameter cIdx.
[0294] In addition, the decoding device may generate a residual sample matrix reSamples of a size of (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.
[0295] 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.
[0296] 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 a sample position (xTb0+newTbW, 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 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 positions similarly to the intra prediction of the first lower layer transform block 2621. Thus, a modified reconstructed picture of the second lower layer transform block 2622 may be generated.
[0297] Next, when nTbH is greater than maxTbHeight, the decoding device may perform intra prediction on the third lower layer transform block. The third lower layer transform block 2623 may be specified by the sample position (xTb0, yTb0+newTbH), the width newTbW of the lower layer transform block, and the 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.
[0298] 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 the sample position (xTb0+newTbW, yTb0+newTbH), the width newTbW of the lower layer transform block, and the 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.
[0299] 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 (for example, the value of IntraSubpartitonSplitType is not NO_ISP_SPLIT), the current transform block may not be split.
[0300] First, the decoding device may derive parameters nW, nH, numPartsX, and numPartsY as shown in the following equations.
[0301] [Equation 12]
[0302] nW=IntraSubPartitionsSplitType==ISP_VER_SPLIT? nTbW / NumIntraSubPartitions:nTbW
[0303] nH=IntraSubPartitionsSplitType==ISP_HOR_SPLIT? nTbH / NumIntraSubPartitions:nTbH
[0304] numPartsX=IntraSubPartitionsSplitType==ISP_VER_SPLIT? NumIntraSubPartitions:1
[0305] numPartsY=IntraSubPartitionsSplitType==ISP_HOR_SPLIT? NumIntraSubPartitions:1
[0306] In the above formula, IntraSubPartitionsSplitType specifies the ISP split type of the current CU, ISP_VER_SPLIT specifies vertical ISP split, and ISP_HOR_SPLIT specifies horizontal ISP split. NumIntraSubPartitions specifies the number of ISP sub-splits.
[0307] 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 the value of yPartIdx may have a value from 0 to numPartsY-1.
[0308] 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.
[0309] Next, the decoding device may generate a reconstructed picture by performing a picture reconstruction process 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 a picture reconstruction process on the color component.
[0310] Maximum size limit for chroma transform blocks in inter prediction mode and IBC prediction mode
[0311] The following describes the execution of inter-frame prediction mode and IBC prediction mode with the maximum size restriction of chroma transform blocks used for the chroma pipeline processing described above. Encoding and decoding devices can perform inter-frame prediction and IBC prediction by restricting the maximum size of chroma transform blocks according to the following description, and their operations can correspond to each other. Furthermore, the following description of inter-frame prediction can be modified to apply to IBC prediction mode. Therefore, the following describes the inter-frame prediction operation of a decoding device according to embodiments.
[0312] The decoding device according to the embodiment can 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.
[0313] In addition, the decoding device can 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 can use the prediction block and the residual block to generate a reconstructed block.
[0314] Hereinafter, a method for limiting the maximum size of a chroma transform block by a decoding device according to an embodiment to generate a residual block of a CU encoded in an inter prediction mode will be described. The decoding device can use the residual block generated in this step to generate a reconstructed block.
[0315] The decoding device according to the embodiment may obtain the following information directly 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.
[0316] - 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
[0317] -Parameter nTbW specifies the width of the current transform block
[0318] -Parameter nTbH specifies the height of the current transform block
[0319] -Parameter cIdx specifies the color component of the current CU
[0320] 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.
[0321] [Equation 13]
[0322] maxTbWidth=(cIdx==0)? MaxTbSizeY:MaxTbSizeY / SubWidthC
[0323] [Equation 14]
[0324] maxTbHeight=(cIdx==0)? MaxTbSizeY:MaxTbSizeY / SubHeightC
[0325] Furthermore, the decoding apparatus may derive the 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.
[0326] [Equation 15]
[0327] (xTbY,yTbY)=(cIdx==0)? (xTb0,yTb0):(xTb0*SubWidthC,yTb0*SubHeightC)
[0328] 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.
[0329] Next, the decoding device may generate a residual block by performing the following process. First, the decoding device may determine whether the current transform block is split (S2810). For example, the decoding device may determine whether the current transform block is split 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 splitting the current transform block.
[0330] When the current transform block is divided into lower layer transform blocks, as in the above-mentioned intra prediction example, 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 ).
[0331] [Equation 16]
[0332] newTbW=(nTbW>maxTbWidth)? (nTbW / 2):nTbW
[0333] [Equation 17]
[0334] newTbH=(nTbH>maxTbHeight)? (nTbH / 2):nTbH
[0335] Next, the decoding device may generate a residual block using the lower layer transform block divided from the current transform block (S2830). Figure 26 As shown, the current transform block can 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 can be the first lower-layer transform block 2621 to the fourth lower-layer transform block 2624 obtained by dividing the current transform block into four in a non-square form.
[0336] First, the decoding device may generate a residual block for the first lower layer transform block. Figure 26 , the first lower layer transform block 2621 can be specified by the sample position (xTb0, yTb0), the width newTbW of the lower layer transform block, and the height newTbH of the lower layer transform block. The decoding device can use the color component cIdx of the current CU to generate a residual block for the first lower layer transform block 2621. Based on this, the decoding device can generate a modified reconstructed picture. Thereafter, in-loop filtering can be performed on the modified reconstructed picture.
[0337] Next, when nTbW is greater than maxTbWidth, the decoding device may generate a residual block for 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 use the color component cIdx of the current CU to generate the residual block for the second lower layer 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.
[0338] Next, when nTbH is greater than maxTbHeight, the decoding device may generate a residual block for the third lower layer transform block. The third lower layer transform block 2623 may be specified by the sample position (xTb0, yTb0+newTbH), the width newTbW of the lower layer transform block, and the height newTbH of the lower layer transform block. Similar to the above description, the decoding device may generate a residual block using the color component cIdx of the current CU.
[0339] 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 the sample position (xTb0+newTbW, yTb0+newTbH), the width newTbW of the lower layer transform block, and the 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 the residual block.
[0340] In addition, when the current transform block is not split, 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 split. In this case, the decoding device may generate a residual block for the inter-frame prediction mode by performing scaling and transform 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.
[0341] Encoding method
[0342] Below, we will refer to Figure 29 A method of encoding performed by an encoding device according to an embodiment 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 execute the following encoding method.
[0343] First, the encoding device may determine a current block by dividing an image (S2910). Next, the encoding device may generate an intra-frame prediction block for the current block (S2920). Next, the encoding device may generate a residual block for the current block based on the intra-frame prediction block (S2930). Next, the encoding device may encode intra-frame prediction mode information for the current block (S2940).
[0344] In this case, the intra prediction block and 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 components of the current block.
[0345] The color component may be any one of a luminance component and a chrominance component, and when the color component of the current block is a chrominance component, the size of the transform block may be determined based on a color format.
[0346] For transform block size setting, the width of the transform block may be determined based on a maximum width of the transform block, and the maximum width of the transform block may be determined based on a maximum size and a color format of a transform block of a luminance block corresponding to a current block.
[0347] In addition, for transform block size setting, 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.
[0348] In addition, 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.
[0349] More specifically, the upper left position of the transform block may be determined based on the maximum width of the transform block and the maximum height of the transform block, the maximum width of the transform block may be determined based on the maximum size and color format of the transform block of the 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.
[0350] 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, multiple lower-layer transform blocks can be generated by vertically splitting the current block. In this case, an intra-frame prediction block and a residual block can be generated based on the multiple lower-layer transform blocks.
[0351] More specifically, the plurality of lower-layer transform blocks may include a first lower-layer transform block and a second lower-layer transform block, and the width of the first lower-layer transform block is determined as the maximum width of the transform block, and the upper-left coordinate of the second lower-layer transform block may be determined as a value shifted rightward from the upper-left coordinate of the first lower-layer transform block by the maximum width of the transform block.
[0352] In addition, if the current block is a chroma block and the height of the transform block is greater than the maximum height of the transform block, multiple lower-layer transform blocks can be generated by horizontally splitting the current block. In this case, an intra-frame prediction block and a residual block can be generated based on the multiple lower-layer transform blocks.
[0353] More specifically, the plurality of lower layer transform blocks may include a third lower layer transform block and a fourth lower layer transform block. The height of the third lower layer transform block may be determined as the maximum height of the transform block, and the upper left coordinate of the fourth lower layer transform block may be determined as a value shifted downward from the upper left coordinate of the first lower layer transform block by the maximum height of the transform block.
[0354] As an implementation of the above description, when the color format of the current block is 4:4:4 format, the maximum size of the transform block can be 64×64, when the color format of the current block is 4:2:2 format, the maximum size of the transform block can be 32×64, and when the color format of the current block is 4:2:0 format, the maximum size of the transform block can be 32×32.
[0355] Decoding method
[0356] Below, we will refer to Figure 30 A method of performing decoding by a decoding device according to an embodiment using the above method is described. The 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.
[0357] First, the decoding device may obtain a current block by dividing an image (S3010). Next, the decoding device may determine a prediction mode for the current block (S3020). Next, when the prediction mode for the current block is an intra-frame prediction mode, the decoding device may generate an intra-frame prediction block for the current block (S3030). Next, the decoding device may generate a residual block for the current block (S3040). Next, the decoding device may reconstruct the current block based on the prediction block and the residual block for the current block (S3050).
[0358] In this case, the intra prediction block and the residual block may be generated 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 components of the current block.
[0359] The color component may be any one of a luminance component and a chrominance component, and when the color component of the current block is a chrominance component, the size of the transform block may be determined based on a color format.
[0360] For transform block size setting, the width of the transform block may be determined based on a maximum width of the transform block, and the maximum width of the transform block may be determined based on a maximum size and a color format of a transform block of a luminance block corresponding to a current block.
[0361] In addition, for transform block size setting, 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] In addition, 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.
[0363] More specifically, the upper left position of the lower-layer transform block may be determined based on the maximum width of the transform block and the maximum height of the transform block, the maximum width of the transform block may be determined based on the maximum size and color format of the transform block of the 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.
[0364] 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, multiple lower-layer transform blocks can be generated by vertically splitting the current block. In this case, an intra-frame prediction block and a residual block can be generated based on the multiple lower-layer transform blocks.
[0365] More specifically, the plurality of lower-layer transform blocks may include a first lower-layer transform block and a second lower-layer transform block, and the width of the first lower-layer transform block is determined as the maximum width of the transform block, and the upper-left coordinate of the second lower-layer transform block may be determined as a value shifted rightward from the upper-left coordinate of the first lower-layer transform block by the maximum width of the transform block.
[0366] In addition, if the current block is a chroma block and the height of the transform block is greater than the maximum height of the transform block, multiple lower-layer transform blocks can be generated by horizontally splitting the current block. In this case, an intra-frame prediction block and a residual block can be generated based on the multiple lower-layer transform blocks.
[0367] More specifically, the plurality of lower layer transform blocks may include a third lower layer transform block and a fourth lower layer transform block. The height of the third lower layer transform block may be determined as the maximum height of the transform block, and the upper left coordinate of the fourth lower layer transform block may be determined as a value shifted downward from the upper left coordinate of the first lower layer transform block by the maximum height of the transform block.
[0368] As an implementation of the above description, when the color format of the current block is 4:4:4 format, the maximum size of the transform block can be 64×64, when the color format of the current block is 4:2:2 format, the maximum size of the transform block can be 32×64, and when the color format of the current block is 4:2:0 format, the maximum size of the transform block can be 32×32.
[0369] Application Implementation
[0370] Although for the sake of clarity of description, the exemplary method of the present disclosure is represented as a series of operations, it is not intended to limit the order in which the steps are performed, 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 in addition to some steps, or may include other additional steps in addition to some steps.
[0371] In the present disclosure, an image encoding device or image decoding device that performs a predetermined operation (step) may perform an operation (step) of confirming the execution conditions or circumstances of the corresponding operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is satisfied, the image encoding device or image decoding device may perform the predetermined operation after determining whether the predetermined condition is satisfied.
[0372] 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 combinations of two or more.
[0373] 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, or the like.
[0374] 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 multimedia broadcast transmission and reception devices, mobile communication terminals, home theater video devices, digital theater video devices, surveillance cameras, video chat devices, real-time communication devices such as video communication, mobile streaming devices, storage media, cameras, video on demand (VoD) service providers, OTT video (over the top video) devices, Internet streaming service providers, three-dimensional (3D) video devices, video phone video devices, medical video devices, etc., and may be used to process video signals or data signals. For example, OTT video devices may include game consoles, Blu-ray players, Internet-connected TVs, home theater systems, smartphones, tablet PCs, digital video recorders (DVRs), etc.
[0375] Figure 31 is a diagram illustrating a content streaming system to which embodiments of the present disclosure can be applied.
[0376] like Figure 31 As shown in , a content streaming system to which 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.
[0377] The encoding server compresses content input from a multimedia input device such as a smartphone, 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 smartphone, camera, or camcorder directly generates a bitstream, the encoding server can be omitted.
[0378] A bitstream may be generated by applying the image encoding method or the image encoding apparatus according to the embodiment of the present disclosure, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0379] A streaming server transmits multimedia data to a user device based on a user's request via a network server. The network server acts as an intermediary to inform users of services. When a user requests a desired service from the network server, the network server delivers it to the streaming server, which then transmits 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 commands and responses between devices in the content streaming system.
[0380] The streaming server can receive content from a media storage device and / or an encoding server. For example, when receiving content from an encoding server, the content can be received in real time. In this case, in order to provide a smooth streaming service, the streaming server can store the bitstream for a predetermined time.
[0381] 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.
[0382] The various servers in the content streaming system may operate as distributed servers, in which case data received from the various servers may be distributed.
[0383] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) for enabling operations according to the methods of various embodiments to be performed on a device or computer, and non-transitory computer-readable media having such software or commands stored thereon and executable on a device or computer.
[0384] Industrial Applicability
[0385] The embodiments of the present disclosure may be used to encode or decode an image.
Claims
1. An image decoding method performed by an image decoding device, the image decoding method comprising the following steps: Obtain the current block by dividing the image; determining a prediction mode for the current block; Based on the prediction mode of the current block being an intra prediction mode, generating an intra prediction block of the current block; generating a residual block of the current block; as well as reconstructing the current block based on the intra prediction block and the residual block of the current block, The intra prediction block and the residual block are generated based on the size of the transform block of the current block. wherein the size of the transform block is determined based on the color components of the current block, wherein the maximum size of the transform block is determined separately for each of the width and height of the transform block, and Wherein, based on the fact that the color component of the current block is a chrominance component, the maximum size of the transform block is determined based on a color format.
2. The image decoding method according to claim 1, in, determining a width of the transform block based on a maximum width of the transform block, and The maximum width of the transform block is determined based on a maximum size of a luminance transform block corresponding to the current block and a color format of the current block.
3. The image decoding method according to claim 1, in, determining a height of the transform block based on a maximum height of the transform block, and The maximum height of the transform block is determined based on a maximum size of a luminance transform block corresponding to the current block and a color format of the current block.
4. The image decoding method according to claim 1, wherein: The position of the upper left sample of the transform block is determined based on the position and color format of the upper left sample of the luma transform block corresponding to the current block.
5. The image decoding method according to claim 1, in, determining an upper left position of the transform block based on a maximum width of the transform block and a maximum height of the transform block, wherein the maximum width of the transform block is determined based on a maximum size of a luminance transform block corresponding to the current block and a color format of the current block, and The maximum height of the transform block is determined based on the maximum size of the luminance transform block corresponding to the current block and the color format of the current block.
6. The image decoding method according to claim 1, in, The current block is a chroma block, wherein, based on the width of the transform block being greater than the maximum width of the transform block, a plurality of lower layer transform blocks are generated by vertically dividing the current block, and The intra prediction block and the residual block are generated based on the multiple lower layer transform blocks.
7. The image decoding method according to claim 6, in, The plurality of lower layer transform blocks include a first lower layer transform block and a second lower layer transform block, wherein the width of the first lower layer transform block is determined to be the maximum width of the transform block, and The upper left coordinate of the second lower layer transform block is determined as a value shifted rightward from the upper left coordinate of the first lower layer transform block by the maximum width of the transform block.
8. The image decoding method according to claim 1, in, The current block is a chroma block, wherein, based on the fact that the height of the transform block is greater than the maximum height of the transform block, a plurality of lower-layer transform blocks are generated by horizontally dividing the current block, and The intra prediction block and the residual block are generated based on the multiple lower layer transform blocks.
9. The image decoding method according to claim 8, in, the plurality of lower layer transform blocks include a third lower layer transform block and a fourth lower layer transform block, wherein the height of the third lower layer transform block is determined to be the maximum height of the transform block, and The upper left coordinate of the fourth lower layer transform block is determined to be a value shifted downward from the upper left coordinate of the third lower layer transform block by the maximum height of the transform block.
10. The image decoding method according to claim 1, wherein: Based on the color format of the current block being a 4:4:4 format, the maximum size of the transform block is 64×64, based on the color format of the current block being a 4:2:2 format, the maximum size of the transform block is 32×64, and based on the color format of the current block being a 4:2:0 format, the maximum size of the transform block is 32×32.
11. An image encoding method performed by an image encoding device, the image encoding method comprising the following steps: Determine the current block by dividing the image; generating an intra-frame prediction block of the current block; generating a residual block of the current block based on the intra prediction block; as well as Encoding the intra-frame prediction mode information of the current block, wherein the intra prediction block and the residual block are generated based on the size of the transform block of the current block, wherein the size of the transform block is determined based on the color component of the current block, wherein the maximum size of the transform block is determined separately for each of the width and height of the transform block, and Wherein, based on the fact that the color component of the current block is a chrominance component, the maximum size of the transform block is determined based on a color format.
12. A method for transmitting a bit stream generated by an image encoding method, the image encoding method comprising the steps of: Determine the current block by dividing the image; generating an intra-frame prediction block of the current block; generating a residual block of the current block based on the intra prediction block; as well as Encoding the intra-frame prediction mode information of the current block, wherein the intra prediction block and the residual block are generated based on the size of the transform block of the current block, wherein the size of the transform block is determined based on the color component of the current block, wherein the maximum size of the transform block is determined separately for each of the width and height of the transform block, and Wherein, based on the fact that the color component of the current block is a chrominance component, the maximum size of the transform block is determined based on a color format.
Citation Information
Patent Citations
Method for encoding / decoding image, and device using same
US20150373332A1
Method, apparatus and system for encoding and decoding the transform units of a coding unit
US9854241B2