Image decoding method and apparatus based on BDPCM for luma component and chroma component

By employing BDPCM in image decoding to determine the availability for chroma and luma blocks and deriving prediction samples, the method enhances image coding efficiency, addressing the challenge of high-resolution image compression.

JP7691543B2Active Publication Date: 2025-06-11LG ELECTRONICS INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024060960
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-01-10
Filing Date
2024-04-04
Publication Date
2025-06-11
Estimated Expiration
2040-11-04

AI Technical Summary

Technical Problem

The increasing demand for high-resolution and high-quality images has led to a need for more efficient image compression technologies to reduce transmission and storage costs.

Method used

The proposed method and apparatus for image decoding utilize BDPCM (Block-based Delta Pulse Code Modulation) to enhance coding efficiency by determining the availability of BDPCM for chroma and luma blocks, deriving prediction samples based on intra prediction modes, and generating a restored picture.

Benefits of technology

This approach reduces the amount of bits required for BDPCM, thereby improving overall coding efficiency and reducing transmission and storage costs for high-resolution images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007691543000043
    Figure 0007691543000043
  • Figure 0007691543000044
    Figure 0007691543000044
  • Figure 0007691543000045
    Figure 0007691543000045
Patent Text Reader

Abstract

To provide an image decoding method and device for performing BDPCM (Block-based Delta Pulse Code Modulation) in an image coding system.SOLUTION: An image decoding method performed by a decoding device includes the steps of: acquiring a BDPCM available flag about whether a BDPCM is available for a chroma block and a luma block; acquiring, on the basis of it, a BDPCM luma flag about whether to apply the BDPCM to the current luma block; acquiring a BDPCM chroma flag about whether to apply the BDPCM to the current chroma block; acquiring, on the basis of the BDPCM chroma flag, a BDPCM chroma direction flag for a prediction direction of the current chroma block; deriving, on the basis of an intra prediction mode derived based on it, prediction samples of the current chroma block; and generating, on the basis of prediction samples of the current luma block and prediction samples of the current chroma block, a reconstructed picture.SELECTED DRAWING: Figure 11
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to image coding technology, and more particularly, to an image decoding method and apparatus for performing BDPCM in an image coding system.

Background Art

[0002] Recently, the demand for high-resolution and high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images has been increasing in various fields. As the image data becomes higher in resolution and quality, the amount of information or bits transmitted relatively increases compared to existing image data. Therefore, when transmitting image data using a medium such as an existing wired or wireless broadband line, or storing image data using an existing storage medium, the transmission cost and storage cost increase.

[0003] Accordingly, in order to effectively transmit, store, and reproduce information of high-resolution and high-quality images, a highly efficient image compression technology is required.

Summary of the Invention

Problems to be Solved by the Invention

[0004] The technical problem of this document is to provide a method and apparatus for increasing image coding efficiency.

[0005] Another technical problem of this document is to provide a method and apparatus for increasing the efficiency of BDPCM.

Means for Solving the Problems

[0006] According to an embodiment of the present document, an image decoding method performed by a decoding device is provided. The method includes obtaining a BDPCM availability flag for whether BDPCM (Block-based Delta Pulse Code Modulation) can be used for chroma blocks and luma blocks; obtaining a BDPCM luma flag for whether BDPCM can be applied to the current luma block based on the BDPCM availability flag; obtaining a BDPCM luma direction flag for the prediction direction of the current luma block based on the BDPCM luma flag; deriving prediction samples of the current luma block based on an intra prediction mode derived based on the BDPCM luma direction flag; obtaining a BDPCM chroma flag for whether BDPCM can be applied to the current chroma block based on the BDPCM availability flag; obtaining a BDPCM chroma direction flag for the prediction direction of the current chroma block based on the BDPCM chroma flag; deriving prediction samples of the current chroma block based on an intra prediction mode derived based on the BDPCM chroma direction flag; and generating a restored picture based on the prediction samples of the current luma block and the prediction samples of the current chroma block.

[0007] According to another embodiment of the present document, a decoding device for performing image decoding is provided. The decoding device acquires a BDPCM availability flag indicating whether BDPCM (Block-based Delta Pulse Code Modulation) can be used for chroma blocks and luma blocks, and based on the BDPCM availability flag, acquires a BDPCM luma flag indicating whether BDPCM can be applied to the current luma block, and based on the BDPCM luma flag, acquires a BDPCM luma direction flag for the prediction direction of the current luma block, and based on the BDPCM availability flag, acquires a BDPCM chroma flag indicating whether BDPCM can be applied to the current chroma block, and based on the BDPCM chroma flag, acquires a BDPCM chroma direction flag for the prediction direction of the current chroma block. The entropy decoding unit, based on the intra prediction mode derived based on the BDPCM luma direction flag, derives prediction samples of the current luma block, and based on the intra prediction mode derived based on the BDPCM chroma direction flag, derives prediction samples of the current chroma block. The prediction unit and based on the prediction samples of the current luma block and the prediction samples of the current chroma block, the addition unit generates a restored picture, which is characterized by including the above components.

[0008] According to still another embodiment of the present document, a video encoding method performed by an encoding device is provided. The method includes: determining whether BDPCM (Block-based Delta Pulse Code Modulation) can be used for chroma blocks and luma blocks; generating a BDPCM availability flag for whether the BDPCM can be used for the chroma blocks and the luma blocks based on the result of the determination; generating a prediction sample for a current luma block based on the BDPCM; generating a prediction sample for a current chroma block based on the BDPCM; generating BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block; and encoding image information including the BDPCM availability flag, the BDPCM-related information for the current luma block, and the BDPCM-related information for the current chroma block. The BDPCM-related information for the current luma block includes a BDPCM luma flag for whether the BDPCM can be applied to the current luma block and a BDPCM luma direction flag for a prediction direction of the current luma block. The BDPCM-related information for the current chroma block includes a BDPCM chroma flag for whether the BDPCM can be applied to the current chroma block and a BDPCM chroma direction flag for a prediction direction of the current chroma block.

[0009] According to still another embodiment of the present document, a video encoding apparatus is provided. The encoding apparatus determines whether BDPCM (Block-based Delta Pulse Code Modulation) can be used for chroma blocks and luma blocks, generates prediction samples for a current luma block based on the BDPCM, generates prediction samples for a current chroma block based on the BDPCM, a prediction unit, and based on the result of the determination, generates a BDPCM availability flag indicating whether the BDPCM can be used for the chroma block and the luma block, generates BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block, and entropy-encodes image information including the BDPCM availability flag, the BDPCM-related information for the current luma block, and the BDPCM-related information for the current chroma block. The BDPCM-related information for the current luma block includes a BDPCM luma flag indicating whether the BDPCM can be applied to the current luma block and a BDPCM luma direction flag for the prediction direction of the current luma block. The BDPCM-related information for the current chroma block includes a BDPCM chroma flag indicating whether the BDPCM can be applied to the current chroma block and a BDPCM chroma direction flag for the prediction direction of the current chroma block.

[0010] According to another embodiment of the present document, there is provided a computer-readable digital storage medium storing a bitstream including image information that causes an image decoding method to be performed. In the computer-readable digital storage medium, the image decoding method includes: obtaining a BDPCM availability flag for whether BDPCM (Block-based Delta Pulse Code Modulation) can be used for chroma blocks and luma blocks; obtaining a BDPCM luma flag for whether BDPCM can be applied to the current luma block based on the BDPCM availability flag; obtaining a BDPCM luma direction flag for the prediction direction of the current luma block based on the BDPCM luma flag; deriving a prediction sample of the current luma block based on an intra prediction mode derived based on the BDPCM luma direction flag; obtaining a BDPCM chroma flag for whether BDPCM can be applied to the current chroma block based on the BDPCM availability flag; obtaining a BDPCM chroma direction flag for the prediction direction of the current chroma block based on the BDPCM chroma flag; deriving a prediction sample of the current chroma block based on an intra prediction mode derived based on the BDPCM chroma direction flag; and generating a restored picture based on the prediction sample of the current luma block and the prediction sample of the current chroma block.

Effect of the Invention

[0011] According to the present document, it is possible to determine whether BDPCM can be used in luma blocks and chroma blocks within an image with one syntax element, thereby reducing the amount of bits for BDPCM and improving the overall coding efficiency.

[0012] According to this document, regardless of the chroma format of an image, a BDPCM availability flag indicating whether BDPCM can be used in luma blocks and chroma blocks within the image can be signaled, which can reduce the complexity for BDPCM and improve the overall coding efficiency.

Brief Description of the Drawings

[0013]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Embodiments for Carrying Out the Invention

[0014] This document can be modified in various ways and can have various embodiments. Specific embodiments are illustrated in the drawings and will be described in detail. However, this is not intended to limit this document to specific embodiments. The terms commonly used in this specification are merely used to describe specific embodiments and are not used with the intention of limiting the technical idea of this document. Singular expressions include plural expressions unless the context clearly indicates otherwise. Terms such as "including" or "having" in this specification are intended to specify the existence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and it should be understood that the existence or addition possibility of one or more other features, numbers, steps, operations, components, parts, or combinations thereof, etc., is not precluded in advance.

[0015] On the other hand, each configuration in the drawings described in this document is independently illustrated for the convenience of explaining different characteristic functions, and it does not mean that each configuration is realized by separate hardware or separate software. For example, among the configurations, two or more configurations can be combined to form one configuration, and one configuration can also be divided into multiple configurations. Embodiments in which each configuration is integrated and / or separated are included in the scope of rights of this document as long as they do not deviate from the essence of this document.

[0016] Hereinafter, with reference to the accompanying drawings, preferred embodiments of this document will be described in more detail. Hereinafter, the same reference numerals will be used for the same components in the drawings, and overlapping descriptions of the same components can be omitted.

[0017] FIG. 1 schematically shows an example of a video / image coding system to which embodiments of the present document can be applied.

[0018] As shown in FIG. 1, a video / image coding system can include a first device (source device) and a second device (receiver device). The source device can transmit encoded video / image information or data in a file or streaming form to the receiver device via a digital storage medium or a network.

[0019] The source device can include a video source, an encoding device, and a transmission unit. The receiver device can include a reception unit, a decoding device, and a renderer. The encoding device can be referred to as a video / image encoding device, and the decoding device can be referred to as a video / image decoding device. A transmitter can be included in the encoding device. A receiver can be included in the decoding device. The renderer can include a display unit, and the display unit can also be composed of a separate device or an external component.

[0020] The video source can obtain a video / image through processes such as capture, synthesis, or generation of the video / image. The video source can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive including previously captured video / images, etc. The video / image generation device can include, for example, a computer, a tablet, and a smartphone, etc., and can (electronically) generate a video / image. For example, a virtual video / image can be generated via a computer or the like, and in this case, the video / image capture process can be replaced during the process of generating related data.

[0021] The encoding device can encode input video / images. The encoding device can execute a series of procedures such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.

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

[0023] The decoding device can decode video / images by executing a series of procedures such as inverse quantization, inverse transformation, prediction, etc. corresponding to the operation of the encoding device.

[0024] The renderer can render the decoded video / images. The rendered video / images can be displayed via the display unit.

[0025] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to the methods disclosed in the VVC (versatile video coding) standard, EVC (essential video coding) standard, AV1 (AOMedia Video 1) standard, AVS2 (2nd generation of audio video coding standard), or next-generation video / image coding standards (e.g., H.267 or H.268, etc.).

[0026] In this document, various embodiments related to video / image coding are presented, and unless otherwise stated, the embodiments can also be executed in combination with each other.

[0027] In this document, "video" may mean a collection of a series of "images" over time. "Picture" generally means a unit indicating one image in a specific time period, and "subpicture / slice / tile" is a unit that constitutes a part of a picture in coding. A subpicture / slice / tile may include one or more CTUs (Coding Tree Units). One picture may be composed of one or more subpictures / slices / tiles. One picture may be composed of one or more groups of tiles. One tile group may include one or more tiles. A brick represents a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each of which consists of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick.A brick scan indicates a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. Also, a subpicture may represent a rectangular region of one or more slices within a picture. That is, a subpicture contains one or more slices that collectively cover a rectangular region of a picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture.The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set. The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the width of the picture. A tile scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture.A slice includes an integer number of bricks of a picture that maybe exclusively contained in a single NAL unit. A slice may consists of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile. In this document, tile groups and slices may be used interchangeably. For example, in this document, a tile group / tile group header may be referred to as a slice / slice header.

[0028] A pixel or pel can mean the smallest unit that makes up a picture (or image). Also, the term "sample" can be used as the term corresponding to a pixel. A sample can generally indicate a pixel or the value of a pixel, and can also indicate only the pixel / pixel value of the luma component, or only the pixel / pixel value of the chroma component.

[0029] A unit can indicate the basic unit of image processing. A unit can include at least one of a specific region of a picture and information related to that region. One unit can include one luma block and two chroma (e.g., cb, cr) blocks. A unit can, in some cases, be used interchangeably with terms such as block or area. In general, an M×N block can include a sample (or sample array) consisting of M columns and N rows, or a set (or array) of transform coefficients.

[0030] As used herein, "A or B" may mean "only A", "only B", or "both A and B". In other words, as used herein, "A or B" may be construed as "A and / or B". For example, as used herein, "A, B, or C" may mean "only A", "only B", "only C", or "any combination of A, B, and C".

[0031] As used herein, the slash ( / ) and comma may mean "and / or". For example, "A / B" may mean "A and / or B". Thus, "A / B" may mean "only A", "only B", or "both A and B". For example, "A, B, C" may mean "A, B, or C".

[0032] As used herein, "at least one of A and B" may mean "only A", "only B", or "both A and B". Also, as used herein, the expressions "at least one of A or B" and "at least one of A and / or B" may be construed in the same manner as "at least one of A and B".

[0033] Also, in this specification, "at least one of A, B, and C" may mean "only A", "only B", "only C", or "any combination of A, B, and C". Also, "at least one of A, B, or C" and "at least one of A, B, and / or C" may mean "at least one of A, B, and C".

[0034] Also, the parentheses used in this specification may mean "for example". Specifically, when it is displayed as "prediction (intra prediction)", "intra prediction" may be proposed as an example of "prediction". In other words, "prediction" in this specification is not limited to "intra prediction", and "intra prediction" may be proposed as an example of "prediction". Also, when it is displayed as "prediction (i.e., intra prediction)", "intra prediction" may be proposed as an example of "prediction".

[0035] The technical features described individually within one drawing in this specification may be realized individually or simultaneously.

[0036] The following drawings are created to illustrate a specific example of this specification. Since the names of specific devices and the names of specific signals / messages / fields described in the drawings are presented exemplarily, the technical features of this specification are not limited to the specific names used in the following drawings.

[0037] FIG. 2 is a diagram schematically explaining the configuration of a video / image encoding device to which the embodiment of this document can be applied. Hereinafter, the video encoding device can include an image encoding device.

[0038] As shown in FIG. 2, the encoding apparatus 200 can be configured to include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 can include an inter-predictor 221 and an intra-predictor 222. The residual processor 230 can include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 can further include a subtractor 231. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. The above-described image partitioner 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filter 260 can be configured by one or more hardware components (e.g., an encoder chipset or a processor) according to an embodiment. Also, the memory 270 can include a DPB (decoded picture buffer) and can also be configured by a digital storage medium. The hardware component can further include the memory 270 as an internal / external component.

[0039] The image segmentation unit 210 can divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. As an example, the processing unit can be called a coding unit (CU). In this case, the coding unit can be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) by a QTBTTT (Quad-tree binary-tree ternary-tree) structure. For example, one coding unit can be divided into a plurality of coding units with a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure can be applied first, and the binary-tree structure and / or the ternary structure can be applied later. Or, the binary-tree structure can also be applied first. The coding procedure according to this document can be executed based on the final coding unit that is no longer divided. In this case, based on the coding efficiency according to the image characteristics, etc., the largest coding unit can be immediately used as the final coding unit, or, if necessary, the coding unit can be recursively divided into coding units with a deeper depth, and the coding unit with the optimal size can be used as the final coding unit. Here, the coding procedure can include procedures such as prediction, transformation, and restoration described later. As another example, the processing unit can further include a prediction unit (PU: Prediction Unit) or a transform unit (TU: Transform Unit). In this case, the prediction unit and the transform unit can each be divided or partitioned from the aforementioned final coding unit.The prediction unit is a unit of sample prediction, and the conversion unit is a unit for deriving a conversion coefficient and / or a unit for deriving a residual signal from the conversion coefficient.

