Bdpcm-based image decoding method for luma and chroma components and device for the same
By applying BDPCM with availability and direction flags for chroma and luma blocks, the method addresses the inefficiencies in high-resolution image coding, reducing bit requirements and improving coding efficiency.
Patent Information
- Application Number
- JP2025091255
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2020-01-10
- Filing Date
- 2025-05-30
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2040-11-04
AI Technical Summary
The increasing demand for high-resolution, high-quality images leads to higher transmission and storage costs due to increased data volume, necessitating more efficient image compression techniques.
Implementing Block-based Delta Pulse Code Modulation (BDPCM) for chroma and luma blocks, using BDPCM availability and direction flags to determine prediction directions, and incorporating these flags into the encoding process to optimize image coding efficiency.
This approach reduces the bit requirements for BDPCM and improves overall coding efficiency by determining BDPCM availability for luma and chroma blocks, regardless of image chroma format, thereby simplifying complexity and enhancing coding performance.
Smart Images

Figure 2025120218000001_ABST
Abstract
Description
[Technical Field]
[0001] This document relates to image coding technology, and more particularly to an image decoding method and apparatus for performing BDPCM in an image coding system. [Background technology]
[0002] Recently, the demand for high-resolution, high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images has been increasing in various fields. As the resolution and quality of image data increases, the amount of information or bits to be transmitted increases relatively compared to existing image data. Therefore, when image data is transmitted using a medium such as an existing wired or wireless broadband line or when image data is stored using an existing storage medium, transmission costs and storage costs increase.
[0003] Therefore, highly efficient image compression techniques are required to effectively transmit, store and reproduce high-resolution, high-quality image information. Summary of the Invention [Problem to be solved by the invention]
[0004] The technical problem of this document is to provide a method and apparatus for increasing image coding efficiency.
[0005] Another technical problem of this document is to provide a method and apparatus for increasing the efficiency of BDPCM. [Means for solving the problem]
[0006] According to one embodiment of the present document, there is provided an image decoding method performed by a decoding device, the method comprising: decoding a chroma block and a luma block using Block-based Delta Pulse Code Modulation (BDPCM) coding; obtaining a BDPCM luma flag indicating whether BDPCM is applicable to a current luma block based on the BDPCM availability flag; obtaining a BDPCM luma direction flag for a prediction direction of the current luma block based on the BDPCM luma flag; deriving predicted samples of the current luma block based on an intra prediction mode derived based on the BDPCM luma direction flag; obtaining a BDPCM chroma flag indicating whether BDPCM is applicable to a current chroma block based on the BDPCM availability flag; obtaining a BDPCM chroma direction flag for a prediction direction of the current chroma block based on the BDPCM chroma flag; deriving predicted samples of the current chroma block based on the intra prediction mode derived based on the BDPCM chroma direction flag;
[0007] According to another embodiment of the present document, there is provided a decoding device for performing image decoding, the decoding device performing Block-based Delta Pulse Code Modulation (BDPCM) on a chroma block and a luma block. the BDPCM chroma flag indicating whether BDPCM is applicable to a current chroma block based on the BDPCM availability flag; the BDPCM luma direction flag for a prediction direction of the current luma block based on the BDPCM luma flag; the BDPCM chroma flag indicating whether BDPCM is applicable to a current chroma block based on the BDPCM availability flag; and the BDPCM chroma direction flag for a prediction direction of the current chroma block based on the BDPCM chroma flag; a prediction unit that derives prediction samples of the current luma block based on an intra prediction mode derived based on the BDPCM luma direction flag and derives prediction samples of the current chroma block based on the intra prediction mode derived based on the BDPCM chroma direction flag; and an adder that generates a reconstructed picture based on the prediction samples of the current luma block and the current chroma block.
[0008] According to another embodiment of the present document, there is provided a video encoding method performed by an encoding device, the method including the steps of determining whether Block-based Delta Pulse Code Modulation (BDPCM) is available for a chroma block and a luma block, generating a BDPCM availability flag indicating whether the BDPCM is available for the chroma block and the luma block based on the determination result, generating a prediction sample for a current luma block based on the BDPCM, generating a prediction sample for the current chroma block based on the BDPCM, generating BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block, and generating the BDPCM availability flag, the BDPCM availability flag, and the BDPCM availability flag for the current luma block. and encoding image information including the BDPCM-related information for the current luma block and the BDPCM-related information for the current chroma block, wherein the BDPCM-related information for the current luma block includes a BDPCM luma flag indicating whether the BDPCM is applied to the current luma block and a BDPCM luma direction flag indicating a prediction direction of the current luma block, and the BDPCM-related information for the current chroma block includes a BDPCM chroma flag indicating whether the BDPCM is applied to the current chroma block and a BDPCM chroma direction flag indicating a prediction direction of the current chroma block.
[0009] According to another embodiment of the present document, there is provided a video encoding device, the encoding device including: a prediction unit that determines whether Block-based Delta Pulse Code Modulation (BDPCM) is available for a chroma block and a luma block, generates a predicted sample for a current luma block based on the BDPCM, generates a predicted sample for the current chroma block based on the BDPCM, and generates a BDPCM availability flag indicating whether the BDPCM is available for the chroma block and the luma block based on a result of the determination, generates BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block, and and an entropy encoding unit configured to encode image information including the BDPCM-related information for the current chroma block, wherein the BDPCM-related information for the current luma block includes a BDPCM luma flag indicating whether the BDPCM for the current luma block is applied and a BDPCM luma direction flag indicating a prediction direction of the current luma block, and the BDPCM-related information for the current chroma block includes a BDPCM chroma flag indicating whether the BDPCM for the current chroma block is applied and a BDPCM chroma direction flag indicating a prediction direction of the current chroma block.
[0010] According to yet another embodiment of the present document, there is provided a computer-readable digital storage medium having stored thereon a bitstream containing image information for causing an image decoding method to be performed, the image decoding method including: decoding chroma blocks and luma blocks using Block-based Delta Pulse Code Modulation (BDPCM) coding; obtaining a BDPCM luma flag indicating whether BDPCM is applicable to a current luma block based on the BDPCM availability flag; obtaining a BDPCM luma direction flag for a prediction direction of the current luma block based on the BDPCM luma flag; deriving predicted samples of the current luma block based on an intra prediction mode derived based on the BDPCM luma direction flag; obtaining a BDPCM chroma flag indicating whether BDPCM is applicable to a current chroma block based on the BDPCM availability flag; obtaining a BDPCM chroma direction flag for a prediction direction of the current chroma block based on the BDPCM chroma flag; deriving predicted samples of the current chroma block based on the intra prediction mode derived based on the BDPCM chroma direction flag; [Effects of the Invention]
[0011] According to this document, a single syntax element can determine whether BDPCM is available for luma and chroma blocks in an image, thereby reducing the amount of bits required for BDPCM and improving overall coding efficiency.
[0012] According to this document, regardless of the chroma format of the image, a BDPCM availability flag can be signaled to indicate whether BDPCM is available in the luma and chroma blocks of the image, which can further reduce the complexity for BDPCM and improve overall coding efficiency. [Brief explanation of the drawings]
[0013] [Figure 1] 1 illustrates schematically an example of a video / image coding system to which embodiments of the present document may be applied. [Figure 2] 1 is a diagram illustrating a schematic configuration of a video / image encoding device to which embodiments of the present document can be applied; [Figure 3] 1 is a diagram illustrating the configuration of a video / image decoding device to which the embodiments of the present document can be applied; [Figure 4] 1 shows an exemplary hierarchical structure for coded images / videos. [Figure 5] Illustrates an example of CABAC (context-adaptive binary arithmetic coding) for encoding syntax elements. [Figure 6] 1 shows an example of an intra-prediction based video / image encoding method. [Figure 7] 1 shows an example of an intra-prediction based video / image encoding method. [Figure 8] 1 illustrates an exemplary intra-prediction procedure. [Figure 9] 1 illustrates a schematic diagram of an image encoding method using an encoding device according to the present document. [Figure 10] 1 shows a schematic diagram of an encoding device for performing the image encoding method according to the present document; [Figure 11] 1 illustrates an image decoding method using a decoding device according to the present document. [Figure 12] 1 shows a schematic diagram of a decoding device for performing the image decoding method according to the present document; [Figure 13]1 exemplarily illustrates a structural diagram of a content streaming system to which an embodiment of the present document is applied. DETAILED DESCRIPTION OF THE INVENTION
[0014] This document may be modified in various ways and may have various embodiments. Specific embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to the specific embodiment. Common terms used in this document are used merely to describe specific embodiments and are not intended to limit the technical ideas of this document. A singular expression includes a plural expression unless the context clearly dictates otherwise. In this specification, terms such as "comprise" or "have" are intended to specify the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0015] Meanwhile, each component in the drawings described in this document is illustrated independently for the convenience of explaining the different characteristic functions, and does not mean that each component is realized by 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 each component is integrated and / or separated are also within the scope of this document as long as they do not deviate from the essence of this document.
[0016] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used to refer to the same components in the drawings, and duplicated descriptions of the same components may be omitted.
[0017] FIG. 1 illustrates schematically an example of a video / image coding system in which embodiments of the present document may be applied.
[0018] As shown in Figure 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 file or streaming form via a digital storage medium or a network.
[0019] The source device may include a video source, an encoding device, and a transmitting 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. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, which may be a separate device or an external component.
[0020] A video source can acquire video / images through a video / image capture, synthesis, or generation process. A video source can include a video / image capture device and / or a video / image generation device. A video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, virtual video / images can be generated via a computer, etc., in which case the video / image capture process can be replaced by a process in which the associated data is generated.
[0021] An encoding device can encode input video / images. The encoding device can perform a series of steps 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 transmitter may transmit the encoded video / image information or data output in the form of a bitstream to a receiver of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. The transmitter may include elements for generating a media file in a predetermined file format and elements for transmission via a broadcasting / communication network. The receiver may receive / extract the bitstream and transmit it to a decoding device.
[0023] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transform, prediction, etc., which correspond to the operations of the encoding device.
[0024] The renderer can render the decoded video / image, and the rendered video / image can be displayed via a display unit.
[0025] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the versatile video coding (VVC) standard, the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation of audio video coding standard (AVS2), or next generation video / image coding standards (e.g., H.267 or H.268).
[0026] This document presents various embodiments relating to video / image coding, which, unless otherwise stated, may also be implemented in combination with one another.
[0027] In this document, video may refer to a collection of a series of images over time. A picture generally refers to a unit that shows an image at a specific time, and a subpicture, slice, or tile is a unit that constitutes part of a picture in coding. A subpicture, slice, or tile may contain one or more coding tree units (CTUs). A picture may be composed of one or more subpictures, slices, or tiles. A picture may be composed of one or more groups of tiles. A tile group may contain one or more tiles. A brick may represent a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each consisting of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick.A brick scan refers to a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. Also, a subpicture may represent a rectangular region of one or more slices within a picture. That is, a subpicture contains one or more slices that collectively cover a rectangular region of a picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture.The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set. The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the height of the picture. A tile scan refers to a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in a CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture.A slice includes an integer number of bricks of a picture that maybe exclusively contained in a single NAL unit. A slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile. In this document, the terms tile group and slice may be used interchangeably. For example, in this document, tile group / tile group header may be called slice / slice header.
[0028] A pixel or a pel may refer to the smallest unit that constitutes one picture (or image). A "sample" may also be used as a term corresponding to a pixel. A sample may generally refer to a pixel or a pixel value, or may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component.
[0029] A unit may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to that region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. The term unit may be used interchangeably with terms such as block or area. In a general case, an M×N block may include samples (or a sample array) consisting of M columns and N rows, or a set (or an array) of transform coefficients.
[0030] As used herein, "A or B" may mean "A only," "B only," or "both A and B." In other words, as used herein, "A or B" may be interpreted as "A and / or B." For example, as used herein, "A, B, or C" may mean "A only," "B only," "C only," or "any combination of A, B, and C."
[0031] As used herein, a slash ( / ) or a comma may mean "and / or." For example, "A / B" may mean "A and / or B." Thus, "A / B" may mean "A only," "B only," or "both A and B." For example, "A, B, C" may mean "A, B, or C."
[0032] As used herein, "at least one of A and B" can mean "A only," "B only," or "both A and B." Furthermore, as used herein, the expressions "at least one of A or B" and "at least one of A and / or B" can be interpreted in the same way as "at least one of A and B."
[0033] Furthermore, in this specification, "at least one of A, B and C" can mean "A only," "B only," "C only," or "any combination of A, B and C." Furthermore, "at least one of A, B or C" and "at least one of A, B and / or C" can mean "at least one of A, B and C."
[0034] Furthermore, parentheses used in this specification may mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "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, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" may be proposed as an example of "prediction."
[0035] Technical features described separately in one drawing in this specification may be realized separately or simultaneously.
[0036] The following drawings are created to explain a specific example of the present specification. The names of specific devices and names of specific signals / messages / fields shown in the drawings are provided for illustrative purposes only, and the technical features of the present specification are not limited to the specific names used in the following drawings.
[0037] 2 is a diagram for explaining the configuration of a video / image encoding device to which the embodiments of this document can be applied. Hereinafter, the video encoding device may include an image encoding device.
[0038] As shown in FIG. 2, the encoding device 200 may 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 adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image dividing unit 210, the predicting unit 220, the residual processing unit 230, the entropy encoding unit 240, the adding unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chipset or a processor) depending on the embodiment. Also, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0039] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree, binary-tree, ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into multiple coding units of deeper depths 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 then the binary tree structure and / or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied first. The coding procedure according to this document may be performed based on the final coding unit that is not further divided. In this case, the largest coding unit may be immediately used as the final coding unit based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as needed, and the coding unit of the optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit.The prediction unit is a unit of sample prediction, and the transform unit is a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0040] The term "unit" can be used interchangeably with terms such as "block" or "area." In general, an MxN block can refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally refer to a pixel or pixel value, and can refer to only a pixel / pixel value of the luma component, or only a pixel / pixel value of the chroma component. A sample can also be used as a term corresponding to one pixel or pel of a picture (or image).
[0041] The encoding apparatus 200 may generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input image signal (original block, original sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, a unit in the encoder 200 that subtracts the prediction signal (predicted block, prediction sample array) from the input image signal (original block, original sample array) may be referred to as a subtraction unit 231. The prediction unit may perform prediction on a current block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied on a current block or CU basis. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction information can be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0042] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away, depending on the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, DC mode and planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the granularity of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the settings. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.
[0043] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on an inter prediction direction (such as L0 prediction, L1 prediction, or Bi prediction). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), or the like, and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter predictor 221 may configure a motion information candidate list based on neighboring blocks and generate information indicating which candidates are used to derive a motion vector and / or a reference picture index for the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode or a merge mode, the inter predictor 221 may use motion information of neighboring blocks as motion information of the current block. In the case of the skip mode, unlike in the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block 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 predictor 220 may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may apply intra prediction or inter prediction for prediction of a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as combined inter and intra prediction (CIIP). The predictor may also use an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / video coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein. The palette mode may be seen as an example of intra coding or intra prediction. When the palette mode is applied, sample values within a picture may be signaled based on information about a palette table and a palette index.
[0045] The prediction signal generated by the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) may be used to generate a reconstructed signal or a residual signal. The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, GBT refers to a transform obtained from a graph representing inter-pixel relationship information. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size or non-square blocks of variable size.
[0046] The quantizer 233 quantizes the transform coefficients and transmits them to the entropy encoder 240. The entropy encoder 240 encodes the quantized signal (information about the quantized transform coefficients) and outputs it as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoder 240 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. In addition to the quantized transform coefficients, the entropy encoder 240 may also encode information required for video / image restoration (e.g., values of syntax elements, etc.) together with or separately from 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 network abstraction layer (NAL) units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may also include general constraint information. Information and / or syntax elements transmitted / signaled from an encoding device to a decoding device in this document may be included in the video / image information. The video / image information may be encoded through the above-described encoding procedure and included in the bitstream.The bitstream can be transmitted via a network or stored in a digital storage medium. Here, the network can include a broadcasting network and / or a communication network, and the digital storage medium can include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) for storing the signal can be configured as an internal / external element of the encoding device 200, or the transmitter can be included in the entropy encoding unit 240.
[0047] The quantized transform coefficients output from the quantization unit 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantization unit 234 and the inverse transform unit 235. The adder 250 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the current block, such as when skip mode is applied, a predicted block may be used as the reconstructed block. The adder 250 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, or may be used for inter prediction of the next picture after filtering, as described below.
[0048] Meanwhile, luma mapping with chroma scaling (LMCS) can be applied during picture encoding and / or reconstruction.
[0049] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture and store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 240, as will be described later in connection with each filtering method. The filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0050] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 221. When inter prediction is applied through this, the encoding apparatus can avoid prediction mismatch between the encoding apparatus 200 and the decoding apparatus 300 and can also improve encoding efficiency.
[0051] The memory 270DPB may store modified reconstructed pictures for use as reference pictures in the inter predictor 221. The memory 270 may store motion information of blocks from which motion information in the current picture is derived (or encoded) and / or motion information of blocks in already reconstructed pictures. The stored motion information may be transmitted to the inter predictor 221 to be used as motion information of spatially neighboring blocks or temporally neighboring blocks. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 222.
[0052] FIG. 3 is a diagram illustrating the configuration of a video / image decoding device to which the embodiments of this document can be applied.
[0053] As shown in FIG. 3, the decoding device 300 may 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 entropy decoder 310, residual processor 320, predictor 330, adder 340, and filter 350 may be configured as a single hardware component (e.g., a decoder chipset or processor) according to an embodiment. The memory 360 may include a decoded picture buffer (DPB) or may be configured as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.
[0054] When a bitstream including video / image information is input, the decoding device 300 can reconstruct an image corresponding to the process by which the video / image information was processed by the encoding device of FIG. 2. For example, the decoding device 300 can derive units / blocks based on block division-related 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 is, for example, a coding unit, and the coding unit can be divided from a coding tree unit or a maximal coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the coding unit. The reconstructed image signal decoded and output by the decoding device 300 can be reproduced through a playback device.
[0055] The decoding device 300 may receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may 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 on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may also include general constraint information. The decoding device may further decode pictures based on the information on the parameter sets and / or the general constraint information. Signaling / received information and / or syntax elements, which will be described later in this document, may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as Exponential-Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration, quantized values of transform coefficients related to residuals, etc. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using information on the syntax element to be decoded and decoded information on neighboring and current blocks, or information on symbols / bins decoded in previous steps, predicts the occurrence probability of the bins based on the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element. After determining the context model, the CABAC entropy decoding method may update the context model using information on the decoded symbols / bins for the context model of the next symbol / bin.Among the information decoded by the entropy decoding unit 310, information related to prediction is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values entropy decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to a residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, among the information decoded by the entropy decoding unit 310, information related to filtering may be provided to a filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the 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 this 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, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.
[0056] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding device. The inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0057] The inverse transform unit 322 performs inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0058] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information about the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0059] The predictor 320 may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may apply intra prediction or inter prediction for predicting a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as combined inter and intra prediction (CIIP). The predictor may also use 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 image / video coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving 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 may be seen as an example of intra coding or intra prediction. When the palette mode is applied, information regarding a palette table and a palette index may be included in the video / image information and signaled.
[0060] The intra prediction unit 331 may predict a current block by referring to samples in a current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away from the current block depending on the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.
[0061] The inter prediction unit 332 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted from the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on the inter prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. For example, the inter prediction unit 332 may construct a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on received candidate selection information. Inter prediction may be performed based on various prediction modes, and the prediction information may include information indicating the inter prediction mode for the current block.
[0062] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a predicted signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as a reconstructed block.
[0063] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in the current picture, may be output after filtering as described below, or may be used for inter prediction of a next picture.
[0064] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during the picture decoding process.
[0065] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0066] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter predictor 332. The memory 360 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter predictor 260 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 331.
[0067] In this specification, the embodiments described for the filtering unit 260, inter prediction unit 221, and intra prediction unit 222 of the encoding device 200 can also be applied identically or correspondingly to the filtering unit 350, inter prediction unit 332, and intra prediction unit 331 of the decoding device 300, respectively.
[0068] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When the quantization / dequantization is omitted, the quantized transform coefficients may be referred to as transform coefficients. When the transform / inverse transform is omitted, the transform coefficients may be referred to as coefficients or residual coefficients, or may still be referred to as transform coefficients for consistency of expression.
[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 about the transform coefficient(s), and the information about the transform coefficient(s) may be signaled via a residual coding syntax. Transform coefficients may be derived based on the residual information (or information about the transform coefficient(s)), and scaled transform coefficients may be derived through an inverse transform (scaling) of the transform coefficient(s). Residual samples may be derived based on an inverse transform (transform) of the scaled transform coefficient(s). This may be similarly applied / expressed in other parts of this document.
[0070] FIG. 4 shows 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 image / video decoding process and itself, a lower system that transmits and stores the coded information, and a NAL (network abstraction layer) that exists between the VCL and the lower system and is responsible for network adaptation functions.
[0072] The VCL can generate VCL data containing compressed image data (slice data), or it can generate parameter sets containing information such as a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), and a Video Parameter Set (VPS), or an SEI (Supplemental Enhancement Information) message that is additionally required for the image decoding process.
[0073] In NAL, NAL units can be generated by adding header information (NAL unit header) to RBSP (Raw Byte Sequence Payload) generated by VCL. In this case, RBSP refers to slice data, parameter sets, SEI messages, etc. generated by VCL. The NAL unit header can include NAL unit type information identified by the RBSP data included in the NAL unit.
[0074] As shown in the figure, NAL units can be classified into VCL NAL units and non-VCL NAL units according to the RBSP generated by the 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 for decoding an image (parameter set or SEI message).
[0075] The VCL NAL unit and non-VCL NAL unit can be transmitted over a network with header information according to the data standard of the lower system. For example, the NAL unit can be transformed into a data format of a predetermined standard 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 of an NAL unit can be identified by the RBSP data structure included in the NAL unit, and information about the NAL unit type can be stored and signaled in the NAL unit header.
[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 an image (slice data). VCL NAL unit types can be classified according to the nature and type of pictures contained in the VCL NAL unit, and non-VCL NAL unit types can be classified according to the type of parameter set.
[0078] The following are examples of NAL unit types identified according to the types of parameter sets included in the non-VCL NAL unit types.
[0079] - APS (Adaptation Parameter Set) NAL unit: Type for NAL units that contain APS
[0080] - DPS (Decoding Parameter Set) NAL unit: Type for NAL units that contain DPS
[0081] - VPS (Video Parameter Set) NAL unit: Type for NAL units that contain VPS
[0082] - SPS (Sequence Parameter Set) NAL unit: Type for NAL units that contain SPS
[0083] - PPS (Picture Parameter Set) NAL unit: Type for NAL units that contain PPS
[0084] - PH (Picture header) NAL unit: Type for NAL units containing PH
[0085] The NAL unit type has syntax information for the NAL unit type, and the syntax information can be stored in a NAL unit header and signaled. For example, the syntax information can be nal_unit_type, and the NAL unit type can 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. The decoding device can decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals.
[0087] For example, the coding method described above can be performed as follows:
[0088] FIG. 5 illustrates an example of CABAC (context-adaptive binary arithmetic coding) for encoding a syntax element. For example, in the CABAC encoding process, if an input signal is a syntax element that is not a binary value, an encoding device can binarize the input signal and convert it into a binary value. Also, if the input signal is already a binary value (i.e., the value of the input signal is a binary value), binarization can be bypassed. Here, each binary digit 0 or 1 constituting a 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 for one syntax element can indicate the value of the syntax element.
[0089] The binarized bins of the syntax elements can then be input to a regular encoding engine or a bypass encoding engine. The regular encoding engine of the encoding device can assign a context model reflecting a probability value to the bin and encode the bin based on the assigned context model. The regular encoding engine of the encoding device can update the context model for each bin after encoding the bin. Bins encoded as described above can be referred to as context-coded bins.
[0090] Meanwhile, when the binarized bins of the syntax elements are input to the bypass encoding engine, they can be coded as follows. For example, the bypass encoding engine of the encoding device omits the steps of estimating the probability for the input bins and updating the probability model applied to the bins after encoding. When bypass encoding is applied, the encoding device can encode the input bins by applying a uniform probability distribution instead of assigning a context model, thereby improving the encoding speed. The bins encoded as described above can be referred to as bypass bins.
[0091] Entropy decoding can refer to the process of performing the same process as the entropy encoding in reverse order.
[0092] For example, when a syntax element is decoded based on a context model, a decoding device can receive a bin corresponding to the syntax element through a bitstream, determine a context model using the syntax element and decoding information of a block to be decoded or a neighboring block, or information on a symbol / bin decoded in a previous step, predict the occurrence probability of the received bin based on the determined context model, perform arithmetic decoding of the bin, and derive the value of the syntax element. Then, the context model of a bin to be decoded next can be updated using the determined context model.
[0093] For example, when a syntax element is bypass decoded, a 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 decoding device may omit the steps of deriving a context model for the syntax element and updating the context model applied to the bin after decoding.
[0094] As described above, prediction is performed to improve compression efficiency during video coding. A predicted block including predicted samples for a current block, which is a block to be coded, can be generated through this prediction. Here, the predicted block includes predicted samples in the spatial domain (or pixel domain). The predicted block is derived in the same way by an encoding device and a decoding device. The encoding device can improve image coding efficiency by signaling to a decoding device information (residual information) regarding the residual between the original block and the predicted block, rather than the original sample values of the original block themselves. The decoding device can derive a residual block including residual samples based on the residual information, combine the residual block with the predicted block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.
[0095] The residual information may be generated through a transform and quantization procedure. For example, an encoding device may derive a residual block between the original block and the predicted block, perform a transform procedure on residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and signal the related residual information (via a bitstream) to a decoding device. Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. A decoding device may perform an inverse quantization / inverse transform procedure based on the residual information to 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 may further derive a residual block by inverse quantizing / inverse transforming the quantized transform coefficients for reference for inter-prediction of a subsequent picture, and generate a reconstructed picture based on the residual block.
[0096] Intra prediction may refer to a prediction that generates prediction samples for a current block based on reference samples in a picture to which the current block belongs (hereinafter, the current picture). When intra prediction is applied to the current block, neighboring reference samples used for intra prediction of the current block may be derived. The neighboring reference samples of the current block may include samples adjacent to the left boundary and bottom-left neighboring samples of a current block having a size of nW×nH, a total of 2×nH samples, samples adjacent to the top boundary and top-right neighboring samples of the current block, a total of 2×nW samples, and one sample adjacent to the top-left neighboring sample of the current block. Alternatively, the neighboring reference samples of the current block may include multiple columns of upper neighboring samples and multiple rows of left neighboring samples. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nW×nH, a total of nW samples adjacent to the bottom boundary of the current block, and 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 surrounding reference samples to be used for prediction by substituting unavailable samples for available samples, or may construct surrounding reference samples to be used for prediction through interpolation of available samples.
[0098] When neighboring reference samples are derived, (i) a predicted sample can be derived based on an average or interpolation of neighboring reference samples of the current block, or (ii) the predicted sample can be derived based on a reference sample that exists in a specific (prediction) direction with respect to the predicted sample among the neighboring reference samples of the current block. (i) can be called a non-directional mode or a non-angular mode, and (ii) can be called a directional mode or an angular mode.
[0099] In addition, the predicted sample may be generated by interpolating a first neighboring sample located in the prediction direction of the intra prediction mode of the current block and a second neighboring sample located in the opposite direction to the prediction direction based on the predicted sample of the current block among the neighboring reference samples. This case may be called linear interpolation intra prediction (LIP). Alternatively, a chroma predicted sample may be generated based on a luma sample using a linear model (LM). This case may be called an LM mode or a CCLM (chroma component LM) mode.
[0100] Alternatively, a provisional predicted sample of the current block may be derived based on filtered neighboring reference samples, and the predicted sample of the current block may be derived by weighting the provisional predicted sample with at least one reference sample derived according to the intra prediction mode from the existing neighboring reference samples, i.e., non-filtered neighboring reference samples. The above case may be referred to as Position Dependent Intra Prediction (PDPC).
[0101] In addition, intra-prediction coding may be performed by selecting a reference sample line with the highest prediction accuracy from among multiple reference sample lines surrounding the current block, deriving a prediction sample using a reference sample located in the prediction direction of the selected line, and signaling the used reference sample line to a decoding device. This case may be called multi-reference line intra-prediction or MRL-based intra-prediction.
[0102] In addition, the current block may be divided into vertical or horizontal sub-partitions and intra prediction may be performed based on the same intra prediction mode, but neighboring reference samples may be derived and used for each sub-partition. That is, in this case, the intra prediction mode for the current block is applied to the sub-partitions in the same manner, but neighboring reference samples may be derived and used for each sub-partition, thereby improving intra prediction performance in some cases. This prediction method may be called intra sub-partitions (ISP)-based intra prediction.
[0103] The above-described intra prediction methods may be referred to as intra prediction types, distinguished from intra prediction modes. The intra prediction types may be referred to by various terms, such as intra prediction techniques or additional intra prediction modes. For example, the intra prediction types (or additional intra prediction modes, etc.) may include at least one of the above-described LIP, PDPC, MRL, and ISP. A general intra prediction method other than the specific intra prediction types, such as LIP, PDPC, MRL, and ISP, may be referred to as a normal intra prediction type. The normal intra prediction type may be generally applied when the above-described specific intra prediction types are not applied, and prediction may be performed based on the above-described intra prediction modes. Meanwhile, post-processing filtering may be performed on the derived prediction samples, if necessary.
[0104] Specifically, the intra prediction procedure may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and a prediction sample derivation step based on the intra prediction mode / type. In addition, a post-processing filtering step may be performed on the derived prediction sample, if necessary.
[0105] FIG. 6 shows an example of an intra-prediction based video / image encoding method.
[0106] As shown in FIG. 6, the encoding apparatus performs intra prediction on a current block (S600). The encoding apparatus may derive an intra prediction mode / type for the current block, derive neighboring reference samples for the current block, and generate predicted samples within the current block based on the intra prediction mode / type and the neighboring reference samples. Here, the intra prediction mode / type determination, neighboring reference sample derivation, and predicted sample generation procedures may be performed simultaneously, or one procedure may be performed before the other procedures. The encoding apparatus may determine a mode / type to be applied to the current block from among multiple intra prediction modes / types. The encoding apparatus may compare RD costs for the intra prediction modes / types to determine the optimal intra prediction mode / type for the current block.
[0107] Meanwhile, the encoding apparatus may also perform a prediction sample filtering procedure, which may be called 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.
[0108] The encoding apparatus generates residual samples for the current block based on the (filtered) predicted samples (S610). The encoding apparatus can derive the residual samples by comparing the predicted samples with the original samples of the current block based on phase.
[0109] The encoding device may encode image information including information related to the intra prediction (prediction information) and residual information related to 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 residual information may include a residual coding syntax, which will be described later. An encoding device may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information about the quantized transform coefficients.
[0111] Meanwhile, as described above, the encoding apparatus can generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the encoding apparatus can again inverse-quantize / inverse-transform the quantized transform coefficients to derive (modified) residual samples. The reason for again performing inverse-quantization / inverse-transformation on the residual samples after transforming / quantizing them is to derive residual samples that are the same as the residual samples derived by the decoding apparatus, as described above. The encoding apparatus can generate a reconstructed block including reconstructed samples for the current block based on the predicted samples and the (modified) residual samples. A reconstructed picture for the current picture can be generated based on the reconstructed block. As described above, an in-loop filtering procedure, etc., can be further applied to the reconstructed picture.
[0112] FIG. 7 illustrates an example of an intra-prediction based video / image encoding method.
[0113] The decoding device can perform operations corresponding to those performed by the encoding device.
[0114] Prediction information and residual information can be obtained from a bitstream. Residual samples for a current block can be derived based on the residual information. Specifically, transform coefficients can be derived by performing inverse quantization based on quantized transform coefficients derived based on the residual information, and residual samples for the current block can be derived by performing inverse transform on the transform coefficients.
[0115] Specifically, the decoding apparatus may derive an intra-prediction mode / type for a current block based on received prediction information (intra-prediction mode / type information) (S700). The decoding apparatus may derive neighboring reference samples for the current block (S710). The decoding apparatus may generate prediction samples within the current block based on the intra-prediction mode / type and the neighboring reference samples (S720). In this case, the decoding apparatus may perform a prediction sample filtering procedure. The 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 reconstructed samples for the current block based on the predicted samples and the residual samples, and derives a reconstructed block including the reconstructed samples (S740). A reconstructed picture for the current picture may be generated based on the reconstructed block. As described above, an in-loop filtering procedure may be further applied to the reconstructed picture.
[0117] The intra prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether a most probable mode (MPM) or a remaining mode is applied to the current block. If the MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be configured as an MPM candidate list or an MPM list. 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) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). A decoding device may determine the intra prediction mode of the current block based on the intra prediction mode information.
[0118] 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. For 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 block, or ISP type information (e.g., intra_subpartitions_split_flag) indicating a subpartition split type if the ISP is applied. The intra prediction type information may also include an MIP flag indicating whether matrix-based intra prediction (MIP) is applied to the current block.
[0119] The intra prediction mode information and / or the intra prediction type information may be encoded / decoded using the coding methods described herein, for example, via entropy coding (e.g., CABAC, CAVLC).
[0120] FIG. 8 exemplarily illustrates the intra prediction procedure.
[0121] 8, as described above, the intra prediction procedure may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and an intra prediction execution (prediction sample generation) step. The intra prediction procedure may be performed by an encoding device and a decoding device as described above. In this document, a coding device may include an encoding device and / or a decoding device.
[0122] As shown in FIG. 8, the coding device determines an intra-prediction mode / type (S800).
[0123] The encoding device may determine an intra-prediction mode / type to be applied to the current block from among the various intra-prediction modes / types described above and generate prediction-related information. The prediction-related information may include intra-prediction mode information indicating the intra-prediction mode to be applied to the current block and / or intra-prediction type information indicating the intra-prediction type to be applied to the current block. The decoding device may determine the intra-prediction mode / type to be applied to the current block based on the prediction-related information.
[0124] The intra prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether a most probable mode (MPM) or a remaining mode is applied to the current block. If the MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be configured as an MPM candidate list or an MPM list. 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) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). A decoding device may determine the intra prediction mode of the current block based on the intra prediction mode information.
[0125] 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. For 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 a subpartition split type if the ISP is applied. The intra prediction type information may also include an MIP flag indicating whether matrix-based intra prediction (MIP) is applied to the current block.
[0126] For example, when intra prediction is applied, the intra prediction mode to be applied to the current block may be determined using the intra prediction mode of a neighboring block. For example, the coding apparatus may select one of MPM candidates in an MPM (most probable mode) list derived based on the intra prediction modes of neighboring blocks (e.g., left and / or upper neighboring blocks) of the current block and / or additional candidate modes based on a received MPM index, or may select one of the remaining intra prediction modes not included in the MPM candidates (and planar mode) based on MPM remainder information (remaining intra prediction mode information). The MPM list may be configured to include or not include a planar mode as a candidate. For example, if the MPM list includes a planar mode as a candidate, the MPM list may have six candidates, and if the MPM list does not include a planar mode as a candidate, the MPM list may have five candidates. If the MPM list does not include a planar mode as a candidate, a not planar flag (e.g., intra_luma_not_planar_flag) indicating that the intra prediction mode of the current block is not a 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 if the MPM flag has a value of 1. Also, the MPM index may be signaled if the not planar flag has a value of 1. Here, the reason why the MPM list is configured not to include a planar mode as a candidate is that, rather than the planar mode not being an MPM, the planar mode is always considered as an MPM, and therefore a flag (not planar flag) is signaled first to first confirm whether or not the mode 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 among the remaining mode may be indicated based on an 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 MPM index may be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information may be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information may index the remaining intra prediction modes not included in the MPM candidates (and planar modes) among all intra prediction modes in order of prediction mode numbers and point to one of them. The intra prediction mode may be an intra prediction mode for a luma component (sample). Hereinafter, the intra prediction mode information may include at least one of the MPM flag (ex. intra_luma_mpm_flag), the not planar flag (ex. intra_luma_not_planar_flag), the MPM index (ex. mpm_idx or intra_luma_mpm_idx), and the remaining intra prediction mode information (rem_intra_luma_pred_mode or intra_luma_mpm_remainder).In this document, an MPM list may be referred to by various terms, such as an MPM candidate list, a candModeList, etc.
[0128] If MIP is applied to the current block, a separate MPM flag (ex. intra_mip_mpm_flag), MPM index (ex. intra_mip_mpm_idx), and remaining intra-prediction mode information (ex. intra_mip_mpm_remainder) for MIP may be signaled, and the not planar flag may not be signaled.
[0129] In other words, when an image is generally divided into blocks, the current block to be coded and neighboring blocks have similar image characteristics. Therefore, the current block and neighboring blocks are likely to have the same or similar intra-prediction modes. Therefore, an encoder can use the intra-prediction modes of neighboring blocks to encode the intra-prediction mode of the current block.
[0130] A coding apparatus may configure an MPM (Most Probable Modes) list for a 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 similarities between a current block and neighboring blocks during intra-prediction mode coding. As described above, the MPM list may be configured to include or exclude planar modes. For example, if the MPM list includes planar modes, the number of candidates in the MPM list may be six. If the MPM list does not include planar modes, the number of candidates in the MPM list may be five.
[0131] An encoding device may perform prediction based on various intra prediction modes and determine an optimal intra prediction mode based on rate-distortion optimization (RDO) based on the prediction. In this case, the encoding device may determine the optimal intra prediction mode using only the MPM candidates and planar modes configured in the MPM list, or may determine the optimal intra prediction mode using not only the MPM candidates and planar modes configured in the MPM list but also the remaining intra prediction modes. Specifically, for example, if the intra prediction type of the current block is a specific type other than a normal intra prediction type (e.g., LIP, MRL, or ISP), the encoding device may determine the optimal intra prediction mode by considering only the MPM candidates and planar modes as intra prediction mode candidates for the current block. That is, in this case, the intra prediction mode for the current block may be determined from the MPM candidates and planar modes, and in this case, the MPM flag may not be encoded / signaled. In this case, the decoding device can infer that the MPM flag is 1 even if the MPM flag is not separately signaled.
[0132] Meanwhile, in general, if the intra prediction mode of the current block is not a planar mode but one of the MPM candidates in the MPM list, the encoding device generates an MPM index (mpm idx) that points to one of the MPM candidates. If the intra prediction mode of the current block is not in the MPM list either, the encoding device generates MPM remainder information (remaining intra prediction mode information) that points to the same mode as the intra prediction mode of the current block among the remaining intra prediction modes not included in the MPM list (and planar modes). The MPM remainder information may include, for example, an intra_luma_mpm_remainder syntax element.
[0133] The decoding device obtains intra prediction mode information from a bitstream. As described above, the intra prediction mode information may include at least one of an MPM flag, a not planar flag, an MPM index, and MPM remainder information (remaining intra prediction mode information). The decoding device may configure an MPM list. The MPM list is configured in the same manner as the MPM list configured in the encoding device. That is, the MPM list may include intra prediction modes of neighboring blocks and may further include a specific intra prediction mode according to a predetermined method.
[0134] The decoding device may determine the intra prediction mode of the current block based on the MPM list and the intra prediction mode information. For example, if the MPM flag has a value of 1, the decoding device may derive a planar mode as the intra prediction mode of the current block (not based on the planar flag), or may derive a candidate indicated by the MPM index from among MPM candidates in the MPM list as the intra prediction mode of the current block. Here, the MPM candidate may refer to only candidates included in the MPM list, or may include not only candidates included in the MPM list but also planar modes that can be applied when the MPM flag has a value of 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 referred to as mpm remainder information) from among the remaining intra prediction modes not included in the MPM list and planar 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), the decoding device may derive the planar mode or a candidate pointed to by the MPM flag in the MPM list as the intra prediction mode of the current block without parsing / decoding / checking the MPM flag.
[0136] The coding apparatus derives neighboring reference samples for a current block (S810). When intra prediction is applied to the current block, neighboring reference samples used for intra prediction of the current block may be derived. The neighboring reference samples for the current block may include samples adjacent to the left boundary and bottom-left neighboring samples of the current block having a size of nW×nH, a total of 2×nH samples, samples adjacent to the top boundary and top-right neighboring samples of the current block, a total of 2×nW samples, and one sample adjacent to the top-left neighboring sample of the current block. Alternatively, the neighboring reference samples for the current block may include multiple columns of upper neighboring samples and multiple rows of left neighboring samples. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nW×nH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.
[0137] On the other hand, when MRL is applied (i.e., when the value of the MRL index is greater than 0), the neighboring reference samples may be located on the 1st or 2nd line adjacent to the current block on the left / top side, not on the 0th line, and in this case, the number of neighboring reference samples may be further increased.On the other hand, when ISP is applied, the neighboring reference samples may be derived in sub-partition units.
[0138] The coding apparatus performs intra prediction on the current block to derive predicted samples (S820). The coding apparatus may derive the predicted samples based on the intra prediction mode / type and the surrounding samples. The coding apparatus may derive reference samples according to the intra prediction mode of the current block from the surrounding reference samples of the current block, and may derive predicted samples of the current block based on the reference samples.
[0139] Meanwhile, according to one embodiment, a block differential pulse coded modulation (BDPCM) technique may be used. BDPCM is also sometimes called quantized residual block-based delta pulse code modulation (RDPCM).
[0140] When predicting a block using BDPCM, reconstructed samples can be used to predict rows or columns of the block line-by-line. In this case, the reference samples used may be unfiltered samples. The direction of BDPCM 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 the BDPCM direction. A prediction error may be quantized in the spatial domain, and a sample may be reconstructed by adding a dequantized prediction error to the prediction (i.e., the prediction sample). The prediction error may represent a residual. As an alternative to such BDPCM, a quantized residual-domain BDPCM may be proposed, and the prediction direction and signaling may be the same as those of BDPCM applied in the spatial domain. That is, the residual can be reconstructed through dequantization after the quantized coefficients themselves are superimposed using the quantized residual-domain BDPCM, as in Delta Pulse Code Modulation (DPCM). Therefore, quantized residual domain BDPCM may refer to applying DPCM in the residual coding stage. Hereinafter, the quantized residual domain refers to a domain for quantized residual samples, in which residuals derived based on prediction are quantized without transform. For example, the quantized residual domain may include quantized residuals (or quantized residual coefficients) to which a transform skip is applied, i.e., to residual samples to which a transform is skipped but quantization is applied. Alternatively, for example, the quantized residual domain may include quantized transform coefficients.
[0141] For a block of size MXN, the residual derived using the unfiltered samples of the left or upper boundary (i.e., the left peripheral samples or the upper peripheral samples) is calculated by performing intra prediction horizontally (copying the sample line of the left peripheral sample to the predicted block line by line) or intra prediction vertically (copying the sample line of the upper peripheral sample to the predicted block line by line) and the residual is calculated by r (i,j) (0≦i≦M-1, 0≦j≦N-1) where M can represent the row or height, and N can represent the column or width. (i,j) The quantized value of Q(r (i,j) ) (0≦i≦M−1, 0≦j≦N−1), where the residual refers to the difference between the original block and the predicted block.
[0142] Then, when BDPCM is applied to the quantized residual samples, An M×N transformed array consisting of JPEG2025120218000002.jpg10116 JPEG2025120218000003.jpg7138 can be derived.
[0143] For example, when vertical BDPCM is signaled (i.e., when vertical BDPCM is applied), JPEG2025120218000004.jpg8132 can be derived as follows:
[0144]
number
[0145] That is, for example, when vertical BDPCM is applied, the encoding device may perform vertical intra prediction based on samples in the upper vicinity, and quantized residual samples for the current block may be derived as shown in Equation 1. Referring to Equation 1, the quantized residual samples of rows other than the first row of the current block may be derived as a difference between a quantized value for the corresponding position and a quantized value for a position in the previous row of the corresponding position (i.e., a position in the upper vicinity of the corresponding position).
[0146] Similarly, when applied to horizontal prediction (i.e., when horizontal BDPCM is applied), the residual quantized samples can be derived as follows:
[0147]
number
[0148] That is, for example, when horizontal BDPCM is applied, the encoding device may perform horizontal intra prediction based on samples in the left vicinity, and quantized residual samples for the current block may be derived as shown in Equation 2. Referring to Equation 2, the quantized residual samples of columns other than the first column of the current block may be derived as a difference between a quantized value for a corresponding position and a quantized value for a position in the previous column (i.e., a position in the left vicinity of the corresponding position).
[0149] the quantized residual samples JPEG2025120218000007.jpg10117 can be sent to a decoding device.
[0150] In the decoding device, Q(r (i,j)) (0≦i≦M−1, 0≦j≦N−1), the above operations can be performed in reverse.
[0151] For vertical prediction, the following formula can be applied:
[0152]
number
[0153] For horizontal prediction, the following formula can be applied:
[0154]
number
[0155] Dequantized quantized residual JPEG2025120218000010.jpg12122 is combined with the intra block prediction values to derive the reconstructed sample values.
[0156] The main advantage of such a technique is that the inverse BDPCM can be performed by simply adding a predictor during or even after parsing the coefficients.
[0157] As described above, BDPCM can be applied to the quantized residual domain, which can include quantized residuals (or quantized residual coefficients), and transform skip can be applied to the residuals. That is, when BDPCM is applied, transform can be skipped and quantization can be applied to residual samples. Alternatively, the quantized residual domain can include quantized transform coefficients. A flag indicating whether BDPCM is applicable can be signaled at the sequence level (SPS), and such a flag can be signaled only when transform skip mode is signaled as being possible in the SPS. This flag may be called a BDPCM available flag or an SPS BDPCM available flag.
[0158] When BDPCM is applied, intra prediction can be performed on the entire block by sample copying according to a prediction direction similar to the intra prediction direction (e.g., vertical prediction or horizontal prediction). The residual, which is the difference value between the original and the predicted block, is quantized with the transform skipped, and the delta value between the quantized residual and the predictor for the horizontal or vertical direction (i.e., the quantized residual for the horizontal or vertical direction), i.e., the difference value JPEG2025120218000011.jpg10130 can be coded.
[0159] If BDPCM is applicable, flag information can be transmitted at the CU level if the CU size is smaller than or equal to MaxTsSize (maximum transform skip block size) for luma samples and the CU is coded using intra prediction. The flag information may be referred to as a BDPCM flag. Here, MaxTsSize may refer to the maximum block size for which transform skip mode is allowed. The flag information may indicate whether normal intra coding or BDPCM is applied. If BDPCM is applied, a BDPCM prediction direction flag indicating whether the prediction direction is horizontal or vertical can be transmitted. The BDPCM prediction direction flag may be referred to as a BDPCM direction flag. The block can then be predicted through a normal horizontal or vertical intra prediction process using unfiltered reference samples. Furthermore, residuals are quantized, and the difference between each quantized residual and its predictor, e.g., the already quantized residual at a neighboring position in the horizontal or vertical direction according to the BDPCM prediction direction, may be coded.
[0160] On the other hand, the aforementioned BDPCM can be written in the format of a standard document, as will be described later.
[0161] For example, the syntax elements for the BDPCM available flag and the semantics for the syntax elements can be shown as in the following table.
[0162] [Table 1]
[0163] [Table 2]
[0164] Table 1 shows sps_bdpcm_enabled_flag and sps_bdpcm_chroma_enabled_flag signaled in a Sequence Parameter Set (SPS). When the syntax element sps_bdpcm_enabled_flag is 1, it indicates that flag information indicating whether BDPCM is applied to a coding luma unit for which intra prediction is performed, i.e., 'intra_bdpcm_luma_flag', is present in the coding luma unit. When the syntax element sps_bdpcm_chroma_enabled_flag is 1, it indicates that flag information indicating whether BDPCM is applied to a coding chroma unit for which intra prediction is performed, i.e., 'intra_bdpcm_chroma_flag', is present in the coding chroma unit. The syntax elements sps_bdpcm_enabled_flag and sps_bdpcm_chroma_enabled_flag may be syntax elements for the BDPCM availability flag. Also, if the syntax element "sps_bdpcm_enabled_flag" does not exist, its value may be considered to be 0. Furthermore, if the syntax element "sps_bdpcm_chroma_enabled_flag" does not exist, its value may be considered to be 0.
[0165] Also, for example, the syntax elements for the BDPCM flag and the BDPCM direction flag can be signaled separately for the luma component and the chroma component. For example, the coding unit syntax including the syntax elements and the semantics of the syntax elements can be shown as in the following table.
[0166] [Table 3-1]
[0167]
Table 3-2
[0168]
Table 3-3
[0169]
Table 3-4
[0170]
Table 3-5
[0171]
Table 3-6
[0172]
Table 3-7
[0173]
Table 3-8
[0174]
Table 4
[0175] As described above, the syntax element intra_bdpcm_luma_flag in Table 3 may indicate whether BDPCM is applied to the current luma block, and intra_bdpcm_chroma_flag may indicate whether BDPCM is applied to the current luma block or the current chroma block. For example, if the value of intra_bdpcm_luma_flag or intra_bdpcm_chroma_flag is 1, the transform for the coding block is skipped, and the prediction mode for the coding block may be set to horizontal or vertical by intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag, which indicates the prediction direction. If intra_bdpcm_luma_flag or intra_bdpcm_chroma_flag is not present, this value may be considered to be 0.
[0176] Also, for example, if the value of intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag, which indicates the prediction direction, is 0, it can indicate that the prediction direction of BDPCM is horizontal, and if the value of intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag is 1, it can indicate that the prediction direction of BDPCM is vertical.
[0177] Meanwhile, the intra_bdpcm_luma_flag may indicate a syntax element of a BDPCM luma flag for the current luma block, the intra_bdpcm_chroma_flag may indicate a syntax element of a BDPCM chroma flag for the current chroma block, the intra_bdpcm_luma_dir_flag may indicate a syntax element of a BDPCM luma direction flag for the current luma block, and the intra_bdpcm_chroma_dir_flag may indicate a syntax element of a BDPCM chroma direction flag for the current chroma block.
[0178] Furthermore, when BDPCM is applied, an example of the inverse quantization process can be shown as in the following table.
[0179] [Table 5-1]
[0180] [Table 5-2]
[0181] [Table 5-3]
[0182] Alternatively, when BDPCM is applied, an example of the inverse quantization process can be shown as in the following table.
[0183] [Table 6-1]
[0184] [Table 6-2]
[0185] [Table 6-3]
[0186] [Table 6-4]
[0187] Referring to Table 5 or Table 6, if the value of bdpcm_flag is 1, the dequantized residual value d[x][y] may be derived based on the intermediate variable dz[x][y]. Here, x is the horizontal coordinate and increases from left to right, and y is the vertical coordinate and increases from top to bottom. A position within a two-dimensional block may be expressed as (x, y). Furthermore, a position within a two-dimensional block indicates a position (x, y) when the upper left position of the block is set to (0, 0).
[0188] For example, if the value of bdpcm_dir_flag is 0, i.e., if horizontal BDPCM is applied, the variable dz[x][y] may 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 a sample located in the first column where x is 0 may be derived from TransCoeffLevel[xTbY][yTbY][cIdx][x][y] derived based on the residual information of the sample, and the variable dz[x][y] of a sample located in a column other than the first column where x is not 0 may be derived by the sum of dz[x-1][y] of the sample's left neighboring sample and dz[x][y] for the sample. Here, dz[x][y] for the sample to be combined with dz[x-1][y] can be derived based on the signaled residual information for the sample.
[0189] Furthermore, for example, if the value of bdpcm_dir_flag is 1, i.e., if vertical BDPCM is applied, the variable dz[x][y] may 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 may be derived from TransCoeffLevel[xTbY][yTbY][cIdx][x][y] derived based on the residual information of the sample, and the variable dz[x][y] of a sample located in a row other than the first row where y is not 0 may be derived by summing dz[x][y-1] of the sample's upper neighboring sample and dz[x][y] for the sample. Here, dz[x][y] for the sample combined with dz[x][y-1] may be derived based on the signaled residual information for the sample.
[0190] As described above, the residual at a particular position can be derived based on the sum of the residual at a previous horizontal or vertical position (i.e., left or top) and the value received in the residual information at the particular position. This is because when BDPCM is applied, the residual information signals the difference between the residual sample value at a particular position (x, y) and the residual sample value at a previous horizontal or vertical position (i.e., (x-1, y) or (x, y-1)).
[0191] Although information about BPDCM can be signaled as described above, this document proposes another embodiment for signaling information about BDPCM. For example, according to existing video standards, only BDPCM is performed for luma blocks in YUV420, while BDPCM can be performed for both luma and chroma blocks in YUV444. Therefore, as shown in Table 1 above, the sequence parameter set (SPS) syntax can transmit a syntax element sps_bdpcm_enabled_flag indicating whether BDPCM is available for luma blocks and a syntax element sps_bdpcm_chroma_enabled_flag indicating whether BDPCM is available for chroma blocks. In particular, the BDPCM availability flag for chroma blocks can be transmitted only if BDPCM is available for luma blocks and the chroma format of the image is YUV444 (i.e., chroma_format_idc=3).
[0192] Unlike the above, this document proposes an embodiment in which whether BDPCM is enabled for both luma and chroma blocks is controlled based on a single flag. For example, in the proposed embodiment, only one syntax element, sps_bdpcm_enabled_flag, indicating whether BDPCM is enabled in the SPS syntax may be transmitted, as shown in Table 7 below, thereby deriving whether BDPCM is enabled for both luma and chroma blocks. According to this embodiment, whether BDPCM is enabled for luma and chroma blocks in an image can be determined using a single syntax element, thereby reducing the amount of bits required for BDPCM and improving overall coding efficiency.
[0193] [Table 7]
[0194] [Table 8]
[0195] For example, referring to Table 8, if sps_bdpcm_enabled_flag is 1, it may mean that BDPCM is available for both luma blocks and chroma blocks, and if sps_bdpcm_enabled_flag is 0, it may mean that BDPCM is not available for both luma blocks and chroma blocks. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that BDPCM is available for a coding unit (including luma components and chroma components) on which intra prediction is performed, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that BDPCM is not available for a coding unit on which intra prediction is performed. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it can indicate that intra_bdpcm_luma_flag and intra_bdpcm_chroma_flag are present in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it can indicate that intra_bdpcm_luma_flag and intra_bdpcm_chroma_flag are not present in the coding unit. Intra_bdpcm_luma_flag and intra_bdpcm_chroma_flag may also be indicated as intra_bdpcm_flag.
[0196] Meanwhile, the flag indicating whether the BDPCM is available may be transmitted not only in the SPS syntax shown in the example, but also in an APS (Adaptation Parameter Set) syntax, a PPS (Picture Parameter Set) syntax, a VPS (Video Parameter Set) syntax, a DPS (Decoding Parameter Set) syntax, a picture header syntax, or a slice header syntax.
[0197] Also, in the proposed embodiment, the semantics for the syntax element sps_bdpcm_enabled_flag may be changed as shown in Table 8.
[0198] Furthermore, in this embodiment, whether BDPCM is available for luma blocks and chroma blocks is controlled at the same time by the syntax element sps_bdpcm_enabled_flag, so the syntax of the coding unit according to this embodiment is as shown in the following table.
[0199] [Table 9-1]
[0200] [Table 9-2]
[0201] [Table 9-3]
[0202] [Table 9-4]
[0203] [Table 9-5]
[0204] [Table 9-6]
[0205] [Table 9-7]
[0206] [Table 9-8]
[0207] This document also proposes another embodiment for signaling information about BDPCM. For example, this document proposes an embodiment for controlling whether BDPCM is available for both luma blocks and chroma blocks, regardless of the chroma format of an image. According to this embodiment, information about whether BDPCM is available for luma blocks and information about whether BDPCM is available for chroma blocks can be transmitted, regardless of the chroma format of an image. According to this embodiment, a BDPCM chroma availability flag indicating whether BDPCM is available for chroma blocks in an 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 (i.e., when sps_transform_skip_enabled_flag is 1) as shown in Table 10 below, the SPS syntax can transmit the syntax element sps_bdpcm_enabled_flag indicating whether BDPCM for luma blocks is available and the syntax element sps_bdpcm_chroma_enabled_flag indicating whether BDPCM for chroma blocks is available.
[0209] [Table 10]
[0210] [Table 11]
[0211] For example, sps_bdpcm_enabled_flag being 1 may indicate that BDPCM is available for the luma block, and sps_bdpcm_enabled_flag being 0 may indicate that BDPCM is not available for the luma block. That is, for example, syntax element sps_bdpcm_enabled_flag being 1 may indicate that BDPCM is available for the luma coding unit on which intra prediction is performed, and syntax element sps_bdpcm_enabled_flag being 0 may indicate that BDPCM is not available for the luma coding unit on which intra prediction is performed. That is, for example, syntax element sps_bdpcm_enabled_flag being 1 may indicate that intra_bdpcm_luma_flag is present in the coding unit, and syntax element sps_bdpcm_enabled_flag being 0 may indicate that intra_bdpcm_luma_flag is not present in the coding unit.
[0212] Also, for example, sps_bdpcm_chroma_enabled_flag being 1 may indicate that BDPCM is available for a chroma block, and sps_bdpcm_chroma_enabled_flag being 0 may indicate that BDPCM is not available for a chroma block. That is, for example, syntax element sps_bdpcm_chroma_enabled_flag being 1 may indicate that BDPCM is available for a chroma coding unit in which intra prediction is performed, and syntax element sps_bdpcm_chroma_enabled_flag being 0 may indicate that BDPCM is not available for a chroma coding unit in which intra prediction is performed. That is, for example, syntax element sps_bdpcm_chroma_enabled_flag being 1 may indicate that intra_bdpcm_chroma_flag is present in the coding unit, and syntax element sps_bdpcm_enabled_flag being 0 may indicate that intra_bdpcm_chroma_flag is not present in the coding unit.
[0213] Meanwhile, the flag indicating whether the BDPCM is available may be transmitted not only in the SPS syntax shown in the example, but also in an APS (Adaptation Parameter Set) syntax, a PPS (Picture Parameter Set) syntax, a VPS (Video Parameter Set) syntax, a DPS (Decoding Parameter Set) syntax, a picture header syntax, or a slice header syntax.
[0214] Also, in the proposed embodiment, the semantics for the syntax element sps_bdpcm_enabled_flag and the syntax element sps_bdpcm_chroma_enabled_flag may be changed as shown in Table 11.
[0215] This document also proposes another embodiment for signaling information regarding BDPCM. For example, this document proposes an embodiment for controlling whether BDPCM is available for both luma blocks and chroma blocks, regardless of the chroma format of an image. According to this embodiment, information regarding whether BDPCM is available for luma blocks and information regarding whether BDPCM is available for chroma blocks are transmitted separately, regardless of the chroma format of an image, and information regarding whether BDPCM is available for chroma blocks can be transmitted only if BDPCM is available for the luma blocks. According to this embodiment, a BDPCM availability flag indicating whether BDPCM is available for luma blocks and chroma blocks in an 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, if transform skip mode is available (i.e., sps_transform_skip_enabled_flag is 1), the SPS syntax can transmit the syntax element sps_bdpcm_enabled_flag indicating whether BDPCM is available for luma blocks, and if BDPCM is available for luma blocks (i.e., sps_bdpcm_enabled_flag is 1), the SPS syntax can transmit the syntax element sps_bdpcm_chroma_enabled_flag indicating whether BDPCM is available for chroma blocks.
[0217] [Table 12]
[0218] [Table 13]
[0219] For example, sps_bdpcm_enabled_flag being 1 may indicate that BDPCM is available for the luma block, and sps_bdpcm_enabled_flag being 0 may indicate that BDPCM is not available for the luma block. That is, for example, syntax element sps_bdpcm_enabled_flag being 1 may indicate that BDPCM is available for the luma coding unit on which intra prediction is performed, and syntax element sps_bdpcm_enabled_flag being 0 may indicate that BDPCM is not available for the luma coding unit on which intra prediction is performed. That is, for example, syntax element sps_bdpcm_enabled_flag being 1 may indicate that intra_bdpcm_luma_flag is present in the coding unit, and syntax element sps_bdpcm_enabled_flag being 0 may indicate that intra_bdpcm_luma_flag is not present in the coding unit.
[0220] Also, for example, sps_bdpcm_chroma_enabled_flag being 1 may indicate that BDPCM is available for a chroma block, and sps_bdpcm_chroma_enabled_flag being 0 may indicate that BDPCM is not available for a chroma block. That is, for example, syntax element sps_bdpcm_chroma_enabled_flag being 1 may indicate that BDPCM is available for a chroma coding unit in which intra prediction is performed, and syntax element sps_bdpcm_chroma_enabled_flag being 0 may indicate that BDPCM is not available for a chroma coding unit in which intra prediction is performed. That is, for example, syntax element sps_bdpcm_chroma_enabled_flag being 1 may indicate that intra_bdpcm_chroma_flag is present in the coding unit, and syntax element sps_bdpcm_enabled_flag being 0 may indicate that intra_bdpcm_chroma_flag is not present in the coding unit.
[0221] Meanwhile, the flag indicating whether the BDPCM is available may be transmitted not only in the SPS syntax shown in the example, but also in an APS (Adaptation Parameter Set) syntax, a PPS (Picture Parameter Set) syntax, a VPS (Video Parameter Set) syntax, a DPS (Decoding Parameter Set) syntax, a picture header syntax, or a slice header syntax.
[0222] This document also proposes another embodiment for signaling information regarding BDPCM. For example, this document proposes an embodiment that performs the process described below in addition to one of the above-mentioned embodiments. For example, according to this embodiment, if BDPCM is available for both luma blocks and chroma blocks in the SPS syntax, VPS syntax, DPS syntax, picture header syntax, slice header syntax, or the like, and a specific condition for BDPCM to be performed is met, intra_bdpcm_chroma_flag and intra_bdpcm_chroma_dir_flag are not sent in the CU syntax or TU syntax, and the value of intra_bdpcm_chroma_flag may be derived from the value of infra_bdpcm_luma_flag, and the value of intra_bdpcm_chroma_dir_flag may be derived from the value of intra_bdpcm_luma_dir_flag. Here, for example, the specific condition may be when the tree type is a dual tree and / or when the width and height of the current block are all smaller than the maximum size of the defined transform skip block (i.e., when cbWidth<=MaxTsSize&&cbHeight<=MaxTsSize).
[0223] Alternatively, for example, according to this embodiment, if certain conditions for BDPCM to be performed are met, intra_bdpcm_chroma_flag is not transmitted, and the value of intra_bdpcm_chroma_flag can be derived from the value of intra_bdpcm_luma_flag. This means that if the luma block of the current block is coded in BDPCM mode, the chroma blocks of the current block are coded in BDPCM mode without transmitting an additional syntax element (i.e., intra_bdpcm_chroma_flag). However, in the above embodiment, intra_bdpcm_chroma_dir_flag may have a different value independently from intra_bdpcm_luma_dir_flag. That is, in the above embodiment, intra_bdpcm_chroma_dir_flag for the current block can be transmitted.
[0224] As another example, if certain conditions for the BDPCM to be performed are met, if intra_bdpcm_luma_flag and intdra_bdpcm_chroma_flag for the current block are both 1, intra_bdpcm_chroma_dir_flag is not sent and the value of intra_bdpcm_chroma_dir_flag can be derived from the value of intra_bdpcm_luma_dir_flag.
[0225] This document also proposes another embodiment for signaling information for BDPCM, for example, this document proposes an embodiment that adds the following process to one of the above-mentioned embodiments.
[0226] For example, according to this embodiment, if BDPCM for a chroma block is available based on intra_bdpcm_enabled_flag or intra_bdpcm_chroma_enabled_flag in a higher level syntax (e.g., SPS syntax, VPS syntax, DPS syntax, picture header syntax, or slice header syntax), and 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 the CU syntax or TU syntax, but intra_bdpcm_chroma_flag and intra_bdpcm_chroma_dir_flag for the Cb chroma block and the Cr chroma block can be transmitted. That is, if the value of the transmitted intra_bdpcm_chroma_flag is 1, it means that both the Cb and Cr chroma blocks of the current block are coded in BDPCM mode, and if the value of the transmitted intra_bdpcm_chroma_flag is 0, it means that neither the Cb nor Cr chroma blocks of the current block are coded in BDPCM mode. Also, if the value of the transmitted intra_bdpcm_chroma_dir_flag is 0, it may mean that the BDPCM prediction direction for the Cb and Cr chroma blocks of the current block is horizontal, and if the value of the transmitted intra_bdpcm_chroma_dir_flag is 1, it may mean that the BDPCM prediction direction for the Cb and Cr chroma blocks of the current block is vertical.
[0227] Alternatively, for example, according to this embodiment, if BDPCM for a chroma block is available based on intra_bdpcm_enabled_flag or intra_bdpcm_chroma_enabled_flag in a higher level syntax (e.g., SPS syntax, VPS syntax, DPS syntax, picture header syntax, or slice header syntax), and 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 the CU syntax or TU syntax, but intra_bdpcm_chroma_flag for the Cb chroma block and the Cr chroma block can be transmitted. That is, if the value of the transmitted intra_bdpcm_chroma_flag is 1, it means that both the Cb and Cr chroma blocks of the current block are coded in BDPCM mode, and if the value of the transmitted intra_bdpcm_chroma_flag is 0, it means that neither the Cb nor Cr chroma blocks of the current block are coded in BDPCM mode. Here, intra_bdpcm_chroma_dir_flag for each chroma block may be transmitted, and the intra_bdpcm_chroma_dir_flag for each chroma block may have different values.
[0228] For example, according to this embodiment, if 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), and the tree type is a single tree, intra_bdpcm_chroma_flag for each chroma block (Cb chroma block and Cr chroma block) can be transmitted in the CU syntax or TU syntax, and intra_bdpcm_chroma_dir_flag for the Cb chroma block and the Cr chroma block can be transmitted.
[0229] That is, if the value of intra_bdpcm_chroma_flag transmitted for a chroma block is both 1, the intra_bdpcm_chroma_dir_flag for the chroma block coded later among the two chroma blocks is not coded, and the intra_bdpcm_chroma_dir_flag of the chroma chroma block coded earlier among the two chroma blocks may be directly derived as the intra_bdpcm_chroma_dir_flag for the chroma block coded later. For example, if the value of intra_bdpcm_chroma_dir_flag is 0, it may mean that the BDPCM prediction direction for the Cb and Cr chroma blocks of the current block is horizontal, and if the value of intra_bdpcm_chroma_dir_flag is 1, it may mean that the BDPCM prediction direction for the Cb and Cr chroma blocks of the current block is vertical.
[0230] Figure 9 schematically illustrates an image encoding method by the encoding device according to the present document. The method disclosed in Figure 9 may be performed by the encoding device disclosed in Figure 2. Specifically, for example, steps S900 and S920 to S930 in Figure 9 may be performed by a prediction unit of the encoding device, and steps S910 and S940 to S950 may be performed by an entropy encoding unit of the encoding device. Also, although not shown, the process of deriving residual samples may be performed by a residual processing unit of the encoding device, and the process of generating reconstructed samples and reconstructed pictures based on the residual samples and predicted samples may be performed by an adder unit of the encoding device.
[0231] The encoding device determines whether block-based delta pulse code modulation (BDPCM) is available for the chroma blocks and luma blocks (S900). For example, the encoding device may determine whether the BDPCM is available for the chroma blocks and luma blocks in an image.
[0232] The encoding apparatus generates a BDPCM availability flag indicating whether the BDPCM is available for the chroma block and the luma block based on the determination result (S910). The encoding apparatus may generate a BDPCM availability flag indicating whether the BDPCM is available for the chroma block and the luma block based on the determination result. For example, the image information may include a BDPCM availability flag indicating whether BDPCM (Block-based Delta Pulse Code Modulation) is available for the chroma block and the luma block. For example, the BDPCM availability flag may indicate whether BDPCM (Block-based Delta Pulse Code Modulation) is available for the chroma block and the luma block. For example, if the value of the BDPCM available flag is 1, the BDPCM available flag may indicate that BDPCM (Block-based Delta Pulse Code Modulation) is available for the chroma block and the luma block. If the value of the BDPCM available flag is 0, the BDPCM available flag may indicate that BDPCM (Block-based Delta Pulse Code Modulation) is not available for the chroma block and the luma block. That is, for example, the BDPCM available flag may indicate whether a BDPCM flag for the chroma block and the luma block is present. For example, if the value of the BDPCM available flag is 1, the BDPCM available flag may indicate that a BDPCM flag for the chroma block and the luma block may be present. If the value of the BDPCM available flag is 0, the BDPCM available flag may indicate that a BDPCM flag for the chroma block and the luma block is not present. Also, for example, the chroma block may include a block of a chroma Cb component (chroma Cb block) and / or a block of a chroma Cr component (chroma Cr block).
[0233] Furthermore, for example, the BDPCM available flag can be signaled regardless of the chroma format of an image. For example, the BDPCM available flag can be signaled when the chroma format of an image is YUV444, YUV420, or YUV422. That is, for example, the BDPCM available flag can be signaled even when the chroma format of an image is YUV444.
[0234] Furthermore, for example, the BDPCM enabled flag can be signaled in a higher level syntax. For example, the BDPCM enabled flag can be signaled in a Sequence Parameter Set (SPS) syntax. Alternatively, for example, the BDPCM enabled flag can be signaled in an Adaptation Parameter Set (APS) syntax, a Picture Parameter Set (PPS) syntax, a Video Parameter Set (VPS) syntax, a Decoding Parameter Set (DPS) syntax, a Picture Header Syntax (PH) syntax, or a Slice Header Syntax. For example, the syntax element of the BDPCM enabled flag may be the aforementioned sps_bdpcm_enabled_flag.
[0235] The encoding apparatus generates a predicted sample for the current luma block based on the BDPCM (S920). For example, the encoding apparatus may determine whether BDPCM is applied to the current luma block and may determine the direction in which the BDPCM is applied.
[0236] The encoding device may derive prediction samples by performing intra prediction on the current luma block based on the prediction direction in which BDPCM is performed. For example, the prediction direction may be vertical or horizontal, and prediction samples for the current luma block may be generated according to the corresponding intra prediction mode.
[0237] For example, if the prediction direction for the current luma block is derived horizontally, the encoding apparatus may derive prediction samples for the current luma block based on a horizontal intra prediction mode. In other words, if the prediction direction for the current luma block is derived horizontally, the encoding apparatus may derive prediction samples for the current luma block by performing intra prediction based on neighboring samples to the left of the current luma block. For example, if the prediction direction for the current luma block is derived horizontally, the encoding apparatus may derive sample values of neighboring samples to the left of the current luma block as sample values of the prediction samples.
[0238] Furthermore, for example, if the prediction direction for the current luma block is derived vertically, the encoding device may derive the prediction sample of the current luma block based on a vertical intra prediction mode. In other words, for example, if the prediction direction for the current luma block is derived vertically, the encoding device may derive the prediction sample of the current luma block based on the surrounding samples above the current luma block. For example, if the prediction direction for the current luma block is derived vertically, the encoding device may derive the sample value of the surrounding sample above the same column as the prediction sample as the sample value of the prediction sample.
[0239] The encoding apparatus generates a predicted sample for the current chroma block based on the BDPCM (S930). For example, the encoding apparatus may determine whether BDPCM is applied to the current chroma block and may determine the direction in which the BDPCM is applied.
[0240] The encoding device may derive prediction samples by performing intra prediction on the current chroma block based on the prediction direction in which BDPCM is performed. For example, the prediction direction may be vertical or horizontal, and prediction samples for the current chroma block may be generated according to the corresponding intra prediction mode.
[0241] For example, if the prediction direction for the current chroma block is derived horizontally, the encoding device may derive prediction samples for the current chroma block based on a horizontal intra prediction mode. In other words, if the prediction direction for the current chroma block is derived horizontally, the encoding device may derive prediction samples for the current chroma block by performing intra prediction based on neighboring samples to the left of the current chroma block. For example, if the prediction direction for the current chroma block is derived horizontally, the encoding device may derive sample values of neighboring samples to the left of the current chroma block as sample values of the prediction samples.
[0242] Furthermore, for example, if the prediction direction for the current chroma block is derived vertically, the encoding device may derive prediction samples for the current chroma block based on a vertical intra prediction mode. In other words, if the prediction direction for the current chroma block is derived vertically, the encoding device may derive prediction samples for the current chroma block based on neighboring samples above the current chroma block. For example, if the prediction direction for the current chroma block is derived vertically, the encoding device may derive sample values of neighboring samples above the current chroma block as sample values of the prediction samples.
[0243] The encoding apparatus generates BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block (S940).
[0244] For example, if the value of the BDPCM availability flag is 1 (i.e., if it is determined that BDPCM is available for both the chroma block and the luma block), the encoding apparatus may generate BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block. The image information may include the BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block.
[0245] For example, the BDPCM-related information for the current luma block may include a BDPCM luma flag and / or a BDPCM luma direction flag for the current luma block.
[0246] For example, the encoding apparatus may determine whether BDPCM is applied to a current luma block, and may generate a BDPCM luma flag indicating 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 for the current luma block exists. For example, if the BDPCM luma flag has a value of 1, the BDPCM luma flag may indicate that the BDPCM is applied to the current luma block and a BDPCM luma direction flag for the current luma block exists. If the BDPCM luma flag has a value of 0, the BDPCM luma flag may indicate that the BDPCM is not applied to the current luma block and a BDPCM luma direction flag for the current luma block does not exist. For example, the syntax element of the BDPCM luma flag may be the above-mentioned bdpcm_flag or intra_bdpcm_luma_flag. Also, for example, the BDPCM luma flag may be signaled on a coding unit (CU) basis.
[0248] Furthermore, for example, the encoding device may determine whether BDPCM is applied to the current luma block and 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 may generate and encode the BDPCM luma direction flag. For example, the BDPCM luma direction flag may indicate a vertical or horizontal prediction direction for the current luma block. For example, if the BDPCM luma direction flag has a value of 0, the BDPCM luma direction flag may indicate that the prediction direction for the current luma block is horizontal, and if the BDPCM luma direction flag has a value of 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 above-mentioned bdpcm_dir_flag or intra_bdpcm_luma_dir_flag. Also, for example, the BDPCM luma direction flag can be signaled in units of coding units (CUs).
[0249] For example, the BDPCM-related information for the current chroma block may include a BDPCM chroma flag and / or a BDPCM chroma direction flag for the current chroma block. For example, the BDPCM-related information for the current chroma block (i.e., for all of the current chroma blocks) may be signaled when the tree type of an image is a single tree and the value of the BDPCM available flag is 1. For example, the BDPCM-related information for the current chroma block (i.e., for all of the current chroma blocks) may be signaled when the tree type of an image is a single tree and BDPCM is available for the current chroma block. Meanwhile, the tree type of the current block may be classified as a single tree or a dual tree depending on whether the current luma block and the corresponding current chroma block have separate partition structures. For example, if the current chroma block has the same partition structure as the current luma block, it can be represented as a single tree, and if the current chroma block has a different partition structure from the current luma block, it can be represented as a dual tree.
[0250] For example, the encoding apparatus may determine whether BDPCM (Block-based Delta Pulse Code Modulation) is applied to a current chroma block and may generate a BDPCM chroma flag indicating whether BDPCM (Block-based Delta Pulse Code Modulation) is applied to the current chroma block. For example, the BDPCM chroma flag may indicate whether the BDPCM is applied to the current chroma block and whether a BDPCM chroma direction flag for the current chroma block exists. For example, if the BDPCM chroma flag has a value of 1, the BDPCM chroma flag may indicate that the BDPCM is applied to the current chroma block and a BDPCM chroma direction flag for the current chroma block exists. If the BDPCM chroma flag has a value of 0, the BDPCM chroma flag may indicate that the BDPCM is not applied to the current chroma block and no BDPCM chroma direction flag for the current chroma block exists. That is, for example, when 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 for all of the current chroma blocks is present. When 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 for all of the current chroma blocks is not present. Here, for example, the current chroma block 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 above-mentioned bdpcm_flag or intra_bdpcm_chroma_flag. Also, for example, the BDPCM chroma flag may be signaled in units of coding units (CUs).
[0251] Furthermore, for example, the encoding device may determine whether BDPCM is applied to the current chroma block and 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 block, the encoding device may generate and encode the BDPCM chroma direction flag. For example, the BDPCM chroma direction flag may indicate a vertical or horizontal prediction direction for the current chroma block. For example, if the BDPCM chroma direction flag has a value of 0, the BDPCM chroma direction flag may indicate that the prediction direction for the current chroma block is horizontal, and if the BDPCM chroma direction flag has a value of 1, the BDPCM chroma direction flag may indicate that the prediction direction for the current chroma block is vertical. For example, the syntax element of the BDPCM chroma direction flag may be the above-mentioned bdpcm_dir_flag or intra_bdpcm_chroma_dir_flag. Also, for example, the BDPCM chroma direction flag can be signaled in units of CU (coding unit).
[0252] Meanwhile, for example, the encoding device may derive residual samples of the current luma block based on predicted samples of the current luma block. For example, the encoding device may derive the residual samples by subtracting original samples and the predicted samples for the current luma block. Also, for example, the encoding device may derive residual samples of the current chroma block based on predicted samples of the current chroma block. For example, the encoding device may derive residual samples by subtracting original samples and predicted samples for each of the current chroma blocks.
[0253] The encoding apparatus encodes image information including the BDPCM availability flag, the BDPCM-related information for the current luma block, and the BDPCM-related information for the current chroma block (S950). The encoding apparatus may encode image information including the BDPCM availability flag, the BDPCM-related information for the current luma block, and the BDPCM-related information for the current chroma block. For example, the BDPCM-related information for the current luma block may include a BDPCM luma flag indicating whether the BDPCM is applied to the current luma block and / or a BDPCM luma direction flag indicating a prediction direction of the current luma block, and the BDPCM-related information for the current chroma block may include a BDPCM chroma flag indicating whether the BDPCM is applied to the current chroma block and / or a BDPCM chroma direction flag indicating a prediction direction of the current chroma block.
[0254] Meanwhile, for example, the image information may include residual information. For example, the encoding apparatus may derive residual coefficients of the current luma block or the current chroma block based on residual samples of the current luma block or the current chroma block. For example, if the BDPCM is applied to the current luma block or the current chroma block, the encoding apparatus may determine that no transform is applied to the current luma block or the current chroma block. In this case, for example, the encoding apparatus may derive residual coefficients by quantizing the residual samples of the current luma block or the current chroma block. Here, for example, the block to which the transform is not applied may be referred to as a transform skip block. That is, for example, the current luma block or the current chroma block may be a transform skip block.
[0255] Then, for example, an encoding device may encode residual information for the residual coefficients, which may include residual information for the residual coefficients of the residual samples.
[0256] For example, the residual information may include a syntax element for a residual sample of a current luma block or a current chroma block, and a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-side peripheral residual sample or an upper-side peripheral residual sample of the target residual sample may be derived based on the syntax element for the target residual sample. For example, if the prediction direction of the current luma block or the current chroma block is horizontal, a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-side peripheral residual sample of the target residual sample may be derived based on the syntax element for the target residual sample. That is, for example, if the prediction direction of the current luma block or the current chroma block is horizontal, the syntax element for the target residual sample may indicate a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-side peripheral residual sample of the target residual sample. Furthermore, for example, if the prediction direction of the current luma block or the current chroma block is a vertical direction, a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a neighboring residual sample above the target residual sample may be derived based on a syntax element for the target residual sample. That is, for example, if the prediction direction of the current luma block or the current chroma block is a vertical direction, a syntax element for the target residual sample may indicate a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a neighboring residual sample above the target residual sample. Furthermore, if the target residual sample is located in the first row or column of the current luma block or the current chroma block, a residual coefficient value of the target residual sample may be derived based on a syntax element for the target residual sample.That is, if the target residual sample is located in the first row or column of the current luma block or current chroma block, the syntax element for the target residual sample can indicate the residual coefficient value of the target residual sample.
[0257] Meanwhile, the bitstream containing the image information can be transmitted to the decoding device via a network or a (digital) storage medium, where the network can include a broadcasting network and / or a communication network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.
[0258] Figure 10 schematically illustrates an encoding device that performs the image encoding method according to the present document. The method disclosed in Figure 9 may be performed by the encoding device disclosed in Figure 10. Specifically, for example, a prediction unit of the encoding device of Figure 10 may perform steps S900 and S920 to S930 of Figure 9, and an entropy encoding unit of the encoding device may perform steps S910 and S940 to S950. Although not shown, the process of deriving residual samples may be performed by a residual processing unit of the encoding device, and the process of generating reconstructed samples and reconstructed pictures based on the residual samples and predicted samples may be performed by an adder of the encoding device.
[0259] Figure 11 schematically illustrates an image decoding method by the decoding device according to this document. The method disclosed in Figure 11 may be performed by the decoding device disclosed in Figure 3. Specifically, for example, steps S1100 to S1120 and S1140 to S1150 in Figure 11 may be performed by an entropy decoding unit of the decoding device, steps S1130 and S1160 in Figure 11 may be performed by a prediction unit of the decoding device, and step S1170 in Figure 11 may be performed by an adder unit of the decoding device.
[0260] A decoding device acquires a BDPCM availability flag indicating whether BDPCM (Block-based Delta Pulse Code Modulation) is available for a chroma block and a luma block (S1100). The decoding device may acquire the BDPCM availability flag indicating whether BDPCM is available for a chroma block and a luma block. The decoding device may acquire image information via a bitstream. For example, the image information may include a BDPCM availability flag indicating whether BDPCM (Block-based Delta Pulse Code Modulation) is available for a chroma block and a luma block. For example, the BDPCM availability flag may indicate whether BDPCM (Block-based Delta Pulse Code Modulation) is available for a chroma block and a luma block. For example, if the value of the BDPCM available flag is 1, the BDPCM available flag may indicate that BDPCM (Block-based Delta Pulse Code Modulation) is available for the chroma block and the luma block. If the value of the BDPCM available flag is 0, the BDPCM available flag may indicate that BDPCM (Block-based Delta Pulse Code Modulation) is not available for the chroma block and the luma block. That is, for example, the BDPCM available flag may indicate whether a BDPCM flag for the chroma block and the luma block is present. For example, if the value of the BDPCM available flag is 1, the BDPCM available flag may indicate that a BDPCM flag for the chroma block and the luma block may be present. If the value of the BDPCM available flag is 0, the BDPCM available flag may indicate that a BDPCM flag for the chroma block and the luma block is not present.Also, for example, the chroma blocks may include a block of a chroma Cb component (chroma Cb block) and / or a block of a chroma Cr component (chroma Cr block).
[0261] Furthermore, for example, the BDPCM available flag can be signaled regardless of the chroma format of an image. For example, the BDPCM available flag can be signaled when the chroma format of an image is YUV444, YUV420, or YUV422. That is, for example, the BDPCM available flag can be signaled even when the chroma format of an image is YUV444.
[0262] Furthermore, for example, the BDPCM enabled flag can be signaled in a higher level syntax. For example, the BDPCM enabled flag can be signaled in a Sequence Parameter Set (SPS) syntax. Alternatively, for example, the BDPCM enabled flag can be signaled in an Adaptation Parameter Set (APS) syntax, a Picture Parameter Set (PPS) syntax, a Video Parameter Set (VPS) syntax, a Decoding Parameter Set (DPS) syntax, a Picture Header Syntax (PH) syntax, or a Slice Header Syntax. For example, the syntax element of the BDPCM enabled flag may be the above-mentioned sps_bdpcm_enabled_flag.
[0263] The decoding device acquires a BDPCM luma flag indicating whether BDPCM is applicable to the current luma block based on the BDPCM availability flag (S1110). The decoding device may acquire 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 may acquire the BDPCM luma flag for the current luma block based on the BDPCM availability flag.
[0264] For example, if the value of the BDPCM available flag is 1 (i.e., if the BDPCM available flag indicates that the BDPCM is available for both the chroma block and the luma block), the decoding device may obtain a BDPCM luma flag indicating whether the BDPCM is applied to the current luma block. 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 for the current luma block exists. 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 a BDPCM luma direction flag for the current luma block exists. 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 no BDPCM luma direction flag for the current luma block exists. For example, the syntax element of the BDPCM luma flag may be the above-mentioned bdpcm_flag or intra_bdpcm_luma_flag. Also, for example, the BDPCM luma flag may be signaled in units of coding units (CUs).
[0265] The decoding apparatus may obtain a BDPCM luma direction flag for the prediction direction of the current luma block based on the BDPCM luma flag (S1120). For example, the BDPCM-related information for the current luma block may include a BDPCM luma flag and / or a BDPCM luma direction flag for the current luma block.
[0266] For example, the decoding device may obtain a BDPCM luma direction flag for the prediction 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 may obtain the BDPCM luma direction flag. That is, for example, if the BDPCM luma flag has a value of 1, the decoding device may obtain the BDPCM luma direction flag. For example, the BDPCM luma direction flag may indicate a vertical direction or a horizontal direction as the prediction direction for the current luma block. For example, if the BDPCM luma direction flag has a value of 0, the BDPCM luma direction flag may indicate that the prediction direction for the current luma block is horizontal, and if the BDPCM luma direction flag has a value of 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 above-mentioned bdpcm_dir_flag or intra_bdpcm_luma_dir_flag. Also, for example, the BDPCM luma direction flag may be signaled in units of coding units (CUs).
[0267] The decoding apparatus 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 may derive predicted samples of the current luma block based on an intra prediction mode derived based on the BDPCM luma direction flag.
[0269] For example, if the value of the BDPCM luma direction flag is 0, i.e., for example, if the BDPCM luma direction flag indicates that the prediction direction for the current luma block is horizontal, the decoding device may derive a horizontal intra prediction mode as the intra prediction mode of the current luma block. For example, if the value of the BDPCM luma direction flag is 0, i.e., for example, if the BDPCM luma direction flag indicates that the prediction direction for the current luma block is horizontal, the decoding device may derive prediction samples of the current luma block based on the horizontal intra prediction mode. In other words, if the value of the BDPCM luma direction flag is 0, i.e., for example, if the BDPCM luma direction flag indicates that the prediction direction for the current luma block is horizontal, the decoding device may perform intra prediction based on left-side neighboring samples of the current luma block to derive prediction samples of the current luma block. For example, if the prediction direction for the current luma block is derived horizontally, the decoding device may derive the sample value of the left neighboring sample in the same row as the predicted sample as the sample value of the predicted sample.
[0270] Furthermore, for example, when the value of the BDPCM luma direction flag is 1, that is, when the BDPCM luma direction flag indicates that the prediction direction for the current luma block is vertical, the decoding device may derive a vertical intra prediction mode as the intra prediction mode for the current luma block. For example, when the value of the BDPCM luma direction flag is 1, that is, when the BDPCM luma direction flag indicates that the prediction direction for the current luma block is vertical, the decoding device may derive prediction samples for the current luma block based on the vertical intra prediction mode. In other words, for example, when the value of the BDPCM luma direction flag is 1, that is, when the BDPCM luma direction flag indicates that the prediction direction for the current luma block is vertical, the decoding device may derive prediction samples for the current luma block based on upper neighboring samples of the current luma block. For example, if the prediction direction for the current luma block is derived vertically, the decoding device may derive the sample value of the upper neighboring sample in the same column as the prediction sample as the sample value of the prediction sample.
[0271] The decoding device acquires a BDPCM chroma flag indicating whether BDPCM is applicable to the current chroma block based on the BDPCM availability flag (S1140). The decoding device may acquire BDPCM-related information for the current chroma block based on the BDPCM availability flag. For example, the BDPCM-related information for the current chroma block may include a BDPCM chroma flag for the current chroma block. The decoding device may acquire the BDPCM chroma flag for the current chroma block based on the BDPCM availability flag.
[0272] Also, for example, the BDPCM-related information for the current chroma block (i.e., for both the current chroma block) may be signaled when the tree type of an image is single tree and the value of the BDPCM availability flag is 1. That is, for example, the BDPCM-related information for the current chroma block (i.e., for both the current chroma block) may be signaled when the tree type of an image is single tree and BDPCM is available for the current chroma block. Meanwhile, the tree type of the current block may be classified as single tree (SINGLE_TREE) or dual tree (DUAL_TREE) depending on whether the current luma block and the corresponding current chroma block have separate partition structures. For example, if the current chroma block has the same partition structure as the current luma block, it may be indicated as single tree, and if the current chroma block has a different partition structure from the current luma block, it may be indicated as dual tree.
[0273] For example, the BDPCM chroma flag may indicate whether the BDPCM is applied to the current chroma block and whether a BDPCM chroma direction flag for the current chroma block exists. For example, if the BDPCM chroma flag has a value of 1, the BDPCM chroma flag may indicate that the BDPCM is applied to the current chroma block and a BDPCM chroma direction flag for the current chroma block exists. If the BDPCM chroma flag has a value of 0, the BDPCM chroma flag may indicate that the BDPCM is not applied to the current chroma block and no BDPCM chroma direction flag for the current chroma block exists. That is, for example, when the value of the BDPCM chroma flag is 1, the BDPCM chroma flag may indicate that the BDPCM is applied to the current chroma block and that a BDPCM chroma direction flag for the current chroma block is present. When 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 block and that a BDPCM chroma direction flag for the current chroma block is absent. Here, for example, the current chroma block 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 above-mentioned bdpcm_flag or intra_bdpcm_chroma_flag. Also, for example, the BDPCM chroma flag may be signaled in units of coding units (CUs).
[0274] The decoding apparatus may obtain a BDPCM chroma direction flag for the prediction direction of the current chroma block based on the BDPCM chroma flag (S1150). For example, the BDPCM-related information for the current chroma block may include a BDPCM chroma flag and / or a BDPCM chroma direction flag for the current chroma block.
[0275] For example, the decoding device may obtain a BDPCM chroma direction flag for the prediction direction of the current chroma block based on the BDPCM chroma flag. For example, if the BDPCM chroma flag indicates that the BDPCM is applied to the current chroma block, the decoding device may obtain the BDPCM chroma direction flag. That is, if the BDPCM chroma flag has a value of 1, the decoding device may obtain the BDPCM chroma direction flag. For example, the BDPCM chroma direction flag may indicate a vertical or horizontal prediction direction for the current chroma block. For example, if the BDPCM chroma direction flag has a value of 0, the BDPCM chroma direction flag may indicate that the prediction direction for the current chroma block is horizontal, and if the BDPCM chroma direction flag has a value of 1, the BDPCM chroma direction flag may indicate that the prediction direction for the current chroma block is vertical. For example, the syntax element of the BDPCM chroma direction flag may be the above-mentioned bdpcm_dir_flag or intra_bdpcm_chroma_dir_flag. Also, for example, the BDPCM chroma direction flag may be signaled in units of coding units (CUs).
[0276] The decoding apparatus derives prediction samples of the current chroma block based on the intra prediction mode derived based on the BDPCM chroma direction flag (S1160). For example, the decoding apparatus may derive prediction samples of the current chroma block based on the intra prediction mode derived based on the BDPCM chroma direction flag.
[0277] For example, if the value of the BDPCM chroma direction flag is 0, i.e., for example, if the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is horizontal, the decoding device may derive a horizontal intra prediction mode as the intra prediction mode for the current chroma block. For example, if the value of the BDPCM chroma direction flag is 0, i.e., for example, if the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is horizontal, the decoding device may derive prediction samples for the current chroma block based on the horizontal intra prediction mode. In other words, if the value of the BDPCM chroma direction flag is 0, i.e., for example, if the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is horizontal, the decoding device may perform intra prediction based on left-side neighboring samples of the current chroma block to derive prediction samples for the current chroma block. For example, if the prediction direction for the current chroma block is derived horizontally, the decoding device may derive the sample value of the left neighboring sample in the same row as the predicted sample as the sample value of the predicted sample.
[0278] Furthermore, for example, when the value of the BDPCM chroma direction flag is 1, that is, when the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is vertical, the decoding device may derive a vertical intra prediction mode as the intra prediction mode for the current chroma block. For example, when the value of the BDPCM chroma direction flag is 1, that is, when the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is vertical, the decoding device may derive prediction samples for the current chroma block based on the vertical intra prediction mode. In other words, for example, when the value of the BDPCM chroma direction flag is 1, that is, when the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is vertical, the decoding device may derive prediction samples for the current chroma block based on upper neighboring samples of the current chroma block. For example, if the prediction direction for the current chroma block is derived vertically, the decoding device may derive the sample value of the upper neighboring sample in the same column as the predicted sample as the sample value of the predicted sample.
[0279] The decoding apparatus generates a reconstructed picture based on the predicted samples of the current luma block and the predicted samples of the current chroma block (S1170).
[0280] The decoding device may derive reconstructed samples and / or reconstructed pictures for the current luma block and the current chroma block based on the predicted samples of the current luma block and the predicted samples of the current chroma block. For example, the decoding device may derive reconstructed samples of the current luma block by adding the predicted samples of the current luma block and the residual samples of the current luma block. For example, the decoding device may derive reconstructed samples of the current chroma block by adding the predicted samples of the current chroma block and the residual samples of the current chroma block. That is, for example, the decoding device may derive reconstructed samples of the current chroma Cb block by adding the predicted samples of the current chroma Cb block and the residual samples of the current chroma Cb block, and may derive reconstructed samples of the current chroma Cr block by adding 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 may derive residual samples of the current luma block based on the received residual information, and may derive residual samples of the current chroma block (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 luma block, the residual information may include a syntax element for a residual sample of the current luma block (i.e., when BDPCM is applied to the current luma block, the residual information may include a syntax element for a target residual sample of the current luma block), and the syntax element for the target residual sample may indicate a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-side peripheral residual sample or an upper-side peripheral residual sample of the target residual sample. That is, when BDPCM is applied to the current luma block, the residual information may include a syntax element for a target residual sample of the current luma block, and a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-side peripheral residual sample or an upper-side peripheral residual sample of the target residual sample may be derived based on the syntax element for the target residual sample.
[0283] For example, when BDPCM is applied to the current luma block and the prediction direction for the current luma block is horizontal, a syntax element for a target residual sample may indicate a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a residual sample adjacent to the target residual sample on its left side. That is, for example, a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a residual sample adjacent to the target residual sample on its left side may be derived based on the syntax element for the target residual sample. Then, a residual coefficient of the target residual sample may be derived by adding the difference to the residual coefficient value of the residual sample adjacent to the target residual sample on its left side. Here, the target residual sample may be a residual sample in a column other than the first column of the current luma block. For example, the residual coefficient of the target residual sample may be derived according to Equation 4 above. Meanwhile, for example, if the target residual sample is a residual sample in the first column of the current luma block, the residual coefficient of the target residual sample can be derived based on the syntax elements of the target residual sample.
[0284] Furthermore, for example, when BDPCM is applied to the current luma block and the prediction direction for the current luma block is vertical, a syntax element for a target residual sample may indicate a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a neighboring residual sample above the target residual sample. That is, for example, a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a neighboring residual sample above the target residual sample may be derived based on the syntax element for the target residual sample. Then, a residual coefficient of the target residual sample may be derived by adding the difference to the residual coefficient values of the neighboring residual samples above the target residual sample. Here, the target residual sample may be a residual sample in a row other than the first row of the current luma block. For example, the residual coefficient of the target residual sample may be derived according to Equation 3 above. Meanwhile, for example, if the target residual sample is a residual sample in the first row of the current luma block, the residual coefficient of the target residual sample can be derived based on the syntax elements of the target residual sample.
[0285] Thereafter, for example, the decoding device may dequantize the residual coefficients to derive the target residual sample, i.e., the target residual sample may be derived by dequantizing the residual coefficients.
[0286] Furthermore, for example, when BDPCM is applied to the current chroma block (e.g., current chroma Cb block or current chroma Cr block), the residual information may include a syntax element for the residual sample of the current chroma block (i.e., when BDPCM is applied to the current chroma block, the residual information may include a syntax element for the target residual sample of the current chroma block (current chroma Cb block and current chroma Cr block)), and the syntax element for the target residual sample may indicate a difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left-side surrounding residual sample or the upper-side surrounding residual sample of the target residual sample. That is, for example, when BDPCM is applied to the current chroma block, the residual information may include a syntax element for a target residual sample of the current chroma block (e.g., a current chroma Cb block or a current chroma Cr block), and based on the syntax element for the target residual sample, a difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left-side surrounding residual sample or the upper-side surrounding residual sample of the target residual sample may be derived.
[0287] For example, if BDPCM is applied to the current chroma block and the prediction direction for the current chroma block is horizontal, a syntax element for a target residual sample may indicate a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a neighboring residual sample to the left of the target residual sample. That is, for example, a difference between a residual coefficient value of the target residual sample and a neighboring residual sample to the left of the target residual sample may be derived based on the syntax element for the target residual sample. Then, a residual coefficient of the target residual sample may be derived by adding the difference to the residual coefficient value of the neighboring residual sample to the left of the target residual sample. Here, the target residual sample may be a residual sample in a column other than the first column of the current chroma block. For example, the residual coefficient of the target residual sample may be derived according to Equation 4 above. Meanwhile, for example, if the target residual sample is a residual sample in the first column of the current chroma block, the residual coefficient of the target residual sample can be derived based on the syntax elements of the target residual sample.
[0288] Furthermore, for example, if BDPCM is applied to the current chroma block and the prediction direction for the current chroma block is vertical, a syntax element for a target residual sample may indicate a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a neighboring residual sample above the target residual sample. That is, for example, a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a neighboring residual sample above the target residual sample may be derived based on the syntax element for the target residual sample. Then, a residual coefficient of the target residual sample may be derived by adding the difference to the residual coefficient values of the neighboring residual samples above the target residual sample. Here, the target residual sample may be a residual sample in a row other than the first row of the current chroma block. For example, the residual coefficient of the target residual sample may be derived according to Equation 3 above. Meanwhile, for example, if the target residual sample is a residual sample in the first row of the current chroma block, the residual coefficient of the target residual sample can be derived based on the syntax elements of the target residual sample.
[0289] Thereafter, for example, a decoding device may dequantize the residual coefficients to derive the target residual sample, i.e., the target residual sample may be derived by dequantizing the residual coefficients.
[0290] Meanwhile, although not shown in the figure, for example, a decoding device may obtain residual information for 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, i.e., if the BDPCM is applied to the current luma block, the residual information may include a syntax element for a residual sample of the current luma block, and a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-side peripheral residual sample or an upper-side peripheral residual sample of the target residual sample may be derived based on the syntax element for the target residual sample. For example, if the prediction direction of the current luma block is horizontal, i.e., if the prediction direction of the current luma block is horizontally derived based on the BDPCM luma direction flag, a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-side peripheral residual sample of the target residual sample may be derived based on the syntax element for the target residual sample. Furthermore, for example, if the prediction direction of the current luma block is vertical, i.e., if the prediction direction of the current luma block is derived as vertical based on the BDPCM luma direction flag, a difference between the residual coefficient value of the target residual sample and the residual coefficient value of a neighboring residual sample above the target residual sample may be derived based on a syntax element for the target residual sample. Furthermore, if the target residual sample is located in the first row or column of the current block, a residual coefficient value of the target residual sample may be derived based on a syntax element for the target residual sample.
[0291] Furthermore, for example, the decoding device may obtain residual information for the current chroma block based on the BDPCM chroma flag. For example, if the BDPCM chroma flag indicates that the BDPCM is applied to the current chroma block, i.e., if the BDPCM is applied to the current chroma block, the residual information may include a syntax element for a residual sample of the current chroma block, and a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-side or upper-side peripheral residual sample of the target residual sample may be derived based on the syntax element for the target residual sample. For example, if the prediction direction of the current chroma block is horizontal, i.e., if the prediction direction of the current chroma block is horizontal based on the BDPCM chroma direction flag, a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-side peripheral residual sample of the target residual sample may be derived based on the syntax element for the target residual sample. For example, if the prediction direction of the current chroma block is vertical, i.e., if the prediction direction of the current chroma block is derived as vertical based on the BDPCM chroma direction flag, a difference between the residual coefficient value of the target residual sample and the residual coefficient value of the neighboring residual sample above the target residual sample may be derived based on a syntax element for the target residual sample. Also, if the target residual sample is located in the first row or column of the current chroma block, a residual coefficient value of the target residual sample may be derived based on a syntax element for the target residual sample.
[0292] The decoding device can derive the reconstructed samples by adding the predicted samples and the residual samples, after which, as mentioned above, in-loop filtering procedures such as deblocking filtering, SAO and / or ALF procedures can be applied to the reconstructed samples to improve the subjective / objective image quality as needed.
[0293] Figure 12 schematically illustrates a decoding device that performs the image decoding method according to this document. The method disclosed in Figure 11 can be performed by the decoding device disclosed in Figure 12. Specifically, for example, the entropy decoding unit of the decoding device of Figure 12 can perform S1100 to S1120 and S1140 to S1150 of Figure 11, the prediction unit of the decoding device of Figure 12 can perform S1130 and S1160 of Figure 11, and the addition unit of the decoding device of Figure 12 can perform S1170 of Figure 11.
[0294] According to the aforementioned document, a single syntax element can determine whether BDPCM is available for luma and chroma blocks in an image, thereby reducing the amount of bits required for BDPCM and improving overall coding efficiency.
[0295] In addition, according to this document, a BDPCM availability flag indicating whether BDPCM is available for luma blocks and chroma blocks in an image can be signaled regardless of the chroma format of the image, thereby reducing the complexity for BDPCM and improving overall coding efficiency.
[0296] In the above-described embodiments, the method is described based on a flow chart as a series of steps or blocks, but this document is not limited to the order of steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Furthermore, those skilled in the art will understand that the steps shown in the flow chart are not exclusive, and other steps may be included, or one or more steps of the flow chart may be deleted without affecting the scope of this document.
[0297] The embodiments described herein may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in the figures may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for implementation may be stored on a digital storage medium.
[0298] In addition, the decoding device and encoding device to which the embodiments of this document are applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interaction device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top (OTT) video (over-the-top) device, an internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, a vehicle terminal (e.g., a vehicle terminal, an airplane terminal, a ship terminal, etc.), a medical video device, etc., and may be used to process video signals or data signals. For example, an over-the-top (OTT) video (over-the-top) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.
[0299] In addition, a processing method to which an embodiment of this document is applied may be produced in the form of a computer-executable program and stored in a computer-readable recording medium. Multimedia data having a data structure according to this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which 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. The computer-readable recording medium may also include media implemented in the form of a carrier wave (e.g., transmission via the Internet). The bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0300] Furthermore, the embodiments of the present document may be implemented in a computer program product by program code, which may be executed by a computer in accordance with the embodiments of the present document. The program code may be stored on a computer-readable carrier.
[0301] FIG. 13 exemplarily illustrates a structural diagram of a content streaming system to which the embodiments of this document are applied.
[0302] A content streaming system to which the embodiments of this document are applied can broadly include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.
[0303] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.
[0304] The bitstream can be generated by an encoding method or a bitstream generation method to which an embodiment of this document is applied, and the streaming server can temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0305] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, which then transmits the multimedia data to the user. The content streaming system may include a separate control server, which controls commands and responses between devices in the content streaming system.
[0306] The streaming server can receive content from a media repository and / or an encoding server. For example, if content is received from the encoding server, the content can be received in real time. In this case, the streaming server can store the bitstream for a certain period of time to provide a smooth streaming service.
[0307] Examples of the user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, and head mounted displays (HMDs)), digital TVs, desktop computers, digital signage, etc. Each server in the content streaming system can be operated as a distributed server, and in this case, data received by each server can 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 realized as an apparatus, and the technical features of the apparatus claims in this specification may be combined to be realized as a method. Furthermore, the technical features of the method claims and the technical features of the apparatus claims in this specification may be combined to be realized as an apparatus, and the technical features of the method claims and the technical features of the apparatus claims in this specification may be combined to be realized as a method.
Claims
1. An image decoding method performed by a decoding device, obtaining a BDPCM availability flag indicating whether BDPCM (Block-based Delta Pulse Code Modulation) is available for both the luma block and the chroma block; obtaining a BDPCM luma flag indicating whether the BDPCM is applied to the current luma block based on the BDPCM available flag; obtaining a BDPCM luma direction flag for a prediction direction of the current luma block based on the BDPCM luma flag; deriving a prediction sample of the current luma block based on an intra prediction mode derived based on the BDPCM luma direction flag; obtaining a BDPCM chroma flag indicating whether the BDPCM is applied to the current chroma block based on the BDPCM available flag; obtaining a BDPCM chroma direction flag for a prediction direction of the current chroma block based on the BDPCM chroma flag; deriving a prediction sample of the current chroma block based on an intra prediction mode derived based on the BDPCM chroma direction flag; Including, The BDPCM availability flag is signaled via a sequence parameter set (SPS), the BDPCM luma flag, the BDPCM luma direction flag, the BDPCM chroma flag, and the BDPCM chroma direction flag are signaled in units of coding units, a value of the BDPCM available flag equal to 0 indicates that the BDPCM is not available for both the luma block and the chroma block; the value of the BDPCM available flag being equal to one indicates that the BDPCM is available for both the luma block and the chroma block; based on the value of the BDPCM available flag being equal to 0, the BDPCM luma flag and the BDPCM chroma flag are not obtained; The image decoding method, wherein the BDPCM luma flag and the BDPCM chroma flag are obtained based on the value of the BDPCM available flag being equal to one.
2. If the BDPCM luma flag is equal to 1, the BDPCM luma flag indicates that the BDPCM is applied to the current luma block and the BDPCM luma direction flag is present; 2. The image decoding method of claim 1, wherein, based on the value of the BDPCM chroma flag being 1, the BDPCM chroma flag indicates that the BDPCM is applied to the current chroma block and the BDPCM chroma direction flag is present.
3. If the value of the BDPCM luma direction flag is 0, the prediction direction of the current luma block is derived as a horizontal direction; The image decoding method of claim 2 , wherein if the value of the BDPCM luma direction flag is 1, the prediction direction of the current luma block is derived as a vertical direction.
4. If the value of the BDPCM chroma direction flag is 0, the prediction direction of the current chroma block is derived as a horizontal direction; The image decoding method of claim 2 , wherein if the value of the BDPCM chroma direction flag is 1, the prediction direction of the current chroma block is derived as a vertical direction.
5. The image decoding method of claim 1 , wherein the current chroma blocks include a current chroma Cb block and a current chroma Cr block.
6. 2. The image decoding method of claim 1, wherein the BDPCM available flag is signaled if the chroma format of the image is at least one of YUV420, YUV444, or YUV422.
7. When the BDPCM is applied to the current luma block and the prediction direction of the current luma block is derived as a vertical direction, the residual information includes a syntax element for a target residual sample of the current luma block; 7. The image decoding method of claim 6, wherein the syntax element for the target residual sample indicates a difference between a residual coefficient value of the target residual sample and a residual coefficient value of an upper surrounding residual sample of the target residual sample.
8. the difference is derived based on the syntax element for the residual sample of the subject; 8. The image decoding method of claim 7, wherein the residual coefficient of the target residual sample is derived as the sum of the residual coefficient value of the upper surrounding residual sample and the difference.
9. An image encoding method performed by an encoding device, determining whether Block-based Delta Pulse Code Modulation (BDPCM) is available for the chroma and luma blocks; generating a BDPCM available flag indicating whether the BDPCM is available for the chroma block and the luma block based on the result of the determination; generating a predicted sample for a current luma block based on the BDPCM; generating a predicted sample for a current chroma block based on the BDPCM; generating BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block; encoding image information including the BDPCM available flag, the BDPCM-related information for the current luma block, and the BDPCM-related information for the current chroma block; the BDPCM-related information for the current luma block includes a BDPCM luma flag indicating whether the BDPCM is applied to the current luma block, and a BDPCM luma direction flag indicating a prediction direction of the current luma block; the BDPCM-related information for the current chroma block includes a BDPCM chroma flag indicating whether the BDPCM is applied to the current chroma block, and a BDPCM chroma direction flag indicating a prediction direction of the current chroma block; The BDPCM availability flag is signaled via a sequence parameter set (SPS), the BDPCM luma flag, the BDPCM luma direction flag, the BDPCM chroma flag, and the BDPCM chroma direction flag are signaled in units of coding units, a value of the BDPCM available flag equal to 0 indicates that the BDPCM is not available for both the luma block and the chroma block; the value of the BDPCM available flag being equal to one indicates that the BDPCM is available for both the luma block and the chroma block; based on the value of the BDPCM available flag being equal to 0, the BDPCM luma flag and the BDPCM chroma flag are not signaled; The image encoding method, wherein the BDPCM luma flag and the BDPCM chroma flag are signaled based on the value of the BDPCM available flag being equal to one.
10. 10. The image encoding method of claim 9, wherein the BDPCM available flag is signaled if the chroma format of the image is at least one of YUV420, YUV444, or YUV422.
11. 1. A method of transmitting data for an image, comprising: obtaining a bitstream of image information including a BDPCM (Block-based Delta Pulse Code Modulation) available flag, BDPCM-related information for a current luma block, and BDPCM-related information for a current chroma block; transmitting the data including the bitstream of the image information including the BDPCM available flag, the BDPCM related information for the current luma block, and the BDPCM related information for the current chroma block; the BDPCM availability flag indicates whether BDPCM is available for the chroma block and the luma block; the BDPCM-related information for the current luma block includes a BDPCM luma flag indicating whether the BDPCM is applied to the current luma block, and a BDPCM luma direction flag indicating a prediction direction of the current luma block; the BDPCM-related information for the current chroma block includes a BDPCM chroma flag indicating whether the BDPCM is applied to the current chroma block, and a BDPCM chroma direction flag indicating a prediction direction of the current chroma block; The BDPCM availability flag is signaled via a sequence parameter set (SPS), the BDPCM luma flag, the BDPCM luma direction flag, the BDPCM chroma flag, and the BDPCM chroma direction flag are signaled in units of coding units, a value of the BDPCM available flag equal to 0 indicates that the BDPCM is not available for both the luma block and the chroma block; the value of the BDPCM available flag being equal to one indicates that the BDPCM is available for both the luma block and the chroma block; based on the value of the BDPCM available flag being equal to 0, the BDPCM luma flag and the BDPCM chroma flag are not signaled; The transmission method, wherein the BDPCM luma flag and the BDPCM chroma flag are signaled based on the value of the BDPCM available flag being equal to one.
Citation Information
Patent Citations
Video encoding or decoding method, apparatus and computer program
JP2022525467A
Video signal processing method and apparatus using Block DPCM prediction method
JP2022537805A
Image decoding method and device based on BDPCM for luma and chroma components
JP7469480B2
Video encoding and decoding methods and apparatuses, device, and storage medium
US20220046253A1