Image encoding / decoding method and device using bdpcm, and method for transmitting bitstream
The image encoding/decoding method using BDPCM addresses the high cost of high-resolution image transmission by determining prediction direction based on intra prediction mode or block size, enhancing encoding/decoding efficiency and reducing costs.
Patent Information
- Application Number
- JP2025134159
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-05-14
- Filing Date
- 2025-08-12
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2040-04-17
AI Technical Summary
The increasing demand for high-resolution, high-quality images leads to a significant increase in transmission and storage costs due to the higher amount of information required, necessitating highly efficient image compression techniques.
An image encoding/decoding method and apparatus using BDPCM (Block Difference Pulse Code Modulation) that determines the prediction direction based on intra prediction mode or block size, efficiently encoding residual signals, and transmitting bitstreams for improved encoding/decoding efficiency.
The method provides improved encoding/decoding efficiency, efficient signaling of BDPCM-related information, and effective encoding of residual signals, reducing transmission and storage costs while maintaining image quality.
Smart Images

Figure 2025163257000001_ABST
Abstract
Description
[Technical Field]
[0001] The present 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 the present disclosure. [Background technology]
[0002] Recently, demand for high-resolution, high-quality images, such as HD (High Definition) images and UHD (Ultra High Definition) images, has been increasing in various fields. As image data becomes higher in resolution and quality, the amount of information or bits to be transmitted increases relatively compared to conventional image data. The increase in the amount of information or bits to be transmitted results in an increase in transmission costs and storage costs.
[0003] This requires highly efficient image compression techniques for effectively transmitting, storing, and reproducing high-resolution, high-quality image information. Summary of the Invention [Problem to be solved by the invention]
[0004] An object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0005] Another object of the present disclosure is to provide a method and apparatus for encoding / decoding an image using BDPCM.
[0006] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus that efficiently signal BDPCM-related information.
[0007] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus that derives the prediction direction of BDPCM based on the intra prediction mode or block size, and then performs BDPCM.
[0008] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus for efficiently encoding the residual signal of a block to which BDPCM is applied.
[0009] Another object of the present disclosure is to provide a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.
[0010] Another object of the present disclosure is to provide a recording medium storing a bitstream generated by the image encoding method or apparatus according to the present disclosure.
[0011] Another object of the present disclosure is to provide a recording medium storing a bitstream that is received by an image decoding device according to the present disclosure, decoded, and used to restore an image.
[0012] The technical problems to be solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described above will be clearly understood by a person having ordinary skill in the technical field to which the present disclosure pertains from the following description. [Means for solving the problem]
[0013] An image decoding method according to one aspect of the present disclosure is an image decoding method performed by an image decoding device, and may include the steps of: parsing first information from a bitstream indicating whether BDPCM (block difference pulse code modulation) is applied to an intra-predicted current block; if the first information indicates that BDPCM is applied to the current block, determining a prediction direction of BDPCM for the current block and generating a residual block of the current block based on the determined prediction direction of BDPCM; generating a predicted block of the current block by performing intra prediction based on the intra prediction mode of the current block; and reconstructing the current 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 if a non-zero residual signal is present in the current block, and if a non-zero residual signal is not present in the current block, parsing of the first information is skipped and it can be determined that BDPCM is not applied to the current block.
[0015] In the image decoding method according to the present disclosure, whether or not a non-zero residual signal exists in the current 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 the 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 the BDPCM and the prediction direction of the intra prediction mode may be the same.
[0018] In the image decoding method according to the present disclosure, the prediction direction of the BDPCM can be determined based on the intra prediction mode.
[0019] In the image decoding method according to the present disclosure, if the prediction direction of the intra prediction mode is vertical, the prediction direction of the BDPCM is determined vertically; if the prediction direction of the intra prediction mode is horizontal, the prediction direction of the BDPCM is determined horizontally; and if the intra prediction mode is a non-directional mode, the prediction direction of the BDPCM can be determined in a predetermined direction.
[0020] In the image decoding method according to the present 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 the present disclosure, the prediction direction of the BDPCM may be determined based on the size of the current block.
[0022] In the image decoding method according to the present 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 horizontally, and if H is greater than W, the prediction direction of the BDPCM can be determined vertically.
[0023] In the image decoding method according to the present 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 device according to another aspect of the present disclosure includes a memory and at least one processor, wherein the at least one processor parses first information from a bitstream indicating whether BDPCM is applied to an intra-predicted current block, and if the first information indicates that BDPCM is applied to the current block, determines a prediction direction of BDPCM for the current block, generates a residual block of the current block based on the determined prediction direction of BDPCM, generates a predicted block of the current block by performing intra prediction based on the intra-prediction mode of the current block, and reconstructs 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; if BDPCM is applied to the current block, determining a prediction direction of BDPCM for the current block; generating a prediction block of the current block by performing intra prediction based on an intra prediction mode of the current block; generating a residual block of the current block based on the prediction block; encoding the residual block of the current block based on the determined prediction direction of BDPCM; and encoding first information indicating whether BDPCM is applied to the current block.
[0026] In the image encoding method according to the present disclosure, the prediction direction of the BDPCM and the prediction direction of the intra prediction mode may be the same.
[0027] A transmission method according to another aspect of the present disclosure can transmit a bitstream generated by the 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 the image encoding method or image encoding device of the present disclosure.
[0029] The features described above in this brief summary of the present disclosure are merely exemplary aspects of the detailed description of the present disclosure that follows and are not intended to limit the scope of the present disclosure. [Effects of the Invention]
[0030] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.
[0031] Furthermore, according to the present disclosure, a method and apparatus for encoding / decoding an image using BDPCM can be provided.
[0032] Furthermore, the present disclosure can provide an image encoding / decoding method and apparatus that efficiently signal BDPCM-related information.
[0033] Furthermore, according to the present disclosure, an image encoding / decoding method and apparatus can be provided that derives a prediction direction of BDPCM based on an intra prediction mode or a block size, and then performs BDPCM.
[0034] Furthermore, the present disclosure can provide an image encoding / decoding method and apparatus for efficiently encoding a residual signal of a block to which BDPCM is applied.
[0035] The present disclosure also provides a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.
[0036] Furthermore, according to the present disclosure, a recording medium storing a bitstream generated by the image encoding method or apparatus according to the present disclosure can be provided.
[0037] Furthermore, according to the present disclosure, it is possible to provide a recording medium that stores a bitstream that is received by the image decoding device according to the present disclosure, decoded, and used to restore an image.
[0038] The effects obtained by the present disclosure are not limited to the effects described above, and other effects not described above will be clearly understood by those having ordinary skill in the art to which the present disclosure pertains from the following description. [Brief explanation of the drawings]
[0039] [Figure 1] 1 is a diagram illustrating a video coding system to which embodiments of the present disclosure can be applied; [Figure 2] 1 is a diagram schematically illustrating an image encoding device to which an embodiment of the present disclosure can be applied. [Figure 3] FIG. 1 is a diagram schematically illustrating an image decoding device to which an embodiment of the present disclosure can be applied. [Figure 4] 1 is a schematic flowchart of an image decoding procedure to which an embodiment of the present disclosure can be applied; [Figure 5] 1 is a schematic flowchart of an image encoding procedure to which the disclosed embodiments can be applied. [Figure 6] 1 is a flowchart illustrating an intra-prediction based video / image coding method. [Figure 7] 10 is a diagram illustrating an example configuration of an intra prediction unit 185 according to the present disclosure. FIG. [Figure 8] 1 is a flowchart illustrating an intra-prediction based video / image decoding method. [Figure 9] FIG. 10 is a diagram illustrating an example configuration of an intra prediction unit 265 according to the present disclosure. [Figure 10] FIG. 10 is a diagram illustrating intra-prediction directions according to one embodiment of the present disclosure. [Figure 11] FIG. 10 is a diagram illustrating intra-prediction directions according to another embodiment of the present disclosure. [Figure 12] FIG. 1 is a diagram illustrating a method for encoding residual samples of BDPCM according to the present disclosure. [Figure 13] FIG. 10 is a diagram showing a modified quantized residual block generated by performing BDPCM according to the present disclosure. [Figure 14] 10 is a flowchart showing a procedure for encoding a current block by applying BDPCM in an image encoding device. [Figure 15] 10 is a flowchart showing a procedure for reconstructing a current block by applying BDPCM in an image decoding device. [Figure 16] 10 is a diagram illustrating information about BDPCM included in the syntax structure of the current block. [Figure 17] 1 is a flowchart illustrating a method for encoding / decoding BDPCM-related information according to an embodiment of the present disclosure. [Figure 18] 10 is a flowchart illustrating a method for deriving a prediction direction of BDPCM based on an intra-prediction direction of a current block according to another embodiment of the present disclosure. [Figure 19] 10 is a flowchart illustrating a method for deriving an intra prediction mode of a current block based on a prediction direction of BDPCM according to another embodiment of the present disclosure. [Figure 20] 10 is a flowchart illustrating a method for deriving a prediction direction of BDPCM based on the size of a current block according to another embodiment of the present disclosure. [Figure 21] FIG. 1 is a diagram illustrating a CABAC entropy coding method. [Figure 22] FIG. 10 is a diagram illustrating a template for a block to which BDPCM is applied according to an embodiment of the present disclosure. [Figure 23] FIG. 10 is a diagram illustrating a template for a block to which BDPCM is applied according to an embodiment of the present disclosure. [Figure 24] 10 is a flowchart illustrating a method for defining a template and deriving a context model or Rice parameters in consideration of a prediction direction of BDPCM according to the present disclosure. [Figure 25]FIG. 10 is a diagram illustrating a template for a block to which BDPCM is applied according to another embodiment of the present disclosure. [Figure 26] FIG. 10 is a diagram illustrating a template for a block to which BDPCM is applied according to another embodiment of the present disclosure. [Figure 27] 10 is a flowchart illustrating a method for defining a template and deriving a context model or Rice parameters by taking into account a line of BDPCM according to the present disclosure. [Figure 28] FIG. 10 is a diagram illustrating a template for a block to which BDPCM is applied according to another embodiment of the present disclosure. [Figure 29] FIG. 10 is a diagram illustrating a template for a block to which BDPCM is applied according to another embodiment of the present disclosure. [Figure 30] 10 is a flowchart illustrating a method for defining a template and deriving a context model or Rice parameters by considering whether a surrounding pixel is included in the first line of a BDPCM signal according to the present disclosure. [Figure 31] FIG. 10 is a diagram illustrating a template for a block to which BDPCM is applied according to another embodiment of the present disclosure. [Figure 32] FIG. 10 is a diagram illustrating a template for a block to which BDPCM is applied according to another embodiment of the present disclosure. [Figure 33] 10 is a flowchart illustrating a method for defining a template and deriving a context model or Rice parameters by considering a prediction direction of a BDPCM and whether a surrounding pixel is included in the first line of the BDPCM according to the present disclosure. [Figure 34] FIG. 1 illustrates a content streaming system to which an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION OF THE INVENTION
[0040] The present disclosure will be described in detail below with reference to the accompanying drawings, so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be embodied in various different forms and is not limited to the embodiments described herein.
[0041] In describing the embodiments of the present disclosure, if it is determined that a detailed description of a known configuration or function may obscure the gist of the present disclosure, the detailed description thereof will be omitted. In addition, in the drawings, parts that are not related to the description of the present disclosure will be omitted, and similar parts will be designated by similar reference numerals.
[0042] In this disclosure, when a component is referred to as being "coupled," "coupled," or "connected" to another component, this includes not only a direct connection, but also an indirect connection where another component exists between them. Furthermore, when a component is referred to as "including" or "having" another component, this does not exclude the other component, but means that the component may further include the other component, unless otherwise specified.
[0043] In this disclosure, terms such as "first" and "second" are used only to distinguish one component from another component, 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 referred to as a second component in another embodiment, and similarly, a second component in one embodiment may be referred to as a first component in another embodiment.
[0044] In this disclosure, components that are distinguished from one another are used to clearly describe the characteristics of each component and do not necessarily mean that the components are separate. In other words, multiple components may be integrated into a single hardware or software unit, or a single component may be distributed into multiple hardware or software units. Therefore, even if not otherwise specified, such integrated or distributed embodiments are also included within the scope of this disclosure.
[0045] In this disclosure, the components described in various embodiments are not necessarily essential components, and some may be optional components. Therefore, an embodiment consisting of a subset of the components described in one embodiment is also within the scope of this disclosure. Furthermore, an embodiment including other components in addition to the components described in various embodiments is also within the scope of this disclosure.
[0046] The present disclosure relates to image encoding and decoding, and terms used in this disclosure may have their ordinary meaning in the technical field to which the present disclosure belongs unless they are newly defined in this disclosure.
[0047] In this disclosure, a "picture" generally refers to a unit indicating any one image in a specific time period, and a slice / tile / subpicture is a coding unit constituting a part of a picture, and one picture can be composed of one or more slices / tiles / subpictures. Furthermore, a slice / tile / subpicture can include one or more coding tree units (CTUs).
[0048] In this disclosure, "pixel" or "pel" may refer to the smallest unit constituting one picture (or image). Also, "sample" may be used as a term corresponding to pixel. A sample may generally indicate a pixel or a pixel value, may indicate only a pixel / pixel value of a luma component, or may indicate only a pixel / pixel value of a chroma component.
[0049] In this disclosure, the term "unit" may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to that region. The term "unit" may be used interchangeably with terms such as "sample array," "block," or "area," depending on the situation. In general, an M×N block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0050] In the present disclosure, the term "current block" may refer to any one of a "current coding block," a "current coding unit," a "block to be coded," a "block to be decoded," or a "block to be processed." When prediction is performed, the term "current block" may refer to a "current predicted block" or a "block to be predicted." When transform (inverse transform) / quantization (dequantization) is performed, the "current block" can refer to the "current transform block" or the "block to be transformed." When filtering is performed, the "current block" can refer to the "block to be filtered."
[0051] Furthermore, in this disclosure, "current block" may mean "luma block of the current block" unless explicitly stated as a chroma block. "Chroma block of the current block" may be expressed explicitly including the explicit description of a chroma block, such as "chroma block" or "current chroma block."
[0052] In the present disclosure, " / " and "," can be interpreted as "and / or." For example, "A / B" and "A, B" can be interpreted as "A and / or B." Also, "A / B / C" and "A, B, C" can mean "at least one of A, B, and / or C."
[0053] In this disclosure, "or" can be interpreted as "and / or." For example, "A or B" can mean 1) only "A," 2) only "B," or 3) "A and B." Alternatively, in this disclosure, "or" can mean "additionally or alternatively."
[0054] Video Coding System Overview
[0055] FIG. 1 is a diagram illustrating a 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 may transmit encoded video and / or image information or data to the decoding device 20 in a file or streaming format via a digital storage medium or a network.
[0057] An encoding device 10 according to an embodiment may include a video source generation unit 11, an encoding unit 12, and a transmission unit 13. A decoding device 20 according to an embodiment may include a reception unit 21, a decoding unit 22, and a rendering unit 23. The encoding unit 12 may be referred to as a video / image encoding unit, and the decoding unit 22 may be referred to as a video / image decoding unit. The transmission unit 13 may be included in the encoding unit 12. The reception unit 21 may be included in the decoding unit 22. The rendering unit 23 may include a display unit, which may be configured as a separate device or an external component.
[0058] The video source generation unit 11 can acquire video / images through a video / image capture, synthesis, or generation process. The video source generation unit 11 can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, virtual video / images can be generated via a computer, etc., in which case the video / image capture process can be replaced with a process in which related data is generated.
[0059] The encoder 12 may encode the input video / image. The encoder 12 may perform a series of steps such as prediction, transformation, and quantization for compression and coding efficiency. The encoder 12 may output the encoded data (encoded video / image information) in a bitstream format.
[0060] The transmitter 13 may transmit the encoded video / image information or data output in a bitstream format to the receiver 21 of the decoding device 20 in a file or streaming format via a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. The transmitter 13 may include elements for generating a media file in a predetermined file format and elements for transmitting via a broadcasting / communication network. The receiver 21 may extract / receive the bitstream from the storage medium or network and transmit it to the decoder 22.
[0061] The decoding unit 22 can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding unit 12.
[0062] The rendering unit 23 can render the decoded video / images. The rendered video / image can be displayed via a display unit.
[0063] Overview of the image encoding device
[0064] FIG. 2 is a diagram schematically illustrating an image encoding device to which an embodiment of the present disclosure can be applied.
[0065] 2, the image encoding device 100 may include an image division unit 110, a subtraction unit 115, a transform unit 120, a quantization unit 130, an inverse quantization unit 140, an inverse transform 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 encoding unit 190. The inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a "prediction unit." The transform unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transform unit 150 may be included in a residual processing unit. The residual processing unit may further include a subtraction unit 115.
[0066] Depending on the embodiment, all or at least some of the components constituting the image encoding device 100 may be realized by a single hardware component (e.g., an encoder or a processor). Also, the memory 170 may include a decoded picture buffer (DPB) and may be realized by a digital storage medium.
[0067] The image division unit 110 may divide an input image (or picture, frame) input to the image encoding device 100 into one or more processing units. As an example, the processing units may be called coding units (CUs). The coding units may be obtained by recursively dividing a coding tree unit (CTU) or a largest coding unit (LCU) using a QT / BT / TT (quad-tree / binary-tree / ternary-tree) structure. For example, one coding unit may be divided into multiple coding units at deeper depths based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. To divide the coding units, the quad-tree structure may be applied first, and then the binary-tree structure and / or the ternary-tree structure may be applied later. The coding procedure according to the present disclosure may be performed based on the final coding unit that is not further divided. The maximum coding unit may be used as the final coding unit, or a lower-depth coding unit obtained by dividing the maximum coding unit may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or reconstruction, which will be described later. As another example, a processing unit of the coding procedure may be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit, respectively. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0068] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on a current block (current block) to generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block or CU. The prediction unit may generate various information related to prediction of the current block and transmit it to the entropy coding unit 190. The prediction information may be coded by the entropy coding unit 190 and output in a bitstream format.
[0069] The intra prediction unit 185 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away from the current block according to the intra prediction mode and / or intra prediction technique. The intra prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, DC mode and Planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the degree of precision of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the settings. The intra prediction unit 185 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.
[0070] The inter prediction unit 180 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation between the motion information of neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on the inter prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter predictor 180 may construct a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to derive a motion vector and / or a reference picture index for the current block. Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter predictor 180 may use motion information of neighboring blocks as motion information for the current block. In the case of skip mode, unlike in merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, the motion vector of a neighboring block is used as a motion vector predictor, and the motion vector of the current block can be signaled by encoding a motion vector difference and an indicator for the motion vector predictor. The motion vector difference may mean the difference between the motion vector of the current block and the motion vector predictor.
[0071] The predictor may generate a prediction signal based on various prediction methods and / or prediction techniques, which will be described later. For example, the predictor may apply intra prediction or inter prediction to predict the current block, or may simultaneously apply intra prediction and inter prediction. A prediction method that simultaneously applies intra prediction and inter prediction to predict the current block may be referred to as combined inter and intra prediction (CIIP). The predictor may also perform intra block copy (IBC) to predict the current block. Intra block copy can be used for content image / video coding, such as screen content coding (SCC), for games. IBC is a method of predicting a current block using an already reconstructed reference block in a current picture that is located a predetermined distance away from the current block. When IBC is applied, the position of the reference block in the current picture may be coded as a vector (block vector) corresponding to the predetermined distance. IBC is essentially performed within the current picture, but may be similar to inter prediction in that a reference block is derived within the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this disclosure.
[0072] The prediction signal generated by the prediction unit may be used to generate a restored signal or a residual signal. The subtraction unit 115 may subtract the prediction signal (predicted block, predicted sample array) output from the prediction unit from the input image signal (original block, original sample array) to generate a residual signal (residual signal, residual block, residual sample array). The generated residual signal may be transmitted to the conversion unit 120.
[0073] The transform unit 120 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph representing inter-pixel relationship information. The CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size, or may be applied to non-square blocks of variable size.
[0074] The quantization unit 130 may quantize the transform coefficients and transmit the quantized transform coefficients to the entropy coding unit 190. The entropy coding unit 190 may encode the quantized signal (information about the quantized transform coefficients) and output the encoded signal in a bitstream format. The information about the quantized transform coefficients may be referred to as residual information. The quantization unit 130 may rearrange the quantized transform coefficients in a block format into a one-dimensional vector format based on a coefficient scan order, and may generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector format.
[0075] The entropy coding unit 190 may perform various coding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy coding unit 190 may also code information required for video / image reconstruction (e.g., values of syntax elements) together with or separately from the quantized transform coefficients. The coded information (e.g., coded video / image information) may be transmitted or stored in a bitstream format in network abstraction layer (NAL) unit units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may also include general constraint information. The signaling information, transmitted information and / or syntax elements mentioned in this disclosure may be encoded through the above-described encoding procedure and included in the bitstream.
[0076] The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) that transmits and / or a storing unit (not shown) that stores the signal output from the entropy encoding unit 190 may be provided as an internal / external element of the image encoding device 100, or the transmitting unit may be provided as a component of the entropy encoding unit 190.
[0077] The quantized transform coefficients output from the quantization unit 130 can be used to generate a residual signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantization unit 140 and the inverse transform unit 150.
[0078] The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit 180 or the intra prediction unit 185. When there is no residual for the current block to be processed, such as when a skip mode is applied, the predicted block may be used as the reconstructed block. The adder 155 may be referred to as a reconstruction unit or a reconstructed block generation unit. The generated reconstructed signal may be used for intra prediction of the next current block to be processed in the current picture, and may also be used for inter prediction of the next picture after filtering, as will be described later.
[0079] The filtering unit 160 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture and store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 160 may generate various information related to filtering and transmit it to the entropy coding unit 190, as will be described later in connection with each filtering method. The filtering information may be coded by the entropy coding unit 190 and output in a bitstream format.
[0080] The modified reconstructed picture transmitted to the memory 170 can be used as a reference picture in the inter prediction unit 180. When inter prediction is applied through this, the image encoding device 100 can avoid a prediction mismatch between the image encoding device 100 and the image decoding device, and can also improve encoding efficiency.
[0081] The DPB in the memory 170 may store modified reconstructed pictures for use as reference pictures in the inter predictor 180. The memory 170 may store motion information of blocks from which motion information in the current picture is derived (or coded) and / or motion information of already reconstructed intra-picture blocks. The stored motion information may be transmitted to the inter predictor 180 to be used as motion information of spatially surrounding blocks or temporally surrounding blocks. The memory 170 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 185.
[0082] Overview of the image decoding device
[0083] FIG. 3 is a diagram schematically illustrating an image decoding device to which an embodiment of the present disclosure can be applied.
[0084] 3, the image decoding apparatus 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an adder 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 may be collectively referred to as a "prediction unit." The inverse quantization unit 220 and the inverse transform unit 230 may be included in a residual processing unit.
[0085] Depending on the embodiment, all or at least some of the components constituting the image decoding device 200 may be realized by a single hardware component (e.g., a decoder or a processor). Also, the memory 170 may include a DPB and may be realized by a digital storage medium.
[0086] The image decoding device 200, which receives a bitstream including video / image information, can reconstruct an image by performing a process corresponding to the process performed by the image encoding device 100 of FIG. 2. For example, the image decoding device 200 can perform decoding using a 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 can be obtained by dividing a maximum coding unit. The reconstructed image signal decoded and output by the image decoding device 200 can be reproduced by a reproduction device (not shown).
[0087] The image decoding apparatus 200 may receive a signal output from the image encoding apparatus of FIG. 2 in a bitstream format. The received signal may be decoded via an entropy decoding unit 210. For example, the entropy decoding unit 210 may parse the bitstream to derive information (e.g., video / image information) necessary for image reconstruction (or picture reconstruction). The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may also include general constraint information. The image decoding apparatus may further use the information on the parameter sets and / or the general constraint information to decode an image. The signaling information, received information, and / or syntax elements referred to in the present disclosure may be obtained from the bitstream by being decoded via the decoding procedure. For example, the entropy decoding unit 210 may decode information in a bitstream based on a coding method such as Exponential-Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element from the bitstream, determines a context model using information on the syntax element to be decoded and decoding information on neighboring blocks and the block to be decoded, or information on symbols / bins decoded in a previous step, predicts the occurrence probability of the bins based on the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element. After determining the context model, the CABAC entropy decoding method may update the context model using information on the decoded symbol / bin for the context model of the next symbol / bin.Among the information decoded by the entropy decoding unit 210, information related to prediction is provided to a prediction unit (inter prediction unit 260 and intra prediction unit 265), and residual values entropy decoded by the entropy decoding unit 210, i.e., quantized transform coefficients and related parameter information, may be input to the inverse quantization unit 220. Also, among the information decoded by the entropy decoding unit 210, information related to filtering may be provided to the filtering unit 240. Meanwhile, a receiving unit (not shown) for receiving a signal output from the image encoding 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] Meanwhile, the image decoding apparatus according to the present disclosure may be referred to as a video / image / picture decoding apparatus. The image decoding apparatus may 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 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 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 220 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on the order of coefficient scanning performed in the image encoding device. The inverse quantization unit 220 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0090] The inverse transform unit 230 can inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0091] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information about the prediction output from the entropy decoding unit 210, and may determine a specific intra / inter prediction mode (prediction technique).
[0092] The prediction unit can generate a prediction signal based on various prediction methods (techniques) described below, as described in the description of the prediction unit of the image encoding device 100.
[0093] The intra predictor 265 may predict the current block by referring to samples in the current picture. The description of the intra predictor 185 may also be applied to the intra predictor 265.
[0094] The inter prediction unit 260 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on correlations between motion information of neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on an inter prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 260 may construct a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on received candidate selection information. Inter prediction may be performed based on various prediction modes (techniques), and the prediction information may include information indicating the inter prediction mode (technique) for the current block.
[0095] The adder 235 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 260 and / or the intra prediction unit 265). When there is no residual for the current block to be processed, such as when a skip mode is applied, the predicted block may be used as the reconstructed block. The description of the adder 155 may also be applied to the adder 235. The adder 235 may be referred to as a reconstruction unit or a reconstructed block generation unit. The generated reconstructed signal may be used for intra prediction of the next current block to be processed in the current picture, and may also be used for inter prediction of the next picture after undergoing filtering, as will be described later.
[0096] The filtering unit 240 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 240 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 250, specifically, in a DPB of the memory 250. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0097] The (modified) reconstructed picture stored in the DPB of the memory 250 can be used as a reference picture in the inter predictor 260. The memory 250 can store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information can be transmitted to the inter predictor 260 to be used as motion information of a spatially surrounding block or a temporally surrounding block. The memory 250 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 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 encoding device 100 can also be applied in a similar or 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 image decoding / encoding procedures
[0100] In image / video coding, pictures constituting an image / video may be coded / decoded based on a series of decoding orders. A picture order corresponding to an output order of decoded pictures may be set to be different from the decoding order, and based on this, not only forward prediction but also backward prediction may be performed during inter prediction.
[0101] FIG. 4 is a schematic flowchart of an image decoding procedure to which the embodiments of the present disclosure are applicable.
[0102] Each procedure shown in Fig. 4 may be performed by the image decoding apparatus of Fig. 3. Specifically, for example, step S410 may be performed by the entropy decoding unit 210 of the image decoding apparatus, step S420 may be performed by the prediction units 260 and 265, step S430 may be performed by the residual processing units 220 and 230, step S440 may be performed by the addition unit 235, and step S450 may be performed by the filtering unit 240. Step S410 may include an information decoding (parsing) procedure described in this disclosure, step S420 may include an inter / intra prediction procedure described in this disclosure, step S430 may include a residual processing procedure described in this disclosure, step S440 may include a block / picture reconstruction procedure described in this disclosure, and step S450 may include an in-loop filtering procedure described in this disclosure.
[0103] Referring to FIG. 4, the image decoding procedure may generally include a procedure (S410) for obtaining image / video information from a bitstream (through decoding), an image (picture) reconstruction procedure (S420-S440), and an in-loop filtering procedure (S450) for the reconstructed image (picture). The image reconstruction procedure may be performed based on prediction samples obtained through inter / intra prediction (S420) and residual samples obtained through residual processing (S430, inverse quantization and / or inverse transform of quantized transform coefficients). A modified reconstructed picture may be generated through an in-loop filtering procedure (S450) for the reconstructed picture generated through the image reconstruction procedure. The modified reconstructed picture may be output as a decoded picture or may be stored in a decoded picture buffer (DPB) 250 or a memory of the image decoding device and used as a reference picture in the inter prediction procedure during subsequent picture decoding. In some cases, the in-loop filtering procedure may be omitted. In this case, the reconstructed picture may be output as a decoded picture or stored in the decoded picture buffer 250 or a memory of the image decoding device and used as a reference picture in an inter-prediction procedure when decoding a picture thereafter. The in-loop filtering procedure (S450) may include a deblocking filtering procedure, a sample adaptive offset (SAO) procedure, an adaptive loop filter (ALF) procedure, and / or a bilateral filter (bi-lateral filter) procedure, as described above, and some or all of these procedures may be omitted. In addition, one or some of the deblocking filtering procedure, the sample adaptive offset (SAO) procedure, the adaptive loop filter (ALF) procedure, and the bilateral filter (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 reconstructed picture.Alternatively, the ALF procedure can be performed after a deblocking filtering procedure has been applied to the reconstructed picture, which can also be done in the image coding device.
[0104] FIG. 5 is a schematic flowchart of an image encoding procedure to which the embodiments of the present disclosure can be applied.
[0105] Each of the steps shown in FIG. 4 can be performed by the image encoding apparatus of FIG. Specifically, for example, step S510 may be performed in the prediction units 180 and 185 of the image encoding device, step S520 may be performed in the residual processing units 115, 120 and 130, and step S530 may be performed in the entropy encoding 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 encoding procedure described in this disclosure.
[0106] Referring to FIG. 5, the image encoding procedure may include not only a procedure of encoding information for picture reconstruction (e.g., prediction information, residual information, partitioning information, etc.) and outputting it in a bitstream format, but also a procedure of generating a reconstructed picture for a current picture and an optional procedure of applying in-loop filtering to the reconstructed picture. The image encoding apparatus may derive (modified) residual samples from transform coefficients quantized via the inverse quantization unit 140 and the inverse transform unit 150, and may generate a reconstructed picture based on the prediction samples output in step S510 and the (modified) residual samples. The reconstructed picture generated in this manner may be the same as the reconstructed picture generated by the image decoding apparatus described above. A modified reconstructed picture may be generated through an in-loop filtering procedure on the reconstructed picture, which may be stored in the decoded picture buffer (DPB) 170 or a memory and may be used as a reference picture in an inter-prediction procedure when encoding a subsequent picture, as in the image decoding apparatus. 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, (in-loop) filtering-related information (parameters) can be coded 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] Such an in-loop filtering procedure can reduce noises that occur during image / video coding, such as blocking artifacts and ringing artifacts, and improve subjective / objective visual quality. Also, by performing the in-loop filtering procedure in both the image encoding device and the image decoding device, the image encoding device and the image decoding device can derive the same prediction result, thereby improving the reliability of picture coding and reducing the amount of data that must be transmitted for picture coding.
[0108] As described above, an image (picture) reconstruction procedure may be performed not only in an image decoding apparatus but also in an image encoding apparatus. Reconstructed blocks may be generated based on intra prediction / inter prediction for each block, and a reconstructed picture including the reconstructed blocks may be generated. If a current picture / slice / tile group is an I picture / slice / tile group, blocks included in the current picture / slice / tile group may be reconstructed 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, blocks included in the current picture / slice / tile group may be reconstructed 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. Color components of a picture may include luma components and chroma components, and unless explicitly limited in this disclosure, methods and embodiments of the present disclosure may be applied to luma components and chroma components.
[0109] In-line forecast overview
[0110] Intra prediction according to the present disclosure will be described below.
[0111] Intra prediction may refer to prediction that generates a predicted sample for a current block based on a reference sample in a picture to which the current block belongs (hereinafter, the current picture). When intra prediction is applied to the current block, neighboring reference samples used for intra prediction of the current block may be derived. The neighboring reference samples of the current block may include a total of 2×nH samples adjacent to the left boundary and bottom-left of the current block, 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 neighboring reference samples of the current block may include multiple columns of top neighboring samples and multiple rows of left neighboring samples. The neighboring reference samples of the current block may also include a total of nH samples adjacent to the right boundary of the current block, 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 neighboring reference samples of the current block may not yet be decoded or may not be available. In this case, the decoder may substitute the unavailable samples as available samples to construct neighboring reference samples to be used for prediction, or may construct neighboring reference samples to be used for prediction through interpolation of available samples.
[0113] When neighboring reference samples are derived, (i) a predicted sample can be derived based on an average or interpolation of neighboring reference samples of the current block, or (ii) a predicted sample can be derived based on a reference sample that exists in a specific (prediction) direction with respect to the predicted sample among the neighboring reference samples of the current block. Case (i) can be called a non-directional mode or a non-angular mode, and case (ii) can be called a directional mode or an angular mode.
[0114] In addition, the prediction sample may be generated by interpolating a first neighboring sample located in a prediction direction of an intra prediction mode of the current block and a second neighboring sample located in the opposite direction based on a sample to be predicted of the current block among the neighboring reference samples. The above case may be called linear interpolation intra prediction (LIP).
[0115] Alternatively, a chroma prediction sample may be generated based on a luma sample using a linear model, which may be referred to as an LM (Linear Model) mode.
[0116] Alternatively, a temporal prediction sample of the current block may be derived based on filtered neighboring reference samples, and a prediction sample of the current block may be derived by weighting the temporal prediction sample and at least one reference sample derived according to the intra prediction mode from the conventional neighboring reference samples, i.e., unfiltered neighboring reference samples. In this case, it may be called Position Dependent Intra Prediction (PDPC).
[0117] In addition, a reference sample line with the highest prediction accuracy may be selected from among multiple reference sample lines surrounding the current block, and a predicted sample may be derived using a reference sample located in a prediction direction from the selected line. In this case, information about the used reference sample line (e.g., intra_luma_ref_idx) may be coded and signaled in a bitstream. In this case, this may be referred to as multi-reference line intra prediction (MRL) or MRL-based intra prediction. If MRL is not applied, a reference sample may 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] Alternatively, the current block may be divided into vertical or horizontal sub-partitions, and intra prediction may be performed for each sub-partition based on the same intra prediction mode. In this case, neighboring reference samples for intra prediction may be derived for each sub-partition. That is, reconstructed samples of a previous sub-partition in the encoding / decoding order may be used as neighboring reference samples for the current sub-partition. In this case, the intra prediction mode for the current block is applied to the sub-partitions in the same manner, but by deriving and using neighboring reference samples for each sub-partition, intra prediction performance may be improved in some cases. This prediction method may be called intra sub-partitions (ISP) or ISP-based intra prediction.
[0119] The above-mentioned intra prediction techniques may be distinguished from directional or non-directional intra prediction modes and referred to by various terms such as intra prediction types or additional intra prediction modes. For example, the intra prediction techniques (e.g., intra prediction types or additional intra prediction modes) may include at least one of the above-mentioned LIP, LM, PDPC, MRL, and ISP. A general intra prediction method other than the specific intra prediction types such as LIP, LM, PDPC, MRL, and ISP may be referred to as a normal intra prediction type. The normal intra prediction type may be generally applied when the above-mentioned specific intra prediction types are not applicable, and prediction may be performed based on the above-mentioned intra prediction modes. Meanwhile, post-processing filtering may 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 neighboring reference sample derivation step, and an intra prediction mode / type-based prediction sample derivation step. If necessary, a post-processing filtering step may be performed on the derived prediction samples.
[0121] FIG. 6 is a flow chart illustrating an intra-prediction based video / image coding method.
[0122] The encoding method of FIG. 6 may be performed by the image encoding device of FIG. 2. Specifically, step S610 may be performed by the intra prediction unit 185, and step S620 may be performed by the residual processing unit. Specifically, step S620 may be performed by the subtraction unit 115. Step S630 may be performed by the entropy encoding unit 190. The prediction information of step S630 may be derived by the intra prediction unit 185, and the residual information of step S630 may be derived by the residual processing unit. The residual information is information about the residual sample. The residual information may include information about quantized transform coefficients for the residual sample. As described above, the residual sample may be derived as transform coefficients via the transform unit 120 of the image encoding device, and the transform coefficients may be derived as quantized transform coefficients via the quantization unit 130. Information about the quantized transform coefficients can be coded in the entropy coding unit 190 through a residual coding procedure.
[0123] The image encoding apparatus may perform intra prediction on a current block (S610). The image encoding apparatus may determine an intra prediction mode / type for the current block, derive neighboring reference samples for the current block, and then generate predicted samples within the current block based on the intra prediction mode / type and the neighboring reference samples. Here, the steps of determining the intra prediction mode / type, deriving neighboring reference samples, and generating predicted samples may be performed simultaneously, or one step may be performed before the other steps.
[0124] FIG. 7 is a diagram illustrating an example of the configuration of the image prediction unit 185 according to the present disclosure.
[0125] As shown in FIG. 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 may determine the intra prediction mode / type for the current block. The reference sample derivation unit 187 may derive neighboring reference samples for the current block. The prediction sample derivation unit 188 may derive prediction samples for the current block. Meanwhile, although not shown, if a prediction sample filtering procedure (not shown) is performed, the intra prediction unit 185 may further include a prediction sample filter unit (not shown).
[0126] The image encoding apparatus may determine a mode / type to be applied to the current block from among a plurality of intra prediction modes / types, and may compare rate-distortion costs (RD costs) for the intra prediction modes / types to determine an optimal intra prediction mode / type for the current block.
[0127] Meanwhile, the image coding apparatus may also perform a prediction sample filtering procedure, which may be called post-filtering. The prediction sample filtering procedure may filter some or all of the prediction samples. In some cases, the prediction sample filtering procedure may be omitted.
[0128] 6, the image encoding apparatus may generate residual samples for the current block based on predicted samples or filtered predicted samples (S620). The image encoding apparatus may derive the residual samples by subtracting the predicted samples from original samples of the current block. That is, the image encoding apparatus may derive residual sample values by subtracting corresponding predicted sample values from original sample values.
[0129] The image encoding apparatus may encode image information including information related to the intra prediction (prediction information) and residual information related to the residual samples (S630). The prediction information may include the intra prediction mode information and / or the intra prediction technique information. The image encoding apparatus may output the encoded image information in a bitstream format. The output bitstream may be transmitted to an image decoding apparatus via a storage medium or a network.
[0130] The residual information may include a residual coding syntax, which will be described later. The image encoding apparatus may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information on the quantized transform coefficients.
[0131] Meanwhile, as described above, the image coding apparatus can generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the image coding apparatus can further inverse quantize / inverse transform the quantized transform coefficients to derive (modified) residual samples. The reason for performing inverse quantization / inverse transform again after transforming / quantizing the residual samples is to derive residual samples that are identical to the residual samples derived from the image decoding apparatus. The image coding apparatus can generate a reconstructed block including reconstructed samples for the current block based on the predicted samples and the (modified) residual samples. A reconstructed picture for the current picture can be generated based on the reconstructed block. As described above, an in-loop filtering procedure or the like can further be applied to the reconstructed picture.
[0132] FIG. 8 is a flowchart illustrating an intra-prediction based video / image decoding method.
[0133] The image decoding device can perform operations corresponding to those performed by the image coding device.
[0134] The decoding method of FIG. 8 may be performed by the image decoding apparatus of FIG. 3. Steps S810 to S830 may be performed by the intra prediction unit 265, and the prediction information of step S810 and the residual information of step S840 may be obtained from a bitstream by the entropy decoding unit 210. The residual processing unit of the image decoding apparatus may derive residual samples for the current block based on the residual information (S840). Specifically, the inverse quantization unit 220 of the residual processing unit may derive transform coefficients by performing inverse quantization on the quantized transform coefficients derived based on the residual information, and the inverse transform unit 230 of the residual processing unit may derive residual samples for the current block by performing inverse transform on the transform coefficients. Step S850 may be performed by the adder 235 or a reconstruction unit.
[0135] Specifically, the image decoding apparatus may derive an intra prediction mode / type for a current block based on received prediction information (intra prediction mode / type information) (S810). The image decoding apparatus may also derive neighboring reference samples for the current block (S820). The image decoding apparatus may generate prediction samples within the current block based on the intra prediction mode / type and the neighboring reference samples (S830). In this case, the image decoding apparatus may perform a prediction sample filtering procedure. The prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.
[0136] The image decoding apparatus may generate residual samples for the current block based on the received residual information (S840). The image decoding apparatus may generate reconstructed samples for the current block based on the predicted samples and the residual samples, and derive a reconstructed block including the reconstructed samples (S850). A reconstructed picture for the current picture may be generated based on the reconstructed block. As described above, an in-loop filtering procedure may be further applied to the reconstructed picture.
[0137] FIG. 9 is a diagram illustrating an example configuration of the intra prediction unit 265 according to the present disclosure.
[0138] As shown in FIG. 9, the intra prediction unit 265 of the image decoding apparatus 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 intra prediction mode / type information generated and signaled by the intra prediction mode / type determination unit 186 of the image encoding apparatus, and the reference sample derivation unit 266 may derive neighboring reference samples of the current block from a reconstructed reference region within the current picture. The prediction sample derivation unit 268 may derive prediction samples of the current block. Meanwhile, although not shown, if the above-described prediction sample filtering procedure 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 flag information (e.g., intra_luma_mpm_flag) indicating whether a most probable mode (MPM) or a remaining mode is applied to the current block. If the MPM is applied to the current block, the intra prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be configured as an MPM candidate list or an MPM list. If the MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). The image decoding apparatus may determine the intra prediction mode of the current block based on the intra prediction mode information. The MPM candidate modes may include intra prediction modes of neighboring blocks (eg, left and upper neighboring blocks) of the current block and additional candidate modes.
[0140] Also, the intra prediction technique information may be implemented in various forms. For example, the intra prediction technique information may include intra prediction technique index information indicating one of the intra prediction techniques. For another example, the intra prediction technique information may include at least one of reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and, if so, which reference sample line is used, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether the ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating a subpartition division type if the ISP is applied, flag information indicating whether PDPC is applied, or flag information indicating whether LIP is applied. In the present 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 may be encoded / decoded using a coding method described in the present disclosure. For example, the intra prediction mode information and / or the intra prediction technique information may be encoded / decoded using entropy coding (e.g., CABAC, CAVLC) based on a truncated (rice) binary code.
[0142] FIG. 10 is a diagram illustrating intra-prediction directions according to one embodiment of the present disclosure.
[0143] For example, the intra prediction modes may include two non-directional intra prediction modes and 33 directional intra prediction modes. The non-directional intra prediction modes may include a planar intra prediction mode and a DC intra prediction mode, and the directional intra prediction modes may include intra prediction modes 2 to 34. The planar intra prediction mode may be referred to as a planar mode, and the DC intra prediction mode may be referred to as a DC mode.
[0144] Alternatively, in order to capture any edge direction presented in a natural video, the intra prediction modes 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 a planar mode and a DC mode, and the directional intra prediction modes may include intra prediction modes 2 to 66. The extended intra prediction modes may be applied to blocks of all sizes and may be applied to both luma components (luma blocks) and chroma components (chroma blocks).
[0145] Alternatively, the intra prediction modes may include two non-directional intra prediction modes and 129 directional intra prediction modes. The non-directional intra prediction modes may include a planar mode and a DC mode, and the directional intra prediction modes may include intra prediction modes 2 to 130.
[0146] Meanwhile, the intra prediction modes may further include a cross-component linear model (CCLM) mode for chroma samples in addition to the above-described intra prediction modes. The CCLM modes may be classified into L_CCLM, T_CCLM, and LT_CCLM depending on whether the left sample, the top sample, or both are considered for deriving LM parameters, and may be applied only to chroma components.
[0147] The intra prediction modes can be indexed, for example, as shown in Table 1 below.
[0148] [Table 1]
[0149] FIG. 11 is a diagram illustrating intra-prediction directions according to another embodiment of the present disclosure. In FIG. 11, the dashed line direction indicates a wide-angle mode that is applied only to non-square blocks. As shown in FIG. 11, in order to capture any edge direction presented in natural video, intra-prediction modes according to one embodiment may include 93 directional intra-prediction modes along with two non-directional intra-prediction modes. The non-directional intra-prediction modes may include a planar mode and a DC mode. The directional intra-prediction modes may include intra-prediction modes numbered 2 to 80 and -1 to -14, as indicated by the arrows in FIG. 11. The planar mode may be denoted as INTRA_PLANAR, and the DC mode may be denoted as INTRA_DC. The directional intra-prediction modes may be denoted as INTRA_ANGULAR-14 to INTRA_ANGULAR-1 and INTRA_ANGULAR2 to INTRA_ANGULAR80.
[0150] Overview of BDPCM (Block Difference Pulse Code Modulation)
[0151] BDPCM according to the present disclosure can be performed in the quantized residual domain. The quantized residual domain can include a quantized residual signal (or quantized residual coefficients), and when applying BDPCM, the transform for the quantized residual signal is skipped. That is, when applying BDPCM, the transform is skipped for the residual samples, and quantization is applied. Alternatively, the quantized residual domain can include quantized transform coefficients.
[0152] When BDPCM is applied to a current block, a predicted block (prediction block) including predicted samples of the current block may be generated by intra prediction. In this case, the intra prediction mode for performing intra prediction may be signaled via a bitstream or may be induced based on the prediction direction of the BDPCM, which will be described later. In this case, the intra prediction mode may be determined as either a vertical prediction direction mode or a horizontal prediction direction mode. For example, if the prediction direction of the BDPCM is horizontal, the intra prediction mode may be determined as a horizontal prediction direction mode, and the predicted block of the current block may be generated by horizontal intra prediction. Alternatively, if the prediction direction of the BDPCM is vertical, the intra prediction mode may be determined as a vertical prediction direction mode, and the predicted block of the current block may be generated by vertical intra prediction. When horizontal intra prediction is applied, the value of a pixel adjacent to the left of the current block may be determined as the predicted sample value of a sample included in a corresponding row of the current block. When vertical intra prediction is applied, the value of the pixel adjacent to the upper side of the current block may be determined as the predicted sample value of the sample included in the corresponding column of the current block. When BDPCM is applied to the current block, the method of generating a predicted block of the current block may be performed in the same way in the image encoding device and the image decoding device.
[0153] When BDPCM is applied to a current block, the image encoding apparatus may generate a residual block including residual samples of the current block by subtracting the predictive block from the current block. The image encoding apparatus may quantize the residual block and then encode a difference (or delta) between the quantized residual samples and a predictor of the quantized residual samples. The image decoding apparatus may generate a quantized residual block of the current block by obtaining quantized residual samples of the current block based on the difference and predictor restored from the bitstream. Thereafter, the image decoding apparatus may restore the current block by dequantizing the quantized residual block and adding it to the predictive block.
[0154] FIG. 12 is a diagram for explaining a method for encoding residual samples of BDPCM according to the present disclosure.
[0155] The residual block in Figure 12 can be generated by subtracting the prediction block from the current block in an image coding apparatus. The quantized residual block in Figure 12 can be generated by quantizing the residual block. In Figure 12, r i、j indicates the value of the residual sample at the (i, j) coordinate in the current block. When the size of the current block is M × N, the value of i can be between 0 and M-1 inclusive. Also, the value of j can be between 0 and N-1 inclusive. For example, r i、j can be derived by subtracting the value of the predicted sample from the value of the original sample at the (i, j) coordinate in the current block. i、j) indicates the value of the quantized residual sample at the (i, j) coordinate in the current block. BDPCM prediction is performed on the quantized residual samples in FIG. 12 to generate an M×N modified quantized residual block containing the modified quantized residual samples.
[0156] When the prediction direction of BDPCM is horizontal, the value of the corrected quantized residual sample at the (i, j) coordinate in the current block (r' i、j ) can be calculated as in Equation 1.
[0157]
number
[0158] As shown in Equation 1, when the prediction direction of BDPCM is horizontal, r' at the (0, j) coordinate is 0、j The value of is the value of the quantized residual sample Q(r 0、j ) is assigned as is. r' of other (i, j) coordinates i、j The value of is the value of the quantized residual sample Q(r i、j ) and the quantized residual sample value Q(r i-1、j ) is derived from the difference value between the (i, j) coordinate and the quantized residual sample value Q(r i、j ), the value Q(r i-1、j ) as a predicted value, the difference value calculated is the corrected quantized residual sample value (r' i、j ) and then r' i、j Encode the value of
[0159] When the prediction direction of BDPCM is vertical, the value of the corrected quantized residual sample at the (i, j) coordinate in the current block (r' i、j) can be calculated as in Equation 2.
[0160]
number
[0161] As shown in Equation 2, when the prediction direction of BDPCM is vertical, r' at the (i, 0) coordinate is i、0 The value of is the value of the quantized residual sample Q(r i、0 ) is assigned as is. r' of other (i, j) coordinates i、j The value of is the value Q(r i、j ) and the quantized regular sample value Q(r i、j-1 ) is derived from the difference value between the (i, j) coordinate and the quantized residual sample value Q(r i、j ), the value Q(r i、j-1 ) as a predicted value, the difference value calculated is the corrected quantized residual sample value (r' i、j ) and then r' i、j Encode the value of
[0162] As described above, the process of modifying the current quantized residual sample value using the adjacent quantized residual sample value as a predicted value can be called BDPCM prediction.
[0163] Finally, the image coding apparatus can encode the modified quantized residual block including the modified quantized residual samples and transmit it to the image decoding apparatus, without performing any transformation on the modified quantized residual block, as described above.
[0164] FIG. 13 shows a modified quantized residual block generated by performing the BDPCM of this disclosure.
[0165] In Figure 13, Horizontal BDPCM indicates a modified quantized residual block generated based on Equation 1 when the prediction direction of BDPCM is horizontal, and Vertical BDPCM indicates a modified quantized residual block generated based on Equation 2 when the prediction direction of BDPCM is vertical.
[0166] FIG. 14 is a flowchart showing the procedure for encoding a current block using BDPCM in an image encoding device.
[0167] First, when a current block, which is a block to be coded, is input (S1410), prediction may be performed on the current block to generate a predicted block (S1420). The predicted block in step S1420 may be an intra-predicted block, and the intra-prediction mode may be determined as described above. A residual block of the current block may be generated based on the predicted block generated in step S1420 (S1430). For example, the image coding apparatus may generate a residual block (residual sample values) by subtracting the predicted block (predicted sample values) from the current block (original sample values). For example, the residual block of FIG. 12 may be generated by performing step S1430. Quantization is performed on the residual block generated in step S1430 (S1440), generating a quantized residual block. BDPCM prediction may be performed on the quantized residual block (S1450). The quantized residual block generated as a result of step S1440 may be the quantized residual block of Figure 12, and the BDPCM prediction result of step S1450 may generate a modified quantized residual block of Figure 13 along the prediction direction. The BDPCM prediction of step S1450 has been described with reference to Figures 12 and 13, so a detailed description thereof will be omitted. Thereafter, the image encoding apparatus may encode the modified quantized residual block (S1460) to generate a bitstream. At this time, the transform for the modified quantized residual block may be skipped.
[0168] The BDPCM operations in the image coding apparatus described with reference to FIGS. 12 to 14 can be performed in reverse in the image decoding apparatus.
[0169] FIG. 15 is a flowchart showing the procedure for reconstructing the current block by applying BDPCM in the image decoding device.
[0170] The image decoding apparatus may obtain information (image information) necessary for reconstructing a current block from a bitstream (S1510). The information necessary for reconstructing the current block may include information regarding prediction of the current block (prediction information), information regarding the residual of the current block (residual information), etc. The image decoding apparatus may generate a predicted block by performing prediction on the current block based on the information regarding the current block (S1520). The prediction of the current block may be intra prediction, and the details thereof are the same as those described with reference to FIG. 14. In FIG. 15, the step of generating a predicted block for the current block (S1520) is illustrated to be performed prior to steps S1530 to S1550 of generating a residual block of the current block. However, without being limited thereto, the predicted block of the current block may be generated after the residual block of the current block is generated. Alternatively, the residual block of the current block and the predicted block of the current block may be generated simultaneously. The image decoding apparatus may generate the residual block of the current block by parsing residual information of the current block from the bitstream (S1530). The residual block generated in step S1530 may be the modified quantized residual block shown in Figure 13. The image decoding apparatus can generate the quantized residual block of Figure 12 by performing BDPCM prediction on the modified quantized residual block of Figure 13 (S1540). The BDPCM prediction in step S1540 is a procedure for generating the quantized residual block of Figure 12 from the modified quantized residual block of Figure 13, and therefore corresponds to the inverse process of step S1450 performed in the image encoding apparatus.
[0171] The BDPCM prediction performed in step S1540 in the image decoding apparatus will be described in more detail below.
[0172] When the prediction direction of BDPCM is horizontal, the image decoding apparatus can generate a quantized residual block from the modified quantized residual block using Equation 3.
[0173]
number
[0174] As defined in Equation 3, the value Q(r i、j ) can be calculated by summing the values of the modified quantized residual samples from the (0, j) coordinate to the (i, j) coordinate.
[0175] Alternatively, the value Q(r) of the quantized residual sample at the (i, j) coordinate can be calculated by using Equation 4 instead of Equation 3. i、j ) can be calculated.
[0176]
number
[0177] Equation 4 is the inverse process of Equation 1. According to Equation 4, the value Q(r 0、j ) is the value r' of the corrected quantized residual sample at the (0, j) coordinate 0、j It is induced by Q(r i、j ) is the value r' of the corrected quantized residual sample at the (i, j) coordinate i、j and the quantized residual sample value Q(r i-1、j ) is derived by the sum of the quantized residual sample value Q(r i-1、j ) as the predicted value and the difference value r' i、j By summing the quantized residual sample values Q(r i、j ) can be derived.
[0178] When the prediction direction of BDPCM is the vertical direction, the image decoding apparatus can generate a quantized residual block from the modified quantized residual block using Equation 5.
[0179]
number
[0180] As defined in Equation 5, the value Q(r i、j ) can be calculated by summing the values of the modified quantized residual samples from the (i, 0) coordinate to the (i, j) coordinate.
[0181] Alternatively, using Equation 6 instead of Equation 5, the value Q(r i、j ) can be calculated.
[0182]
number
[0183] Equation 6 is the inverse process of Equation 2. According to Equation 6, the value Q(r i、0 ) is the value r' of the corrected quantized residual sample at the (i, 0) coordinate i、0 It is induced by Q(r i、j ) is the value r' of the corrected quantized residual sample at the (i, j) coordinate i、j and the quantized residual sample value Q(r i、j-1 ) is derived by the sum of the quantized residual sample value Q(r i、j-1 ) as the predicted value and the difference value r' i、j By summing the quantized residual sample values Q(r i、j ) can be derived.
[0184] When a quantized residual block composed of quantized residual samples is generated by performing step S1540 according to the above-described method, the image decoding apparatus can generate a residual block of the current block by performing inverse quantization on the quantized residual block (S1550). When BDPCM is applied, since the transform for the current block is skipped as described above, the inverse transform for the inverse quantized residual block can be skipped.
[0185] Thereafter, the image decoding apparatus may 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 apparatus may reconstruct the current block (values of reconstructed samples) by adding the predicted block (values of predicted samples) and the residual block (values of residual samples).
[0186] First information indicating whether BDPCM is applied to the current block may be signaled via a bitstream. If BDPCM is applied to the current block, second information indicating a prediction direction of the BDPCM may be signaled via the bitstream. If BDPCM is not applied to the current block, the second information may not be signaled.
[0187] FIG. 16 is a diagram illustrating information about BDPCM included in the syntax structure of the current block.
[0188] In the example shown in Figure 16, bdpcm_flag corresponds to first 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 be signaled only when the prediction mode of the current block is MODE_INTRA. Furthermore, BDPCM can only be used for luma component signals (cIdx==0) and only when the size of the current block is equal to or smaller than a predetermined size (32x32). However, the conditions under which BDPCM can be used are not limited to the above example, and BDPCM can be used for chroma component signals as well as luma component signals. Furthermore, information indicating whether BDPCM can be used at a higher level (such as a sequence level, picture level, or slice level) of the current block can be explicitly signaled.
[0189] Only when bdpcm_flag indicates that BDPCM is applied to the current block, second information (e.g., bdpcm_dir_flag) indicating the prediction direction of BDPCM can be signaled. When the second information is a first value (e.g., 0), the prediction direction of BDPCM can be horizontal, and when the second information is a second value (e.g., 1), the prediction direction of BDPCM can be vertical.
[0190] In signal processing, transform coding refers to converting an input signal into a signal in another domain. Specifically, in the field of video compression, transforming refers to converting a signal in the spatial domain into a signal in the frequency domain. The reason for transforming in video compression is that when a signal in the spatial domain is converted into a signal in the frequency domain, information is concentrated in the low-frequency region and almost no information is present in the high-frequency region, allowing for efficient compression. However, depending on the signal characteristics, there are cases where compression efficiency is higher without transforming, and in such cases, transforming can be skipped.
[0191] As described above, BDPCM can be applied in the process of encoding a residual block in which a transform is skipped. When a transform is skipped, residual information can be evenly distributed within the block, as described above. In addition, the value of any residual coefficient within the block is highly likely to be similar to the values of its surrounding residual coefficients. Furthermore, in the case of an intra-predicted transform skip block, the level of the residual coefficients occurring on the lower right side of the block is likely to be higher than the level of the residual coefficients occurring on the upper left side due to the distance from the reference sample. This phenomenon becomes more pronounced as the block size increases. BDPCM utilizes the distribution characteristics of residual coefficients of an intra-skip coded block as described above. When BDPCM is applied, instead of encoding the (quantized) residual coefficients as described above, the difference values generated by predicting the residual coefficients on a line-by-line basis are encoded, thereby reducing the level of the residual coefficients to be encoded. That is, when BDPCM is applied, the reduced coefficient levels are encoded as described above, thereby reducing the generation of context coded bins required for encoding. This can contribute to improving the decoder throughput.
[0192] Meanwhile, as described above, when BDPCM is performed in the quantized residual domain, BDPCM cannot be performed without a residual signal. However, the syntax structure of the coding unit described with reference to Figure 16 has a problem in that BDPCM-related information is signaled even when a residual signal does not exist.
[0193] FIG. 17 is a flowchart illustrating a method for encoding / decoding BDPCM-related information according to an embodiment of the present disclosure.
[0194] According to the embodiment disclosed in Figure 17, it is possible to restrict encoding / decoding of BDPCM-related information to only when a residual signal exists in the current block. Information indicating whether a residual signal exists for 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 the information.
[0195] 17, first, it is determined whether the current block is an intra-predicted block (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 intra-predicted, it may be determined whether a residual signal exists in the current block (S1720). The determination in step S1720 may be made based on, for example, CBF information. For example, step S1720 may be made by checking CBF information (tu_cbf_luma) for a transform unit, which is a unit for transmitting the residual signal of the current block. If tu_cbf_luma is 1, this may indicate that a non-zero residual coefficient exists for the luma component of the current transform unit, and if tu_cbf_luma is 0, this may indicate that a non-zero residual coefficient does not exist for the luma component of the current transform unit. If it is determined in step S1720 that a residual signal does not exist in the current block, BDPCM-related information for the current block may not be coded / decoded.
[0197] If it is determined in step S1720 that a residual signal exists in the current block, information indicating whether BDPCM is applied to the current block (e.g., bdpcm_flag) may be coded / decoded (S1730). The image coding apparatus may determine and code the value of bdpcm_flag based on whether BDPCM is applied to the current block. After parsing bdpcm_flag, the image decoding apparatus may determine whether BDPCM is applied to the current block based on the value.
[0198] Thereafter, it may be determined whether BDPCM is applied to the current block (S1740). For example, the determination in step S1740 may 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, information regarding the prediction direction of BDPCM for the current block may not be encoded / decoded.
[0199] If it is determined in step S1740 that BDPCM is applied to the current block, information regarding the prediction direction of the BDPCM (e.g., bdpcm_dir_flag) may be coded / decoded (S1750). The image coding apparatus may determine and code the value of bdpcm_dir_flag based on the prediction direction of the BDPCM applied to the current block. The image decoding apparatus may parse bdpcm_dir_flag and then determine the prediction direction of the BDPCM based on the value.
[0200] According to the embodiment shown in FIG. 17, coding efficiency can be improved by encoding / decoding BDPCM-related information only when a quantized residual signal exists in the current intra-predicted block.
[0201] In the embodiment shown in Figure 17, the encoding / decoding conditions for BDPCM-related information are determined based on whether intra prediction is used and whether a residual signal is present. However, the encoding / decoding conditions for BDPCM-related information are not limited to these, and the various conditions for whether BDPCM is available (such as color components, block size, and information signaled at a higher level) can also be used to determine the encoding / decoding conditions for BDPCM-related information.
[0202] The embodiment shown in Fig. 17 targets the luma component, but is not limited thereto, and can also be applied when the BDPCM of the present disclosure is applied to the chroma components as well. That is, the embodiment described with reference to Fig. 17 can be applied to each of the chroma components (Cb, Cr).
[0203] Alternatively, when the BDPCM of the present disclosure is applied to an RGB image, the embodiment described with reference to FIG. 17 can be applied to each of the R, G, and B components.
[0204] Alternatively, when the BDPCM of the present disclosure is applied to a YCoCg image, the embodiment described with reference to FIG. 17 can be applied to each of the Y, Co, and Cg components.
[0205] 18 is a flowchart illustrating a method for deriving a prediction direction of a BDPCM based on an intra-prediction direction of a current block according to another embodiment of the present disclosure. Steps S1810 to S1830 of FIG. 18 may replace steps S1740 to S1750 of FIG. 17.
[0206] According to the embodiment 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 BDPCM is applied to the current block (S1810), and if BDPCM is not applied, the process of deriving the prediction direction of BDPCM may not be performed.
[0208] If it is determined in step S1810 that BDPCM is applied to the current block, the intra prediction mode of the current block is determined (S1820), and the prediction direction of the BDPCM can be derived based on the intra prediction mode of the current block (S1830).
[0209] For example, if the intra prediction mode of the current block is a vertical mode, the prediction direction of the BDPCM may be derived vertically. Conversely, if the intra prediction mode of the current block is a horizontal mode, the prediction direction of the BDPCM may be derived horizontally. If the intra prediction mode of the current block is a non-directional mode, the prediction direction of the BDPCM may be derived in a direction already agreed upon between the image encoding device and the image decoding device, either horizontally or vertically. Alternatively, if the intra prediction mode of the current block is a non-directional mode, the prediction direction of the BDPCM may be determined based on information signaled at a higher level of the block (such as a sequence level, picture level, or slice level). Alternatively, in the example described with reference to FIG. 10, if the intra prediction mode of the current block is a mode having an absolute angle smaller than the 34th mode, the prediction direction of the BDPCM may be defined as horizontal; otherwise, the prediction direction of the BDPCM may be defined as vertical. Alternatively, if the intra prediction mode of the current block is a mode having an absolute angle equal to or less than the 34th mode, the prediction direction of the BDPCM may be defined as the horizontal direction; otherwise, the prediction direction of the BDPCM may be defined as the vertical direction.
[0210] As another example, if the intra prediction mode of the current block is a vertical mode, the prediction direction of the BDPCM may be derived horizontally. Conversely, if the intra prediction mode of the current block is a horizontal mode, the prediction direction of the BDPCM may be derived vertically. If the intra prediction mode of the current block is a non-directional mode, the prediction direction of the BDPCM may be derived from either the horizontal or vertical direction, whichever is previously agreed upon between the image encoding device and the image decoding device. Alternatively, if the intra prediction mode of the current block is a non-directional mode, the prediction direction of the BDPCM may be determined based on information signaled at a higher level of the block (such as a sequence level, picture level, or slice level). Alternatively, in the example described with reference to FIG. 10, if the intra prediction mode of the current block is a mode having an absolute angle smaller than the 34th mode, the prediction direction of the BDPCM may be defined as vertical; otherwise, the prediction direction of the BDPCM may be defined as horizontal. Alternatively, if the intra prediction mode of the current block is a mode having an absolute angle equal to or less than the 34th mode, the prediction direction of the BDPCM may be defined as the vertical direction; otherwise, the prediction direction of the BDPCM may be defined as the horizontal direction.
[0211] When applying BDPCM to a current block, the image encoding apparatus may derive a prediction direction of BDPCM based on an intra prediction mode to perform BDPCM prediction, and may not encode information related to the prediction direction of BDPCM.
[0212] According to the embodiment shown in Figure 18, the prediction direction of BDPCM can be derived using already available intra prediction modes, which eliminates the need to signal information about the prediction direction of BDPCM, thereby reducing the amount of information to be transmitted.
[0213] As a variation of the embodiment shown in FIG. 18, information about the prediction direction of BDPCM may be signaled, and the intra prediction mode of the current block may be derived based on the prediction direction of BDPCM.
[0214] FIG. 19 is a flowchart illustrating a method for deriving an intra prediction mode of a current block based on a prediction direction of BDPCM according to another embodiment of the present disclosure.
[0215] According to the embodiment 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 regarding the intra prediction mode.
[0216] Specifically, it is determined whether BDPCM is applied to the current block (S1910), and if BDPCM is not applied, the intra prediction mode of the current block may be determined based on prediction information (e.g., information about the intra prediction mode) of the current block signaled via a bitstream (S1940). Thereafter, intra prediction may be performed based on the determined intra prediction mode (S1930).
[0217] If it is determined in step S1910 that BDPCM is applied to the current block, the intra prediction mode of the current block may be determined based on the prediction direction of the BDPCM of the current block (S1920). For example, the image encoding apparatus may determine the intra prediction mode of the current block based on the prediction direction of the BDPCM applied to the current block. Furthermore, the image decoding apparatus may decode information regarding the prediction direction of the BDPCM (bdpcm_dir_flag) to determine the prediction direction of the BDPCM of 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 may be performed based on the determined intra prediction mode (S1930).
[0218] According to one example, if the prediction direction of the BDPCM is vertical, the intra prediction mode can be determined to be vertical mode, and if the prediction direction of the BDPCM is horizontal, the intra prediction mode can be determined to be horizontal mode.
[0219] According to another example, if the prediction direction of the BDPCM is vertical, the intra prediction mode can be determined to be horizontal mode, and if the prediction direction of the BDPCM is horizontal, the intra prediction mode can be determined to be vertical mode.
[0220] However, the method of determining the intra prediction mode based on the BDPCM prediction direction is not limited to these examples.
[0221] 20 is a flowchart illustrating a method for deriving a prediction direction for BDPCM based on the size of a current block according to another embodiment of the present disclosure. Steps S2010 to S2030 of FIG. 20 can replace steps S1740 to S1750 of FIG. 17.
[0222] Intra prediction has a characteristic that the level (absolute value) of residual coefficients increases as the distance from the reference sample increases. In consideration of this characteristic, the embodiment described with reference to Figure 20 may derive the BDPCM prediction direction of the current block based on a condition related to the block size (e.g., 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 taken into consideration.
[0223] Specifically, it is determined whether BDPCM is applied to the current block (S2010), and if BDPCM is not applied, the process of deriving the prediction direction of BDPCM may not be performed.
[0224] If it is determined in step S2010 that BDPCM is applied to the current block, a condition regarding the size of the current block is determined (S2020), and the prediction direction of BDPCM can be derived based on the determination result (S2030).
[0225] For example, if the width of the current block is greater than the height of the current block, the prediction direction of the BDPCM may be derived horizontally. Conversely, if the height of the current block is greater than the width, the prediction direction of the BDPCM may be derived vertically. If the width and height of the current block are the same, the method of the embodiment described with reference to Figure 18 may be applied. Alternatively, if the width and height of the current block are the same, the prediction direction of the BDPCM may be derived in either the horizontal or vertical direction, whichever is already agreed upon between the image encoding device and the image decoding device, or may be determined based on information signaled at a higher level of the block (such as the sequence level, picture level, or slice level).
[0226] As another example, if the width of the current block is greater than its height, the prediction direction of the BDPCM may be derived vertically. Conversely, if the height of the current block is greater than its width, the prediction direction of the BDPCM may be derived horizontally. If the width and height of the current block are the same, the method of the embodiment described with reference to FIG. 18 may be applied. Alternatively, if the width and height of the current block are the same, the prediction direction of the BDPCM can be derived from either the horizontal or vertical direction, whichever is already agreed upon between the image encoding device and the image decoding device, or can be determined based on information signaled at a higher level of the block (such as the sequence level, picture level, or slice level).
[0227] As another example, if the width-to-height ratio (width / height) of the current block is N or greater, the prediction direction of the BDPCM may be derived vertically. Alternatively, if the width-to-height ratio of the current block is 1 / N or less, the prediction direction of the BDPCM may be derived horizontally. If the width-to-height ratio of the current block is less than N and greater than or equal to 1 / N, the method of the embodiment described with reference to FIG. 18 may be applied. Alternatively, if the width-to-height ratio of the current block is less than N and greater than or equal to 1 / N, the prediction direction of the BDPCM may be derived horizontally or vertically, based on a pre-determined direction between the image encoding device and the image decoding device, or may be determined based on information signaled at a higher level of the block (e.g., sequence level, picture level, slice level, etc.). Here, N may be an integer greater than or equal to 1.
[0228] As another example, if the width-to-height ratio of the current block is N or greater, the prediction direction of the BDPCM may be derived horizontally. Alternatively, if the width-to-height ratio of the current block is 1 / N or less, the prediction direction of the BDPCM may be derived vertically. If the width-to-height ratio of the current block is less than N and greater than or equal to 1 / N, the method of the embodiment described with reference to FIG. 18 may be applied. Alternatively, if the width-to-height ratio of the current block is less than N and greater than or equal to 1 / N, the prediction direction of the BDPCM may be derived in either the horizontal or vertical direction, a direction already agreed upon between the image encoding apparatus and the image decoding apparatus, or may be determined based on information signaled at a higher level of the block (e.g., sequence level, picture level, slice level, etc.). Here, N may be an integer greater than or equal to 1.
[0229] According to the embodiment shown in Figure 20, the BDPCM prediction direction can be derived based on a condition related to the size of the current block. Therefore, there is no need to signal information related to the BDPCM prediction direction, and the amount of information to be transmitted can be reduced.
[0230] Overview of CABAC (Context-based Adaptive Binary Arithmetic Coding) and residual signal encoding / decoding
[0231] The image encoding / decoding apparatus may encode / decode image information using CABAC. Part or all of the image information may be entropy encoded by the entropy encoding unit 190 of FIG. 2, and part or all of the image information may be entropy decoded by the entropy decoding unit 210. Syntax elements included in a residual signal (described later) may be entropy encoded / decoded based on CABAC.
[0232] FIG. 21 is a diagram for explaining the CABAC entropy coding method.
[0233] If the input signal is a syntax element that is not a binary value, the input signal may be converted into a binary value via the binarization unit 2110. If the input signal is already a binary value, the binarization process may not be performed. In this case, each binary digit 0 or 1 constituting the binary value may be a bin. For example, if the binary string after binarization is 110, each of 1, 1, and 0 may be one bin. The binary string for one syntax element may indicate the value of the syntax element.
[0234] The binarized bins may be input to the regular coding engine 2120 or the bypass coding engine 2130. The context model determination unit 2140 assigns a context model reflecting a probability value to the bin, and the regular coding engine 2120 may encode the bin based on the assigned context model. After encoding of each bin in the regular coding engine 2120, the probability model for the bin may be updated. The bins encoded in this manner may be referred to as context-coded bins. The bypass coding engine 2130 may omit the steps of estimating a probability for the input bin and updating the probability model applied to the bin after encoding. The bypass coding engine 2130 may code the input bins by applying a uniform probability distribution instead of assigning a context, thereby improving the coding speed. The bins encoded via the bypass coding engine 2130 may be referred to as bypass bins.
[0235] The entropy coding unit 190 can determine whether to perform coding via the regular coding engine 2120 or via the bypass coding engine 2130, and switch the coding path.
[0236] Meanwhile, entropy decoding may be performed in reverse of the encoding process of FIG. 21. The entropy decoding unit 210 may decode a bitstream into a binary string using either a regular coding decoding engine or a bypass decoding engine. After decoding by the regular coding engine, a probability model for the corresponding bin may be updated. Meanwhile, in the bypass decoding engine, the procedures of estimating probabilities for the input bitstream and updating the probability model may be omitted. The bins generated through either the regular coding decoding engine or the bypass decoding engine may be finally restored to the syntax elements that were the original input signal through selective debinarization by the debinarization unit.
[0237] Residual samples can be derived using transform coefficients quantized through a transform and quantization process. Quantized transform coefficients can be defined as transform coefficients. Transform coefficients within a block can be signaled in the form of residual information. The residual information can include residual coding syntax elements. An image encoding device can construct residual coding syntax elements using the residual information, encode the residual coding syntax elements, and output them in a bitstream format. In contrast, an image decoding device can obtain quantized transform coefficients by decoding the residual coding syntax elements from the bitstream. Hereinafter, residual coding syntax elements may be referred to as syntax elements.
[0238] For example, transform coefficients may be coded / decoded using at least one residual coding syntax element 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 coding / decoding transform coefficients using syntax elements may be defined as residual (data) coding or (transform) coefficient coding. In this case, the transform / quantization process may be omitted. Each of the above-mentioned syntax elements will be described in detail below. The names of the syntax elements described below are merely examples, and the scope of the present disclosure is not limited by the names of the syntax elements.
[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 are syntax elements that encode (x, y) position information of the last non-zero coefficient in a related block. In this case, the related block may be a coding block (CB) or a transform block (TB). Hereinafter, a block in the transform, quantization, and residual coding processes may be a coding block or a transform block.
[0240] Specifically, last_sig_coeff_x_prefix may indicate a prefix of the column position of the last significant coefficient in the scan order within a transform block, and last_sig_coeff_y_prefix may indicate a prefix of the row position of the last significant coefficient in the scan order within the transform block. last_sig_coeff_x_suffix may indicate a suffix of the column position of the last significant coefficient in the scan order within the transform block, and last_sig_coeff_y_suffix may indicate a suffix of the row position of the last significant coefficient in the scan order within the transform block. A significant coefficient may refer to a coefficient that is not zero. The scan order may be any one of a right-up diagonal scan order, a horizontal scan order, and a vertical scan order. In this case, the horizontal scan order may refer to a scan order from left to right, and the vertical scan order may refer to a scan order from top to bottom. The scan order may be determined based on whether intra / inter prediction is applied to the current block and / or a specific intra / inter prediction mode.
[0241] The syntax element coded_sub_block_flag can be a syntax element that indicates whether each sub-block contains a non-zero coefficient when the current block is divided into sub-blocks having 4 or 16 pixels (e.g., 1x16, 2x8, 8x2, 16x1, 4x4, or 2x2 sub-blocks). In this case, the sub-block can also be expressed as a coefficient group (CG).
[0242] For example, if the value of coded_sub_block_flag is 0, there is no further information to transmit, and thus the encoding process for the sub-block may terminate. Conversely, if the value of coded_sub_block_flag is 1, the encoding / decoding process for sig_coeff_flag may be performed. According to the scanning order, signaling for coded_sub_block_flag may not be performed for a sub-block that includes a non-zero coefficient at the end. This may be because a DC coefficient is present in the upper left sub-block, and thus there is a high probability that a non-zero coefficient exists. Therefore, coded_sub_block_flag may not be coded for a sub-block that includes a non-zero coefficient at the end, and its value may be set to 1.
[0243] If coded_sub_block_flag indicates that a non-zero coefficient exists in the current sub-block, sig_coeff_flag, which has a binary value, may be coded / decoded in reverse scanning order. A 1-bit syntax element sig_coeff_flag[n] may be coded / decoded for the coefficient at the corresponding scan position (n) in scanning order. The syntax element sig_coeff_flag[n] may be a syntax element that indicates whether the coefficient at the current scan position has a value of zero. For a sub-block containing the last non-zero coefficient, sig_coeff_flag[n] does not need to be coded / decoded for the last non-zero coefficient, so the coding / decoding process may be omitted.
[0244] Level information encoding / decoding can be performed only when sig_coeff_flag[n] is 1. At this time, the level information encoding / decoding process can be performed using at least one of the above-mentioned syntax elements. Meanwhile, the syntax element sig_coeff_flag[xC][yC] can be a syntax element that indicates whether the transform coefficient at each transform 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 according to Equation 7 below.
[0246]
number
[0247] In this case, the syntax element remAbsLevel[n] may indicate the level value that must be encoded / decoded at scan position n, and coeff[n] may represent the actual transform coefficient value.
[0248] The syntax element abs_level_gtX_flag[n][0] may be a syntax element indicating whether |coeff[n]| at 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 may be 1. On the other hand, if the value of abs_level_gtX_flag[n][0] is 1, remAbsLevel[n] may be derived based on the following Equation 8.
[0249]
number
[0250] The syntax element par_level_flag[n] may be a syntax element used to encode / decode the LSB (least significant coefficient) value of remAbsLevel[n] based on the following Equation 9. That is, par_level_flag[n] may indicate the parity of the transform coefficient level value at scan position n. After encoding / decoding par_level_flag[n], remAbsLevel[n] may be updated based on the following Equation 9.
[0251]
number
[0252] The syntax element abs_level_gtx_flag[n][1] may be a syntax element indicating whether |coeff[n]| at scan position n is greater than 3. For example, abs_remainder[n] may be encoded / decoded only if abs_level_gtx_flag[n][1] is 1. For example, the relationship between coeff[n] and each syntax element may be as shown in Equation 10 below. In this case, |coeff[n]| indicates a transform coefficient level value and may be expressed as AbsLevel[n] for the transform coefficient. The syntax element coeff_sign_flag[n] may indicate a transform coefficient sign at the corresponding scan position n. In summary, abs_level_gtx_flag[n][i] may be a syntax element indicating whether the absolute value of the transform coefficient is greater than either 1 or 3.
[0253]
number
[0254] Considering the above, each syntax element can have the values in Table 2 depending on the value of |coeff[n]|.
[0255] [Table 2]
[0256] On the other hand, CABAC provides high performance but has the drawback of poor throughput. This can be attributed to the regular coding engine of CABAC mentioned above. The regular coding engine has the problem of being highly data-dependent because it uses the probability state and range updated through coding of the previous bin, and it takes a long time to read the probability range and determine the current state. In this case, the throughput problem of CABAC can be solved by limiting the number of context coding bins.
[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] may be limited according to the size of the sub-block. For example, the sum of bins may be limited to 32 for a 4×4 sub-block and 8 for a 2×2 sub-block. If the limited number of context coding bins are all used to encode the context elements, CABAC is not applied to the remaining coefficients, and bypass coding / decoding may be performed. That is, if the number of coding / decoding bins is 32 for 4×4 CG and 8 for 2×2 CG, sig_coeff_flag[n], abs_level_gtX_flag[n][0], par_level_flag[n], and abs_level_gtx_flag[n][1] may not be further coded. In this case, |coeff[n]| may be coded / decoded using the previously set dec_abs_level[n]. Alternatively, the sum of 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] may be limited according to the size of the transform block. For example, the sum of bins may be 1.75 times the number of pixels in the block. If the limited number of context coding bins are all used to code the context elements, CABAC is not applied to the remaining coefficients, and bypass coding / decoding may be performed. That is, if the number of encoding / decoding bins exceeds 1.75 times the number of pixels in the block (e.g., 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 further coded. In this case, |coeff[n]| may be coded / decoded using the already set dec_abs_level[n].
[0258] Rice parameter derivation process for the level of residual coefficients
[0259] The Rice parameter derivation process receives the color component information (cIdx) of the current transform block, the upper left luma position (x0, y0) of the current transform block, the scan position (xC, yC) of the current residual coefficient, and the width (log2TbWidth) and height (log2TbHeight) of the current transform block, and can output the Rice parameter cRiceParam.
[0260] First, the variable locSumAbs can be derived in the pseudo code of 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 Rice parameter derivation process can be applied to the syntax element dec_abs_level[] and the syntax element abs_remainder[]. That is, the Rice parameter derivation process can be commonly applied to residual coefficients in the current transform block.
[0265] binarization process for the levels of residual coefficients
[0266] The derived cRiceParam can be used to derive cMax in the binarization process of the corresponding syntax element. The prefixVal of the corresponding syntax element can be determined as the smaller of cMax and the value of the corresponding syntax element. The suffixVal of the corresponding syntax element can be determined as the value of the corresponding syntax element minus the cMax value. As described above, after the prefixVal and suffixVal of the corresponding syntax element are determined, a binarization process can be performed on each to generate a binarized bin string of the corresponding syntax element. That is, the binarized bin string of the corresponding syntax element can be generated by concatenating the bin string of prefixVal and the bin string of suffixVal (if present).
[0267] Transform-skipped residual signal coding
[0268] If the transform is skipped for the residual signal, the coding process of the residual signal can be modified by taking into account the statistical signal properties 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 transform block may not be coded. When a transform is performed, energy is concentrated in the low-frequency region, and there is a high probability that 0 or an insignificant level will appear in the high-frequency region. Therefore, the position of the last significant coefficient may be significant when a transform is performed. However, when a transform is skipped, the above-described phenomenon of energy concentration in the low-frequency region does not occur. In other words, when a transform is skipped, since the significant coefficients are evenly distributed within the current transform block, the position of the last significant coefficient is not significant and may not be coded.
[0270] Also, the context model for sig_coeff_flag[] can be modified. The context model of the syntax element sig_coeff_flag[] can be derived by referring to neighboring positions of the current scanning position. In this case, the referenced neighboring positions can be defined as a template. When conversion is skipped, the template for determining the context model of the syntax element sig_coeff_flag[] can be modified to the left (NB0) and above (NB1) positions 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 of sig_coeff_flag at the current scanning position can be derived based on the sig_coeff_flag value at the left position of the current scanning position and the sig_coeff_flag value at the above position of the current scanning position. Therefore, when conversion is skipped, the context model can be determined independently of the diagonal direction. Also, one of three types of context models can be determined.
[0271] Considering the distribution of the residual signal when a transform is skipped, the coding of the syntax element abs_remainder[] also needs to be modified. As mentioned above, a Rice parameter can be derived for the binarization of abs_remainder[]. According to the pseudocode in Table 3, the positions to the right of the current scanning position (xC+1, yC) and below (xC, yC+1) are used as templates to derive the Rice parameter. However, when a transform is skipped, similar to the template for sig_coeff_flag mentioned above, the positions to the left of the current scanning position (xC, yC) and above (xC, yC-1) can be defined as templates for deriving the Rice parameter of abs_reminder[]. Alternatively, the Rice parameter for the transform skip residual signal can be fixed to a specific number. For example, the Rice parameter for the transform skip 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. To perform CABAC, a context model can be derived. The context model can be derived, for example, by determining a context index (ctxIdx), which can be derived by the sum of the variables ctxIdxOffset and ctxInc, where ctxInc can be derived using a template, as described above.
[0274] Specifically, to derive ctxInc of the syntax element sig_coeff_flag, the variables locNumSig and locSumAbsPass1 can be derived 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 may differ depending on transform_skip_flag. Specifically, when transform_skip_flag is 1 (when transformation is skipped), the left position (xC-1, yC) and the upper position (xC, yC-1) of the current scanning position (xC, yC) may be used as templates. ctxInc of the syntax element sig_coeff_flag may be derived based on locNumSig and / or locSumAbsPass1. In other words, the template used for context modeling of sig_coeff_flag may be determined differently depending on whether transformation is skipped.
[0277] As described above, BDPCM can be applied in the process of encoding a residual block for which a transform is skipped. When BDPCM is applied, instead of encoding the (quantized) residual coefficients as described above, the difference values generated by predicting the residual coefficients in units of lines in the row or column direction are encoded, which can have different characteristics from other residual signals for which a transform 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), resulting in a significant decrease in level and a change in sign. Therefore, it is necessary to select a separate context model to accumulate statistical characteristics suitable for BDPCM, or to adaptively apply a method for deriving the Rice parameters used to binarize the levels of the residual coefficients.
[0278] As described above, surrounding pixels can be referenced to determine the context model of sig_coeff_flag or to derive the Rice parameter for binarization of abs_remainder. In this case, the referenced surrounding pixels (or their positions) can be defined as a template. If conversion is skipped, the positions to the left and above the current pixel (current scanning position) can be referenced as templates. If the current pixel is located at the top or leftmost position in the block, only available surrounding pixels can be referenced as templates. The non-zero or level value of unavailable surrounding pixel positions can be initialized to 0. If the position of the current pixel is (0, 0), no pixels can be referenced, so the non-zero or level value of surrounding pixel positions can be induced to 0.
[0279] 22 and 23 are diagrams illustrating templates for blocks to which BDPCM is applied according to an embodiment of the present disclosure.
[0280] 22 and 23, "C" indicates the current pixel, and "A" and "L" indicate the upper and left surrounding pixels, respectively. Also, the arrows on the right side of the blocks in Fig. 22 indicate that the prediction direction of BDPCM is vertical, and the arrows on the bottom of the blocks in Fig. 23 indicate that the prediction direction of BDPCM is horizontal.
[0281] To encode the residual signal of a block whose transformation has been skipped, the pixel (L) to the left of the current pixel (C) and the pixel (A) above it can be referenced as a template, as in the blocks shown on the left in Figures 22 and 23. For example, the template can be a template used to derive the Rice parameter of abs_remainder[] or a template used to derive the context model of sig_coeff_flag.
[0282] If the block whose transformation has been skipped is a block predicted by BDPCM, the template can be modified based on the prediction direction of BDPCM. For example, if the prediction direction of BDPCM is vertical, only the pixel (A) above the current pixel (C) can be referenced as a template, as in the block shown on the right side of Figure 22. If the prediction direction of BDPCM is horizontal, only the pixel (L) to the left of the current pixel (C) can be referenced as a template, as in the block shown on the right side of Figure 23. That is, considering the BDPCM prediction direction for the current pixel position (position of coefficient, residual coefficient, or quantized residual coefficient), pixels at non-referenced positions may not be used as templates for checking neighbor similarity (neighbor position for context model selection, rice parameter derivation). In this case, for example, based on the position of the current coefficient, reference samples located in the BDPCM prediction direction may be used as templates, and reference samples not located in the BDPCM prediction direction may not be used as templates.
[0283] FIG. 24 is a flowchart illustrating a method for defining a template and deriving a context model or Rice parameters in consideration of the prediction direction of BDPCM according to the present disclosure.
[0284] As shown in FIG. 24, it is determined whether BDPCM is applied to a transform-skipped current block (S2410). If BDPCM is not applied, the left and upper neighboring pixels of the current pixel may be defined as templates (S2420). If BDPCM is applied to the current block, the prediction direction of the BDPCM is determined (S2430). If the prediction direction is horizontal, the left neighboring pixel of the current pixel may be defined as a template (S2440). If the prediction direction is vertical, the upper neighboring pixel of the current pixel may be defined as a template (S2450). As described above, encoding / decoding may be performed using the template of the current pixel defined based on whether BDPCM is applied to the transform-skipped current block and / or the prediction direction of the BDPCM (S2460). The encoding / decoding of step S2460 may be encoding / decoding of a residual signal of the current pixel, and may include, for example, a context model derivation process or a Rice parameter derivation process for the residual signal.
[0285] According to the embodiment described with reference to Figures 22 to 24, based on the BDPCM prediction direction (e.g., bdpcm_dir_flag), it is possible to check which of the pixels adjacent to the current pixel has a higher correlation, and use this as statistics of the surrounding pixels for the current pixel, thereby improving coding efficiency.
[0286] 25 and 26 are diagrams illustrating templates for blocks to which BDPCM is applied according to another embodiment of the present disclosure.
[0287] 25 and 26, "C" indicates the current pixel, and "A" and "L" indicate the upper and left surrounding pixels, respectively. The arrows on the right side of the blocks in FIG. 25 indicate that the BDPCM prediction direction is vertical, while the arrows on the bottom side of the blocks in FIG. 26 indicate that the BDPCM prediction direction is horizontal. The thick solid lines in FIG. 25 and 26 indicate the BDPCM line on which the current pixel is located.
[0288] To encode the residual signal of a block whose transformation has been skipped, the pixel (L) to the left of the current pixel (C) and the pixel (A) above it can be referenced as a template, as in the blocks shown on the left in Figures 25 and 26. For example, the template can be a template for deriving the Rice parameter of abs_remainder[] or a template for deriving the context model of sig_coeff_flag.
[0289] If the block whose transformation has been skipped is a block predicted by BDPCM, the template can be modified based on the prediction direction of BDPCM. For example, if the prediction direction of BDPCM is vertical, only the pixel (L) to the left of the current pixel (C) can be referenced as a template, as in the block shown on the right side of Figure 25. If the prediction direction of BDPCM is horizontal, only the pixel (A) above the current pixel (C) can be referenced as a template, as in the block shown on the right side of Figure 26.
[0290] In the embodiment described with reference to Figures 25 and 26, pixels that are not in the same BDPCM line as the current pixel position may not be used as templates for checking neighbor similarity (neighbor position for context model selection, rice parameter derivation).
[0291] FIG. 27 is a flowchart illustrating a method for defining a template and deriving a context model or Rice parameters by taking into account BDPCM lines according to the present disclosure.
[0292] As shown in FIG. 27, it is determined whether BDPCM is applied to a transform-skipped current block (S2710). If BDPCM is not applied, neighboring pixels to the left and above of the current pixel may be defined as templates (S2720). If BDPCM is applied to the current block, the prediction direction of the BDPCM is determined (S2730). If the prediction direction is horizontal, neighboring pixels above the current pixel may be defined as templates (S2740). If the prediction direction is vertical, neighboring pixels to the left of the current pixel may be defined as templates (S2750). That is, neighboring pixels in the same BDPCM line as the current pixel may be defined as templates. As described above, encoding / decoding may be performed using the template of the current pixel defined based on whether BDPCM is applied to the transform-skipped current block and / or the prediction direction of the BDPCM (S2760). The encoding / decoding of step S2760 may be encoding / decoding of a residual signal of the current pixel, and may include, for example, a context model derivation process or a Rice parameter derivation process for the residual signal.
[0293] According to the embodiment described with reference to Figures 25 to 27, based on the BDPCM prediction direction (e.g., bdpcm_dir_flag), it is possible to check which of the pixels adjacent to the current pixel has a higher correlation, and use this as statistics of the surrounding pixels for the current pixel, thereby improving coding efficiency.
[0294] 28 and 29 are diagrams illustrating templates for blocks to which BDPCM is applied according to another embodiment of the present disclosure.
[0295] 28 and 29, "C" indicates the current pixel, and "A" and "L" indicate the upper and left surrounding pixels, respectively. Also, the arrows on the right side of the blocks in Fig. 28 indicate that the prediction direction of BDPCM is vertical, and the arrows on the bottom of the blocks in Fig. 29 indicate that the prediction direction of BDPCM is horizontal.
[0296] In DPCM, the first value has no prediction value, and in BDPCM, the value of the first line is not predicted and is coded as the same value as before. However, from then on, the difference from the value of the previously coded line is coded. Therefore, the magnitude of the coded level may be very small compared to the level of the first line or may be zero. That is, there may be a characteristic that the magnitude of the level varies greatly between the pixels included in the first line and the pixels included in other lines. That is, it may not be appropriate to use the surrounding pixels included in the first line as a template for the current pixel included in the second or subsequent lines.
[0297] In consideration of this, the embodiments shown in FIGS. 28 and 29 may not use neighboring pixels included in the first line as a template (neighbor position for context model selection, Rice parameter derivation) depending on the position of the current pixel and the prediction direction of the BDPCM. In other words, a template may be defined assuming that the first line of the BDPCM is not available. For example, sig_coeff_flag determines whether the pixels above and to the left of the current pixel are zero or not, and then determines a context model based on this. In this case, since the first line is more likely to have a non-zero level than other lines, coding efficiency can be improved by adaptively accumulating statistics depending on whether the neighboring pixels are the first line. Similarly, since the Rice parameter is derived based on the magnitude of the neighboring levels of the current pixel, if the current pixel is in the second line, a Rice parameter more suitable 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 pixel above the current pixel (C) belongs to the first line of the BDPCM, only the pixel to the left (L) can be referenced as a template. If the pixel above the current pixel (C) does not belong to the first line of the BDPCM, as shown on the right side of Figure 28, the pixel above (A) and the pixel to the left (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 pixel to the left 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 the pixel to the left of the current pixel (C) does not belong to the first line of the BDPCM, as shown on the right side of Figure 29, the upper pixel (A) and the left pixel (L) can be referenced as templates.
[0300] FIG. 30 is a flowchart illustrating a method for defining a template and deriving a context model or Rice parameters by considering whether a surrounding pixel is included in the first line of a BDPCM signal according to the present disclosure.
[0301] As shown in FIG. 30, it is determined whether BDPCM is applied to a transform-skipped current block (S3010). If BDPCM is not applied, the left and upper neighboring pixels of the current pixel may be defined as templates (S3020). If BDPCM is applied to the current block, the prediction direction of the BDPCM may be determined (S3030). If the prediction direction of the BDPCM is horizontal, it may be determined whether the left neighboring pixel of the current pixel is in the first line of the BDPCM (S3040). If the left neighboring pixel of the current pixel is in the first line of the BDPCM, only the upper neighboring pixel of the current pixel may be defined as a template (S3050). If the left neighboring pixel of the current pixel is not in the first line of the BDPCM, the left and upper neighboring pixels of the current pixel may be defined as templates (S3060). Similarly, if the prediction direction of the BDPCM is vertical, it may be determined whether the upper neighboring pixel of the current pixel is in the first line of the BDPCM (S3070). If the upper neighboring pixel of the current pixel does not exist in the first line of the BDPCM, the left neighboring pixel and the upper neighboring pixel of the current pixel can be defined as templates (S3060). If the neighboring pixels above the current pixel are in the first line of the BDPCM, only the neighboring pixels to the left of the current pixel can be defined as a template (S3080). As described above, encoding / decoding can be performed using a template of the current pixel defined based on whether BDPCM is applied to the current block, the prediction direction of the BDPCM, and whether the neighboring pixels are in the first line of the BDPCM (S3090). The encoding / decoding of step S3090 is, for example, encoding / decoding of a residual signal of the current pixel, and can include a context model derivation process or a Rice parameter derivation process for the residual signal.
[0302] 28 and 30, the template of the current pixel is defined based on whether the neighboring pixels of the current pixel are in the first line of the BDPCM, thereby reflecting the statistical characteristics of the first line of the BDPCM and subsequent lines, thereby deriving a context model and Rice parameters for the current pixel that are more suitable for encoding / decoding.
[0303] 31 and 32 are diagrams illustrating templates for blocks to which BDPCM is applied according to another embodiment of the present disclosure.
[0304] 31 and 32, "C" indicates the current pixel, and "A" and "L" indicate the upper and left surrounding pixels, respectively. Also, the arrows on the right side of the blocks in Fig. 31 indicate that the prediction direction of BDPCM is vertical, and the arrows on the bottom of the blocks in Fig. 32 indicate that the prediction direction of BDPCM 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, surrounding pixels not referenced in the prediction of the BDPCM and surrounding pixels included in the first line of the BDPCM may not be used as templates.
[0306] Specifically, as in the block shown on the left side of Figure 31, when the prediction direction of the BDPCM is vertical, the pixel above the current pixel (C) can be used as a template, but because the pixel above the current pixel (C) is included in the first line of the BDPCM, the pixels to the left and above the current pixel (C) may not be usable as templates. Also, as in the block shown on the right side of Figure 31, because the pixel above the current pixel (C) is not included in the first line of the BDPCM, the pixel above (A) can be used as a template for the current pixel (C).
[0307] Similarly, as in the block shown on the left side of Figure 32, when the prediction direction of the BDPCM is horizontal, the pixel to the left of the current pixel (C) can be used as a template, but because the pixel to the left of the current pixel (C) is included in the first line of the BDPCM, the pixel to the left and the pixel above the current pixel (C) may not be usable as templates. Also, as in the block shown on the right side of Figure 32, the pixel to the left of the current pixel (C) is not included in the first line of the BDPCM, so the pixel to the left (L) can be used as a template for the current pixel (C).
[0308] FIG. 33 is a flowchart illustrating a method for defining a template and deriving a context model or Rice parameters by taking into consideration the prediction direction of a BDPCM and whether a surrounding pixel is included in the first line of the BDPCM according to the present disclosure.
[0309] As shown in FIG. 33, it is determined whether BDPCM is applied to a transform-skipped current block (S3310). If BDPCM is not applied, the left and upper neighboring pixels of the current pixel may be defined as templates (S3320). If BDPCM is applied to the current block, the prediction direction of BDPCM may be determined (S3330). If the prediction direction of BDPCM is horizontal, it may be determined whether the left neighboring pixel of the current pixel is in the first line of the BDPCM (S3340). If the left neighboring pixel of the current pixel is not in the first line of the BDPCM, it may be defined as a template (S3350). If the left neighboring pixel of the current pixel is in the first line of the BDPCM, neither the left neighboring pixel nor the upper neighboring pixel of the current pixel may be defined as a template (S3360). Similarly, if the prediction direction of BDPCM is vertical, it may be determined whether the upper neighboring pixel of the current pixel is in the first line of the BDPCM (S3370). If the upper neighboring pixel of the current pixel is not present in the first line of the BDPCM, the upper neighboring pixel of the current pixel may be defined as a template (S3380). If the upper neighboring pixel of the current pixel is present in the first line of the BDPCM, the left neighboring pixel and the upper neighboring pixel of the current pixel may not be defined as templates (S3360). As described above, encoding / decoding may be performed using a template of the current pixel defined based on whether a BDPCM is applied to the current block, the prediction direction of the BDPCM, and whether neighboring pixels are present in the first line of the BDPCM (S3390). The encoding / decoding of step S3390 may be, for example, encoding / decoding of a residual signal of the current pixel, and may include a context model derivation process or a Rice parameter derivation process for the residual signal.
[0310] 31 and 33, the template of the current pixel is defined based on the prediction direction of the BDPCM and whether the neighboring pixels of the current pixel are the first line of the BDPCM, so that the statistical characteristics of the BDPCM can be better reflected. Therefore, a context model and Rice parameters more suitable for encoding / decoding can be derived for the current pixel.
[0311] According to another embodiment of the present invention, the embodiment described with reference to Figures 25 and 26 may be combined with the embodiment described with reference to Figures 28 and 29. That is, neighboring pixels that are not in the same BDPCM line as the current pixel and neighboring pixels included in the first line of the BDPCM may not be used as templates.
[0312] 22 to 33, various embodiments of surrounding pixels that can be used as templates and surrounding pixels that cannot be used as templates have been described. However, there may be surrounding pixels that cannot be used depending on the position of the current pixel. For example, if the left surrounding pixel or the upper surrounding pixel does not exist in the current block, the surrounding pixel may not be usable as a template.
[0313] In the various embodiments described above, unavailable surrounding pixels may be omitted or may be substituted with a predetermined value. For example, the non-zero or level value of unavailable surrounding pixels may be substituted with 0.
[0314] Although the exemplary method of the present disclosure is expressed as a series of operations for clarity of explanation, this is not intended to limit the order in which the steps are performed, and the steps may be performed simultaneously or in a different order if necessary. To achieve the method according to the present disclosure, the steps illustrated may include other steps, or some steps may be omitted and the remaining steps may be included, or some steps may be omitted and additional other steps may be included.
[0315] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) can perform the operation (step) to check the execution conditions and circumstances of the operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is satisfied, the image encoding device or the image decoding device can perform the predetermined operation after performing an operation to check whether the predetermined condition is satisfied.
[0316] The various embodiments of the present disclosure are not intended to enumerate all possible combinations, but are intended to describe representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.
[0317] Additionally, various embodiments of the present disclosure may be implemented using hardware, firmware, software, or a combination thereof, etc. In the case of a hardware implementation, the implementation may be using one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general processors, controllers, microcontrollers, microprocessors, etc.
[0318] In addition, an image decoding apparatus and an image encoding apparatus to which an embodiment of the present disclosure is applied may be included in a multimedia broadcast transmitting / receiving apparatus, a mobile communication terminal, a home cinema video apparatus, a digital cinema video apparatus, a surveillance camera, a video conversation apparatus, a real-time communication apparatus such as video communication, a mobile streaming apparatus, a storage medium, a camcorder, a video on demand (VoD) service providing apparatus, an over-the-top (OTT) video apparatus, an internet streaming service providing apparatus, a three-dimensional (3D) video apparatus, an image telephone video apparatus, a medical video apparatus, etc., and may be used to process a video signal or a data signal. For example, an over-the-top (OTT) video apparatus may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.
[0319] FIG. 34 is a diagram illustrating a content streaming system to which an embodiment of the present disclosure can be applied.
[0320] As shown in FIG. 34, a content streaming system to which an embodiment of the present disclosure is applied can broadly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0321] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server can be omitted.
[0322] The bitstream can be generated by an image encoding method and / or image encoding device to which an embodiment of the present disclosure is applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0323] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act as an intermediary that informs the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, which then transmits the multimedia data to the user. In this case, the content streaming system can include a separate control server, which can control commands and responses between devices in the content streaming system.
[0324] The streaming server may receive content from a media storage and / or an encoding server. For example, when receiving content from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a certain period of time to provide a smooth streaming service.
[0325] Examples of the user device include a mobile phone, a smartphone, a laptop computer, a digital broadcasting terminal, a PDA (personal digital assistant), a PMP (portable multimedia player), a navigation system, a slate PC, a tablet PC, an ultrabook, a wearable device (e.g., a smartwatch, smart glass, or a head mounted display (HMD)), a digital TV, a desktop computer, and a digital signage.
[0326] Each server in the content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.
[0327] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of various embodiments to be performed on a device or computer, and non-transitory computer-readable medium on which such software or commands can be stored and executed on a device or computer. [Industrial Applicability]
[0328] Embodiments according to the present disclosure can be used to encode / decode images.
Claims
1. An image decoding method performed by an image decoding device, comprising: determining whether block difference pulse code modulation (BDPCM) is applied to the current block; determining a prediction direction of the BDPCM for the current block if the BDPCM is applied to the current block; determining an intra prediction mode of the current block based on a BDPCM prediction direction for the current block; generating a residual block of the current block based on a prediction direction of the BDPCM; generating a predicted block of the current block by performing intra prediction based on an intra prediction mode of the current block; reconstructing the current block based on the residual block and the predicted block; Including, Determining whether the BDPCM is applied to the current block includes:
11. A method for decoding an image, comprising: parsing first information from a bitstream, the first information indicating that the BDPCM is applied only to chroma components of the current block.
2. Determining a BDPCM prediction direction for the current block includes:
2. The image decoding method of claim 1, further comprising parsing second information indicating a BDPCM prediction direction for the current block from the bitstream.
3. 2. The image decoding method of claim 1, wherein the BDPCM prediction direction for the current block includes a horizontal direction or a vertical direction.
4. Determining an intra prediction mode of the current block based on a prediction direction of BDPCM for the current block includes: If the prediction direction of the BDPCM is horizontal, the intra prediction mode of the current block is determined to be horizontal mode; If the prediction direction of the BDPCM is vertical, the intra prediction mode of the current block is determined to be vertical mode; 2. The image decoding method according to claim 1, further comprising:
5. The image decoding method includes:
2. The image decoding method of claim 1, further comprising: determining an intra prediction mode for 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.
6. An image coding method performed by an image coding device, comprising: determining whether block difference pulse code modulation (BDPCM) is applied to the current block; determining a prediction direction of the BDPCM for the current block if the BDPCM is applied to the current block; determining an intra prediction mode of the current block based on a BDPCM prediction direction for the current block; generating a predicted block for the current block by performing intra prediction based on an intra prediction mode of the current block; generating a residual block of the current block based on the predicted block; encoding a residual block of the current block based on the BDPCM prediction direction; Including, The image encoding method includes:
10. The image encoding method, further comprising: encoding first information indicating only that the BDPCM is applied to chroma components of the current block.
7. 7. The image encoding method of claim 6, further comprising encoding second information indicating a BDPCM prediction direction for the current block.
8. 7. The image encoding method of claim 6, wherein the BDPCM prediction direction for the current block includes a horizontal direction or a vertical direction.
9. Determining an intra prediction mode of the current block based on a prediction direction of BDPCM for the current block includes: If the prediction direction of the BDPCM is horizontal, the intra prediction mode of the current block is determined to be horizontal mode; If the prediction direction of the BDPCM is vertical, the intra prediction mode of the current block is determined to be vertical mode; 7. The image coding method according to claim 6, further comprising:
10. An image decoding device, a memory and at least one processor; The at least one processor: Determine whether BDPCM (block difference pulse code modulation) is applied to the current block; If the BDPCM is applied to the current block, determining a prediction direction of the BDPCM for the current block; determining an intra prediction mode of the current block based on a BDPCM prediction direction for the current block; generating a residual block of the current block based on a prediction direction of the BDPCM; generating a predicted block of the current block by performing intra prediction based on an intra prediction mode of the current block; reconstructing the current block based on the residual block and the predicted block; The at least one processor may determine whether the BDPCM is applied to the current block by:
11. An image decoding apparatus comprising: parsing, from a bitstream, first information indicating only that the BDPCM is applied to chroma components of the current block.
11. The at least one processor determines a BDPCM prediction direction for the current block, 11. The image decoding apparatus of claim 10, further comprising parsing second information indicating a BDPCM prediction direction for the current block from a bitstream.
12. 11. The image decoding apparatus of claim 10, wherein a prediction direction of the BDPCM for the current block includes a horizontal direction or a vertical direction.
13. The at least one processor determines an intra prediction mode of the current block based on a prediction direction of BDPCM for the current block, If the prediction direction of the BDPCM is horizontal, determining an intra prediction mode of the current block as a horizontal mode; If the BDPCM prediction direction is vertical, determining an intra prediction mode of the current block as a vertical mode; 11. The image decoding device according to claim 10, further comprising:
14. 11. The image decoding device of claim 10, wherein the at least one processor further 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, a memory and at least one processor; The at least one processor: Determine whether BDPCM (block difference pulse code modulation) is applied to the current block; If the BDPCM is applied to the current block, determining a prediction direction of the BDPCM for the current block; determining an intra prediction mode of the current block based on a prediction direction of the BDPCM for the current block; generating a predicted block of the current block by performing intra prediction based on an intra prediction mode of the current block; generating a residual block of the current block based on the predicted block; encoding a residual block of the current block based on a prediction direction of the BDPCM; The image encoding device, wherein the at least one processor further encodes first information indicating that the BDPCM is applied only to the chroma components of the current block.
16. 16. The image encoding device of claim 15, wherein the at least one processor further encodes second information indicating a BDPCM prediction direction for the current block.
17. 16. The image encoding apparatus of claim 15, wherein a prediction direction of the BDPCM for the current block includes a horizontal direction or a vertical direction.
18. The at least one processor determines an intra prediction mode of the current block based on a prediction direction of the BDPCM for the current block, If the prediction direction of the BDPCM is horizontal, determining an intra prediction mode of the current block as a horizontal mode; If the BDPCM prediction direction is vertical, determining an intra prediction mode of the current block as a vertical mode; 16. The image encoding device according to claim 15, further comprising:
19. 1. A method for transmitting a bitstream, comprising: Executing the image coding method of claim 6 to generate a bitstream; transmitting the bitstream; A method for transmitting a bitstream including:
20. 1. A computer-readable storage medium, comprising: 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 according to claim 6 are realized to generate a bitstream. A computer-readable storage medium comprising:
Citation Information
Patent Citations
Method of residue differential pulse-code modulation for HEVC range extension
WO2015057438A1