[0040] The term "unit" can, in some cases, be used interchangeably with terms such as "block" or "area". In general, an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luma component, or only the pixel / pixel value of the chroma component. A sample can be used as a term corresponding to a pixel or a pel in one picture (or image).

[0041] The encoding device 200 can subtract a prediction signal (predicted block, predicted sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, the unit that subtracts the prediction signal (predicted block, predicted sample array) from the input image signal (original block, original sample array) within the encoder 200 can be called the subtraction unit 231. The prediction unit can perform a prediction on a processing target block (hereinafter referred to as the current block) and generate a predicted block including predicted samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit can generate various pieces of information related to prediction, such as prediction mode information, and transmit them to the entropy encoding unit 240 as described later in the description of each prediction mode. The information related to prediction can be encoded by the entropy encoding unit 240 and output in the form of a bitstream.

[0042] The intra prediction unit 222 can predict the current block by referring to samples within the current picture. The samples to be referred to can be located in the neighborhood of the current block according to the prediction mode, or can be located remotely. In intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes can include, for example, the DC mode and the Planar Mode. The directional modes can include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the degree of fineness of the prediction direction. However, this is merely an example, and more or fewer directional prediction modes can be used depending on the setting. The intra prediction unit 222 can also determine the prediction mode to be applied to the current block by using the prediction mode applied to the adjacent block.

[0043] The inter prediction unit 221 can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between adjacent blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the adjacent blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block can be called by names such as a collocated reference block and a collocated CU (colCU), and the reference picture including the temporal neighboring block can also be called a collocated picture (colPic). For example, the inter prediction unit 221 can construct a motion information candidate list based on adjacent blocks and generate information indicating which candidates are used to derive the motion vector and / or reference picture index of the current block. Inter prediction can be executed based on various prediction modes. For example, in the case of the skip mode and the merge mode, the inter prediction unit 221 can use the motion information of adjacent blocks as the motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of the motion information prediction (motion vector prediction, MVP) mode, the motion vector of an adjacent block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0044] The prediction unit 220 can generate a prediction signal based on various prediction methods described later. For example, the prediction unit can apply not only intra prediction or inter prediction for the prediction of one block, but also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP). Also, the prediction unit can be based on the intra block copy (IBC) prediction mode or the palette mode for the prediction of a block. The IBC prediction mode or the palette mode can be used for content image / video coding such as games, for example, like SCC (screen content coding). IBC basically performs prediction within the current picture, but can be executed similarly to inter prediction in terms of deriving a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, the sample values in the picture can be signaled based on the information regarding the palette table and the palette index.

[0045] The prediction signal generated through the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) can be used to generate a restored signal or can be used to generate a residual signal. The conversion unit 232 can apply a conversion technique to the residual signal to generate transform coefficients. For example, the conversion technique can include at least one of DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen-Loeve Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Here, GBT means the conversion obtained from the graph when the relationship information between pixels is represented by a graph. CNT means the conversion obtained based on generating a prediction signal using all previously reconstructed pixels. Also, the conversion process can be applied to pixel blocks having the same size of a square and can also be applied to non-square, variable-size blocks.

[0046] The quantization unit 233 quantizes the transform coefficients and transmits them to the entropy encoding unit 240. The entropy encoding unit 240 can encode the quantized signal (information regarding the quantized transform coefficients) and output it as a bitstream. The information regarding the quantized transform coefficients can be referred to as residual information. The quantization unit 233 can reorder the quantized transform coefficients in block form into a one-dimensional vector form based on the coefficient scan order, and can also generate the information regarding the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit 240 can execute various encoding methods such as, for example, exponential Golomb, CAVLC (context-adaptive variable length coding), CABAC (context-adaptive binary arithmetic coding), etc. The entropy encoding unit 240 can encode, together or separately, in addition to the quantized transform coefficients, information necessary for video / image restoration (e.g., values of syntax elements, etc.). The encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in units of NAL (network abstraction layer) units. The video / image information can further include information regarding 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). Also, the video / image information can further include general constraint information. In this document, the information and / or syntax elements transmitted / signaled from the encoding device to the decoding device can be included in the video / image information. The video / image information can be encoded through the encoding procedure described above and included in the bitstream.The bitstream can be transmitted via a network or stored in a digital storage medium. Here, the network can include a broadcast network and / or a communication network, etc., and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The signal output from the entropy encoding unit 240 can be configured such that a transmission unit (not shown) for transmission and / or a storage unit (not shown) for storage are internal / external elements of the encoding device 200, or the transmission unit can also be included in the entropy encoding unit 240.

[0047] The quantized transform coefficients output from the quantization unit 233 can be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) can be restored by applying inverse quantization and inverse transformation to the quantized transform coefficients via the inverse quantization unit 234 and the inverse transform unit 235. The addition unit 250 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the restored residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the block to be processed, as in the case where the skip mode is applied, the predicted block can be used as the reconstructed block. The addition unit 250 can be called a restoration unit or a reconstructed block generation unit. The generated reconstructed signal can be used for intra prediction of the next block to be processed within the current picture and, as will be described later, can also be used for inter prediction of the next picture after passing through filtering.

[0048] On the other hand, LMCS (luma mapping with chroma scaling) can also be applied in the picture encoding and / or restoration process.

[0049] The filtering unit 260 can apply filtering to the restored signal to improve the subjective / objective image quality. For example, the filtering unit 260 can apply various filtering methods to the restored picture to generate a modified restored picture, and can store the modified restored picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit 260 can generate various information related to filtering and transmit it to the entropy encoding unit 240 as will be described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoding unit 240 and output in the form of a bit stream.

[0050] The modified restored picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 221. Through this, when inter prediction is applied, the encoding device can avoid prediction mismatches between the encoding device 200 and the decoding device 300, and can also improve the encoding efficiency.

[0051] The memory 270 DPB can store the modified restored picture for use as a reference picture in the inter prediction unit 221. The memory 270 can store the motion information of the block where the motion information in the current picture was derived (or encoded) and / or the motion information of the block in the already restored picture. The stored motion information can be transmitted to the inter prediction unit 221 for utilization as the motion information of spatially adjacent blocks or temporally adjacent blocks. The memory 270 can store the restored samples of the restored blocks in the current picture and transmit them to the intra prediction unit 222.

[0052] FIG. 3 is a diagram schematically illustrating a configuration of a video / image decoding apparatus to which an embodiment of this document can be applied.

[0053] As shown in FIG. 3, the decoding apparatus 300 can be configured to include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 can include an inter-predictor 331 and an intra-predictor 332. The residual processor 320 can include a dequantizer 321 and an inverse transformer 322. The above-described entropy decoder 310, residual processor 320, predictor 330, adder 340, and filter 350 can be configured by one hardware component (e.g., a decoder chipset or a processor) according to an embodiment. Also, the memory 360 can include a DPB (decoded picture buffer) and can also be configured by a digital storage medium. The hardware component can further include the memory 360 as an internal / external component.

[0054] When a bitstream including video / image information is input, the decoding device 300 can restore an image corresponding to the process in which the video / image information was processed by the encoding device of FIG. 2. For example, the decoding device 300 can derive units / blocks based on the block division related information obtained from the bitstream. The decoding device 300 can execute decoding using the processing units applied in the encoding device. Therefore, the processing unit for decoding is, for example, a coding unit, and the coding unit can be divided according to a quad tree structure, a binary tree structure, and / or a ternary tree structure from a coding tree unit or a maximum coding unit. One or more transform units can be derived from the coding unit. Then, the restored image signal decoded and output via the decoding device 300 can be reproduced via a reproducing device.

[0055] The decoding device 300 can receive the signal output from the encoding device in FIG. 2 in the form of a bitstream, and the received signal can be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 can parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information can further include information regarding 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). Also, the video / image information can further include general constraint information. The decoding device can further decode the picture based on the information regarding the parameter set and / or the general constraint information. The signaling / received information and / or syntax elements described later in this document can be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 can decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements necessary for image restoration, quantized values of transform coefficients regarding residuals, etc. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using the syntax element information to be decoded, the decoding information of the surrounding and the block to be decoded, or the information of the symbols / bins decoded in the previous step, predicts the occurrence probability of the bin according to the determined context model, and executes arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. At this time, the CABAC entropy decoding method can update the context model using the information of the symbols / bins decoded for the context model of the next symbol / bin after determining the context model.Of the information decoded by the entropy decoding unit 310, the information related to prediction is provided to the prediction unit (inter prediction unit 332 and intra prediction unit 331), and the residual value for which entropy decoding is performed by the entropy decoding unit 310, that is, the quantized transform coefficient and related parameter information, can be input to the residual processing unit 320. The residual processing unit 320 can derive a residual signal (residual block, residual sample, residual sample array). Also, of the information decoded by the entropy decoding unit 310, the information related to filtering can be provided to the filtering unit 350. On the other hand, a receiving unit (not shown) that receives the signal output from the encoding device can be further configured as an internal / external element of the decoding device 300, or the receiving unit is a component of the entropy decoding unit 310. On the other hand, the decoding device according to this document can be called a video / image / picture decoding device, and the decoding device can be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder can include the entropy decoding unit 310, and the sample decoder can include at least one of the inverse quantization unit 321, inverse transform unit 322, addition unit 340, filtering unit 350, memory 360, inter prediction unit 332, and intra prediction unit 331.

[0056] In the inverse quantization unit 321, the quantized transform coefficient can be inverse quantized to output a transform coefficient. The inverse quantization unit 321 can reorder the quantized transform coefficients in a two-dimensional block form. In this case, the reordering can be performed based on the coefficient scan order executed by the encoding device. The inverse quantization unit 321 can perform inverse quantization on the quantized transform coefficient using a quantization parameter (for example, quantization step size information) to obtain a transform coefficient.

[0057] In the inverse conversion unit 322, the conversion coefficients are inversely converted to obtain a residual signal (residual block, residual sample array).

[0058] The prediction unit can perform prediction on the current block and generate a predicted block including predicted samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied to the current block based on the information regarding the prediction output from the entropy decoding unit 310, and can determine a specific intra / inter prediction mode.

[0059] The prediction unit 320 can generate a prediction signal based on various prediction methods described later. For example, the prediction unit can not only apply intra prediction or inter prediction for predicting one block, but also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP). Also, the prediction unit can be based on the intra block copy (IBC) prediction mode or the palette mode for predicting a block. The IBC prediction mode or the palette mode can be used for content image / video coding such as games, for example, like SCC (screen content coding). IBC basically performs prediction within the current picture, but can be executed similarly to inter prediction in terms of deriving a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, information regarding the palette table and the palette index can be included in and signaled in the video / image information.

[0060] The intra prediction unit 331 can predict the current block by referring to samples within the current picture. The samples to be referred can be located in the neighborhood (neighbor) of the current block according to the prediction mode, or can be located remotely. In intra prediction, the prediction mode can include a plurality of non - directional modes and a plurality of directional modes. The intra prediction unit 331 can also determine the prediction mode to be applied to the current block by using the prediction mode applied to the adjacent block.

[0061] The inter prediction unit 332 can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on the reference picture. At this time, in order to reduce the amount of motion information transmitted from the inter prediction mode, the motion information can be predicted in units of blocks, sub - blocks, or samples based on the correlation of the motion information between the adjacent block and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the adjacent blocks can include spatial neighboring blocks existing within the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter prediction unit 332 can construct a motion information candidate list based on the adjacent blocks, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter prediction can be executed based on various prediction modes, and the information regarding the prediction can include information indicating the mode of inter prediction for the current block.

[0062] The adder 340 can generate a restored signal (restored picture, restored block, restored sample array) by adding the acquired residual signal to the predicted signal (predicted block, predicted sample array) output from the prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for the block to be processed, such as when the skip mode is applied, the predicted block can be used as the restored block.

[0063] The adder 340 can be referred to as a restoration unit or a restored block generation unit. The generated restored signal can be used for intra prediction of the next block to be processed in the current picture, and as will be described later, can be output after filtering, or can also be used for inter prediction of the next picture.

[0064] On the other hand, LMCS (luma mapping with chroma scaling) can also be applied during the picture decoding process.

[0065] The filtering unit 350 can apply filtering to the restored signal to improve the subjective / objective image quality. For example, the filtering unit 350 can apply various filtering methods to the restored picture to generate a modified restored picture, and can transmit the modified restored picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

[0066] The (corrected) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter prediction unit 332. The memory 360 can store the motion information of the block for which the motion information in the current picture has been derived (or decoded) and / or the motion information of the block in the already reconstructed picture. The stored motion information can be transmitted to the inter prediction unit 260 for utilization as the motion information of spatially adjacent blocks or temporally adjacent blocks. The memory 360 can store the reconstructed samples of the reconstructed blocks in the current picture and can transmit them to the intra prediction unit 331.

[0067] In this specification, the embodiments described in the filtering unit 260, the inter prediction unit 221, and the intra prediction unit 222 of the encoding apparatus 200 can be applied to the filtering unit 350, the inter prediction unit 332, and the intra prediction unit 331 of the decoding apparatus 300 in the same or corresponding manner, respectively.

[0068] In this document, at least one of quantization / inverse quantization and / or transform / inverse transform can be omitted. When the quantization / inverse quantization is omitted, the quantized transform coefficients can be referred to as transform coefficients. When the transform / inverse transform is omitted, the transform coefficients can be referred to as coefficients or residual coefficients, or can still be referred to as transform coefficients for the sake of uniformity of expression.

[0069] In this document, the quantized transform coefficients and the transform coefficients can be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, the residual information can include information regarding the transform coefficients (etc.), and the information regarding the transform coefficients (etc.) can be signaled via a residual coding syntax. The transform coefficients can be derived based on the residual information (or the information regarding the transform coefficients (etc.)), and the scaled transform coefficients can be derived via an inverse transform (scaling) for the transform coefficients. Residual samples can be derived based on an inverse transform (transformation) for the scaled transform coefficients. This can be applied / expressed in the same way in other parts of this document.

[0070] FIG. 4 exemplarily shows a hierarchical structure for a coated image / video.

[0071] Referring to FIG. 4, the coated image / video is divided into a VCL (video coding layer) that handles the decoding process of the image / video and itself, a lower system that transmits and stores the encoded information, and a NAL (network abstraction layer) that exists between the VCL and the lower system and is responsible for network adaptation functions.

[0072] In the VCL, VCL data including compressed image data (slice data) can be generated, or parameter sets including information such as a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), a Video Parameter Set (VPS), or SEI (Supplemental Enhancement Information) messages additionally required in the decoding process of the image can be generated.

[0073] In the NAL, a NAL unit can be generated by adding header information (NAL unit header) to the RBSP (Raw Byte Sequence Payload) generated by the VCL. At this time, the RBSP refers to slice data, parameter sets, SEI messages, etc. generated by the VCL. The NAL unit header can include NAL unit type information specified by the RBSP data included in the NAL unit.

[0074] As shown in the above figure, the NAL unit can be classified into a VCL NAL unit and a Non-VCL NAL unit according to the RBSP generated by the VCL. The VCL NAL unit may mean a NAL unit including information (slice data) for an image, and the Non-VCL NAL unit may mean a NAL unit including information (parameter set or SEI message) necessary for decoding an image.

[0075] As described above, the above-mentioned VCL NAL unit and Non-VCL NAL unit can be transmitted via a network with header information according to the data standard of the lower system. For example, the NAL unit can be transformed into a form of data of a predetermined standard such as the H.266 / VVC file format, RTP (Real-time Transport Protocol), TS (Transport Stream), etc., and transmitted via various networks.

[0076] As described above, the NAL unit type can be specified by the RBSP data structure included in the NAL unit, and information about such a NAL unit type can be stored in the NAL unit header and signaled.

[0077] For example, according to whether the NAL unit contains information (slice data) for an image, it can be broadly classified into a VCL NAL unit type and a Non-VCL NAL unit type. The VCL NAL unit type can be classified according to the nature and type of the picture included in the VCL NAL unit, etc., and the Non-VCL NAL unit type can be classified according to the type of parameter set, etc.

[0078] The following is an example of the NAL unit type specified according to the type of parameter set included in the Non-VCL NAL unit type, etc.

[0079] - APS (Adaptation Parameter Set) NAL unit: The type for the NAL unit containing APS

[0080] - DPS (Decoding Parameter Set) NAL unit: The type for the NAL unit containing DPS

