BDPCM-based image decoding method and apparatus for luminal and chroma components
By employing BDPCM with flags and direction indicators for luminance and chroma components, the method addresses the high bit rate challenge of high-resolution video, achieving reduced bit size and enhanced coding efficiency.
Patent Information
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- LG ELECTRONICS INC
- Filing Date
- 2020-11-04
- Publication Date
- 2026-07-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The increasing demand for high-resolution, high-quality video has led to a surge in video data transmission and storage costs due to the higher bit rate requirements, necessitating improved image coding efficiency.
Implementing Block-based Delta Pulse Code Modulation (BDPCM) for luminance and chroma components, with flags and direction indicators to determine availability and prediction directions, enhancing coding efficiency by reducing bit size and complexity.
The availability of BDPCM for luminance and chroma blocks is determined with a single syntax element, reducing bit size and improving overall coding efficiency.
Smart Images

Figure R1020227018721_ABST
Abstract
Description
Technology Field
[0001] This document relates to image coding technology, and more specifically, to an image decoding method and apparatus for performing BDPCM in an image coding system. Background Technology
[0002] Recently, the demand for high-resolution, high-quality video, such as HD (High Definition) and UHD (Ultra High Definition), has been increasing across various fields. As video data becomes higher in resolution and quality, the relative amount of information or bits transmitted increases compared to conventional video data. Consequently, when transmitting video data using existing wired or wireless broadband lines or storing it on conventional storage media, transmission and storage costs increase.
[0003] Accordingly, high-efficiency video compression technology is required to effectively transmit, store, and play back high-resolution, high-quality video information. The problem to be solved
[0004] The technical objective of this document is to provide a method and device for increasing image coding efficiency.
[0005] Another technical objective of this document is to provide a method and apparatus for increasing the efficiency of BDPCM. means of solving the problem
[0006] According to one embodiment of the present document, an image decoding method performed by a decoding device is provided. The above method comprises the steps of: obtaining a BDPCM availability flag indicating whether Block-based Delta Pulse Code Modulation (BDPCM) is available for a chroma block and a luminance block; obtaining a BDPCM luminance flag indicating whether BDPCM is applied to the current luminance block based on the BDPCM availability flag; obtaining a BDPCM luminance direction flag indicating the prediction direction of the current luminance block based on the BDPCM luminance flag; deriving prediction samples of the current luminance block based on an intra prediction mode derived based on the BDPCM luminance direction flag; obtaining a BDPCM chroma flag indicating whether BDPCM is applied to the current chroma blocks based on the BDPCM availability flag; obtaining a BDPCM chroma direction flag indicating the prediction direction of the current chroma blocks based on the BDPCM chroma flag; deriving prediction samples of the current chroma blocks based on an intra prediction mode derived based on the BDPCM chroma direction flag; and the prediction samples of the current luminance block and the prediction of the current chroma blocks. It is characterized by including a step of generating a restored picture based on samples.
[0007] According to another embodiment of the present document, a decoding device for performing image decoding is provided. The above decoding device comprises: an entropy decoding unit that acquires a BDPCM availability flag regarding whether BDPCM (Block-based Delta Pulse Code Modulation) is available for a chroma block and a luminance block; acquires a BDPCM luminance flag regarding whether BDPCM is applied to the current luminance block based on the BDPCM availability flag; acquires a BDPCM luminance direction flag regarding the prediction direction of the current luminance block based on the BDPCM luminance flag; acquires a BDPCM chroma flag regarding whether BDPCM is applied to the current chroma blocks based on the BDPCM availability flag; and acquires a BDPCM chroma direction flag regarding the prediction direction of the current chroma blocks based on the BDPCM chroma flag; a prediction unit that derives prediction samples of the current luminance block based on an intra prediction mode derived based on the BDPCM luminance direction flag; and derives prediction samples of the current chroma blocks based on an intra prediction mode derived based on the BDPCM chroma direction flag; and the prediction samples of the current luminance block and the current It is characterized by including an adder that generates a reconstructed picture based on the predicted samples of the chroma blocks.
[0008] According to another embodiment of the present document, a video encoding method performed by an encoding device is provided. The above method comprises the steps of: determining whether Block-based Delta Pulse Code Modulation (BDPCM) is available for a chroma block and a luminance block; generating a BDPCM availability flag regarding whether the BDPCM is available for the chroma block and the luminance block based on the result of the determination; generating prediction samples for the current luminance block based on the BDPCM; generating prediction samples for the current chroma blocks based on the BDPCM; generating BDPCM-related information for the current luminance block and BDPCM-related information for the current chroma blocks; and encoding image information including the BDPCM availability flag, the BDPCM-related information for the current luminance block, and the BDPCM-related information for the current chroma blocks. The BDPCM-related information for the current luminance block includes a BDPCM luminance flag regarding whether the BDPCM is applied to the current luminance block and a BDPCM luminance direction flag regarding the prediction direction of the current luminance block. The BDPCM-related information for the current chroma blocks includes the It is characterized by including a BDPCM chroma flag regarding whether the BDPCM is applied to the current chroma blocks and a BDPCM chroma direction flag regarding the predicted direction of the current chroma blocks.
[0009] According to another embodiment of the present document, a video encoding device is provided. The above encoding device includes a prediction unit that determines whether Block-based Delta Pulse Code Modulation (BDPCM) is available for chroma blocks and luminance blocks, generates prediction samples for the current luminance block based on the BDPCM, and generates prediction samples for the current chroma blocks based on the BDPCM; and an entropy encoding unit that generates a BDPCM availability flag regarding whether the BDPCM is available for the chroma blocks and luminance blocks based on the result of the determination, generates BDPCM-related information for the current luminance block and BDPCM-related information for the current chroma blocks, and encodes image information including the BDPCM availability flag, the BDPCM-related information for the current luminance block, and the BDPCM-related information for the current chroma blocks, wherein the BDPCM-related information for the current luminance block includes a BDPCM luminance flag regarding whether the BDPCM is applied to the current luminance block and a BDPCM luminance direction flag regarding the prediction direction of the current luminance block, and the BDPCM-related information for the current chroma blocks The BDPCM-related information is characterized by including a BDPCM chroma flag regarding whether the BDPCM is applied to the current chroma blocks and a BDPCM chroma direction flag regarding the predicted direction of the current chroma blocks.
[0010] According to another embodiment of the present document, a computer-readable digital storage medium is provided that stores a bitstream containing image information that causes an image decoding method to be performed. In a computer-readable digital storage medium, the image decoding method comprises: a step of obtaining a BDPCM availability flag regarding whether Block-based Delta Pulse Code Modulation (BDPCM) is available for a chroma block and a luminance block; a step of obtaining a BDPCM luminance flag regarding whether BDPCM is applied to the current luminance block based on the BDPCM availability flag; a step of obtaining a BDPCM luminance direction flag regarding the prediction direction of the current luminance block based on the BDPCM luminance flag; a step of deriving prediction samples of the current luminance block based on an intra prediction mode derived based on the BDPCM luminance direction flag; a step of obtaining a BDPCM chroma flag regarding whether BDPCM is applied to the current chroma blocks based on the BDPCM availability flag; a step of obtaining a BDPCM chroma direction flag regarding the prediction direction of the current chroma blocks based on the BDPCM chroma flag; a step of deriving prediction samples of the current chroma blocks based on an intra prediction mode derived based on the BDPCM chroma direction flag; and the current luminance It is characterized by including the step of generating a restored picture based on the predicted samples of the block and the predicted samples of the current chroma blocks. Effects of the invention
[0011] According to this document, the availability of BDPCM for the luminance block and chroma block within an image can be determined with a single syntax element, thereby reducing the bit size for BDPCM and improving overall coding efficiency.
[0012] According to this document, a BDPCM availability flag indicating whether BDPCM is available for the luminance block and chroma block within the image can be signaled regardless of the image's chroma format, thereby reducing complexity for BDPCM and improving overall coding efficiency. Brief explanation of the drawing
[0013] Figure 1 schematically illustrates an example of a video / image coding system to which embodiments of the present document can be applied. FIG. 2 is a diagram schematically illustrating the configuration of a video / image encoding device to which embodiments of the present document can be applied. FIG. 3 is a diagram schematically illustrating the configuration of a video / image decoding device to which embodiments of the present document can be applied. Figure 4 illustrates an exemplary hierarchical structure for a coded image / video. Figure 5 illustrates an exemplary context-adaptive binary arithmetic coding (CABAC) for encoding syntax elements. Figure 6 shows an example of an intra-prediction-based video / image encoding method. Figure 7 shows an example of an intra-prediction-based video / image encoding method. Figure 8 illustrates an exemplary intra-prediction procedure. Figure 9 schematically illustrates a video encoding method using an encoding device according to the present document. Figure 10 schematically shows an encoding device that performs the video encoding method according to the present document. Figure 11 schematically illustrates an image decoding method by a decoding device according to the present document. FIG. 12 schematically illustrates a decoding device that performs the image decoding method according to the present document. FIG. 13 illustrates an exemplary structural diagram of a content streaming system to which embodiments of the present document are applied. Specific details for implementing the invention
[0014] As this document is subject to various modifications and may have various embodiments, specific embodiments are illustrated in the drawings and described in detail. However, this is not intended to limit the embodiments of this document to specific embodiments. Terms used in this specification are used merely to describe specific embodiments and are not intended to limit the technical scope of this document. Singular expressions include plural expressions unless the context clearly indicates otherwise. Terms such as "comprising" or "having" in this specification are intended to indicate the existence of the features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.
[0015] Meanwhile, the components depicted in the drawings described in this document are drawn independently for the convenience of explaining their distinct characteristic functions and do not imply that they are implemented in separate hardware or software. For example, two or more components may be combined to form a single component, or a single component may be divided into multiple components. Embodiments in which components are integrated and / or separated are also included within the scope of this document, provided that they do not deviate from the essence of this document.
[0016] Hereinafter, preferred embodiments of the present document will be described in more detail with reference to the attached drawings. In the following, the same reference numerals are used for identical components in the drawings, and redundant descriptions of identical components may be omitted.
[0017] Figure 1 schematically illustrates an example of a video / image coding system to which embodiments of the present document can be applied.
[0018] Referring to FIG. 1, a video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device in the form of a file or streaming via a digital storage medium or a network.
[0019] The source device may include a video source, an encoding device, and a transmission unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be called a video / image encoding device, and the decoding device may be called a video / image decoding device. A transmitter may be included in the encoding device. A receiver may be included in the decoding device. The renderer may include a display unit, and the display unit may be composed of a separate device or an external component.
[0020] A video source may acquire video / images through processes such as video / image capture, synthesis, or generation. The video source may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. The video / image generation device may include, for example, a computer, a tablet, and a smartphone, etc., and may generate video / images (electronically). For example, virtual video / images may be generated through a computer, etc., in which case the video / image capture process may be replaced by a process in which related data is generated.
[0021] The encoding device can encode input video / images. The encoding device can perform a series of procedures, such as prediction, transformation, and quantization, for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0022] The transmission unit can transmit encoded video / image information or data output in the form of a bitstream to the receiving unit of a receiving device in the form of a file or streaming via a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit may include elements for creating a media file through a predetermined file format and elements for transmission via a broadcasting / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.
[0023] The decoding device can decode video / images by performing a series of procedures such as inverse quantization, inverse transform, and prediction corresponding to the operation of the encoding device.
[0024] The renderer can render the decoded video / image. The rendered video / image can be displayed through the display unit.
[0025] This document relates to video / video coding. For example, the methods / executions disclosed in this document may be applied to 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 / video coding standards (e.g., H.267 or H.268).
[0026] This document presents various embodiments regarding video / image coding, and unless otherwise noted, the embodiments may be performed in combination with one another.
[0027] In this document, "video" may refer to a set of images over time. "Picture" generally refers to a unit representing a single image at a specific time, and "subpicture," "slice," or "tile" are units that constitute a part of a picture in coding. A subpicture, slice, or tile may contain one or more CTUs (coding tree units). A single picture may be composed of one or more subpictures, slices, or tiles. A single picture may be composed of one or more tile groups. A tile group may contain one or more tiles. A "brick" may represent a rectangular area of rows of CTUs within a tile in a picture. A tile may be partitioned into multiple bricks, and each brick may consist of one or more rows of CTUs within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick. A brick scan may represent a specific sequential ordering of CTUs partitioning a picture, said CTUs may be aligned by CTU raster scans within a brick, bricks within a tile may be sequentially aligned by raster scans of said bricks within the tile, and tiles within a picture may be sequentially aligned by raster scans of said tiles within the picture. Additionally, a sub-picture may represent a rectangular area of one or more slices within a picture. That is, a sub-picture may include one or more slices that collectively cover a rectangular area of the picture. A tile is a specific tile column and a rectangular area of CTUs within that specific tile column. The tile column is a rectangular area of CTUs, said rectangular area has a height equal to the height of the picture, and its width may be specified by syntax elements within the picture parameter set.The above tile row is a rectangular area of CTUs, and the rectangular area has a width specified by syntax elements within the picture parameter set, and the height may be equal to the height of the picture. A tile scan may represent a specific sequential ordering of CTUs partitioning the picture, said CTUs may be continuously aligned by a raster scan of CTUs within the tile, and tiles within the picture may be continuously aligned by a raster scan of said tiles of the picture. A slice may contain an integer number of bricks of the picture, said integer number of bricks may be contained in a single NAL unit. A slice may consist of multiple complete tiles, or it may be a continuous sequence of complete bricks of a single tile. In this document, tile group and slice 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 refer to the smallest unit that constitutes a picture (or image). Additionally, the term 'sample' may be used as a counterpart to pixel. Generally, a sample can represent a pixel or its value, and it may represent only the pixel / pixel value of the luminance component or only the pixel / pixel value of the chroma component.
[0029] A unit may represent a basic unit of image processing. A unit may include at least one of a specific area of a picture and information related to that area. A unit may include one luminance block and two chroma (e.g., cb, cr) blocks. Depending on the case, the term unit may be used interchangeably with terms such as block or area. In general, an MxN block may include samples (or sample arrays) or a set (or array) of transform coefficients consisting of M columns and N rows.
[0030] In this specification, "A or B" may mean "only A," "only B," or "both A and B." Alternatively, in this specification, "A or B" may be interpreted as "A and / or B." For example, in this specification, "A, B or C" may mean "only A," "only B," "only C," or "any combination of A, B and C."
[0031] A slash ( / ) or a comma used in this specification may mean "and / or." For example, "A / B" may mean "A and / or B." Accordingly, "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] In this specification, "at least one of A and B" may mean "only A," "only B," or "both A and B." Additionally, in this specification, the expressions "at least one of A or B" or "at least one of A and / or B" may be interpreted as synonymous with "at least one of A and B."
[0033] Additionally, 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" or "at least one of A, B and / or C" may mean "at least one of A, B and C."
[0034] Additionally, parentheses used in this specification may mean "for example." Specifically, where indicated 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." Furthermore, even where indicated as "prediction (i.e., intra-prediction)," "intra-prediction" may be proposed as an example of "prediction."
[0035] Technical features described individually within a single drawing in this specification may be implemented individually or simultaneously.
[0036] The following drawings are made to illustrate a specific example of the present specification. The names of specific devices or specific signals / messages / fields described in the drawings are presented as examples, and therefore the technical features of the present specification are not limited to the specific names used in the following drawings.
[0037] FIG. 2 is a diagram schematically illustrating the configuration of a video / image encoding device to which embodiments of the present document may be applied. Hereinafter, the term "video encoding device" may include an image encoding device.
[0038] Referring to FIG. 2, the encoding device (200) may 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) may include an inter-predictor (221) and an intra-predictor (222). The residual processor (230) may include a transformer (232), a quantizer (233), a dequantizer (234), and an inverse transformer (235). The residual processor (230) may further include a subtractor (231). The addition unit (250) may be referred to as a reconstructor or a reconstructed block generator. The above-described image segmentation unit (210), prediction unit (220), residual processing unit (230), entropy encoding unit (240), addition unit (250), and filtering unit (260) may be configured by one or more hardware components (e.g., an encoder chipset or processor) according to the embodiment. Additionally, the memory (270) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may 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 an encoding device (200) into one or more processing units. For example, the processing unit may be called a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a QTBTTT (Quad-tree binary-tree ternary-tree) structure. For example, one coding unit may be divided into multiple coding units of 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 may be applied first and the binary-tree structure and / or ternary structure may be applied later. Or the binary-tree structure may be applied first. A coding procedure according to this document may be performed based on the final coding unit that is no longer divided. In this case, based on coding efficiency according to image characteristics, the maximum coding unit may be used directly as the final coding unit, or, if necessary, the coding unit may be recursively divided into lower-depth coding units so that a coding unit of the optimal size is used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration described later. As another example, the processing unit may further include a prediction unit (PU) or a transformation unit (TU). In this case, the prediction unit and the transformation unit may each be divided or partitioned from the final coding unit described above.The above prediction unit may be a unit of sample prediction, and the above transformation unit may be a unit that derives transformation coefficients and / or a unit that derives a residual signal from transformation coefficients.
[0040] The term "unit" may be used interchangeably with terms such as "block" or "area" depending on the context. In general, an MxN block may 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 may represent only the pixel / pixel value of the luminance component or only the pixel / pixel value of the chroma component. A sample may be used to refer to a single picture (or image) as a term corresponding to a pixel or pel.
[0041] The encoding device (200) can generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (predicted block, prediction sample array) output from an inter prediction unit (221) or an intra prediction unit (222) from an input image signal (original block, original sample array), and the generated residual signal is transmitted to a conversion unit (232). In this case, as illustrated, the unit that subtracts the prediction signal (predicted block, prediction sample array) from the input image signal (original block, original sample array) within the encoder (200) may be called a subtraction unit (231). The prediction unit performs a prediction for a block to be processed (hereinafter referred to as the current block) and can generate a predicted block containing prediction samples for the current block. The prediction unit can determine whether intra prediction is applied or inter prediction is applied at the current block or CU level. The prediction unit can generate various information regarding prediction, such as prediction mode information, as described below in the description of each prediction mode, and transmit it to the entropy encoding unit (240). The information regarding prediction can be encoded in 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 referenced samples may be located near the current block or away from it, depending on the prediction mode. In intra prediction, the prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, a DC mode and a Planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes, depending on the degree of fineness of the prediction direction. However, this is merely an example, and depending on the settings, more or fewer directional prediction modes may be used. The intra prediction unit (222) may also determine the prediction mode applied to the current block by using the prediction mode applied to the surrounding blocks.
[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, to reduce the amount of motion information transmitted in the inter prediction mode, motion information can be predicted in blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on the inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, neighboring blocks may include spatial neighboring blocks existing within the current picture and temporal neighboring blocks existing in the reference picture. The reference picture containing the reference blocks and the reference picture containing the temporal neighboring blocks may be the same or different. The above temporal surrounding blocks may be referred to by names such as collocated reference block, collocated CU (colCU), etc., and the reference picture containing the above temporal surrounding blocks may be referred to as a collocated picture (colPic). For example, the inter prediction unit (221) may construct a list of motion information candidates based on surrounding blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, for example, in the case of skip mode and merge mode, the inter prediction unit (221) may use the motion information of surrounding blocks as motion information of the current block. In the case of skip mode, unlike merge mode, a residual signal may not be transmitted.In the motion vector prediction (MVP) mode, the motion vector of surrounding blocks is 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 below. For example, the prediction unit may apply intra prediction or inter prediction for a single block, and may also apply intra prediction and inter prediction simultaneously. This may be called combined inter and intra prediction (CIIP). Additionally, the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for predicting a block. The IBC prediction mode or palette mode may be used for content video / video coding, such as in games, for example, screen content coding (SCC). IBC basically performs prediction within the current picture, but it can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode can be viewed as an example of intra coding or intra prediction. When palette mode is applied, sample values within the picture can be signaled based on information regarding the palette table and palette index.
[0045] The prediction signal generated through the prediction unit (including the inter prediction unit (221) and / or the intra prediction unit (222)) may be used to generate a restored signal or to generate a residual signal. The transformation unit (232) may generate transform coefficients by applying a transformation technique to the residual signal. For example, the transformation technique may include at least one of the Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), Karhunen-Loeve Transform (KLT), Graph-Based Transform (GBT), or Conditionally Non-linear Transform (CNT). Here, GBT refers to a transformation obtained from a graph when the relationship information between pixels is represented as a graph. CNT refers to a transformation obtained based on generating a prediction signal using all previously reconstructed pixels. In addition, the transformation process can be applied to pixel blocks of the same square size, or to non-square blocks of variable size.
[0046] The quantization unit (233) quantizes the transformation coefficients and transmits them to the entropy encoding unit (240), and the entropy encoding unit (240) can encode the quantized signal (information regarding the quantized transformation coefficients) and output it as a bitstream. The information regarding the quantized transformation coefficients may be called residual information. The quantization unit (233) can rearrange the block-shaped quantized transformation coefficients into a one-dimensional vector form based on the coefficient scan order, and can also generate information regarding the quantized transformation coefficients based on the one-dimensional vector-shaped quantized transformation coefficients. The entropy encoding unit (240) can perform 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) may encode information necessary for video / image restoration (e.g., values of syntax elements) together or separately, in addition to the quantized transform coefficients. The encoded information (e.g., encoded video / image information) may be transmitted or stored in the form of a bitstream in units of NAL (network abstraction layer) units. The video / image information may 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). Additionally, the video / image information may further include general constraint information. In this document, information and / or syntax elements transmitted / signaled from the encoding device to the decoding device may be included in the video / image information. The video / image information may be encoded through the encoding procedure described above and included in the bitstream.The above bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmission unit (not shown) that transmits the signal output from the entropy encoding unit (240) and / or a storage unit (not shown) that stores it may be configured as internal / external elements of the encoding device (200), or the transmission unit may be included in the entropy encoding unit (240).
[0047] Quantized transformation coefficients output from the quantization unit (233) can be used to generate a prediction signal. For example, a residual signal (residual block or residual samples) can be restored by applying inverse quantization and inverse transformation to the quantized transformation coefficients through the inverse quantization unit (234) and the inverse transformation unit (235). An adder (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). In cases where there is no residual for the block to be processed, such as when a skip mode is applied, the predicted block can be used as the reconstructed block. The adder (250) may be called a reconstruction unit or a reconstruction block generation unit. The generated restoration signal can be used for intra prediction of the next processing target block within the current picture, and can also be used for inter prediction of the next picture after filtering as described below.
[0048] Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture encoding and / or restoration process.
[0049] The filtering unit (260) can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit (260) can generate a modified restored picture by applying various filtering methods to the restored picture, and can store the modified restored picture in memory (270), specifically in the DPB of memory (270). The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit (260) can generate various information regarding filtering and transmit it to the entropy encoding unit (240), as described below in the description of each filtering method. The information regarding filtering can be encoded in the entropy encoding unit (240) and output in the form of a bitstream.
[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 improve encoding efficiency.
[0051] The memory (270) DPB can store the modified restored picture to be used as a reference picture in the inter-prediction unit (221). The memory (270) can store motion information of blocks from which motion information is derived (or encoded) within the current picture and / or motion information of blocks within the picture that have already been restored. The stored motion information can be transmitted to the inter-prediction unit (221) to be used as motion information of spatially surrounding blocks or motion information of temporally surrounding blocks. The memory (270) can store restoration samples of the blocks restored within the current picture and transmit them to the intra-prediction unit (222).
[0052] FIG. 3 is a diagram schematically illustrating the configuration of a video / image decoding device to which embodiments of the present document can be applied.
[0053] Referring to FIG. 3, the decoding device (300) may 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) may include an inter-predictor (331) and an intra-predictor (332). The residual processor (320) may include a dequantizer (321) and an inverse transformer (322). The aforementioned entropy decoding unit (310), residual processing unit (320), prediction unit (330), addition unit (340), and filtering unit (350) may be configured by a single hardware component (e.g., a decoder chipset or a processor) according to an embodiment. Additionally, the memory (360) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory (360) as an internal / external component.
[0054] When a bitstream containing video / image information is input, the decoding device (300) can restore the image in correspondence with the process in which the video / image information is processed by the encoding device of FIG. 2. For example, the decoding device (300) can derive units / blocks based on block division information obtained from the bitstream. The decoding device (300) can perform decoding using a processing unit applied by the encoding device. Accordingly, the processing unit for decoding may be, for example, a coding unit, and the coding unit may be divided from a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and / or a binary tree structure. One or more conversion units may be derived from the coding unit. And, the restored image signal decoded and output through the decoding device (300) can be played back through a playback device.
[0055] The decoding device (300) can receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal can be decoded through an 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 may 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). Additionally, the video / image information may further include general constraint information. The decoding device can decode the picture based on information regarding the parameter sets and / or the general constraint information. The signaling / receiving information and / or syntax elements described below in this document can be obtained from the bitstream by being decoded through the decoding procedure. For example, the entropy decoding unit (310) can decode information within a bitstream based on coding methods such as exponential chord coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transformation coefficients regarding residuals. More specifically, the CABAC entropy decoding method can receive a bin corresponding to each syntax element in a bitstream, determine a context model using information of the syntax element to be decoded and decoding information of surrounding and decoding target blocks or information of symbols / bins decoded in the previous step, predict the probability of occurrence of the bin according to the determined context model, and perform 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 decoded symbol / bin information for the context model of the next symbol / bin after determining the context model. Among the information decoded in the entropy decoding unit (310), information regarding prediction is provided to the prediction unit (inter prediction unit (332) and intra prediction unit (331)), and the residual value for which entropy decoding was performed in the entropy decoding unit (310), i.e., quantized transformation coefficients and related parameter information, can be input to the residual processing unit (320). The residual processing unit (320) can derive residual signals (residual blocks, residual samples, residual sample array). Additionally, among the information decoded in the entropy decoding unit (310), information regarding filtering can be provided to the filtering unit (350). Meanwhile, a receiving unit (not shown) that receives a signal output from an encoding device may be further configured as an internal / external element of the decoding device (300), or the receiving unit may be a component of the entropy decoding unit (310). Meanwhile, the decoding device according to the present document may be called a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit (310), and the sample decoder may include at least one of the inverse quantization unit (321), inverse transform unit (322), adder (340), filtering unit (350), memory (360), inter prediction unit (332), and intra prediction unit (331).
[0056] In the inverse quantization unit (321), the quantized transformation coefficients can be inversely quantized to output transformation coefficients. The inverse quantization unit (321) can rearrange the quantized transformation coefficients into a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scan order performed by the encoding device. The inverse quantization unit (321) can perform inverse quantization on the quantized transformation coefficients using quantization parameters (e.g., quantization step size information) and obtain transformation coefficients.
[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 performs a prediction for the current block and can generate a predicted block containing prediction samples for the current block. Based on information regarding the prediction output from the entropy decoding unit (310), the prediction unit can determine whether an intra prediction or an inter prediction is applied to the current block 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 below. For example, the prediction unit may apply intra prediction or inter prediction for a single block, and may also apply intra prediction and inter prediction simultaneously. This may be called combined inter and intra prediction (CIIP). Additionally, the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for predicting a block. The IBC prediction mode or palette mode may be used for content video / video coding, such as in games, for example, screen content coding (SCC). IBC basically performs prediction within the current picture, but it can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode can be viewed as an example of intra coding or intra prediction. When the palette mode is applied, information regarding the palette table and palette index can be included in the above video / image information and signaled.
[0060] The intra prediction unit (331) can predict the current block by referring to samples within the current picture. The referenced samples may be located near the current block or away from it, depending on the prediction mode. In intra prediction, the prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit (331) may determine the prediction mode applied to the current block by using the prediction mode applied to the surrounding blocks.
[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 a reference picture. At this time, to reduce the amount of motion information transmitted in the inter prediction mode, motion information can be predicted in blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on the inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, neighboring blocks may 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) may construct a motion information candidate list based on the neighboring blocks and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter-prediction can be performed based on various prediction modes, and information regarding the prediction may include information indicating the mode of inter-prediction for the current block.
[0062] The adder (340) can generate a restoration signal (restored picture, restored block, restored sample array) by adding the acquired residual signal to the prediction signal (predicted block, predicted sample array) output from the prediction unit (including the inter prediction unit (332) and / or the intra prediction unit (331)). In cases where there is no residual for the block to be processed, such as when a skip mode is applied, the predicted block can be used as the restoration block.
[0063] The addition unit (340) may be called a restoration unit or a restoration block generation unit. The generated restoration signal may be used for intra-predicting the next block to be processed within the current picture, may be output after filtering as described below, or may be used for inter-predicting the next picture.
[0064] Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture decoding process.
[0065] The filtering unit (350) can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit (350) can generate a modified restored picture by applying various filtering methods to the restored picture, and can transmit the modified restored picture to memory (360), specifically to the DPB of memory (360). The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0066] The (modified) restored 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 motion information of blocks from which motion information within the current picture has been derived (or decoded) and / or motion information of blocks within the picture that have already been restored. The stored motion information can be transmitted to the inter-prediction unit (260) to be used as motion information of spatially surrounding blocks or motion information of temporally surrounding blocks. The memory (360) can store restoration samples of blocks restored within the current picture and transmit them to the intra-prediction unit (331).
[0067] In this specification, the embodiments described in the filtering unit (260), inter prediction unit (221), and intra prediction unit (222) of the encoding device (200) may be applied to the filtering unit (350), inter prediction unit (332), and intra prediction unit (331) of the decoding device (300) in the same or corresponding manner.
[0068] In this document, at least one of quantization / inverse quantization and / or transformation / inverse transformation may be omitted. If the quantization / inverse quantization is omitted, the quantized transformation coefficients may be called transformation coefficients. If the transformation / inverse transformation is omitted, the transformation coefficients may be called coefficients or residual coefficients, or for the sake of consistency of expression, they may still be called transformation coefficients.
[0069] In this document, quantized transform coefficients and transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, residual information may include information regarding the transform coefficient(s), and information regarding said transform coefficient(s) may be signaled through residual coding syntax. Transform coefficients may be derived based on said residual information (or information regarding said transform coefficient(s), and scaled transform coefficients may be derived through inverse transform (scaling) of said transform coefficients. Residual samples may be derived based on the inverse transform (transform) of said scaled transform coefficients. This may be similarly applied / expressed in other parts of this document.
[0070] Figure 4 illustrates an exemplary hierarchical structure for a coded image / video.
[0071] Referring to Figure 4, the coded image / video is divided into a VCL (video coding layer) that handles the decoding processing of the image / video and the image / video itself, a subsystem that transmits and stores the encoded information, and a NAL (network abstraction layer) that exists between the VCL and the subsystem and is responsible for network adaptation functions.
[0072] In VCL, VCL data containing compressed image data (slice data) can be generated, or parameter sets containing information such as Picture Parameter Set (PPS), Sequence Parameter Set (SPS), and Video Parameter Set (VPS), or SEI (Supplemental Enhancement Information) messages that are additionally required in the decoding process of the image can be generated.
[0073] In NAL, a NAL unit can be created by adding header information (NAL unit header) to the Raw Byte Sequence Payload (RBSP) generated in VCL. In this case, the RBSP refers to slice data, parameter sets, SEI messages, etc. generated in VCL. The NAL unit header may include NAL unit type information specified according to the RBSP data included in the NAL unit.
[0074] As illustrated in the figure above, NAL units can be classified into VCL NAL units and Non-VCL NAL units depending on the RBSP generated in VCL. A VCL NAL unit may refer to a NAL unit containing information about an image (slice data), and a Non-VCL NAL unit may refer to a NAL unit containing information necessary to decode an image (parameter set or SEI message).
[0075] The aforementioned VCL NAL unit and Non-VCL NAL unit can be transmitted over a network by attaching header information according to the data specifications of the underlying system. For example, the NAL unit can be transformed into a data format of a specified specification, such as H.266 / VVC file format, RTP (Real-time Transport Protocol), TS (Transport Stream), etc., and transmitted over various networks.
[0076] As described above, the NAL unit type can be specified according to the RBSP data structure included in the NAL unit, and information about this NAL unit type can be stored in the NAL unit header and signaled.
[0077] For example, NAL units can be broadly classified into VCL NAL unit types and Non-VCL NAL unit types depending on whether they contain information about the image (slice data). VCL NAL unit types can be classified according to the properties and types of the picture included in the VCL NAL unit, while Non-VCL NAL unit types can be classified according to the types of parameter sets.
[0078] The following is an example of a NAL unit type specified according to the type of parameter set included in the Non-VCL NAL unit type.
[0079] - APS (Adaptation Parameter Set) NAL unit: Type for the NAL unit containing the APS
[0080] - DPS (Decoding Parameter Set) NAL unit: Type for the NAL unit containing the DPS
[0081] - VPS (Video Parameter Set) NAL unit: Type for the NAL unit containing the VPS
[0082] - SPS (Sequence Parameter Set) NAL unit: Type for the NAL unit containing the SPS
[0083] - PPS(Picture Parameter Set) NAL unit: Type for the NAL unit containing the PPS
[0084] - PH (Picture header) NAL unit: Type for NAL unit containing PH
[0085] The above-described NAL unit types have syntax information for the NAL unit type, and said syntax information can be stored in the NAL unit header and signaled. For example, said syntax information may be nal_unit_type, and NAL unit types may be specified by the nal_unit_type value.
[0086] Meanwhile, as described above, the encoding device can perform various encoding methods such as exponential Golomb, CAVLC (context-adaptive variable length coding), CABAC (context-adaptive binary arithmetic coding), etc. Additionally, the decoding device can decode information within the bitstream based on coding methods such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients regarding residuals.
[0087] For example, the coding methods described above can be performed as described below.
[0088] FIG. 5 illustrates context-adaptive binary arithmetic coding (CABAC) for encoding syntax elements. For example, in the CABAC encoding process, if the input signal is a syntax element that is not a binary value, the encoding device can convert the input signal into a binary value by binarizing the value of the input signal. Additionally, if the input signal is already a binary value (i.e., if the value of the input signal is a binary value), binarization is not performed and can be bypassed. Here, each binary digit 0 or 1 constituting the binary value can be referred to as a bin. For example, if the binary string after binarization is 110, each of 1, 1, and 0 is referred to as a bin. The bin(s) for a single syntax element can represent the value of the syntax element.
[0089] Subsequently, the binarized bins of the above syntax elements 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 reflecting probability values to the corresponding bin and can encode the corresponding bin based on the assigned context model. After performing encoding for each bin, the regular encoding engine of the encoding device can update the context model for the corresponding bin. A bin encoded as described above can be referred to as a context-coded bin.
[0090] Meanwhile, when the binarized bins of the above syntax elements are input to the bypass encoding engine, they may be coded as follows. For example, the bypass encoding engine of the encoding device omits the procedure for estimating the probability for the input bin and the procedure for updating the probability model applied to the bin after encoding. When bypass encoding is applied, the encoding device can encode the input bin by applying a uniform probability distribution instead of assigning a context model, thereby improving the encoding speed. A bin encoded as described above can be referred to as a bypass bin.
[0091] Entropy decoding can represent a process that performs the same process as the aforementioned entropy encoding in reverse order.
[0092] For example, when a syntax element is decoded based on a context model, the decoding device may receive a bin corresponding to the syntax element via a bitstream, determine a context model using the syntax element and decoding information of the target block or surrounding blocks, or information of the symbol / bin decoded in the previous step, and derive the value of the syntax element by predicting the occurrence probability of the received bin according to the determined context model and performing arithmetic decoding of the bin. Subsequently, the context model of the next bin to be decoded may be updated with the determined context model.
[0093] Additionally, for example, when a syntax element is bypass decoded, the decoding device may receive a bin corresponding to the syntax element through a bitstream and decode the input bin by applying a uniform probability distribution. In this case, the procedure for deriving the context model of the syntax element and the procedure for updating the context model applied to the bin after decoding may be omitted.
[0094] In addition, as described above, prediction is performed to increase compression efficiency during video coding. Through this, a predicted block containing predicted samples for the current block, which is the block to be coded, can be generated. Here, the predicted block includes predicted samples in the spatial domain (or pixel domain). The predicted block is derived identically by both the encoding device and the decoding device, and the encoding device can increase video coding efficiency by signaling information regarding the residual between the original block and the predicted block (residual information), rather than the original sample value of the original block itself, to the decoding device. The decoding device derives a residual block containing residual samples based on the residual information, can generate a restored block containing restored samples by combining the residual block and the predicted block, and can generate a restored picture containing the restored blocks.
[0095] The above residual information can be generated through transformation and quantization procedures. For example, an encoding device may derive a residual block between the original block and the predicted block, perform a transformation procedure on residual samples (residual sample array) included in the residual block to derive transformation coefficients, perform a quantization procedure on the transformation coefficients to derive quantized transformation coefficients, and signal the related residual information to a decoding device (via a bitstream). Here, the residual information may include information such as value information, position information, transformation technique, transformation kernel, and quantization parameters of the quantized transformation coefficients. The decoding device may perform an inverse quantization / inverse transformation procedure based on the residual information and derive residual samples (or residual blocks). The decoding device may generate a reconstructed picture based on the predicted block and the residual block. The encoding device can also derive a residual block by inversely quantizing / inversely transforming the quantized transform coefficients for reference to inter-predicting of the picture, and generate a restored picture based thereon.
[0096] Intra prediction may represent a prediction that generates prediction samples for the current block based on reference samples within the picture to which the current block belongs (hereinafter, the current picture). When intra prediction is applied to the current block, surrounding reference samples to be used for the intra prediction of the current block may be derived. The surrounding reference samples of the current block may include a sample adjacent to the left boundary of the current block of size nWxnH and a total of 2xnH samples adjacent to the bottom-left, a sample adjacent to the top boundary of the current block and a total of 2xnW samples adjacent to the top-right, and one sample adjacent to the top-left of the current block. Alternatively, the surrounding reference samples of the current block may include multiple columns of upper surrounding samples and multiple rows of left surrounding samples. Additionally, the surrounding reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nWxnH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.
[0097] However, some of the surrounding reference samples of the current block may not yet be decoded or may not be available. In this case, the decoder may construct the surrounding reference samples to be used for prediction by substituting the unavailable samples with available samples. Alternatively, the surrounding reference samples to be used for prediction may be constructed through the interpolation of available samples.
[0098] When neighboring reference samples are derived, (i) a prediction sample may be derived based on the average or interpolation of the neighboring reference samples of the current block, and (ii) the prediction sample may be derived based on a reference sample existing in a specific (prediction) direction with respect to the prediction sample among the neighboring reference samples of the current block. Case (i) may be called a non-directional mode or non-angular mode, and case (ii) may be called a directional mode or angular mode.
[0099] In addition, the prediction sample may be generated through interpolation between a first surrounding sample located in the prediction direction of the intra prediction mode of the current block and a second surrounding sample located in the opposite direction of the prediction direction, based on the prediction sample of the current block among the surrounding reference samples. The above-described case may be called Linear Interpolation Intra Prediction (LIP). Additionally, chroma prediction samples may be generated based on luminance samples using a linear model (LM). This case may be called LM mode or CCLM (chroma component LM) mode.
[0100] In addition, a provisional prediction sample of the current block may be derived based on filtered surrounding reference samples, and a prediction sample of the current block may be derived by performing a weighted sum of the provisional prediction sample and at least one reference sample derived according to the intra prediction mode among the existing surrounding reference samples, i.e., unfiltered surrounding reference samples. The above case may be called PDPC (Position dependent intra prediction).
[0101] In addition, intra-prediction coding can be performed by selecting the reference sample line with the highest prediction accuracy among the surrounding multiple reference sample lines of the current block, deriving a prediction sample using a reference sample located in the prediction direction from that line, and signaling the used reference sample line to a decoding device. The above-described case may be referred to as multi-reference line intra-prediction or MRL-based intra-prediction.
[0102] In addition, the current block can be divided into vertical or horizontal subpartitions to perform intra prediction based on the same intra prediction mode, while utilizing surrounding reference samples derived at the subpartition level. That is, in this case, the intra prediction mode for the current block is applied identically to the subpartitions, but by deriving and utilizing surrounding reference samples at the subpartition level, intra prediction performance can be improved depending on the circumstances. This prediction method can be referred to as ISP (intra sub-partitions) based intra prediction.
[0103] The intra prediction methods described above may be referred to as intra prediction types to distinguish them from intra prediction modes. The aforementioned intra prediction types may be referred to by various terms, such as intra prediction techniques or additional intra prediction modes. For example, the aforementioned intra prediction type (or additional intra prediction mode, etc.) may include at least one of the aforementioned LIP, PDPC, MRL, and ISP. General intra prediction methods excluding specific intra prediction types such as LIP, PDPC, MRL, and ISP may be referred to as normal intra prediction types. Normal intra prediction types can be generally applied when specific intra prediction types such as those described above are not applied, and predictions can be performed based on the aforementioned intra prediction modes. Meanwhile, post-processing filtering may be performed on the derived prediction samples as necessary.
[0104] Specifically, the intra-prediction procedure may include an intra-prediction mode / type determination step, a peripheral reference sample derivation step, and an intra-prediction mode / type-based prediction sample derivation step. Additionally, a post-filtering step for the derived prediction samples may be performed as needed.
[0105] Figure 6 shows an example of an intra-prediction-based video / image encoding method.
[0106] Referring to FIG. 6, the encoding device performs intra prediction for the current block (S600). The encoding device derives an intra prediction mode / type for the current block and derives surrounding reference samples of the current block, and generates prediction samples within the current block based on the intra prediction mode / type and the surrounding reference samples. Here, the procedures for determining the intra prediction mode / type, deriving surrounding reference samples, and generating prediction samples may be performed simultaneously, or any one procedure may be performed before the other. 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 costs for the intra prediction modes / types and determine the optimal intra prediction mode / type for the current block.
[0107] Meanwhile, the encoding device may perform a predictive sample filtering procedure. Predictive sample filtering may be referred to as post-filtering. Some or all of the predicted samples may be filtered by the predictive sample filtering procedure. In some cases, the predictive sample filtering procedure may be omitted.
[0108] The encoding device generates residual samples for the current block based on (filtered) predicted samples (S610). The encoding device can compare the predicted samples with the original samples of the current block based on phase and derive the residual samples.
[0109] The encoding device can encode image information including information regarding the intra prediction (prediction information) and residual information regarding the residual samples (S620). The prediction information may include the intra prediction mode information and the intra prediction type information. The encoding device may output the encoded image information in the form of a bitstream. The output bitstream may be transmitted to a decoding device via a storage medium or a network.
[0110] The above residual information may include residual coding syntax described below. The encoding device may convert / quantize the above residual samples to derive quantized conversion coefficients. The above residual information may include information regarding the quantized conversion coefficients.
[0111] Meanwhile, as described above, the encoding device can generate a restored picture (including restored samples and a restored block). To this end, the encoding device can derive (modified) residual samples by performing inverse quantization / inverse transform processing on the quantized transform coefficients again. The reason for performing inverse quantization / inverse transform on the residual samples after transforming / quantizing them in this manner is to derive residual samples identical to those derived from the decoding device as described above. The encoding device can generate a restored block containing restored samples for the current block based on the predicted samples and the (modified) residual samples. A restored picture for the current picture can be generated based on the restored block. As described above, an in-loop filtering procedure, etc., may be further applied to the restored picture.
[0112] Figure 7 shows an example of an intra-prediction-based video / image encoding method.
[0113] The decoding device can perform an operation corresponding to the operation performed by the encoding device.
[0114] Predicted information and residual information can be obtained from the bitstream. Residual samples for the current block can be derived based on the residual information. Specifically, based on the quantized transform coefficients derived from the residual information, transform coefficients can be derived by performing inverse quantization, and residual samples for the current block can be derived by performing inverse transform on the transform coefficients.
[0115] Specifically, the decoding device can derive an intra prediction mode / type for the current block based on received prediction information (intra prediction mode / type information) (S700). The decoding device can derive 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. Prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.
[0116] The decoding device generates residual samples for the current block based on the received residual information (S730). The decoding device generates restoration samples for the current block based on the prediction samples and the residual samples, and can derive a restoration block including the restoration samples (S740). A restoration picture for the current picture can be generated based on the restoration block. As described above, an in-loop filtering procedure, etc., may be further applied to the restoration picture.
[0117] The above intra prediction mode information may include flag information (e.g., intra_luma_mpm_flag) indicating whether, for example, the most probable mode (MPM) is applied to the current block or whether a remaining mode is applied. If the MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) pointing to one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may consist of an MPM candidate list or an MPM list. Additionally, if the MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) pointing to one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). The decoding device may determine the intra prediction mode of the current block based on the above intra prediction mode information.
[0118] Additionally, the intra prediction type information may be implemented in various forms. For example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include 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, if so, which reference sample line is used; 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 splitting type of the subpartitions when the ISP is applied. Additionally, the intra prediction type information may include a MIP flag indicating whether a matrix-based intra prediction (MIP) is applied to the current block.
[0119] The above intra-prediction mode information and / or the above intra-prediction type information can be encoded / decoded through the coding methods described in this document. For example, the above intra-prediction mode information and / or the above intra-prediction type information can be encoded / decoded through entropy coding (e.g., CABAC, CAVLC).
[0120] Figure 8 illustrates an exemplary intra-prediction procedure.
[0121] Referring to FIG. 8, as described above, the intra prediction procedure may 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 may be performed in an encoding device and a decoding device as described above. In this document, the term "coding device" may include an encoding device and / or a decoding device.
[0122] Referring to FIG. 8, the coding device determines the intra prediction mode / type (S800).
[0123] The encoding device can determine an 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 may include intra prediction mode information indicating the intra prediction mode applied to the current block and / or intra prediction type information indicating 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 above intra prediction mode information may include flag information (e.g., intra_luma_mpm_flag) indicating whether, for example, the most probable mode (MPM) is applied to the current block or whether a remaining mode is applied. If the MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) pointing to one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may consist of an MPM candidate list or an MPM list. Additionally, if the MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) pointing to one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). The decoding device may determine the intra prediction mode of the current block based on the above intra prediction mode information.
[0125] Additionally, the intra prediction type information may be implemented in various forms. For example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include 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, if so, which reference sample line is used; 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 splitting type of the subpartitions when the ISP is applied. Additionally, the intra prediction type information may include a MIP flag indicating whether a matrix-based intra prediction (MIP) 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 mode of the surrounding blocks. For example, the coding device may select one of the MPM candidates within the list of most probable modes (MPM) derived based on the intra prediction modes of the surrounding blocks of the current block (e.g., left and / or upper surrounding blocks) and / or additional candidate modes based on a received MPM index, or select one of the remaining intra prediction modes not included in the said MPM candidates (and planner modes) based on MPM retainer information (remaining intra prediction mode information). The said MPM list may be configured to include or not include the planner mode as a candidate. For example, if the said MPM list includes the planner mode as a candidate, the said MPM list may have 6 candidates, and if the said MPM list does not include the planner mode as a candidate, the said MPM list may have 5 candidates. If the above MPM list does not include 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 planar mode may be signaled. For example, the MPM flag may be signaled first, and the MPM index and the not planar flag may be signaled when the value of the MPM flag is 1. Additionally, the MPM index may be signaled when the value of the not planar flag is 1. Here, the reason the above MPM list is configured not to include planar mode as a candidate is not that the planar mode is not an MPM, but rather that since planar mode is always considered as an MPM, the not planar flag is signaled first to check whether it is a planar mode.
[0127] For example, whether the intra prediction mode applied to the current block is among the MPM candidates (and planar mode) or is in remaining mode can be indicated based on the MPM flag (e.g., intra_luma_mpm_flag). A value of 1 for the MPM flag may indicate that the intra prediction mode for the current block is among the MPM candidates (and planar mode), and a value of 0 for the MPM flag may indicate that the intra prediction mode for the current block is not among the MPM candidates (and planar mode). A value of 0 for the not planar flag (e.g., intra_luma_not_planar_flag) may indicate that the intra prediction mode for the current block is planar mode, and a value of 1 for the not planar flag may indicate that the intra prediction mode for the current block is not planar mode. The above MPM index may be signaled in the form of the mpm_idx or intra_luma_mpm_idx syntax element, and the above remaining intra prediction mode information may be signaled in the form of the rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the above remaining intra prediction mode information may point to one of the remaining intra prediction modes among all intra prediction modes that are not included in the above MPM candidates (and planar modes) by indexing them in order of prediction mode number. The above intra prediction mode may be an intra prediction mode for the lumina component (sample). Hereinafter, the intra prediction mode information includes the above MPM flag (e.g., intra_luma_mpm_flag), the above not planar flag (e.g., intra_luma_not_planar_flag), and the above MPM index (e.g.It may include at least one of the remaining intra-prediction mode information (rem_intra_luma_pred_mode or intra_luma_mpm_remainder) (mpm_idx or intra_luma_mpm_idx). In this document, the MPM list may be referred to by various terms such as MPM candidate list, candModeList, etc.
[0128] When an MIP is applied to the current block, a separate MPM flag for the MIP (e.g., intra_mip_mpm_flag), MPM index (e.g., intra_mip_mpm_idx), and remaining intra prediction mode information (e.g., intra_mip_mpm_remainder) may be signaled, and the above not planar flag may not be signaled.
[0129] In other words, generally, when an image is partitioned into blocks, the current block to be coded and its neighboring blocks will have similar image characteristics. Therefore, the current block and neighboring blocks are highly likely to have identical or similar intra prediction modes. Consequently, the encoder can utilize the intra prediction mode of the neighboring blocks to encode the intra prediction mode of the current block.
[0130] The coding device can construct a list of most probable modes (MPM) for the current block. The MPM list may also be referred to as an MPM candidate list. Here, MPM may refer to a mode used to improve coding efficiency by considering the similarity between the current block and surrounding blocks during intra-predictive mode coding. As described above, the MPM list may be constructed to include planner modes, or it may be constructed to exclude planner modes. For example, if the MPM list includes planner modes, the number of candidates in the MPM list may be 6. And, if the MPM list does not include planner modes, the number of candidates in the MPM list may be 5.
[0131] The encoding device can perform predictions based on various intra prediction modes and determine the optimal intra prediction mode based on rate-distortion optimization (RDO) derived therefrom. In this case, the encoding device may determine the optimal intra prediction mode using only the MPM candidates and planner modes configured in the MPM list, or it may determine the optimal intra prediction mode using the remaining intra prediction modes in addition to the MPM candidates and planner modes configured in the MPM list. Specifically, for example, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP) rather than a normal intra prediction type, the encoding device may determine the optimal intra prediction mode by considering only the MPM candidates and planner modes 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 only from among the MPM candidates and planner modes, and in this case, the MPM flag may not be encoded / signaled. In this case, the decoding device can assume that the MPM flag is 1 without separately receiving the MPM flag signal.
[0132] Meanwhile, generally, if the intra prediction mode of the current block is not a planner mode and is one of the MPM candidates in the MPM list, the encoding device generates an MPM index (mpm idx) pointing to one of the MPM candidates. If the intra prediction mode of the current block is not even in the MPM list, MPM retainer information (remaining intra prediction mode information) is generated pointing to a mode that is the same as the intra prediction mode of the current block among the remaining intra prediction modes not included in the MPM list (and planner mode). The MPM retainer information may include, for example, an intra_luma_mpm_remainder syntax element.
[0133] The decoding device obtains intra prediction mode information from the bitstream. As described above, the intra prediction mode information may include at least one of an MPM flag, a not planner flag, an MPM index, and MPM retainer information (remaining intra prediction mode information). The decoding device may construct an MPM list. The MPM list is constructed identically to the MPM list constructed by the encoding device. That is, the MPM list may include the intra prediction mode of a surrounding block, or may further include specific intra prediction modes according to 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. For example, when the value of the MPM flag is 1, the decoding device may derive a planar mode as the intra prediction mode of the current block (based on not the planar flag) or derive a 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 term "MPM candidates" may refer only to the candidates included in the MPM list, or may include not only the candidates included in the MPM list but also the planar mode that can be applied when the value of the MPM flag is 1.
[0135] As another example, if the value of the MPM flag is 0, the decoding device may derive the intra prediction mode pointed to by the remaining intra prediction mode information (which may be called mpm remainder information) from among the remaining intra prediction modes not included in the MPM list and planner mode as the intra prediction mode of the current block. Meanwhile, as yet another example, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP, etc.), the decoding device may derive the candidate pointed to by the MPM flag within the planner mode or the MPM list as the intra prediction mode of the current block without parsing / decoding / verifying the MPM flag.
[0136] The coding device derives surrounding reference samples of the current block (S810). When intra prediction is applied to the current block, surrounding reference samples to be used for intra prediction of the current block may be derived. The surrounding reference samples of the current block may include a sample adjacent to the left boundary of the current block of size nWxnH and a total of 2xnH samples adjacent to the bottom-left, a sample adjacent to the top boundary of the current block and a total of 2xnW samples adjacent to the top-right, and one sample adjacent to the top-left of the current block. Alternatively, the surrounding reference samples of the current block may include multiple columns of upper surrounding samples and multiple rows of left surrounding samples. Additionally, the surrounding reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nWxnH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.
[0137] Meanwhile, when MRL is applied (i.e., when the value of the MRL index is greater than 0), the surrounding reference samples may be located on lines 1 or 2, rather than line 0 adjacent to the current block on the left / upper side, and in this case, the number of surrounding reference samples may increase. Meanwhile, when ISP is applied, the surrounding reference samples may be derived in subpartition 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 surrounding samples. The coding device can derive a reference sample according to the intra prediction mode of the current block among the surrounding reference samples of the current block, and can derive the prediction samples of the current block based on the reference sample.
[0139] Meanwhile, according to one embodiment, a BDPCM (block differential pulse coded modulation or Block-based Delta Pulse Code Modulation) technique may be used. BDPCM may also be named RDPCM (quantized Residual block-based Delta Pulse Code Modulation).
[0140] When predicting blocks by applying BDPCM, reconstructed samples may be utilized to predict the rows or columns of the block line by line. In this case, the reference samples used may be unfiltered samples. The BDPCM direction may indicate whether vertical or horizontal prediction is used. That is, when BDPCM is applied, the vertical or horizontal direction may be selected as the BDPCM direction, and prediction may be performed in said BDPCM direction. The prediction error may be quantized in the spatial domain, and the sample may be reconstructed by adding the inversely quantized prediction error to the prediction (i.e., the prediction sample). The prediction error may refer to a residual. As an alternative to this BDPCM, a quantized residual domain BDPCM may be proposed, and the prediction direction or signaling may be identical to the BDPCM applied in the spatial domain. In other words, through the quantized residual domain BDPCM, the quantization coefficients themselves can be stacked like DPCM (Delta Pulse Code Modulation), and then the residual can be restored through inverse quantization. Therefore, the quantized residual domain BDPCM can be used to mean that DPCM is applied at the residual coding stage. The quantized residual domain used below refers to a residual derived based on prediction that is quantized without transformation, and signifies a domain for quantized residual samples. For example, the quantized residual domain may include quantized residuals (or quantized residual coefficients) to which transformation skips are applied; that is, for residual samples, transformation is skipped but quantization is applied. Alternatively, for example, the quantized residual domain may include quantized transformation coefficients.
[0141] For an MXN-sized block, the residual derived using the predicted values obtained by performing horizontal intra-prediction (copying left peripheral sample lines line by line to the prediction block) or vertical intra-prediction (copying upper peripheral sample lines line by line to the prediction block) using unfiltered samples among the left or upper boundary samples (i.e., left peripheral samples or upper peripheral samples) is r (i,j) It can be assumed that (0 ≤ i ≤ M-1, 0 ≤ j ≤ N-1). Here, M can represent the row or height, and N can represent the column or width. And, the residual r (i,j) The quantized value of Q(r (i,j) It can be assumed that )( 0≤i≤M-1, 0≤j≤N-1). Here, residual refers to the difference 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 x N composed of This can be derived.
[0143] For example, when vertical BDPCM is signaled (i.e., when vertical BDPCM is applied), It can be derived as shown in the following formula.
[0144]
[0145] That is, for example, when vertical BDPCM is applied, the encoding device can perform vertical intra prediction based on upper peripheral samples, and the quantized residual samples for the current block can be derived as described in Equation 1 above. Referring to Equation 1 above, 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 that position and the quantized value for the position of the previous row of that position (i.e., the upper peripheral position of that position).
[0146] In addition, if applied similarly to horizontal prediction (i.e., when horizontal BDPCM is applied), the residual quantized samples can be derived as follows:
[0147]
[0148] That is, for example, when horizontal BDPCM is applied, the encoding device can perform horizontal intra prediction based on left peripheral samples, and the quantized residual samples for the current block can be derived as shown in Equation 2 above. Referring to Equation 2 above, the quantized residual samples of columns excluding the first column of the current block can be derived as the difference between the quantized value for that position and the quantized value for the position of the previous column of that position (i.e., the left peripheral position of that position).
[0149] The above quantized residual sample ( ) can be transmitted to a decoding device.
[0150] In the decoding device, Q(r (i,j) The above operation can be performed in reverse to derive )(0≤i≤M-1,0≤j≤N-1).
[0151] The following formula can be applied to vertical prediction.
[0152]
[0153] In addition, the following formula can be applied to horizontal prediction.
[0154]
[0155] Inversely quantized quantized retention ( ) is combined with intra-block prediction values to derive restored sample values.
[0156] The main advantage of this technique is that inverse BDPCM can be performed simply by adding predictors during or after the parsing of coefficients.
[0157] As described above, BDPCM can be applied to a quantized residual domain, which may contain quantized residuals (or quantized residual coefficients), and in this case, a transform skip may be applied to the residuals. That is, when BDPCM is applied, the transform may be skipped and quantization applied to the residual samples. Alternatively, the quantized residual domain may contain quantized transform coefficients. A flag regarding the applicability of BDPCM may be signaled at the sequence level (SPS), and such a flag may be signaled only when the SPS signals that the transform skip mode is available. The above flag may be referred to as the BDPCM availability flag or the SPS BDPCM availability flag.
[0158] When applying BDPCM, intra prediction can be performed on the entire block by sample copies along a prediction direction similar to the intra prediction direction (e.g., vertical prediction or horizontal prediction). The residual, which is the difference between the original and the prediction block, is quantized with the transformation skipped, 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) is obtained. ) can be coded.
[0159] If BDPCM is applicable, and the CU size is less than or equal to MaxTsSize (maximum transform skip block size) for the luminance sample, and the CU is coded as an intra prediction, flag information may be transmitted at the CU level. This flag information may be referred to as the BDPCM flag. Here, MaxTsSize may refer to the maximum block size for which the transform skip mode is allowed. This flag information may indicate whether conventional intra coding is applied or whether BDPCM is applied. If BDPCM is applied, a BDPCM prediction direction flag may be transmitted, indicating whether the prediction direction is horizontal or vertical. This BDPCM prediction direction flag may also be referred to as the BDPCM direction flag. Subsequently, the block may be predicted through a conventional horizontal or vertical intra prediction process using an unfiltered reference sample. Additionally, the residuals are quantized, and the difference value between each quantized residual and its predictor, for example, the already quantized residuals at a neighboring position in the horizontal or vertical direction according to the BDPCM prediction direction, can be coded.
[0160] Meanwhile, the aforementioned BDPCM can be described in a standard document format as described below.
[0161] For example, the syntax element for the BDPCM available flag described above and the semantics for the syntax element can be represented as shown in the following tables.
[0162]
[0163]
[0164] Table 1 shows sps_bdpcm_enabled_flag and sps_bdpcm_chroma_enabled_flag signaled in the SPS (Sequence parameter set). If the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that "intra_bdpcm_luma_flag" is present in the coding chroma unit where intra prediction is performed, and if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it may indicate that "intra_bdpcm_chroma_flag" is present in the coding chroma unit where intra prediction is performed, which is a flag information indicating whether BDPCM is applied in the coding chroma unit where intra prediction is performed. The above syntax elements sps_bdpcm_enabled_flag and sps_bdpcm_chroma_enabled_flag may be syntax elements for the BDPCM enable flags described above. Additionally, if the above syntax element "sps_bdpcm_enabled_flag" does not exist, its value may be considered 0. Additionally, if the above syntax element "sps_bdpcm_chroma_enabled_flag" does not exist, its value may be considered 0.
[0165] Additionally, for example, the syntax elements for the aforementioned BDPCM flag and BDPCM direction flag may be signaled separately for the luminance component and the chroma component. For example, the coding unit syntax including the syntax elements and the semantics for the syntax elements can be represented as shown in the following tables.
[0166]
[0167]
[0168]
[0169]
[0170]
[0171]
[0172]
[0173]
[0174]
[0175] As described above, the syntax element intra_bdpcm_luma_flag in Table 3 may indicate whether BDPCM is applied to the current luminance block, and intra_bdpcm_chroma_flag may indicate whether BDPCM is applied to the current luminance 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 corresponding 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, which indicate the prediction direction. If intra_bdpcm_luma_flag or intra_bdpcm_chroma_flag does not exist, this value may be considered as 0.
[0176] In addition, for example, if the value of intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag indicating the prediction direction is 0, it may indicate that the BDPCM prediction direction is horizontal, and if the value of intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag is 1, it may indicate that the BDPCM prediction direction is vertical.
[0177] Meanwhile, the above intra_bdpcm_luma_flag may represent a syntax element of a BDPCM lumina flag for the current lumina block, the above intra_bdpcm_chroma_flag may represent a syntax element of a BDPCM chroma flag for the current chroma block, the above intra_bdpcm_luma_dir_flag may represent a syntax element of a BDPCM lumina direction flag for the current lumina block, and the above intra_bdpcm_chroma_dir_flag may represent a syntax element of a BDPCM chroma direction flag for the current chroma block.
[0178] In addition, an example of the inverse quantization process when BDPCM is applied can be shown in the following table.
[0179]
[0180]
[0181]
[0182] Alternatively, when BDPCM is applied, an example of the inverse quantization process may be shown in the following table.
[0183]
[0184]
[0185]
[0186]
[0187] Referring to Table 5 or Table 6, if the value of bdpcm_flag is 1, the inversely 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 and y is the vertical coordinate increasing from top to bottom, and the position within the 2D block can be denoted as (x, y). Additionally, the position within the 2D block represents the (x, y) position when the top-left position of the corresponding block is set to (0, 0).
[0188] For example, if the value of bdpcm_dir_flag is 0, that is, if 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 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 as 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 column other than the first column where x is not 0 can be derived as the sum of dz[x-1][y] of the sample to the left and dz[x][y] of the sample. Here, the dz[x][y] of the sample that is added to dz[x-1][y] can be derived based on the residual information of the signaling sample.
[0189] In addition, 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 (the value of bdpcm_dir_flag is 1), the variable dz[x][y] of a sample located in the first row where y is 0 can be derived as TransCoeffLevel[xTbY][yTbY][cIdx][x][y] derived based on the residual information of said sample, and the variable dz[x][y] of a sample located in a row other than the first row where y is not 0 can be derived as the sum of dz[x][y-1] of the upper surrounding sample and dz[x][y] for said sample. Here, dz[x][y] for the sample that is added to dz[x][y-1] can be derived based on residual information for the signaling sample.
[0190] As described above, the residual at a specific location can be derived based on the sum of the residual at the previous location (i.e., left or upper) in the horizontal or vertical direction and the value received as residual information for the specific location. This is because, when BDPCM is applied, the difference between the residual sample value at a specific location (x, y) and the residual sample value at the previous location (i.e., (x-1, y) or (x, y-1)) in the horizontal or vertical direction is signaled as residual information.
[0191] As described above, information regarding BPDCM can be signaled, but this document proposes other embodiments for signaling information regarding BDPCM. For example, according to existing video standards, only BDPCM for the luminance block is performed in YUV 420, and BDPCM for both the luminance block and the chroma block can be performed in YUV 444. Therefore, as shown in Table 1 above, sps_bdpcm_enabled_flag, a syntax element of the BDPCM enable flag for the luminance block, and sps_bdpcm_chroma_enabled_flag, a syntax element of the BDPCM enable flag for the chroma block, can be transmitted in the SPS (sequence parameter set) syntax. In particular, the BDPCM availability flag for the chroma block can be transmitted only when BDPCM is available for the luminance block and the chroma format of the image is YUV444 (i.e., when chroma_format_idc = 3).
[0192] Unlike the above, this document proposes an embodiment that controls the availability of BDPCM for both the luminance block and the chroma block based on a single flag. For example, in the proposed embodiment, as shown in Table 7 below, only one syntax element sps_bdpcm_enabled_flag regarding BDPCM availability can be transmitted in the SPS syntax, and through this, the availability or non-availability of BDPCM for both the luminance block and the chroma block can be determined. According to this embodiment, the availability of BDPCM for the luminance block and the chroma block within the image can be determined with a single syntax element, thereby reducing the bit amount for BDPCM and improving overall coding efficiency.
[0193]
[0194]
[0195] For example, referring to Table 8, if sps_bdpcm_enabled_flag is 1, it means that BDPCM is available for both the luminance block and the chroma block, and if sps_bdpcm_enabled_flag is 0, it means that BDPCM is not available for both the luminance block and the chroma block. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that BDPCM is available for the coding unit (including the luminance component and the chroma component) where intra prediction is performed, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that BDPCM is not available for the coding unit where intra prediction is performed. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it may indicate 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 may indicate 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 also be denoted as intra_bdpcm_flag.
[0196] Meanwhile, the flag regarding the availability of the above BDPCM may be transmitted not only in the SPS syntax shown in the example, 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.
[0197] In addition, in the proposed embodiment, the semantics for the syntax element sps_bdpcm_enabled_flag can be changed as shown in Table 8.
[0198] In addition, since the availability of BDPCM for the luminance block and the chroma block is controlled simultaneously by the syntax element sps_bdpcm_enabled_flag in this embodiment, the coding unit syntax according to this embodiment may be as shown in the following table.
[0199]
[0200]
[0201]
[0202]
[0203]
[0204]
[0205]
[0206]
[0207] In addition, this document proposes other embodiments for signaling information regarding BDPCM. For example, this document proposes an embodiment for controlling the availability of BDPCM for both the luminance block and the chroma block, regardless of the chroma format of the image. According to this embodiment, information regarding the availability of BDPCM for the luminance block and information regarding the availability of BDPCM for the chroma block can be transmitted, respectively, regardless of the chroma format of the image. According to this embodiment, a BDPCM chroma availability flag indicating the availability of BDPCM for the chroma block within the image can be signaled regardless of the chroma format of the image, thereby reducing the complexity for BDPCM and improving overall coding efficiency.
[0208] For example, in the proposed embodiment, when the transform skip mode is available as shown in Table 10 below (i.e., when sps_transform_skip_enabled_flag is 1), the syntax element sps_bdpcm_enabled_flag regarding whether BDPCM is available for the luminance block and the syntax element sps_bdpcm_chroma_enabled_flag regarding whether BDPCM is available for the chroma block in the SPS syntax may be transmitted.
[0209]
[0210]
[0211] For example, if sps_bdpcm_enabled_flag is 1, it means that BDPCM is available for the luminance block, and if sps_bdpcm_enabled_flag is 0, it means that BDPCM is not available for the luminance block. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that BDPCM is available for the luminance coding unit where intra prediction is performed, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that BDPCM is not available for the luminance coding unit where intra prediction is performed. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that intra_bdpcm_luma_flag exists in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that intra_bdpcm_luma_flag does not exist in the coding unit.
[0212] In addition, for example, if sps_bdpcm_chroma_enabled_flag is 1, it means that BDPCM is available for the chroma block, and if sps_bdpcm_chroma_enabled_flag is 0, it means that BDPCM is not available for the chroma block. That is, for example, if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it may indicate that BDPCM is available for the chroma coding unit where intra prediction is performed, and if the syntax element sps_bdpcm_chroma_enabled_flag is 0, it may indicate that BDPCM is not available for the chroma coding unit where intra prediction is performed. That is, for example, if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it may indicate that intra_bdpcm_chroma_flag exists in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that intra_bdpcm_chroma_flag does not exist in the coding unit.
[0213] Meanwhile, the flags regarding the availability of the above BDPCM may be transmitted not only in the SPS syntax shown in the 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.
[0214] In addition, 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] In addition, this document proposes another embodiment for signaling information regarding BDPCM. For example, this document proposes an embodiment for controlling the availability of BDPCM for both the luminance block and the chroma block, regardless of the chroma format of the image. According to this embodiment, information regarding the availability of BDPCM for the luminance block and information regarding the availability of BDPCM for the chroma block are transmitted respectively, regardless of the chroma format of the image, provided that the information regarding the availability of BDPCM for the chroma block is transmitted only when BDPCM is available for the luminance block. According to this embodiment, BDPCM availability flags indicating the availability of BDPCM for the luminance block and the chroma block within the image can be signaled regardless of the chroma format of the image, thereby reducing the complexity for BDPCM and improving overall coding efficiency.
[0216] For example, in the proposed embodiment, as shown in Table 12 below, when the transform skip mode is available (i.e., when sps_transform_skip_enabled_flag is 1), a syntax element sps_bdpcm_enabled_flag regarding whether BDPCM is available for the luminance block in the SPS syntax may be transmitted, and when BDPCM is available for the luminance block (i.e., when sps_bdpcm_enabled_flag is 1), a syntax element sps_bdpcm_chroma_enabled_flag regarding whether BDPCM is available for the chroma block may be transmitted.
[0217]
[0218]
[0219] For example, if sps_bdpcm_enabled_flag is 1, it means that BDPCM is available for the luminance block, and if sps_bdpcm_enabled_flag is 0, it means that BDPCM is not available for the luminance block. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that BDPCM is available for the luminance coding unit where intra prediction is performed, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that BDPCM is not available for the luminance coding unit where intra prediction is performed. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that intra_bdpcm_luma_flag exists in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that intra_bdpcm_luma_flag does not exist in the coding unit.
[0220] In addition, for example, if sps_bdpcm_chroma_enabled_flag is 1, it means that BDPCM is available for the chroma block, and if sps_bdpcm_chroma_enabled_flag is 0, it means that BDPCM is not available for the chroma block. That is, for example, if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it may indicate that BDPCM is available for the chroma coding unit where intra prediction is performed, and if the syntax element sps_bdpcm_chroma_enabled_flag is 0, it may indicate that BDPCM is not available for the chroma coding unit where intra prediction is performed. That is, for example, if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it may indicate that intra_bdpcm_chroma_flag exists in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that intra_bdpcm_chroma_flag does not exist in the coding unit.
[0221] Meanwhile, the flags regarding the availability of the above BDPCM may be transmitted not only in the SPS syntax shown in the 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] In addition, this document proposes other embodiments for signaling information regarding BDPCM. For example, this document proposes an embodiment that performs the process described below in addition to one of the embodiments described above. For example, according to this embodiment, BDPCM is available for both the lumina block and the chroma block in SPS syntax, VPS syntax, DPS syntax, picture header syntax, or slice header syntax, and if specific conditions are satisfied for the BDPCM to be performed, 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 as infra_bdpcm_luma_flag and the value of intra_bdpcm_chroma_dir_flag can be derived as intra_bdpcm_luma_dir_flag. Here, for example, the above specific condition may be when the tree type is a dual tree and / or when both the width and height of the current block are smaller than the maximum size of the defined transformation skip block (i.e., when cbWidth <= MaxTsSize && cbHeight <= MaxTsSize), etc.
[0223] Alternatively, for example, according to the present embodiment, if specific conditions are satisfied under which the BDPCM can be performed, the intra_bdpcm_chroma_flag is not transmitted, and the value of the intra_bdpcm_chroma_flag can be derived as the value of the intra_bdpcm_luma_flag. This means that when the lumina block of the current block is coded in BDPCM mode, the chroma block of the current block is coded in BDPCM mode without the transmission of additional syntax elements (i.e., intra_bdpcm_chroma_flag). However, in the above-described embodiment, the intra_bdpcm_chroma_dir_flag may have a different value independently of the intra_bdpcm_luma_dir_flag. That is, in the above-described embodiment, the intra_bdpcm_chroma_dir_flag for the current block may be transmitted.
[0224] As another example, if the above BDPCM satisfies specific conditions for execution, and both intra_bdpcm_luma_flag and intdra_bdpcm_chroma_flag for the current block are 1, then intra_bdpcm_chroma_dir_flag is not transmitted, and the value of intra_bdpcm_chroma_dir_flag can be derived as the value of intra_bdpcm_luma_dir_flag.
[0225] In addition, this document proposes other embodiments for signaling information about BDPCM. For example, this document proposes an embodiment that performs the process described below in addition to one of the embodiments described above.
[0226] For example, according to the present embodiment, BDPCM for a chroma block 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.), and when the tree type is a single tree, intra_bdpcm_chroma_flag and intra_bdpcm_chroma_dir_flag for each chroma block (Cb chroma block and Cr chroma block) are not transmitted separately in CU syntax or TU syntax, and intra_bdpcm_chroma_flag and intra_bdpcm_chroma_dir_flag for the Cb chroma block and Cr chroma block can be transmitted. That is, if the transmitted value of intra_bdpcm_chroma_flag is 1, it means that both the Cb chroma block and the Cr chroma block of the current block are coded in BDPCM mode, and if the transmitted value of intra_bdpcm_chroma_flag is 0, it means that both the Cb chroma block and the Cr chroma block of the current block are not coded in BDPCM mode. Additionally, if the value of intra_bdpcm_chroma_dir_flag is 0, it means that the BDPCM prediction direction for the Cb chroma block and the Cr chroma block of the current block is horizontal, and if the value of intra_bdpcm_chroma_dir_flag is 1, it means that the BDPCM prediction direction for the Cb chroma block and the Cr chroma block of the current block is vertical.
[0227] Alternatively, for example, according to the present 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.), and when the tree type is a single tree, intra_bdpcm_chroma_flag for each chroma block (Cb chroma block and Cr chroma block) is not transmitted separately in CU syntax or TU syntax, and intra_bdpcm_chroma_flag for Cb chroma block and Cr chroma block can be transmitted. That is, if the transmitted value of intra_bdpcm_chroma_flag is 1, it means that both the Cb chroma block and the Cr chroma block of the current block are coded in BDPCM mode, and if the transmitted value of intra_bdpcm_chroma_flag is 0, it means that both the Cb chroma block and the Cr chroma block of the current block are not coded in BDPCM mode. Here, intra_bdpcm_chroma_dir_flag for each chroma block may be transmitted, and intra_bdpcm_chroma_dir_flag for each chroma block may have different values.
[0228] For example, according to the present embodiment, BDPCM for chroma blocks is available based on intra_bdpcm_enabled_flag or intra_bdpcm_chroma_enabled_flag in high-level syntax (e.g., SPS syntax, VPS syntax, DPS syntax, picture header syntax, or slice header syntax, etc.), and when the tree type is a single tree, intra_bdpcm_chroma_flag for each of the chroma blocks (Cb chroma block and Cr chroma block) is transmitted in CU syntax or TU syntax, and intra_bdpcm_chroma_dir_flag for the Cb chroma block and Cr chroma block can 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 color difference block that is coded earlier among the two chroma blocks can be derived as the intra_bdpcm_chroma_dir_flag for the chroma block that is coded later. For example, if the value of the intra_bdpcm_chroma_dir_flag is 0, it means that the BDPCM prediction direction for the Cb chroma block and Cr chroma block of the current block is horizontal, and if the value of the intra_bdpcm_chroma_dir_flag is 1, it means that the BDPCM prediction direction for the Cb chroma block and Cr chroma block of the current block is vertical.
[0230] FIG. 9 schematically illustrates a video encoding method by an encoding device according to the present 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 of FIG. 9 can be 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. In addition, although not illustrated, the process of deriving residual samples can be performed by the residual processing unit of the encoding device, and the process of generating restored samples and restored pictures based on residual samples and predicted samples can be performed by the addition unit of the encoding device.
[0231] The encoding device determines whether Block-based Delta Pulse Code Modulation (BDPCM) is available for the chroma block and the luminance block (S900). For example, the encoding device can determine whether the BDPCM is available for the chroma block and the luminance block within the image.
[0232] The encoding device generates a BDPCM availability flag regarding whether the BDPCM is available for the chroma block and the luminance block based on the result of the above determination (S910). The encoding device may generate a BDPCM availability flag regarding whether the BDPCM is available for the chroma block and the luminance block based on the result of the above determination. For example, the image information may include a BDPCM availability flag regarding whether Block-based Delta Pulse Code Modulation (BDPCM) is available for the chroma block and the luminance block. For example, the BDPCM availability flag may indicate whether Block-based Delta Pulse Code Modulation (BDPCM) is available for the chroma block and the luminance block. For example, if the value of the BDPCM availability flag is 1, the BDPCM availability flag may indicate that Block-based Delta Pulse Code Modulation (BDPCM) is available for the chroma block and the luminance block, and if the value of the BDPCM availability flag is 0, the BDPCM availability flag may indicate that Block-based Delta Pulse Code Modulation (BDPCM) is not available for the chroma block and the luminance block. That is, for example, the BDPCM availability flag may indicate whether a BDPCM flag exists for the chroma block and the luminance block. For example, if the value of the BDPCM availability flag is 1, the BDPCM availability flag may indicate that a BDPCM flag exists for the chroma block and the luminance block, and if the value of the BDPCM availability flag is 0, the BDPCM availability flag may indicate that a BDPCM flag does not exist for the chroma block and the luminance block.Additionally, for example, the chroma block may include a block of chroma Cb components (chroma Cb block) and / or a block of chroma Cr components (chroma Cr block).
[0233] Additionally, for example, the BDPCM availability flag may be signaled regardless of the chroma format of the image. For example, the BDPCM availability flag may be signaled when the chroma format of the image is YUV 444, YUV 420, or YUV 422. That is, for example, the BDPCM availability flag may be signaled even when the chroma format of the image is YUV 444.
[0234] Additionally, for example, the BDPCM enabled flag may be signaled with high-level syntax. For example, the BDPCM enabled flag may be signaled with SPS (Sequence Parameter Set) syntax. Or, for example, the BDPCM enabled flag may be signaled with 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 enabled flag may be the sps_bdpcm_enabled_flag described above.
[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 applied 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 luminance block based on the prediction direction in which BDPCM is performed. For example, the prediction direction may be a vertical or horizontal direction, and prediction samples for the current luminance block may be generated according to the intra prediction mode accordingly.
[0237] For example, if the prediction direction for the current luminance block is derived as horizontal, the encoding device can derive prediction samples of the current luminance block based on a horizontal intra prediction mode. In other words, for example, if the prediction direction for the current luminance block is derived as horizontal, the encoding device can derive prediction samples of the current luminance block by performing intra prediction based on samples surrounding the left side of the current luminance block. For example, if the prediction direction for the current luminance block is derived as horizontal, the encoding device can derive the sample value of a sample surrounding the left side of the same row as the prediction sample as the sample value of the prediction sample.
[0238] Additionally, for example, if the prediction direction for the current luminance block is derived as a vertical direction, the encoding device can derive prediction samples of the current luminance block based on a vertical intra prediction mode. In other words, for example, if the prediction direction for the current luminance block is derived as a vertical direction, the encoding device can derive prediction samples of the current luminance block based on upper surrounding samples of the current luminance block. For example, if the prediction direction for the current luminance block is derived as a vertical direction, the encoding device can derive the sample value of an upper surrounding sample in the same column as the prediction sample as the sample value of the prediction sample.
[0239] The encoding device generates prediction samples for current chroma blocks based on the BDPCM (S930). For example, the encoding device can determine whether BDPCM is applied to current chroma blocks and can determine the direction in which the BDPCM is performed.
[0240] The encoding device can derive prediction samples by performing intra prediction on current chroma blocks based on the prediction direction in which BDPCM is performed. For example, the prediction direction may be a vertical or horizontal direction, and prediction samples for current chroma blocks may be generated according to the intra prediction mode accordingly.
[0241] For example, if the prediction direction for the current chroma blocks is derived as horizontal, the encoding device can derive prediction samples of the current chroma blocks based on a horizontal intra prediction mode. In other words, for example, if the prediction direction for the current chroma blocks is derived as horizontal, the encoding device can derive prediction samples of the current chroma blocks by performing intra prediction based on samples surrounding the left side of the current chroma blocks. For example, if the prediction direction for the current chroma blocks is derived as horizontal, the encoding device can derive the sample value of a sample surrounding the left side of the same row as the prediction sample as the sample value of the prediction sample.
[0242] Additionally, for example, if the prediction direction for the current chroma blocks is derived as a vertical direction, the encoding device can derive prediction samples of the current chroma blocks based on a vertical intra-prediction mode. In other words, for example, if the prediction direction for the current chroma blocks is derived as a vertical direction, the encoding device can derive prediction samples of the current chroma blocks based on upper surrounding samples of the current chroma blocks. For example, if the prediction direction for the current chroma blocks is derived as a vertical direction, the encoding device can derive the sample value of an upper surrounding 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 lumina block and BDPCM-related information for the current chroma blocks (S940).
[0244] For example, when the value of the BDPCM availability flag is 1 (i.e., when it is determined that BDPCM is available for the chroma block and the luminance block), the encoding device may generate BDPCM-related information for the current luminance block and BDPCM-related information for the current chroma blocks. The image information may include BDPCM-related information for the current luminance block and BDPCM-related information for the current chroma blocks.
[0245] For example, BDPCM-related information regarding the current luma block may 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 applied to the current luma block and can generate a BDPCM luma flag regarding whether BDPCM (Block-based Delta Pulse Code Modulation) is applied to the current luma block.
[0247] For example, the BDPCM Luma Flag may indicate whether the BDPCM is applied to the current Luma Block and whether a BDPCM Luma Direction Flag exists for the current Luma Block. For example, if the value of the BDPCM Luma Flag is 1, the BDPCM Luma Flag may indicate that the BDPCM is applied to the current Luma Block and that a BDPCM Luma Direction Flag exists for the current Luma Block; and if the value of the BDPCM Luma Flag is 0, the BDPCM Luma Flag may indicate that the BDPCM is not applied to the current Luma Block and that a BDPCM Luma Direction Flag does not exist 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. Additionally, for example, the BDPCM Luma Flag may be signaled in units of CU (coding unit).
[0248] Additionally, for example, the encoding device can determine whether BDPCM is applied to the current luma block and determine the direction in which the BDPCM is performed. For example, if the BDPCM luma flag indicates that the BDPCM is 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 may indicate a vertical or horizontal direction as the prediction direction for the current luma block. For example, if the value of the BDPCM luma direction flag is 0, the BDPCM luma direction flag may indicate that the prediction direction for the current luma block is horizontal, and if the value of the BDPCM luma direction flag is 1, the BDPCM luma direction flag may indicate that the prediction direction for the current luma block is vertical. For example, the syntax element of the above BDPCM luma direction flag may be the bdpcm_dir_flag or intra_bdpcm_luma_dir_flag described above. Additionally, for example, the above BDPCM luma direction flag may be signaled in units of CU (coding unit).
[0249] For example, BDPCM-related information for the current chroma blocks may include BDPCM chroma flags and / or BDPCM chroma direction flags for the current chroma blocks. Additionally, for example, the BDPCM-related information for the current chroma blocks (i.e., all of the current chroma blocks) may be signaled when the image tree type is a single tree and the value of the BDPCM availability flag is 1. That is, for example, the BDPCM-related information for the current chroma blocks (i.e., all of the current chroma blocks) may be signaled when the image tree type is a single tree and BDPCM is available for the current chroma blocks. Meanwhile, the tree type of the current block may be classified as a single tree or a dual tree depending on whether the current chroma blocks corresponding to the current chroma block have individual partition structures. For example, if the current chroma blocks have the same partitioning structure as the current luma blocks, it can be represented as a single tree, and if the current chroma blocks have a different partitioning structure from the current luma blocks, it can be represented as a dual tree.
[0250] For example, the encoding device can determine whether BDPCM is applied to current chroma blocks and can generate a BDPCM chroma flag regarding whether Block-based Delta Pulse Code Modulation (BDPCM) is applied to the current chroma blocks. For example, the BDPCM chroma flag may indicate whether the BDPCM is applied to the current chroma blocks and whether a BDPCM chroma direction flag exists for the current chroma blocks. For example, if the value of the BDPCM chroma flag is 1, the BDPCM chroma flag may indicate that the BDPCM is applied to the current chroma blocks and that a BDPCM chroma direction flag exists for the current chroma blocks, and if the value of the BDPCM chroma flag is 0, the BDPCM chroma flag may indicate that the BDPCM is not applied to the current chroma blocks and that a BDPCM chroma direction flag does not exist for the current chroma blocks. That is, for example, if the value of the BDPCM chroma flag is 1, the BDPCM chroma flag may indicate that the BDPCM is applied to all of the current chroma blocks and that a BDPCM chroma direction flag exists for all of the current chroma blocks, and if the value of the BDPCM chroma flag is 0, the BDPCM chroma flag may indicate that the BDPCM is not applied to all of the current chroma blocks and that a BDPCM chroma direction flag does not exist for all of the current chroma blocks. Here, for example, the current chroma blocks may 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 bdpcm_flag or intra_bdpcm_chroma_flag described above.In addition, for example, the above BDPCM chroma flag can be signaled in units of CU (coding unit).
[0251] Additionally, for example, the encoding device can determine whether BDPCM is applied to the current chroma blocks and determine the direction in which the BDPCM is performed. For example, if the BDPCM chroma flag indicates that the BDPCM is applied to the current chroma blocks, the encoding device can generate and encode the BDPCM chroma direction flag. For example, the BDPCM chroma direction flag may indicate a vertical or horizontal direction as the prediction direction for the current chroma blocks. For example, if the value of the BDPCM chroma direction flag is 0, the BDPCM chroma direction flag may indicate that the prediction direction for the current chroma blocks is horizontal, and if the value of the BDPCM chroma direction flag is 1, the BDPCM chroma direction flag may indicate that the prediction direction for the current chroma blocks is vertical. For example, the syntax element of the above BDPCM chroma direction flag may be the bdpcm_dir_flag or intra_bdpcm_chroma_dir_flag described above. Additionally, for example, the above BDPCM chroma direction flag may be signaled in units of CU (coding unit).
[0252] Meanwhile, for example, the encoding device can derive residual samples of the current luminance block based on predicted samples of the current luminance block. For example, the encoding device can derive the residual samples by subtracting the original sample and the predicted sample for the current luminance block. Additionally, for example, the encoding device can derive residual samples of the current chroma blocks based on predicted samples of the current chroma blocks. For example, the encoding device can derive residual samples by subtracting the original sample and the predicted sample for each of the current chroma blocks.
[0253] The encoding device encodes image information including the BDPCM availability flag, the BDPCM-related information regarding the current luminance block, and the BDPCM-related information regarding the current chroma blocks (S950). The encoding device may encode image information including the BDPCM availability flag, the BDPCM-related information regarding the current luminance block, and the BDPCM-related information regarding the current chroma blocks. For example, the BDPCM-related information regarding the current luminance block may include a BDPCM luminance flag regarding whether the BDPCM is applied to the current luminance block and / or a BDPCM luminance direction flag regarding the predicted direction of the current luminance block, and the BDPCM-related information regarding the current chroma blocks may include a BDPCM chroma flag regarding whether the BDPCM is applied to the current chroma blocks and / or a BDPCM chroma direction flag regarding the predicted direction of the current chroma blocks.
[0254] Meanwhile, for example, the image information may include residual information. For example, the encoding device may derive residual coefficients of the current luminance block or current chroma block based on residual samples of the current luminance block or current chroma block. For example, if the BDPCM is applied to the current luminance block or current chroma block, the encoding device may determine that no transformation is applied to the current luminance block or current chroma block. In this case, for example, the encoding device may derive residual coefficients by performing quantization on the residual samples of the current luminance block or current chroma block. Here, for example, the block to which no transformation is applied may be referred to as a transformation skip block. That is, for example, the current luminance block or current chroma block may be a transformation skip block.
[0255] Subsequently, for example, an encoding device can encode residual information for the residual coefficients. For example, the residual information may include residual information for the residual coefficients of the residual samples.
[0256] For example, the residual information may include syntax elements for residual samples of the current luminance block or current chroma block, and the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the residual sample to the left or upper surrounding residual sample of the target residual sample may be derived based on the syntax elements for the target residual sample. For example, if the prediction direction of the current luminance block or current chroma block is horizontal, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the residual sample to the left surrounding residual sample of the target residual sample may be derived based on the syntax elements for the target residual sample. That is, for example, if the prediction direction of the current luminance block or current chroma block is horizontal, the syntax elements for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the residual sample to the left of the target residual sample. Additionally, for example, if the prediction direction of the current luminance block or current chroma block is vertical, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the residual sample to the upper of the target residual sample may be derived based on the syntax elements for the target residual sample. That is, for example, if the prediction direction of the current luminance block or current chroma block is vertical, the syntax elements for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper surrounding residual sample of the target residual sample. Additionally, if the target residual sample is located in the first row or column of the current luminance block or current chroma block, the residual coefficient value of the target residual sample may be derived based on the syntax elements for the target residual sample.That is, if the target residual sample is located in the first row or column of the current luminance block or current chroma blocks, the syntax elements for the target residual sample may represent the residual coefficient value of the target residual sample.
[0257] Meanwhile, the bitstream containing the above-mentioned video information may be transmitted to a decoding device via a network or a (digital) storage medium. Here, the network may include a broadcasting 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 illustrates an encoding device that performs an image encoding method according to the present 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 of FIG. 10 can perform S900 and S920 to S930 of FIG. 9, and the entropy encoding unit of the encoding device can perform S910 and S940 to S950. Additionally, although not illustrated, the process of deriving residual samples can be performed by the residual processing unit of the encoding device, and the process of generating restored samples and restored pictures based on residual samples and predicted samples can be performed by the addition unit of the encoding device.
[0259] FIG. 11 schematically illustrates an image decoding method by a decoding device according to the present 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 of FIG. 11 can be performed by the entropy decoding unit of the decoding device, S1130 and S1160 of FIG. 11 can be performed by the prediction unit of the decoding device, and S1170 of FIG. 11 can be performed by the addition unit of the decoding device.
[0260] The decoding device acquires a BDPCM availability flag indicating whether Block-based Delta Pulse Code Modulation (BDPCM) is available for the chroma block and the luminance block (S1100). The decoding device may acquire a BDPCM availability flag indicating whether BDPCM is available for the chroma block and the luminance block. The decoding device may acquire image information through a bitstream. For example, the image information may include a BDPCM availability flag indicating whether Block-based Delta Pulse Code Modulation (BDPCM) is available for the chroma block and the luminance block. For example, the BDPCM availability flag may indicate whether Block-based Delta Pulse Code Modulation (BDPCM) is available for the chroma block and the luminance block. For example, if the value of the BDPCM availability flag is 1, the BDPCM availability flag may indicate that Block-based Delta Pulse Code Modulation (BDPCM) is available for the chroma block and the luminance block, and if the value of the BDPCM availability flag is 0, the BDPCM availability flag may indicate that Block-based Delta Pulse Code Modulation (BDPCM) is not available for the chroma block and the luminance block. That is, for example, the BDPCM availability flag may indicate whether a BDPCM flag exists for the chroma block and the luminance block. For example, if the value of the BDPCM availability flag is 1, the BDPCM availability flag may indicate that a BDPCM flag exists for the chroma block and the luminance block, and if the value of the BDPCM availability flag is 0, the BDPCM availability flag may indicate that a BDPCM flag does not exist for the chroma block and the luminance block.Additionally, for example, the chroma block may include a block of chroma Cb components (chroma Cb block) and / or a block of chroma Cr components (chroma Cr block).
[0261] Additionally, for example, the BDPCM availability flag may be signaled regardless of the chroma format of the image. For example, the BDPCM availability flag may be signaled when the chroma format of the image is YUV 444, YUV 420, or YUV 422. That is, for example, the BDPCM availability flag may be signaled even when the chroma format of the image is YUV 444.
[0262] Additionally, for example, the BDPCM enabled flag may be signaled with high-level syntax. For example, the BDPCM enabled flag may be signaled with SPS (Sequence Parameter Set) syntax. Or, for example, the BDPCM enabled flag may be signaled with 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 enabled flag may be the sps_bdpcm_enabled_flag described above.
[0263] The decoding device obtains a BDPCM luma flag regarding whether BDPCM is applied to the current luma block based on the BDPCM availability flag (S1110). The decoding device can obtain BDPCM-related information for the current luma block based on the BDPCM availability flag. For example, the BDPCM-related information for the current luma block may include a BDPCM luma flag for the current luma block. The decoding device can obtain a BDPCM luma flag for the current luma block based on the BDPCM availability flag.
[0264] For example, when the value of the BDPCM availability flag is 1 (i.e., when the BDPCM availability flag indicates that the BDPCM is available for the chroma block and the luminance block), the decoding device may obtain a BDPCM luminance flag indicating whether the BDPCM is applied to the current luminance block. For example, the BDPCM luminance flag may indicate whether the BDPCM is applied to the current luminance block and whether a BDPCM luminance direction flag for the current luminance block exists. For example, when the value of the BDPCM luminance flag is 1, the BDPCM luminance flag may indicate that the BDPCM is applied to the current luminance block and that a BDPCM luminance direction flag for the current luminance block exists, and when the value of the BDPCM luminance flag is 0, the BDPCM luminance flag may indicate that the BDPCM is not applied to the current luminance block and that a BDPCM luminance direction flag for the current luminance block does not exist. For example, the syntax element of the above BDPCM luma flag may be the bdpcm_flag or intra_bdpcm_luma_flag described above. Additionally, for example, the above BDPCM luma flag may be signaled in units of CU (coding unit).
[0265] The decoding device obtains a BDPCM luma direction flag for the predicted direction of the current luma block based on the BDPCM luma flag (S1120). For example, BDPCM-related information for the current luma block may include a BDPCM luma flag and / or a BDPCM luma direction flag for the current luma block.
[0266] For example, the decoding device can obtain a BDPCM luma direction flag for the predicted direction of the current luma block based on the BDPCM luma flag. For example, if the BDPCM luma flag indicates that the BDPCM is applied to the current luma block, the decoding device can obtain the BDPCM luma direction flag. That is, for example, if 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 may indicate a vertical direction or a horizontal direction as the predicted direction for the current luma block. For example, if the value of the BDPCM luma direction flag is 0, the BDPCM luma direction flag may indicate that the prediction direction for the current luma block is horizontal, and if the value of the BDPCM luma direction flag is 1, the BDPCM luma direction flag may indicate that the prediction direction for the current luma block is vertical. For example, the syntax element of the BDPCM luma direction flag may be the bdpcm_dir_flag or intra_bdpcm_luma_dir_flag described above. Additionally, for example, the BDPCM luma direction flag may be signaled in units of CU (coding unit).
[0267] The decoding device derives prediction samples of the current luma block based on the intra prediction mode derived based on the BDPCM luma direction flag (S1130).
[0268] For example, the decoding device can derive prediction samples of the current luminance block based on the intra prediction mode derived based on the BDPCM luminance direction flag.
[0269] For example, if the value of the BDPCM luminance direction flag is 0, that is, for example, if the BDPCM luminance direction flag indicates that the prediction direction for the current luminance block is horizontal, the decoding device can derive a horizontal intra prediction mode as the intra prediction mode of the current luminance block. For example, if the value of the BDPCM luminance direction flag is 0, that is, for example, if the BDPCM luminance direction flag indicates that the prediction direction for the current luminance block is horizontal, the decoding device can derive prediction samples of the current luminance block based on the horizontal intra prediction mode. In other words, for example, when the value of the BDPCM luminance direction flag is 0, that is, for example, when the BDPCM luminance direction flag indicates that the prediction direction for the current luminance block is horizontal, the decoding device can derive prediction samples of the current luminance block by performing intra prediction based on the left peripheral samples of the current luminance block. For example, if the prediction direction for the current luminance block is derived as horizontal, the decoding device can derive the sample value of the left peripheral sample in the same row as the prediction sample as the sample value of the prediction sample.
[0270] Additionally, for example, when the value of the BDPCM luminance direction flag is 1, that is, for example, when the BDPCM luminance direction flag indicates that the prediction direction for the current luminance block is vertical, the decoding device can derive a vertical intra prediction mode as the intra prediction mode of the current luminance block. For example, when the value of the BDPCM luminance direction flag is 1, that is, for example, when the BDPCM luminance direction flag indicates that the prediction direction for the current luminance block is vertical, the decoding device can derive prediction samples of the current luminance block based on the vertical intra prediction mode. In other words, for example, when the value of the BDPCM luminance direction flag is 1, that is, for example, when the BDPCM luminance direction flag indicates that the prediction direction for the current luminance block is vertical, the decoding device can derive prediction samples of the current luminance block based on upper peripheral samples of the current luminance block. For example, if the prediction direction for the current luma block is derived in a vertical direction, the decoding device can derive the sample value of the upper surrounding sample in the same column as the prediction sample as the sample value of the prediction sample.
[0271] The decoding device obtains a BDPCM chroma flag regarding whether BDPCM is applied to the current chroma blocks based on the BDPCM availability flag (S1140). The decoding device can obtain BDPCM-related information regarding the current chroma blocks based on the BDPCM availability flag. For example, the BDPCM-related information regarding the current chroma blocks may include a BDPCM chroma flag for the current chroma blocks. The decoding device can obtain a BDPCM chroma flag for the current chroma blocks based on the BDPCM availability flag.
[0272] Additionally, for example, the BDPCM-related information regarding the current chroma blocks (i.e., all of the current chroma blocks) can be signaled when the tree type of the image is a single tree and the value of the BDPCM availability flag is 1. That is, for example, the BDPCM-related information regarding the current chroma blocks (i.e., all of the current chroma blocks) can be signaled when the tree type of the image is a single tree and BDPCM is available for the current chroma blocks. Meanwhile, the tree type of the current block can be classified as a single tree or a dual tree depending on whether the current chroma blocks corresponding to the current lumina block have individual partition structures. For example, if the current chroma blocks have the same partition structure as the current lumina block, it can be represented as a single tree, and if the current chroma blocks have a different partition structure from the current lumina block, it can be represented as a dual tree.
[0273] For example, the BDPCM chroma flag may indicate whether the BDPCM is applied to the current chroma blocks and whether a BDPCM chroma direction flag exists for the current chroma blocks. For example, if the value of the BDPCM chroma flag is 1, the BDPCM chroma flag may indicate that the BDPCM is applied to the current chroma blocks and that a BDPCM chroma direction flag exists for the current chroma blocks, and if the value of the BDPCM chroma flag is 0, the BDPCM chroma flag may indicate that the BDPCM is not applied to the current chroma blocks and that a BDPCM chroma direction flag does not exist for the current chroma blocks. That is, for example, if the value of the BDPCM chroma flag is 1, the BDPCM chroma flag may indicate that the BDPCM is applied to all of the current chroma blocks and that a BDPCM chroma direction flag exists for all of the current chroma blocks, and if the value of the BDPCM chroma flag is 0, the BDPCM chroma flag may indicate that the BDPCM is not applied to all of the current chroma blocks and that a BDPCM chroma direction flag does not exist for all of the current chroma blocks. Here, for example, the current chroma blocks may 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 may be signaled in units of CU (coding unit).
[0274] The decoding device obtains a BDPCM chroma direction flag for the predicted direction of the current chroma blocks based on the BDPCM chroma flag (S1150). For example, BDPCM-related information for the current chroma blocks may include a BDPCM chroma flag and / or a BDPCM chroma direction flag for the current chroma blocks.
[0275] For example, the decoding device can obtain a BDPCM chroma direction flag for the predicted direction of the current chroma blocks based on the BDPCM chroma flag. For example, if the BDPCM chroma flag indicates that the BDPCM is applied to the current chroma blocks, the decoding device can obtain the BDPCM chroma direction flag. That is, for example, if 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 may indicate a vertical direction or a horizontal direction as the predicted direction for the current chroma blocks. For example, if the value of the BDPCM chroma direction flag is 0, the BDPCM chroma direction flag may indicate that the prediction direction for the current chroma blocks is horizontal, and if the value of the BDPCM chroma direction flag is 1, the BDPCM chroma direction flag may indicate that the prediction direction for the current chroma blocks is vertical. For example, the syntax element of the BDPCM chroma direction flag may be the aforementioned bdpcm_dir_flag or intra_bdpcm_chroma_dir_flag. Additionally, for example, the BDPCM chroma direction flag may be signaled in units of CU (coding unit).
[0276] The decoding device derives predicted samples of the current chroma blocks based on an intra prediction mode derived based on the BDPCM chroma direction flag (S1160). For example, the decoding device can derive predicted samples of the current chroma blocks 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 blocks is horizontal, the decoding device can derive a horizontal intra prediction mode as an intra prediction mode for the current chroma blocks. 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 blocks is horizontal, the decoding device can derive prediction samples for the current chroma blocks 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 blocks is horizontal, the decoding device can perform intra-prediction based on the left peripheral samples of the current chroma blocks to derive the prediction samples of the current chroma blocks. For example, if the prediction direction for the current chroma blocks is derived as horizontal, the decoding device can derive the sample value of the left peripheral sample in the same row as the prediction sample as the sample value of the prediction sample.
[0278] Additionally, 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 blocks is vertical, the decoding device can derive a vertical intra prediction mode as an intra prediction mode for the current chroma blocks. 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 blocks is vertical, the decoding device can derive prediction samples for the current chroma blocks 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 blocks is vertical, the decoding device can derive prediction samples for the current chroma blocks based on upper peripheral samples of the current chroma blocks. For example, if the prediction direction for the current chroma blocks is derived in a vertical direction, the decoding device can derive the sample value of an upper peripheral sample in the same column as the prediction sample as the sample value of the prediction sample.
[0279] The decoding device generates a reconstructed picture based on the predicted samples of the current luminance block and the predicted samples of the current chroma blocks (S1170).
[0280] The decoding device can derive restored samples and / or restored pictures for the current luminance block and the current chroma blocks based on the predicted samples of the current luminance block and the predicted samples of the current chroma blocks. For example, the decoding device can derive restored samples of the current luminance block through the addition of the predicted samples of the current luminance block and the residual samples of the current luminance block. Additionally, for example, the decoding device can derive restored samples of the current chroma blocks through the addition of the predicted samples of the current chroma blocks and the residual samples of the current chroma blocks. That is, for example, the decoding device can derive restored samples of the current chroma Cb block through the addition of the predicted samples of the current chroma Cb block and the residual samples of the current chroma Cb block, and can derive restored samples of the current chroma Cr block through the addition of the predicted samples of the current chroma Cr block and the residual samples of the current chroma Cr block.
[0281] Meanwhile, for example, the decoding device can derive residual samples of the current luminance block based on the received residual information, and can derive residual samples of the current chroma blocks (residual samples of the current chroma Cb block and residual samples of the current chroma Cr block) based on the received residual information.
[0282] For example, when BDPCM is applied to the current luminance block, the residual information may include syntax elements for residual samples of the current luminance block (i.e., when BDPCM is applied to the current luminance block, the residual information may include syntax elements for target residual samples of the current luminance block), and the syntax elements for the target residual samples may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left peripheral residual sample or the upper peripheral residual sample of the target residual sample. That is, for example, when BDPCM is applied to the current luminance block, the residual information may include syntax elements for the target residual sample of the current luminance block, and based on the syntax elements 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 peripheral residual sample or the upper peripheral residual sample of the target residual sample may be derived.
[0283] For example, if BDPCM is applied to the current luminance block and the prediction direction for the current luminance block is horizontal, the syntax elements for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the residual sample to the left of the target residual sample. That is, for example, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the residual sample to the left of the target residual sample can be derived based on the syntax elements for the target residual sample. Subsequently, the residual coefficient of the target residual sample can be derived as the sum of the residual coefficient value of the residual sample to the left 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 luminance block. For example, the residual coefficient of the target residual sample can be derived based on the above-described mathematical formula 4. Meanwhile, for example, if 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] Additionally, for example, if BDPCM is applied to the current luminance block and the prediction direction for the current luminance block is vertical, the syntax elements for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper surrounding residual sample of the target residual sample. That is, for example, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper surrounding residual sample of the target residual sample can be derived based on the syntax elements for the target residual sample. Subsequently, the residual coefficient of the target residual sample can be derived as the sum of the residual coefficient value of the upper surrounding residual sample of the target residual sample and the difference. Here, the target residual sample may be a residual sample within a row other than the first row of the current luminance block. For example, the residual coefficient of the target residual sample can be derived based on the above-described mathematical formula 3. Meanwhile, for example, if 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] Subsequently, for example, the decoding device can derive the target residual sample by inversely quantizing the residual coefficient. That is, for example, the target residual sample can be derived by inversely quantizing the residual coefficient.
[0286] Additionally, 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 may include syntax elements for residual samples of the current chroma block (i.e., when BDPCM is applied to the current chroma blocks, the residual information may include syntax elements for target residual samples of the current chroma blocks (the current chroma Cb block and the current chroma Cr block)), and the syntax elements for the target residual samples may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left peripheral residual sample or the upper peripheral residual sample of the target residual sample. That is, for example, when BDPCM is applied to the current chroma blocks, the residual information may include syntax elements for a target residual sample of the current chroma block (e.g., current chroma Cb block or current chroma Cr block), and based on the syntax elements 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 peripheral residual sample or the upper peripheral residual sample of the target residual sample may be derived.
[0287] For example, if BDPCM is applied to the current chroma blocks and the prediction direction for the current chroma blocks is horizontal, the syntax elements for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the residual sample to the left of the target residual sample. That is, for example, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the residual sample to the left of the target residual sample can be derived based on the syntax elements for the target residual sample. Subsequently, the residual coefficient of the target residual sample can be derived as the sum of the residual coefficient value of the residual sample to the left 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 blocks. For example, the residual coefficient of the target residual sample can be derived based on the above-described mathematical formula 4. Meanwhile, for example, if the target residual sample is a residual sample within the first column of the current chroma blocks, the residual coefficient of the target residual sample can be derived based on the syntax element of the target residual sample.
[0288] Additionally, for example, if BDPCM is applied to the current chroma blocks and the prediction direction for the current chroma blocks is vertical, the syntax elements for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper surrounding residual sample of the target residual sample. That is, for example, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper surrounding residual sample of the target residual sample may be derived based on the syntax elements for the target residual sample. Subsequently, the residual coefficient of the target residual sample may be derived as the sum of the residual coefficient value of the upper surrounding residual sample of the target residual sample and the difference. Here, the target residual sample may be a residual sample within a row other than the first row of the current chroma blocks. For example, the residual coefficient of the target residual sample can be derived based on the above-described mathematical formula 3. Meanwhile, for example, if the target residual sample is a residual sample within the first row of the current chroma blocks, the residual coefficient of the target residual sample can be derived based on the syntax element of the target residual sample.
[0289] Subsequently, for example, the decoding device can derive the target residual sample by inversely quantizing the residual coefficient. That is, for example, the target residual sample can be derived by inversely quantizing the residual coefficient.
[0290] Meanwhile, although not illustrated in the drawings, for example, a decoding device may obtain residual information for the current luminance block based on the BDPCM luminance flag. For example, if the BDPCM luminance flag indicates that the BDPCM is applied to the current luminance block, that is, if the BDPCM is applied to the current luminance block, the residual information may include syntax elements for the residual samples of the current luminance block, and based on the syntax elements for the target residual sample, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the residual sample to the left or upper peripheral residual sample of the target residual sample may be derived. For example, if the prediction direction of the current luminance block is horizontal, that is, if the prediction direction of the current luminance block is derived as horizontal based on the BDPCM luminance direction flag, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the residual sample to the left of the target residual sample can be derived based on the syntax elements for the target residual sample. Additionally, for example, if the prediction direction of the current luminance block is vertical, that is, if the prediction direction of the current luminance block is derived as vertical based on the BDPCM luminance direction flag, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the residual sample to the upper of the target residual sample can be derived based on the syntax elements for the target residual sample. In addition, if 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 sample.
[0291] Additionally, for example, a decoding device can obtain residual information for the current chroma blocks based on the BDPCM chroma flag. For example, if the BDPCM chroma flag indicates that the BDPCM is applied to the current chroma blocks, that is, if the BDPCM is applied to the current chroma blocks, the residual information may include syntax elements for residual samples of the current chroma blocks, and based on the syntax elements for the target residual sample, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the residual sample to the left or upper peripheral residual sample of the target residual sample may be derived. For example, if the prediction direction of the current chroma blocks is horizontal, that is, if the prediction direction of the current chroma blocks 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 residual sample to the left of the target residual sample can be derived based on the syntax elements for the target residual sample. Additionally, for example, if the prediction direction of the current chroma blocks is vertical, that is, if the prediction direction of the current chroma blocks 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 residual sample to the upper of the target residual sample can be derived based on the syntax elements for the target residual sample. In addition, if the target residual sample is located in the first row or column of the current chroma blocks, the residual coefficient value of the target residual sample can be derived based on the syntax elements for the target residual sample.
[0292] The decoding device can derive the reconstructed samples through the addition of the predicted samples and the residual samples. As previously described, in-loop filtering procedures, such as deblocking filtering, SAO, and / or ALF procedures, may subsequently be applied to the reconstructed samples to improve subjective / objective image quality as needed.
[0293] FIG. 12 schematically illustrates a decoding device that performs an image decoding method according to the present 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 of FIG. 12 can perform S1100 to S1120 and S1140 to S1150 of FIG. 11, the prediction unit of the decoding device of FIG. 12 can perform S1130 and S1160 of FIG. 11, and the addition unit of the decoding device of FIG. 12 can perform S1170 of FIG. 11.
[0294] According to the above document, the availability of BDPCM for the luminance block and chroma block within an image can be determined with a single syntax element, thereby reducing the bit amount for BDPCM and improving overall coding efficiency.
[0295] In addition, according to this document, a BDPCM availability flag indicating whether BDPCM is available for the luminance block and chroma block within the image can be signaled regardless of the image's chroma format, thereby reducing complexity for BDPCM and improving overall coding efficiency.
[0296] In the embodiments described above, methods are described based on flowcharts as a series of steps or blocks; however, this document is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps as described above. Furthermore, those skilled in the art will understand that the steps shown in the flowcharts are not exclusive, and that other steps may be included, or that one or more steps of the flowcharts may be omitted without affecting the scope of this document.
[0297] The embodiments described in this document may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in each figure may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information on instructions or algorithms for implementation may be stored on a digital storage medium.
[0298] In addition, the decoding and encoding devices to which the embodiments of the present document are applied may be included in multimedia broadcasting transmission and reception devices, mobile communication terminals, home cinema video devices, digital cinema video devices, surveillance cameras, video conversation devices, real-time communication devices such as video communication, mobile streaming devices, storage media, camcorders, Video on Demand (VoD) service providers, Over-the-top video (OTT) devices, internet streaming service providers, three-dimensional (3D) video devices, video phone video devices, transportation terminals (e.g., vehicle terminals, airplane terminals, ship terminals, etc.), and medical video devices, and may be used to process video signals or data signals. For example, Over-the-top video (OTT) devices may include game consoles, Blu-ray players, internet-connected TVs, home theater systems, smartphones, tablet PCs, Digital Video Recorders (DVRs), etc.
[0299] In addition, the processing method to which the embodiments of the present document are applied may be produced in the form of a program that is executed by a computer and may be stored on a computer-readable recording medium. Multimedia data having a data structure according to the present document may also be stored on a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier wave (e.g., transmission over the Internet). In addition, a bitstream generated by an encoding method may be stored on a computer-readable recording medium or transmitted through a wired or wireless communication network.
[0300] Additionally, embodiments of this document may be implemented as a computer program product by program code, and said program code may be executed on a computer by way of the embodiments of this document. said program code may be stored on a carrier readable by a computer.
[0301] FIG. 13 illustrates an exemplary structural diagram of a content streaming system to which embodiments of the present document are applied.
[0302] A content streaming system to which the embodiments of this document are applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0303] The above encoding server compresses content input from multimedia input devices, such as smartphones, cameras, and camcorders, into digital data to generate a bitstream and transmits it to the streaming server. As another example, if multimedia input devices, such as smartphones, cameras, and camcorders, generate the bitstream directly, the encoding server may be omitted.
[0304] The bitstream above may be generated by an encoding method or a bitstream generation method to which the embodiments of the present document are applied, and the streaming server may temporarily store the bitstream during 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 acts as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transmits it to the streaming server, and the streaming server transmits the multimedia data to the user. At this time, the content streaming system may include a separate control server, and in this case, the control server plays the role of controlling commands and responses between each device within the content streaming system.
[0306] The streaming server may receive content from a media storage and / or an encoding server. For example, when receiving content from the encoding server, the content may be received in real time. In this case, to provide a seamless streaming service, the streaming server may store the bitstream for a certain period of time.
[0307] Examples of the above user devices may include mobile phones, smartphones, laptop computers, digital broadcasting terminals, PDAs (personal digital assistants), PMPs (portable multimedia players), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, head-mounted displays), digital TVs, desktop computers, digital signage, etc. Each server within the above content streaming system may be operated as a distributed server, and in this case, data received from each server may be processed in a distributed manner.
[0308] The claims described in this specification may be combined in various ways. For example, the technical features of the method claims in this specification may be combined to be implemented as a device, and the technical features of the device claims in this specification may be combined to be implemented as a method. Furthermore, the technical features of the method claims and the technical features of the device claims in this specification may be combined to be implemented as a device, and the technical features of the method claims and the technical features of the device claims in this specification may be combined to be implemented as a method.
Claims
Claim 1 A video decoding method performed by a decoding device comprises: acquiring a BDPCM availability flag indicating whether BDPCM (Block-based Delta Pulse Code Modulation) is available for both a chroma block and a luminance block of a current sequence, wherein the chroma block and the luminance block are included in the current sequence; acquiring a BDPCM luminance flag indicating whether BDPCM is applied to the current luminance block based on the BDPCM availability flag; acquiring a BDPCM luminance direction flag indicating the prediction direction of the current luminance block based on the BDPCM luminance flag; deriving prediction samples of the current luminance block based on an intra prediction mode derived based on the BDPCM luminance direction flag; acquiring a BDPCM chroma flag indicating whether BDPCM is applied to the current chroma blocks based on the BDPCM availability flag; and acquiring a BDPCM chroma direction flag indicating the prediction direction of the current chroma blocks based on the BDPCM chroma flag. A step of deriving prediction samples of the current chroma blocks based on an intra prediction mode derived based on the above BDPCM chroma direction flag;and includes the step of generating a restored picture based on the predicted samples of the current luminance block and the predicted samples of the current chroma blocks, wherein whether the BDPCM is available for both the luminance block and the chroma block is determined according to the value of the BDPCM availability flag without obtaining another BDPCM availability flag regarding whether the BDPCM is available for the chroma block, and whether the BDPCM is available for the luminance block of the current sequence according to the value of the BDPCM availability flag is determined to be the same as whether the BDPCM is available for the chroma block of the current sequence, and a value of the BDPCM availability flag equal to 0 indicates that the BDPCM is not available for both the luminance block and the chroma block of the current sequence, and a value of the BDPCM availability flag equal to 1 indicates that the BDPCM is available for both the luminance block and the chroma block of the current sequence, and the value of the BDPCM availability flag A video decoding method characterized in that, in response to something like 0, the BDPCM luminance flag and the BDPCM chroma flag are not obtained from the bitstream, and in response to the value of the BDPCM available flag being like 1, the BDPCM luminance flag and the BDPCM chroma flag are obtained from the bitstream. Claim 2 delete Claim 3 delete Claim 4 delete Claim 5 delete Claim 6 delete Claim 7 delete Claim 8 delete Claim 9 delete Claim 10 delete Claim 11 delete Claim 12 A video encoding method performed by an encoding device comprises: determining whether Block-based Delta Pulse Code Modulation (BDPCM) is available for a chroma block and a luminance block of a current sequence, wherein the chroma block and the luminance block are included in the current sequence; generating a BDPCM availability flag regarding whether the BDPCM is available for the chroma block and the luminance block based on the result of the determination; generating prediction samples for the current luminance block based on the BDPCM; generating prediction samples for the current chroma blocks based on the BDPCM; and generating BDPCM-related information for the current luminance block and BDPCM-related information for the current chroma blocks. The method includes the step of encoding image information including the BDPCM availability flag, the BDPCM-related information for the current luminance block, and the BDPCM-related information for the current chroma blocks, wherein the BDPCM-related information for the current luminance block includes a BDPCM luminance flag regarding whether the BDPCM is applied to the current luminance block and a BDPCM luminance direction flag regarding the prediction direction of the current luminance block, and the BDPCM-related information for the current chroma blocks includes a BDPCM chroma flag regarding whether the BDPCM is applied to the current chroma blocks and a BDPCM chroma direction flag regarding the prediction direction of the current chroma blocks, and the BDPCM-related information for the current chroma blocks includes a BDPCM chroma flag regarding whether the BDPCM is applied to the current chroma blocks and a BDPCM chroma direction flag regarding the prediction direction of the current chroma blocks, and the availability of the BDPCM for both the luminance block and the chroma block is determined according to the value of the BDPCM availability flag without generating another BDPCM availability flag regarding whether the BDPCM is available for the chroma block.A video encoding method characterized by determining whether the BDPCM is available for the luminance block of the current sequence according to the value of the BDPCM availability flag in the same way as determining whether the BDPCM is available for the chroma block of the current sequence, wherein a value of the BDPCM availability flag equal to 0 indicates that the BDPCM is not available for both the luminance block and the chroma block of the current sequence, and a value of the BDPCM availability flag equal to 1 indicates that the BDPCM is available for both the luminance block and the chroma block of the current sequence, wherein in response to a value of the BDPCM availability flag equal to 0, the BDPCM luminance flag and the BDPCM chroma flag are not signaled in the bitstream, and in response to a value of the BDPCM availability flag equal to 1, the BDPCM luminance flag and the BDPCM chroma flag are signaled in the bitstream. Claim 13 delete Claim 14 delete Claim 15 A computer-readable digital non-transient storage medium stores a bitstream generated by a specific method, wherein the specific method comprises the steps of: determining whether Block-based Delta Pulse Code Modulation (BDPCM) is available for a chroma block and a luminance block of a current sequence, and including the chroma block and the luminance block in the current sequence; generating a BDPCM availability flag for whether the BDPCM is available for the chroma block and the luminance block based on the result of the determination; generating prediction samples for the current luminance block based on the BDPCM; generating prediction samples for the current chroma blocks based on the BDPCM; generating BDPCM-related information for the current luminance block and BDPCM-related information for the current chroma blocks; and encoding image information including the BDPCM availability flag, the BDPCM-related information for the current luminance block, and the BDPCM-related information for the current chroma blocks.The method includes the step of generating the bitstream including the image information, wherein the BDPCM-related information for the current luminance block includes a BDPCM luminance flag regarding whether the BDPCM is applied to the current luminance block and a BDPCM luminance direction flag regarding the prediction direction of the current luminance block, and the BDPCM-related information for the current chroma blocks includes a BDPCM chroma flag regarding whether the BDPCM is applied to the current chroma blocks and a BDPCM chroma direction flag regarding the prediction direction of the current chroma blocks, and without generating another BDPCM availability flag regarding whether BDPCM is available for the chroma block, the availability of BDPCM for both the luminance block and the chroma block is determined according to the value of the BDPCM availability flag, and the availability of BDPCM for the luminance block of the current sequence according to the value of the BDPCM availability flag is determined in the same way as the availability of BDPCM for the chroma block of the current sequence, and the BDPCM availability A digital non-transient storage medium characterized in that a value of 0 for a flag indicates that the BDPCM is not available for both the luminance block and the chroma block of the current sequence, and a value of 1 for a BDPCM availability flag indicates that the BDPCM is available for both the luminance block and the chroma block of the current sequence, wherein in response to a value of 0 for a BDPCM availability flag, the BDPCM luminance flag and the BDPCM chroma flag are not signaled in the bitstream, and in response to a value of 1 for a BDPCM availability flag, the BDPCM luminance flag and the BDPCM chroma flag are signaled in the bitstream. Claim 16 A method for transmitting data for an image, comprising the step of acquiring a bitstream of image information including a Block-based Delta Pulse Code Modulation (BDPCM) available flag, BDPCM-related information for a current luminance block, and BDPCM-related information for a current chroma block; The method comprises the step of transmitting data including the bitstream of the image information, which includes the BDPCM availability flag, the BDPCM related information for the current luminance block, and the BDPCM related information for the current chroma block, wherein the BDPCM availability flag indicates whether BDPCM is available for both the chroma block and the luminance block of the current sequence, the chroma block and the luminance block are included in the current sequence, the BDPCM related information for the current luminance block includes a BDPCM luminance flag regarding whether BDPCM is applied to the current luminance block and a BDPCM luminance direction flag regarding the prediction direction of the current luminance block, the BDPCM related information for the current chroma blocks includes a BDPCM chroma flag regarding whether BDPCM is applied to the current chroma blocks and a BDPCM chroma direction flag regarding the prediction direction of the current chroma blocks, and the value of the BDPCM availability flag without generating another BDPCM availability flag regarding whether BDPCM is available for the chroma block Accordingly, whether the BDPCM is available for both the above-mentioned luminance block and the above-mentioned chroma block is determined, and depending on the value of the BDPCM availability flag, whether the BDPCM is available for the above-mentioned luminance block of the current sequence is determined to be the same as whether the BDPCM is available for the above-mentioned chroma block of the current sequence.A data transmission method characterized in that the value of the BDPCM availability flag being 0 indicates that the BDPCM is not available for both the luminance block and the chroma block of the current sequence, and the value of the BDPCM availability flag being 1 indicates that the BDPCM is available for both the luminance block and the chroma block of the current sequence, wherein in response to the value of the BDPCM availability flag being 0, the BDPCM luminance flag and the BDPCM chroma flag are not signaled in the bitstream, and in response to the value of the BDPCM availability flag being 1, the BDPCM luminance flag and the BDPCM chroma flag are signaled in the bitstream.