BDPCM-based image decoding method for luma component and chroma component, and apparatus therefor
By adopting BDPCM-based image decoding method in the image compilation system, the problem of high resolution and high-quality image transmission and storage costs is solved, and the effect of improving image compilation efficiency and reducing costs is achieved.
Patent Information
- Application Number
- CN202510241986.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2020-01-10
- Filing Date
- 2020-11-04
- Publication Date
- 2025-06-06
AI Technical Summary
The prior art is difficult to effectively process the transmission and storage of high-resolution and high-quality images, resulting in increased costs.
By adopting a BDPCM-based image decoding method in the image compilation system, the BDPCM enable flag, brightness flag and chrominance flag are used to determine whether to predict the brightness block and chrominance block, and then generate a reconstructed picture.
This method can reduce the bit amount of BDPCM, improve image compilation efficiency, and reduce transmission and storage costs.
Smart Images

Figure CN120111239A_ABST
Abstract
Description
[0001] This application is a divisional application of the patent application with application number 202080092133.X (PCT / KR2020 / 015318), which was submitted to the China Patent Office on July 7, 2022, with an international application date of November 4, 2020, and the invention name is "BDPCM-based image decoding method and device for luminance component and chrominance component". Technical Field
[0002] The present disclosure relates to an image coding technology, and more particularly, to an image decoding method and device for performing BDPCM in an image coding system. Background Art
[0003] Recently, in various fields, the demand for high-resolution, high-quality images such as HD (high definition) images and UHD (ultra high definition) images is growing. Because image data has high resolution and high quality, the amount of information or bits to be transmitted increases relative to conventional image data. Therefore, when image data is transmitted using a medium such as a conventional wired / wireless broadband line or stored using an existing storage medium, its transmission cost and storage cost increase.
[0004] Therefore, there is a need for efficient image compression technology for effectively transmitting, storing and reproducing information of high-resolution and high-quality images. Summary of the invention
[0005] Technical issues
[0006] The technical purpose of the present disclosure is to provide a method and device for improving image coding efficiency.
[0007] Another technical object of the present disclosure is to provide a method and apparatus for increasing the efficiency of BDPCM.
[0008] Technical Solution
[0009] According to an embodiment of the present disclosure, an image decoding method performed by a decoding device is provided. The method includes: obtaining a BDPCM enable flag for whether to enable block-based incremental pulse code modulation (BDPCM) for a luma block and a chroma block, obtaining a BDPCM luma flag for whether to apply the BDPCM to a current luma block based on the BDPCM enable 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-frame prediction mode derived based on the BDPCM luma direction flag, obtaining a BDPCM chroma flag for whether to apply the BDPCM to a current chroma block based on the BDPCM enable 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 the intra-frame prediction mode derived based on the BDPCM chroma direction flag, and generating a reconstructed picture based on the prediction sample of the current luma block and the prediction sample of the current chroma block.
[0010] According to another embodiment of the present disclosure, a decoding device for performing image decoding is provided. The decoding device includes: an entropy decoder, the entropy decoder being configured to: obtain a BDPCM enable flag for whether to enable block-based incremental pulse code modulation (BDPCM) for a luminance block and a chrominance block, obtain a BDPCM luminance flag for whether to apply the BDPCM to a current luminance block based on the BDPCM enable flag, obtain a BDPCM luminance direction flag for a prediction direction of the current luminance block based on the BDPCM luminance flag, obtain a BDPCM chrominance flag for whether to apply the BDPCM to a current chrominance block based on the BDPCM enable flag, and obtain a BDPCM chrominance direction flag for a prediction direction of the current chrominance block based on the BDPCM chrominance flag; a predictor, the predictor being configured to derive a prediction sample of the current chrominance block based on an intra-frame prediction mode derived based on the BDPCM chrominance direction flag; and an adder, the adder being configured to generate a reconstructed picture based on the prediction sample of the current luminance block and the prediction sample of the current chrominance block.
[0011] According to yet another embodiment of the present disclosure, a video encoding method performed by an encoding device is provided. The method includes: determining whether to enable block-based delta pulse code modulation (BDPCM) for a chroma block and a luminance block, generating a BDPCM enable flag for whether to enable the BDPCM for the chroma block and the luminance block based on the determined result, generating a prediction sample for a current luminance block based on the BDPCM, generating a prediction sample for a current chroma block based on the BDPCM, generating BDPCM-related information for the current luminance block and BDPCM-related information for the current chroma block, and encoding image information including the BDPCM enable flag, the BDPCM-related information for the current luminance block and the BDPCM-related information for the current chroma block, wherein the BDPCM-related information for the current luminance block includes a BDPCM luminance flag for whether to apply the BDPCM to the current luminance block and a BDPCM luminance direction flag for a prediction direction of the current luminance block, wherein the BDPCM-related information for the current chroma block includes a BDPCM chroma flag for whether to apply the BDPCM to the current chroma block and a BDPCM chroma direction flag for a prediction direction of the current chroma block.
[0012] According to another embodiment of the present disclosure, a video encoding device is provided. The encoding device includes: a predictor configured to determine whether to enable block-based delta pulse code modulation (BDPCM) for a chroma block and a luminance block, generate a prediction sample for a current luminance block based on the BDPCM, generate a prediction sample for a current chroma block based on the BDPCM, and an entropy encoder configured to generate a BDPCM enable flag indicating whether to enable the BDPCM for the chroma block and the luminance block based on the determined result, generate BDPCM related information for the current luminance block and BDPCM related information for the current chroma block, and generate a BDPCM-related information for the chroma block, and generate a BDPCM-related information for the chroma block. The image information of the enable flag, the BDPCM related information for the current luminance block and the BDPCM related information for the current chrominance block is encoded, wherein the BDPCM related information for the current luminance block includes a BDPCM luminance flag for whether to apply the BDPCM to the current luminance block and a BDPCM luminance direction flag for the prediction direction of the current luminance block, wherein the BDPCM related information for the current chrominance block includes a BDPCM chrominance flag for whether to apply the BDPCM to the current chrominance block and a BDPCM chrominance direction flag for the prediction direction of the current chrominance block.
[0013] According to yet another embodiment of the present disclosure, there is provided a computer-readable digital storage medium storing a bit stream including image information for executing an image decoding method. In a computer-readable digital storage medium, the image decoding method includes: obtaining a BDPCM enable flag for whether to enable block-based delta pulse code modulation (BDPCM) for a luma block and a chroma block, obtaining a BDPCM luma flag for whether to apply the BDPCM to a current luma block based on the BDPCM enable 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-frame prediction mode derived based on the BDPCM luma direction flag, obtaining a BDPCM chroma flag for whether to apply the BDPCM to a current chroma block based on the BDPCM enable 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 the intra-frame prediction mode derived based on the BDPCM chroma direction flag, and generating a reconstructed picture based on the prediction sample of the current luma block and the prediction sample of the current chroma block.
[0014] Beneficial Effects
[0015] According to the present disclosure, whether to enable BDPCM of luminance blocks and chrominance blocks in an image can be determined by one syntax element, and by doing so, the bit amount of BDPCM can be reduced and the overall coding efficiency can be improved.
[0016] According to the present disclosure, a BDPCM enable flag indicating whether BDPCM of luminance blocks and chrominance blocks in an image is enabled can be signaled regardless of the chrominance format of the image, and by doing so, the complexity of BDPCM can be reduced and the overall coding efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 An example of a video / image coding device to which an embodiment of the present disclosure can be applied is briefly illustrated.
[0018] Figure 2 is a schematic diagram illustrating a configuration of a video / image encoding device to which an embodiment of the present disclosure can be applied.
[0019] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.
[0020] Figure 4 The hierarchical structure of a compiled image / video is schematically shown.
[0021] Figure 5 Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements is schematically shown.
[0022] Figure 6 An example of a video / image encoding method based on intra-frame prediction is illustrated.
[0023] Figure 7 An example of a video / image encoding method based on intra-frame prediction is illustrated.
[0024] Figure 8 The intra prediction process is schematically shown.
[0025] Fig. 9 A method for encoding an image by an encoding device according to the present document is schematically shown.
[0026] Fig.10 A coding device for performing the image coding method according to the present document is schematically shown.
[0027] Fig.11 A method for decoding an image by a decoding device according to the present document is schematically illustrated.
[0028] Fig.12 A decoding device for performing the image decoding method according to the present document is schematically shown.
[0029] Fig.13 The diagram shows a structural diagram of a content streaming system to which the present disclosure is applied. DETAILED DESCRIPTION
[0030] The present disclosure can be modified in various forms, and specific embodiments thereof will be described and illustrated in the accompanying drawings. However, the embodiments are not intended to limit the present disclosure. The terms used in the following description are only used to describe specific embodiments and are not intended to limit the present disclosure. As long as it is clearly understood in different ways, the expression of the singular includes the expression of the plural. Terms such as "including" and "having" are intended to indicate the presence of features, quantities, steps, operations, elements, components, or combinations thereof used in the following description, so it should be understood that the possibility of the presence or addition of one or more different features, quantities, steps, operations, elements, components, or combinations thereof is not excluded.
[0031] In addition, the elements in the drawings described in the present disclosure are drawn independently for the convenience of explaining different specific functions, and do not mean that these elements are specifically implemented by independent hardware or independent software. For example, two or more elements in the elements can be combined to form a single element, or an element can be divided into multiple elements. The embodiments of combining and / or dividing elements belong to the present disclosure without departing from the concept of the present disclosure.
[0032] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. In addition, throughout the accompanying drawings, like reference numerals are used to indicate like elements, and the same description of the like elements will be omitted.
[0033] Figure 1 An example of a video / image coding device to which an embodiment of the present disclosure can be applied is briefly illustrated.
[0034] Reference Figure 1 The video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit coded video / image information or data to the receiving device in the form of a file or stream via a digital storage medium or a network.
[0035] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as 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, and the display may be configured as a separate device or an external component.
[0036] The video source can obtain the video / image by capturing, synthesizing or generating the video / image process. The video source may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generation device may include, for example, a computer, a tablet computer, and a smart phone, and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capture process may be replaced by a process that generates relevant data.
[0037] The encoding device can encode the input video / image. The encoding device can perform a series of processes such as prediction, transformation and quantization to achieve compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0038] The transmitter may transmit the encoded video / image information or data output in the form of a bit stream to the receiver of the receiving device in the form of a file or stream through a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include an element for generating a media file in a predetermined file format, and may include an element for transmitting through a broadcast / communication network. The receiver may receive / extract a bit stream and transmit the received bit stream to a decoding device.
[0039] The decoding device may decode a video / image by performing a series of processes such as dequantization, inverse transformation, and prediction corresponding to the operations of the encoding device.
[0040] The renderer may render the decoded video / image. The rendered video / image may be displayed by a display.
[0041] The present disclosure relates to video / image coding. For example, the methods / embodiments disclosed in the present disclosure may be applied to methods disclosed in Versatile Video Coding (VVC), EVC (Basic Video Coding) standard, AOMedia Video 1 (AV1) standard, 2nd generation Audio Video Coding standard (AVS2) or next generation video / image coding standard (e.g., H.267, or H.268, etc.).
[0042] The present disclosure presents various embodiments of video / image coding, and unless otherwise mentioned, the embodiments may be performed in combination with each other.
[0043] In the present disclosure, a video may refer to a series of images over time. Generally, a picture refers to a unit representing an image in a specific time region, and a sub-picture / slice / tile is a unit that constitutes a part of a picture in coding. A sub-picture / slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more sub-pictures / slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles. A tile may represent a rectangular area of a CTU row within a tile in a picture. A tile may be partitioned into a plurality of tiles, each tile consisting of one or more CTU rows within a tile. Tiles that are not partitioned into a plurality of tiles may also be referred to as tiles. Tile scanning is a specific sequential ordering of CTUs that partition a picture, wherein CTUs are continuously ordered in tiles by CTU raster scanning, tiles within tiles are continuously ordered by raster scanning of tiles of tiles, and tiles in a picture are continuously ordered by raster scanning of tiles of tiles of a picture. In addition, a sub-picture may represent a rectangular area of one or more slices within a picture. That is, a sub-picture contains one or more slices that cover a rectangular area of a picture together. A patch is a rectangular area of a CTU within a specific patch column and a specific patch row in a picture. A patch column is a rectangular area of a CTU whose height is equal to the height of the picture and whose width is specified by a syntax element in a picture parameter set. A patch row is a rectangular area of a CTU whose height is specified by a syntax element in a picture parameter set and whose width is equal to the width of the picture. Patch scanning is a specific sequential ordering of CTUs that partition a picture, wherein CTUs may be continuously ordered in a patch by a CTU raster scan, and patches in a picture may be continuously ordered by a raster scan of patches of a picture. A slice includes an integer number of tiles of a picture that may be exclusively contained in a single NAL unit. A slice may consist of multiple complete tiles or only of a continuous sequence of complete tiles of a patch. In the present disclosure, patch groups and slices may be used interchangeably. For example, in the present disclosure, a patch group / patch group header may be referred to as a slice / slice header.
[0044] A pixel or a picture element (pel) may represent the smallest unit constituting a picture (or image). In addition, a "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component.
[0045] A unit may represent a basic unit of image processing. A unit may include at least one of a specific area of a picture and information related to the area. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as a block or an area. In general, an M×N block may include a set (or array) of samples (or sample arrays) or transform coefficients of M columns and N rows.
[0046] In this specification, "A or B" may mean "only A", "only B", or "A and B". In other words, in this specification, "A or B" may be interpreted as "A and / or B". For example, "A, B or C" herein means "only A", "only B", "only C", or "any one and any combination of A, B, and C".
[0047] A slash ( / ) or a comma used in this specification may mean "and / or". For example, "A / B" may mean "A and / or B". Thus, "A / B" may mean "only A", "only B", or "A and B". For example, "A,B,C" may mean "A, B, or C".
[0048] In the present specification, "at least one of A and B" may mean "only A", "only B", or "both A and B". In addition, in the present specification, the expression "at least one of A or B" or "at least one of A and / or B" may be interpreted as being the same as "at least one of A and B".
[0049] In addition, in the present specification, "at least one of A, B, and C" means "only A", "only B", "only C", or "any combination of A, B, and C". In addition, "at least one of A, B, or C" or "at least one of A, B and / or C" may mean "at least one of A, B, and C".
[0050] In addition, brackets used in this specification may refer to "for example". Specifically, when "prediction (intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction". In other words, "prediction" in this specification is not limited to "intra-frame prediction", and "intra-frame prediction" may be proposed as an example of "prediction". In addition, even when "prediction (i.e., intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction".
[0051] In this specification, technical features described separately in one figure may be implemented separately or may be implemented simultaneously.
[0052] The following figures are created to explain specific examples of this specification. Since the names of specific devices or the names of specific signals / messages / fields described in the figures are presented by way of example, the technical features of this specification are not limited to the specific names used in the following figures.
[0053] Figure 2 is a schematic diagram illustrating a configuration of a video / image encoding device to which an embodiment of the present disclosure can be applied. Hereinafter, a video encoding device may include an image encoding device.
[0054] Reference Figure 2 , the encoding device 200 includes an image segmenter 210, a predictor 220, a residual processor 230 and an entropy encoder 240, an adder 250, a filter 260 and a memory 270. The predictor 220 may include an inter-frame predictor 221 and an intra-frame 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 also include a subtractor 231. The adder 250 may be called a reconstructor or a reconstructed block generator. According to an embodiment, the image segmenter 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250 and the filter 260 may be composed of at least one hardware component (e.g., an encoder chipset or processor). In addition, the memory 270 may include a decoded picture buffer (DPB) or may be composed of a digital storage medium. The hardware component may also include a memory 270 as an internal / external component.
[0055] The image divider 210 may divide the input image (or picture or frame) input to the encoding device 200 into one or more processors. For example, the processor may be referred to as a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, a coding unit may be divided into a plurality of coding units with a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, a quadtree structure may be applied first, and then a binary tree structure and / or a ternary structure may be applied. Alternatively, a binary tree structure may be applied first. The coding process according to the present disclosure may be performed based on a final coding unit that is no longer divided. In this case, the maximum coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or if necessary, the coding unit may be recursively divided into coding units with a deeper depth and a coding unit with an optimal size may be used as the final coding unit. Here, the coding process may include a process of prediction, transformation, and reconstruction, which will be described later. As another example, the processor may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be separated or partitioned from the above-mentioned final coding unit. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from a transform coefficient.
[0056] In some cases, a unit may be used interchangeably with terms such as a block or region. In general, an M×N block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, may represent a pixel / pixel value of a luminance component only, or may represent a pixel / pixel value of a chrominance component only. A sample may be used as a term corresponding to one picture (or image) of a pixel or a pixel element.
[0057] In the encoding device 200, the prediction signal (prediction block, prediction sample array) output from the inter-frame predictor 221 or the intra-frame predictor 222 is subtracted from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array) and the generated residual signal is sent to the transformer 232. In this case, as shown in the figure, the unit for subtracting the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) in the encoding device 200 can be called a subtractor 231. The predictor can perform prediction on the block to be processed (hereinafter referred to as the current block) and generate a prediction block including the prediction sample of the current block. The predictor can determine whether to apply intra-frame prediction or inter-frame prediction in units of the current block or CU. As described later in the description of each prediction mode, the predictor can generate various information related to the prediction (such as prediction mode information) and send the generated information to the entropy encoder 240. The information about the prediction can be encoded in the entropy encoder 240 and output in the form of a bit stream.
[0058] The intra-frame predictor 222 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the referenced sample can be located near the current block, or can be far away from the current block. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the setting. The intra-frame predictor 222 may determine the prediction mode applied to the current block by using the prediction mode applied to the adjacent block.
[0059] The inter-frame predictor 221 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. Here, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between adjacent blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the adjacent blocks may include spatial adjacent blocks present in the current picture and temporal adjacent blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal adjacent block may be the same or different. The temporal adjacent block may be referred to as a collocated reference block, a co-located CU (colCU), etc., and the reference picture including the temporal adjacent block may be referred to as a collocated picture (colPic). For example, the inter-frame predictor 221 may configure a motion information candidate list based on adjacent blocks, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter-frame prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter-frame predictor 221 may use the motion information of the neighboring block as the motion information of the current block. In skip mode, unlike 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 may be used as a motion vector predictor, and the motion vector of the current block may be indicated by signaling a motion vector difference.
[0060] The predictor 220 may generate a prediction signal based on various prediction methods described below. For example, the predictor may not only apply intra prediction or inter prediction to predict a block, but may also apply both intra prediction and inter prediction at the same time. This may be referred to as inter-frame intra combined prediction (CIIP). In addition, the predictor may predict a block based on an intra-block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode may be used for content image / video coding of games, etc., such as screen content coding (SCC). IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction because the reference block is derived in the current picture. That is, IBC may use at least one of the inter prediction techniques described in the present disclosure. The palette mode may be considered as an example of intra coding or intra prediction. When the palette mode is applied, the sample values within the picture may be signaled based on information about the palette table and the palette index.
[0061] The prediction signal generated by the predictor (including the inter-frame predictor 221 and / or the intra-frame predictor 222) can be used to generate a reconstruction signal or to generate a residual signal. The transformer 232 can generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT represents a transform obtained from a graph when the relationship information between pixels is represented by a graph. CNT refers to a transform generated based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process can be applied to square pixel blocks of the same size, or can be applied to blocks of variable size rather than square.
[0062] The quantizer 233 may quantize the transform coefficients and send them to the entropy encoder 240, and the entropy encoder 240 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. Information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the block type quantized transform coefficients into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. Information about the transform coefficients may be generated. The entropy encoder 240 may perform various encoding methods, such as, for example, exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 240 may encode information required for video / image reconstruction (e.g., values of syntax elements, etc.) other than the quantized transform coefficients together or separately. Encoded information (e.g., encoded video / image information) may be transmitted or stored in units of NAL (network abstraction layer) in the form of a bitstream. The video / image information may also include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. In the present disclosure, information and / or syntax elements sent / signaled from an encoding device to a decoding device may be included in the video / picture information. The video / image information may be encoded and included in a bitstream through the above-mentioned encoding process. The bitstream may be sent through a network, or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that sends a signal output from the entropy encoder 240 and / or a storage unit (not shown) that stores the signal may be included as an internal / external element of the encoding device 200, alternatively, the transmitter may be included in the entropy encoder 240.
[0063] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients using the dequantizer 234 and the inverse transformer 235. The adder 250 adds the reconstructed residual signal to the prediction signal output from the inter-frame predictor 221 or the intra-frame predictor 222 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If the block to be processed has no residual (such as the case where the skip mode is applied), the prediction block can be used as a reconstructed block. The adder 250 can be called a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.
[0064] Furthermore, during picture encoding and / or reconstruction, luma mapping and chroma scaling (LMCS) may be applied.
[0065] The filter 260 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 270 (specifically, the DPB of the memory 270). Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various information related to filtering, and send the generated information to the entropy encoder 240, as described later in the description of various filtering methods. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bit stream.
[0066] The modified reconstructed picture sent to the memory 270 may be used as a reference picture in the inter predictor 221. When inter prediction is applied by the encoding device, prediction mismatch between the encoding device 200 and the decoding device may be avoided, and encoding efficiency may be improved.
[0067] The DPB of the memory 270 may store a modified reconstructed picture used as a reference picture in the inter-frame predictor 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a reconstructed block in the picture. The stored motion information may be sent to the inter-frame predictor 221 and used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of a reconstructed block in the current picture and may transmit the reconstructed samples to the intra-frame predictor 222.
[0068] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.
[0069] Reference Figure 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-frame predictor 332 and an intra-frame predictor 331. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. According to an embodiment, the entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be composed of hardware components (e.g., a decoder chipset or a processor). In addition, the memory 360 may include a decoded picture buffer (DPB), or may be composed of a digital storage medium. The hardware component may also include a memory 360 as an internal / external component.
[0070] When a bit stream including video / image information is input, the decoding device 300 can be used with Figure 2 The image is reconstructed correspondingly to the processing of the video / image information in the encoding device. For example, the decoding device 300 can derive the unit / block based on the block segmentation related information obtained from the bit stream. The decoding device 300 can perform decoding using a processor applied in the encoding device. Therefore, the decoding processor can be, for example, a coding unit, and the coding unit can be divided from the coding tree unit or the maximum coding unit according to a quadtree 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 by a reproduction device.
[0071] The decoding device 300 may receive the bit stream from Figure 2The signal output by the encoding device of the encoding device, and the received signal can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The signaled / received information and / or syntax elements described later in this disclosure may be decoded by a decoding process and obtained from the bitstream. For example, the entropy decoder 310 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs the syntax elements required for image reconstruction and the quantized values of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method can receive a bin corresponding to each syntax element in the bitstream, use the decoding target syntax element information, the decoding information of the decoding target block, or the information of the symbol / bin decoded in the previous stage to determine the context model, and arithmetically decode the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, after determining the context model, the CABAC entropy decoding method can update the context model by using the decoded symbol / bin information for the context model of the next symbol / bin. Information related to prediction among the information decoded by the entropy decoder 310 can be provided to the predictor (inter-frame predictor 332 and intra-frame predictor 331), and the residual value (that is, quantized transform coefficients and related parameter information) for which entropy decoding is performed in the entropy decoder 310 can be input to the residual processor 320. The residual processor 320 can derive a residual signal (residual block, residual sample, residual sample array). In addition, information about filtering among the information decoded by the entropy decoder 310 can be provided to the filter 350. In addition, a receiver (not shown) for receiving a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiver may be a component of the entropy decoder 310. In addition, the decoding device according to the present disclosure may be referred to as a video / image / picture decoding device, and the decoding device may be classified 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 decoder 310, and the sample decoder may include at least one of the dequantizer 321, the inverse transformer 322, the adder 340, the filter 350, the memory 360, the inter-frame predictor 332, and the intra-frame predictor 331.
[0072] The dequantizer 321 may dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 321 may rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding device. The dequantizer 321 may perform dequantization on the quantized transform coefficients by using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficients.
[0073] The inverse transformer 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0074] The predictor may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block based on information on prediction output from the entropy decoder 310, and may determine a specific intra / inter prediction mode.
[0075] The predictor 330 may generate a prediction signal based on various prediction methods described below. For example, the predictor may not only apply intra prediction or inter prediction to predict a block, but may also apply intra prediction and inter prediction at the same time. This may be referred to as inter-frame intra combined prediction (CIIP). In addition, the predictor may predict a block based on an intra-block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode may be used for content image / video coding of games, etc., such as screen content coding (SCC). IBC basically performs prediction in the current picture, but IBC may be performed similarly to inter prediction because a reference block is derived in the current picture. That is, IBC may use at least one of the inter prediction techniques described in the present disclosure. The palette mode may be considered as an example of intra coding or intra prediction. When the palette mode is applied, the sample values within the picture may be signaled based on information about the palette table and the palette index.
[0076] The intra-frame predictor 331 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the referenced sample can be located near the current block, or can be far away from the current block. In intra-frame prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. The intra-frame predictor 331 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
[0077] The inter-frame predictor 332 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the adjacent blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the adjacent blocks may include spatial adjacent blocks present in the current picture and temporal adjacent blocks present in the reference picture. For example, the inter-frame predictor 332 may configure a motion information candidate list based on the adjacent blocks, and derive a motion vector and / or a reference picture index of the current block based on the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and information about the prediction may include information indicating a mode of inter-frame prediction for the current block.
[0078] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 332 and / or the intra-frame predictor 331). If the block to be processed has no residual (for example, when the skip mode is applied), the prediction block can be used as the reconstructed block.
[0079] The adder 340 may be referred to as a reconstructor 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, may be output through filtering as described below, or may be used for inter prediction of the next picture.
[0080] In addition, luma mapping and chroma scaling (LMCS) can be applied during picture decoding.
[0081] The filter 350 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 360 (specifically, the DPB of the memory 360). The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0082] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter-frame predictor 332. The memory 360 can store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the reconstructed block in the picture. The stored motion information can be sent to the inter-frame predictor 332 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 360 can store the reconstructed samples of the reconstructed block in the current picture, and can transmit the reconstructed samples to the intra-frame predictor 331.
[0083] In the present disclosure, the embodiments described in the filter 260, the inter-frame predictor 221, and the intra-frame predictor 222 of the encoding device 200 may be the same as the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300 or may be respectively applied to correspond to the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300. The same contents may also be applied to the inter-frame predictor 332 and the intra-frame predictor 331.
[0084] In the present disclosure, at least one of quantization / inverse quantization and / or transform / inverse transform may be omitted. When quantization / inverse quantization is omitted, the quantized transform coefficient may be referred to as a transform coefficient. When transform / inverse transform is omitted, the transform coefficient may be referred to as a coefficient or a residual coefficient, or may still be referred to as a transform coefficient for the sake of uniformity of expression.
[0085] In the present disclosure, the quantized transform coefficient and the transform coefficient may be referred to as a transform coefficient and a scaled transform coefficient, respectively. In this case, the residual information may include information about the transform coefficient, and the information about the transform coefficient may be signaled by the residual coding syntax. The transform coefficient may be derived based on the residual information (or information about the transform coefficient), and the scaled transform coefficient may be derived by inversely transforming (scaling) the transform coefficient. The residual sample may be derived based on inversely transforming (transforming) the scaled transform coefficient. This may also be applied / expressed in other parts of the present disclosure.
[0086] Figure 4 The hierarchical structure of a compiled image / video is schematically shown.
[0087] Reference Figure 4 , the coded image / video is divided into the video coding layer (VCL) that handles the decoding process of the image / video and itself, the subsystem that sends and stores the coding information, and the network abstraction layer (NAL) that exists between the VCL and the subsystem and is responsible for the network adaptation function.
[0088] In the VCL, VCL data including compressed video data (slice data) can be generated, or a supplemental enhancement information (SEI) message additionally required for the video decoding process or a parameter set including information such as a picture parameter set (PPS), a sequence parameter set (SPS), and a video parameter set (VPS) can be generated.
[0089] In NAL, a NAL unit may be generated by adding header information (NAL unit header) to a raw byte sequence payload (RBSP) generated in a VCL. In this case, RBSP refers to slice data, parameter sets, SEI messages, etc. generated in a VCL. The NAL unit header may include NAL unit type information specified according to the RBSP data included in the corresponding NAL unit.
[0090] As shown in the figure, the NAL unit can be divided into a VCL NAL unit and a non-VCL NAL unit according to the RBSP generated in the VCL. The VCL NAL unit may refer to a NAL unit including information about the image (slice data), and the non-VCL NAL unit may refer to a NAL unit including information required for decoding the image (parameter set or SEI message).
[0091] The above-mentioned VCL NAL unit and non-VCL NAL unit can be sent through the network by attaching header information according to the data standard of the subsystem. For example, the NAL unit can be converted into a data form of a predetermined standard such as H.266 / VVC file format, real-time transport protocol (RTP), transport stream (TS), and sent through various networks.
[0092] As described above, in a NAL unit, a NAL unit type may be specified according to an RBSP data structure included in a corresponding NAL unit, and information on the NAL unit type may be stored in a NAL unit header and signaled.
[0093] For example, NAL units can be roughly classified into VCL NAL unit types and non-VCL NAL unit types according to whether the NAL unit includes image information (slice data). VCL NAL unit types can be classified according to the nature and type of pictures included in the VCL NAL unit, and non-VCL NAL unit types can be classified according to the type of parameter set.
[0094] The following are examples of NAL unit types specified according to the type of parameter sets included in a non-VCL NAL unit type.
[0095] - Adaptation Parameter Set (APS) NAL unit: the type of NAL unit containing the APS
[0096] -Decoding parameter set (DPS) NAL unit: the type of NAL unit containing the DPS
[0097] - Video parameter set (VPS) NAL unit: the type of NAL unit containing the VPS
[0098] - Sequence parameter set (SPS) NAL unit: the type of NAL unit containing the SPS
[0099] -PPS (Picture Parameter Set) NAL unit: the type of NAL unit containing PPS
[0100] -Picture header (PH) NAL unit: the type of NAL unit containing the PH
[0101] The above-mentioned NAL unit type may have syntax information of the NAL unit type, and the syntax information may be stored in the NAL unit header and signaled. For example, the syntax information may be nal_unit_type, and the NAL unit type may be specified by the nal_unit_type value.
[0102] In addition, as described above, the encoding device can perform various encoding methods such as, for example, exponential Golomb coding, context adaptive variable length coding (CAVLC), and context adaptive binary arithmetic coding (CABAC). In addition, the decoding device can decode the information in the bit stream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the value of the syntax element required for image reconstruction and the quantized value of the transform coefficient related to the residual.
[0103] For example, the above compilation method can be performed as follows.
[0104] Figure 5 Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements is schematically shown. For example, in the CABAC encoding process, when the input signal is a syntax element rather than a binary value, the encoding device can convert the input signal into a binary value by binarizing the value of the input signal. In addition, when the input signal is already a binary value (that is, when the value of the input signal is a binary value), the binarization may not be performed and may be bypassed. Here, each binary number 0 or 1 constituting a binary value may 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 of a syntax element may indicate the value of the syntax element.
[0105] Thereafter, the binarized bin of the syntax element may be input to a conventional coding engine or a bypass coding engine. The conventional coding engine of the coding device may assign a context model reflecting a probability value to a corresponding bin, and may encode the corresponding bin based on the assigned context model. The conventional coding engine of the coding device may update the context model of the corresponding bin after encoding each bin. The bin encoded as described above may be referred to as a context coding bin.
[0106] In addition, when the binarized bins of the syntax elements are input to the bypass coding engine, they can be compiled as follows. For example, the bypass coding engine of the coding device omits the process of estimating the probability of the input bin and the process of updating the probability model applied to the bin after coding. When bypass coding is applied, the coding device can encode the input bin by applying a uniform probability distribution instead of assigning a context model, thereby improving the coding speed. The bin encoded as described above can be referred to as a bypass bin.
[0107] Entropy decoding may mean a process of performing the same process as the above-described entropy encoding in reverse order.
[0108] For example, when decoding a syntax element based on a context model, the decoding device may receive a bin corresponding to the syntax element through a bitstream, may use the syntax element and the decoding information of the decoding target block or the adjacent block or the information of the symbol / bin decoded in the previous step to determine the context model, and may derive the value of the syntax element by predicting the occurrence probability of the received bin according to the determined context model and performing arithmetic decoding of the bin. Thereafter, the determined context model may be used to update the context model of the next decoded bin.
[0109] In addition, for example, when a syntax element is bypass-decoded, the decoding device may receive a bin corresponding to the syntax element through a bitstream, and may decode the input bin by applying a uniform probability distribution. In this case, the decoding device may omit the process of deriving a context model of the syntax element and the process of updating the context model applied to the bin after decoding.
[0110] In addition, as described above, when performing video coding, prediction is performed to improve compression efficiency. In this way, a prediction block including a prediction sample of the current block can be generated as a block to be coded (i.e., a coding target block). Here, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block is derived in the same manner in the encoding device and the decoding device, and the encoding device can signal the decoding device with information about the residual between the original block and the prediction block (residual information) instead of the original sample value of the original block, thereby improving image coding efficiency. The decoding device can derive a residual block including residual samples based on the residual information, add the residual block and the prediction block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.
[0111] The residual information may be generated by a transformation and quantization process. For example, the encoding device may derive a residual block between the original block and the prediction block, may perform a transformation process on the residual samples (residual sample array) included in the residual block to derive a transformation coefficient, may perform a quantization process on the transformation coefficient to derive a quantized transformation coefficient, and may signal the relevant residual information (through a bitstream) to the decoding device. Here, the residual information may include value information, position information, transformation technology, transformation core, and value information of quantization parameters, etc. of the quantized transformation coefficient. The decoding device may perform a dequantization / inverse transformation process based on the residual information and derive residual samples (or residual blocks). The decoding device may generate a reconstructed picture based on the prediction block and the residual block. In addition, for reference to inter-frame prediction of a reference picture later, the encoding device may dequantize / inverse transform the quantized transformation coefficient to derive a residual block, and generate a reconstructed picture based on this.
[0112] Intra-frame prediction may refer to generating a prediction of a prediction sample for a current block based on a reference sample in a picture to which the current block belongs (hereinafter referred to as the current picture). When intra-frame prediction is applied to the current block, the neighboring reference samples to be used for intra-frame prediction of the current block may be derived. The neighboring reference samples of the current block may include samples adjacent to the left boundary of the current block of size nW×nH and a total of 2×nH samples adjacent to the lower left of the current block, samples adjacent to the upper boundary of the current block and a total of 2×nW samples adjacent to the upper right, and samples adjacent to the upper left 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 lower boundary of the current block, and samples adjacent to the lower right of the current block.
[0113] However, some neighboring reference samples of the current block have not been decoded or may not be available. In this case, the decoder can construct neighboring reference samples to be used for prediction by replacing unavailable samples with available samples. Alternatively, the neighboring reference samples to be used for prediction can be configured by interpolation of available samples.
[0114] When deriving the neighboring reference samples, (i) the prediction samples may be derived based on an average or interpolation of the neighboring reference samples of the current block, or (ii) the prediction samples may be derived based on reference samples existing in a specific (prediction) direction relative to the prediction samples in the neighboring reference samples of the current block. Case (i) may be referred to as a non-directional mode or a non-angular mode, and case (ii) may be referred to as a directional mode or an angular mode.
[0115] In addition, the prediction sample can be generated by interpolating the first neighboring sample located in the prediction direction of the intra prediction mode of the current block based on the prediction sample of the current block among the adjacent reference samples and the second neighboring sample located in the direction opposite to the prediction direction. The above situation can be called linear interpolation intra prediction (LIP). In addition, a linear model (LM) can be used to generate chroma prediction samples based on luma samples. This situation can be called LM mode or chroma component LM (CCLM) mode.
[0116] In addition, a temporary prediction sample of the current block is derived based on the filtered adjacent reference sample, and the prediction sample of the current block can also be derived by weighted summing the temporary prediction sample with at least one reference sample derived according to the intra prediction mode in the existing adjacent reference sample (i.e., the unfiltered adjacent reference sample). The above situation can be referred to as position-dependent intra prediction (PDPC).
[0117] In addition, a reference sample line with the highest prediction accuracy among multiple adjacent reference sample lines of the current block is selected, and a prediction sample is derived using a reference sample located in the prediction direction in the selected line. In this case, intra-frame prediction coding can be performed by indicating (signaling) the reference sample line used to the decoding device. The above situation can be referred to as multi-reference line intra-frame prediction or MRL-based intra-frame prediction.
[0118] In addition, the current block is divided into vertical sub-partitions or horizontal sub-partitions and performs intra prediction based on the same intra prediction mode, but adjacent reference samples can be derived and used in units of sub-partitions. That is, in this case, the intra prediction mode of the current block is also applicable to the sub-partition, but in some cases, the intra prediction performance can be improved by deriving and using adjacent reference samples in units of sub-partitions. This prediction method can be called intra prediction based on intra sub-partition (ISP).
[0119] The above-mentioned intra-frame prediction method may be referred to as an intra-frame prediction type to distinguish it from an intra-frame prediction mode. The intra-frame prediction type may be referred to by various terms, such as an intra-frame prediction technique or an additional intra-frame prediction mode. For example, the intra-frame prediction type (or additional intra-frame prediction mode, etc.) may include at least one of the above-mentioned LIP, PDPC, MRL, and ISP. A general intra-frame prediction method excluding specific intra-frame prediction types such as LIP, PDPC, MRL, and ISP may be referred to as a normal intra-frame prediction type. When the above-mentioned specific intra-frame prediction type is not applied, a normal intra-frame prediction type may generally be applied, and prediction may be performed based on the above-mentioned intra-frame prediction mode. In addition, if necessary, post-processing filtering may be performed on the derived prediction samples.
[0120] Specifically, the intra prediction process may include an intra prediction mode / type determination step, an adjacent reference sample derivation step, and a prediction sample derivation step based on the intra prediction mode / type. In addition, if necessary, a post-filtering step may be performed on the derived prediction samples.
[0121] Figure 6 An example of a video / image encoding method based on intra-frame prediction is illustrated.
[0122] Reference Figure 6 , the encoding device performs intra prediction on the current block (S600). The encoding device derives the intra prediction mode / type of the current block, derives the adjacent reference samples of the current block, and generates prediction samples in the current block based on the intra prediction mode / type and the adjacent reference samples. Here, the intra prediction mode / type determination process, the adjacent reference sample derivation process, and the prediction sample generation process can be performed simultaneously, or one process can be performed before the other. The encoding device can determine the mode / type applied to the current block from multiple intra prediction modes / types. The encoding device can compare the RD costs of the intra prediction modes / types and determine the optimal intra prediction mode / type for the current block.
[0123] In addition, the encoding device may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post-filtering. Some or all prediction samples may be filtered by the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.
[0124] The encoding apparatus generates residual samples of the current block based on the (filtered) prediction samples (S610). The encoding apparatus may compare the prediction samples in the original samples of the current block based on the phase and derive the residual samples.
[0125] The encoding device may encode image information including information about intra prediction (prediction information) and residual information about residual samples (S620). The prediction information may include intra prediction mode information and intra prediction type information. The encoding device may output the encoded image information in the form of a bit stream. The output bit stream may be sent to a decoding device via a storage medium or a network.
[0126] The residual information may include a residual coding syntax described later. The encoding device may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information about the quantized transform coefficients.
[0127] In addition, as described above, the encoding device can generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the encoding device can derive (modified) residual samples by performing inverse quantization / inverse transformation on the quantized transform coefficients again. The reason for performing inverse quantization / inverse transformation again after transforming / quantizing the residual samples in this way is to derive the same residual samples as the residual samples derived in the above-mentioned decoding device. The encoding device 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, the in-loop filtering process can be further applied to the reconstructed picture.
[0128] Figure 7 An example of a video / image encoding method based on intra-frame prediction is illustrated.
[0129] The decoding device may perform operations corresponding to those performed by the encoding device.
[0130] Prediction information and residual information may be obtained from a bitstream. Residual samples of a current block may be derived based on the residual information. Specifically, transform coefficients may be derived by performing inverse quantization based on quantized transform coefficients derived from the residual information, and residual samples of the current block may be derived by performing inverse transformation on the transform coefficients.
[0131] Specifically, the decoding device may derive the intra prediction mode / type of the current block based on the received prediction information (intra prediction mode / type information) (S700). The decoding device may derive the adjacent reference samples of the current block (S710). The decoding device generates the prediction samples in the current block based on the intra prediction mode / type and the adjacent reference samples (S720). In this case, the decoding device may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post filtering. Some or all prediction samples may be filtered by the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.
[0132] The decoding device generates residual samples for the current block based on the received residual information (S730). The decoding device can generate reconstructed samples of the current block based on the predicted samples and the residual samples, and can derive a reconstructed block including the reconstructed samples (S740). A reconstructed picture of the current picture can be generated based on the reconstructed block. As described above, the in-loop filtering process can be further applied to the reconstructed picture.
[0133] The intra-frame prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether MPM (most probable mode) is applied to the current block or whether the residual mode is applied, and when 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-frame prediction mode candidates (MPM candidates). The intra-frame prediction mode candidates (MPM candidates) may be composed of an MPM candidate list or an MPM list. In addition, when MPM is not applied to the current block, the intra-frame prediction mode information includes residual mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra-frame prediction modes other than the intra-frame prediction mode candidates (MPM candidates). The decoding device may determine the intra-frame prediction mode of the current block based on the intra-frame prediction mode information.
[0134] In addition, the intra prediction type information may be implemented in various forms. For example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include reference sample line information (e.g., intra_luma_ref_idx) indicating whether MRL is applied to the current block, and if applied, which reference sample line is used, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether ISP is applied to the current block, or ISP type information (e.g., intra_subpartitions_split_flag) indicating the split type of the sub-partition when ISP is applied. In addition, the intra prediction type information may include a MIP flag indicating whether matrix-based intra prediction (MIP) is applied to the current block.
[0135] The intra-frame prediction mode information and / or the intra-frame prediction type information may be encoded / decoded by the coding method described in the present disclosure. For example, the intra-frame prediction mode information and / or the intra-frame prediction type information may be encoded / decoded by entropy coding (e.g., CABAC, CAVLC).
[0136] Figure 8 The intra prediction process is schematically shown.
[0137] Reference Figure 8 As described above, the intra prediction process may include a step of determining an intra prediction mode / type, a step of deriving adjacent reference samples, and a step of performing intra prediction (generating prediction samples). The intra prediction process may be performed by the encoding device and the decoding device as described above. In the present disclosure, the coding device may include an encoding device and / or a decoding device.
[0138] Reference Figure 8 , the coding apparatus determines the intra prediction mode / type S800.
[0139] The encoding device may determine the intra-frame prediction mode / type applied to the current block from the above-mentioned various intra-frame prediction modes / types, and may generate prediction related information. The prediction related information may include intra-frame prediction mode information indicating the intra-frame prediction mode applied to the current block and / or intra-frame prediction type information indicating the intra-frame prediction type applied to the current block. The decoding device may determine the intra-frame prediction mode / type applied to the current block based on the prediction related information.
[0140] The intra-frame prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether the most probable mode (MPM) is applied to the current block or the residual mode is applied, and when 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-frame prediction mode candidates (MPM candidates). The intra-frame prediction mode candidates (MPM candidates) may be composed of an MPM candidate list or an MPM list. In addition, when the MPM is not applied to the current block, the intra-frame prediction mode information may further include residual mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra-frame prediction modes other than the intra-frame prediction mode candidates (MPM candidates). The decoding device may determine the intra-frame prediction mode of the current block based on the intra-frame prediction mode information.
[0141] In addition, the intra prediction type information may be implemented in various forms. For example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include reference sample line information (e.g., intra_luma_ref_idx) indicating whether MRL is applied to the current block and, if applied, which reference sample line is used, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether ISP is applied to the current block, or ISP type information (e.g., intra_subpartitions_split_flag) indicating the split type of the sub-partition when ISP is applied. In addition, the intra prediction type information may include a MIP flag indicating whether matrix-based intra prediction (MIP) is applied to the current block.
[0142] For example, when intra prediction is applied, the intra prediction mode of the neighboring blocks may be used to determine the intra prediction mode applied to the current block. For example, the coding device may select one of the most likely mode (MPM) candidates in the MPM list derived based on the intra prediction mode of the additional candidate mode and / or the neighboring blocks (e.g., left and / or upper neighboring blocks) of the current block or select one of the remaining intra prediction modes not included in the MPM candidates (and the plane mode) based on the MPM residual information (remaining intra prediction mode information). The MPM list may be configured to include or exclude the plane mode as a candidate. For example, when the MPM list includes the plane mode as a candidate, the MPM list may have 6 candidates, and when the MPM list does not include the plane mode as a candidate, the MPM list may have 5 candidates. When the MPM list does not include the plane mode as a candidate, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not a plane mode may be signaled. For example, the MPM flag may be signaled first, and when the value of the MPM flag is 1, the MPM index and the non-planar flag may be signaled. In addition, when the value of the non-planar flag is 1, the MPM index may be signaled. Here, the fact that the MPM list is configured not to include the planar mode as a candidate is that the planar mode is always considered to be the MPM rather than considering that the planar mode is not the MPM, and therefore, the flag (non-planar flag) is signaled first to check whether it is the planar mode.
[0143] For example, it can be indicated based on an MPM flag (e.g., intra_luma_mpm_flag) whether the intra prediction mode applied to the current block is among the MPM candidates (and planar mode) or among the remaining modes. An MPM flag with a value of 1 can indicate that the intra prediction mode of the current block is within the MPM candidates (and planar mode), while an MPM flag with a value of 0 can indicate that the intra prediction mode of the current block is not within the MPM candidates (and planar mode). A non-planar flag with a value of 0 (e.g., intra_luma_not_planar_flag) can indicate that the intra prediction mode of the current block is a planar mode, and a non-planar flag with a value of 1 can indicate that the intra prediction mode of the current block is not a planar mode. The MPM index can be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information can 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 indicate one of the remaining intra prediction modes that is not included in the MPM candidates (and planar mode) among all intra prediction modes by indexing in order of the prediction mode number. The intra prediction mode may be an intra prediction mode of a luminance component (sample). Hereinafter, the intra prediction mode information may include at least one of an MPM flag (e.g., intra_luma_mpm_flag), a non-planar flag (e.g., intra_luma_not_planar_flag), an MPM index (e.g., mpm_idx or intra_luma_mpm_idx), or the remaining intra prediction mode information (rem_intra_luma_luma_mpm_mode or intra_luma_mpminder). In the present disclosure, the MPM list may be referred to by a variety of terms, such as an MPM candidate list and candModeList.
[0144] When a MIP is applied to the current block, a separate MPM flag (eg, intra_mip_mpm_flag), an MPM index (eg, intra_mip_mpm_idx), and remaining intra prediction mode information (eg, intra_mip_mpm_remainder) for the MIP may be signaled, and a non-planar flag may not be signaled.
[0145] In other words, in general, when performing block segmentation of an image, the current block and the adjacent blocks to be coded have similar image characteristics. Therefore, the possibility that the current block and the adjacent blocks have the same or similar intra-frame prediction mode is high. Therefore, the encoder can use the intra-frame prediction mode of the adjacent block to encode the intra-frame prediction mode of the current block.
[0146] The coding device may construct a most probable mode (MPM) list for the current block. The MPM list may be referred to as an MPM candidate list. Here, MPM may refer to a mode for improving coding efficiency by considering the similarity between the current block and the adjacent blocks during intra-frame prediction mode coding. As described above, the MPM list may be constructed to include a plane mode, or may be constructed to exclude a plane mode. For example, when the MPM list includes a plane mode, the number of candidates in the MPM list may be 6. And when the MPM list does not include a plane mode, the number of candidates in the MPM list may be 5.
[0147] The encoding device may perform prediction based on various intra prediction modes, and may determine the optimal intra prediction mode based on rate distortion optimization (RDO) therefrom. In this case, the encoding device may determine the optimal intra prediction mode by using only the MPM candidates and the plane mode configured in the MPM list, or by further using the remaining intra prediction modes and the MPM candidates and the plane mode configured in the MPM list. Specifically, for example, if the intra prediction type of the current block is a specific type other than the 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 the plane mode as intra prediction mode candidates for the current block. That is, in this case, the intra prediction mode of the current block may be determined only from the MPM candidates and the plane mode, and in this case, encoding / signaling of the MPM flag may not be performed. In this case, the decoding device may infer that the MPM flag is 1 without separately signaling the MPM flag.
[0148] In addition, generally, when 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) indicating one of the MPM candidates. When the intra prediction mode of the current block is not included in the MPM list, the encoding device generates MPM residual information (remaining intra prediction mode information) indicating 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 the planar mode). The MPM residual information may include, for example, an intra_luma_mpm_remainder syntax element.
[0149] The decoding device obtains intra-frame prediction mode information from the bitstream. As described above, the intra-frame prediction mode information may include at least one of an MPM flag, a non-plane flag, an MPM index, and MPM residual information (residual intra-frame prediction mode information). The decoding device may construct an MPM list. The construction of the MPM list is the same as the MPM list constructed in the encoding device. That is, the MPM list may include intra-frame prediction modes of adjacent blocks, or may further include a specific intra-frame prediction mode according to a predetermined method.
[0150] The decoding device can determine the intra prediction mode of the current block based on the MPM list and the intra prediction mode information. For example, when the value of the MPM flag is 1, the decoding device can (based on the non-planar flag) derive the plane mode as the intra prediction mode of the current block, or derive the candidate indicated by the MPM index among the MPM candidates in the MPM list as the intra prediction mode of the current block. Here, the MPM candidate may represent only the candidates included in the MPM list, or may include not only the candidates included in the MPM list, but also the plane mode applicable when the value of the MPM flag is 1.
[0151] For another example, when the value of the MPM flag is 0, the decoding device may derive the intra prediction mode indicated by the remaining intra prediction mode information (which may be referred to as mpm remaining information) among the remaining intra prediction modes not included in the MPM list and the plane mode as the intra prediction mode of the current block. In addition, as another example, when the intra prediction type of the current block is a specific type (such as LIP, MRL, or ISP, etc.), the decoding device may derive the candidate indicated by the MPM flag in the plane mode or the MPM list as the intra prediction mode of the current block without parsing / decoding / checking the MPM flag.
[0152] The coding device derives neighboring reference samples of the current block (S810). When intra prediction is applied to the current block, neighboring reference samples to be 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 of the current block of size nW×nH and a total of 2×nH samples adjacent to the lower left of the current block, samples adjacent to the upper boundary of the current block and a total of 2×nW samples adjacent to the upper right, and samples adjacent to the upper left 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 lower boundary of the current block, and samples adjacent to the lower right of the current block.
[0153] On the other hand, when MRL is applied (ie, when the value of the MRL index is greater than 0), the neighboring reference sample may be located on line 1 to 2 instead of line 0 adjacent to the current block on the left / upper side, and in this case, the number of neighboring reference samples can be further increased. In addition, when ISP is applied, the neighboring reference sample can be derived in units of sub-partitions.
[0154] The coding device derives a prediction sample by performing intra prediction on the current block (S820). The coding device may derive the prediction sample based on the intra prediction mode / type and the neighboring samples. The coding device may derive the reference sample according to the intra prediction mode of the current block among the neighboring reference samples of the current block, and may derive the prediction sample of the current block based on the reference sample.
[0155] In addition, according to an embodiment, a block differential pulse code modulation (BDPCM) technique may be used. BDPCM may also be referred to as RDPCM (block-based delta pulse code modulation).
[0156] When a block is predicted by applying BDPCM, the reconstructed samples can be used to predict the rows or columns of the block line by line. In this case, the reference samples used can be unfiltered samples. The BDPCM direction can indicate whether the vertical or horizontal direction prediction is used. That is, when BDPCM is applied, the vertical direction or the horizontal direction can be selected as the BDPCM direction, and the prediction can be performed in the BDPCM direction. The prediction error can be quantized in the spatial domain, and the sample can be reconstructed by adding the inverse quantized prediction error to the prediction (ie, the prediction sample). The prediction error may refer to the residual. As an alternative to this BDPCM, a quantized residual domain BDPCM can be proposed, and the prediction direction or signaling can be the same as the BDPCM applied to the spatial domain. That is, the quantized coefficients themselves can be accumulated like DPCM (Delta Pulse Code Modulation) by quantizing the residual domain BDPCM, and then the residual can be reconstructed by inverse quantization. Therefore, in the sense of applying DPCM in the residual coding state, a quantized residual domain BDPCM can be used. The quantized residual domain used below is based on the residual derived from the prediction being quantized without being transformed, meaning a domain for quantizing residual samples. For example, the quantized residual domain may include quantized residuals (or quantized residual coefficients) to which a transform is applied, i.e., the transform is skipped but quantization is applied to the residual samples. Or, for example, the quantized residual domain may include quantized transform coefficients.
[0157] For a block of size M×N, it can be assumed that the residual derived from the prediction value obtained by performing intra-frame prediction in the horizontal direction (copying the left adjacent sample line to the prediction block line by line) or by performing intra-frame prediction in the vertical direction (copying the upper adjacent sample line by line) using the unfiltered samples in the left or upper boundary samples (i.e., the left adjacent samples or the upper adjacent samples) is r(i,j)(0≤i≤M-1,0≤j≤N-1). Here, M can represent a row or height, and N can represent a column or width. And, it can be assumed that the quantization value of the residual r(i,j) is Q(r(i,j))(0≤i≤M-1,0≤j≤N-1). Here, the residual refers to the difference between the original block and the predicted block value.
[0158] Then, if BDPCM is applied to the quantized residual samples, we can derive As an M x N modified array of configurations
[0159] For example, when vertical BDPCM is signaled (ie, when vertical BDPCM is applied), it can be derived as in the following formula:
[0160] [Formula 1]
[0161]
[0162] That is, for example, when vertical BDPCM is applied, the encoding device may perform vertical intra prediction based on the upper adjacent sample, and may derive the quantized residual sample of the current block as in the above formula 1. Referring to the above formula 1, the quantized residual sample of the row other than the first row of the current block may be derived as the difference between the quantized value of the corresponding position and the quantized value of the position of the previous row of the corresponding position (i.e., the upper adjacent position of the corresponding position).
[0163] Furthermore, when similarly applied to horizontal prediction (ie, when BDPCM in the horizontal direction is applied), the residual quantized sample can be derived as in the following equation.
[0164] [Formula 2]
[0165]
[0166] That is, for example, when horizontal BDPCM is applied, the encoding device may perform horizontal intra prediction based on the left-neighboring samples, and may derive the quantized residual samples of the current block as in the above Formula 2. Referring to the above Formula 2, the quantized residual samples of the columns other than the first column of the current block may be derived as the difference between the quantized value of the corresponding position and the quantized value of the position of the previous column of the corresponding position (i.e., the left-neighboring position of the corresponding position).
[0167] Quantized residual samples can be sent to a decoding device.
[0168] In the decoding device, the above operation can be performed inversely to derive Q(r(i,j))(0≤i≤M-1,0≤j≤N-1).
[0169] The following formula can be applied to vertical prediction.
[0170] [Formula 3]
[0171]
[0172] In addition, the following formula can be applied to horizontal prediction.
[0173] [Formula 4]
[0174]
[0175] The quantized residual (Q -1 (Q(r i,j ))) is added to the intra-block prediction value to derive the reconstructed sample value.
[0176] The main advantage of this technique is that inverse BDPCM can be performed by simply adding the predictors while parsing the coefficients or even after parsing.
[0177] As described above, BDPCM can be applied to a quantized residual domain, and the quantized residual domain may include a quantized residual (or a quantized residual coefficient), in which case a transform skip is applied to the residual. That is, when BDPCM is applied, the transform can be skipped and quantization can be applied to the residual sample. Alternatively, the quantized residual domain may include a quantized transform coefficient. A flag as to whether BDPCM is available may be signaled at the sequence level (SPS), and the flag may be signaled only when the transform skip mode is enabled in the SPS. The flag may be referred to as a BDPCM enable flag or an SPS BDPCM enable flag.
[0178] When BDPCM is applied, intra prediction can be performed on the entire block by sample replication according to a prediction direction similar to the intra prediction direction (e.g., vertical prediction or horizontal prediction). The residual, which is the difference between the original block and the predicted block, is quantized by skipping the transform, and a delta value, i.e., the difference between the quantized residual and the predictor in the horizontal or vertical direction, can be encoded. (ie, the quantized residual in the horizontal or vertical direction).
[0179] If BDPCM is applicable, when the CU size is less than or equal to the MaxTsSize (maximum transform skip block size) of the luma sample and the CU is coded using intra prediction, flag information may be sent at the CU level. The flag information may be referred to as a BDPCM flag. Here, MaxTsSize may refer to the maximum block size for which the transform skip mode is allowed. The flag information may indicate whether traditional intra coding or BDPCM is applied. When BDPCM is applied, a BDPCM prediction direction flag may be sent indicating whether the prediction direction is horizontal or vertical. The BDPCM prediction direction flag may be referred to as a BDPCM direction flag. Thereafter, the block may be predicted using an unfiltered reference sample by a traditional horizontal or vertical intra prediction process. In addition, the residual may be quantized, and the difference between each quantized residual and its predictor (e.g., between residuals that have been quantized in the horizontal or vertical direction according to the BDPCM prediction direction) may be coded.
[0180] Furthermore, as described later, the above-mentioned BDPCM is described in a standard document format.
[0181] For example, as shown in the following table, syntax elements for the above-mentioned BDPCM enable flag and semantics for the syntax elements are represented.
[0182] [Table 1]
[0183]
[0184] [Table 2]
[0185]
[0186] Table 1 represents sps_bdpcm_enabled_flag and sps_bdpcm_chroma_enabled_flag signaled in a sequence parameter set (SPS), and when the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that there is flag information indicating whether BDPCM is applied to a coded luminance unit for performing intra prediction, i.e., "intra_bdpcm_luma_flag", in a coded luminance unit, and when the syntax element sps_bdpcm_chroma_enabled_flag is 1, it may indicate that there is flag information indicating whether BDPCM is applied to a coded chroma unit for performing intra prediction, i.e., "intra_bdpcm_chroma_flag", in a coded chroma unit. The syntax elements sps_bdpcm_enabled_flag and sps_bdpcm_chroma_enabled_flag may be syntax elements for a BDPCM enabling flag. In addition, when the syntax element "sps_bdpcm_enabled_flag" is not present, its value may be regarded as 0. Furthermore, when the syntax element "sps_bdpcm_chroma_enabled_flag" is not present, its value may be regarded as 0.
[0187] Furthermore, for example, the syntax elements for the BDPCM flag and the BDPCM direction flag described above may be signaled separately for the luma component and the chroma component.For example, a coding unit syntax including a syntax element and semantics for the syntax element may be represented as in the following table.
[0188] [Table 3]
[0189]
[0190]
[0191]
[0192]
[0193]
[0194]
[0195]
[0196]
[0197] [Table 4]
[0198]
[0199]
[0200] As described above, the syntax element intra_bdpcm_luma_flag of 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, when the value of intra_bdpcm_luma_flag or intra_bdpcm_chroma_flag is 1, the transformation of the corresponding coding block may be skipped, and the prediction mode for the coding block may be set in the horizontal or vertical direction by intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag indicating the prediction direction. When intra_bdpcm_luma_flag or intra_bdpcm_chroma_flag does not exist, it may be inferred that the value of intra_bdpcm_luma_flag or intra_bdpcm_chroma_flag is equal to 0.
[0201] In addition, for example, when the value of intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag indicating the prediction direction is 0, intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag may indicate that the BDPCM prediction direction is the horizontal direction, and when the value of intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag is 1, intra_bdpcm_luma_dir_flag or intra_bdpcm_chroma_dir_flag may indicate that the BDPCM prediction direction is the vertical direction.
[0202] At the same time, intra_bdpcm_luma_flag can represent the syntax element of the BDPCM luma flag for the current luma block, intra_bdpcm_chroma_flag can represent the syntax element of the BDPCM chroma flag for the current chroma block, intra_bdpcm_luma_dir_flag can represent the syntax element of the BDPCM luma direction flag for the current luma block, and intra_bdpcm_chroma_dir_flag can represent the syntax element of the BDPCM chroma direction flag for the current chroma block.
[0203] Furthermore, in the case where BDPCM is applied, an example of the dequantization process can be expressed as shown in the following table.
[0204] [Table 5]
[0205]
[0206]
[0207]
[0208]
[0209]
[0210] Furthermore, in the case where BDPCM is applied, an example of the dequantization process can be expressed as shown in the following table.
[0211] [Table 6]
[0212]
[0213]
[0214]
[0215]
[0216]
[0217]
[0218] Referring to Table 5 or Table 6, when the value of bdpcm_flag is 1, the inverse quantized residual value d[x][y] may be derived based on the intermediate variable dz[x][y]. Here, x is a horizontal coordinate increasing from left to right, y is a vertical coordinate increasing from top to bottom, and the position in the two-dimensional block may be represented as (x, y). In addition, when the upper left position of the block is set to (0, 0), the position in the two-dimensional block indicates the (x, y) position.
[0219] For example, when the value of bdpcm_dir_flag is 0, that is, when horizontal BDPCM is applied, when x is 0, the variable dz[x][y] may be TransCoeffLevel[xTby][yTby][cIdx][x][y], and when x is not 0, dz[x][y] may be derived based on dz[x-1][y]+dz[x][y]. That is, when horizontal BDPCM is applied (the value of bdpcm_dir_flag is 0), the variable dz[x][y] of the sample located in the first column (where x is 0) is derived as TransCoeffLevel[xTby][yTby][cIdx][x][y] derived based on the residual information of the sample, and the variable dz[x][y] of the sample located in the columns other than the first column (where x is not 0) is derived as the sum of dz[x-1][y] of the left adjacent sample of the sample and dz[x][y] of the sample. Here, dz[x][y] of the sample added to dz[x-1][y] may be derived based on the signaled residual information for that sample.
[0220] In addition, for example, when the value of bdpcm_dir_flag is 1, that is, vertical BDPCM is applied, the variable dz[x][y] is 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 the sample located in the first row where y is 0 is derived as TransCoeffLevel[xTby][yTby][cIdx][x][y] derived based on the residual information of the sample, and the variable dz[x][y] of the sample located in the row other than the first row where y is not 0 is derived as the sum of dz[x][y-1] of the upper adjacent sample of the sample and dz[x][y] of the sample. Here, dz[x][y] of the sample added to dz[x][y-1] may be derived based on the residual information for the sample signaled.
[0221] As described above, the residual of a specific position can be derived based on the sum of the residual of the previous position (i.e., left or top) in the horizontal or vertical direction and the received value as the residual information of the specific position. This is because, when BDPCM is applied, the difference between the residual sample value of the specific position (x, y) and the residual sample value of the previous position (i.e., (x-1, y) or (x, y-1)) in the horizontal or vertical direction is signaled as the residual information.
[0222] As described above, information about BDPCM may be signaled, but in the present disclosure, other embodiments for signaling information about BDPCM are proposed. For example, according to the existing video standard, since only BDPCM for luma blocks can be performed in YUV 420, and BDPCM for luma blocks and chroma blocks can be performed in YUV 444, as shown in the above-mentioned table, sps_bdpcm_enabled_flag as a syntax element of a BDPCM enable flag for luma blocks and sps_bdpcm_chroma_enabled_flag as a syntax element of a BDPCM enable flag for chroma blocks may be respectively transmitted in the sequence parameter set (SPS) syntax. Specifically, only when BDPCM is enabled for the luma block and the chroma format of the image is YUV 444 (i.e., when chroma_format_idc=3), the BDPCM enable flag for the chroma block may be transmitted.
[0223] Different from the above, the present disclosure proposes an embodiment for controlling whether to enable BDPCM for both luma blocks and chroma blocks based on one flag. For example, in the proposed embodiment, as in Table 7 to be described later, only one syntax element sps_bdpcm_enabled_flag for whether to enable BDPCM can be sent in the SPS syntax, and by doing so, whether to enable / disable BDPCM for both luma blocks and chroma blocks can be derived. According to the present embodiment, whether to enable BDPCM for luma blocks and chroma blocks in an image can be determined by one syntax element, and by doing so, the amount of bits used for BDPCM can be reduced, and the overall coding efficiency can be improved.
[0224] [Table 7]
[0225]
[0226] [Table 8]
[0227]
[0228] For example, referring to Table 8, when sps_bdpcm_enabled_flag is 1, it may mean that BDPCM is enabled for both the luminance block and the chrominance block, and when sps_bdpcm_enabled_flag is 0, it may mean that BDPCM is not enabled for both the luminance block and the chrominance block. That is, for example, when the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that BDPCM is enabled in a coding unit (including a luminance component and a chrominance component) performing intra prediction, and when the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that BDPCM is not enabled in a coding unit performing intra prediction. That is, for example, when the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that intra_bdpcm_luma_flag and intra_bdpcm_chroma_flag exist in the coding unit, and when the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that intra_bdpcm_luma_flag and intra_bdpcm_chroma_flag do not exist in the coding unit. intra_bdpcm_luma_flag and intra_bdpcm_chroma_flag may be indicated as intra_bdpcm_flag.
[0229] At the same time, the flag for whether to enable BDPCM can be sent not only from the SPS syntax as illustrated above, but also from the adaptation parameter set (APS) syntax, picture parameter set (PPS) syntax, video parameter set (VPS) syntax, decoding parameter set (DPS) syntax, picture header syntax or slice header syntax.
[0230] Furthermore, in the proposed embodiment, the semantics of the syntax element sps_bdpcm_enabled_flag may be changed as in Table 8.
[0231] Furthermore, in the present embodiment, since whether to enable BDPCM for the luma block and the chroma block is controlled at once by the syntax element sps_bdpcm_enabled_flag, the coding unit syntax according to the present embodiment may be as shown in the following table.
[0232] [Table 9]
[0233]
[0234]
[0235]
[0236]
[0237]
[0238]
[0239]
[0240]
[0241] In addition, the present disclosure proposes another embodiment for signaling information about BDPCM. For example, the present disclosure proposes an embodiment for controlling whether BDPCM for both luminance blocks and chrominance blocks is enabled regardless of the chrominance format of the image. According to this embodiment, information about whether BDPCM for luminance blocks is enabled and information about whether BDPCM for chrominance blocks is enabled can be sent separately, regardless of the chrominance format of the image. According to this embodiment, regardless of the chrominance format of the image, a BDPCM chrominance enable flag indicating whether BDPCM for chrominance blocks in the image is enabled can be signaled, and by doing so, the complexity of BDPCM can be reduced, and the overall coding efficiency can be improved.
[0242] For example, in the proposed embodiment, if the transform skip mode is enabled (i.e., if sps_transform_skip_enabled_flag is 1), as shown in Table 10 to be described later, the syntax element sps_bdpcm_enabled_flag for whether BDPCM of the luma block is enabled and the syntax element sps_bdpcm_chroma_enabled_flag for whether BDPCM of the chroma block is enabled can be sent from the SPS syntax.
[0243] [Table 10]
[0244]
[0245] [Table 11]
[0246]
[0247] For example, if sps_bdpcm_enabled_flag is 1, it may mean that BDPCM is enabled for the luma block, and if sps_bdpcm_enabled_flag is 0, it may mean that BDPCM is not enabled for the luma block. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that BDPCM is enabled in a luma coding unit that performs intra prediction, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that BDPCM is not enabled in a luma coding unit that performs intra prediction. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that intra_bdpcm_luma_flag exists in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that intra_bdpcm_luma_flag does not exist in the coding unit.
[0248] In addition, for example, if sps_bdpcm_chroma_enabled_flag is 1, it may mean that BDPCM is enabled for the chroma block, and if sps_bdpcm_chroma_enabled_flag is 0, it may mean that BDPCM is not enabled for the chroma block. That is, for example, if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it may indicate that BDPCM is enabled in the chroma coding unit that performs intra-frame prediction, and if the syntax element sps_bdpcm_chroma_enabled_flag is 0, it may indicate that BDPCM is not enabled in the chroma coding unit that performs intra-frame prediction. That is, for example, if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it may indicate that intra_bdpcm_chroma_flag exists in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that intra_bdpcm_chroma_flag does not exist in the coding unit.
[0249] At the same time, the flag for whether to enable BDPCM can be sent not only from the SPS syntax as illustrated above, but also from the adaptation parameter set (APS) syntax, picture parameter set (PPS) syntax, video parameter set (VPS) syntax, decoding parameter set (DPS) syntax, picture header syntax or slice header syntax.
[0250] Furthermore, 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 in Table 11.
[0251] In addition, the present disclosure proposes another embodiment for signaling information about BDPCM. For example, the present disclosure proposes an embodiment for controlling whether BDPCM for both luminance blocks and chrominance blocks is enabled regardless of the chrominance format of the image. According to the present embodiment, information about whether BDPCM for luminance blocks is enabled and information about whether BDPCM for chrominance blocks is enabled can be sent separately regardless of the chrominance format of the image, and information about whether BDPCM for chrominance blocks is enabled can be sent only when BDPCM is enabled for luminance blocks. According to the present embodiment, regardless of the chrominance format of the image, a BDPCM enable flag indicating whether BDPCM for luminance blocks and chrominance blocks in the image is enabled can be signaled, and by doing so, the complexity of BDPCM can be reduced and the overall coding efficiency can be improved.
[0252] For example, in the proposed embodiment, if the transform skip mode is enabled (i.e., if sps_transform_skip_enabled_flag is 1), as in Table 12 to be described later, the syntax element sps_bdpcm_enabled_flag for whether BDPCM of the luma block is enabled may be sent, and if BDPCM is enabled for the luma block (i.e., if sps_bdpcm_enabled_flag is 1), the syntax element sps_bdpcm_chroma_enabled_flag for whether BDPCM of the chroma block is enabled may be sent from the SPS syntax.
[0253] [Table 12]
[0254]
[0255] [Table 13]
[0256]
[0257]
[0258] For example, if sps_bdpcm_enabled_flag is 1, it may mean that BDPCM is enabled for the luma block, and if sps_bdpcm_enabled_flag is 0, it may mean that BDPCM is not enabled for the luma block. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that BDPCM is enabled in a luma coding unit that performs intra prediction, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that BDPCM is not enabled in a luma coding unit that performs intra prediction. That is, for example, if the syntax element sps_bdpcm_enabled_flag is 1, it may indicate that intra_bdpcm_luma_flag exists in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that intra_bdpcm_luma_flag does not exist in the coding unit.
[0259] In addition, for example, if sps_bdpcm_chroma_enabled_flag is 1, it may mean that BDPCM is enabled for the chroma block, and if sps_bdpcm_chroma_enabled_flag is 0, it may mean that BDPCM is not enabled for the chroma block. That is, for example, if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it may indicate that BDPCM is enabled in the chroma coding unit that performs intra-frame prediction, and if the syntax element sps_bdpcm_chroma_enabled_flag is 0, it may indicate that BDPCM is not enabled in the chroma coding unit that performs intra-frame prediction. That is, for example, if the syntax element sps_bdpcm_chroma_enabled_flag is 1, it may indicate that intra_bdpcm_chroma_flag exists in the coding unit, and if the syntax element sps_bdpcm_enabled_flag is 0, it may indicate that intra_bdpcm_chroma_flag does not exist in the coding unit.
[0260] At the same time, the flag for whether to enable BDPCM can be sent not only from the SPS syntax as illustrated above, but also from the adaptation parameter set (APS) syntax, picture parameter set (PPS) syntax, video parameter set (VPS) syntax, decoding parameter set (DPS) syntax, picture header syntax or slice header syntax.
[0261] In addition, the present disclosure proposes another embodiment for signaling information about BDPCM. For example, in addition to the above-mentioned embodiments, the present disclosure also proposes an embodiment for performing a process to be described later. For example, according to this embodiment, BDPCM can be enabled for both luma blocks and chroma blocks in SPS syntax, VPS syntax, DPS syntax, picture header syntax, or slice header syntax, and if specific conditions that BDPCM can be performed are met, intra_bdpcm_chroma_flag and intra_bdpcm_chroma_dir_flag are not sent in CU syntax or TU syntax, and the value of intra_bdpcm_chroma_flag can be derived as the value of intra_bdpcm_luma_flag, and the value of intra_bdpcm_chroma_dir_flag can be derived as the value of intra_bdpcm_luma_dir_flag. Here, for example, the specific condition may be that the tree type is a dual tree and / or the width and height of the current block are both smaller than the maximum size of the defined transform skip block (ie, when cbWidth<=MaxTsSize&&cbHeight<=MaxTsSize).
[0262] In addition, for example, according to the present embodiment, if a specific condition that BDPCM can be performed is satisfied, intra_bdpcm_chroma_flag may not be sent, and the value of intra_bdpcm_chroma_flag may be derived as the value of intra_bdpcm_luma_flag. This means that in the case where the luma block of the current block is coded in the BDPCM mode, the chroma block of the current block is coded in the BDPCM mode without sending 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 independent of intra_bdpcm_luma_dir_flag. That is, in the above embodiment, intra_bdpcm_chroma_dir_flag for the current block may be sent.
[0263] As another example, if intra_bdpcm_luma_flag and intra_bdpcm_chroma_flag for the current block are both 1 if a specific condition enabling BDPCM execution is satisfied, intra_bdpcm_chroma_dir_flag may not be transmitted and the value of intra_bdpcm_chroma_dir_flag may be derived as the value of intra_bdpcm_luma_dir_flag.
[0264] Furthermore, the present disclosure proposes another embodiment for signaling information about BDPCM.For example, in addition to one of the above-described embodiments in the present disclosure, the present disclosure also proposes an embodiment for performing a process described later.
[0265] For example, according to the present embodiment, in a case where DBPCM for a chroma block is enabled 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 and intra_bdpcm_chroma_dir_flag for each chroma block (Cb chroma block and Cr chroma block) are not separately transmitted in the CU syntax or TU syntax. And intra_bdpcm_chroma_flag and intra_bdpcm_chroma_dir_flag for the Cb chroma block and the Cr chroma block may be transmitted. That is, if the value of the transmitted intra_bdpcm_chroma_flag is 1, it means that the Cb chroma block and the Cr chroma block of the current block are both coded in the BDPCM mode, and if the value of the transmitted intra_bdpcm_chroma_flag is 0, it means that neither the Cb chroma block nor the Cr chroma block of the current block is coded in the BDPCM mode. In addition, if the value of intra_bdpcm_chroma_dir_flag is 0, it means that the BDPCM prediction direction for the Cb chroma block and the Cr chroma block of the current block is the horizontal direction, and if the value of intra_bdpcm_chroma_dir_flag is 1, it means that the BDPCM prediction direction for the Cb chroma block and the Cr chroma block of the current block is the vertical direction.
[0266] Alternatively, for example, according to the present embodiment, in the case where DBPCM for chroma blocks is enabled 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) may not be sent separately in the CU syntax or TU syntax, and intra_bdpcm_chroma_flag for the Cb chroma block and the Cr chroma block may be sent. That is, if the value of the transmitted intra_bdpcm_chroma_flag is 1, it means that both the Cb chroma block and the Cr chroma block of the current block are coded in the BDPCM mode, and if the value of the transmitted intra_bdpcm_chroma_flag is 0, it means that neither the Cb chroma block nor the Cr chroma block of the current block is coded in the BDPCM mode. Here, the intra_bdpcm_chroma_dir_flag for each chroma block may be transmitted, and the intra_bdpcm_chroma_dir_flag for each chroma block may have a different value.
[0267] For example, according to the present embodiment, when DBPCM for chroma blocks is enabled 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) is sent in the CU syntax or TU syntax, and intra_bdpcm_chroma_dir_flag for the Cb chroma block and the Cr chroma block may be sent.
[0268] That is, if the intra_bdpcm_chroma_flag values sent for the chroma blocks are all 1, the intra_bdpcm_chroma_dir_flag of the chroma block coded later between the two chroma blocks may not be coded, and the intra_bdpcm_chroma_dir_flag of the chroma color block coded earlier between the two chroma blocks may be 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 chroma block and the Cr chroma block of the current block is the horizontal direction, and if the value of intra_bdpcm_chroma_dir_flag is 1, it may mean that the BDPCM prediction direction for the Cb chroma block and the Cr chroma block of the current block is the vertical direction.
[0269] Fig. 9 The following schematically shows an image encoding method performed by the encoding device according to the present disclosure. Fig. 9 The method disclosed in can be Figure 2 Specifically, for example, Fig. 9 S900 and S920 to S930 may be performed by a predictor of the encoding device, Fig. 9 S910 and S940 to S950 of the encoding device may be performed by an entropy encoder. In addition, although not shown, the process of deriving residual samples may be performed by a residual processor of the encoding device, and the process of generating reconstructed samples and reconstructed pictures based on residual samples and prediction samples may be performed by an adder of the encoding device.
[0270] The encoding apparatus determines whether to enable block-based delta pulse code modulation (BDPCM) for a chroma block and a luminance block (S900). For example, the encoding apparatus may determine whether to enable BDPCM for a chroma block and a luminance block in an image.
[0271] The encoding device generates a BDPCM enable flag (S910) for whether to enable BDPCM for chroma blocks and luminance blocks based on the determined result. The encoding device can generate a BDPCM enable flag for whether to enable BDPCM for chroma blocks and luminance blocks based on the determined result. For example, the image information may include a BDPCM enable flag for whether to enable BDPCM for chroma blocks and luminance blocks. For example, the BDPCM enable flag can indicate whether block-based incremental pulse code modulation (BDPCM) is enabled for chroma blocks and luminance blocks. For example, if the value of the BDPCM enable flag is 1, the BDPCM enable flag can indicate that block-based incremental pulse code modulation (BDPCM) is enabled for chroma blocks and luminance blocks, and if the value of the BDPCM enable flag is 0, the BDPCM enable flag can indicate that block-based incremental pulse code modulation (BDPCM) is not enabled for chroma blocks and luminance blocks. That is, for example, the BDPCM enable flag can indicate whether there is a BDPCM flag for chroma blocks and luminance blocks. For example, if the value of the BDPCM enable flag is 1, the BDPCM enable flag may indicate that the BDPCM flags for the chroma block and the luminance block exist, and if the value of the BDPCM enable flag is 0, the BDPCM enable flag may indicate that the BDPCM flags for the chroma block and the luminance block do not exist. In addition, 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).
[0272] In addition, for example, the BDPCM enable flag may be signaled regardless of the chroma format of the image. For example, the BDPCM enable flag may be signaled when the chroma format of the image is YUV 444, YUV 420, or YUV 422. That is, for example, even when the chroma format of the image is YUV 444, the BDPCM enable flag may be signaled.
[0273] In addition, for example, the BDPCM enable flag may be signaled via a high-level syntax. For example, the BDPCM enable flag may be signaled via a sequence parameter set (SPS). In addition, for example, the BDPCM enable flag may be signaled via 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 enable flag may be sps_bdpcm_enabled_flag as described above.
[0274] The encoding apparatus generates a prediction sample of the current luminance block based on the BDPCM (S920). For example, the encoding apparatus may determine whether to apply the BDPCM to the current luminance block, and may determine a direction in which the BDPCM is performed.
[0275] The encoding device can derive prediction samples by performing intra prediction on the current luminance block based on the prediction direction of the BDPCM for the current luminance block. For example, the prediction direction can be a vertical direction or a horizontal direction, and the prediction samples for the current luminance block can be generated according to the subsequent intra prediction mode.
[0276] For example, if the prediction direction for the current luminance block is derived as a horizontal direction, the encoding device may derive the prediction sample of the current luminance block based on the horizontal intra prediction mode. In other words, for example, if the prediction direction for the current luminance block is derived as a horizontal direction, the encoding device may derive the prediction sample of the current luminance block by performing intra prediction based on the left adjacent sample of the current luminance block. For example, if the prediction direction for the current luminance block is derived as a horizontal direction, the encoding device may derive the sample value of the left adjacent sample in the same row as the row of the prediction sample as the sample value of the prediction sample.
[0277] In addition, for example, if the prediction direction for the current luminance block is derived as a vertical direction, the encoding device may derive the prediction sample of the current luminance block based on the vertical intra prediction mode. In other words, for example, if the prediction direction for the current luminance block is derived as a vertical direction, the encoding device may derive the prediction sample of the current luminance block based on the upper adjacent sample of the current luminance block. For example, if the prediction direction for the current luminance block is derived as a vertical direction, the encoding device may derive the sample value of the upper adjacent sample in the same column as the column of the prediction sample as the sample value of the prediction sample.
[0278] The encoding apparatus generates a prediction sample for the current chroma block based on the BDPCM (S930). For example, the encoding apparatus may determine whether to apply the BDPCM to the current chroma block, and may determine a direction in which the BDPCM is performed.
[0279] The encoding device can derive prediction samples by performing intra prediction on the current chroma block based on the prediction direction of the BDPCM for the current chroma block. For example, the prediction direction can be a vertical direction or a horizontal direction, and the prediction samples for the current chroma block can be generated according to the subsequent intra prediction mode.
[0280] For example, if the prediction direction for the current chroma block is derived as a horizontal direction, the encoding device may derive the prediction sample of the current chroma block based on the horizontal intra prediction mode. In other words, for example, if the prediction direction for the current chroma block is derived as a horizontal direction, the encoding device may derive the prediction sample of the current chroma block by performing intra prediction based on the left neighboring sample of the current chroma block. For example, if the prediction direction for the current chroma block is derived as a horizontal direction, the encoding device may derive the sample value of the left neighboring sample in the same row as the row of the prediction sample as the sample value of the prediction sample.
[0281] In addition, for example, if the prediction direction for the current chroma block is derived as a vertical direction, the encoding device may derive the prediction sample of the current chroma block based on the vertical intra prediction mode. In other words, for example, if the prediction direction for the current chroma block is derived as a vertical direction, the encoding device may derive the prediction sample of the current chroma block based on the upper adjacent sample of the current chroma block. For example, if the prediction direction for the current chroma block is derived as a vertical direction, the encoding device may derive the sample value of the upper adjacent sample in the same column as the column of the prediction sample as the sample value of the prediction sample.
[0282] The encoding apparatus generates BDPCM-related information for the current luma block and BDPCM-related information for the current chroma block (S940).
[0283] For example, if the value of the BDPCM enable flag is 1 (i.e., if it is determined that BDPCM is enabled for the chrominance block and the luminance block), the encoding device may generate BDPCM-related information for the current luminance block and BDPCM-related information for the current chrominance block. The image information may include BDPCM-related information for the current luminance block and BDPCM-related information for the current chrominance block.
[0284] 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.
[0285] For example, the encoding device may determine whether to apply BDPCM to the current luminance block, and may generate a BDPCM luminance flag for whether to apply BDPCM to the current luminance block.
[0286] For example, the BDPCM luma flag may indicate whether BDPCM is applied to the current luma block and whether there is a BDPCM luma direction flag for the current luma block. For example, if the value of the BDPCM luma flag is 1, the BDPCM luma flag may indicate that BDPCM is applied to the current luma block and there is a BDPCM luma direction flag for the current luma block, and if the value of the BDPCM luma flag is 0, the BDPCM luma flag may indicate that BDPCM is not applied to the current luma block and there is no BDPCM luma direction flag for the current luma block. For example, the syntax element of the BDPCM luma flag may be bdpcm_flag or intra_bdpcm_luma_flag as described above. In addition, for example, the BDPCM luma flag may be signaled in units of coding units (CUs).
[0287] In addition, for example, the encoding device may determine whether to apply BDPCM to the current luminance block, and may determine the direction in which BDPCM is performed. For example, if the BDPCM luminance flag indicates that BDPCM is applied to the current luminance block, the encoding device may generate and encode a BDPCM luminance direction flag. For example, the BDPCM luminance direction flag may indicate a vertical direction or a horizontal direction as a prediction direction for the current luminance block. For example, if the value of the BDPCM luminance direction flag is 0, the BDPCM luminance direction flag may indicate that the prediction direction for the current luminance block is a horizontal direction, and if the value of the BDPCM luminance direction flag is 1, the BDPCM luminance direction flag may indicate that the prediction direction for the current luminance block is a vertical direction. For example, the syntax element of the BDPCM luminance direction flag may be bdpcm_dir_flag or intra_bdpcm_luma_dir_flag as described above. In addition, for example, the BDPCM luminance direction flag may be signaled in units of coding units (CUs).
[0288] 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. In addition, for example, when the tree type of the image is a single tree and the value of the BDPCM enable flag is 1, the BDPCM related information for the current chroma block (i.e., for all current chroma blocks) may be signaled. That is, for example, when the tree type of the image is a single tree and BDPCM is enabled for the current chroma block, the BDPCM related information for the current chroma block (i.e., for all current chroma blocks) may be signaled. At the same time, depending on whether the current chroma block corresponding to the current luminance block has a separate partitioned structure, the tree type of the current block may be divided into a single tree (SINGLE_TREE) or a dual tree (DUAL_TREE). For example, if the current chroma block has a partitioned structure that is the same as the partitioned structure of the current luminance block, it may be represented as a single tree, and if the current chroma block has a partitioned structure that is different from the partitioned structure of the current luminance block, it may be represented as a dual tree.
[0289] For example, the encoding device may determine whether to apply BDPCM to the current chroma block, and may generate a BDPCM chroma flag for whether to apply block-based incremental pulse code modulation (BDPCM) to the current chroma block. For example, the BDPCM chroma flag may indicate whether BDPCM is applied to the current chroma block and whether there is a BDPCM chroma direction flag for the current chroma block. For example, if the value of the BDPCM chroma flag is 1, the BDPCM chroma flag may indicate that BDPCM is applied to the current chroma block and there is a BDPCM chroma direction flag for the current chroma block, and if the value of the BDPCM chroma flag is 0, the BDPCM chroma flag may indicate that BDPCM is not applied to the current chroma block and there is no BDPCM chroma direction flag for the current chroma block. That is, for example, if the value of the BDPCM chroma flag is 1, the BDPCM chroma flag may indicate that BDPCM is applied to all current chroma blocks and there are BDPCM chroma direction flags for all current chroma blocks, and if the value of the BDPCM chroma flag is 0, the BDPCM chroma flag may indicate that BDPCM is not applied to all current chroma blocks and there are no BDPCM chroma direction flags for all current chroma blocks. 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 bdpcm_flag or intra_bdpcm_chroma_flag as described above. In addition, for example, the BDPCM chroma flag may be signaled in units of coding units (CUs).
[0290] In addition, for example, the encoding device may determine whether to apply BDPCM to the current chroma block, and may determine the direction in which BDPCM is performed. For example, if the BDPCM chroma flag indicates that BDPCM is applied to the current chroma block, the encoding device may generate and encode a BDPCM chroma direction flag. For example, the BDPCM chroma direction flag may indicate a vertical direction or a horizontal direction as a prediction direction for the current chroma block. For example, if the value of the BDPCM chroma direction flag is 0, the BDPCM chroma direction flag may indicate that the prediction direction for the current chroma block is a horizontal direction, and if the value of the BDPCM chroma direction flag is 1, the BDPCM chroma direction flag may indicate that the prediction direction for the current chroma block is a vertical direction. For example, the syntax element of the BDPCM chroma direction flag may be bdpcm_dir_flag or intra_bdpcm_chroma_dir_flag as described above. In addition, for example, the BDPCM chroma direction flag may be signaled in units of coding units (CUs).
[0291] Meanwhile, for example, the encoding device may derive residual samples of the current luma block based on the prediction samples of the current luma block. For example, the encoding device may derive residual samples by subtracting the prediction samples from the original samples for the current luma block. In addition, for example, the encoding device may derive residual samples of the current chroma block based on the prediction samples of the current chroma block. For example, the encoding device may derive residual samples by subtracting the prediction samples from the original samples of each current chroma block.
[0292] The encoding device encodes the image information including the BDPCM enable flag, the BDPCM related information for the current luminance block, and the BDPCM related information for the current chrominance block (S950). The encoding device may encode the image information including the BDPCM enable flag, the BDPCM related information for the current luminance block, and the BDPCM related information for the current chrominance block. For example, the BDPCM related information for the current luminance block may include a BDPCM luminance flag for whether to apply BDPCM to the current luminance block, and / or a BDPCM luminance direction flag for the prediction direction of the current luminance block, and the BDPCM related information for the current chrominance block may include a BDPCM chrominance flag for whether to apply BDPCM to the current chrominance block, and / or a BDPCM chrominance direction flag for the prediction direction of the current chrominance block.
[0293] Meanwhile, for example, the image information may include residual information. For example, the encoding device may derive the residual coefficient of the current luminance block or the current chrominance block based on the residual samples of the current luminance block or the current chrominance block. For example, if BDPCM is applied to the current luminance block or the current chrominance block, the encoding device may determine not to apply the transform to the current luminance block or the current chrominance block. In this case, for example, the encoding device may derive the residual coefficient by performing quantization on the current luminance block or the current chrominance block. Here, for example, a block to which a transform is not applied may be represented as a transform skip block. That is, for example, the current luminance block or the current chrominance block may be a transform skip block.
[0294] Thereafter, for example, the encoding device may encode residual information for the residual coefficient. For example, the residual information may include residual information for the residual coefficient of the residual sample.
[0295] For example, the residual information may include a syntax element for a residual sample of a current luminance block or a current chrominance block, and based on the syntax element for the target residual sample, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left adjacent residual sample or the upper adjacent residual sample of the target residual sample may be derived. For example, if the prediction direction of the current luminance block or the current chrominance block is a horizontal direction, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left adjacent 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 luminance block or the current chrominance block is a horizontal direction, the syntax element for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left adjacent residual sample of the target residual sample. In addition, for example, if the prediction direction of the current luminance block or the current chrominance block is a vertical direction, the syntax element for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper adjacent residual sample of the target residual sample. That is, for example, if the prediction direction of the current luminance block or the current chrominance block is the vertical direction, the syntax element for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper adjacent residual sample of the target residual sample. In addition, if the target residual sample is located in the first row or the first column of the current luminance block or the current chrominance block, the residual coefficient value of the target residual sample may be derived based on the syntax element of the target residual sample. That is, if the target residual sample is located in the first row or the first column of the current luminance block or the current chrominance block, the syntax element for the target residual sample may represent the residual coefficient value of the target residual sample.
[0296] At the same time, the bit stream including the image information can be sent to the decoding device via a network or a (digital) storage medium. Here, the network can include a broadcast network and / or a communication network, and the digital storage medium can include various types of storage media, such as USB disk, SD, CD, DVD, Blu-ray disc, HDD and SSD.
[0297] Fig.10 The figure schematically shows an encoding device for executing the image encoding method according to the present disclosure. Fig. 9 The method disclosed in can be Fig.10 Specifically, for example, Fig.10 The predictor of the encoding device can perform Fig. 9 S900 and S920 to S930, and the entropy encoder of the encoding device may perform Fig. 9 In addition, although not shown, the process of deriving residual samples may be performed by a residual processor of the encoding device, and the process of generating reconstructed samples and reconstructed pictures based on the residual samples and the prediction samples may be performed by an adder of the encoding device.
[0298] Fig.11 The image decoding method of the decoding device according to the present disclosure is schematically shown. Fig.11 The method disclosed in can be Figure 3 Specifically, for example, Fig.11 S1100 to S1120 and S1140 to S1150 may be performed by an entropy decoder of a decoding device, Fig.11 S1130 and S1160 may be performed by a predictor of a decoding device, and Fig.11 S1170 may be executed by an adder of the decoding device.
[0299] The decoding device obtains a BDPCM enable flag (S1100) for whether to enable block-based incremental pulse code modulation (BDPCM) for luminance blocks and chrominance blocks. The decoding device can obtain a BDPCM enable flag for whether to enable BDPCM for luminance blocks and chrominance blocks. The decoding device can obtain image information through a bitstream. For example, the image information may include a BDPCM enable flag for whether to enable BDPCM for luminance blocks and chrominance blocks. For example, the BDPCM enable flag may indicate whether block-based incremental pulse code modulation (BDPCM) is enabled for chrominance blocks and luminance blocks. For example, if the value of the BDPCM enable flag is 1, the BDPCM enable flag may indicate that block-based incremental pulse code modulation (BDPCM) is enabled for chrominance blocks and luminance blocks, and if the value of the BDPCM enable flag is 0, the BDPCM enable flag may indicate that block-based incremental pulse code modulation (BDPCM) is not enabled for chrominance blocks and luminance blocks. That is, for example, the BDPCM enable flag may indicate whether there is a BDPCM flag for chrominance blocks and luminance blocks. For example, if the value of the BDPCM enable flag is 1, the BDPCM enable flag may indicate that the BDPCM flags for the chroma block and the luminance block exist, and if the value of the BDPCM enable flag is 0, the BDPCM enable flag may indicate that the BDPCM flags for the chroma block and the luminance block do not exist. In addition, 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).
[0300] In addition, for example, the BDPCM enable flag may be signaled regardless of the chroma format of the image. For example, the BDPCM enable flag may be signaled when the chroma format of the image is YUV 444, YUV 420, or YUV 422. That is, for example, even when the chroma format of the image is YUV 444, the BDPCM enable flag may be signaled.
[0301] In addition, for example, the BDPCM enable flag may be signaled via a high-level syntax. For example, the BDPCM enable flag may be signaled via a sequence parameter set (SPS). In addition, for example, the BDPCM enable flag may be signaled via 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 enable flag may be sps_bdpcm_enabled_flag as described above.
[0302] The decoding device obtains a BDPCM brightness flag for whether to apply BDPCM to the current brightness block based on the BDPCM enable flag (S1110). The decoding device can obtain BDPCM related information for the current brightness block based on the BDPCM enable flag. For example, the BDPCM related information for the current brightness block may include a BDPCM brightness flag for the current brightness block. The decoding device can obtain a BDPCM brightness flag for the current brightness block based on the BDPCM enable flag.
[0303] For example, if the value of the BDPCM enable flag is 1 (i.e., if it indicates that BDPCM is enabled for the chrominance block and the luminance block), the decoding device can obtain a BDPCM luminance flag for whether BDPCM is applied to the current luminance block. For example, the BDPCM luminance flag can indicate whether BDPCM is applied to the current luminance block and whether there is a BDPCM luminance direction flag for the current luminance block. For example, if the value of the BDPCM luminance flag is 1, the BDPCM luminance flag can indicate that BDPCM is applied to the current luminance block and there is a BDPCM luminance direction flag for the current luminance block, and if the value of the BDPCM luminance flag is 0, the BDPCM luminance flag can indicate that BDPCM is not applied to the current luminance block and there is no BDPCM luminance direction flag for the current luminance block. For example, the syntax element of the BDPCM luminance flag can be bdpcm_flag or intra_bdpcm_luma_flag as described above. In addition, for example, the BDPCM luminance flag can be signaled in units of coding units (CUs).
[0304] The decoding device obtains a BDPCM luma direction flag for a prediction direction of a 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.
[0305] For example, the decoding device may obtain a BDPCM luminance direction flag for the prediction direction of the current luminance block based on the BDPCM luminance flag. For example, if the BDPCM luminance flag indicates that BDPCM is applied to the current luminance block, the decoding device may obtain the BDPCM luminance direction flag. That is, for example, if the value of the BDPCM luminance flag is 1, the decoding device may obtain the BDPCM luminance direction flag. For example, the BDPCM luminance direction flag may indicate a vertical direction or a horizontal direction as the prediction direction of the current luminance block. For example, if the value of the BDPCM luminance direction flag is 0, the BDPCM luminance direction flag may indicate that the prediction direction for the current luminance block is a horizontal direction, and if the value of the BDPCM luminance direction flag is 1, the BDPCM luminance direction flag may indicate that the prediction direction for the current luminance block is a vertical direction. For example, the syntax element of the BDPCM luminance direction flag may be bdpcm_dir_flag or intra_bdpcm_luma_dir_flag as described above. In addition, for example, the BDPCM luminance direction flag may be signaled in units of coding units (CUs).
[0306] The decoding apparatus derives a prediction sample of the current luma block based on the intra prediction mode derived based on the BDPCM luma direction flag (S1130).
[0307] For example, the decoding device may derive a prediction sample of the current luma block based on an intra prediction mode derived based on a BDPCM luma direction flag.
[0308] For example, if the value of the BDPCM luma direction flag is 0, that is, for example, if the BDPCM luma direction flag indicates that the prediction direction for the current luma block is the horizontal direction, the decoding device may derive the horizontal intra prediction mode as the intra prediction mode of the current luma block. For example, if the value of the BDPCM luma direction flag is 0, that is, for example, if the BDPCM luma direction flag indicates that the prediction direction for the current luma block is the horizontal direction, the decoding device may derive the prediction sample of the current luma block based on the horizontal intra prediction mode. In other words, for example, if the value of the BDPCM luma direction flag is 0, that is, for example, if the BDPCM luma direction flag indicates that the prediction direction for the current luma block is the horizontal direction, the decoding device may derive the prediction sample of the current luma block by performing intra prediction based on the left adjacent sample of the current luma block. For example, if the prediction direction for the current luma block is derived as the horizontal direction, the decoding device may derive the sample value of the left adjacent sample in the same row as the row of the prediction sample as the sample value of the prediction sample.
[0309] In addition, for example, if the value of the BDPCM luma direction flag is 1, that is, for example, if the BDPCM luma direction flag indicates that the prediction direction for the current luma block is a vertical direction, the decoding device may derive a vertical 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 1, that is, for example, if the BDPCM luma direction flag indicates that the prediction direction for the current luma block is a vertical direction, the decoding device may derive a prediction sample of the current luma block based on the vertical intra prediction mode. In other words, for example, if the value of the BDPCM luma direction flag is 1, that is, for example, if the BDPCM luma direction flag indicates that the prediction direction for the current luma block is a vertical direction, the decoding device may derive a prediction sample of the current luma block by performing intra prediction based on an upper adjacent sample of the current luma block. For example, if the prediction direction for the current luma block is derived as a vertical direction, the decoding device may derive a sample value of an upper adjacent sample in the same column as a column of the prediction sample as a sample value of the prediction sample.
[0310] The decoding device obtains a BDPCM chroma flag for whether to apply BDPCM to the current chroma block based on the BDPCM enable flag (S1140). The decoding device can obtain BDPCM related information for the current chroma block based on the BDPCM enable 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 can obtain a BDPCM chroma flag for the current chroma block based on the BDPCM enable flag.
[0311] In addition, for example, in the case where the tree type of the image is a single tree and the value of the BDPCM enable flag is 1, BDPCM-related information for the current chroma block (i.e., for all current chroma blocks) may be signaled. That is, for example, in the case where the tree type of the image is a single tree and BDPCM is enabled for the current chroma block, BDPCM-related information for the current chroma block (i.e., for all current chroma blocks) may be signaled. At the same time, depending on whether the current chroma block corresponding to the current luminance block has a separate partitioned structure, the tree type of the current block may be divided into a single tree (SINGLE_TREE) or a dual tree (DUAL_TREE). For example, if the current chroma block has the same partitioned structure as the current luminance block, it may be represented as a single tree, and if the current chroma block has a partitioned structure different from the current luminance block, it may be represented as a dual tree.
[0312] For example, the BDPCM luma flag may indicate whether BDPCM is applied to the current luma block and whether there is a BDPCM luma direction flag for the current luma block. For example, if the value of the BDPCM luma flag is 1, the BDPCM luma flag may indicate that BDPCM is applied to the current luma block and there is a BDPCM luma direction flag for the current luma block, and if the value of the BDPCM luma flag is 0, the BDPCM luma flag may indicate that BDPCM is not applied to the current luma block and there is no BDPCM luma direction flag for the current luma block. For example, the syntax element of the BDPCM luma flag may be bdpcm_flag or intra_bdpcm_luma_flag as described above. In addition, for example, the BDPCM luma flag may be signaled in units of coding units (CUs).
[0313] The decoding device obtains a BDPCM chroma direction flag for a prediction direction of a 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.
[0314] 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 BDPCM is applied to the current chroma block, the decoding device may obtain the BDPCM chroma direction flag. That is, for example, if the value of the BDPCM chroma flag is 1, the decoding device may obtain the BDPCM chroma direction flag. For example, the BDPCM chroma direction flag may indicate a vertical direction or a horizontal direction as the prediction direction for the current chroma block. For example, if the value of the BDPCM chroma direction flag is 0, the BDPCM chroma direction flag may indicate that the prediction direction for the current chroma block is a horizontal direction, and if the value of the BDPCM chroma direction flag is 1, the BDPCM chroma direction flag may indicate that the prediction direction for the current chroma block is a vertical direction. For example, the syntax element of the BDPCM chroma direction flag may be bdpcm_dir_flag or intra_bdpcm_chroma_dir_flag as described above. Furthermore, for example, the BDPCM chroma direction flag may be signaled in units of coding units (CUs).
[0315] The decoding device 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 device may derive prediction samples of the current chroma block based on the intra prediction mode derived based on the BDPCM chroma direction flag.
[0316] For example, if the value of the BDPCM chroma direction flag is 0, that is, for example, if the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is the horizontal direction, the decoding device may derive the horizontal intra prediction mode as the intra prediction mode of the current chroma block. For example, if the value of the BDPCM chroma direction flag is 0, that is, for example, if the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is the horizontal direction, the decoding device may derive the prediction sample of the current chroma block based on the horizontal intra prediction mode. In other words, for example, if the value of the BDPCM chroma direction flag is 0, that is, for example, if the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is the horizontal direction, the decoding device may derive the prediction sample of the current chroma block by performing intra prediction based on the left adjacent sample of the current chroma block. For example, if the prediction direction for the current chroma block is derived as the horizontal direction, the decoding device may derive the sample value of the left adjacent sample in the same row as the row of the prediction sample as the sample value of the prediction sample.
[0317] In addition, for example, if the value of the BDPCM chroma direction flag is 1, that is, for example, if the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is a vertical direction, the decoding device can derive the vertical intra prediction mode as the intra prediction mode of the current chroma block. For example, if the value of the BDPCM chroma direction flag is 1, that is, for example, if the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is a vertical direction, the decoding device can derive the prediction sample of the current chroma block based on the vertical intra prediction mode. In other words, for example, if the value of the BDPCM chroma direction flag is 1, that is, for example, if the BDPCM chroma direction flag indicates that the prediction direction for the current chroma block is a vertical direction, the decoding device can derive the prediction sample of the current chroma block by performing intra prediction based on the upper adjacent sample of the current chroma block. For example, if the prediction direction of the current chroma block is derived as a vertical direction, the decoding device can derive the sample value of the upper adjacent sample in the same column as the column of the prediction sample as the sample value of the prediction sample.
[0318] The decoding apparatus generates a reconstructed picture based on the prediction samples of the current luminance block and the prediction samples of the current chrominance block ( S1170 ).
[0319] The decoding device can derive reconstructed samples and / or reconstructed pictures for the current luminance block and the current chrominance block based on the predicted samples of the current luminance block and the predicted samples of the current chrominance block. For example, the decoding device can derive the reconstructed samples of the current luminance block by adding the predicted samples of the current luminance block to the residual samples of the current luminance block. In addition, for example, the decoding device can derive the reconstructed samples of the current chrominance block by adding the predicted samples of the current chrominance block to the residual samples of the current chrominance block. That is, for example, the decoding device can derive the reconstructed samples of the current chrominance Cb block by adding the predicted samples of the current chrominance Cb block to the residual samples of the current chrominance Cb block, and can derive the reconstructed samples of the current chrominance Cr block by adding the predicted samples of the current chrominance Cr block to the residual samples of the current chrominance Cr block.
[0320] At the same time, for example, the decoding device can derive residual samples of the current luminance block based on the received residual information, and can derive residual samples of the current chrominance block (residual samples of the current chrominance Cb block and residual samples of the current chrominance Cr block) based on the received residual information.
[0321] For example, if 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., if 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 represent a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-neighboring residual sample or an upper-neighboring residual sample of the target residual sample. That is, for example, if 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 difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-neighboring residual sample or an upper-neighboring residual sample of the target residual sample may be derived based on the syntax element for the target residual sample.
[0322] For example, if BDPCM is applied to the current luminance block and the prediction direction for the current luminance block is the horizontal direction, the syntax element for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left adjacent residual sample of the target residual sample. That is, for example, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left adjacent residual sample of the target residual sample may be derived based on the syntax element for the target residual sample. Thereafter, the residual coefficient of the target residual sample may be derived by the sum of the residual coefficient value of the left adjacent residual sample of the target residual sample and the difference. Here, the target residual sample may be a residual sample in a column excluding the first column of the current luminance block. For example, the residual coefficient of the target residual sample may be derived based on Formula 4 as described above. At the same time, for example, if the target residual sample is a residual sample in the first column of the current luminance block, the residual coefficient of the target residual sample may be derived based on the syntax element of the target residual sample.
[0323] In addition, for example, if BDPCM is applied to the current luminance block and the prediction direction of the current luminance block is the vertical direction, the syntax element for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper adjacent residual sample of the target residual sample. That is, for example, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper adjacent residual sample of the target residual sample may be derived based on the syntax element for the target residual sample. Thereafter, the residual coefficient of the target residual sample may be derived by the sum of the residual coefficient value of the upper adjacent residual sample of the target residual sample and the difference. Here, the target residual sample may be a residual sample in a row excluding the first row of the current luminance block. For example, the residual coefficient of the target residual sample may be derived based on Formula 3 as described above. At the same time, for example, if the target residual sample is a residual sample in the first row of the current luminance block, the residual coefficient of the target residual sample may be derived based on the syntax element of the target residual sample.
[0324] Thereafter, for example, the decoding device may derive the target residual sample by dequantizing the residual coefficient. That is, for example, the target residual sample may be derived by dequantizing the residual coefficient.
[0325] For example, if BDPCM is applied to a current chroma block (e.g., a current chroma Cb block or a current chroma Cr block), the residual information may include a syntax element for a residual sample of the current chroma block (i.e., if 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 (the current chroma Cb block and the current chroma Cr block)), and the syntax element for the target residual sample may represent a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-neighboring residual sample or an upper-neighboring residual sample of the target residual sample. That is, for example, if 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 the difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left-neighboring residual sample or an upper-neighboring residual sample of the target residual sample may be derived based on the syntax element for the target residual sample.
[0326] For example, if BDPCM is applied to the current chroma block and the prediction direction for the current chroma block is the horizontal direction, the syntax element for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left adjacent residual sample of the target residual sample. That is, for example, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left adjacent residual sample of the target residual sample may be derived based on the syntax element for the target residual sample. Thereafter, the residual coefficient of the target residual sample may be derived by the sum of the residual coefficient value of the left adjacent residual sample of the target residual sample and the difference. Here, the target residual sample may be a residual sample in a column excluding the first column of the current chroma block. For example, the residual coefficient of the target residual sample may be derived based on Formula 4 as described above. At the same time, 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 may be derived based on the syntax element of the target residual sample.
[0327] In addition, for example, if BDPCM is applied to the current chroma block and the prediction direction of the current chroma block is the vertical direction, the syntax element for the target residual sample may represent the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper adjacent residual sample of the target residual sample. That is, for example, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper adjacent residual sample of the target residual sample may be derived based on the syntax element for the target residual sample. Thereafter, the residual coefficient of the target residual sample may be derived by the sum of the residual coefficient value of the upper adjacent residual sample of the target residual sample and the difference. Here, the target residual sample may be a residual sample in a row excluding the first row of the current chroma block. For example, the residual coefficient of the target residual sample may be derived based on Formula 3 as described above. At the same time, 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 may be derived based on the syntax element of the target residual sample.
[0328] Thereafter, for example, the decoding device may derive the target residual sample by dequantizing the residual coefficient. That is, for example, the target residual sample may be derived by dequantizing the residual coefficient.
[0329] Meanwhile, although not shown in the accompanying drawings, for example, the decoding device may obtain residual information for the current luminance block based on the BDPCM luminance flag. For example, if the BDPCM luminance flag indicates that BDPCM is applied to the current luminance block, that is, if BDPCM is applied to the current luminance block, the residual information may include syntax elements for residual samples of the current luminance block, and the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left adjacent residual sample or the upper adjacent residual sample of the target residual sample may be derived based on the syntax elements for the target residual sample. For example, if the prediction direction of the current luminance block is a horizontal direction, that is, if the prediction direction of the current luminance block is derived as a horizontal direction based on the BDPCM luminance direction flag, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left adjacent residual sample of the target residual sample may be derived based on the syntax elements of the target residual sample. In addition, for example, if the prediction direction of the current luminance block is a vertical direction, that is, if the prediction direction of the current luminance block is derived as a vertical direction based on the BDPCM luminance direction flag, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper adjacent residual sample of the target residual sample can be derived based on the syntax element of the target residual sample. In addition, if the target residual sample is located in the first row or the first column of the current block, the residual coefficient value of the target residual sample can be derived based on the syntax element for the target residual sample.
[0330] In addition, 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 BDPCM is applied to the current chroma block, that is, if 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 the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left adjacent residual sample or the upper adjacent 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 a horizontal direction, that is, if the prediction direction of the current chroma block is derived as a horizontal direction based on the BDPCM chroma direction flag, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the left adjacent residual sample of the target residual sample may be derived based on the syntax element for the target residual sample. In addition, for example, if the prediction direction of the current chroma block is a vertical direction, that is, if the prediction direction of the current chroma block is derived as a vertical direction based on the BDPCM chroma direction flag, the difference between the residual coefficient value of the target residual sample and the residual coefficient value of the upper adjacent residual sample of the target residual sample can be derived based on the syntax element for the target residual sample. In addition, if the target residual sample is located in the first row or the first column of the current chroma block, the residual coefficient value of the target residual sample can be derived based on the syntax element for the target residual sample.
[0331] The decoding device may derive a reconstructed sample by adding the predicted sample and the residual sample. Thereafter, as required, in order to improve the subjective / objective image quality, an in-loop filtering process (such as deblocking filtering, SAO and / or ALF process) may be applied to the reconstructed sample, as described above.
[0332] Fig.12 A decoding device for executing the image decoding method according to the present disclosure is schematically shown. Fig.11 The method disclosed in can be Fig.12 Specifically, for example, Fig.12 The entropy decoder of the decoding device can perform Fig.11 S1100 to S1120 and S1140 to S1150, Fig.12 The predictor of the decoding device can perform Fig.11 The S1130 and S1160, as well as Fig.12 The adder of the decoding device may execute S1170.
[0333] According to the present invention as described above, in order to derive chroma quantization parameters for chroma components, whether to enable BDPCM for luminance blocks and chroma blocks in an image can be determined by one syntax element, and by doing so, the amount of bits used for BDPCM can be reduced and the overall coding efficiency can be improved.
[0334] In addition, according to the present disclosure, regardless of the chroma format of the image, a BDPCM enable flag indicating whether BDPCM of the luminance block and chroma block in the image is enabled can be signaled, and by doing so, the complexity of BDPCM can be reduced and the overall coding efficiency can be improved.
[0335] In the above-described embodiment, method is described based on the flow chart with a series of steps or square frames. The present disclosure is not limited to the order of the above steps or square frames. Some steps or square frames may be performed in an order different from other steps or square frames mentioned above or performed simultaneously. In addition, it will be appreciated by those skilled in the art that the steps shown in the flow chart are not exclusive, and other steps may also be included, or one or more steps in the flow chart may be deleted without affecting the scope of the present disclosure.
[0336] The embodiments described in this specification may be implemented on a processor, a microprocessor, a controller or a chip. For example, the functional units shown in each figure may be implemented on a computer, a processor, a microprocessor, a controller or a chip. In this case, information (e.g., information about instructions) or algorithms for implementation may be stored in a digital storage medium.
[0337] In addition, the decoding device and encoding device of the present disclosure can be included in the following devices: multimedia broadcast sending / receiving devices, mobile communication terminals, home theater video devices, digital theater video devices, surveillance cameras, video chat devices, real-time communication devices such as video communication, mobile streaming devices, storage media, portable cameras, VoD service providing devices, over-the-top (OTT) video devices, Internet streaming service providing devices, three-dimensional (3D) video devices, teleconferencing video devices, transportation user devices (e.g., vehicle user devices, aircraft user devices, and ship user devices) and medical video devices; and the decoding device and encoding device of the present disclosure can be used to process video signals or data signals. For example, over-the-top (OTT) video devices can include game consoles, Blu-ray players, Internet access televisions, home theater systems, smart phones, tablet computers, digital video recorders (DVRs), etc.
[0338] In addition, the processing method of the present invention can be generated in the form of a program executed by a computer and can be stored in a computer-readable recording medium. The multimedia data with a data structure according to the present invention can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a BD, a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier wave (e.g., transmission via the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or transmitted via a wired / wireless communication network.
[0339] In addition, the embodiments of the present disclosure may be implemented using a computer program product according to a program code, and the program code may be executed in a computer through the embodiments of the present disclosure. The program code may be stored on a computer readable carrier.
[0340] Fig.13 The diagram shows a structural diagram of a content streaming system to which the present disclosure is applied.
[0341] The content streaming system to which the embodiments of the present disclosure are applied may mainly include an encoding server, a streaming server, a network server, a media storage, a user device, and a multimedia input device.
[0342] The encoding server compresses the content input from a multimedia input device such as a smartphone, a camera, or a camcorder into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, when a multimedia input device such as a smartphone, a camera, or a camcorder directly generates a bitstream, the encoding server may be omitted.
[0343] A bitstream may be generated by an encoding method or a bitstream generating method to which an embodiment of the present disclosure is applied, and a streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0344] The streaming server sends multimedia data to the user device through the network server based on the user request, and the network server is used as a medium to notify the user of the service. When the user requests the required service from the network server, the network server transmits the request to the streaming server, and the streaming server sends the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the command / response between the devices within the content streaming system.
[0345] The streaming server can receive content from a media storage and / or encoding server. For example, when receiving content from an encoding server, the content can be received in real time. In this case, in order to provide a stable streaming service, the streaming server can store the bitstream for a predetermined time.
[0346] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigators, touch screen PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, and head mounted displays), digital TVs, desktop computers, and digital signage, etc. Each server within the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.
[0347] The claims described in this disclosure may be combined in various ways. For example, the technical features of the method claims of this disclosure may be combined to be implemented as a device, and the technical features of the device claims of this disclosure may be combined to be implemented as a method. In addition, the technical features of the method claims of this disclosure and the technical features of the device claims may be combined to be implemented as a device, and the technical features of the method claims of this disclosure and the technical features of the device claims may be combined to be implemented as a method.
Claims
1. A device for decoding image information, the device include: Memory; as well as at least one processor, the at least one processor connected to the memory, the at least one processor configured to: obtain a BDPCM enable flag indicating whether block-based delta pulse code modulation (BDPCM) is enabled for both luma blocks and chroma blocks; Based on the BDPCM enable flag, obtaining a BDPCM brightness flag for determining whether to apply the BDPCM to a current brightness block; Based on the BDPCM brightness flag, obtaining a BDPCM brightness direction flag for a prediction direction of the current brightness block; Based on the intra prediction mode derived based on the BDPCM brightness direction flag, deriving a prediction sample of the current brightness block; Based on the BDPCM enable flag, obtaining a BDPCM chroma flag for determining whether to apply the BDPCM to a current chroma block; Based on the BDPCM chroma flag, obtaining a BDPCM chroma direction flag for a prediction direction of the current chroma block; Based on the intra prediction mode derived based on the BDPCM chroma direction flag, deriving a prediction sample of the current chroma block; as well as generating a reconstructed picture based on the predicted samples of the current luminance block and the predicted samples of the current chrominance block, Wherein, according to the value of the BDPCM enable flag, it is determined whether the BDPCM is enabled for the luminance block in the current sequence, and whether the BDPCM is enabled for the chrominance block in the current sequence. wherein the value of the BDPCM enable flag is equal to 0 indicating that BDPCM is not enabled for both the luma block and the chroma block in the current sequence, and the value of the BDPCM enable flag is equal to 1 indicating that BDPCM is enabled for both the luma block and the chroma block in the current sequence, Wherein, the BDPCM enable flag is signaled via a sequence parameter set (SPS), wherein the BDPCM brightness flag, the BDPCM brightness direction flag, the BDPCM chrominance flag, and the BDPCM chrominance direction flag are sent by signal in units of coding units, wherein determining whether the BDPCM luma flag for the luma block exists in the current coding unit is based on the size of the luma block and the value of the BDPCM-only enable flag, wherein determining whether the BDPCM chroma flag for the chroma block exists in the current coding unit is based on the size of the chroma block and the value of the BDPCM-only enable flag, wherein, based on the value of the BDPCM enable flag being equal to 0, the BDPCM luminance flag and the BDPCM chrominance flag are not obtained from the bitstream, and Wherein, based on the value of the BDPCM enable flag being equal to 1, the BDPCM brightness flag and the BDPCM chrominance flag are obtained from the bit stream.
2. A device for encoding image information, the device include: Memory; as well as at least one processor, the at least one processor connected to the memory, the at least one processor configured to: determining whether block-based delta pulse code modulation (BDPCM) is enabled for chroma blocks and luma blocks; Based on the determined result, generating a BDPCM enabling flag for whether to enable the BDPCM for the chrominance block and the luminance block; generating a prediction sample for a current luma block based on the BDPCM; generating prediction samples for a current chroma block based on the BDPCM; generating BDPCM-related information for the current luminance block and BDPCM-related information for the current chrominance block; as well as encoding image information including the BDPCM enable flag, BDPCM related information for the current luminance block, and BDPCM related information for the current chrominance block, The BDPCM related information for the current luminance block includes a BDPCM luminance flag for whether to apply the BDPCM to the current luminance block and a BDPCM luminance direction flag for a prediction direction of the current luminance block. The BDPCM related information for the current chroma block includes a BDPCM chroma flag for whether to apply the BDPCM to the current chroma block and a BDPCM chroma direction flag for a prediction direction of the current chroma block. Wherein, according to the value of the BDPCM enable flag, it is determined whether the BDPCM is enabled for the luminance block in the current sequence, and whether the BDPCM is enabled for the chrominance block in the current sequence. wherein the value of the BDPCM enable flag is equal to 0 indicating that BDPCM is not enabled for both the luma block and the chroma block in the current sequence, and the value of the BDPCM enable flag is equal to 1 indicating that BDPCM is enabled for both the luma block and the chroma block in the current sequence, Wherein, the BDPCM enable flag is signaled via a sequence parameter set (SPS), wherein the BDPCM brightness flag, the BDPCM brightness direction flag, the BDPCM chrominance flag, and the BDPCM chrominance direction flag are sent by signal in units of coding units, wherein determining whether the BDPCM luma flag for the luma block exists in the current coding unit is based on the size of the luma block and the value of the BDPCM-only enable flag, wherein determining whether the BDPCM chroma flag for the chroma block exists in the current coding unit is based on the size of the chroma block and the value of the BDPCM-only enable flag, wherein, based on the value of the BDPCM enable flag being equal to 0, the BDPCM brightness flag and the BDPCM chrominance flag are not signaled, and Wherein, based on the value of the BDPCM enable flag being equal to 1, the BDPCM brightness flag and the BDPCM chrominance flag are signaled.
3. A device for transmitting data of image information, the device include: at least one processor configured to obtain a bit stream of the image information, the image information comprising a block-based delta pulse code modulation (BDPCM) enable flag, BDPCM-related information for a current luma block, and BDPCM-related information for a current chroma block; as well as a transmitter configured to transmit the data of the bitstream including the image information, the image information including the BDPCM enable flag, the BDPCM related information for the current luminance block, and the BDPCM related information for the current chrominance block, The BDPCM enable flag indicates whether BDPCM is enabled for the chrominance block and the luminance block. The BDPCM related information for the current luminance block includes a BDPCM luminance flag for whether to apply the BDPCM to the current luminance block and a BDPCM luminance direction flag for a prediction direction of the current luminance block. The BDPCM related information for the current chroma block includes a BDPCM chroma flag for whether to apply the BDPCM to the current chroma block and a BDPCM chroma direction flag for a prediction direction of the current chroma block. Wherein, according to the value of the BDPCM enable flag, it is determined whether the BDPCM is enabled for the luminance block in the current sequence, and whether the BDPCM is enabled for the chrominance block in the current sequence. Wherein, the BDPCM enable flag is signaled via a sequence parameter set (SPS), wherein the BDPCM brightness flag, the BDPCM brightness direction flag, the BDPCM chrominance flag, and the BDPCM chrominance direction flag are sent by signal in units of coding units, wherein determining whether the BDPCM luma flag for the luma block exists in the current coding unit is based on the size of the luma block and the value of the BDPCM-only enable flag, wherein determining whether the BDPCM chroma flag for the chroma block exists in the current coding unit is based on the size of the chroma block and the value of the BDPCM-only enable flag, wherein the value of the BDPCM enable flag is equal to 0 indicating that BDPCM is not enabled for both the luma block and the chroma block in the current sequence, and the value of the BDPCM enable flag is equal to 1 indicating that BDPCM is enabled for both the luma block and the chroma block in the current sequence, wherein, based on the value of the BDPCM enable flag being equal to 0, the BDPCM brightness flag and the BDPCM chrominance flag are not signaled, and Wherein, based on the value of the BDPCM enable flag being equal to 1, the BDPCM brightness flag and the BDPCM chrominance flag are signaled.