[0081] - VPS (Video Parameter Set) NAL unit: The type for the NAL unit containing VPS

[0082] - SPS (Sequence Parameter Set) NAL unit: The type for the NAL unit containing SPS

[0083] - PPS (Picture Parameter Set) NAL unit: The type for the NAL unit containing PPS

[0084] - PH (Picture header) NAL unit: The type for the NAL unit containing PH

[0085] The foregoing NAL unit type has syntax information for the NAL unit type, and the syntax information can be stored in the NAL unit header and signaled. For example, the syntax information may be nal_unit_type, and the NAL unit type can be specified by the nal_unit_type value.

[0086] On the other hand, as described above, the encoding device can perform various encoding methods such as, for example, exponential Golomb, CAVLC (context-adaptive variable length coding), CABAC (context-adaptive binary arithmetic coding), etc. Further, the decoding device can decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of the syntax elements necessary for image restoration and the quantized values of the transform coefficients regarding the residual.

[0087] For example, the foregoing coding method can be performed as described below.

[0088] FIG. 5 exemplarily shows context-adaptive binary arithmetic coding (CABAC) for encoding a syntax element. For example, in the encoding process of CABAC, when the input signal is a syntax element that is not a binary value, the encoding device can binarize the value of the input signal and convert the input signal into a binary value. Also, when the input signal is already a binary value (i.e., when the value of the input signal is a binary value), it can be bypassed without binarization. Here, each binary number 0 or 1 that constitutes a binary value can be called a bin. For example, when the binary string after binarization is 110, 1, 1, and 0 are each called one bin. The bin for one syntax element can indicate the value of the syntax element.

[0089] After that, the binarized bin of the syntax element can be input into a regular encoding engine or a bypass encoding engine. The regular encoding engine of the encoding device can assign a context model that reflects a probability value to the bin, and can encode the bin based on the assigned context model. After encoding each bin, the regular encoding engine of the encoding device can update the context model for the bin. The bin encoded as described above can be referred to as a context-coded bin.

[0090] On the one hand, when the binary bins of the syntax element are input to the bypass encoding engine, they can be coded as follows. For example, the bypass encoding engine of the encoding device omits the procedure of estimating the probability for the input bins and the procedure of updating the probability model applied to the bins after encoding. When bypass encoding is applied, instead of assigning a context model, the encoding device can apply a uniform probability distribution and encode the input bins, thereby improving the encoding speed. The bins encoded as described above can be referred to as bypass bins.

[0091] Entropy decoding can be shown as the process of performing the same process as the aforementioned entropy encoding in reverse order.

[0092] For example, when the syntax element is decoded based on a context model, the decoding device can receive the bins corresponding to the syntax element via the bitstream, and use the decoding information of the block or peripheral block to be decoded and the syntax element, or the information of the symbols / bins decoded in the previous step to determine the context model. Based on the determined context model, the occurrence probability of the received bin can be predicted to perform arithmetic decoding of the bin, and the value of the syntax element can be derived. Then, with the determined context model, the context model of the next bin to be decoded can be updated.

[0093] Also, for example, when a syntax element is bypass decoded, the decoding device can receive a bin corresponding to the syntax element via a bitstream, apply a uniform probability distribution, and decode the input bin. In this case, the procedures for deriving a context model of the syntax element and updating the context model applied to the bin after decoding can be omitted.

[0094] Also, as described above, in performing video coding, prediction is performed to increase the compression efficiency. Through this, a predicted block including prediction samples for the current block, which is the block to be coded, can be generated. Here, the predicted block includes prediction samples in the spatial domain (or pixel domain). The predicted block is derived identically in the encoding device and the decoding device, and the encoding device can increase the image coding efficiency by signaling information (residual information) regarding the residual between the original block and the predicted block, which is not the original sample value of the original block, to the decoding device. The decoding device can derive a residual block including residual samples based on the residual information, and combine the residual block and the predicted block to generate a restored block including restored samples, and can generate a restored picture including the restored block.

[0095] The residual information can be generated through conversion and quantization procedures. For example, an encoding device can derive a residual block between the original block and the predicted block, perform a conversion procedure on the residual samples (residual sample array) included in the residual block to derive conversion coefficients, perform a quantization procedure on the conversion coefficients to derive quantized conversion coefficients, and can signal the related residual information (via a bitstream) to a decoding device. Here, the residual information can include information such as the value information, position information, conversion technique, conversion kernel, quantization parameter, etc. of the quantized conversion coefficients. The decoding device can perform an inverse quantization / inverse conversion procedure based on the residual information to derive residual samples (or a residual block). The decoding device can generate a restored picture based on the predicted block and the residual block. The encoding device can further inverse quantize / inverse convert the quantized conversion coefficients to derive a residual block for reference for inter-prediction of subsequent pictures, and can generate a restored picture based on this.

[0096] Intra prediction can represent a prediction that generates prediction samples for a current block based on reference samples within a picture to which the current block belongs (hereinafter, the current picture). When intra prediction is applied to the current block, peripheral reference samples used for intra prediction of the current block can be derived. The peripheral reference samples of the current block can include a total of 2×nH samples adjacent to the left boundary of the current block of size nW×nH and adjacent to the bottom-left, samples adjacent to the top boundary of the current block and a total of 2×nW samples adjacent to the top-right, and 1 sample adjacent to the top-left of the current block. Alternatively, the peripheral reference samples of the current block can also include a plurality of columns of upper peripheral samples and a plurality of rows of left peripheral samples. Also, the peripheral reference samples of the current block can include a total of nH samples adjacent to the right boundary of the current block of size nW×nH, a total of nW samples adjacent to the bottom boundary of the current block, and 1 sample adjacent to the bottom-right of the current block.

[0097] However, some of the peripheral reference samples of the current block may not have been decoded yet or may not be available. In this case, the decoder can substitute unavailable samples with available samples to form the peripheral reference samples used for prediction. Alternatively, the peripheral reference samples used for prediction can be formed through interpolation of available samples.

[0098] When a peripheral reference sample is derived, (i) a predicted sample can be derived based on the average or interpolation of neighboring reference samples of the current block, and (ii) the predicted sample can also be derived based on reference samples that exist in a specific (predicted) direction with respect to the predicted sample among the peripheral reference samples of the current block. In the case of (i), it can be called a non-directional mode or a non-angular mode, and in the case of (ii), it can be called a directional mode or an angular mode.

[0099] Also, among the peripheral reference samples, the predicted sample can be generated by interpolation between a first peripheral sample located in the prediction direction of the intra prediction mode of the current block and a second peripheral sample located in the direction opposite to the prediction direction, with the predicted sample of the current block as a reference. In the case described above, it can be called Linear interpolation intra prediction (LIP). Also, a chroma predicted sample can be generated based on luma samples using a linear model (LM). In this case, it can be called the LM mode or the CCLM (chroma component LM) mode.

[0100] Also, a temporary predicted sample of the current block is derived based on the filtered peripheral reference samples, and a predicted sample of the current block is derived by weighted sum of at least one reference sample derived by the intra prediction mode and the temporary predicted sample among the existing peripheral reference samples, that is, the peripheral reference samples that have not been filtered. In the case described above, it can be called PDPC (Position dependent intra prediction).

[0101] Also, among the surrounding multiple-reference sample lines of the current block, select the reference sample line with the highest prediction accuracy, derive a prediction sample using the reference sample located in the prediction direction on this line, and at this time, perform intra prediction by a method of instructing (signaling) the used reference sample line to the decoding device. In the case described above, it can be called multi-reference line intra prediction or MRL-based intra prediction.

[0102] Also, divide the current block into vertical or horizontal sub-partitions and perform intra prediction based on the same intra prediction mode, but the surrounding reference samples can be derived and used in units of the sub-partitions. That is, in this case, although the intra prediction mode for the current block is similarly applied to the sub-partitions, by deriving and using the surrounding reference samples in units of the sub-partitions, the intra prediction performance can be enhanced in some cases. Such a prediction method can be called ISP (intra sub-partitions)-based intra prediction.

[0103] The intra prediction methods described above can be called intra prediction types, distinguished from the intra prediction modes. The intra prediction types can be called by various terms such as intra prediction techniques or additional intra prediction modes. For example, the intra prediction type (or additional intra prediction mode, etc.) can include at least one of LIP, PDPC, MRL, and ISP described above. The general intra prediction method excluding specific intra prediction types such as LIP, PDPC, MRL, and ISP can be called the normal intra prediction type. The normal intra prediction type can be generally applied when the above specific intra prediction types are not applicable, and prediction can be performed based on the intra prediction modes described above. On the other hand, post-processing filtering can also be performed on the prediction samples derived as needed.

[0104] Specifically, the intra prediction procedure can include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and an intra prediction mode / type-based predicted sample derivation step. Additionally, if necessary, a post-filtering step for the derived predicted samples can also be performed.

[0105] FIG. 6 shows an example of a video / image encoding method based on intra prediction.

[0106] As shown in FIG. 6, the encoding device performs intra prediction on the current block (S600). The encoding device can derive an intra prediction mode / type for the current block, derive neighboring reference samples of the current block, and generate predicted samples within the current block based on the intra prediction mode / type and the neighboring reference samples. Here, the intra prediction mode / type determination, neighboring reference sample derivation, and predicted sample generation procedures can be performed simultaneously, or any one of the procedures can be performed prior to the other procedures. The encoding device can determine the mode / type applied to the current block among a plurality of intra prediction modes / types. The encoding device can compare the RD cost for the intra prediction mode / type and determine the optimal intra prediction mode / type for the current block.

[0107] On the other hand, the encoding device can also perform a predicted sample filtering procedure. The predicted sample filtering can be referred to as post-filtering. Some or all of the predicted samples can be filtered by the predicted sample filtering procedure. In some cases, the predicted sample filtering procedure can be omitted.

[0108] The encoding device generates residual samples for the current block based on (filtered) prediction samples (S610). The encoding device can compare the prediction samples with the original samples of the current block on a phase basis and derive the residual samples.

[0109] The encoding device can encode image information including the information related to the intra prediction (prediction information) and the residual information related to the residual samples (S620). The prediction information can include the intra prediction mode information and the intra prediction type information. The encoding device can output the encoded image information in the form of a bitstream. The output bitstream can be transmitted to the decoding device via a storage medium or a network.

[0110] The residual information can include a residual coding syntax to be described later. The encoding device can convert / quantize the residual samples to derive quantized transform coefficients. The residual information can include information related to the quantized transform coefficients.

[0111] On the other hand, as described above, the encoding device can generate a reconstructed picture (including reconstructed samples and a reconstructed block). For this purpose, the encoding device can perform inverse quantization / inverse transformation processing on the quantized transform coefficients again to derive (corrected) residual samples. The reason for performing inverse quantization / inverse transformation again after converting / quantizing the residual samples is to derive the same residual samples as those derived from the decoding device, as described above. The encoding device can generate a reconstructed block including reconstructed samples for the current block based on the prediction samples and the (corrected) residual samples. A reconstructed picture for the current picture can be generated based on the reconstructed block. As described above, an in-loop filtering procedure or the like can be further applied to the reconstructed picture.

[0112] FIG. 7 shows an example of a video / image encoding method based on an intra prediction basis.

[0113] The decoding device can perform operations corresponding to the operations performed by the encoding device.

[0114] Prediction information and residual information can be obtained from the bitstream. A residual sample for the current block can be derived based on the residual information. Specifically, based on the quantized transform coefficients derived based on the residual information, inverse quantization is performed to derive the transform coefficients, inverse transform is performed on the transform coefficients, and a residual sample for the current block can be derived.

[0115] Specifically, the decoding device can derive an intra prediction mode / type for the current block based on the received prediction information (intra prediction mode / type information) (S700). The decoding device can derive the surrounding reference samples of the current block (S710). The decoding device generates prediction samples within the current block based on the intra prediction mode / type and the surrounding reference samples (S720). In this case, the decoding device can perform a prediction sample filtering procedure. The prediction sample filtering can be called post-filtering. Some or all of the prediction samples can be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure can be omitted.

[0116] The decoding device generates residual samples for the current block based on the received residual information (S730). The decoding device can generate restored samples for the current block based on the prediction samples and the residual samples, and derive a restored block including the restored samples (S740). A restored picture for the current picture can be generated based on the restored block. As described above, an in-loop filtering procedure or the like can be further applied to the restored picture.

[0117] The intra prediction mode information can include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether MPM (most probable mode) is applied to the current block or whether a remaining mode is applied. When the MPM is applied to the current block, the prediction mode information can further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) can be composed of an MPM candidate list or an MPM list. When the MPM is not applied to the current block, the intra prediction mode information can further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). The decoding device can determine the intra prediction mode of the current block based on the intra prediction mode information.

[0118] In addition, the intra prediction type information can be realized in various forms. As an example, the intra prediction type information includes intra prediction type index information indicating any one of the intra prediction types. As another example, the intra prediction type information includes at least one of reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and which reference sample line is used if it is applied, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether the ISP is applied to the block, or ISP type information (e.g., intra_subpartitions_split_flag) indicating the split type of the subpartition if the ISP is applied. Also, the intra prediction type information includes an MIP flag indicating whether MIP (matrix-based intra prediction) is applied to the current block.

[0119] The intra prediction mode information and / or the intra prediction type information can be encoded / decoded by the coding method described in this document. For example, the intra prediction mode information and / or the intra prediction type information can be encoded / decoded via entropy coding (e.g., CABAC, CAVLC).

[0120] FIG. 8 exemplarily shows the intra prediction procedure.

[0121] Referring to FIG. 8, as described above, the intra prediction procedure can include an intra prediction mode / type determination step, a peripheral reference sample derivation step, and an intra prediction execution (prediction sample generation) step. The intra prediction procedure can be performed by an encoding device and a decoding device as described above. In this document, the coding device can include an encoding device and / or a decoding device.

[0122] As shown in FIG. 8, the coding device determines an intra prediction mode / type (S800).

[0123] The encoding device can determine the intra prediction mode / type applied to the current block among the various intra prediction modes / types described above, and can generate prediction-related information. The prediction-related information can include intra prediction mode information representing the intra prediction mode applied to the current block and / or intra prediction type information representing the intra prediction type applied to the current block. The decoding device can determine the intra prediction mode / type applied to the current block based on the prediction-related information.

[0124] The intra prediction mode information can include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether MPM (most probable mode) is applied to the current block or whether the remaining mode is applied. When the MPM is applied to the current block, the prediction mode information can further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) can be composed of an MPM candidate list or an MPM list. Also, when the MPM is not applied to the current block, the intra prediction mode information can further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). The decoding device can determine the intra prediction mode of the current block based on the intra prediction mode information.

[0125] In addition, the intra prediction type information can be realized in various forms. As an example, the intra prediction type information includes intra prediction type index information indicating any one of the intra prediction types. As another example, the intra prediction type information includes at least one of reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and which reference sample line is used if it is applied, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether the ISP is applied to the current block, or ISP type information (e.g., intra_subpartitions_split_flag) indicating the split type of the subpartition if the ISP is applied. Further, the intra prediction type information includes a MIP flag indicating whether MIP (matrix-based intra prediction) is applied to the current block.

[0126] For example, when intra prediction is applied, the intra prediction mode applied to the current block can be determined using the intra prediction modes of neighboring blocks. For example, the coding device can select one of the MPM (most probable mode) candidates in the MPM list derived based on the intra prediction modes of the neighboring blocks (e.g., left and / or upper neighboring blocks) of the current block and / or additional candidate modes based on the received MPM index, or can select one of the remaining intra prediction modes not included in the MPM candidates (and the planar mode) based on the MPM reminder information (remaining intra prediction mode information). The MPM list can be configured to include or not include the planar mode as a candidate. For example, when the MPM list includes the planar mode as a candidate, the MPM list can have six candidates, and when the MPM list does not include the planar mode as a candidate, the MPM list can have five candidates. When the MPM list does not include the planar mode as a candidate, a not planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not the planar mode can be signaled. For example, the MPM flag can be signaled first, and the MPM index and the not planar flag can be signaled when the value of the MPM flag is 1. Also, the MPM index can be signaled when the value of the not planar flag is 1. Here, the reason for configuring the MPM list not to include the planar mode as a candidate is to signal the flag (not planar flag) first to check whether it is the planar mode first because the planar mode is always considered as an MPM rather than not being an MPM.

