Image encoding / decoding method, apparatus, and bitstream transmission method using BDPCM.
The image encoding/decoding method using BDPCM addresses the challenge of high-resolution image data transmission costs by determining prediction direction based on intra-prediction mode or block size, enhancing encoding efficiency and reducing costs.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2025-08-12
- Publication Date
- 2026-05-11
Smart Images

Figure 0007856834000016 
Figure 0007856834000017 
Figure 0007856834000018
Abstract
Description
[Technical Field]
[0001] This disclosure relates to an image encoding / decoding method and apparatus, and more particularly to a method and apparatus for encoding / decoding an image using BDPCM (block difference pulse code modulation), and a method for transmitting a bitstream generated by the image encoding method / apparatus of this disclosure. [Background technology]
[0002] Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition) images, has been increasing in various fields. As image data becomes higher resolution and higher quality, the amount of information or bits transmitted increases relatively compared to conventional image data. This increase in the amount of information or bits transmitted leads to increased transmission and storage costs.
[0003] This necessitates highly efficient image compression technology to effectively transmit, store, and reproduce high-resolution, high-quality image information. [Overview of the project] [Problems that the invention aims to solve]
[0004] The purpose of this disclosure is to provide an image coding / decoding method and apparatus with improved coding / decoding efficiency.
[0005] Furthermore, this disclosure aims to provide a method and apparatus for encoding / decoding images using BDPCM.
[0006] Furthermore, this disclosure aims to provide an image encoding / decoding method and apparatus for efficiently signaling BDPCM-related information.
[0007] In addition, an object of the present disclosure is to provide an image encoding / decoding method and apparatus that perform BDPCM after deriving a prediction direction of BDPCM based on an intra prediction mode or a block size.
[0008] In addition, an object of the present disclosure is to provide an image encoding / decoding method and apparatus that efficiently encode a residual signal of a block to which BDPCM is applied.
[0009] In addition, an object of the present disclosure is to provide a method for transmitting a bitstream generated by an image encoding method or apparatus according to the present disclosure.
[0010] In addition, an object of the present disclosure is to provide a recording medium storing a bitstream generated by an image encoding method or apparatus according to the present disclosure.
[0011] In addition, an object of the present disclosure is to provide a recording medium storing a bitstream received by an image decoding apparatus according to the present disclosure, decoded, and used for restoring an image.
[0012] The technical problems to be solved in the present disclosure are not limited to the above-described technical problems, and other technical problems not described above will be clearly understood by those having ordinary knowledge in the technical field to which the present disclosure pertains from the following description.
Means for Solving the Problems
[0013] An image decoding method according to an aspect of the present disclosure is an image decoding method performed by an image decoding apparatus, and includes a step of parsing, from a bitstream, first information indicating whether block difference pulse code modulation (BDPCM) is to be applied to a currently intra-predicted block; a step of, when the first information indicates that BDPCM is to be applied to the currently intra-predicted block, determining a prediction direction of BDPCM for the currently intra-predicted block and generating a residual block of the currently intra-predicted block based on the determined prediction direction of BDPCM; a step of generating a predicted block of the currently intra-predicted block by performing intra-prediction based on an intra-prediction mode of the currently intra-predicted block; and a step of restoring the currently intra-predicted block based on the residual block and the predicted block.
[0014] In the image decoding method according to the present disclosure, the first information is parsed only when a non-zero residual signal exists in the currently intra-predicted block, and when a non-zero residual signal does not exist in the currently intra-predicted block, parsing of the first information is skipped and it can be determined that BDPCM is not applied to the currently intra-predicted block.
[0015] In the image decoding method according to the present disclosure, whether a non-zero residual signal exists in the currently intra-predicted block can be determined based on information parsed from the bitstream.
[0016] In the image decoding method according to the present disclosure, the prediction direction of BDPCM can be determined based on second information parsed from the bitstream.
[0017] In the image decoding method according to the present disclosure, the prediction direction of BDPCM and the prediction direction of the intra-prediction mode can be the same.
[0018] In the image decoding method according to this disclosure, the prediction direction of the BDPCM can be determined based on the intra-prediction mode.
[0019] In the image decoding method according to this disclosure, if the prediction direction of the intra-prediction mode is vertical, the prediction direction of the BDPCM is determined to be vertical; if the prediction direction of the intra-prediction mode is horizontal, the prediction direction of the BDPCM is determined to be horizontal; and if the intra-prediction mode is non-directional, the prediction direction of the BDPCM can be determined to be in a predetermined direction.
[0020] In the image decoding method according to this disclosure, the predetermined direction may be a predefined direction or a direction derived based on information signaled at a higher level of the current block.
[0021] In the image decoding method according to this disclosure, the prediction direction of the BDPCM can be determined based on the size of the current block.
[0022] In the image decoding method according to this disclosure, when the width of the current block is W and the height is H, if W is greater than H, the prediction direction of the BDPCM can be determined to be horizontal, and if H is greater than W, the prediction direction of the BDPCM can be determined to be vertical.
[0023] In the image decoding method according to this disclosure, when the width of the current block is W and the height is H, if W / H is greater than or equal to a predetermined integer N, the prediction direction of the BDPCM can be determined to be vertical, and if W / H is less than or equal to 1 / N, the prediction direction of the BDPCM can be determined to be horizontal.
[0024] An image decoding apparatus according to another aspect of the present disclosure includes a memory and at least one processor, the at least one processor parsing from a bitstream a first information indicating whether BDPCM is applied to an intra-predicted current block; if the first information indicates that BDPCM is applied to the current block, determining the prediction direction of BDPCM to the current block; generating a residual block of the current block based on the determined BDPCM prediction direction; generating a predicted block of the current block by performing an intra-prediction based on the intra-prediction mode of the current block; and restoring the current block based on the residual block and the predicted block.
[0025] An image encoding method according to another aspect of the present disclosure may include the steps of: determining whether BDPCM is applied to a current block; determining the prediction direction of BDPCM for the current block if BDPCM is applied to the current block; generating a predicted block of the current block by performing intra-prediction based on the intra-prediction mode of the current block; generating a residual block of the current block based on the predicted block; encoding the residual block of the current block based on the determined BDPCM prediction direction; and encoding first information indicating whether BDPCM is applied to the current block.
[0026] In the image coding method according to this disclosure, the prediction direction of the BDPCM and the prediction direction of the intra-prediction mode can be the same.
[0027] Another aspect of the transmission method of the present disclosure can transmit a bitstream generated by an image encoding device or image encoding method of the present disclosure.
[0028] A computer-readable recording medium according to another aspect of the present disclosure can store a bitstream generated by an image encoding method or image encoding apparatus of the present disclosure.
[0029] The features described above, which are a brief summary of this disclosure, are merely illustrative examples of the detailed description of this disclosure described below and do not limit the scope of this disclosure. [Effects of the Invention]
[0030] According to this disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.
[0031] Furthermore, this disclosure provides a method and apparatus for encoding / decoding images using BDPCM.
[0032] Furthermore, this disclosure provides an image encoding / decoding method and apparatus for efficiently signaling BDPCM-related information.
[0033] Furthermore, according to this disclosure, an image coding / decoding method and apparatus can be provided that performs BDPCM after deriving the prediction direction of BDPCM based on an intra-prediction mode or block size.
[0034] Furthermore, this disclosure provides an image coding / decoding method and apparatus for efficiently coding residual signals of blocks to which BDPCM is applied.
[0035] Furthermore, this disclosure provides a method for transmitting a bitstream generated by an image encoding method or apparatus according to this disclosure.
[0036] Furthermore, according to this disclosure, a recording medium storing a bitstream generated by the image encoding method or apparatus according to this disclosure can be provided.
[0037] Furthermore, according to this disclosure, a recording medium can be provided that stores a bitstream that is received by the image decoding device according to this disclosure, decoded, and used for image restoration.
[0038] The effects obtained from this disclosure are not limited to those described above, and other effects not mentioned above will be clearly understood by a person with ordinary skill in the art to which this disclosure pertains from the following description. [Brief explanation of the drawing]
[0039] [Figure 1] This figure schematically illustrates a video coding system to which the embodiments described herein can be applied. [Figure 2] This figure schematically shows an image encoding device to which the embodiments of this disclosure can be applied. [Figure 3] This figure schematically shows an image decoding apparatus to which the embodiments of this disclosure can be applied. [Figure 4] This is a schematic flowchart of an image decoding procedure to which the embodiments described herein can be applied. [Figure 5] This is a schematic flowchart of an image coding procedure to which the embodiments disclosed herein can be applied. [Figure 6] This flowchart shows an intra-predictive-based video / image encoding method. [Figure 7] This figure illustrates the configuration of the intra prediction unit 185 according to this disclosure. [Figure 8] This is a flowchart of an intra-predictive-based video / image decoding method. [Figure 9] This figure illustrates the configuration of the intra prediction unit 265 according to this disclosure. [Figure 10] This figure shows the intra-prediction direction according to one embodiment of the present disclosure. [Figure 11] This figure shows the intra-prediction direction according to another embodiment of the present disclosure. [Figure 12] This figure illustrates the method for encoding residual samples of BDPCM according to this disclosure. [Figure 13] This figure shows a modified quantized resistive dual block generated by performing the BDPCM of this disclosure. [Figure 14] This flowchart shows the procedure for encoding the current block using BDPCM in an image encoding device. [Figure 15] This flowchart shows the procedure for restoring the current block by applying BDPCM to an image decoding device. [Figure 16] This diagram provides a schematic overview of the BDPCM information currently included in the block's syntax structure. [Figure 17] This is a flowchart illustrating a method for encoding / decoding BDPCM-related information according to one embodiment of the present disclosure. [Figure 18] This is a flowchart illustrating a method for guiding the prediction direction of the BDPCM based on the intra-prediction direction of the current block according to other embodiments of the present disclosure. [Figure 19] This is a flowchart illustrating a method for inducing an intra-prediction mode of the current block based on the prediction direction of the BDPCM according to another embodiment of the present disclosure. [Figure 20] This is a flowchart illustrating a method for guiding the prediction direction of the BDPCM based on the current block size according to another embodiment of the present disclosure. [Figure 21] This is a diagram illustrating the CABAC entropy coding method. [Figure 22] This figure illustrates a template for a block to which BDPCM has been applied according to one embodiment of the present disclosure. [Figure 23] This figure illustrates a template for a block to which BDPCM has been applied according to one embodiment of the present disclosure. [Figure 24] This disclosure provides a flowchart illustrating how to define a template considering the prediction direction of BDPCM and how to derive a context model or Rice parameters. [Figure 25]This figure illustrates a template for a block to which BDPCM has been applied, according to other embodiments of the present disclosure. [Figure 26] This figure illustrates a template for a block to which BDPCM has been applied, according to other embodiments of the present disclosure. [Figure 27] This disclosure provides a flowchart illustrating how to define a template considering the BDPCM lines and how to derive a context model or Rice parameters. [Figure 28] This figure illustrates a template for a block to which BDPCM has been applied, according to another embodiment of the present disclosure. [Figure 29] This figure illustrates a template for a block to which BDPCM has been applied, according to another embodiment of the present disclosure. [Figure 30] This disclosure provides a flowchart illustrating how to define a template and derive a context model or Rice parameter by considering whether or not peripheral pixels are included in the first line of the BDPCM. [Figure 31] This figure illustrates a template for a block to which BDPCM has been applied, according to another embodiment of the present disclosure. [Figure 32] This figure illustrates a template for a block to which BDPCM has been applied, according to another embodiment of the present disclosure. [Figure 33] This disclosure provides a flowchart illustrating how to define a template and derive a context model or Rice parameters by considering the prediction direction of the BDPCM and whether or not the surrounding pixels are included in the first line of the BDPCM. [Figure 34] This figure illustrates a content streaming system to which the embodiments of this disclosure can be applied. [Modes for carrying out the invention]
[0040] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the attached drawings, so that they can be easily implemented by a person with ordinary skill in the art to which the present disclosure pertains. However, the present disclosure can be implemented in a variety of different forms and is not limited to the embodiments described herein.
[0041] In describing embodiments of this disclosure, if it is determined that a specific description of a known configuration or function would obscure the gist of this disclosure, such detailed description will be omitted. In the drawings, parts unrelated to the description of this disclosure will be omitted, and similar parts will be denoted by the same reference numerals.
[0042] In this disclosure, when one component is described as being “connected,” “joined,” or “linked” to another component, this can include not only direct connections but also indirect connections where another component exists between them. Furthermore, when one component is described as “containing” or “having” another component, this does not exclude another component, unless otherwise stated to the contrary, but rather means that it may further contain another component.
[0043] In this disclosure, terms such as "first," "second," etc., are used solely for the purpose of distinguishing one component from another, and do not limit the order or importance of the components unless otherwise specified. Therefore, within the scope of this disclosure, a first component in one embodiment may be called a second component in another embodiment, and similarly, a second component in one embodiment may be called a first component in another embodiment.
[0044] In this disclosure, components that are distinguished from each other are used to clearly describe their respective characteristics and do not necessarily mean that the components are separate. In other words, multiple components may be integrated to constitute a single hardware or software unit, or a single component may be distributed to constitute multiple hardware or software units. Therefore, such integrated or distributed embodiments are also included in the scope of this disclosure, without needing to be specifically mentioned.
[0045] In this disclosure, the components described in various embodiments are not necessarily essential components, and some may be optional components. Therefore, embodiments consisting of a subset of the components described in one embodiment are also included in the scope of this disclosure. Furthermore, embodiments that include additional components in addition to the components described in various embodiments are also included in the scope of this disclosure.
[0046] This disclosure relates to the encoding and decoding of images, and the terms used in this disclosure may have their ordinary meanings in the art to which this disclosure pertains, unless otherwise defined herein.
[0047] In this disclosure, "picture" generally means a unit representing any one image within a specific time period, and "slice / tile / subpicture" is an encoding unit that constitutes a part of a picture, and a single picture can consist of one or more slices / tiles / subpictures. Furthermore, a slice / tile / subpicture may contain one or more CTUs (coding tree units).
[0048] In this disclosure, “pixel” or “pel” may mean the smallest unit that constitutes a picture (or image). The term “sample” may also be used as a counterpart to pixel. A sample may generally represent a pixel or a pixel value, or it may represent only the pixel / pixel value of the luma component, or only the pixel / pixel value of the chroma component.
[0049] In this disclosure, “unit” can refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information associated with that region. A unit may be used interchangeably with terms such as “sample array,” “block,” or “area,” as it may be used. Generally, an M×N block may include a set (or array) of samples (or sample arrays) or transform coefficients consisting of M columns and N rows.
[0050] In this disclosure, “current block” may mean any one of the following: “current coding block,” “current coding unit,” “block to be encoded,” “block to be decoded,” or “block to be processed.” If prediction is performed, “current block” may mean “current predicted block” or “block to be predicted.” When transformation (inverse transformation) / quantization (inverse quantization) is performed, "current block" can mean "currently transformed block" or "block to be transformed." When filtering is performed, "current block" can mean "block to be filtered."
[0051] Furthermore, in this disclosure, “current block” may mean “chroma block of the current block” unless there is an explicit mention of chroma block. “Chroma block of the current block” may be expressed explicitly as “chroma block” or “current chroma block,” including an explicit mention of chroma block.
[0052] In this disclosure, " / " and "," may be interpreted as "and / or." For example, "A / B" and "A, B" may be interpreted as "A and / or B." Also, "A / B / C" and "A, B, C" may mean "at least one of A, B and / or C."
[0053] In this disclosure, “or” may be interpreted as “and / or.” For example, “A or B” may mean 1) “A” only, 2) “B” only, or 3) “A and B.” Alternatively, in this disclosure, “or” may mean “additionally or alternatively.”
[0054] Overview of the video coding system
[0055] Figure 1 shows the video coding system according to this disclosure.
[0056] A video coding system according to one embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 can transmit encoded video and / or image information or data to the decoding device 20 via a digital storage medium or network in file or streaming format.
[0057] An encoding device 10 according to one embodiment may include a video source generation unit 11, an encoding unit 12, and a transmission unit 13. A decoding device 20 according to one embodiment may include a receiving unit 21, a decoding unit 22, and a rendering unit 23. The encoding unit 12 may be called a video / image encoding unit, and the decoding unit 22 may be called a video / image decoding unit. The transmission unit 13 may be included in the encoding unit 12. The receiving unit 21 may be included in the decoding unit 22. The rendering unit 23 may also include a display unit, which may be configured as a separate device or external component.
[0058] The video source generation unit 11 can acquire video / images through processes such as video / image capture, synthesis, or generation. The video source generation unit 11 may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, or a video / image archive containing previously captured video / images. The video / image generation device may include, for example, a computer, tablet, and smartphone, and may generate video / images (electronically). For example, virtual video / images may be generated via a computer, in which case the video / image capture process may be replaced by a process in which the relevant data is generated.
[0059] The encoding unit 12 can encode the input video / image. The encoding unit 12 can perform a series of steps such as prediction, transformation, and quantization for compression and encoding efficiency. The encoding unit 12 can output the encoded data (encoded video / image information) in bitstream format.
[0060] The transmission unit 13 can transmit encoded video / image information or data, output in bitstream format, to the receiving unit 21 of the decoding device 20 via a digital storage medium or network in file or streaming format. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. The transmission unit 13 may include elements for generating media files via a predetermined file format and elements for transmission via a broadcast / communication network. The receiving unit 21 can extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit 22.
[0061] The decoding unit 22 can decode the video / image by performing a series of steps such as inverse quantization, inverse transform, and prediction, corresponding to the operation of the encoding unit 12.
[0062] The rendering unit 23 can render the decoded video / image. The rendered video / image can be displayed via the display unit.
[0063] Overview of Image Encoding Devices
[0064] Figure 2 is a schematic diagram showing an image encoding device to which the embodiments of this disclosure can be applied.
[0065] As shown in Figure 2, the image coding device 100 may include an image splitting unit 110, a subtraction unit 115, a transformation unit 120, a quantization unit 130, an inverse quantization unit 140, an inverse transformation unit 150, an addition unit 155, a filtering unit 160, a memory 170, an inter-prediction unit 180, an intra-prediction unit 185, and an entropy coding unit 190. The inter-prediction unit 180 and the intra-prediction unit 185 can together be called the "prediction unit". The transformation unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transformation unit 150 may be included in a residual processing unit. The residual processing unit may further include a subtraction unit 115.
[0066] All or at least some of the multiple components constituting the image encoding device 100 can be implemented by a single hardware component (e.g., an encoder or processor) depending on the embodiment. Furthermore, the memory 170 may include a DPB (decoded picture buffer) and can be implemented by a digital storage medium.
[0067] The image splitting unit 110 can split an input image (or picture, frame) input to the image encoding device 100 into one or more processing units. For example, the processing units may be called coding units (CUs). Coding units can be obtained by recursively splitting a coding tree unit (CTU) or the largest coding unit (LCU) using a QT / BT / TT (Quad-tree / binary-tree / ternary-tree) structure. For example, a single coding unit can be split into multiple coding units of deeper depth based on a quad-tree structure, a binary-tree structure and / or a ternary-tree structure. For the splitting of coding units, a quad-tree structure may be applied first, followed by a binary-tree structure and / or a ternary-tree structure. Based on the final coding unit that cannot be further split, the coding procedure according to this disclosure can be performed. The largest coding unit can be used as the final coding unit, or a lower-depth coding unit obtained by dividing the largest coding unit can be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or restoration, as described later. As another example, the processing units of the coding procedure may be prediction units (PU) or transformation units (TU). The prediction unit and the transformation unit may be divided or partitioned from the final coding unit, respectively. The prediction unit may be a unit of sample prediction, and the transformation unit may be a unit that derives transformation coefficients and / or a unit that derives a residual signal from transformation coefficients.
[0068] The prediction unit (inter-prediction unit 180 or intra-prediction unit 185) can make predictions for the block to be processed (current block) and generate a predicted block that includes prediction samples for the current block. The prediction unit can determine whether intra-prediction or inter-prediction is applied to the current block or on a CU basis. The prediction unit can generate various information regarding the prediction of the current block and transmit it to the entropy coding unit 190. The prediction information can be encoded by the entropy coding unit 190 and output in bitstream format.
[0069] The intra-prediction unit 185 can predict the current block by referring to a sample in the current picture. The referenced sample may be located in the vicinity (neighbor) or at a distance from the current block, according to the intra-prediction mode and / or intra-prediction technique. The intra-prediction mode may include multiple non-directional modes and multiple directional modes. The non-directional modes may include, for example, a DC mode and a Planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes, depending on the degree of detail of the prediction direction. However, this is merely an example, and more or fewer directional prediction modes may be used depending on the settings. The intra-prediction unit 185 may also determine the prediction mode to be applied to the current block using the prediction modes applied to the surrounding blocks.
[0070] The interprediction unit 180 can derive a predicted block relative to the current block based on a reference block (reference sample array) identified by motion vectors on the reference picture. In this case, in order to reduce the amount of motion information transmitted in interprediction mode, motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between the surrounding blocks and the current block. The motion information may include motion vectors and reference picture indices. The motion information may further include interprediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of interprediction, the surrounding blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture containing the reference block and the reference picture containing the temporal neighboring block may be the same or different from each other. The temporal neighboring block may be called a collocated reference block, collocated CU (colCU), etc. The reference picture containing the temporal neighboring block may be called a collocated picture (colPic). For example, the interpretation unit 180 can construct a motion information candidate list based on surrounding blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Interpretation can be performed based on various prediction modes; for example, in skip mode and merge mode, the interpretation unit 180 can use the motion information of surrounding blocks as the motion information of the current block. In skip mode, unlike merge mode, the residual signal may not be transmitted.In motion vector prediction (MVP) mode, the motion vector of the surrounding block is used as the motion vector predictor, and the motion vector of the current block can be signaled by encoding the motion vector difference and an indicator for the motion vector predictor. The motion vector difference can represent the difference between the motion vector of the current block and the motion vector predictor.
[0071] The prediction unit can generate a prediction signal based on various prediction methods and / or techniques described later. For example, the prediction unit can apply intra-prediction or inter-prediction to predict the current block, and can also apply intra-prediction and inter-prediction simultaneously. A prediction method that applies intra-prediction and inter-prediction simultaneously to predict the current block can be called CIIP (combined inter and intra prediction). The prediction unit can also perform intra-block copy (IBC) to predict the current block. Intra-block copy can be used for content image / video coding such as in games, for example, in SCC (screen content coding). IBC is a method of predicting the current block using a reference block that has already been restored in the current picture at a predetermined distance from the current block. When IBC is applied, the position of the reference block in the current picture can be encoded as a vector (block vector) corresponding to the predetermined distance. IBC basically performs prediction within the current picture, but can be performed similarly to inter-prediction in that it derives the reference block within the current picture. In other words, IBC can use at least one of the interpretation techniques described in this disclosure.
[0072] The predicted signal generated by the prediction unit can be used to generate a reconstructed signal or a residual signal. The subtraction unit 115 can generate a residual signal (residual block, residual sample array) by subtracting the predicted signal output from the prediction unit (predicted block, predicted sample array) from the input image signal (original block, original sample array). The generated residual signal can be transmitted to the conversion unit 120.
[0073] The transformation unit 120 can generate transformation coefficients by applying transformation techniques to the residual signal. For example, the transformation techniques may include at least one of the following: DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen-Loeve Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Here, GBT refers to a transformation obtained from a graph when the relationship information between pixels is represented by this graph. CNT refers to a transformation obtained by generating a prediction signal using all previously reconstructed pixels. The transformation process can be applied to pixel blocks of the same size that are square, or to blocks of variable size that are not square.
[0074] The quantization unit 130 can quantize the conversion coefficients and transmit them to the entropy coding unit 190. The entropy coding unit 190 can encode the quantized signal (information about the quantized conversion coefficients) and output it in bitstream format. The information about the quantized conversion coefficients can be called residual information. The quantization unit 130 can rearrange the block-form quantized conversion coefficients into a one-dimensional vector format based on the coefficient scan order, and can also generate information about the quantized conversion coefficients based on the one-dimensional vector format of the quantized conversion coefficients.
[0075] The entropy coding unit 190 can perform various coding methods, such as exponential Golomb, CAVLC (context-adaptive variable length coding), and CABAC (context-adaptive binary arithmetic coding). In addition to the quantized conversion coefficients, the entropy coding unit 190 can also encode information necessary for video / image reconstruction (e.g., the values of syntax elements) together or separately. The encoded information (e.g., encoded video / image information) can be transmitted or stored in bitstream format in units of NAL (network abstraction layer) units. The video / image information may further include information about various parameter sets, such as adaptive parameter sets (APS), picture parameter sets (PPS), sequence parameter sets (SPS), or video parameter sets (VPS). The video / image information may also further include general constraint information. The signaling information, transmitted information and / or syntax elements referred to in this disclosure may be encoded via the encoding procedure described above and included in the bitstream.
[0076] The bitstream can be transmitted over a network or stored on a digital storage medium. Here, the network may include broadcast networks and / or communication networks, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. A transmission unit (not shown) for transmitting the signal output from the entropy encoding unit 190 and / or a storage unit (not shown) for storing it may be provided as internal / external elements of the image encoding device 100, or the transmission unit may be provided as a component of the entropy encoding unit 190.
[0077] The quantized conversion coefficients output from the quantization unit 130 can be used to generate a residual signal. For example, by applying inverse quantization and inverse transformation to the quantized conversion coefficients via the inverse quantization unit 140 and the inverse transformation unit 150, a residual signal (residual block or residual sample) can be reconstructed.
[0078] The adder 155 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter-prediction unit 180 or the intra-prediction unit 185. If there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as the reconstructed block. The adder 155 may be called the reconstruction unit or the reconstructed block generation unit. The generated reconstructed signal can be used for intra-prediction of the next block to be processed in the current picture, or, as described later, for inter-prediction of the next picture after filtering.
[0079] The filtering unit 160 can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit 160 can apply various filtering methods to the restored picture to generate a modified restored picture, and the modified restored picture can be stored in the memory 170, specifically in the DPB of the memory 170. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, and bilateral filter. The filtering unit 160 can generate various filtering-related information, as will be described later in the explanation of each filtering method, and transmit it to the entropy coding unit 190. The filtering-related information can be encoded by the entropy coding unit 190 and output in bitstream format.
[0080] The corrected restored picture transmitted to memory 170 can be used as a reference picture in the interpretation unit 180. When interpretation is applied via this, the image encoding device 100 can avoid prediction mismatches between the image encoding device 100 and the image decoding device, and can also improve encoding efficiency.
[0081] The DPB in memory 170 can store the modified restored picture for use as a reference picture in the inter-prediction unit 180. Memory 170 can store motion information of blocks from which motion information in the current picture has been derived (or encoded) and / or motion information of blocks in the picture that have already been restored. The stored motion information can be transmitted to the inter-prediction unit 180 for use as motion information of spatially surrounding blocks or motion information of temporally surrounding blocks. Memory 170 can store restored samples of restored blocks in the current picture and transmit them to the intra-prediction unit 185.
[0082] Overview of the image decoding device
[0083] Figure 3 is a schematic diagram showing an image decoding apparatus to which the embodiments of this disclosure can be applied.
[0084] As shown in Figure 3, the image decoding device 200 can be configured to include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an additive unit 235, a filtering unit 240, a memory 250, an inter-prediction unit 260, and an intra-prediction unit 265. The inter-prediction unit 260 and the intra-prediction unit 265 can together be called the "prediction unit". The inverse quantization unit 220 and the inverse transform unit 230 can be included in the residual processing unit.
[0085] All or at least some of the multiple components constituting the image decoding device 200 can be implemented by a single hardware component (e.g., a decoder or processor) according to the embodiment. Furthermore, the memory 170 may include a DPB and can be implemented by a digital storage medium.
[0086] An image decoding device 200, upon receiving a bitstream containing video / image information, can restore the image by executing a process corresponding to the process performed in the image encoding device 100 in Figure 2. For example, the image decoding device 200 can perform decoding using the processing unit applied in the image encoding device. Therefore, the decoding processing unit can be, for example, a coding unit. The coding unit can be a coding tree unit or it can be obtained by dividing the maximum coding unit. The restored image signal decoded and output via the image decoding device 200 can then be reproduced via a playback device (not shown).
[0087] The image decoding device 200 can receive the signal output from the image encoding device 2 in bitstream format. The received signal can be decoded via the entropy decoding unit 210. For example, the entropy decoding unit 210 can parse the bitstream to derive information necessary for image restoration (or picture restoration) (e.g., video / image information). The video / image information may further include information about various parameter sets, such as adaptive parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS). The video / image information may also further include general constraint information. The image decoding device may further use the parameter set information and / or the general constraint information to decode the image. The signaling information, received information, and / or syntax elements referred to in this disclosure can be obtained from the bitstream by decoding via the decoding procedure. For example, the entropy decoding unit 210 can decode information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of syntax elements necessary for image reconstruction and the quantized values of conversion coefficients related to the residual. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element from the bitstream, determines a context model using the syntax element information to be decoded, the decoding information of surrounding blocks and blocks to be decoded, or the symbol / bin information decoded in a previous step, predicts the probability of bin occurrence based on the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element. At this time, after determining the context model, the CABAC entropy decoding method can update the context model using the decoded symbol / bin information for the context model of the next symbol / bin.Of the information decoded by the entropy decoding unit 210, information related to prediction is provided to the prediction unit (inter-prediction unit 260 and intra-prediction unit 265), and the residual values that have undergone entropy decoding by the entropy decoding unit 210, i.e., quantized conversion coefficients and related parameter information, can be input to the inverse quantization unit 220. In addition, of the information decoded by the entropy decoding unit 210, information related to filtering can be provided to the filtering unit 240. On the other hand, a receiving unit (not shown) that receives signals output from the image coding device may be further provided as an internal / external element of the image decoding device 200, or the receiving unit may be provided as a component of the entropy decoding unit 210.
[0088] On the other hand, the image decoding device according to this disclosure may be called a video / image / picture decoding device. The image decoding device may also include an information decoder (video / image / picture information decoder) and / or a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoding unit 210, and the sample decoder may include at least one of an inverse quantization unit 220, an inverse transform unit 230, an adder unit 235, a filtering unit 240, a memory 250, an inter-prediction unit 260, and an intra-prediction unit 265.
[0089] The inverse quantization unit 220 can inverse quantize the quantized transformation coefficients and output the transformation coefficients. The inverse quantization unit 220 can rearrange the quantized transformation coefficients in a two-dimensional block format. In this case, the rearrangement can be performed based on the order of the coefficient scan performed by the image encoding device. The inverse quantization unit 220 can perform inverse quantization on the quantized transformation coefficients using quantization parameters (e.g., quantization step size information) to obtain the transformation coefficients.
[0090] The inverse conversion unit 230 can inversely convert the conversion coefficients to obtain residual signals (residual blocks, residual sample arrays).
[0091] The prediction unit can make predictions for the current block and generate a predicted block containing prediction samples for the current block. Based on the prediction information output from the entropy decoding unit 210, the prediction unit can determine whether intra-prediction or inter-prediction is applied to the current block and can determine a specific intra / inter-prediction mode (prediction technique).
[0092] As described in the explanation of the prediction unit of the image coding device 100, the prediction unit can generate prediction signals based on various prediction methods (techniques) described later.
[0093] The intra-prediction unit 265 can predict the current block by referring to the samples in the current picture. The description of the intra-prediction unit 185 can also be applied to the intra-prediction unit 265.
[0094] The interprediction unit 260 can derive a predicted block relative to the current block based on a reference block (reference sample array) identified by motion vectors on a reference picture. In this case, to reduce the amount of motion information transmitted in interprediction mode, motion information can be predicted in block, sub-block, or sample units based on the correlation of motion information between surrounding blocks and the current block. The motion information may include motion vectors and reference picture indices. The motion information may further include interprediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In interprediction, surrounding blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the interprediction unit 260 can construct a motion information candidate list based on surrounding blocks and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Interprediction can be performed based on various prediction modes (techniques), and the prediction information may include information indicating the mode (technique) of interprediction for the current block.
[0095] The adder 235 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to the predicted signal (predicted block, predicted sample array) output from the prediction unit (including the inter-prediction unit 260 and / or intra-prediction unit 265). If there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as the reconstructed block. The description of the adder 155 can also be applied to the adder 235. The adder 235 can be called the reconstruction unit or reconstructed block generation unit. The generated reconstructed signal can be used for intra-prediction of the next block to be processed in the current picture, or, as described later, for inter-prediction of the next picture after filtering.
[0096] The filtering unit 240 can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit 240 can apply various filtering methods to the restored picture to generate a modified restored picture, and the modified restored picture can be stored in the memory 250, specifically in the DPB of the memory 250. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, and bilateral filter.
[0097] The restored picture stored (modified) in the DPB of memory 250 can be used as a reference picture in the inter-prediction unit 260. Memory 250 can store motion information of blocks from which motion information in the current picture has been derived (or decoded) and / or motion information of blocks in the picture that have already been restored. The stored motion information can be transmitted to the inter-prediction unit 260 for use as motion information of spatially surrounding blocks or motion information of temporally surrounding blocks. Memory 250 can store restored samples of restored blocks in the current picture and transmit them to the intra-prediction unit 265.
[0098] In this specification, the embodiments described for the filtering unit 160, inter-prediction unit 180, and intra-prediction unit 185 of the image coding device 100 can be applied similarly or in a corresponding manner to the filtering unit 240, inter-prediction unit 260, and intra-prediction unit 265 of the image decoding device 200, respectively.
[0099] Overview of the image decoding / encoding procedure
[0100] In image / video coding, the pictures that make up an image / video can be encoded / decoded based on a set decoding order. The picture order, which corresponds to the output order of the decoded pictures, can be set to be different from the decoding order, and based on this, not only forward prediction but also reverse prediction can be performed during interpretation.
[0101] Figure 4 is a schematic flowchart of an image decoding procedure to which the embodiments of this disclosure can be applied.
[0102] Each step shown in Figure 4 can be performed by the image decoding apparatus shown in Figure 3. Specifically, for example, step S410 can be performed by the entropy decoding unit 210 of the image decoding apparatus, step S420 can be performed by the prediction units 260 and 265, step S430 can be performed by the residual processing units 220 and 230, step S440 can be performed by the addition unit 235, and step S450 can be performed by the filtering unit 240. Step S410 may include the information decoding (parsing) procedure described in this disclosure, step S420 may include the inter / intra prediction procedure described in this disclosure, step S430 may include the residual processing procedure described in this disclosure, step S440 may include the block / picture restoration procedure described in this disclosure, and step S450 may include the in-loop filtering procedure described in this disclosure.
[0103] Referring to Figure 4, the image decoding procedure can broadly include a procedure for acquiring image / video information (by decoding) from a bitstream (S410), an image (picture) restoration procedure (S420-S440), and an in-loop filtering procedure (S450) on the restored image (picture). The image restoration procedure can be performed based on predicted samples obtained via inter / intra prediction (S420) and residual samples obtained via residual processing (S430, inverse quantization and / or inverse transformation of quantized transformation coefficients). A modified restored picture can be generated via an in-loop filtering procedure (S450) on the restored picture generated via the image restoration procedure, and the modified restored picture can be output as a decoded picture, or stored in the decoded picture buffer (DPB) 250 or memory of the image decoding device, and can be used as a reference picture in the inter-prediction procedure when decoding pictures thereafter. In some cases, the in-loop filtering procedure can be omitted. In this case, the restored picture can be output as a decoded picture and stored in the decoded picture buffer 250 or memory of the image decoding device, and can be used as a reference picture in the inter-prediction procedure when decoding pictures thereafter. The in-loop filtering procedure (S450), as described above, may include a deblocking filtering procedure, an SAO (sample adaptive offset) procedure, an ALF (adaptive loop filter) procedure, and / or a bi-lateral filter procedure, and some or all of these may be omitted. In addition, one or some of the deblocking filtering procedure, the SAO (sample adaptive offset) procedure, the ALF (adaptive loop filter) procedure, and the bi-lateral filter procedure may be applied sequentially, or all of them may be applied sequentially. For example, the SAO procedure may be performed after the deblocking filtering procedure is applied to the restored picture.Alternatively, for example, the ALF procedure can be performed after a deblocking filtering procedure has been applied to the restored picture. This can also be done in an image encoding device.
[0104] Figure 5 is a schematic flowchart of an image coding procedure to which the embodiments of this disclosure can be applied.
[0105] Each step shown in Figure 4 can be performed by the image encoding device shown in Figure 2. Specifically, for example, step S510 may be performed in the prediction units 180, 185 of the image coding device, step S520 may be performed in the residual processing units 115, 120, 130, and step S530 may be performed in the entropy coding unit 190. Step S510 may include the inter / intra prediction procedure described in this disclosure, step S520 may include the residual processing procedure described in this disclosure, and step S530 may include the information coding procedure described in this disclosure.
[0106] Referring to Figure 5, the image coding procedure may include not only a procedure for coding information for picture restoration (e.g., prediction information, residual information, partitioning information, etc.) and outputting it in bitstream format, but also a procedure for generating a restored picture for the current picture, and an optional procedure for applying in-loop filtering to the restored picture. The image coding device can derive (corrected) residual samples from the quantized conversion coefficients via the inverse quantization unit 140 and the inverse conversion unit 150, and can generate a restored picture based on the prediction samples, which are the output of step S510, and the (corrected) residual samples. The restored picture thus generated may be identical to the restored picture generated by the image decoding device described above. A corrected restored picture can be generated via an in-loop filtering procedure on the restored picture, which can be stored in the decoded picture buffer (DPB) 170 or in memory, and can be used as a reference picture in the inter-prediction procedure when coding pictures thereafter, as in the case of the image decoding device. As described above, some or all of the in-loop filtering procedure may be omitted depending on the circumstances. When the in-loop filtering procedure is performed, the (in-loop) filtering-related information (parameters) can be encoded by the entropy coding unit 190 and output in bitstream format, and the image decoding device can perform the in-loop filtering procedure in the same manner as the image coding device based on the filtering-related information.
[0107] Through such in-loop filtering procedures, noise that occurs during image / video coding, such as blocking artifacts and ringing artifacts, can be reduced, thereby improving subjective and objective visual quality. Furthermore, by performing in-loop filtering procedures in both the image encoding and decoding devices, the two devices can derive the same prediction results, increasing the reliability of picture coding and reducing the amount of data that must be transmitted for picture coding.
[0108] As described above, the image (picture) restoration procedure can be performed not only in the image decoding device but also in the image encoding device. A restored block can be generated based on intra-prediction / inter-prediction for each block, and a restored picture containing the restored block can be generated. If the current picture / slice / tile group is an I picture / slice / tile group, the blocks included in the current picture / slice / tile group can be restored based only on intra-prediction. On the other hand, if the current picture / slice / tile group is a P or B picture / slice / tile group, the blocks included in the current picture / slice / tile group can be restored based on intra-prediction or inter-prediction. In this case, inter-prediction may be applied to some blocks in the current picture / slice / tile group, and intra-prediction may be applied to the remaining blocks. The color components of a picture may include luminous and chroma components, and unless expressly limited in this disclosure, the methods and embodiments of this disclosure may be applied to luminous and chroma components.
[0109] Overview of Inra Prediction
[0110] The following explains the intra-prediction based on this disclosure.
[0111] Intra prediction can represent a prediction that generates a prediction sample for the current block based on a reference sample within the picture to which the current block belongs (hereinafter referred to as the current picture). When intraprediction is applied to the current block, peripheral reference samples to be used for intraprediction of the current block can be derived. The peripheral reference samples of the current block may include a total of 2 × nH samples adjacent to the left boundary and bottom-left of the current block of size nW × nH, a total of 2 × nW samples adjacent to the top boundary and top-right of the current block, and one sample adjacent to the top-left of the current block. Alternatively, the peripheral reference samples of the current block may include upper peripheral samples in multiple columns and left peripheral samples in multiple rows. Furthermore, the peripheral reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nW × nH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.
[0112] However, some of the surrounding reference samples in the current block may not yet be decoded or available. In this case, the decoder can substitute the unavailable samples as available samples to construct the surrounding reference samples to be used for prediction. Alternatively, it can construct the surrounding reference samples to be used for prediction through interpolation of available samples.
[0113] If neighboring reference samples are derived, (i) predicted samples can be derived based on the average or interpolation of neighboring reference samples of the current block, or (ii) predicted samples can be derived based on reference samples located in a specific (predicted) direction from among the neighboring reference samples of the current block. Case (i) may be called non-directional mode or non-angular mode, and case (ii) may be called directional mode or angular mode.
[0114] Furthermore, among the surrounding reference samples, the predicted sample can also be generated by interpolation between a first surrounding sample located in the prediction direction of the intra-prediction mode of the current block and a second surrounding sample located in the opposite direction, based on the predicted sample of the current block. In the above case, it can be called linear interpolation intra-prediction (LIP).
[0115] Furthermore, chroma prediction samples can be generated based on luma samples using a linear model. This can be called the LM (Linear Model) mode.
[0116] Alternatively, a temporary predicted sample for the current block can be derived based on filtered peripheral reference samples, and the predicted sample for the current block can be derived by performing a weighted sum on the temporary predicted sample and at least one reference sample derived from the conventional peripheral reference samples, i.e., unfiltered peripheral reference samples, according to the intra-prediction mode. In this case, it can be called PDPC (Position dependent intra-prediction).
[0117] Furthermore, among the multi-reference sample lines surrounding the current block, the reference sample line with the highest prediction accuracy can be selected, and the predicted sample can be derived using the reference sample located in the prediction direction from that line. In this case, information about the reference sample line used (e.g., intra_luma_ref_idx) can be encoded into a bitstream and signaled. This can be called MRL (multi-reference line intra prediction) or MRL-based intra prediction. If MRL is not applied, the reference sample can be derived from a reference sample line directly adjacent to the current block, and in this case, information about the reference sample line may not be signaled.
[0118] Furthermore, the current block can be divided into vertical or horizontal subpartitions, and intra-prediction can be performed for each subpartition based on the same intra-prediction mode. In this case, the peripheral reference samples for intra-prediction can be derived for each subpartition. That is, due to the encoding / decoding order, the recovered samples from a previous subpartition can be used as peripheral reference samples for the current subpartition. In this case, the intra-prediction mode for the current block is applied identically to the subpartitions, but by deriving and using peripheral reference samples for each subpartition, the intra-prediction performance can be improved in some cases. Such a prediction method can be called ISP (intra sub-partitions) or ISP-based intra-prediction.
[0119] The intra-prediction techniques described above can be referred to by various terms, such as intra-prediction types or additional intra-prediction modes, to distinguish them from directional or non-directional intra-prediction modes. For example, the intra-prediction techniques (intra-prediction types or additional intra-prediction modes, etc.) may include at least one of the above-mentioned LIP, LM, PDPC, MRL, and ISP. General intra-prediction methods that do not include specific intra-prediction types such as LIP, LM, PDPC, MRL, and ISP can be called normal intra-prediction types. Normal intra-prediction types can be generally applied when the above-mentioned specific intra-prediction types are not applicable, and predictions can be made based on the aforementioned intra-prediction modes. On the other hand, post-processing filtering can be performed on the derived prediction samples as needed.
[0120] Specifically, the intra-prediction procedure may include an intra-prediction mode / type determination step, a peripheral reference sample derivation step, and an intra-prediction mode / type-based prediction sample derivation step. Additionally, a post-filtering step may be performed on the derived prediction samples, if necessary.
[0121] Figure 6 is a flowchart showing an intra-predictive-based video / image coding method.
[0122] The encoding method in Figure 6 can be performed by the image encoding device in Figure 2. Specifically, step S610 can be performed by the intra-prediction unit 185, and step S620 can be performed by the residual processing unit. Specifically, step S620 can be performed by the subtraction unit 115. Step S630 can be performed by the entropy encoding unit 190. The prediction information in step S630 is derived by the intra-prediction unit 185, and the residual information in step S630 can be derived by the residual processing unit. The residual information is information about the residual sample. The residual information may include information about the quantized conversion coefficients for the residual sample. As described above, the residual sample is derived as a conversion coefficient via the conversion unit 120 of the image encoding device, and the conversion coefficient can be derived as a quantized conversion coefficient via the quantization unit 130. Information regarding the quantized conversion coefficients can be encoded by the entropy coding unit 190 via a residual coding procedure.
[0123] The image coding device can perform intra-prediction for the current block (S610). The image coding device can determine the intra-prediction mode / type for the current block, derive peripheral reference samples for the current block, and then generate predicted samples within the current block based on the intra-prediction mode / type and the peripheral reference samples. Here, the steps of determining the intra-prediction mode / type, deriving peripheral reference samples, and generating predicted samples may be performed simultaneously, or one of the steps may be performed before the others.
[0124] Figure 7 is a diagram illustrating the configuration of the Itra prediction unit 185 according to this disclosure.
[0125] As shown in Figure 7, the intra-prediction unit 185 of the image encoding device may include an intra-prediction mode / type determination unit 186, a reference sample derivation unit 187, and / or a prediction sample derivation unit 188. The intra-prediction mode / type determination unit 186 can determine the intra-prediction mode / type for the current block. The reference sample derivation unit 187 can derive the surrounding reference samples of the current block. The prediction sample derivation unit 188 can derive the prediction samples of the current block. On the other hand, if a prediction sample filtering procedure, which is not shown in the figures, is performed, the intra-prediction unit 185 may further include a prediction sample filter unit (not shown).
[0126] The image coding device can determine which of a plurality of intra-prediction modes / types is to apply to the current block. The image coding device can compare the rate distortion costs (RD costs) of the intra-prediction modes / types to determine the optimal intra-prediction mode / type for the current block.
[0127] On the other hand, the image encoding device can also perform a predictive sample filtering procedure. This predictive sample filtering can be called post-filtering. This predictive sample filtering procedure can filter out some or all of the predictive samples. In some cases, this predictive sample filtering procedure can be omitted.
[0128] Referring again to Figure 6, the image coding device can generate a residual sample for the current block based on the predicted sample or the filtered predicted sample (S620). The image coding device can derive the residual sample by subtracting the predicted sample from the original sample of the current block. In other words, the image coding device can derive the residual sample value by subtracting the corresponding predicted sample value from the original sample value.
[0129] The image encoding device can encode image information including information relating to the intra-prediction (prediction information) and residual information relating to the residual sample (S630). The prediction information may include the intra-prediction mode information and / or the intra-prediction technique information. The image encoding device can output the encoded image information in bitstream format. The output bitstream can be transmitted to an image decoding device via a storage medium or network.
[0130] The residual information may include the residual coding syntax described later. The image encoding device can transform / quantize the residual samples and derive quantized transformation coefficients. The residual information may include information relating to the quantized transformation coefficients.
[0131] On the other hand, as mentioned above, the image coding device can generate a restored picture (including restored samples and restored blocks). To this end, the image coding device can further inverse quantization / inverse transformation of the quantized transformation coefficients to derive (corrected) residual samples. The reason for performing inverse quantization / inverse transformation again after transforming / quantizing the residual samples in this way is to derive residual samples identical to those derived from the image decoding device. Based on the predicted samples and the (corrected) residual samples, the image coding device can generate a restored block containing restored samples for the current block. Based on the restored block, a restored picture for the current picture can be generated. As mentioned above, in-loop filtering procedures and the like can be further applied to the restored picture.
[0132] Figure 8 is a flowchart showing an intra-predictive-based video / image decoding method.
[0133] The image decoding device can perform operations corresponding to those performed by the image encoding device.
[0134] The decoding method in Figure 8 can be performed by the image decoding device in Figure 3. Steps S810 to S830 can be performed by the intra-prediction unit 265, and the prediction information in step S810 and the residual information in step S840 can be obtained from the bitstream by the entropy decoding unit 210. The residual processing unit of the image decoding device can derive a residual sample for the current block based on the residual information (S840). Specifically, the inverse quantization unit 220 of the residual processing unit derives a conversion coefficient by performing inverse quantization based on the quantized conversion coefficient derived from the residual information, and the inverse transformation unit 230 of the residual processing unit can derive a residual sample for the current block by performing an inverse transformation on the conversion coefficient. Step S850 can be performed by the addition unit 235 or the reconstruction unit.
[0135] Specifically, the image decoding device can derive an intra-prediction mode / type for the current block based on the received prediction information (intra-prediction mode / type information) (S810). The image decoding device can also derive a peripheral reference sample for the current block (S820). The image decoding device can generate a prediction sample within the current block based on the intra-prediction mode / type and the peripheral reference sample (S830). In this case, the image decoding device can perform a prediction sample filtering procedure. Prediction sample filtering can be called post-filtering. The prediction sample filtering procedure can filter out some or all of the prediction samples. In some cases, the prediction sample filtering procedure can be omitted.
[0136] The image decoding device can generate a residual sample for the current block based on the received residual information (S840). The image decoding device can generate a restored sample for the current block based on the predicted sample and the residual sample, and derive a restored block containing the restored sample (S850). A restored picture for the current picture can be generated based on the restored block. As previously mentioned, in-loop filtering procedures and the like can be further applied to the restored picture.
[0137] Figure 9 is a diagram illustrating the configuration of the intra-prediction unit 265 according to this disclosure.
[0138] As shown in Figure 9, the intra-prediction unit 265 of the image decoding device may include an intra-prediction mode / type determination unit 266, a reference sample derivation unit 267, and a prediction sample derivation unit 268. The intra-prediction mode / type determination unit 266 determines the intra-prediction mode / type for the current block based on the intra-prediction mode / type information generated and signaled by the intra-prediction mode / type determination unit 186 of the image encoding device, and the reference sample derivation unit 266 can derive peripheral reference samples of the current block from the restored reference region in the current picture. The prediction sample derivation unit 268 can derive prediction samples of the current block. On the other hand, even if the prediction sample filtering procedure described above is performed, the intra-prediction unit 265 may further include a prediction sample filter unit (not shown).
[0139] The intra-prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether the MPM (most probable mode) or the remaining mode is applied to the current block. If the MPM is applied to the current block, the intra-prediction mode information may further include index information (e.g., intra_luma_mpm_idx) pointing to one of the intra-prediction mode candidates (MPM candidates). The intra-prediction mode candidates (MPM candidates) can be configured as an MPM candidate list or an MPM list. If the MPM is not applied to the current block, the intra-prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra-prediction modes excluding the intra-prediction mode candidates (MPM candidates). The image decoding device can determine the intra-prediction mode of the current block based on the intra-prediction mode information. The MPM candidate mode may include an intra-prediction mode and additional candidate modes for the surrounding blocks of the current block (e.g., the left surrounding block and the upper surrounding block).
[0140] Furthermore, the intra-prediction technique information can be implemented in various forms. For example, the intra-prediction technique information may include intra-prediction technique index information indicating any one of the intra-prediction techniques. As another example, the intra-prediction technique information may include reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and, if so, which reference sample line is used; ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether the ISP is applied to the current block; ISP type information (e.g., intra_subpartitions_split_flag) indicating the subpartition splitting type if the ISP is applied; flag information indicating whether PDPC is applied; or flag information indicating whether LIP is applied. In this disclosure, the ISP flag information may be referred to as an ISP application indicator.
[0141] The intra-prediction mode information and / or the intra-prediction technique information can be encoded / decoded via the coding methods described herein. For example, the intra-prediction mode information and / or the intra-prediction technique information can be encoded / decoded via entropy coding (e.g., CABAC, CAVLC) based on a truncated (rice) binary code.
[0142] Figure 10 shows an intra-prediction direction according to one embodiment of the present disclosure.
[0143] The intra-prediction mode may include, for example, two non-directional intra-prediction modes and 33 directional intra-prediction modes. The non-directional intra-prediction modes may include Planar intra-prediction modes and DC intra-prediction modes, and the directional intra-prediction modes may include intra-prediction modes 2 through 34. The Planar intra-prediction mode may be called the Planar mode, and the DC intra-prediction mode may be called the DC mode.
[0144] Alternatively, to capture any edge direction presented in natural video, the intra-prediction mode may include two non-directional intra-prediction modes and 65 extended directional intra-prediction modes, as shown in Figure 10. The non-directional intra-prediction modes may include Planar mode and DC mode, and the directional intra-prediction modes may include intra-prediction modes 2 through 66. The extended intra-prediction modes can be applied to blocks of all sizes and can be applied to both luma components (luma blocks) and chroma components (chroma blocks).
[0145] Alternatively, the intra-prediction mode may include two non-directional intra-prediction modes and 129 directional intra-prediction modes. The non-directional intra-prediction modes may include Planar mode and DC mode, and the directional intra-prediction modes may include intra-prediction modes 2 through 130.
[0146] On the other hand, the intra-prediction mode may further include a CCLM (cross-component linear model) mode for chroma samples, in addition to the intra-prediction mode described above. The CCLM mode can be divided into L_CCLM, T_CCLM, and LT_CCLM depending on whether the left sample, the upper sample, or both are considered for the derivation of the LM parameters, and can be applied only to chroma components.
[0147] The intra-prediction mode can be indexed, for example, as shown in Table 1 below.
[0148] [Table 1]
[0149] Figure 11 shows an intra-prediction direction according to another embodiment of the present disclosure. In Figure 11, the dashed direction indicates a wide-angle mode that applies only to non-square blocks. As shown in Figure 11, to capture any edge direction presented in a natural video, the intra-prediction mode according to one embodiment can include 93 directional intra-prediction modes, along with two non-directional intra-prediction modes. The non-directional intra-prediction modes can include Planar modes and DC modes. The directional intra-prediction modes can include intra-prediction modes numbered 2 through 80 and -1 through -14, as indicated by the arrows in Figure 11. The Planar mode can be denoted as INTRA_PLANAR, and the DC mode as INTRA_DC. The directional intra-prediction modes can be denoted as INTRA_ANGULAR-14 through INTRA_ANGULAR-1 and INTRA_ANGULAR2 through INTRA_ANGULAR80.
[0150] Overview of BDPCM (Block Difference Pulse Code Modulation)
[0151] The BDPCM according to this disclosure can be performed in a quantized residual domain. The quantized residual domain may include a quantized residual signal (or quantized residual coefficients), and when BDPCM is applied, the transformation to the quantized residual signal is skipped. That is, when BDPCM is applied, the transformation is skipped for residual samples, and quantization is applied. Alternatively, the quantized residual domain may include quantized transformation coefficients.
[0152] When BDPCM is applied to the current block, the predicted block (predicted block) containing the predicted samples of the current block can be generated by intra-prediction. In this case, the intra-prediction mode for performing intra-prediction can be signaled via the bitstream, or it can be guided based on the prediction direction of the BDPCM, as described later. In this case, the intra-prediction mode can be determined to be either the vertical prediction direction mode or the horizontal prediction direction mode. For example, if the prediction direction of the BDPCM is horizontal, the intra-prediction mode is determined to be the horizontal prediction direction mode, and the predicted block of the current block can be generated by horizontal intra-prediction. Alternatively, if the prediction direction of the BDPCM is vertical, the intra-prediction mode is determined to be the vertical prediction direction mode, and the predicted block of the current block can be generated by vertical intra-prediction. When horizontal intra-prediction is applied, the value of the pixel adjacent to the left of the current block can be determined as the predicted sample value of the sample contained in that row of the current block. When vertical intra-prediction is applied, the value of the pixel adjacent to the top of the current block can be determined as the predicted sample value for the sample contained in that column of the current block. When BDPCM is applied to the current block, the method for generating the predicted block of the current block can be the same in the image encoding device and the image decoding device.
[0153] When BDPCM is applied to the current block, the image encoder can generate a residual block containing the residual sample of the current block by subtracting the predicted block from the current block. After quantizing the residual block, the image encoder can encode the difference (or delta) between the quantized residual sample and its predictor. Based on the difference and predictor recovered from the bitstream, the image decoder can generate a quantized residual block of the current block by obtaining the quantized residual sample of the current block. Subsequently, the image decoder can recover the current block by dequantizing the quantized residual block and adding it to the predicted block.
[0154] Figure 12 is a diagram illustrating the method for encoding residual samples of BDPCM according to this disclosure.
[0155] The residual block in Figure 12 can be generated by subtracting the predicted block from the current block in an image encoding device. The quantized residual block in Figure 12 can be generated by quantizing the residual block. In Figure 12, r i、j `i` represents the current value of the (i,j) coordinate within the block. When the current block size is M×N, the value of `i` can be between 0 and M-1 (inclusive). Similarly, the value of `j` can be between 0 and N-1 (inclusive). For example, `r` i、j Q(r) can now be derived by subtracting the predicted sample value from the original sample value at coordinates (i, j) within the block. In Figure 12, Q(r) i、jindicates the value of the quantized residual sample at the (i, j) coordinates within the current block. The prediction of BDPCM is performed on the quantized residual samples in FIG. 12, so that a modified quantized residual block of size M×N including modified quantized residual samples can be generated.
[0156] When the prediction direction of BDPCM is horizontal, the value (r’) of the modified quantized residual sample at the (i, j) coordinates within the current block i、j can be calculated as shown in Equation 1.
[0157]
Equation
[0158] As in Equation 1 above, when the prediction direction of BDPCM is horizontal, the value of r’ at the (0, j) coordinates 0、j is assigned the value of the quantized residual sample Q(r 0、j ). The values of r’ at the other (i, j) coordinates i、j are derived from the difference between the value of the quantized residual sample Q(r i、j ) at the (i, j) coordinates and the value of the quantized residual sample Q(r i-1、j ) at the (i - 1, j) coordinates. That is, instead of encoding the value of the quantized residual sample Q(r i、j ) at the (i, j) coordinates, the difference value calculated using the value of the quantized residual sample Q(r i-1、j ) at the (i - 1, j) coordinates as the predicted value is used to derive the modified quantized residual sample value (r’ i、j ), and then the value of r’ i、j is encoded.
[0159] When the prediction direction of BDPCM is vertical, the value (r’) of the modified quantized residual sample at the (i, j) coordinates within the current block i、j) can be calculated as shown in equation 2.
[0160]
number
[0161] As shown in equation 2 above, when the prediction direction of the BDPCM is vertical, the r' of the (i, 0) coordinates i、0 The value of the quantized resistance dual sample is Q(r i、0 ) is assigned as is. Other (i, j) coordinates r' i、j The value of Q(r) is the value of the quantized residual dual sample at (i, j) coordinates. i、j The quantized regional sample values Q(r) at coordinates (i, j-1) i、j-1 It is induced by the difference value with ). That is, the quantized resistance of the (i,j) coordinates, the dual sample value Q(r i、j Instead of encoding the quantized residual dual sample value Q(r) at (i, j-1) coordinates, i、j-1 The difference value calculated using ) as the predicted value is corrected to the quantized residual dual sample value (r' i、j After inducing with ), r' i、j Encode the value.
[0162] As mentioned above, the process of correcting the current quantized resistive dual-sample value using adjacent quantized resistive dual-sample values as predicted values can be called BDPCM prediction.
[0163] Ultimately, the image encoding device can encode a modified quantized resistive block containing the modified quantized resistive sample and transmit it to the image decoding device. At this point, as mentioned above, no conversion is performed on the modified quantized resistive block.
[0164] Figure 13 shows a modified quantized residual block generated by performing the BDPCM of this disclosure.
[0165] In Figure 13, the Horizontal BDPCM shows the modified quantized residual block generated based on Equation 1 when the prediction direction of the BDPCM is horizontal. The Vertical BDPCM shows the modified quantized residual block generated based on Equation 2 when the prediction direction of the BDPCM is vertical.
[0166] Figure 14 is a flowchart showing the procedure for encoding the current block using BDPCM in an image encoding device.
[0167] First, when the current block, which is the block to be encoded, is input (S1410), a prediction can be made on the current block to generate a predicted block (S1420). The predicted block in step S1420 can be an intra-predicted block, and the intra-prediction mode can be determined as described above. Based on the predicted block generated in step S1420, a residual block of the current block can be generated (S1430). For example, the image encoding device can generate a residual block (the value of the residual sample) by subtracting the predicted block (the value of the predicted sample) from the current block (the value of the original sample). For example, the residual block shown in Figure 12 can be generated by executing step S1430. Quantization is performed on the residual block generated in step S1430 (S1440) to generate a quantized residual block, and BDPCM prediction can be performed on the quantized residual block (S1450). The quantized residual block generated as a result of step S1440 can be the quantized residual block shown in Figure 12, and the modified quantized residual block shown in Figure 13 can be generated along the prediction direction of the BDPCM prediction result in step S1450. The BDPCM prediction in step S1450 has been explained with reference to Figures 12 and 13, so a detailed explanation is omitted. Thereafter, the image encoding device can encode the modified quantized residual block (S1460) to generate a bitstream. At this time, the conversion to the modified quantized residual block can be skipped.
[0168] The BDPCM operation in the image encoding device, as described with reference to Figures 12 to 14, can be reversed in the image decoding device.
[0169] Figure 15 is a flowchart showing the procedure for restoring the current block by applying BDPCM in an image decoding device.
[0170] The image decoding device can obtain information (image information) necessary for restoring the current block from the bitstream (S1510). The information necessary for restoring the current block may include information regarding the prediction of the current block (prediction information), information regarding the residual of the current block (residual information), etc. Based on the information about the current block, the image decoding device can make a prediction for the current block and generate a predicted block (S1520). The prediction for the current block can be an intra-prediction, and a specific explanation is the same as that given with reference to Figure 14. In Figure 15, it is illustrated that the step of generating a predicted block for the current block (S1520) is performed prior to the steps S1530 to S1550 of generating a residual block for the current block. However, this is not the only way; the predicted block of the current block can be generated after the residual block of the current block has been generated. Alternatively, the residual block of the current block and the predicted block of the current block can be generated simultaneously. The image decoding device can generate the residual block of the current block by parsing the residual information of the current block from the bitstream (S1530). The residual block generated in step S1530 can be the modified quantized residual block shown in Figure 13. The image decoding device can generate the quantized residual block in Figure 12 by performing a BDPCM prediction on the modified quantized residual block in Figure 13 (S1540). The BDPCM prediction in step S1540 is a procedure that generates the quantized residual block in Figure 12 from the modified quantized residual block in Figure 13, and therefore corresponds to the reverse process of step S1450 performed by the image coding device.
[0171] The following describes in more detail the BDPCM prediction in step S1540 performed by the image decoding device.
[0172] When the prediction direction of the BDPCM is horizontal, the image decoding device can generate a quantized resistive block from the modified quantized resistive block using Equation 3.
[0173]
number
[0174] As defined in Equation 3, the quantized residual dual sample value Q(r) of the (i,j) coordinates i、j This can be calculated by summing the values of the modified quantized residual samples from coordinate (0, j) to coordinate (i, j).
[0175] Alternatively, using equation 4 instead of equation 3, the quantized residual sample value Q(r) of the (i,j) coordinates can be obtained. i、j ) can be calculated.
[0176]
number
[0177] Equation 4 is the inverse process corresponding to Equation 1. According to Equation 4, the quantized residual dual sample value Q(r) of the (0, j) coordinates is r 0、j ) is the value of the modified quantized residual dual sample r' at the (0, j) coordinate. 0、j This is induced by the Q(r) coordinates of the other (i,j) coordinates. i、j ) is the modified quantized residual dual sample value r' in (i,j) coordinates. i、j And the quantized residual dual sample value Q(r) in (i-1, j) coordinates. i-1、j It is induced by the sum of ) and the dual sample value Q(r i-1、j ) is used as the predicted value and the difference value r' i、j By summing these, the quantized resistance dual sample value Q(r i、j ) can be induced.
[0178] When the prediction direction of the BDPCM is vertical, the image decoding device can generate a quantized resistive block from the modified quantized resistive block using Equation 5.
[0179]
number
[0180] As defined in Equation 5, the quantized residual dual sample value Q(r) of the (i,j) coordinates i、j This can be calculated by summing the values of the modified quantized residual samples from coordinate (i, 0) to coordinate (i, j).
[0181] Alternatively, using equation 6 instead of equation 5, the quantized residual sample value Q(r) of the (i,j) coordinates can be expressed. i、j ) can be calculated.
[0182]
number
[0183] Equation 6 is the inverse process corresponding to Equation 2. According to Equation 6, the quantized residual dual sample value Q(r) of the (i, 0) coordinate is i、0 ) is the value of the modified quantized residual dual sample r' at the (i, 0) coordinate. i、0 This is induced by the Q(r) coordinates of the other (i,j) coordinates. i、j ) is the modified quantized residual dual sample value r' in (i,j) coordinates. i、j The quantized residual dual sample value Q(r) at (i, j-1) coordinates i、j-1 It is induced by the sum of ) and the dual sample value Q(r i、j-1 ) is used as the predicted value and the difference value r' i、j By summing these, the quantized resistance dual sample value Q(r i、j ) can be induced.
[0184] By performing step S1540 using the method described above, a quantized resistive block composed of quantized resistive samples is generated. The image decoding device can then generate a resistive block of the current block by performing inverse quantization on the quantized resistive block (S1550). When BDPCM is applied, the transformation on the current block is skipped as described above, so the inverse transformation on the inverse quantized resistive block can be skipped.
[0185] Thereafter, the image decoding device can reconstruct the current block based on the predicted block generated in step S1520 and the residual block generated in step S1550 (S1560). For example, the image decoding device can reconstruct the current block (the value of the reconstructed sample) by adding the predicted block (the value of the predicted sample) and the residual block (the value of the residual sample).
[0186] First information indicating whether or not BDPCM is currently applied to the block may be signaled via the bitstream. If BDPCM is currently applied to the block, second information indicating the BDPCM prediction direction may be signaled via the bitstream. If BDPCM is not currently applied to the block, the second information may not be signaled.
[0187] Figure 16 is a schematic diagram showing the information about the BDPCM currently included in the block's syntax structure.
[0188] In the example shown in Figure 16, bdpcm_flag corresponds to the first piece of information indicating whether BDPCM is applied to the current block. Since BDPCM is only permissible when the current block is intra-predicted, bdpcm_flag can only be signaled when the prediction mode of the current block is MODE_INTRA. Furthermore, BDPCM is only available for luminous component signals (cIdx==0) and only when the current block size is less than or equal to a predetermined size (32x32). However, the conditions for using BDPCM are not limited to the above example; it can be used not only for luminous component signals but also for chroma component signals. In addition, information indicating whether or not BDPCM is available can be explicitly signaled at higher levels of the current block (sequence level, picture level, slice level, etc.).
[0189] A second piece of information (e.g., bdpcm_dir_flag) indicating the BDPCM prediction direction can be signaled only if bdpcm_flag indicates that BDPCM should be applied to the current block. When the second piece of information is a first value (e.g., 0), the BDPCM prediction direction can be horizontal, and when the second piece of information is a second value (e.g., 1), the BDPCM prediction direction can be vertical.
[0190] In signal processing, transform coding refers to converting an input signal into a signal of another domain. Specifically, in the field of video compression, transformation means changing a signal from the spatial domain to a signal in the frequency domain. The reason for performing transformation in video compression is that when a spatial domain signal is changed to a frequency domain signal, information is concentrated in the low-frequency range, and the high-frequency range contains almost no information, allowing for efficient compression. However, depending on the characteristics of the signal, the compression efficiency may be higher without transformation, and in such cases, transformation can be skipped.
[0191] As mentioned earlier, BDPCM can be applied in the process of encoding residual blocks where the transformation has been skipped. When the transformation is skipped, as mentioned earlier, the residual information can be evenly distributed within the block. Also, the value of any residual coefficient within a block has a very high probability of being similar to the values of the surrounding residual coefficients. Furthermore, in the case of intra-predicted transformation-skipped blocks, the level of the residual coefficient occurring on the lower right side of the block is more likely to be greater than the level of the residual coefficient occurring on the upper left side, depending on the distance from the reference sample. This phenomenon can become even more pronounced as the block size increases. BDPCM utilizes the distribution characteristics of the residual coefficients of intra-skipped coded blocks as described above. When BDPCM is applied, as mentioned earlier, instead of encoding the (quantized) residual coefficients, it encodes the difference value generated by making predictions between line-level residual coefficients in the row or column direction, thus reducing the magnitude of the level of the residual coefficient to be encoded. In other words, when BDPCM is applied, it encodes the level of the coefficients that have been reduced as described above, thus reducing the generation of context-coded bins required for encoding. This can contribute to improving the throughput of the decoder.
[0192] On the other hand, as mentioned above, when BDPCM is performed in a quantized residual domain, BDPCM cannot be performed if a residual signal does not exist. However, according to the syntax structure of the coding unit explained with reference to Figure 16, there is a problem in that BDPCM-related information is signaled even when a residual signal does not exist.
[0193] Figure 17 is a flowchart illustrating a method for encoding / decoding BDPCM-related information according to one embodiment of the present disclosure.
[0194] According to the embodiment disclosed in Figure 17, the ability to encode / decode BDPCM-related information can be restricted to only when a residual signal is present in the current block. Information indicating whether or not a residual signal is present in the current block (e.g., a coded block flag (cbf)) can be signaled via the bitstream, and the BDPCM-related information can be encoded / decoded based on this information.
[0195] Referring to Figure 17, first, it can be determined whether the current block is an intra-predicted block or not (S1710). If the current block is not intra-predicted, BDPCM cannot be applied to the current block. Therefore, BDPCM-related information for the current block may not be encoded / decoded.
[0196] If the current block is intrapredicted, it can be determined whether or not a residual signal exists in the current block (S1720). The determination in step S1720 can be made, for example, based on CBF information. For example, step S1720 can be performed by checking the CBF information (tu_cbf_luma) for the transform unit, which is the unit that transmits the residual signal of the current block. If tu_cbf_luma is 1, it means that there is a non-zero residual coefficient for the luma component of the current transform unit, and if tu_cbf_luma is 0, it means that there is no non-zero residual coefficient for the luma component of the current transform unit. If it is determined in step S1720 that there is no residual signal in the current block, the BDPCM-related information for the current block can be left unencoded / decoded.
[0197] In step S1720, if it is determined that a residual signal exists in the current block, information indicating whether or not BDPCM is applied to the current block (e.g., bdpcm_flag) can be encoded / decoded (S1730). The image encoding device can determine and encode the value of bdpcm_flag based on whether or not BDPCM is applied to the current block. After parsing bdpcm_flag, the image decoding device can determine whether or not BDPCM is applied to the current block based on its value.
[0198] Subsequently, it can be determined whether or not BDPCM is applied to the current block (S1740). For example, the determination in step S1740 can be made based on the value of bdpcm_flag. If it is determined in step S1740 that BDPCM is not applied to the current block, then information regarding the predicted direction of BDPCM for the current block may not be encoded / decoded.
[0199] In step S1740, if it is determined that a BDPCM is applied to the current block, information regarding the predicted direction of the BDPCM (e.g., bdpcm_dir_flag) can be encoded / decoded (S1750). The image encoding device can determine and encode the value of bdpcm_dir_flag based on the predicted direction of the BDPCM applied to the current block. After parsing bdpcm_dir_flag, the image decoding device can determine the predicted direction of the BDPCM based on its value.
[0200] According to the embodiment shown in Figure 17, encoding efficiency can be improved by performing BDPCM-related information encoding / decoding only when a quantized residual signal is present in the intra-predicted current block.
[0201] In the embodiment shown in Figure 17, the encoding / decoding conditions for BDPCM-related information are determined by whether or not it is an intra-prediction and whether or not a residual signal exists. However, the method is not limited to this, and various conditions mentioned above regarding whether or not BDPCM is available (such as color components, block size, and information signaled at a higher level) can be used to determine the encoding / decoding conditions for BDPCM-related information.
[0202] The embodiment shown in Figure 17 focuses on the luma component, but is not limited to this; it can also be applied when the BDPCM of this disclosure is applied to the chroma component. In other words, the embodiment described with reference to Figure 17 can be applied to each of the chroma components (Cb, Cr).
[0203] Alternatively, when the BDPCM of this disclosure is applied to an RGB image, the embodiments described with reference to Figure 17 can be applied to each of the R, G, and B components.
[0204] Alternatively, when the BDPCM of this disclosure is applied to a YCoCg image, the embodiments described with reference to Figure 17 can be applied to each of the Y, Co, and Cg components.
[0205] Figure 18 is a flowchart illustrating a method for guiding the prediction direction of the BDPCM based on the intra-prediction direction of the current block according to another embodiment of the present disclosure. Steps S1810 to S1830 in Figure 18 can be replaced by steps S1740 to S1750 in Figure 17.
[0206] As described with reference to Figure 18, since the intra-prediction mode of the current block is already available, the prediction direction of the BDPCM can be derived from the intra-prediction mode of the current block without separately signaling information regarding the prediction direction of the BDPCM.
[0207] Specifically, it is determined whether or not BDPCM is applicable to the current block (S1810), and if BDPCM is not applicable, the process of deriving the BDPCM prediction direction may be omitted.
[0208] If it is determined in step S1810 that BDPCM is applicable to the current block, the intra-prediction mode of the current block is determined (S1820), and the prediction direction of BDPCM can be derived based on the intra-prediction mode of the current block (S1830).
[0209] For example, if the current intra-prediction mode of a block is a vertical mode, the prediction direction of the BDPCM can be derived to be vertical. Conversely, if the current intra-prediction mode of a block is a horizontal mode, the prediction direction of the BDPCM can be derived to be horizontal. If the current intra-prediction mode of a block is a non-directional mode, the prediction direction of the BDPCM can be derived to a direction already agreed upon between the image encoding and decoding devices, either horizontal or vertical. Alternatively, if the current intra-prediction mode of a block is a non-directional mode, the prediction direction of the BDPCM can also be determined based on information signaled at higher levels of the block (sequence level, picture level, slice level, etc.). Or, in the example described with reference to Figure 10, if the current intra-prediction mode of a block is a mode with an absolute angle smaller than mode 34, the prediction direction of the BDPCM can be defined as horizontal; otherwise, the prediction direction of the BDPCM can be defined as vertical. Alternatively, if the current intra-prediction mode of the block is a mode with an absolute angle of 34 or less, the prediction direction of the BDPCM can be defined as horizontal; otherwise, the prediction direction of the BDPCM can be defined as vertical.
[0210] As another example, if the current intra-prediction mode of a block is a vertical mode, the prediction direction of the BDPCM can be derived to be horizontal. Conversely, if the current intra-prediction mode of a block is a horizontal mode, the prediction direction of the BDPCM can be derived to be vertical. If the current intra-prediction mode of a block is a non-directional mode, the prediction direction of the BDPCM can be derived to the direction already agreed upon between the image encoder and the image decoder, either horizontal or vertical. Alternatively, if the current intra-prediction mode of a block is a non-directional mode, the prediction direction of the BDPCM can also be determined based on information signaled at higher levels of the block (sequence level, picture level, slice level, etc.). Or, in the example described with reference to Figure 10, if the current intra-prediction mode of a block is a mode with an absolute angle smaller than mode 34, the prediction direction of the BDPCM can be defined as vertical; otherwise, the prediction direction of the BDPCM can be defined as horizontal. Alternatively, if the current intra-prediction mode of the block is a mode with an absolute angle of 34 or less, the prediction direction of the BDPCM can be defined as vertical; otherwise, the prediction direction of the BDPCM can be defined as horizontal.
[0211] When an image encoding device applies BDPCM to a block, it can derive the BDPCM prediction direction based on the intra-prediction mode and perform BDPCM prediction, without encoding information regarding the BDPCM prediction direction.
[0212] According to the embodiment shown in Figure 18, the prediction direction of the BDPCM can be derived using an already available intra-prediction mode. Therefore, since it is not necessary to signal information regarding the prediction direction of the BDPCM, the amount of information transmitted can be reduced.
[0213] As a variation of the embodiment shown in Figure 18, information regarding the prediction direction of the BDPCM is signaled, and the intra-prediction mode of the current block can also be derived based on the prediction direction of the BDPCM.
[0214] Figure 19 is a flowchart illustrating a method for inducing an intra-prediction mode of the current block based on the prediction direction of the BDPCM according to another embodiment of the present disclosure.
[0215] As described with reference to Figure 19, since the prediction direction of the BDPCM of the current block is already available, the intra-prediction mode of the current block can be derived from the prediction direction of the BDPCM of the current block without separately signaling information about the intra-prediction mode.
[0216] Specifically, it is determined whether BDPCM is applied to the current block (S1910). If BDPCM is not applied, the intra-prediction mode of the current block can be determined based on prediction information for the current block (e.g., information regarding the intra-prediction mode) signaled via the bitstream (S1940). Thereafter, intra-prediction can be performed based on the determined intra-prediction mode (S1930).
[0217] If it is determined in step S1910 that a BDPCM is applied to the current block, the intra-prediction mode of the current block can be determined based on the prediction direction of the BDPCM in the current block (S1920). For example, an image encoding device can determine the intra-prediction mode of the current block based on the prediction direction of the BDPCM applied to the current block. Alternatively, an image decoding device can decode information regarding the prediction direction of the BDPCM (bdpcm_dir_flag) to determine the prediction direction of the BDPCM in the current block, and then determine the intra-prediction mode of the current block based on the determined prediction direction of the BDPCM. Thereafter, intra-prediction can be performed based on the determined intra-prediction mode (S1930).
[0218] For example, if the prediction direction of the BDPCM is vertical, the intra-prediction mode can be determined to be the vertical mode, and if the prediction direction of the BDPCM is horizontal, the intra-prediction mode can be determined to be the horizontal mode.
[0219] According to other examples, if the prediction direction of the BDPCM is vertical, the intra-prediction mode can be determined to be horizontal, and if the prediction direction of the BDPCM is horizontal, the intra-prediction mode can be determined to be vertical.
[0220] However, the method for determining the intra-prediction mode based on the prediction direction of the BDPCM is not limited to these examples.
[0221] Figure 20 is a flowchart illustrating a method for guiding the prediction direction of the BDPCM based on the current block size according to another embodiment of the present disclosure. Steps S2010 to S2030 in Figure 20 can be replaced by steps S1740 to S1750 in Figure 17.
[0222] In the case of intra-prediction, the level (absolute value) of the residual coefficient increases as the distance from the reference sample increases. Taking this characteristic into consideration, the embodiment described with reference to Figure 20 can derive the prediction direction of the BDPCM of the current block based on conditions related to the block size (comparison of width and height, ratio of width and height, etc.). In this case, the intra-prediction mode of the current block may not be considered.
[0223] Specifically, it is determined whether or not BDPCM is applicable to the current block (S2010), and if BDPCM is not applicable, the process of deriving the BDPCM prediction direction can be omitted.
[0224] If it is determined in step S2010 that BDPCM should be applied to the current block, the conditions regarding the size of the current block are determined (S2020), and based on the result of that determination, the predicted direction of BDPCM can be derived (S2030).
[0225] For example, if the width of a block is greater than its height, the predicted direction of the BDPCM can be derived horizontally. Conversely, if the height of a block is greater than its width, the predicted direction of the BDPCM can be derived vertically. If the width and height of a block are the same, the method of the embodiment described with reference to Figure 18 can be applied. Alternatively, if the width and height of a block are the same, the predicted direction of the BDPCM can be derived horizontally or vertically, in a direction already agreed upon between the image encoding and decoding devices, or it can be determined based on information signaled at higher levels of the block (sequence level, picture level, slice level, etc.).
[0226] As another example, if the width of the block is currently greater than its height, the predicted direction of the BDPCM can be derived vertically. Conversely, if the height of the block is currently greater than its width, the predicted direction of the BDPCM can be derived horizontally. If the width and height of the block are currently the same, the method of the embodiment described with reference to Figure 18 can be applied. Alternatively, if the width and height of the block are currently the same, the predicted direction of the BDPCM can be derived from the horizontal and vertical directions already agreed upon between the image encoding and decoding units, or it can be determined based on information signaled at higher levels of the block (sequence level, picture level, slice level, etc.).
[0227] As another example, if the current width-to-height ratio of a block is greater than or equal to N, the predicted direction of the BDPCM can be derived vertically. Also, if the current width-to-height ratio of a block is less than or equal to 1 / N, the predicted direction of the BDPCM can be derived horizontally. If the current width-to-height ratio of a block is less than N and greater than or equal to 1 / N, the method of the embodiment described with reference to Figure 18 can be applied. Alternatively, if the current width-to-height ratio of a block is less than N and greater than or equal to 1 / N, the predicted direction of the BDPCM can be derived in a direction already agreed upon between the image encoding and decoding devices, either horizontally or vertically, or determined based on information signaled at higher levels of the block (sequence level, picture level, slice level, etc.). In this case, N can be an integer greater than or equal to 1.
[0228] As another example, if the current width-to-height ratio of a block is greater than or equal to N, the predicted direction of the BDPCM can be derived horizontally. Also, if the current width-to-height ratio of a block is less than or equal to 1 / N, the predicted direction of the BDPCM can be derived vertically. If the current width-to-height ratio of a block is less than N and greater than or equal to 1 / N, the method of the embodiment described with reference to Figure 18 can be applied. Alternatively, if the current width-to-height ratio of a block is less than N and greater than or equal to 1 / N, the predicted direction of the BDPCM can be derived in a direction already agreed upon between the image encoding and decoding devices, either horizontally or vertically, or determined based on information signaled at higher levels of the block (sequence level, picture level, slice level, etc.). In this case, N can be an integer greater than or equal to 1.
[0229] According to the embodiment shown in Figure 20, the predicted direction of the BDPCM can now be derived based on the conditions relating to the block size. Therefore, since it is no longer necessary to signal information regarding the predicted direction of the BDPCM, the amount of information transmitted can be reduced.
[0230] Overview of CABAC (Context-based Adaptive Binary Arithmetic Coding) and Residual Signal Encoding / Decoding
[0231] The image encoding / decoding device can encode / decode image information using CABAC. Part or all of the image information can be entropically encoded by the entropy encoding unit 190 in Figure 2, and part or all of the image information can be entropically decoded by the entropy decoding unit 210. Syntax elements included in the residual signal, described later, can be entropically encoded / decoded based on CABAC.
[0232] Figure 21 is a diagram illustrating the CABAC entropy coding method.
[0233] If the input signal is a syntax element that is not a binary value, the input signal can be converted to a binary value via the binarization unit 2110. If the input signal is already a binary value, the binarization process may be omitted. In this case, each binary digit 0 or 1 that makes up the binary value can be a bin. For example, if the binary sequence after binarization is 110, then 1, 1, and 0 can each be one bin. The binary and binary sequence for a single syntax element can represent the value of that syntax element.
[0234] The binarized bins can be input to the normal encoding engine 2120 or the bypass encoding engine 2130. The context model determination unit 2140 assigns a context model that reflects the probability values to the bins, and the normal encoding engine 2120 can encode the bins based on the assigned context model. After encoding is performed for each bin by the normal encoding engine 2120, the probability model for that bin can be updated. The bins encoded in this way can be called context-coded bins. The bypass encoding engine 2130 can omit the steps of estimating probabilities for the input bins and updating the probability model applied to the bins after encoding. The bypass encoding engine 2130 can improve encoding speed by applying a uniform probability distribution to encode the input bins instead of assigning a context. The bins encoded via the bypass encoding engine 2130 can be called bypass bins.
[0235] The entropy coding unit 190 can decide whether to perform coding via the normal coding engine 2120 or via the bypass coding engine 2130, and can switch the coding path.
[0236] On the other hand, entropy decoding can be performed by reversing the encoding process shown in Figure 21. The entropy decoding unit 210 can decode the bitstream into binary using either a normal coding decoding engine or a bypass decoding engine. After decoding with the normal coding engine, the probability model for the bin can be updated. On the other hand, with the bypass decoding engine, the steps of estimating probabilities for the input bitstream and updating the probability model can be omitted. The bins generated via either the normal coding decoding engine or the bypass decoding engine can finally be restored to the syntax elements that were the original input signals via selective inverse binarization by the inverse binarization unit.
[0237] Residual samples can be derived using quantized transformation coefficients obtained through a transformation and quantization process. These quantized transformation coefficients can be defined as transformation coefficients. Transformation coefficients within a block can be signaled in the form of residual information. Residual information can include residual coding syntax elements. An image encoding device can construct residual coding syntax elements with residual information, encode them, and output them in bitstream format. In contrast, an image decoding device can decode the residual coding syntax elements from the bitstream to obtain quantized transformation coefficients. Hereinafter, residual coding syntax elements are sometimes referred to as syntax elements.
[0238] As an example, the transformation coefficients can be encoded / decoded using at least one residual coding syntax element from among last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, coded_sub_block_flag, sig_coeff_flag, abs_level_gtX_flag, par_level_flag, abs_remainder, dec_abs_level, and coeff_sign_flag. The process of encoding / decoding transformation coefficients using syntax elements can be defined as residual (data) coding or (transformation) coefficient coding. In this case, the transformation / quantization process can be omitted. The following describes each of the syntax elements described above in detail. The names of the syntax elements described below are illustrative and do not limit the scope of rights of this disclosure.
[0239] The syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix encode the (x, y) position information of the last non-zero coefficient within the associated block. The associated block can be a coding block (CB) or a transform block (TB). Hereinafter, blocks in the transform, quantization, and residual coding processes can be coding blocks or transform blocks.
[0240] Specifically, last_sig_coeff_x_prefix can specify the column position prefix of the last significant coefficient in the scan order within the transformation block, and last_sig_coeff_y_prefix can specify the row position prefix of the last significant coefficient in the scan order within the transformation block. last_sig_coeff_x_suffix can specify the column position suffix of the last significant coefficient in the scan order within the transformation block, and last_sig_coeff_y_suffix can specify the row position suffix of the last significant coefficient in the scan order within the transformation block. The significant coefficient can mean a coefficient that is not zero. The scan order can be any one of the following: upper-right diagonal scan order, horizontal scan order, and vertical scan order. In this case, the horizontal scan order can mean a scan order from left to right, and the vertical scan order can mean a scan order from top to bottom. The scan order can be determined based on whether intra / inter prediction is applied to the target block and / or the specific intra / inter prediction mode.
[0241] The syntax element `coded_sub_block_flag` can be a syntax element that indicates whether each subblock contains a non-zero coefficient when the current block is divided into subblocks with 4 or 16 pixels each (for example, 1x16, 2x8, 8x2, 16x1, 4x4, or 2x2 subblocks). In this case, the subblocks can also be represented as coefficient groups (CG).
[0242] For example, if the value of coded_sub_block_flag is 0, there is no more information to transmit, and the encoding process for the subblock can be terminated. Conversely, if the value of coded_sub_block_flag is 1, the encoding / decoding process for sig_coeff_flag can be performed. Depending on the scan order, signaling for coded_sub_block_flag may not be performed for subblocks that contain a non-zero coefficient at the end. This is possible because, in the case of the upper left subblock, a DC coefficient exists, making the probability of a non-zero coefficient being present high. Therefore, for subblocks that contain a non-zero coefficient at the end, coded_sub_block_flag may not be encoded, and its value may be set to 1.
[0243] If coded_sub_block_flag indicates that there is currently a non-zero coefficient in the subblock, then sig_coeff_flag, which has a binary value, can be coded / decoded in the reverse scan order. In the scan order, a 1-bit syntax element sig_coeff_flag[n] can be coded / decoded for the coefficient at the scan position (n). The syntax element sig_coeff_flag[n] can be a syntax element that indicates whether the coefficient at the current scan position has a value of 0 or not. For a subblock containing the last non-zero coefficient, the coding / decoding process can be omitted because sig_coeff_flag[n] does not need to be coded / decoded for the last non-zero coefficient.
[0244] Level information coding / decoding can only be performed if sig_coeff_flag[n] is 1. In this case, the level information coding / decoding process can be performed using at least one of the syntax elements described above. On the other hand, the syntax element sig_coeff_flag[xC][yC] can be a syntax element that indicates whether the conversion coefficient at each conversion coefficient position (xC, yC) in the current block is 0 or not.
[0245] The remaining level value after encoding / decoding of sig_coeff_flag[n] can be derived based on the following Equation 7.
[0246]
Equation
[0247] At this time, the syntax element remAbsLevel[n] can indicate the level value that must be encoded / decoded at the scan position n. coeff[n] can mean the actual conversion coefficient value.
[0248] The syntax element abs_level_gtx_flag[n][0] can be a syntax element that indicates whether |coeff[n]| at the scan position n is greater than 1. If the value of abs_level_gtX_flag[n][0] is 0, the absolute value of the position coefficient can be 1. On the other hand, if the value of abs_level_gtX_flag[n][0] is 1, remAbsLevel[n] can be derived based on the following Equation 8.
[0249]
Equation
[0250] The syntax element par_level_flag[n] can be a syntax element used to encode / decrypt the LSB (least significant coefficient) value of remAbsLevel[n] based on the following Equation 9. That is, par_level_flag[n] can indicate the parity of the conversion coefficient level value at the scan position n. After encoding / decoding of par_leve_flag[n], remAbsLevel[n] can be updated based on the following Equation 9.
[0251]
number
[0252] The syntax element abs_level_gtx_flag[n][1] can be a syntax element that indicates whether |coeff[n]| at scan position n is greater than 3. For example, abs_remainder[n] can only be encoded / decoded if abs_level_gtX_flag[n][1] is 1. As an example, the relationship between coeff[n] and each syntax element can be as shown in equation 10 below. In this case, |coeff[n]| indicates the level value of the conversion coefficient and can also be expressed as AbsLevel[n] for the conversion coefficient. The syntax element coeff_sign_flag[n] can indicate the sign of the conversion coefficient at the scan position n. Combining the above, abs_level_gtx_flag[n][i] can be a syntax element that indicates whether the absolute value of the conversion coefficient is greater than either 1 or 3.
[0253]
number
[0254] Considering the above, each syntax element can have the values shown in Table 2, depending on the value of |coeff[n]|.
[0255] [Table 2]
[0256] On the other hand, while CABAC offers high performance, it suffers from poor throughput. This may be due to the CABAC normal encoding engine mentioned above. The normal encoding engine exhibits high data dependency because it uses probabilistic states and ranges that were previously updated through bin encoding, and it has the problem of taking a lot of time to read the probabilistic interval and determine the current state. In this case, limiting the number of context-encoded bins can solve the throughput problem of CABAC.
[0257] For example, the sum of bins used to represent sig_coeff_flag[n], abs_level_gtX_flag[n][0], par_level_flag[n], and abs_level_gtx_flag[n][1] can be limited according to the size of the subblock. For instance, the sum of bins can be limited to 32 for a 4x4 subblock and 8 for a 2x2 subblock. If all the limited number of context coding bins have been used to encode the context elements, CABAC will not be applied to the remaining coefficients, and bypass coding / decoding can be performed. That is, if the number of coding / decoding bins is 32 for a 4x4 CG and 8 for a 2x2 CG, then sig_coeff_flag[n], abs_level_gtX_flag[n][0], par_level_flag[n], and abs_level_gtx_flag[n][1] may not be coded further. In this case, |coeff[n]| can be encoded / decoded using the already set dec_abs_level[n]. Alternatively, the sum of the bins used to represent sig_coeff_flag[n], abs_level_gtX_flag[n][0], par_level_flag[n] and / or abs_level_gtx_flag[n][1] can be limited according to the size of the transformation block. For example, the sum of the bins can be 1.75 times the number of pixels in the block. If all of the limited number of context encoding bins have been used to encode the context element, CABAC will not be applied to the remaining coefficients, and bypass encoding / decoding can be performed. In other words, if the number of encoding / decoding bins exceeds 1.75 times the number of pixels in a block (for example, 448 for a 16x16 block), sig_coeff_flag[n], abs_level_gtX_flag[n][0], par_level_flag[n], and abs_level_gtx_flag[n][1] may not be encoded further. In this case, |coeff[n]| can be encoded / decoded using the already set dec_abs_level[n].
[0258] Derivation process of Rice parameter with respect to the level of residual coefficient
[0259] The derivation process of the Rice parameter can receive the input of the color component information (cIdx) of the current conversion block, the upper left corner luma position (x0, y0) of the current conversion block, the scan position (xC, yC) of the current residual coefficient, the width (log2TbWidth) and height (log2TbHeight) of the current conversion block, and output the Rice parameter cRiceParam.
[0260] First, the variable locSumAbs can be derived according to the pseudo code in Table 3 below.
[0261]
Table 3
[0262] Also, based on locSumAbs, cRiceParam can be derived as shown in Table 4.
[0263]
Table 4
[0264] The above Rice parameter derivation process can be applied to the syntax elements dec_abs_level[] and abs_remainder[]. That is, the above Rice parameter derivation process can also be commonly applied to the residual coefficients in the current conversion block.
[0265] Binarization process with respect to the level of residual coefficient
[0266] The induced cRiceParam can be used to induce cMax during the binarization process of the syntax element. The prefixVal of the syntax element can be determined to be the smaller of cMax and the value of the syntax element. The suffixVal of the syntax element can be determined to be the value of the syntax element minus the cMax value. As mentioned above, after the prefixVal and suffixVal of the syntax element are determined, a binarization process can be performed on each to generate a binarized binstring of the syntax element. In other words, the binarized binstring of the syntax element can be generated by concatenating the binstring of prefixVal and the binstring of suffixVal (if any).
[0267] Encoding of residual signals that have been skipped during conversion
[0268] If the transformation is skipped for a residual signal, the encoding process of the residual signal can be modified by considering the statistical signal characteristics of the quantized residual signal in the spatial domain.
[0269] For example, information regarding the position of the last significant coefficient in the scan order within a transformation block can be omitted from encoding. When a transformation is performed, energy is concentrated in the low-frequency region, and there is a high probability that zero or ineffective levels will appear in the high-frequency region. Therefore, when a transformation is performed, the position of the last significant coefficient can be of significant importance. However, when the transformation is skipped, the energy concentration phenomenon in the low-frequency region described above does not occur. In other words, when the transformation is skipped, the significant coefficients are now evenly distributed within the transformation block, so the position of the last significant coefficient is not of significant importance and may therefore not be encoded.
[0270] Additionally, the context model for sig_coeff_flag[] can be modified. The context model for the syntax element sig_coeff_flag[] can be derived by referencing the surrounding positions of the current scanning position. In this case, the referenced surrounding positions can be defined as a template. If the transformation is skipped, the template for determining the context model of the syntax element sig_coeff_flag[] can be modified to the left position (NB0) and the top position (NB1) of the current scanning position. For example, the context increment value (ctxInc) for determining the context model of the syntax element sig_coeff_flag[] can be derived based on sig_coeff_flag[NB0] + sig_coeff_flag[NB1]. In other words, the context model for sig_coeff_flag at the current scanning position can be derived based on the sig_coeff_flag value at the left position and the sig_coeff_flag value at the top position of the current scanning position. Therefore, when the transformation is skipped, the context model can be determined independently of the diagonal direction. Furthermore, one of the three types of context models can be determined.
[0271] To account for the distribution of residual signals when the transformation is skipped, modifications are also needed in the encoding of the syntax element abs_remainder[]. As mentioned above, Rice parameters can be induced for the binarization of abs_remainder[]. According to the pseudocode in Table 3, the right (xC+1, yC) and below (xC, yC+1) positions of the current scanning position are used as templates to induced the Rice parameters. However, when the transformation is skipped, the left (xC-1, yC) and above (xC, yC-1) positions of the current scanning position (xC, yC) can be defined as templates for induced Rice parameters of abs_reminder[], similar to the sig_coeff_flag template mentioned above. Alternatively, the Rice parameter for the transformation-skipped residual signal can be fixed to a specific number. For example, the Rice parameter for the transformation-skipped residual signal can be 1.
[0272] Context model induction process for syntax element sig_coeff_flag
[0273] Syntax elements can be encoded / decoded using CABAC. A context model can be induced to perform CABAC. The context model can be derived, for example, by determining the context index (ctxIdx), which can be derived by the sum of the variables ctxIdxOffset and ctxInc. In this case, ctxInc can be derived using a template, as mentioned above.
[0274] Specifically, in order to induce ctxInc of the syntax element sig_coeff_flag, the variables locNumSig and locSumAbsPass1 can be induced based on the pseudocode in Table 5.
[0275] [Table 5]
[0276] As shown in Table 5, the templates used in the process of deriving locNumSig and locSumAbsPass1 can differ depending on transform_skip_flag. Specifically, if transform_skip_flag is 1 (the transformation is skipped), the left position (xC-1, yC) and the upper position (xC, yC-1) of the current scanning position (xC, yC) can be used as templates. The ctxInc of the syntax element sig_coeff_flag can be derived based on locNumSig and / or locSumAbsPass1. In other words, the templates used for context modeling of sig_coeff_flag can be determined to differ depending on whether the transformation is skipped.
[0277] As mentioned earlier, BDPCM can be applied in the process of encoding residual blocks where the transformation is skipped. When BDPCM is applied, as mentioned earlier, instead of encoding the (quantized) residual coefficients, it encodes the difference values that arise from making predictions between line-level residual coefficients in the row or column direction, so it can have different characteristics from other residual signals where the transformation is skipped. For example, if the values of consecutive residuals in one line are (3, 3, 4, 3), when BDPCM is applied, the values of the residuals actually transmitted become (3, 0, 1, -1), which can be significantly reduced in level and change in sign. Therefore, it is necessary to select a separate context model that can accumulate statistical characteristics suitable for BDPCM, or to adaptively apply a method for deriving the Rice parameters used when binarizing the levels of the residual coefficients.
[0278] As mentioned above, surrounding pixels can be referenced to determine the context model of sig_coeff_flag or to derive the Rice parameters for binarization in abs_remainder. In this case, the referenced surrounding pixels (or their positions) can be defined as templates. If the transformation is skipped, the left and top positions of the current pixel (current scanning position) can be referenced as templates. If the current pixel is located at the topmost or leftmost position in the block, only available surrounding pixels can be referenced as templates. Unavailable surrounding pixel positions can be initialized to non-zero or have a level value of 0. If the current pixel is at (0,0), no pixels can be referenced, so the non-zero or level value for surrounding pixel positions can be deriveted as 0.
[0279] Figures 22 and 23 illustrate a template for a block to which BDPCM is applied according to one embodiment of the present disclosure.
[0280] In Figures 22 and 23, "C" indicates the current pixel, and "A" and "L" indicate the upper and left peripheral pixels, respectively. Additionally, the arrow displayed to the right of the block in Figure 22 indicates that the BDPCM prediction direction is vertical, and the arrow displayed below the block in Figure 23 indicates that the BDPCM prediction direction is horizontal.
[0281] To encode the residual signal of a block where the transformation was skipped, the left pixel (L) and upper pixel (A) of the current pixel (C) can be referenced as templates, as shown in the blocks on the left side of Figures 22 and 23. For example, the template may be the one used to induce the Rice parameter of abs_remainder[] or the one used to induce the context model of sig_coeff_flag.
[0282] If a block that was skipped during transformation is a block predicted by the BDPCM, the template can be modified based on the BDPCM prediction direction. For example, if the BDPCM prediction direction is vertical, only the upper pixel (A) of the current pixel (C) can be referenced as the template, as shown in the block on the right side of Figure 22. Similarly, if the BDPCM prediction direction is horizontal, only the left pixel (L) of the current pixel (C) can be referenced as the template, as shown in the block on the right side of Figure 23. In other words, by considering the BDPCM prediction direction with respect to the current pixel position (coefficient, residual coefficient, or quantized residual coefficient position), pixels at unreferenced positions can be excluded from being used as templates for checking similarity with the surrounding area (neighbor position for context model selection, rice parameter derivation). In this case, for example, reference samples located in the BDPCM prediction direction relative to the current coefficient position can be used as templates, while reference samples not located in the BDPCM prediction direction can not be used as templates.
[0283] Figure 24 is a flowchart illustrating how the present disclosure defines a template considering the prediction direction of the BDPCM and how to derive a context model or Rice parameters.
[0284] As shown in Figure 24, it is determined whether BDPCM is applied to the current block that was skipped (S2410). If BDPCM is not applied, the left and upper peripheral pixels of the current pixel can be defined as a template (S2420). If BDPCM is applied to the current block, the predicted direction of BDPCM is determined (S2430). If it is horizontal, the left peripheral pixels of the current pixel can be defined as a template (S2440). If it is vertical, the upper peripheral pixels of the current pixel can be defined as a template (S2450). Encoding / decoding can be performed using the template of the current pixel defined based on whether BDPCM is applied to the current block that was skipped as described above and / or the predicted direction of BDPCM (S2460). The encoding / decoding in step S2460 is, for example, encoding / decoding of the residual signal of the current pixel, and may include a context model induction process or a Rice parameter induction process for the residual signal.
[0285] As illustrated in the embodiment described with reference to Figures 22 to 24, by determining which of the pixels adjacent to the current pixel has a higher correlation (correlation) based on the prediction direction of the BDPCM (e.g., bdpcm_dir_flag), and utilizing this as statistics for the surrounding pixels relative to the current pixel, encoding efficiency can be improved.
[0286] Figures 25 and 26 illustrate templates for blocks to which BDPCM has been applied according to other embodiments of the present disclosure.
[0287] In Figures 25 and 26, "C" indicates the current pixel, and "A" and "L" indicate the upper and left surrounding pixels, respectively. The arrows displayed to the right of the blocks in Figure 25 indicate that the BDPCM prediction direction is vertical, while the arrows displayed below the blocks in Figure 26 indicate that the BDPCM prediction direction is horizontal. Furthermore, in Figures 25 and 26, the thick solid lines indicate the BDPCM line where the current pixel is located.
[0288] To encode the residual signal of a block where the transformation was skipped, the left pixel (L) and upper pixel (A) of the current pixel (C) can be referenced as templates, as shown in the blocks on the left side of Figures 25 and 26. For example, the template may be the one used to induce the Rice parameter of abs_remainder[] or the one used to induce the context model of sig_coeff_flag.
[0289] If a block that was skipped during transformation is a block predicted by the BDPCM, the template can be modified based on the BDPCM prediction direction. For example, if the BDPCM prediction direction is vertical, only the left pixel (L) of the current pixel (C) can be referenced as the template, as shown in the block on the right side of Figure 25. Similarly, if the BDPCM prediction direction is horizontal, only the upper pixel (A) of the current pixel (C) can be referenced as the template, as shown in the block on the right side of Figure 26.
[0290] In the embodiment described with reference to Figures 25 and 26, pixels that are not currently on the same BDPCM line as the pixel's position can be excluded from being used as templates for checking similarity with the surrounding area (neighbor position for context model selection, rice parameter derivation).
[0291] Figure 27 is a flowchart illustrating how the present disclosure defines a template considering the BDPCM lines and derives a context model or Rice parameters.
[0292] As shown in Figure 27, it is determined whether BDPCM is applied to the current block that was skipped during transformation (S2710). If BDPCM is not applied, the left and upper peripheral pixels of the current pixel can be defined as templates (S2720). If BDPCM is applied to the current block, the predicted direction of the BDPCM is determined (S2730). If it is horizontal, the upper peripheral pixels of the current pixel can be defined as templates (S2740). If it is vertical, the left peripheral pixels of the current pixel can be defined as templates (S2750). In other words, peripheral pixels that exist on the same BDPCM line as the current pixel can be defined as templates. Encoding / decoding can be performed using the template of the current pixel defined based on whether BDPCM is applied to the current block that was skipped during transformation and / or the predicted direction of the BDPCM (S2760). The encoding / decoding in step S2760 is, for example, encoding / decoding of the residual signal of the current pixel, and may include a context model induction process or a Rice parameter induction process for the residual signal.
[0293] As illustrated in the embodiment described with reference to Figures 25 to 27, by determining which of the pixels adjacent to the current pixel has a higher correlation (correlation) based on the prediction direction of the BDPCM (e.g., bdpcm_dir_flag), and utilizing this as statistics for the surrounding pixels relative to the current pixel, encoding efficiency can be improved.
[0294] Figures 28 and 29 illustrate templates for blocks to which BDPCM is applied according to another embodiment of the present disclosure.
[0295] In Figures 28 and 29, "C" indicates the current pixel, and "A" and "L" indicate the upper and left peripheral pixels, respectively. Additionally, the arrow displayed to the right of the block in Figure 28 indicates that the BDPCM prediction direction is vertical, and the arrow displayed below the block in Figure 29 indicates that the BDPCM prediction direction is horizontal.
[0296] In DPCM, the first value for which there is no predicted value, or in BDPCM, the value of the first line, is not predicted and is encoded with the same value as before. However, from that point onward, the difference between the value of the previously encoded line and the current value is encoded. Therefore, the magnitude of the encoded level can be very small or even zero compared to the level of the first line. In other words, the magnitude of the level can vary greatly between pixels included in the first line and pixels included in other lines. That is, it may not be appropriate to use the surrounding pixels included in the first line as templates for the current pixels included in the second line and beyond.
[0297] Taking this into consideration, the embodiments shown in Figures 28 and 29 can avoid using neighboring pixels included in the first line as a template (neighbor position for context model selection, rice parameter derivation) depending on the current pixel position and the BDPCM prediction direction. In other words, the template can be defined assuming that the first line of the BDPCM is unavailable. For example, sig_coeff_flag checks whether the pixels above and to the left of the current pixel are 0 or non-zero, and then determines the context model based on this. In this case, since the first line has a higher probability of having non-zero levels than other lines, coding efficiency can be improved by adaptively accumulating statistics depending on whether the neighboring pixels are the first line or not. Similarly, since the Rice parameters are derived based on the magnitude of the neighboring levels of the current pixel, if the current pixel is the second line, a more suitable Rice parameter for the current coefficient can be derived by not referring to the undifferentiated levels of the first line.
[0298] As shown on the left side of Figure 28, if the prediction direction of the BDPCM is vertical and the upper pixel of the current pixel (C) belongs to the first line of the BDPCM, only the left pixel (L) can be referenced as a template. If, as shown on the right side of Figure 28, the upper pixel of the current pixel (C) does not belong to the first line of the BDPCM, then both the upper pixel (A) and the left pixel (L) can be referenced as templates.
[0299] Similarly, as shown on the left side of Figure 29, if the prediction direction of the BDPCM is horizontal and the leftmost pixel of the current pixel (C) belongs to the first line of the BDPCM, only the upper pixel (A) can be referenced as a template. If, as shown on the right side of Figure 29, the leftmost pixel of the current pixel (C) does not belong to the first line of the BDPCM, then both the upper pixel (A) and the leftmost pixel (L) can be referenced as templates.
[0300] Figure 30 is a flowchart illustrating how the present disclosure defines a template and derives a context model or Rice parameter, taking into account whether or not peripheral pixels are included in the first line of the BDPCM.
[0301] As shown in Figure 30, it is determined whether BDPCM is applied to the current block that has been skipped (S3010). If BDPCM is not applied, the left and upper peripheral pixels of the current pixel can be defined as templates (S3020). If BDPCM is applied to the current block, the prediction direction of BDPCM can be determined (S3030). If the prediction direction of BDPCM is horizontal, it is determined whether the left peripheral pixels of the current pixel are on the first line of BDPCM (S3040). If the left peripheral pixels of the current pixel are on the first line of BDPCM, only the upper peripheral pixels of the current pixel can be defined as templates (S3050). If the left peripheral pixels of the current pixel are not on the first line of BDPCM, both the left peripheral pixels and the upper peripheral pixels of the current pixel can be defined as templates (S3060). Similarly, if the prediction direction of BDPCM is vertical, it is determined whether the upper peripheral pixels of the current pixel are on the first line of BDPCM (S3070). If the pixels above the current pixel do not exist in the first line of the BDPCM, the pixels to the left and above the current pixel can be defined as a template (S3060). If the upper peripheral pixels of the current pixel are located on the first line of the BDPCM, only the left peripheral pixels of the current pixel can be defined as a template (S3080). As described above, encoding / decoding can be performed using the template of the current pixel, which is defined based on whether or not the BDPCM is applied to the current block, the prediction direction of the BDPCM, and whether or not the peripheral pixels are located on the first line of the BDPCM (S3090). The encoding / decoding in step S3090 is, for example, the encoding / decoding of the residual signal of the current pixel, and may include a context model induction process or a Rice parameter induction process for the residual signal.
[0302] The embodiment described with reference to Figures 28 and 30 defines a template for the current pixel based on whether the surrounding pixels of the current pixel are the first line of the BDPCM, thereby reflecting the statistical characteristics of the first line and subsequent lines of the BDPCM. Thus, a context model and Rice parameters more suitable for encoding / decoding can be derived for the current pixel.
[0303] Figures 31 and 32 illustrate templates for blocks to which BDPCM is applied according to another embodiment of the present disclosure.
[0304] In Figures 31 and 32, "C" indicates the current pixel, and "A" and "L" indicate the upper and left peripheral pixels, respectively. Additionally, the arrow displayed to the right of the block in Figure 31 indicates that the BDPCM prediction direction is vertical, and the arrow displayed below the block in Figure 32 indicates that the BDPCM prediction direction is horizontal.
[0305] The embodiment described with reference to Figures 31 and 32 is a combination of the embodiment described with reference to Figures 22 and 23 and the embodiment described with reference to Figures 28 and 29. In other words, peripheral pixels not referenced in the BDPCM prediction and peripheral pixels included in the first line of the BDPCM can be excluded from being used as templates.
[0306] Specifically, as shown in the block on the left side of Figure 31, when the prediction direction of the BDPCM is vertical, the upper pixel of the current pixel (C) can be used as a template. However, since the upper pixel of the current pixel (C) is included in the first line of the BDPCM, the left and upper pixels of the current pixel (C) may not be available as templates. Also, as shown in the block on the right side of Figure 31, since the upper pixel (A) of the current pixel (C) is not included in the first line of the BDPCM, the upper pixel (A) can be used as a template for the current pixel (C).
[0307] Similarly, as shown in the block on the left side of Figure 32, when the prediction direction of the BDPCM is horizontal, the left pixel of the current pixel (C) can be used as a template. However, since the left pixel of the current pixel (C) is included in the first line of the BDPCM, both the left and upper pixels of the current pixel (C) may not be available as templates. Also, as shown in the block on the right side of Figure 32, since the left pixel (L) of the current pixel (C) is not included in the first line of the BDPCM, the left pixel (L) can be used as a template for the current pixel (C).
[0308] Figure 33 is a flowchart illustrating how the present disclosure defines a template considering the prediction direction of the BDPCM and whether surrounding pixels are included in the first line of the BDPCM, and how to derive a context model or Rice parameters.
[0309] As shown in Figure 33, it is determined whether BDPCM is applied to the current block that has been skipped (S3310). If BDPCM is not applied, the left and upper peripheral pixels of the current pixel can be defined as templates (S3320). If BDPCM is applied to the current block, the prediction direction of BDPCM can be determined (S3330). If the prediction direction of BDPCM is horizontal, it is determined whether the left peripheral pixels of the current pixel are on the first line of BDPCM (S3340). If the left peripheral pixels of the current pixel are not on the first line of BDPCM, the left peripheral pixels of the current pixel can be defined as templates (S3350). If the left peripheral pixels of the current pixel are on the first line of BDPCM, the left peripheral pixels and upper peripheral pixels of the current pixel can all be left undefined as templates (S3360). Similarly, if the prediction direction of BDPCM is vertical, it is determined whether the upper peripheral pixels of the current pixel are on the first line of BDPCM (S3370). If the upper peripheral pixels of the current pixel are not on the first line of the BDPCM, the upper peripheral pixels of the current pixel can be defined as a template (S3380). If the upper peripheral pixels of the current pixel are on the first line of the BDPCM, the left peripheral pixels and upper peripheral pixels of the current pixel may not be defined as templates (S3360). As described above, encoding / decoding can be performed using the template of the current pixel, which is defined based on whether the BDPCM is applied to the current block, the prediction direction of the BDPCM, and whether the peripheral pixels are on the first line of the BDPCM (S3390). The encoding / decoding in step S3390 may be, for example, the encoding / decoding of the residual signal of the current pixel, and may include a context model induction process or a Rice parameter induction process for the residual signal.
[0310] The embodiment described with reference to Figures 31 and 33 defines a template for the current pixel based on the prediction direction of the BDPCM and whether the surrounding pixels of the current pixel are the first line of the BDPCM, thereby better reflecting the statistical properties of the BDPCM. Consequently, a context model and Rice parameters more suitable for encoding / decoding can be derived for the current pixel.
[0311] Furthermore, according to another embodiment of the present invention, the embodiment described with reference to Figures 25 and 26 can be combined with the embodiment described with reference to Figures 28 and 29. In other words, peripheral pixels that are not currently in the same BDPCM line as the pixel, and peripheral pixels included in the first line of the BDPCM, can be excluded from being used as templates.
[0312] Referring to Figures 22 to 33, various embodiments of peripheral pixels that can and cannot be used as templates have been described. However, depending on the current position of the pixel, there may be peripheral pixels that cannot be used. For example, if the left peripheral pixel or the top peripheral pixel does not currently exist within the block, that peripheral pixel may not be available as a template.
[0313] In the various embodiments described above, unavailable peripheral pixels may be omitted or replaced with a predetermined value for reference. For example, the non-zero status or level value of an unavailable peripheral pixel location may be replaced with 0 for reference.
[0314] The exemplary methods in this disclosure are presented as a series of actions for clarity of explanation, but this is not intended to restrict the order in which the steps are performed, and each step may be performed simultaneously or in a different order, if necessary. To implement the methods according to this disclosure, the exemplary steps may be further varied, including the remaining steps with some exceptions, or including additional steps with some exceptions.
[0315] In this disclosure, an image encoding device or image decoding device that performs a predetermined operation (step) may perform an operation (step) to confirm the conditions or status of the execution of said operation (step). For example, if it is stated that a predetermined operation is performed when a predetermined condition is satisfied, the image encoding device or image decoding device may perform an operation to confirm whether or not the predetermined condition is satisfied, and then perform the predetermined operation.
[0316] The various embodiments of this disclosure are not intended to list all possible combinations, but rather to illustrate representative aspects of this disclosure. The matters described in the various embodiments may be applied independently or in combination of two or more.
[0317] Furthermore, various embodiments of this disclosure can be implemented by hardware, firmware, software, or a combination thereof. In the case of hardware implementation, it can be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.
[0318] Furthermore, the image decoding and image encoding devices to which the embodiments of this disclosure are applied can be included in multimedia broadcasting transceivers, mobile communication terminals, home cinema video equipment, digital cinema video equipment, surveillance cameras, video conferencing equipment, real-time communication equipment such as video communications, mobile streaming equipment, storage media, camcorders, video-on-demand (VoD) service providers, over-the-top (OTT) video equipment, internet streaming service providers, 3D video equipment, image-phone video equipment, and medical video equipment, and can be used to process video signals or data signals. For example, over-the-top (OTT) video equipment can include game consoles, Blu-ray players, internet-connected TVs, home theater systems, smartphones, tablet PCs, and digital video recorders (DVRs).
[0319] Figure 34 illustrates a content streaming system to which embodiments of this disclosure can be applied.
[0320] As shown in Figure 34, the content streaming system to which the embodiments of this disclosure are applied may broadly include an encoding server, a streaming server, a web server, media storage, user equipment, and multimedia input devices.
[0321] The encoding server is responsible for compressing content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data to generate a bitstream, and transmitting this bitstream to the streaming server. In other cases, if the multimedia input device such as a smartphone, camera, or camcorder directly generates the bitstream, the encoding server can be omitted.
[0322] The bitstream can be generated by an image encoding method and / or image encoding apparatus to which an embodiment of the present disclosure is applied, and the streaming server can temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0323] The streaming server transmits multimedia data to user devices based on user requests via a web server, and the web server can act as an intermediary to inform users about available services. When a user requests a desired service from the web server, the web server transmits this to the streaming server, which can then transmit multimedia data to the user. In this case, the content streaming system may include a separate control server, in which case the control server can control the commands and responses between the devices within the content streaming system.
[0324] The streaming server can receive content from media storage and / or encoding servers. For example, when receiving content from the encoding server, the content can be received in real time. In this case, in order to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.
[0325] Examples of user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, PDAs (personal digital assistants), PMPs (portable multimedia players), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (such as smartwatches, smart glasses, and HMDs (head-mounted displays)), digital TVs, desktop computers, and digital signage.
[0326] Each server within the aforementioned content streaming system can be operated as a distributed server, in which case the data received from each server can be processed in a distributed manner.
[0327] The scope of this disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) that enable the operation of various embodiments to be performed on a device or computer, and non-transitory computer-readable medium on which such software or commands etc. are stored and can be executed on a device or computer. [Industrial applicability]
[0328] The embodiments described herein can be used for encoding / decoding images.
Claims
1. An image decoding method performed by an image decoding device, Currently, the question is whether BDPCM (block difference pulse code modulation) is applied to the block, When the BDPCM is applied to the current block, the prediction direction of the BDPCM for the current block is determined, Based on the prediction direction of the BDPCM for the current block, the intra-prediction mode of the current block is determined, Based on the predicted direction of the BDPCM, a residual block of the current block is generated, Based on the intra-prediction mode of the current block, an intra-prediction is performed to generate a predicted block for the current block, Reconstructing the current block based on the residual block and the predicted block, Includes, Determining whether the BDPCM is applied to the current block is: An image decoding method characterized by including parsing a bitstream for first information that indicates only that the BDPCM should be applied to the chroma component of the current block.
2. Determining the prediction direction of the BDPCM for the current block is: The image decoding method according to claim 1, characterized by comprising parsing a second information from a bitstream that indicates the prediction direction of the BDPCM for the current block.
3. The image decoding method according to claim 1, characterized in that the prediction direction of the BDPCM for the current block includes the horizontal or vertical direction.
4. Determining the intra-prediction mode of the current block based on the prediction direction of the BDPCM for the current block is: When the prediction direction of the BDPCM is horizontal, the intra-prediction mode of the current block is determined to be the horizontal mode. When the prediction direction of the BDPCM is vertical, the intra-prediction mode of the current block is determined to be the vertical mode. The image decoding method according to claim 1, characterized by including the following.
5. The aforementioned image decoding method is The image decoding method according to claim 1, further comprising determining an intra-prediction mode for the current block based on prediction information for the current block signaled via a bitstream, if the BDPCM is not applied to the current block.
6. An image encoding method performed by an image encoding device, Currently, the question is whether BDPCM (block difference pulse code modulation) is applied to the block, When the BDPCM is applied to the current block, the prediction direction of the BDPCM for the current block is determined, Based on the prediction direction of the BDPCM for the current block, the intra-prediction mode of the current block is determined, The prediction block of the current block is generated by performing intra-prediction based on the intra-prediction mode of the current block, Based on the predicted block, generate the current block's residual block, Based on the prediction direction of the BDPCM, the current block's residual block is encoded, Includes, The aforementioned image encoding method is An image encoding method characterized by further comprising encoding first information that indicates only that the BDPCM is applied to the chroma component of the current block.
7. The image coding method according to claim 6, further comprising encoding second information indicating the prediction direction of the BDPCM for the current block.
8. The image coding method according to claim 6, characterized in that the prediction direction of the BDPCM for the current block includes the horizontal or vertical direction.
9. Determining the intra-prediction mode of the current block based on the prediction direction of the BDPCM for the current block is: When the prediction direction of the BDPCM is horizontal, the intra-prediction mode of the current block is determined to be the horizontal mode. When the prediction direction of the BDPCM is vertical, the intra-prediction mode of the current block is determined to be the vertical mode. The image coding method according to claim 6, which includes the following:
10. An image decoding device, Includes memory and at least one processor, The at least one processor is Currently, we determine whether BDPCM (block difference pulse code modulation) is applied to the block. When the BDPCM is applied to the current block, the prediction direction of the BDPCM for the current block is determined. Based on the prediction direction of the BDPCM for the current block, the intra-prediction mode of the current block is determined. Based on the predicted direction of the BDPCM, a residual block of the current block is generated. A prediction block for the current block is generated by performing an intra-prediction based on the intra-prediction mode of the current block. The current block is reconstructed based on the residual block and the predicted block. The at least one processor determines whether the BDPCM is applied to the current block. An image decoding apparatus characterized by including parsing from a bitstream first information that indicates only that the BDPCM should be applied to the chroma component of the current block.
11. The at least one processor determines the prediction direction of the BDPCM for the current block. The image decoding apparatus according to claim 10, characterized in that it includes parsing from a bitstream second information indicating the prediction direction of the BDPCM for the current block.
12. The image decoding apparatus according to claim 10, characterized in that the prediction direction of the BDPCM for the current block includes the horizontal or vertical direction.
13. The at least one processor determines the intra-prediction mode of the current block based on the prediction direction of the BDPCM for the current block, If the prediction direction of the BDPCM is horizontal, the intra-prediction mode of the current block is determined to be the horizontal mode. If the prediction direction of the BDPCM is vertical, the intra-prediction mode of the current block is determined to be the vertical mode. The image decoding apparatus according to claim 10, characterized by including the following.
14. The image decoding apparatus according to claim 10, further comprising the at least one processor, which determines the intra-prediction mode of the current block based on prediction information of the current block signaled via a bitstream when the BDPCM is not applied to the current block.
15. An image encoding device, Includes memory and at least one processor, The at least one processor is Currently, we determine whether BDPCM (block difference pulse code modulation) is applied to the block. When the BDPCM is applied to the current block, the prediction direction of the BDPCM for the current block is determined. Based on the prediction direction of the BDPCM for the current block, the intra-prediction mode of the current block is determined. A prediction block for the current block is generated by performing an intra-prediction based on the intra-prediction mode of the current block. Based on the predicted block, generate the current block's residual block, Based on the predicted direction of the BDPCM, the current block's residual block is encoded. The image encoding device is characterized in that at least one processor further encodes first information indicating only that the BDPCM is applied to the chroma component of the current block.
16. The image encoding apparatus according to claim 15, further comprising the at least one processor encoding a second information indicating the prediction direction of the BDPCM for the current block.
17. The image coding apparatus according to claim 15, characterized in that the prediction direction of the BDPCM for the current block includes the horizontal or vertical direction.
18. The at least one processor determines the intra-prediction mode of the current block based on the prediction direction of the BDPCM for the current block. If the prediction direction of the BDPCM is horizontal, the intra-prediction mode of the current block is determined to be the horizontal mode. If the prediction direction of the BDPCM is vertical, the intra-prediction mode of the current block is determined to be the vertical mode. The image encoding apparatus according to claim 15, characterized by including the following.
19. A method for transmitting a bitstream, A bitstream is generated by performing the image encoding method described in claim 6, The transmission of the aforementioned bitstream, A method for transmitting a bitstream that includes [a specific element].
20. A computer-readable storage medium, The computer-readable storage medium stores a computer program and a bitstream, and when the computer program is executed by a processor, the steps of the image encoding method described in claim 6 are realized to generate a bitstream. A computer-readable storage medium characterized by the following features.