[0127] For example, whether the intra prediction mode currently applied to a block is among the MPM candidates (and the planar mode) or among the remaining modes can be indicated based on the MPM flag (e.g., intra_luma_mpm_flag). A value of 1 for the MPM flag can indicate that the intra prediction mode for the current block is within the MPM candidates (and the planar mode), and a value of 0 for the MPM flag can indicate that the intra prediction mode for the current block is not within the MPM candidates (and the planar mode). A value of 0 for the not planar flag (e.g., intra_luma_not_planar_flag) can indicate that the intra prediction mode for the current block is the planar mode, and a value of 1 for the not planar flag can indicate that the intra prediction mode for the current block is not the planar mode. The MPM index can be signaled in the form of the mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information can be signaled in the form of the rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information can index the remaining intra prediction modes not included in the MPM candidates (and the planar mode) among the overall intra prediction modes in ascending order of prediction mode number and point to one of them. The intra prediction mode can be the intra prediction mode for the luma component (samples). Hereinafter, the intra prediction mode information can include at least one of the MPM flag (e.g., intra_luma_mpm_flag), the not planar flag (e.g., intra_luma_not_planar_flag), the MPM index (e.g., mpm_idx or intra_luma_mpm_idx), and the remaining intra prediction mode information (rem_intra_luma_pred_mode or intra_luma_mpm_remainder).In this document, the MPM list can be referred to by various terms such as the MPM candidate list, candModeList, etc.

[0128] When MIP is currently applied to a block, a separate MPM flag (e.g., intra_mip_mpm_flag) for MIP, an MPM index (e.g., intra_mip_mpm_idx), and remaining intra prediction mode information (e.g., intra_mip_mpm_remainder) can be signaled, and the not planar flag can be not signaled.

[0129] In other words, generally when block partitioning is performed on an image, the current block to be coded and the neighboring blocks come to have similar image characteristics. Therefore, the current block and the neighboring blocks are likely to be identical to each other or have similar intra prediction modes. Thus, the encoder can use the intra prediction mode of the neighboring blocks to encode the intra prediction mode of the current block.

[0130] The coding device can construct an MPM (most probable modes) list for the current block. The MPM list can also be referred to as the MPM candidate list. Here, MPM can mean a mode used to improve coding efficiency by considering the similarity between the current block and neighboring blocks during intra prediction mode coding. As described above, the MPM list can be configured to include the planar mode or can be configured excluding the planar mode. For example, when the MPM list includes the planar mode, the number of candidates in the MPM list can be 6. And when the MPM list does not include the planar mode, the number of candidates in the MPM list can be 5.

[0131] The encoding device can perform prediction based on various intra prediction modes, and can determine the optimal intra prediction mode based on rate-distortion optimization (RDO) based on this. In this case, the encoding device can determine the optimal intra prediction mode using only the MPM candidates and the planar mode configured in the MPM list, or can also determine the optimal intra prediction mode using not only the MPM candidates and the planar mode configured in the MPM list but also the remaining intra prediction modes. Specifically, for example, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP) that is not the normal intra prediction type, the encoding device can determine the optimal intra prediction mode by considering only the MPM candidates and the planar mode as intra prediction mode candidates for the current block. That is, in this case, the intra prediction mode for the current block can be determined among the MPM candidates and the planar mode, and in this case, the MPM flag cannot be encoded / signaled. In this case, the decoding device can presume that the MPM flag is 1 even if the MPM flag is not signaled separately.

[0132] On the other hand, generally, when the intra prediction mode of the current block is not the planar mode and is one of the MPM candidates in the MPM list, the encoding device generates an MPM index (mpm idx) indicating one of the MPM candidates. If the intra prediction mode of the current block is not in the MPM list, MPM remainder information (remaining intra prediction mode information) indicating the same mode as the intra prediction mode of the current block is generated from among the remaining intra prediction modes not included in the MPM list (and the planar mode). The MPM remainder information can include, for example, the intra_luma_mpm_remainder syntax element.

[0133] The decoding device acquires intra prediction mode information from the bitstream. As described above, the intra prediction mode information can include at least one of an MPM flag, a not planar flag, an MPM index, and MPM remainder information (remaining intra prediction mode information). The decoding device can configure an MPM list. The MPM list is configured in the same manner as the MPM list configured by the encoding device. That is, the MPM list can include the intra prediction modes of peripheral blocks and can further include a specific intra prediction mode by a predetermined method.

[0134] The decoding device can determine the intra prediction mode of the current block based on the MPM list and the intra prediction mode information. As an example, when the value of the MPM flag is 1, the decoding device can derive the planar mode as the intra prediction mode of the current block (based on the not planar flag), or can derive the candidate pointed to by the MPM index among the MPM candidates in the MPM list as the intra prediction mode of the current block. Here, the MPM candidates can represent only the candidates included in the MPM list, or can also include the planar mode that can be applied when the value of the MPM flag is 1 in addition to the candidates included in the MPM list.

[0135] As another example, when the value of the MPM flag is 0, the decoding device can derive, as the intra prediction mode of the current block, the intra prediction mode pointed to by the remaining intra prediction mode information (which can be called mpm remainder information) among the remaining intra prediction modes not included in the MPM list and the planner mode. On the other hand, as yet another example, when the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP, etc.), the decoding device can derive, without parsing / decoding / verifying the MPM flag, the candidate pointed to by the MPM flag in the planner mode or the MPM list as the intra prediction mode of the current block.

[0136] The coding device derives the surrounding reference samples of the current block (S810). When intra prediction is applied to the current block, the surrounding reference samples used for intra prediction of the current block can be derived. The surrounding reference samples of the current block can include a total of 2×nH samples adjacent to the left boundary and the bottom - left of the current block of size nW×nH, samples adjacent to the top boundary of the current block and a total of 2×nW samples adjacent to the top - right, and 1 sample adjacent to the top - left of the current block. Alternatively, the surrounding reference samples of the current block can also include a plurality of columns of upper - surrounding samples and a plurality of rows of left - surrounding samples. Also, the surrounding reference samples of the current block can include a total of nH samples adjacent to the right boundary of the current block of size nW×nH, a total of nW samples adjacent to the bottom boundary of the current block, and 1 sample adjacent to the bottom - right of the current block.

[0137] On the one hand, when MRL is applied (i.e., when the value of the MRL index is greater than 0), the peripheral reference samples can be located on lines 1 or 2, not line 0, adjacent to the current block on the left side / upper side. In this case, the number of peripheral reference samples can be further increased. On the other hand, when ISP is applied, the peripheral reference samples can be derived in sub - partition units.

[0138] The coding device performs intra - prediction on the current block to derive prediction samples (S820). The coding device can derive the prediction samples based on the intra - prediction mode / type and the peripheral samples. The coding device can derive reference samples according to the intra - prediction mode of the current block among the peripheral reference samples of the current block, and derive the prediction samples of the current block based on the reference samples.

[0139] On the other hand, according to one embodiment, the BDPCM (block differential pulse coded modulation or Block - based Delta Pulse Code Modulation) technique can be used. BDPCM may also be named RDPCM (quantized Residual block - based Delta Pulse Code Modulation).

[0140] When predicting a block by applying BDPCM, the restored samples can be utilized to predict the rows or columns of the block line by line. At this time, the reference samples used may be samples that are not filtered. The direction of BDPCM can indicate whether vertical or horizontal prediction is being used. That is, when BDPCM is applied, the vertical or horizontal direction can be selected as the direction of BDPCM, and prediction can be performed in the direction of the BDPCM. The prediction error can be quantized in the spatial domain, and the samples can be restored by adding the prediction error inverse-quantized for the prediction (i.e., the predicted samples). The prediction error can mean the residual. As an alternative to such BDPCM, a quantized residual domain BDPCM can be proposed, and the prediction direction and signaling can be the same as those of the BDPCM applied in the spatial domain. That is, after stacking the quantization coefficients themselves like DPCM (Delta Pulse Code Modulation) through the quantized residual domain BDPCM, the residual can be restored through inverse quantization. Therefore, the quantized residual domain BDPCM can be used in the sense of applying DPCM in the coding stage of the residual. The quantized residual domain used below means a domain for quantized residual samples in which the residual derived based on prediction is quantized without conversion. For example, the quantized residual domain can include quantized residuals (or quantized residual coefficients) to which conversion skip is applied, that is, conversion is skipped for the residual samples but quantization is applied. Alternatively, for example, the quantized residual domain can include quantized transform coefficients.

[0141] For an MXN-sized block, among the samples at the left or upper boundary (i.e., the samples in the left periphery or the samples in the upper periphery), using the unfiltered samples, horizontal intra prediction (copying the sample line in the left periphery line by line to the prediction block) or vertical intra prediction (copying the sample line in the upper periphery line by line to the prediction block) is performed, and the residual derived by utilizing the predicted value is r (i,j) It can be assumed that (0≤i≤M - 1, 0≤j≤N - 1). Here, M can indicate the row or height, and N can indicate the column or width. Also, the residual r (i,j) The quantized value of can be assumed to be Q(r (i,j) )(0≤i≤M - 1, 0≤j≤N - 1). Here, the residual means the difference value between the original block and the predicted block value.

[0142] Then, when BDPCM is applied to the quantized residual samples, A modified array of M×N that constitutes JPEG0007691543000001.jpg10116 JPEG0007691543000002.jpg7138 can be derived.

[0143] For example, when vertical BDPCM is signaled (i.e., when vertical BDPCM is applied), JPEG0007691543000003.jpg8132 can be derived as follows.

[0144]

Equation

[0145] That is, for example, when vertical BDPCM is applied, the encoding device can perform vertical intra prediction based on samples in the upper peripheral area, and the quantized residual samples for the current block can be derived as in the above formula (1). Referring to the above formula (1), the quantized residual samples of the rows excluding the first row of the current block can be derived as the difference between the quantized value for the corresponding position and the quantized value for the position in the previous row of the corresponding position (i.e., the position in the upper peripheral area of the corresponding position).

[0146] Also, when applied in the same way to horizontal prediction (i.e., when horizontal BDPCM is applied), the residual quantized samples can be derived as in the following formula.

[0147]

Equation

[0148] That is, for example, when horizontal BDPCM is applied, the encoding device can perform horizontal intra prediction based on samples in the left peripheral area, and the quantized residual samples for the current block can be derived as in the above formula (2). Referring to the above formula (2), the quantized residual samples of the columns excluding the first column of the current block can be derived as the difference between the quantized value for the corresponding position and the quantized value for the position in the previous column of the corresponding position (i.e., the position in the left peripheral area of the corresponding position).

[0149] The quantized residual samples JPEG0007691543000006.jpg10117 can be transmitted to the decoding device.

[0150] In the decoding device, Q(r (i,j))(0 ≦ i ≦ M - 1, 0 ≦ j ≦ N - 1) can be derived by reversing the operation.

[0151] For vertical prediction, the following formula can be applied.

[0152]

Equation

[0153] Also, for horizontal prediction, the following formula can be applied.

[0154]

Equation

[0155] Inverse - quantized quantized residue JPEG0007691543000009.jpg12122 is combined with the prediction value of the intra - block to derive the restored sample value.

[0156] The main advantage of such a technique is that inverse BDPCM can be performed by simply adding a predictor during or after coefficient parsing.

[0157] As described above, BDPCM can be applied to the quantized residual domain, which can include quantized residuals (or quantized residual coefficients), and at this time, conversion skip can be applied to the residuals. That is, when BDPCM is applied, conversion is skipped for the residual samples and quantization can be applied. Alternatively, the quantized residual domain can also include quantized transform coefficients. The flag for whether BDPCM can be applied can be signaled at the sequence level (SPS), and such a flag can also be signaled only when it is signaled in the SPS that the conversion skip mode is possible. The flag may be referred to as a BDPCM available flag or an SPS BDPCM available flag.

[0158] When BDPCM is applied, intra prediction can be performed on the entire block by sample copy in a prediction direction similar to the intra prediction direction (e.g., vertical prediction or horizontal prediction). The residual, which is the difference value between the original and the predicted block, is skipped for conversion and quantized, and the delta value, i.e., the difference value, between the quantized residual and the predictor for the horizontal or vertical direction (i.e., the quantized residual in the horizontal or vertical direction). JPEG0007691543000010.jpg10130 can be coded.

[0159] When BDPCM is applicable, if the CU size is less than or equal to MaxTsSize (the maximum transform skip block size) for luma samples and the CU is coded with intra prediction, flag information can be transmitted at the CU level. The flag information may be referred to as the BDPCM flag. Here, MaxTsSize may mean the maximum block size for which the transform skip mode is allowed. The flag information can indicate whether normal intra coding is applied or BDPCM is applied. When BDPCM is applied, a BDPCM prediction direction flag indicating whether the prediction direction is horizontal or vertical can be transmitted. The BDPCM prediction direction flag may be referred to as the BDPCM direction flag. Thereafter, the block can be predicted through a normal horizontal or vertical intra prediction process using non-filtered reference samples. Also, the residual is quantized, and the difference value between each quantized residual and its predictor, for example, the already quantized residuals at peripheral positions in the horizontal or vertical direction according to the BDPCM prediction direction, can be coded.

[0160] On the other hand, as will be described later, the aforementioned BDPCM can be described in the form of a standard document.

[0161] For example, the syntax element for the aforementioned BDPCM available flag and the semantics for the syntax element can be shown as in the following table.

[0162]

Table 1

[0163]

Table 2

[0164] Table 1 shows the sps_bdpcm_enabled_flag and sps_bdpcm_chroma_enabled_flag signaled by the SPS (Sequence parameter set). If the syntax element sps_bdpcm_enabled_flag is 1, it indicates flag information on whether BDPCM is applied to the coding luma unit where intra prediction is performed, that is, it can indicate the existence of "intra_bdpcm_luma_flag" in the coding luma unit. If the syntax element sps_bdpcm_chroma_enabled_flag is 1, it indicates flag information on whether BDPCM is applied to the coding chroma unit where intra prediction is performed, that is, it can indicate the existence of "intra_bdpcm_chroma_flag" in the coding chroma unit. The syntax elements sps_bdpcm_enabled_flag and sps_bdpcm_chroma_enabled_flag can be syntax elements for the aforementioned BDPCM available flag. Also, if the syntax element "sps_bdpcm_enabled_flag" does not exist, its value can be regarded as 0. Furthermore, if the syntax element "sps_bdpcm_chroma_enabled_flag" does not exist, its value can be regarded as 0.

[0165] Also, for example, the syntax elements for the aforementioned BDPCM flag and BDPCM direction flag can be signaled separately for the luma component and the chroma component. For example, the coding unit syntax including the syntax element and the semantics for the syntax element can be shown as follows in the following table.

[0166]

Table 3-1

[0167]

Table 3-2

[0168]

Table 3-3

[0169]

Table 3-4

[0170]

Table 3-5

[0171]

Table 3-6

[0172]

Table 3-7

[0173]

Table 3-8

[0174]

Table 4

[0175] As described above, the syntax element intra_bdpcm_luma_flag in Table 3 can indicate whether BDPCM is applied to the current luma block, and intra_bdpcm_chroma_flag can indicate whether BDPCM is applied to the current luma block or the current chroma block. For example, if the value of intra_bdpcm_luma_flag or intra_bdpcm_chroma_flag is 1, the transformation for the coding block is skipped, and the prediction mode for the coding block can be set to the horizontal or vertical direction by intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag indicating the prediction direction. If intra_bdpcm_luma_flag or intra_bdpcm_chroma_flag does not exist, this value can be regarded as 0.

[0176] Also, for example, if the value of intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag indicating the prediction direction is 0, it can indicate that the prediction direction of BDPCM is the horizontal direction, and if the value of intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag is 1, it can indicate that the prediction direction of BDPCM is the vertical direction.

[0177] On the other hand, the intra_bdpcm_luma_flag can indicate the syntax element of the BDPCM luma flag for the current luma block, the intra_bdpcm_chroma_flag can indicate the syntax element of the BDPCM chroma flag for the current chroma block, the intra_bdpcm_luma_dir_flag can indicate the syntax element of the BDPCM luma direction flag for the current luma block, and the intra_bdpcm_chroma_dir_flag can indicate the syntax element of the BDPCM chroma direction flag for the current chroma block.

[0178] Also, when BDPCM is applied, an example of the inverse quantization process can be shown as in the following table.

[0179]

Table 5-1

[0180]

Table 5-2

[0181]

Table 5-3

[0182] Alternatively, when BDPCM is applied, an example of the inverse quantization process can also be shown as in the following table.

[0183]

Table 6-1

[0184]

Table 6-2

[0185]

Table 6-3

[0186]

Table 6-4

[0187] Referring to Table 5 or Table 6, if the value of bdpcm_flag is 1, the inverse quantized residual value d[x][y] can be derived based on the intermediate variable dz[x][y]. Here, x is the horizontal coordinate, increasing from left to right, y is the vertical coordinate, increasing from top to bottom, and the position within the two-dimensional block can be denoted as (x, y). Also, the position within the two-dimensional block indicates the (x, y) position when the upper left position of the block is set to (0, 0).

[0188] For example, if the value of bdpcm_dir_flag is 0, that is, when horizontal BDPCM is applied, the variable dz[x][y] can be derived based on TransCoeffLevel[xTbY][yTbY][cIdx][x][y] when x is 0, and based on dz[x - 1][y]+dz[x][y] when x is not 0. That is, when horizontal BDPCM is applied (the value of bdpcm_dir_flag is 0), the variable dz[x][y] of the sample located in the first column where x is 0 can be derived from TransCoeffLevel[xTbY][yTbY][cIdx][x][y] derived based on the residual information of the sample, and the variable dz[x][y] of the sample located in the columns other than the first column where x is not 0 can be derived from the sum of dz[x - 1][y] of the left neighboring sample of the sample and dz[x][y] of the sample. Here, dz[x][y] of the sample combined with dz[x - 1][y] can be derived based on the residual information of the sample to be signaled.

[0189] Also, for example, if the value of bdpcm_dir_flag is 1, that is, if vertical BDPCM is applied, the variable dz[x][y] can be derived based on dz[x][y - 1]+dz[x][y]. That is, when vertical BDPCM is applied (when the value of bdpcm_dir_flag is 1), the variable dz[x][y] of the sample located in the first row where y is 0 can be derived from TransCoeffLevel[xTbY][yTbY][cIdx][x][y] derived based on the residual information of the sample, and the variable dz[x][y] of the sample located in a row other than the first row where y is not 0 can be derived from the sum of dz[x][y - 1] of the upper neighboring sample of the sample and dz[x][y] for the sample. Here, dz[x][y] for the sample to be combined with the dz[x][y - 1] can be derived based on the residual information for the sample to be signaled.

[0190] As described above, the residual at a specific position can be derived based on the sum of the residual at a previous position (i.e., left or upper) in the horizontal or vertical direction and the value received with the residual information at the specific position. This is because when BDPCM is applied, the difference value between the residual sample value at a specific position (x, y) and the residual sample value at a previous position in the horizontal or vertical direction (i.e., (x - 1, y) or (x, y - 1)) is signaled with the residual information.

[0191] As described above, information for BPDCM can be signaled. However, in this document, another embodiment of signaling information for BDPCM is proposed. For example, according to existing video standards, in YUV420, BDPCM is only performed on luma blocks, and in YUV444, BDPCM can be performed on both luma blocks and chroma blocks. Therefore, as shown in Table 1 above, the syntax element sps_bdpcm_enabled_flag, which is the syntax element of the BDPCM available flag for luma blocks in the SPS (sequence parameter set) syntax, and the syntax element sps_bdpcm_chroma_enabled_flag, which is the syntax element of the BDPCM available flag for chroma blocks, can be transmitted respectively. In particular, the BDPCM available flag for chroma blocks can only be transmitted when BDPCM is available for luma blocks and the chroma format of the image is YUV444 (i.e., when chroma_format_idc = 3).

[0192] Different from the above content, this document proposes an embodiment that controls whether BDPCM is available for both luma blocks and chroma blocks based on one flag. For example, in the proposed embodiment, as shown in Table 7 below, only one syntax element sps_bdpcm_enabled_flag for whether BDPCM is possible can be transmitted in the SPS syntax, and thereby the availability / unavailability of BDPCM for both luma blocks and chroma blocks can be derived. According to this embodiment, it is possible to determine whether BDPCM is available for luma blocks and chroma blocks in an image with one syntax element, thereby reducing the amount of bits for BDPCM and improving the overall coding efficiency.

[0193]

Table 7

[0194]

Table 8

[0195] For example, referring to Table 8, if sps_bdpcm_enabled_flag is 1, it means that BDPCM is available for both the luma block and the chroma block, and if sps_bdpcm_enabled_flag is 0, it may mean that BDPCM is not available for both the luma block and the chroma block. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it can be indicated that BDPCM is available for a coding unit (including a luma component and a chroma component) for which intra prediction is performed, and if the syntax element sps_bdpcm_enabled_flag is 0, it can be indicated that BDPCM is not available for the coding unit for which intra prediction is performed. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it can be indicated that intra_bdpcm_luma_flag and intra_bdpcm_chroma_flag exist in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it can be indicated that intra_bdpcm_luma_flag and intra_bdpcm_chroma_flag do not exist in the coding unit. intra_bdpcm_luma_flag and intra_bdpcm_chroma_flag may be denoted as intra_bdpcm_flag.

[0196] On the other hand, the flag indicating whether the BDPCM is available may be transmitted not only in the SPS syntax exemplified, but also in an APS (Adaptation Parameter Set) syntax, a PPS (Picture Parameter Set) syntax, a VPS (Video Parameter Set) syntax, a DPS (Decoding Parameter Set) syntax, a picture header syntax, or a slice header syntax.

[0197] Also, in the proposed embodiment, the semantics for the syntax element sps_bdpcm_enabled_flag can be changed as shown in Table 8.

[0198] Furthermore, in this embodiment, since it is possible to control at once whether BDPCM can be used for luma blocks and chroma blocks with the syntax element sps_bdpcm_enabled_flag, the syntax of the coding unit according to this embodiment is as shown in the following table.

[0199] [Table 9-1]

[0200] [Table 9-2]

[0201] [Table 9-3]

[0202] [Table 9-4]

[0203] [Table 9-5]

[0204] [Table 9-6]

[0205] [Table 9-7]

[0206]

Table 9-8

[0207] Furthermore, this document proposes another embodiment for signaling information for BDPCM. For example, this document proposes an embodiment that controls whether BDPCM can be used for both luma blocks and chroma blocks regardless of the chroma format of the image. According to this embodiment, information regarding whether BDPCM for luma blocks can be used and information regarding whether BDPCM for chroma blocks can be used can each be transmitted regardless of the chroma format of the image. According to this embodiment, a BDPCM chroma availability flag indicating whether BDPCM for chroma blocks in the image can be used can be signaled regardless of the chroma format of the image, thereby reducing the complexity for BDPCM and improving the overall coding efficiency.

[0208] For example, in the proposed embodiment, when the transform skip mode is available as shown in Table 10 to be described later (i.e., when sps_transform_skip_enabled_flag is 1), the syntax element sps_bdpcm_enabled_flag regarding whether BDPCM for luma blocks can be used and the syntax element sps_bdpcm_chroma_enabled_flag regarding whether BDPCM for chroma blocks can be used can be transmitted in the SPS syntax.

[0209]

Table 10

[0210]

Table 11

[0211] For example, if sps_bdpcm_enabled_flag is 1, it means that BDPCM is available for the luma block, and if sps_bdpcm_enabled_flag is 0, it may mean that BDPCM is not available for the luma block. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it can indicate that BDPCM is available for the luma coding unit where intra prediction is performed, and if the syntax element sps_bdpcm_enabled_flag is 0, it can indicate that BDPCM is not available for the luma coding unit where intra prediction is performed. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it can indicate that intra_bdpcm_luma_flag exists in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it can indicate that intra_bdpcm_luma_flag does not exist in the coding unit.

[0212] Also, for example, if sps_bdpcm_chroma_enabled_flag is 1, it means that BDPCM is available for chroma blocks, and if sps_bdpcm_chroma_enabled_flag is 0, it may mean that BDPCM is not available for chroma blocks. That is, for example, if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it can indicate that BDPCM is available for a chroma coding unit for which intra prediction is performed, and if the syntax element sps_bdpcm_chroma_enabled_flag is 0, it can indicate that BDPCM is not available for a chroma coding unit for which intra prediction is performed. That is, for example, if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it can indicate that intra_bdpcm_chroma_flag exists in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it can indicate that intra_bdpcm_chroma_flag does not exist in the coding unit.

[0213] On the other hand, the flag indicating whether the BDPCM is available may be transmitted not only in the SPS syntax exemplified, but also in the APS (Adaptation Parameter Set) syntax, PPS (Picture Parameter Set) syntax, VPS (Video Parameter Set) syntax, DPS (Decoding Parameter Set) syntax, picture header syntax, or slice header syntax.

[0214] Also, in the proposed embodiment, the semantics for the syntax element sps_bdpcm_enabled_flag and the syntax element sps_bdpcm_chroma_enabled_flag can be changed as shown in Table 11.

[0215] Furthermore, this document proposes another embodiment for signaling information for BDPCM. For example, this document proposes an embodiment that controls whether BDPCM can be used for both luma blocks and chroma blocks regardless of the chroma format of the image. According to this embodiment, regardless of the chroma format of the image, information on whether BDPCM can be used for the luma block and information on whether BDPCM can be used for the chroma block are each transmitted, and the information on whether BDPCM can be used for the chroma block can be transmitted only when BDPCM is available for the luma block. According to this embodiment, regardless of the chroma format of the image, a BDPCM availability flag indicating whether BDPCM can be used for the luma blocks and chroma blocks in the image can be signaled, thereby reducing the complexity for BDPCM and improving the overall coding efficiency.

[0216] For example, in the proposed embodiment, as shown in Table 12 described later, when the transform skip mode is available (i.e., when sps_transform_skip_enabled_flag is 1), the syntax element sps_bdpcm_enabled_flag indicating whether BDPCM can be used for the luma block can be transmitted in the SPS syntax, and when BDPCM is available for the luma block (i.e., when sps_bdpcm_enabled_flag is 1), the syntax element sps_bdpcm_chroma_enabled_flag indicating whether BDPCM can be used for the chroma block can be transmitted.

[0217]

Table 12

[0218]

Table 13

[0219] For example, if sps_bdpcm_enabled_flag is 1, it means that BDPCM is available for the luma block, and if sps_bdpcm_enabled_flag is 0, it may mean that BDPCM is not available for the luma block. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it can indicate that BDPCM is available for the luma coding unit where intra prediction is performed, and if the syntax element sps_bdpcm_enabled_flag is 0, it can indicate that BDPCM is not available for the luma coding unit where intra prediction is performed. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it can indicate that intra_bdpcm_luma_flag exists in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it can indicate that intra_bdpcm_luma_flag does not exist in the coding unit.

[0220] Also, for example, if sps_bdpcm_chroma_enabled_flag is 1, it means that BDPCM is available for chroma blocks, and if sps_bdpcm_chroma_enabled_flag is 0, it may mean that BDPCM is not available for chroma blocks. That is, for example, if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it can indicate that BDPCM is available for a chroma coding unit for which intra prediction is performed, and if the syntax element sps_bdpcm_chroma_enabled_flag is 0, it can indicate that BDPCM is not available for a chroma coding unit for which intra prediction is performed. That is, for example, if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it can indicate that intra_bdpcm_chroma_flag exists in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it can indicate that intra_bdpcm_chroma_flag does not exist in the coding unit.

[0221] On the other hand, the flag indicating whether the BDPCM is available may be transmitted not only in the SPS syntax shown as an example but also in APS (Adaptation Parameter Set) syntax, PPS (Picture Parameter Set) syntax, VPS (Video Parameter Set) syntax, DPS (Decoding Parameter Set) syntax, picture header syntax, or slice header syntax.

[0222] Furthermore, this document proposes another embodiment for signaling information for BDPCM. For example, this document proposes an embodiment that further performs the processes described later in one of the aforementioned embodiments. For example, according to this embodiment, BDPCM is available for both luma blocks and chroma blocks in SPS syntax, VPS syntax, DPS syntax, picture header syntax, or slice header syntax, etc. When the specific conditions for performing the BDPCM are satisfied, intra_bdpcm_chroma_flag and intra_bdpcm_chroma_dir_flag are not transmitted in CU syntax or TU syntax, and the value of intra_bdpcm_chroma_flag can be derived from the value of infra_bdpcm_luma_flag, and the value of intra_bdpcm_chroma_dir_flag can be derived from the value of intra_bdpcm_luma_dir_flag. Here, for example, the specific conditions can be when the tree type is a dual tree and / or when the width and height of the current block are smaller than the maximum size of the transform skip block for which all are defined (i.e., when cbWidth <= MaxTsSize && cbHeight <= MaxTsSize), etc.

[0223] Alternatively, for example, according to this embodiment, when specific conditions under which the BDPCM can be performed are satisfied, the intra_bdpcm_chroma_flag is not transmitted, and the value of the intra_bdpcm_chroma_flag can be derived from the value of the intra_bdpcm_luma_flag. This means that when the luma block of the current block is coded in the BDPCM mode, the chroma block of the current block is coded in the BDPCM mode without transmitting an additional syntax element (i.e., the intra_bdpcm_chroma_flag). However, in the foregoing embodiment, the intra_bdpcm_chroma_dir_flag may have a different value independently of the intra_bdpcm_luma_dir_flag. That is, in the foregoing embodiment, the intra_bdpcm_chroma_dir_flag for the current block can be transmitted.

[0224] As another example, when specific conditions under which the BDPCM can be performed are satisfied, if both the intra_bdpcm_luma_flag and the intdra_bdpcm_chroma_flag for the current block are 1, the intra_bdpcm_chroma_dir_flag is not transmitted, and the value of the intra_bdpcm_chroma_dir_flag can be derived from the value of the intra_bdpcm_luma_dir_flag.

[0225] In addition, this document proposes another embodiment for signaling information for BDPCM. For example, this document proposes an embodiment that further performs the processes described later in one of the foregoing embodiments.

[0226] For example, according to this embodiment, BDPCM for chroma blocks is available based on intra_bdpcm_enabled_flag or intra_bdpcm_chroma_enabled_flag in a high level syntax (e.g., SPS syntax, VPS syntax, DPS syntax, picture header syntax, or slice header syntax, etc.). When the tree type is a single tree, the intra_bdpcm_chroma_flag and intra_bdpcm_chroma_dir_flag for each chroma block (Cb chroma block and Cr chroma block) are not separately transmitted in the CU syntax or TU syntax, and the intra_bdpcm_chroma_flag and intra_bdpcm_chroma_dir_flag for the Cb chroma block and Cr chroma block can be transmitted. That is, when the value of the transmitted intra_bdpcm_chroma_flag is 1, it means that both the Cb chroma block and Cr chroma block of the current block are coded in the BDPCM mode. When the value of the transmitted intra_bdpcm_chroma_flag is 0, it means that neither the Cb chroma block nor the Cr chroma block of the current block is coded in the BDPCM mode. Also, when the value of intra_bdpcm_chroma_dir_flag is 0, it means that the prediction direction of BDPCM for the Cb chroma block and Cr chroma block of the current block is the horizontal direction. When the value of intra_bdpcm_chroma_dir_flag is 1, it may mean that the prediction direction of BDPCM for the Cb chroma block and Cr chroma block of the current block is the vertical direction.

[0227] Alternatively, for example, according to this embodiment, BDPCM for chroma blocks is available based on intra_bdpcm_enabled_flag or intra_bdpcm_chroma_enabled_flag in a high level syntax (e.g., SPS syntax, VPS syntax, DPS syntax, picture header syntax, or slice header syntax, etc.). When the tree type is a single tree, the intra_bdpcm_chroma_flag for each chroma block (Cb chroma block and Cr chroma block) is not separately transmitted in the CU syntax or TU syntax, and the intra_bdpcm_chroma_flag for the Cb chroma block and Cr chroma block can be transmitted. That is, when the value of the transmitted intra_bdpcm_chroma_flag is 1, it means that both the Cb chroma block and Cr chroma block of the current block are coded in the BDPCM mode. When the value of the transmitted intra_bdpcm_chroma_flag is 0, it means that neither the Cb chroma block nor the Cr chroma block of the current block is coded in the BDPCM mode. Here, the intra_bdpcm_chroma_dir_flag for each chroma block may be transmitted, and the intra_bdpcm_chroma_dir_flag for each chroma block may have different values.

[0228] For example, according to this embodiment, BDPCM for chroma blocks is available based on the intra_bdpcm_enabled_flag or intra_bdpcm_chroma_enabled_flag in a high level syntax (e.g., SPS syntax, VPS syntax, DPS syntax, picture header syntax, or slice header syntax, etc.). When the tree type is a single tree, the intra_bdpcm_chroma_flag for each of the chroma blocks (Cb chroma block and Cr chroma block) is transmitted in the CU syntax or TU syntax, and the intra_bdpcm_chroma_dir_flag for the Cb chroma block and Cr chroma block may be transmitted.

[0229] That is, when the values of the intra_bdpcm_chroma_flag transmitted for the chroma blocks are all 1, the intra_bdpcm_chroma_dir_flag for the chroma block that is coded later among the two chroma blocks is not coded, and the intra_bdpcm_chroma_dir_flag of the chroma difference block that is coded first among the two chroma blocks can be directly derived as the intra_bdpcm_chroma_dir_flag for the chroma block that is coded later. For example, when the value of the intra_bdpcm_chroma_dir_flag is 0, it means that the prediction direction of BDPCM for the Cb chroma block and Cr chroma block of the current block is the horizontal direction, and when the value of the intra_bdpcm_chroma_dir_flag is 1, it may mean that the prediction direction of BDPCM for the Cb chroma block and Cr chroma block of the current block is the vertical direction.

[0230] FIG. 9 schematically shows an image encoding method by an encoding device according to this document. The method disclosed in FIG. 9 can be performed by the encoding device disclosed in FIG. 2. Specifically, for example, S900 and S920 to S930 in FIG. 9 are performed by the prediction unit of the encoding device, and S910 and S940 to S950 can be performed by the entropy encoding unit of the encoding device. Also, although not shown, the process of deriving a residual sample is performed by the residual processing unit of the encoding device, and the process of generating a restored sample and a restored picture based on the residual sample and the predicted sample can be performed by the addition unit of the encoding device.

[0231] The encoding device determines whether BDPCM (Block-based Delta Pulse Code Modulation) can be used for chroma blocks and luma blocks (S900). For example, the encoding device can determine whether the BDPCM can be used for chroma blocks and luma blocks in the image.

[0232] Based on the result of the determination, the encoding device generates a BDPCM availability flag indicating whether the BDPCM is available for the chroma block and the luma block (S910). The encoding device can generate a BDPCM availability flag indicating whether the BDPCM is available for the chroma block and the luma block based on the result of the determination. For example, the image information can include a BDPCM availability flag indicating whether the BDPCM (Block-based Delta Pulse Code Modulation) is available for the chroma block and the luma block. For example, the BDPCM availability flag can indicate whether the BDPCM (Block-based Delta Pulse Code Modulation) is available for the chroma block and the luma block. For example, when the value of the BDPCM availability flag is 1, the BDPCM availability flag can indicate that the BDPCM (Block-based Delta Pulse Code Modulation) is available for the chroma block and the luma block, and when the value of the BDPCM availability flag is 0, the BDPCM availability flag can indicate that the BDPCM (Block-based Delta Pulse Code Modulation) is not available for the chroma block and the luma block. That is, for example, the BDPCM availability flag can indicate whether there is a BDPCM flag for the chroma block and the luma block. For example, when the value of the BDPCM availability flag is 1, the BDPCM availability flag can indicate that a BDPCM flag for the chroma block and the luma block may exist, and when the value of the BDPCM availability flag is 0, the BDPCM availability flag can indicate that there is no BDPCM flag for the chroma block and the luma block. Also, for example, the chroma block can include a block of the chroma Cb component (chroma Cb block) and / or a block of the chroma Cr component (chroma Cr block).

[0233] Also, for example, the BDPCM available flag can be signaled regardless of the chroma format of the image. For example, the BDPCM available flag can be signaled when the chroma format of the image is YUV444, YUV420, or YUV422. That is, for example, even when the chroma format of the image is YUV444, the BDPCM available flag can be signaled.

[0234] Also, for example, the BDPCM available flag can be signaled in a higher-level syntax. For example, the BDPCM available flag can be signaled in the SPS (Sequence Parameter Set, SPS) syntax. Alternatively, for example, the BDPCM available flag can be signaled in the APS (Adaptation Parameter Set) syntax, PPS (Picture Parameter Set) syntax, VPS (Video Parameter Set) syntax, DPS (Decoding Parameter Set) syntax, PH syntax (picture header syntax), or slice header syntax. For example, the syntax element of the BDPCM available flag may be the aforementioned sps_bdpcm_enabled_flag.

[0235] The encoding device generates prediction samples for the current luma block based on the BDPCM (S920). For example, the encoding device can determine whether the BDPCM is applicable to the current luma block and can determine the direction in which the BDPCM is performed.

[0236] The encoding device can derive prediction samples by performing intra prediction on the current luma block based on the prediction direction in which BDPCM is performed. For example, the prediction direction may be the vertical direction or the horizontal direction, and prediction samples for the current luma block can be generated by the intra prediction mode accordingly.

[0237] For example, when the prediction direction for the current luma block is derived as the horizontal direction, the encoding device can derive the prediction samples of the current luma block based on the horizontal intra prediction mode. In other words, for example, when the prediction direction for the current luma block is derived as the horizontal direction, the encoding device can perform intra prediction based on the left surrounding samples of the current luma block to derive the prediction samples of the current luma block. For example, when the prediction direction for the current luma block is derived as the horizontal direction, the encoding device can derive the sample values of the left surrounding samples in the same row as the prediction samples as the sample values of the prediction samples.

[0238] Also, for example, when the prediction direction for the current luma block is derived as the vertical direction, the encoding device can derive the prediction samples of the current luma block based on the vertical intra prediction mode. In other words, for example, when the prediction direction for the current luma block is derived as the vertical direction, the encoding device can derive the prediction samples of the current luma block based on the upper surrounding samples of the current luma block. For example, when the prediction direction for the current luma block is derived as the vertical direction, the encoding device can derive the sample values of the upper surrounding samples in the same column as the prediction samples as the sample values of the prediction samples.

[0239] The encoding device generates prediction samples for the current chroma block based on the BDPCM (S930). For example, the encoding device can determine whether the BDPCM is applied to the current chroma block, and can determine the direction in which the BDPCM is performed.

[0240] The encoding device can perform intra prediction on the current chroma block based on the prediction direction in which the BDPCM is performed to derive prediction samples. For example, the prediction direction may be the vertical direction or the horizontal direction, and prediction samples for the current chroma block can be generated by the intra prediction mode accordingly.

[0241] For example, when the prediction direction for the current chroma block is derived as the horizontal direction, the encoding device can derive the prediction samples of the current chroma block based on the horizontal intra prediction mode. In other words, for example, when the prediction direction for the current chroma block is derived as the horizontal direction, the encoding device can perform intra prediction based on the left peripheral samples of the current chroma block to derive the prediction samples of the current chroma block. For example, when the prediction direction for the current chroma block is derived as the horizontal direction, the encoding device can derive the sample values of the left peripheral samples in the same row as the prediction samples as the sample values of the prediction samples.

[0242] Also, for example, when the prediction direction for the current chroma block is derived as the vertical direction, the encoding device may derive prediction samples for the current chroma block based on the vertical intra prediction mode. In other words, for example, when the prediction direction for the current chroma block is derived as the vertical direction, the encoding device may derive prediction samples for the current chroma block based on the upper peripheral samples of the current chroma block. For example, when the prediction direction for the current chroma block is derived as the vertical direction, the encoding device may derive the sample value of the upper peripheral sample in the same column as the prediction sample as the sample value of the prediction sample.

[0243] The encoding device generates BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block (S940).

[0244] For example, when the value of the BDPCM available flag is 1 (i.e., when it is determined that BDPCM is available for the chroma block and the luma block), the encoding device can generate BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block. The image information can include BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block.

[0245] For example, the BDPCM-related information for the current luma block can include a BDPCM luma flag and / or a BDPCM luma direction flag for the current luma block.

[0246] For example, the encoding device can determine whether BDPCM is applicable to the current luma block and generate a BDPCM luma flag for whether BDPCM (Block-based Delta Pulse Code Modulation) is applicable to the current luma block.

[0247] For example, the BDPCM luma flag can indicate whether the BDPCM is applied to the current luma block and whether there is a BDPCM luma direction flag for the current luma block. For example, when the value of the BDPCM luma flag is 1, the BDPCM luma flag can indicate that the BDPCM is applied to the current luma block and there is a BDPCM luma direction flag for the current luma block. When the value of the BDPCM luma flag is 0, the BDPCM luma flag can indicate that the BDPCM is not applied to the current luma block and there is no BDPCM luma direction flag for the current luma block. For example, the syntax element of the BDPCM luma flag may be the aforementioned bdpcm_flag or intra_bdpcm_luma_flag. Also, for example, the BDPCM luma flag can be signaled in units of CU (coding unit).

[0248] Also, for example, the encoding device can determine whether BDPCM is to be applied to the current luma block and can determine the direction in which the BDPCM is to be performed. For example, when the BDPCM luma flag indicates that BDPCM is to be applied to the current luma block, the encoding device can generate and encode the BDPCM luma direction flag. For example, the BDPCM luma direction flag can indicate the vertical direction or the horizontal direction as the prediction direction for the current luma block. For example, when the value of the BDPCM luma direction flag is 0, the BDPCM luma direction flag can indicate that the prediction direction for the current luma block is the horizontal direction, and when the value of the BDPCM luma direction flag is 1, the BDPCM luma direction flag can indicate that the prediction direction for the current luma block is the vertical direction. For example, the syntax element of the BDPCM luma direction flag may be the aforementioned bdpcm_dir_flag or intra_bdpcm_luma_dir_flag. Also, for example, the BDPCM luma direction flag can be signaled in units of CU (coding unit).

[0249] For example, the BDPCM-related information for the current chroma block can include the BDPCM chroma flag and / or the BDPCM chroma direction flag for the current chroma block. Also, for example, the BDPCM-related information for the current chroma block (i.e., for all of the current chroma block) can be signaled when the tree type of the image is single tree and the value of the BDPCM available flag is 1. That is, for example, the BDPCM-related information for the current chroma block (i.e., for all of the current chroma block) can be signaled when the tree type of the image is single tree and BDPCM is available for the current chroma block. On the other hand, the tree type of the current block can be classified into single tree (SINGLE_TREE) or dual tree (DUAL_TREE) depending on whether the current chroma block corresponding to the current luma block has an individual split structure. For example, it can be indicated as single tree when the current chroma block has the same split structure as the current luma block, and as dual tree when the current chroma block has a different split structure from the current luma block.

[0250] For example, the encoding device can determine whether BDPCM is applicable to the current chroma block, and can generate a BDPCM chroma flag for indicating whether BDPCM (Block-based Delta Pulse Code Modulation) is applicable to the current chroma block. For example, the BDPCM chroma flag can indicate whether BDPCM is applied to the current chroma block and whether there is a BDPCM chroma direction flag for the current chroma block. For example, when the value of the BDPCM chroma flag is 1, the BDPCM chroma flag can indicate that BDPCM is applied to the entire current chroma block and there is a BDPCM chroma direction flag for the entire current chroma block; when the value of the BDPCM chroma flag is 0, the BDPCM chroma flag can indicate that BDPCM is not applied to the entire current chroma block and there is no BDPCM chroma direction flag for the entire current chroma block. That is, for example, when the value of the BDPCM chroma flag is 1, the BDPCM chroma flag can indicate that BDPCM is applied to all of the current chroma block and there is a BDPCM chroma direction flag for all of the current chroma block; when the value of the BDPCM chroma flag is 0, the BDPCM chroma flag can indicate that BDPCM is not applied to all of the current chroma block and there is no BDPCM chroma direction flag for all of the current chroma block. Here, for example, the current chroma block can include a current chroma Cb block and a current chroma Cr block. For example, the syntax element of the BDPCM chroma flag may be the aforementioned bdpcm_flag or intra_bdpcm_chroma_flag. Also, for example, the BDPCM chroma flag can be signaled in units of CU (coding unit).

[0251] Also, for example, the encoding device can determine whether BDPCM is to be applied to the current chroma block, and can determine the direction in which the BDPCM is to be performed. For example, when the BDPCM chroma flag indicates that the BDPCM is to be applied to the current chroma block, the encoding device can generate and encode the BDPCM chroma direction flag. For example, the BDPCM chroma direction flag can indicate a vertical direction or a horizontal direction as the prediction direction for the current chroma block. For example, when the value of the BDPCM chroma direction flag is 0, the BDPCM chroma direction flag can indicate that the prediction direction for the current chroma block is the horizontal direction, and when the value of the BDPCM chroma direction flag is 1, the BDPCM chroma direction flag can indicate that the prediction direction for the current chroma block is the vertical direction. For example, the syntax element of the BDPCM chroma direction flag may be the aforementioned bdpcm_dir_flag or intra_bdpcm_chroma_dir_flag. Also, for example, the BDPCM chroma direction flag can be signaled in units of CU (coding unit).

[0252] On the other hand, for example, the encoding device can derive the residual samples of the current luma block based on the predicted samples of the current luma block. For example, the encoding device can derive the residual samples through subtraction of the original samples and the predicted samples for the current luma block. Also, for example, the encoding device can derive the residual samples of the current chroma block based on the predicted samples of the current chroma block. For example, the encoding device can derive the residual samples through subtraction of the original samples and the predicted samples for each of the current chroma blocks.

[0253] The encoding device encodes image information including the BDPCM available flag, the BDPCM related information for the current luma block, and the BDPCM related information for the current chroma block (S950). The encoding device can encode image information including the BDPCM available flag, the BDPCM related information for the current luma block, and the BDPCM related information for the current chroma block. For example, the BDPCM related information for the current luma block can include a BDPCM luma flag indicating whether the BDPCM is applied to the current luma block and / or a BDPCM luma direction flag for the prediction direction of the current luma block, and the BDPCM related information for the current chroma block can include a BDPCM chroma flag indicating whether the BDPCM is applied to the current chroma block and / or a BDPCM chroma direction flag for the prediction direction of the current chroma block.

[0254] On the other hand, for example, the image information can include residual information. For example, the encoding device can derive a residual coefficient of the current luma block or the current chroma block based on the residual samples of the current luma block or the current chroma block. For example, when the BDPCM is applied to the current luma block or the current chroma block, the encoding device can determine that no transformation is applied to the current luma block or the current chroma block. In this case, for example, the encoding device can quantize the residual samples of the current luma block or the current chroma block to derive a residual coefficient. Here, for example, the block to which no transformation is applied can be indicated as a transformation skip block. That is, for example, the current luma block or the current chroma block may be a transformation skip block.

[0255] Thereafter, for example, the encoding device can encode residual information for the residual coefficient. For example, the residual information can include residual information for the residual coefficient of the residual sample.

[0256] For example, the residual information can include syntax elements for the residual samples of the current luma block or the current chroma block, and based on the syntax elements for the target residual sample, a difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample or the upper neighboring residual sample of the target residual sample can be derived. For example, when the prediction direction of the current luma block or the current chroma block is horizontal, based on the syntax elements for the target residual sample, a difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample of the target residual sample can be derived. That is, for example, when the prediction direction of the current luma block or the current chroma block is horizontal, the syntax elements for the target residual sample can indicate a difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample of the target residual sample. Also, for example, when the prediction direction of the current luma block or the current chroma block is vertical, based on the syntax elements for the target residual sample, a difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper neighboring residual sample of the target residual sample can be derived. That is, for example, when the prediction direction of the current luma block or the current chroma block is vertical, the syntax elements for the target residual sample can indicate a difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper neighboring residual sample of the target residual sample. Further, when the target residual sample is located in the first row or column of the current luma block or the current chroma block, based on the syntax elements for the target residual sample, the residual coefficient value of the target residual sample can be derived.That is, when the target residual sample is located in the first row or column of the current luma block or current chroma block, the syntax element for the target residual sample can indicate the residual coefficient value of the target residual sample.

[0257] On the other hand, the bitstream including the image information can be transmitted to a decoding device via a network or a (digital) storage medium. Here, the network may include a broadcast network and / or a communication network, etc., and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.

[0258] FIG. 10 schematically shows an encoding device that performs the image encoding method according to this document. The method disclosed in FIG. 9 can be performed by the encoding device disclosed in FIG. 10. Specifically, for example, the prediction unit of the encoding device in FIG. 10 can perform S900 and S920 to S930 in FIG. 9, and the entropy encoding unit of the encoding device can perform S910 and S940 to S950. Also, although not shown, the process of deriving the residual sample is performed by the residual processing unit of the encoding device, and the process of generating the restored sample and the restored picture based on the residual sample and the predicted sample can be performed by the addition unit of the encoding device.

[0259] FIG. 11 schematically shows an image decoding method by the decoding device according to this document. The method disclosed in FIG. 11 can be performed by the decoding device disclosed in FIG. 3. Specifically, for example, S1100 to S1120 and S1140 to S1150 in FIG. 11 are performed by the entropy decoding unit of the decoding device, S1130 and S1160 in FIG. 11 are performed by the prediction unit of the decoding device, and S1170 in FIG. 11 can be performed by the addition unit of the decoding device.

[0260] The decoding device acquires a BDPCM availability flag indicating whether BDPCM (Block-based Delta Pulse Code Modulation) is available for chroma blocks and luma blocks (S1100). The decoding device can acquire a BDPCM availability flag indicating whether BDPCM is available for chroma blocks and luma blocks. The decoding device can acquire image information via a bitstream. For example, the image information can include a BDPCM availability flag indicating whether BDPCM (Block-based Delta Pulse Code Modulation) is available for chroma blocks and luma blocks. For example, the BDPCM availability flag can indicate whether BDPCM (Block-based Delta Pulse Code Modulation) is available for chroma blocks and luma blocks. For example, when the value of the BDPCM availability flag is 1, the BDPCM availability flag can indicate that BDPCM (Block-based Delta Pulse Code Modulation) is available for chroma blocks and luma blocks, and when the value of the BDPCM availability flag is 0, the BDPCM availability flag can indicate that BDPCM (Block-based Delta Pulse Code Modulation) is not available for chroma blocks and luma blocks. That is, for example, the BDPCM availability flag can indicate whether a BDPCM flag for the chroma blocks and luma blocks exists. For example, when the value of the BDPCM availability flag is 1, the BDPCM availability flag can indicate that a BDPCM flag for the chroma blocks and luma blocks may exist, and when the value of the BDPCM availability flag is 0, the BDPCM availability flag can indicate that a BDPCM flag for the chroma blocks and luma blocks does not exist.Also, for example, the chroma block can include a block of the chroma Cb component (chroma Cb block) and / or a block of the chroma Cr component (chroma Cr block).

[0261] Also, for example, the BDPCM available flag can be signaled regardless of the chroma format of the image. For example, the BDPCM available flag can be signaled when the chroma format of the image is YUV444, YUV420, or YUV422. That is, for example, even when the chroma format of the image is YUV444, the BDPCM available flag can be signaled.

[0262] Also, for example, the BDPCM available flag can be signaled in a higher-level syntax. For example, the BDPCM available flag can be signaled in the SPS (Sequence Parameter Set, SPS) syntax. Alternatively, for example, the BDPCM available flag can be signaled in the APS (Adaptation Parameter Set) syntax, PPS (Picture Parameter Set) syntax, VPS (Video Parameter Set) syntax, DPS (Decoding Parameter Set) syntax, PH syntax (picture header syntax), or slice header syntax. For example, the syntax element of the BDPCM available flag may be the aforementioned sps_bdpcm_enabled_flag.

[0263] The decoding device obtains a BDPCM luma flag regarding whether BDPCM can be applied to the current luma block based on the BDPCM available flag (S1110). The decoding device can obtain BDPCM-related information for the current luma block based on the BDPCM available flag. For example, the BDPCM-related information for the current luma block can include the BDPCM luma flag for the current luma block. The decoding device can obtain the BDPCM luma flag for the current luma block based on the BDPCM available flag.

[0264] For example, when the value of the BDPCM available flag is 1 (i.e., when the BDPCM available flag indicates that the BDPCM is available for the chroma block and the luma block), the decoding device can obtain a BDPCM luma flag regarding whether the BDPCM is applied to the current luma block. For example, the BDPCM luma flag can indicate whether the BDPCM is applied to the current luma block and whether there is a BDPCM luma direction flag for the current luma block. For example, when the value of the BDPCM luma flag is 1, the BDPCM luma flag can indicate that the BDPCM is applied to the current luma block and there is a BDPCM luma direction flag for the current luma block, and when the value of the BDPCM luma flag is 0, the BDPCM luma flag can indicate that the BDPCM is not applied to the current luma block and there is no BDPCM luma direction flag for the current luma block. For example, the syntax element of the BDPCM luma flag may be the aforementioned bdpcm_flag or intra_bdpcm_luma_flag. Also, for example, the BDPCM luma flag can be signaled in units of CU (coding unit).

[0265] The decoding device obtains a BDPCM luma direction flag for the prediction direction of the current luma block based on the BDPCM luma flag (S1120). For example, the BDPCM related information for the current luma block can include the BDPCM luma flag and / or the BDPCM luma direction flag for the current luma block.

[0266] For example, the decoding device can obtain a BDPCM luma direction flag for the prediction direction of the current luma block based on the BDPCM luma flag. For example, when the BDPCM luma flag indicates that BDPCM is applied to the current luma block, the decoding device can obtain the BDPCM luma direction flag. That is, for example, when the value of the BDPCM luma flag is 1, the decoding device can obtain the BDPCM luma direction flag. For example, the BDPCM luma direction flag can indicate a vertical direction or a horizontal direction as the prediction direction for the current luma block. For example, when the value of the BDPCM luma direction flag is 0, the BDPCM luma direction flag can indicate that the prediction direction for the current luma block is the horizontal direction, and when the value of the BDPCM luma direction flag is 1, the BDPCM luma direction flag can indicate that the prediction direction for the current luma block is the vertical direction. For example, the syntax element of the BDPCM luma direction flag may be the aforementioned bdpcm_dir_flag or intra_bdpcm_luma_dir_flag. Also, for example, the BDPCM luma direction flag can be signaled in units of CU (coding unit).

[0267] The decoding device derives prediction samples for the current luma block based on an intra prediction mode derived based on the BDPCM luma direction flag (S1130).

[0268] For example, the decoding device may derive prediction samples of the current luma block based on the intra prediction mode derived based on the BDPCM luma direction flag.

[0269] For example, when the value of the BDPCM luma direction flag is 0, that is, for example, when the BDPCM luma direction flag indicates that the prediction direction for the current luma block is the horizontal direction, the decoding device may derive the horizontal intra prediction mode as the intra prediction mode of the current luma block. For example, when the value of the BDPCM luma direction flag is 0, that is, for example, when the BDPCM luma direction flag indicates that the prediction direction for the current luma block is the horizontal direction, the decoding device may derive prediction samples of the current luma block based on the horizontal intra prediction mode. In other words, for example, when the value of the BDPCM luma direction flag is 0, that is, for example, when the BDPCM luma direction flag indicates that the prediction direction for the current luma block is the horizontal direction, the decoding device may perform intra prediction based on the left surrounding samples of the current luma block and derive prediction samples of the current luma block. For example, when the prediction direction for the current luma block is derived as the horizontal direction, the decoding device may derive the sample value of the left surrounding sample in the same row as the prediction sample as the sample value of the prediction sample.

[0270] Also, for example, when the value of the BDPCM luma direction flag is 1, that is, for example, when the BDPCM luma direction flag indicates that the prediction direction for the current luma block is the vertical direction, the decoding device may derive the vertical intra prediction mode as the intra prediction mode of the current luma block. For example, when the value of the BDPCM luma direction flag is 1, that is, for example, when the BDPCM luma direction flag indicates that the prediction direction for the current luma block is the vertical direction, the decoding device may derive the prediction samples of the current luma block based on the vertical intra prediction mode. In other words, for example, when the value of the BDPCM luma direction flag is 1, that is, for example, when the BDPCM luma direction flag indicates that the prediction direction for the current luma block is the vertical direction, the decoding device may derive the prediction samples of the current luma block based on the upper peripheral samples of the current luma block. For example, when the prediction direction for the current luma block is derived as the vertical direction, the decoding device may derive the sample values of the upper peripheral samples in the same column as the prediction samples as the sample values of the prediction samples.

[0271] The decoding device acquires a BDPCM chroma flag for whether BDPCM can be applied to the current chroma block based on the BDPCM available flag (S1140). The decoding device can acquire BDPCM-related information for the current chroma block based on the BDPCM available flag. For example, the BDPCM-related information for the current chroma block can include the BDPCM chroma flag for the current chroma block. The decoding device can acquire the BDPCM chroma flag for the current chroma block based on the BDPCM available flag.

[0272] Also, for example, the BDPCM-related information for the current chroma block (i.e., also for the current chroma block) can be signaled when the tree type of the image is a single tree and the value of the BDPCM available flag is 1. That is, for example, the BDPCM-related information for the current chroma block (i.e., also for the current chroma block) can be signaled when the tree type of the image is a single tree and BDPCM is available for the current chroma block. On the other hand, the tree type of the current block can be classified into SINGLE_TREE or DUAL_TREE depending on whether the current chroma block corresponding to the current luma block has an individual split structure. For example, if the current chroma block has the same split structure as the current luma block, it can be indicated as a single tree, and if the current chroma block has a different split structure from the current luma block, it can be indicated as a dual tree.

[0273] For example, the BDPCM chroma flag can indicate whether the BDPCM is applied to the current chroma block and whether there is a BDPCM chroma direction flag for the current chroma block. For example, when the value of the BDPCM chroma flag is 1, the BDPCM chroma flag can indicate that the BDPCM is applied to the current chroma block and there is a BDPCM chroma direction flag for the current chroma block. When the value of the BDPCM chroma flag is 0, the BDPCM chroma flag can indicate that the BDPCM is not applied to the current chroma block and there is no BDPCM chroma direction flag for the current chroma block. That is, for example, when the value of the BDPCM chroma flag is 1, the BDPCM chroma flag can indicate that the BDPCM is applied to both the current chroma block and there is a BDPCM chroma direction flag for both the current chroma block. When the value of the BDPCM chroma flag is 0, the BDPCM chroma flag can indicate that the BDPCM is not applied to both the current chroma block and there is no BDPCM chroma direction flag for both the current chroma block. Here, for example, the current chroma block can include a current chroma Cb block and a current chroma Cr block. For example, the syntax element of the BDPCM chroma flag may be the aforementioned bdpcm_flag or intra_bdpcm_chroma_flag. Also, for example, the BDPCM chroma flag can be signaled in units of CU (coding unit).

[0274] The decoding device obtains a BDPCM chroma direction flag for the prediction direction of the current chroma block based on the BDPCM chroma flag (S1150). For example, the BDPCM-related information for the current chroma block can include the BDPCM chroma flag and / or the BDPCM chroma direction flag for the current chroma block.

[0275] For example, the decoding device can obtain a BDPCM chroma direction flag for the prediction direction of the current chroma block based on the BDPCM chroma flag. For example, when the BDPCM chroma flag indicates that the BDPCM is applied to the current chroma block, the decoding device can obtain the BDPCM chroma direction flag. That is, for example, when the value of the BDPCM chroma flag is 1, the decoding device can obtain the BDPCM chroma direction flag. For example, the BDPCM chroma direction flag can indicate a vertical direction or a horizontal direction as the prediction direction for the current chroma block. For example, when the value of the BDPCM chroma direction flag is 0, the BDPCM chroma direction flag can indicate that the prediction direction for the current chroma block is the horizontal direction, and when the value of the BDPCM chroma direction flag is 1, the BDPCM chroma direction flag can indicate that the prediction direction for the current chroma block is the vertical direction. For example, the syntax element of the BDPCM chroma direction flag may be the aforementioned bdpcm_dir_flag or intra_bdpcm_chroma_dir_flag. Also, for example, the BDPCM chroma direction flag can be signaled in units of CU (coding unit).

[0276] The decoding device derives prediction samples for the current chroma block based on an intra prediction mode derived based on the BDPCM chroma direction flag (S1160). For example, the decoding device can derive prediction samples for the current chroma block based on an intra prediction mode derived based on the BDPCM chroma direction flag.

[0277] For example, when the value of the BDPCM chroma direction flag is 0, that is, for example, when the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is the horizontal direction, the decoding device may derive the horizontal intra prediction mode as the intra prediction mode of the current chroma block. For example, when the value of the BDPCM chroma direction flag is 0, that is, for example, when the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is the horizontal direction, the decoding device may derive the predicted samples of the current chroma block based on the horizontal intra prediction mode. In other words, for example, when the value of the BDPCM chroma direction flag is 0, that is, for example, when the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is the horizontal direction, the decoding device may perform intra prediction based on the left peripheral samples of the current chroma block and derive the predicted samples of the current chroma block. For example, when the prediction direction for the current chroma block is derived as the horizontal direction, the decoding device may derive the sample value of the left peripheral sample in the same row as the predicted sample as the sample value of the predicted sample.

[0278] Also, for example, when the value of the BDPCM chroma direction flag is 1, that is, for example, when the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is the vertical direction, the decoding device may derive the vertical intra prediction mode as the intra prediction mode of the current chroma block. For example, when the value of the BDPCM chroma direction flag is 1, that is, for example, when the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is the vertical direction, the decoding device may derive the predicted samples of the current chroma block based on the vertical intra prediction mode. In other words, for example, when the value of the BDPCM chroma direction flag is 1, that is, for example, when the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is the vertical direction, the decoding device may derive the predicted samples of the current chroma block based on the upper peripheral samples of the current chroma block. For example, when the prediction direction for the current chroma block is derived as the vertical direction, the decoding device may derive the sample value of the upper peripheral sample in the same column as the predicted sample as the sample value of the predicted sample.

[0279] The decoding device generates a reconstructed picture based on the predicted samples of the current luma block and the predicted samples of the current chroma block (S1170).

[0280] The decoding device can derive restored samples and / or a restored picture for the current luma block and the current chroma block based on the predicted samples of the current luma block and the predicted samples of the current chroma block. For example, the decoding device can derive the restored samples of the current luma block through addition of the predicted samples of the current luma block and the residual samples of the current luma block. Also, for example, the decoding device can derive the restored samples of the current chroma block through addition of the predicted samples of the current chroma block and the residual samples of the current chroma block. That is, for example, the decoding device can derive the restored samples of the current chroma Cb block through addition of the predicted samples of the current chroma Cb block and the residual samples of the current chroma Cb block, and can derive the restored samples of the current chroma Cr block through addition of the predicted samples of the current chroma Cr block and the residual samples of the current chroma Cr block.

[0281] On the other hand, for example, the decoding device can derive the residual samples of the current luma block based on the received residual information, and can derive the residual samples of the current chroma block (the residual samples of the current chroma Cb block and the residual samples of the current chroma Cr block) based on the received residual information.

[0282] For example, when BDPCM is applied to the current luma block, the residual information can include syntax elements for the residual samples of the current luma block (i.e., when BDPCM is applied to the current luma block, the residual information can include syntax elements for the target residual samples of the current luma block), and the syntax elements for the target residual samples can indicate the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample or the upper neighboring residual sample of the target residual sample. That is, for example, when BDPCM is applied to the current luma block, the residual information can include syntax elements for the target residual samples of the current luma block, and based on the syntax elements for the target residual samples, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample or the upper neighboring residual sample of the target residual sample can be derived.

[0283] For example, when BDPCM is applied to the current luma block and the prediction direction for the current luma block is the horizontal direction, the syntax element for the target residual sample can indicate the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample of the target residual sample. That is, for example, based on the syntax element for the target residual sample, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample of the target residual sample can be derived. Then, the residual coefficient of the target residual sample can be derived by adding the residual coefficient value of the left neighboring residual sample of the target residual sample and the difference. Here, the target residual sample may be a residual sample within a column other than the first column of the current luma block. For example, the residual coefficient of the target residual sample can be derived based on the aforementioned formula 4. On the other hand, for example, when the target residual sample is a residual sample within the first column of the current luma block, the residual coefficient of the target residual sample can be derived based on the syntax element of the target residual sample.

[0284] Also, for example, when BDPCM is applied to the current luma block and the prediction direction for the current luma block is the vertical direction, the syntax element for the target residual sample can indicate the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper neighboring residual sample of the target residual sample. That is, for example, based on the syntax element for the target residual sample, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper neighboring residual sample of the target residual sample can be derived. Then, the residual coefficient of the target residual sample can be derived by adding the difference to the residual coefficient value of the upper neighboring residual sample of the target residual sample. Here, the target residual sample may be a residual sample within a row other than the first row of the current luma block. For example, the residual coefficient of the target residual sample can be derived based on the aforementioned Equation 3. On the other hand, for example, when the target residual sample is a residual sample within the first row of the current luma block, the residual coefficient of the target residual sample can be derived based on the syntax element of the target residual sample.

[0285] Thereafter, for example, the decoding device can derive the target residual sample by inverse quantizing the residual coefficient. That is, for example, the target residual sample can be derived by inverse quantizing the residual coefficient.

[0286] Also, for example, when BDPCM is applied to the current chroma block (e.g., the current chroma Cb block or the current chroma Cr block), the residual information can include syntax elements for the residual samples of the current chroma block (i.e., when BDPCM is applied to the current chroma block, the residual information can include syntax elements for the target residual samples of the current chroma block (the current chroma Cb block and the current chroma Cr block)), and the syntax elements for the target residual samples can indicate the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample or the upper neighboring residual sample of the target residual sample. That is, for example, when BDPCM is applied to the current chroma block, the residual information can include syntax elements for the target residual samples of the current chroma block (e.g., the current chroma Cb block or the current chroma Cr block), and based on the syntax elements for the target residual samples, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample or the upper neighboring residual sample of the target residual sample can be derived.

[0287] For example, when BDPCM is applied to the current chroma block and the prediction direction for the current chroma block is the horizontal direction, the syntax element for the target residual sample can indicate the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample of the target residual sample. That is, for example, based on the syntax element for the target residual sample, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample of the target residual sample can be derived. Then, the residual coefficient of the target residual sample can be derived by adding the residual coefficient value of the left neighboring residual sample of the target residual sample and the difference. Here, the target residual sample may be a residual sample within a column other than the first column of the current chroma block. For example, the residual coefficient of the target residual sample can be derived based on the aforementioned formula 4. On the other hand, for example, when the target residual sample is a residual sample within the first column of the current chroma block, the residual coefficient of the target residual sample can be derived based on the syntax element of the target residual sample.

[0288] Also, for example, when BDPCM is applied to the current chroma block and the prediction direction for the current chroma block is the vertical direction, the syntax element for the target residual sample can indicate the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper neighboring residual sample of the target residual sample. That is, for example, based on the syntax element for the target residual sample, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper neighboring residual sample of the target residual sample can be derived. Then, the residual coefficient of the target residual sample can be derived by adding the difference to the residual coefficient value of the upper neighboring residual sample of the target residual sample. Here, the target residual sample may be a residual sample within a row other than the first row of the current chroma block. For example, the residual coefficient of the target residual sample can be derived based on the aforementioned Equation 3. On the other hand, for example, when the target residual sample is a residual sample within the first row of the current chroma block, the residual coefficient of the target residual sample can be derived based on the syntax element of the target residual sample.

[0289] After that, for example, the decoding device can inverse quantize the residual coefficient to derive the target residual sample. That is, for example, the target residual sample can be derived by inverse quantizing the residual coefficient.

[0290] On the other hand, although not shown in the figure, for example, the decoding device can obtain the residual information for the current luma block based on the BDPCM luma flag. For example, when the BDPCM luma flag indicates that BDPCM is applied to the current luma block, that is, when BDPCM is applied to the current luma block, the residual information can include syntax elements for the residual samples of the current luma block. Based on the syntax elements for the target residual samples, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample or the upper neighboring residual sample of the target residual sample can be derived. For example, when the prediction direction of the current luma block is the horizontal direction, that is, when the prediction direction of the current luma block is derived as the horizontal direction based on the BDPCM luma direction flag, based on the syntax elements for the target residual samples, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample of the target residual sample can be derived. Also, for example, when the prediction direction of the current luma block is the vertical direction, that is, when the prediction direction of the current luma block is derived as the vertical direction based on the BDPCM luma direction flag, based on the syntax elements for the target residual samples, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper neighboring residual sample of the target residual sample can be derived. Further, when the target residual sample is located in the first row or column of the current block, the residual coefficient value of the target residual sample can be derived based on the syntax elements for the target residual samples.

[0291] Further, for example, the decoding device can obtain the residual information for the current chroma block based on the BDPCM chroma flag. For example, when the BDPCM chroma flag indicates that BDPCM is applied to the current chroma block, that is, when BDPCM is applied to the current chroma block, the residual information can include syntax elements for the residual samples of the current chroma block, and based on the syntax elements for the target residual samples, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample or the upper neighboring residual sample of the target residual sample can be derived. For example, when the prediction direction of the current chroma block is horizontal, that is, when the prediction direction of the current chroma block is derived as horizontal based on the BDPCM chroma direction flag, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left neighboring residual sample of the target residual sample can be derived based on the syntax elements for the target residual samples. Also, for example, when the prediction direction of the current chroma block is vertical, that is, when the prediction direction of the current chroma block is derived as vertical based on the BDPCM chroma direction flag, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper neighboring residual sample of the target residual sample can be derived based on the syntax elements for the target residual samples. Further, when the target residual sample is located in the first row or column of the current chroma block, the residual coefficient value of the target residual sample can be derived based on the syntax elements for the target residual samples.

[0292] The decoding device can derive the restored sample through the addition of the prediction sample and the residual sample. Thereafter, in-loop filtering procedures such as deblocking filtering, SAO, and / or ALF procedures can be applied to the restored sample in order to improve subjective / objective image quality as necessary, as described above.

[0293] FIG. 12 schematically shows a decoding device that performs the image decoding method according to this document. The method disclosed in FIG. 11 can be performed by the decoding device disclosed in FIG. 12. Specifically, for example, the entropy decoding unit of the decoding device in FIG. 12 can perform S1100 to S1120 and S1140 to S1150 in FIG. 11, the prediction unit of the decoding device in FIG. 12 can perform S1130 and S1160 in FIG. 11, and the addition unit of the decoding device in FIG. 12 can perform S1170 in FIG. 11.

[0294] According to the foregoing document, it is possible to determine whether BDPCM of luma blocks and chroma blocks in an image is available with one syntax element, thereby reducing the amount of bits for BDPCM and improving the overall coding efficiency.

[0295] Also, according to this document, a BDPCM availability flag indicating whether BDPCM of luma blocks and chroma blocks in an image is available can be signaled regardless of the chroma format of the image, thereby reducing the complexity for BDPCM and improving the overall coding efficiency.

[0296] In the foregoing embodiments, the method has been described based on a flowchart in a series of steps or blocks, but this document is not limited to the order of the steps, and certain steps can occur in a different order or simultaneously with steps different from those described above. Also, those skilled in the art can understand that the steps shown in the flowchart are not exclusive, other steps can be included, or one or more steps of the flowchart can be deleted without affecting the scope of this document.

[0297] The embodiments described in this document can be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in each drawing can be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information for implementation (e.g., information on instructions) or algorithms can be stored in a digital storage medium.

[0298] Also, the decoding device and encoding device to which the embodiments of this document are applied can be included in multimedia broadcast transmission / reception devices, mobile communication terminals, home cinema video devices, digital cinema video devices, surveillance cameras, video conferencing devices, real-time communication devices such as video communication, mobile streaming devices, storage media, camcorders, video-on-demand (VoD) service providing devices, over-the-top (OTT) video devices, Internet streaming service providing devices, three-dimensional (3D) video devices, picture phone video devices, transportation means terminals (e.g., vehicle terminals, airplane terminals, ship terminals, etc.), and medical video devices, etc., and can be used to process video signals or data signals. For example, as an over-the-top (OTT) video device, it can be equipped with a game console, Blu-ray player, Internet-connected TV, home theater system, smartphone, tablet PC, digital video recorder (DVR), etc.

[0299] In addition, the processing method to which the embodiments of this document are applied can be produced in the form of a program executed by a computer and can be stored in a computer-readable recording medium. Multimedia data having the data structure according to this document can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which data that can be read by a computer is stored. The computer-readable recording medium can include, for example, Blu-ray Disc (BD), Universal Serial Bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices. Further, the computer-readable recording medium includes a medium realized in the form of a carrier wave (for example, transmission via the Internet). Also, a bit stream generated by an encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0300] In addition, the embodiments of this document can be realized by a computer program product with program code, and the program code can be executed by a computer according to the embodiments of this document. The program code can be stored on a carrier readable by a computer.

[0301] FIG. 13 exemplarily shows a structural diagram of a content streaming system to which the embodiments of this document are applied.

[0302] The content streaming system to which the embodiments of this document are applied can generally include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.

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

[0304] The bitstream can be generated by an encoding method or a bitstream generation method to which the embodiments of this document are applied, and the streaming server can temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0305] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server serves as a medium to inform the user of what services are available. When the user requests a desired service from the web server, the web server transmits this to the streaming server, and the streaming server transmits multimedia data to the user. At this time, the content streaming system can include another control server, and in this case, the control server serves to control commands / responses between each device within the content streaming system.

[0306] The streaming server can receive content from a media repository and / or an encoding server. For example, when it comes to receiving content from the 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 certain period of time.

[0307] Examples of the user device include mobile phones, smartphones, laptop computers, digital broadcast terminals, PDAs (personal digital assistants), PMPs (portable multimedia players), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, head mounted displays (HMDs)), digital TVs, desktop computers, digital signage, etc. Each server in the content streaming system can be operated as a distributed server, and in this case, the data received by each server can be processed distributively.

[0308] The claims described in this specification can be combined in various ways. For example, the technical features of the method claims in this specification can be combined and implemented as a device, and the technical features of the device claims in this specification can be combined and implemented as a method. Also, the technical features of the method claims in this specification and the technical features of the device claims can be combined and implemented as a device, and the technical features of the method claims in this specification and the technical features of the device claims can be combined and implemented as a method.

Claims

1. 1. An image decoding method performed by a decoding device, comprising: obtaining a BDPCM availability flag indicating whether BDPCM is available for both the luma block and the chroma block; obtaining a BDPCM luma flag for whether the BDPCM is applied to the current luma block based on the BDPCM available flag; obtaining a BDPCM luma direction flag for a prediction direction of the current luma block based on the BDPCM luma flag; deriving a prediction sample of the current luma block based on an intra prediction mode derived based on the BDPCM luma direction flag; obtaining a BDPCM chroma flag for whether the BDPCM is applied to the current chroma block based on the BDPCM available flag; obtaining a BDPCM chroma direction flag for a prediction direction of the current chroma block based on the BDPCM chroma flag; deriving a prediction sample of the current chroma block based on an intra prediction mode derived based on the BDPCM chroma direction flag; Including, The BDPCM available flag is signaled via a sequence parameter set (SPS), the BDPCM luma flag, the BDPCM luma direction flag, the BDPCM chroma flag, and the BDPCM chroma direction flag are signaled in units of coding units, a value of the BDPCM available flag equal to 0 indicates that the BDPCM is not available for both the luma block and the chroma block; the value of the BDPCM available flag being equal to one indicates that the BDPCM is available for both the luma block and the chroma block; based on the value of the BDPCM available flag being equal to 0, the BDPCM luma flag and the BDPCM chroma flag are not obtained; The image decoding method, wherein the BDPCM luma flag and the BDPCM chroma flag are obtained based on the value of the BDPCM available flag being equal to one.

2. based on the BDPCM luma flag having a value of 1, the BDPCM luma flag indicating that the BDPCM is applied to the current luma block and the BDPCM luma direction flag being present; 2. The image decoding method of claim 1, wherein based on a value of the BDPCM chroma flag being 1, the BDPCM chroma flag indicates that the BDPCM is applied to the current chroma block and the BDPCM chroma direction flag is present.

3. If the value of the BDPCM luma direction flag is 0, the prediction direction of the current luma block is derived as a horizontal direction; The image decoding method of claim 2 , wherein if the value of the BDPCM luma direction flag is 1, the prediction direction of the current luma block is derived as a vertical direction.

4. if the value of the BDPCM chroma direction flag is 0, the prediction direction of the current chroma block is derived as a horizontal direction; The image decoding method of claim 2 , wherein if the value of the BDPCM chroma direction flag is one, the prediction direction of the current chroma block is derived as a vertical direction.

5. The method of claim 1 , wherein the current chroma blocks include a current chroma Cb block and a current chroma Cr block.

6. 2. The image decoding method of claim 1, wherein the BDPCM available flag is signaled if a chroma format of an image is at least one of YUV420, YUV444, or YUV422.

7. if the BDPCM is applied to the current luma block and the prediction direction of the current luma block is derived as a vertical direction, the residual information includes a syntax element for a target residual sample of the current luma block; 7. The image decoding method of claim 6, wherein the syntax element for the current residual sample indicates a difference between a residual coefficient value of the current residual sample and a residual coefficient value of an upper surrounding residual sample of the current residual sample.

8. the difference is derived based on the syntax element for the residual sample of the subject; 8. The image decoding method of claim 7, wherein the residual coefficient of the target residual sample is derived as a sum of the residual coefficient value of the upper surrounding residual sample and the difference.

9. An image encoding method performed by an encoding device, comprising: determining whether Block-based Delta Pulse Code Modulation (BDPCM) is available for the chroma and luma blocks; generating a BDPCM available flag for indicating whether the BDPCM is available for the chroma block and the luma block based on the result of the determination; generating a predicted sample for a current luma block based on the BDPCM; generating a prediction sample for a current chroma block based on the BDPCM; generating BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block; encoding image information including the BDPCM available flag, the BDPCM related information for the current luma block, and the BDPCM related information for the current chroma block; The BDPCM related information for the current luma block includes a BDPCM luma flag indicating whether the BDPCM is applied to the current luma block, and a BDPCM luma direction flag indicating a prediction direction of the current luma block. The BDPCM related information for the current chroma block includes a BDPCM chroma flag indicating whether the BDPCM is applied to the current chroma block, and a BDPCM chroma direction flag indicating a prediction direction of the current chroma block. The BDPCM available flag is signaled via a sequence parameter set (SPS), the BDPCM luma flag, the BDPCM luma direction flag, the BDPCM chroma flag, and the BDPCM chroma direction flag are signaled in units of coding units, a value of the BDPCM available flag equal to 0 indicates that the BDPCM is not available for both the luma block and the chroma block; the value of the BDPCM available flag being equal to one indicates that the BDPCM is available for both the luma block and the chroma block; based on the value of the BDPCM available flag being equal to 0, the BDPCM luma flag and the BDPCM chroma flag are not signaled; The method of claim 1, wherein the BDPCM luma flag and the BDPCM chroma flag are signaled based on the value of the BDPCM available flag being equal to one.

10. 10. The method of claim 9, wherein the BDPCM available flag is signaled if the chroma format of an image is at least one of YUV420, YUV444, or YUV422.

11. 1. A method for transmitting data for an image, comprising: obtaining a bitstream of image information including a block-based delta pulse code modulation (BDPCM) available flag, BDPCM related information for a current luma block, and BDPCM related information for a current chroma block; transmitting the data including the bitstream of the image information including the BDPCM available flag, the BDPCM related information for the current luma block, and the BDPCM related information for the current chroma block; the BDPCM availability flag indicates whether BDPCM is available for a chroma block and a luma block; The BDPCM related information for the current luma block includes a BDPCM luma flag indicating whether the BDPCM is applied to the current luma block, and a BDPCM luma direction flag indicating a prediction direction of the current luma block. The BDPCM related information for the current chroma block includes a BDPCM chroma flag indicating whether the BDPCM is applied to the current chroma block, and a BDPCM chroma direction flag indicating a prediction direction of the current chroma block. The BDPCM available flag is signaled via a sequence parameter set (SPS), the BDPCM luma flag, the BDPCM luma direction flag, the BDPCM chroma flag, and the BDPCM chroma direction flag are signaled in units of coding units, a value of the BDPCM available flag equal to 0 indicates that the BDPCM is not available for both the luma block and the chroma block; the value of the BDPCM available flag being equal to one indicates that the BDPCM is available for both the luma block and the chroma block; based on the value of the BDPCM available flag being equal to 0, the BDPCM luma flag and the BDPCM chroma flag are not signaled; The transmission method, wherein the BDPCM luma flag and the BDPCM chroma flag are signaled based on the value of the BDPCM available flag being equal to one.

Citation Information

Patent Citations

  • Video encoding or decoding method, apparatus and computer program

    JP2022525467A

  • Video signal processing method and apparatus using Block DPCM prediction method

    JP2022537805A

  • JPP7469480B

  • Video encoding and decoding methods and apparatuses, device, and storage medium

    US20220046253A1