Image decoding method and apparatus for residual coding in image coding system

The image decoding method optimizes residual coding by using availability flags for dependent quantization and TSRC to reduce bit usage and enhance coding efficiency in high-resolution image transmission and storage.

JP2026002922AActive Publication Date: 2026-01-08LG ELECTRONICS INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2025174921
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2020-02-05
Filing Date
2025-10-16
Publication Date
2026-01-08
Estimated Expiration
2041-02-05

AI Technical Summary

Technical Problem

The increasing demand for high-resolution, high-quality images leads to a significant increase in transmission and storage costs due to the large amount of information required, necessitating more efficient image coding techniques, particularly in residual coding.

Method used

An image decoding method that utilizes dependent quantization and transform skip residual coding (TSRC) availability flags to determine residual coding syntax, improving coding efficiency by signaling these flags appropriately to avoid redundant coding when TSRC is not available.

Benefits of technology

This approach enhances residual coding efficiency by reducing the number of coded bits and preventing redundant coding, thereby improving overall image coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026002922000001_ABST
    Figure 2026002922000001_ABST
Patent Text Reader

Abstract

To provide a method for improving the efficiency of residual coding.SOLUTION: An image decoding method comprising the steps of obtaining a dependent quantization availability flag, obtaining a TSRC availability flag based on the dependent quantization availability flag, determining a residual coding syntax for a current block based on the TSRC availability flag, obtaining residual information of the determined residual coding syntax for the current block, deriving residual samples of the current block based on the residual information, and generating a reconstructed picture based on the residual samples, the dependent quantization availability flag is a flag indicating whether dependent quantization is available, the TSRC availability flag is a flag indicating whether TSRC is available, and the TSRC availability flag is obtained based on the dependent quantization availability flag having a value of 0.SELECTED DRAWING: Figure 10
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This document relates to an image coding technology, and more particularly to an image decoding method and apparatus for coding flag information indicating whether TSRC is available when coding residual data of a current block in an image coding system. [Background technology]

[0002] Recently, the demand for high-resolution, high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images has been increasing in various fields. As the resolution and quality of image data increases, the amount of information or bits to be transmitted increases relatively compared to existing image data. Therefore, when image data is transmitted using a medium such as an existing wired or wireless broadband line or when image data is stored using an existing storage medium, transmission costs and storage costs increase.

[0003] Therefore, highly efficient image compression techniques are required to effectively transmit, store and reproduce high-resolution, high-quality image information. Summary of the Invention [Problem to be solved by the invention]

[0004] The technical problem of this document is to provide a method and apparatus for increasing image coding efficiency.

[0005] Another technical problem of this document is to provide a method and apparatus for improving the efficiency of residual coding. [Means for solving the problem]

[0006] According to one embodiment of the present document, there is provided an image decoding method executed by a decoding device, the method including the steps of: obtaining a dependent quantization available flag; obtaining a TSRC available flag based on the dependent quantization available flag; determining a residual coding syntax for a current block based on the TSRC available flag; obtaining residual information of the determined residual coding syntax for the current block; deriving residual samples of the current block based on the residual information; and generating a reconstructed picture based on the residual samples, wherein the dependent quantization available flag indicates whether dependent quantization is available, and the TSRC available flag indicates whether TSRC is available, and the TSRC available flag is obtained based on the dependent quantization available flag having a value of 0.

[0007] According to another embodiment of the present document, there is provided a decoding device for performing image decoding, the decoding device including: an entropy decoding unit that obtains a dependent quantization available flag, obtains a TSRC available flag based on the dependent quantization available flag, determines a residual coding syntax for a current block based on the TSRC available flag, and obtains residual information of the determined residual coding syntax for the current block, a residual processing unit that derives residual samples of the current block based on the residual information, and an adder unit that generates a reconstructed picture based on the residual samples, wherein the dependent quantization available flag indicates whether dependent quantization is available, and the TSRC available flag indicates whether TSRC is available, and the TSRC available flag is obtained based on the dependent quantization available flag having a value of 0.

[0008] According to yet another embodiment of the present document, there is provided a video encoding method executed by an encoding device, the method including the steps of: encoding a dependent quantization available flag; encoding a transform skip residual coding (TSRC) available flag based on the dependent quantization available flag; determining a residual coding syntax for a current block based on the TSRC available flag; encoding residual information of the determined residual coding syntax for the current block; and generating a bitstream including the dependent quantization available flag, the TSRC available flag, and the residual information, wherein the dependent quantization available flag indicates whether dependent quantization is available, the TSRC available flag indicates whether TSRC is available, and the TSRC available flag is encoded based on the dependent quantization available flag having a value of 0.

[0009] According to yet another embodiment of the present document, there is provided a video encoding device, the encoding device including an entropy encoding unit that encodes a dependent quantization available flag, encodes a transform skip residual coding (TSRC) available flag based on the dependent quantization available flag, determines a residual coding syntax for a current block based on the TSRC available flag, encodes residual information of the determined residual coding syntax for the current block, and generates a bitstream including the dependent quantization available flag, the TSRC available flag, and the residual information, wherein the dependent quantization available flag indicates whether dependent quantization is available, the TSRC available flag indicates whether TSRC is available, and the TSRC available flag is encoded based on the dependent quantization available flag having a value of 0.

[0010] According to yet another embodiment of the present document, there is provided a computer-readable digital storage medium having stored thereon a bitstream including image information for causing an image decoding method to be performed, the image decoding method including the steps of: obtaining a dependent quantization available flag; obtaining a transform skip residual coding (TSRC) available flag based on the dependent quantization available flag; determining a residual coding syntax for a current block based on the TSRC available flag; obtaining residual information of the determined residual coding syntax for the current block; deriving residual samples of the current block based on the residual information; and generating a reconstructed picture based on the residual samples, wherein the dependent quantization available flag indicates whether dependent quantization is available, and the TSRC available flag indicates whether TSRC is available, and the TSRC available flag is obtained based on the dependent quantization available flag having a value of 0. [Effects of the Invention]

[0011] According to this document, the efficiency of residual coding can be improved.

[0012] According to this document, a signaling relationship between the dependent quantization available flag and the TSRC available flag can be established to signal the TSRC available flag when dependent quantization is not available, thereby improving coding efficiency by not using dependent quantization when TSRC is not available and RRC syntax is coded for the transform skip block, thereby reducing the amount of coded bits and improving overall residual coding efficiency.

[0013] According to this document, the TSRC availability flag can be signaled only when dependent quantization is not used, thereby preventing the RRC syntax coding and the use of dependent quantization for the transform skip block from being performed redundantly, and allowing the TSRC availability flag to be coded more effectively, reducing the amount of bits and improving overall residual coding efficiency. [Brief explanation of the drawings]

[0014] [Figure 1] 1 illustrates schematically an example of a video / image coding system to which embodiments of the present document may be applied. [Figure 2] 1 is a diagram illustrating a schematic configuration of a video / image encoding device to which embodiments of the present document can be applied; [Figure 3] 1 is a diagram illustrating the configuration of a video / image decoding device to which the embodiments of the present document can be applied; [Figure 4] Illustrates an example of CABAC (context-adaptive binary arithmetic coding) for encoding syntax elements. [Figure 5] 1 is a diagram illustrating an example of transform coefficients in a 4x4 block. [Figure 6] 1 shows an exemplary scalar quantizer used in dependent quantization. [Figure 7] 10 illustrates an exemplary state transition and quantizer selection for dependent quantization. [Figure 8] 1 illustrates a schematic diagram of an image encoding method using an encoding device according to the present document. [Figure 9] 1 shows a schematic diagram of an encoding device for performing the image encoding method according to the present document; [Figure 10] 1 illustrates an image decoding method using a decoding device according to the present document. [Figure 11] 1 shows a schematic diagram of a decoding device for performing the image decoding method according to the present document; [Figure 12] 1 exemplarily illustrates a structural diagram of a content streaming system to which an embodiment of the present document is applied. DETAILED DESCRIPTION OF THE INVENTION

[0015] This document may be modified in various ways and may have various embodiments. Specific embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to the specific embodiment. Common terms used in this document are used merely to describe specific embodiments and are not intended to limit the technical ideas of this document. A singular expression includes a plural expression unless the context clearly dictates otherwise. In this specification, terms such as "comprise" or "have" are intended to specify the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0016] Meanwhile, each component in the drawings described in this document is illustrated independently for the convenience of explaining the different characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components may be combined to form a single component, or a single component may be divided into multiple components. Embodiments in which each component is integrated and / or separated are also within the scope of this document as long as they do not deviate from the essence of this document.

[0017] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used to refer to the same components in the drawings, and duplicated descriptions of the same components may be omitted.

[0018] FIG. 1 illustrates schematically an example of a video / image coding system in which embodiments of the present document may be applied.

[0019] As shown in Figure 1, a video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device in file or streaming form via a digital storage medium or a network.

[0020] The source device may include a video source, an encoding device, and a transmitting unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be called a video / image encoding device, and the decoding device may be called a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, which may be a separate device or an external component.

[0021] A video source can acquire video / images through a video / image capture, synthesis, or generation process. A video source can include a video / image capture device and / or a video / image generation device. A video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, virtual video / images can be generated via a computer, etc., in which case the video / image capture process can be replaced by a process in which the associated data is generated.

[0022] An encoding device can encode input video / images. The encoding device can perform a series of steps such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.

[0023] The transmitter may transmit the encoded video / image information or data output in the form of a bitstream to a receiver of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. The transmitter may include elements for generating a media file in a predetermined file format and elements for transmission via a broadcasting / communication network. The receiver may receive / extract the bitstream and transmit it to a decoding device.

[0024] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transform, prediction, etc., which correspond to the operations of the encoding device.

[0025] The renderer can render the decoded video / image, and the rendered video / image can be displayed via a display unit.

[0026] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the versatile video coding (VVC) standard, the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation of audio video coding standard (AVS2), or next generation video / image coding standards (e.g., H.267 or H.268).

[0027] This document presents various embodiments relating to video / image coding, which, unless otherwise stated, may also be implemented in combination with one another.

[0028] In this document, video may refer to a collection of a series of images over time. A picture generally refers to a unit that shows an image at a specific time, and a subpicture, slice, or tile is a unit that constitutes part of a picture in coding. A subpicture, slice, or tile may contain one or more coding tree units (CTUs). A picture may be composed of one or more subpictures, slices, or tiles. A picture may be composed of one or more groups of tiles. A tile group may contain one or more tiles. A brick may represent a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each consisting of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick.A brick scan refers to a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. Also, a subpicture may represent a rectangular region of one or more slices within a picture. That is, a subpicture contains one or more slices that collectively cover a rectangular region of a picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture.The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set. The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the height of the picture. A tile scan refers to a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in a CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture.A slice includes an integer number of bricks of a picture that maybe exclusively contained in a single NAL unit. A slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile. In this document, the terms tile group and slice may be used interchangeably. For example, in this document, tile group / tile group header may be called slice / slice header.

[0029] A pixel or a pel may refer to the smallest unit that constitutes one picture (or image). A "sample" may also be used as a term corresponding to a pixel. A sample may generally refer to a pixel or a pixel value, or may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component.

[0030] A unit may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to that region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. The term unit may be used interchangeably with terms such as block or area. In a general case, an M×N block may include samples (or a sample array) consisting of M columns and N rows, or a set (or an array) of transform coefficients.

[0031] As used herein, "A or B" may mean "A only," "B only," or "both A and B." In other words, as used herein, "A or B" may be interpreted as "A and / or B." For example, as used herein, "A, B, or C" may mean "A only," "B only," "C only," or "any combination of A, B, and C."

[0032] As used herein, a slash ( / ) or a comma may mean "and / or." For example, "A / B" may mean "A and / or B." Thus, "A / B" may mean "A only," "B only," or "both A and B." For example, "A, B, C" may mean "A, B, or C."

[0033] As used herein, "at least one of A and B" can mean "A only," "B only," or "both A and B." Furthermore, as used herein, the expressions "at least one of A or B" and "at least one of A and / or B" can be interpreted in the same way as "at least one of A and B."

[0034] Furthermore, in this specification, "at least one of A, B and C" can mean "A only," "B only," "C only," or "any combination of A, B and C." Furthermore, "at least one of A, B or C" and "at least one of A, B and / or C" can mean "at least one of A, B and C."

[0035] Furthermore, parentheses used in this specification may mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" may be proposed as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra prediction," and "intra prediction" may be proposed as an example of "prediction." Furthermore, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" may be proposed as an example of "prediction."

[0036] Technical features described separately in one drawing in this specification may be realized separately or simultaneously.

[0037] The following drawings are created to illustrate a specific example of the present specification. The names of specific devices and names of specific signals / messages / fields shown in the drawings are provided for illustrative purposes only, and the technical features of the present specification are not limited to the specific names used in the following drawings.

[0038] 2 is a diagram for explaining the configuration of a video / image encoding device to which the embodiments of this document can be applied. Hereinafter, the video encoding device may include an image encoding device.

[0039] As shown in FIG. 2, the encoding device 200 may include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter predictor 221 and an intra predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image dividing unit 210, the predicting unit 220, the residual processing unit 230, the entropy encoding unit 240, the adding unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chipset or a processor) depending on the embodiment. Also, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.

[0040] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree, binary-tree, ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into multiple coding units of deeper depths based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied first. The coding procedure according to this document may be performed based on the final coding unit that is not further divided. In this case, the largest coding unit may be immediately used as the final coding unit based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as needed, and the coding unit of the optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit.The prediction unit is a unit of sample prediction, and the transform unit is a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

[0041] The term "unit" can be used interchangeably with terms such as "block" or "area." In general, an MxN block can refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally refer to a pixel or pixel value, and can refer to only a pixel / pixel value of the luma component, or only a pixel / pixel value of the chroma component. A sample can also be used as a term corresponding to one pixel or pel of a picture (or image).

[0042] The encoding apparatus 200 may generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input image signal (original block, original sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, a unit in the encoder 200 that subtracts the prediction signal (predicted block, prediction sample array) from the input image signal (original block, original sample array) may be referred to as a subtraction unit 231. The prediction unit may perform prediction on a current block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied on a current block or CU basis. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction information can be encoded by the entropy encoding unit 240 and output in the form of a bitstream.

[0043] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away, depending on the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, DC mode and planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the granularity of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the settings. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.

[0044] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on an inter prediction direction (such as L0 prediction, L1 prediction, or Bi prediction). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), or the like, and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter predictor 221 may configure a motion information candidate list based on neighboring blocks and generate information indicating which candidates are used to derive a motion vector and / or a reference picture index for the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode or a merge mode, the inter predictor 221 may use motion information of neighboring blocks as motion information of the current block. In the case of the skip mode, unlike in the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block is used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0045] The predictor 220 may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may apply intra prediction or inter prediction for prediction of a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as combined inter and intra prediction (CIIP). The predictor may also use an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / video coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein. The palette mode may be seen as an example of intra coding or intra prediction. When the palette mode is applied, sample values ​​within a picture may be signaled based on information about a palette table and a palette index.

[0046] The prediction signal generated by the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) may be used to generate a reconstructed signal or a residual signal. The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, GBT refers to a transform obtained from a graph representing inter-pixel relationship information. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size or non-square blocks of variable size.

[0047] The quantizer 233 quantizes the transform coefficients and transmits them to the entropy encoder 240. The entropy encoder 240 encodes the quantized signal (information about the quantized transform coefficients) and outputs it as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoder 240 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. In addition to the quantized transform coefficients, the entropy encoder 240 may also encode information required for video / image restoration (e.g., values ​​of syntax elements, etc.) together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / image information) may be transmitted or stored in the form of a bitstream in units of network abstraction layer (NAL) units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may also include general constraint information. Information and / or syntax elements transmitted / signaled from an encoding device to a decoding device in this document may be included in the video / image information. The video / image information may be encoded through the above-described encoding procedure and included in the bitstream.The bitstream can be transmitted via a network or stored in a digital storage medium. Here, the network can include a broadcasting network and / or a communication network, and the digital storage medium can include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) for storing the signal can be configured as an internal / external element of the encoding device 200, or the transmitter can be included in the entropy encoding unit 240.

[0048] The quantized transform coefficients output from the quantization unit 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantization unit 234 and the inverse transform unit 235. The adder 250 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the current block, such as when skip mode is applied, a predicted block may be used as the reconstructed block. The adder 250 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, or may be used for inter prediction of the next picture after filtering, as described below.

[0049] Meanwhile, luma mapping with chroma scaling (LMCS) can be applied during picture encoding and / or reconstruction.

[0050] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture and store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 240, as will be described later in connection with each filtering method. The filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.

[0051] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 221. When inter prediction is applied through this, the encoding apparatus can avoid prediction mismatch between the encoding apparatus 200 and the decoding apparatus 300 and can also improve encoding efficiency.

[0052] The memory 270DPB may store modified reconstructed pictures for use as reference pictures in the inter predictor 221. The memory 270 may store motion information of blocks from which motion information in the current picture is derived (or encoded) and / or motion information of blocks in already reconstructed pictures. The stored motion information may be transmitted to the inter predictor 221 to be used as motion information of spatially neighboring blocks or temporally neighboring blocks. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 222.

[0053] FIG. 3 is a diagram illustrating the configuration of a video / image decoding device to which the embodiments of this document can be applied.

[0054] As shown in FIG. 3, the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter-predictor 331 and an intra-predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. The entropy decoder 310, residual processor 320, predictor 330, adder 340, and filter 350 may be configured as a single hardware component (e.g., a decoder chipset or processor) according to an embodiment. The memory 360 may include a decoded picture buffer (DPB) or may be configured as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.

[0055] When a bitstream including video / image information is input, the decoding device 300 can reconstruct an image corresponding to the process by which the video / image information was processed by the encoding device of FIG. 2. For example, the decoding device 300 can derive units / blocks based on block division-related information obtained from the bitstream. The decoding device 300 can perform decoding using a processing unit applied by the encoding device. Accordingly, the processing unit for decoding is, for example, a coding unit, and the coding unit can be divided from a coding tree unit or a maximal coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the coding unit. The reconstructed image signal decoded and output by the decoding device 300 can be reproduced through a playback device.

[0056] The decoding device 300 may receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may also include general constraint information. The decoding device may further decode pictures based on the information on the parameter sets and / or the general constraint information. Signaling / received information and / or syntax elements, which will be described later in this document, may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as Exponential-Golomb coding, CAVLC, or CABAC, and output values ​​of syntax elements required for image restoration, quantized values ​​of transform coefficients related to residuals, etc. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using information on the syntax element to be decoded and decoded information on neighboring and current blocks, or information on symbols / bins decoded in previous steps, predicts the occurrence probability of the bins according to the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values ​​of each syntax element. After determining the context model, the CABAC entropy decoding method may update the context model using information on the decoded symbols / bins for the context model of the next symbol / bin.Among the information decoded by the entropy decoding unit 310, information related to prediction is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values ​​entropy decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to a residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, among the information decoded by the entropy decoding unit 310, information related to filtering may be provided to a filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, the decoding device according to this document may be called a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.

[0057] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding device. The inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.

[0058] The inverse transform unit 322 performs inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0059] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information about the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.

[0060] The predictor 320 may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may apply intra prediction or inter prediction for predicting a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as combined inter and intra prediction (CIIP). The predictor may also use an intra block copy (IBC) prediction mode or a palette mode for predicting a block. The IBC prediction mode or palette mode may be used for content image / video coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be seen as an example of intra coding or intra prediction. When the palette mode is applied, information regarding a palette table and a palette index may be included in the video / image information and signaled.

[0061] The intra prediction unit 331 may predict a current block by referring to samples in a current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away from the current block depending on the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.

[0062] The inter prediction unit 332 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted from the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on the inter prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. For example, the inter prediction unit 332 may construct a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on received candidate selection information. Inter prediction may be performed based on various prediction modes, and the prediction information may include information indicating the inter prediction mode for the current block.

[0063] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a predicted signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as a reconstructed block.

[0064] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in the current picture, may be output after filtering as described below, or may be used for inter prediction of a next picture.

[0065] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during the picture decoding process.

[0066] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.

[0067] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter predictor 332. The memory 360 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter predictor 260 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 331.

[0068] In this specification, the embodiments described for the filtering unit 260, inter prediction unit 221, and intra prediction unit 222 of the encoding device 200 can also be applied identically or correspondingly to the filtering unit 350, inter prediction unit 332, and intra prediction unit 331 of the decoding device 300, respectively.

[0069] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When the quantization / dequantization is omitted, the quantized transform coefficients may be referred to as transform coefficients. When the transform / inverse transform is omitted, the transform coefficients may be referred to as coefficients or residual coefficients, or may still be referred to as transform coefficients for consistency of expression.

[0070] In this document, quantized transform coefficients and transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, residual information may include information about the transform coefficient(s), and the information about the transform coefficient(s) may be signaled via a residual coding syntax. Transform coefficients may be derived based on the residual information (or information about the transform coefficient(s)), and scaled transform coefficients may be derived through an inverse transform (scaling) of the transform coefficient(s). Residual samples may be derived based on an inverse transform (transform) of the scaled transform coefficient(s). This may be similarly applied / expressed in other parts of this document.

[0071] As described above, the encoding device performs various encoding methods, such as exponential Golomb coding, CAVLC (context-adaptive variable length coding), CABAC (context-adaptive binary arithmetic coding), etc. The decoding device decodes information in a bitstream based on a coding method, such as exponential Golomb coding, CAVLC, or CABAC, and outputs values ​​of syntax elements required for image restoration and quantized values ​​of transform coefficients related to residuals.

[0072] For example, the above coding method can be performed as described below.

[0073] FIG. 4 illustrates an example of CABAC (context-adaptive binary arithmetic coding) for encoding syntax elements. For example, in the CABAC encoding process, if an input signal is a syntax element that is not a binary value, an encoding device can convert the input signal into a binary value by binarizing the input signal. Also, if the input signal is already a binary value (i.e., the value of the input signal is a binary value), binarization can be bypassed. Here, each binary digit 0 or 1 constituting a binary value can be referred to as a bin. For example, if the binary string after binarization is 110, each of 1, 1, and 0 is referred to as a bin. The bin (etc.) for one syntax element can represent the value of the syntax element.

[0074] The binarized bins of the syntax elements can then be input to a regular encoding engine or a bypass encoding engine. The regular encoding engine of the encoding device can assign a context model reflecting a probability value to the bin and encode the bin based on the assigned context model. The regular encoding engine of the encoding device can update the context model for each bin after encoding the bin. A bin encoded as described above can be referred to as a context-coded bin.

[0075] Meanwhile, when the binarized bins of the syntax elements are input to the bypass encoding engine, they can be coded as follows. For example, the bypass encoding engine of the encoding device omits the steps of estimating the probability for the input bin and updating the probability model applied to the bin after encoding. When bypass encoding is applied, the encoding device can encode the input bin by applying a uniform probability distribution instead of assigning a context model, thereby improving the encoding speed. The bins encoded as described above can be referred to as bypass bins.

[0076] Entropy decoding can refer to the process of performing the same process as the entropy encoding described above in reverse order.

[0077] For example, when a syntax element is decoded based on a context model, a decoding device can receive a bin corresponding to the syntax element through a bitstream, determine a context model using the syntax element and decoding information of the block to be decoded or a neighboring block, or information on symbols / bins decoded in a previous step, predict the occurrence probability of the received bin based on the determined context model, and derive the value of the syntax element by performing arithmetic decoding of the bin. Thereafter, the context model of the bin to be decoded next can be updated to the determined context model.

[0078] For example, when a syntax element is bypass-decoded, a decoding device can receive a bin corresponding to the syntax element through a bitstream and decode the input bin by applying a uniform probability distribution. In this case, the decoding device can omit a procedure for deriving a context model for the syntax element and a procedure for updating the context model applied to the bin after decoding.

[0079] As described above, residual samples may be derived into quantized transform coefficients through a transform and quantization process. Quantized transform coefficients may also be referred to as transform coefficients. In this case, the transform coefficients in a block may be signaled in the form of residual information. The residual information may include a residual coding syntax. That is, an encoding device may construct a residual coding syntax as residual information, encode the residual coding syntax, and output it in the form of a bitstream. A decoding device may decode the residual coding syntax from the bitstream to derive residual (quantized) transform coefficients. The residual coding syntax may include syntax elements indicating whether a transform has been applied to the block, the position of the last significant transform coefficient in the block, whether significant transform coefficients exist in a sub-block, and the magnitude / sign of the significant transform coefficients, as will be described later.

[0080] For example, the syntax elements for encoding / decoding residual data can be expressed as shown in the following table.

[0081] [Table 1-1]

[0082] [Table 1-2]

[0083] [Table 1-3]

[0084] Transform_skip_flag indicates whether transform is skipped for an associated block. The transform_skip_flag may be a syntax element for a transform skip flag. The associated block may be a coding block (CB) or a transform block (TB). The terms CB and TB may be used interchangeably in relation to the transform (and quantization) and residual coding procedures. For example, as described above, residual samples may be derived for a CB, and (quantized) transform coefficients may be derived through transform and quantization of the residual samples. Information (e.g., syntax elements) efficiently representing the positions, magnitudes, signs, etc. of the (quantized) transform coefficients may be generated and signaled through the residual coding procedure. Quantized transform coefficients may be simply referred to as transform coefficients. Generally, if the CB is not larger than the maximum TB, the size of the CB may be the same as the size of the TB. In this case, the target block to be transformed (and quantized) and residual coded may be referred to as a CB or a TB. On the other hand, if CB is greater than the maximum TB, the target block to be transformed (and quantized) and residually coded may be referred to as TB. Hereinafter, it will be described that syntax elements related to residual coding are signaled in units of transform blocks TB, but this is merely an example, and as mentioned above, the TB may be used interchangeably with the coding block CB.

[0085] Meanwhile, the syntax elements signaled after the transform skip flag is signaled are the same as the syntax elements disclosed in Table 2 and / or Table 3 described below, and a detailed description of the syntax elements is provided below.

[0086] [Table 2-1]

[0087] [Table 2-2]

[0088] [Table 2-3]

[0089] [Table 2-4]

[0090] [Table 2-5]

[0091] [Table 2-6]

[0092] [Table 3-1]

[0093] [Table 3-2]

[0094] [Table 3-3]

[0095] According to this embodiment, as shown in Table 1, residual coding may be branched depending on the value of the syntax element transform_skip_flag of the transform skip flag. That is, different syntax elements may be used for residual coding depending on the value of the transform skip flag (depending on whether or not a transform skip is enabled). Residual coding used when a transform skip is not applied (i.e., a transform is applied) may be referred to as regular residual coding (RRC), and residual coding used when a transform skip is applied (i.e., a transform is not applied) may be referred to as transform skip residual coding (TSRC). The regular residual coding may also be referred to as general residual coding. The regular residual coding may also be referred to as a syntax structure of regular residual coding, and the transform skip residual coding may also be referred to as a syntax structure of transform skip residual coding. Table 2 may represent the syntax elements for residual coding when the value of transform_skip_flag is 0, i.e., when a transform is applied, and Table 3 may represent the syntax elements for residual coding when the value of transform_skip_flag is 1, i.e., when a transform is not applied.

[0096] Specifically, for example, a transform skip flag indicating whether a transform of a transform block is skipped may be parsed to determine whether the transform skip flag is 1. If the value of the transform skip flag is 0, syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gtx_flag, par_level_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level for residual coefficients of the transform block may be parsed, as shown in Table 2, and the residual coefficients may be derived based on the syntax elements. In this case, the syntax elements may be parsed sequentially, or the parsing order may be changed. Furthermore, the abs_level_gtx_flag may represent abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n][0] may be an example of the first transform coefficient level flag (abs_level_gt1_flag), and abs_level_gtx_flag[n][1] may be an example of the second transform coefficient level flag (abs_level_gt3_flag).

[0097] Referring to Table 2 above, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level may be encoded / decoded. Meanwhile, the sb_coded_flag may also be expressed as coded_sub_block_flag.

[0098] In one embodiment, the encoding apparatus may encode (x, y) position information of the last non-zero transform coefficient in a transform block based on syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. More specifically, the last_sig_coeff_x_prefix represents a prefix of the column position of the last significant coefficient in the scanning order within the transform block, the last_sig_coeff_y_prefix represents a prefix of the row position of the last significant coefficient in the scanning order within the transform block, the last_sig_coeff_x_suffix represents a suffix of the column position of the last significant coefficient in the scanning order within the transform block, and the last_sig_coeff_y_suffix represents a suffix of the row position of the last significant coefficient in the scanning order within the transform block. The significant coefficients may represent the non-zero coefficients. In addition, the scan order may be a right-up diagonal scan order. Alternatively, the scan order may be a horizontal scan order or a vertical scan order. The scan order may be determined based on whether intra / inter prediction is applied to the current block (CB, or CB including TB) and / or a specific intra / inter prediction mode.

[0099] Next, the encoding device divides the transform block into 4x4 sub-blocks, etc., and then uses a 1-bit syntax element coded_sub_block_flag for each 4x4 sub-block to indicate whether there is a non-zero coefficient in the current sub-block.

[0100] If the value of coded_sub_block_flag is 0, there is no more information to transmit, and the encoding apparatus can terminate the encoding process for the current sub-block. Conversely, if the value of coded_sub_block_flag is 1, the encoding apparatus can continue the encoding process for sig_coeff_flag. The sub-block containing the last non-zero coefficient does not need to be coded for coded_sub_block_flag, and since the sub-block containing DC information of the transform block is likely to contain non-zero coefficients, coded_sub_block_flag can be assumed to be 1 without being coded.

[0101] If coded_sub_block_flag is 1 and it is determined that a non-zero coefficient exists in the current sub-block, the encoding apparatus may encode sig_coeff_flag having a binary value in reverse scanning order. The encoding apparatus may encode the 1-bit syntax element sig_coeff_flag for each transform coefficient in scanning order. If the value of the transform coefficient at the current scanning position is non-zero, the value of sig_coeff_flag may be 1. In the case of a sub-block including the last non-zero coefficient, sig_coeff_flag does not need to be encoded for the last non-zero coefficient, so the encoding process for the sub-block may be omitted. Level information encoding may be performed only if sig_coeff_flag is 1, and four syntax elements may be used in the level information encoding process. More specifically, each sig_coeff_flag[xC][yC] may indicate whether the level (value) of the corresponding transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero. In one embodiment, the sig_coeff_flag may be an example of a syntax element of a significant coefficient flag indicating whether the quantized transform coefficient is a significant coefficient that is not zero.

[0102] The remaining level value after encoding for sig_coeff_flag can be derived as follows: That is, the syntax element remAbsLevel representing the level value to be encoded can be derived as follows: remAbsLevel = sig_coeff_flag + remAbsLevel + remAbsLevel + remAbsLevel + remAbsLevel

[0103]

number

[0104] Here, coeff means the actual transform coefficient value.

[0105] Furthermore, abs_level_gt1_flag may indicate whether the remAbsLevel at the corresponding scanning position (n) is greater than 1. For example, if the value of abs_level_gt1_flag is 0, the absolute value of the transform coefficient at the corresponding position may be 1. Furthermore, if the value of abs_level_gt1_flag is 1, the remAbsLevel, which indicates the level value to be coded thereafter, may be updated as shown in the following formula.

[0106]

number

[0107] In addition, the least significant coefficient (LSB) value of remAbsLevel described in the above equation 2 can be encoded as shown in the following equation 3 via par_level_flag.

[0108]

number

[0109] Here, par_level_flag[n] may represent the parity of the transform coefficient level (value) at scanning position n.

[0110] The level value remAbsLevel of the transform coefficient to be encoded after encoding par_level_flag can be updated as follows:

[0111]

number

[0112] abs_level_gt3_flag may indicate whether the remAbsLevel at the corresponding scanning position (n) is greater than 3. Encoding for abs_remainder can be performed only if abs_level_gt3_flag is 1. The relationship between the actual transform coefficient value coeff and each syntax element is as follows:

[0113]

number

[0114] The following table also shows examples related to the above equation (5).

[0115] [Table 4]

[0116] Here, |coeff| represents the level (value) of a transform coefficient and may be expressed as AbsLevel for the transform coefficient. Also, the sign of each coefficient can be encoded using coeff_sign_flag, which is a 1-bit symbol.

[0117] For example, when the value of the transform skip flag is 1, syntax elements sb_coded_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag, par_level_flag, and / or abs_remainder for residual coefficients of a transform block may be parsed, and the residual coefficients may be derived based on the syntax elements, as shown in Table 3. In this case, the syntax elements may be parsed sequentially, or the parsing order may be changed. Also, the abs_level_gtx_flag may represent abs_level_gt1_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and / or abs_level_gt9_flag. For example, abs_level_gtx_flag[n][j] may be a flag indicating whether the absolute value or level (value) of a transform coefficient at scanning position n is greater than (j<<1)+1, where (j<<1)+1 may be replaced with a predetermined threshold value such as a first threshold value or a second threshold value, depending on the case.

[0118] On the other hand, CABAC provides high performance but suffers from poor throughput. This is due to the regular encoding engine of CABAC. Regular encoding (i.e., encoding via the regular encoding engine of CABAC) uses probability states and ranges updated through encoding of previous bins, which exhibits high data dependency and can take a long time to read the probability interval and determine the current state. The throughput issue of CABAC can be resolved by limiting the number of context-coded bins. For example, as shown in Table 2 above, the sum of the bins used to represent sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag can be limited to a number based on the size of the block. Also, for example, as in Table 3 above, the sum of the bins used to represent sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag abs_level_gt5_flag, abs_level_gt7_flag, and abs_level_gt9_flag may be limited to a number depending on the size of the block. As an example, if the block is a 4x4 size block, the sum of bins for sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag or sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag may be limited to 32 (or, for example, 28), and if the block is a 2x2 size block, the sum of bins for sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag may be limited to 8 (or, for example, 7).The limited number of bins may be represented by remBinsPass1 or RemCcbs. Alternatively, for example, for higher CABAC throughput, the number of context coded bins may be limited for a block (CB or TB) including a CG to be coded. In other words, the number of context coded bins may be limited in units of blocks (CB or TB). For example, if the size of the current block is 16x16, the number of context coded bins for the current block may be limited to 1.75 times the number of pixels of the current block, i.e., 448, regardless of the current CG.

[0119] In this case, when the encoding device has used all of the limited number of context coding bins for encoding the context elements, it can perform bypass coding by binarizing the remaining coefficients through a binarization method for the coefficients described below without using context coding. In other words, for example, when the number of context coded bins coded for a 4x4 CG becomes 32 (or, for example, 28), or the number of context coded bins coded for a 2x2 CG becomes 8 (or, for example, 7), sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag coded in the context coding bins may not be coded any more, and may be coded immediately in dec_abs_level. Alternatively, for example, if the number of context coded bins coded for a 4x4 block is limited to 1.75 times the number of pixels in the entire block, i.e., 28, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag coded in the context coded bins may not be coded any further and may be immediately coded in dec_abs_level as shown in Table 5 below.

[0120] [Table 5]

[0121] The |coeff| value may be derived based on dec_abs_level. In this case, the conversion coefficient value |coeff| may be derived as follows:

[0122]

number

[0123] Furthermore, the coeff_sign_flag indicates the sign of the transform coefficient level at the scanning position (n). That is, the coeff_sign_flag indicates the sign of the transform coefficient at the scanning position (n).

[0124] FIG. 5 is a diagram illustrating an example of transform coefficients in a 4×4 block.

[0125] The 4x4 blocks in Figure 5 represent an example of quantized coefficients. The blocks shown in Figure 5 may be 4x4 transform blocks or 4x4 sub-blocks of 8x8, 16x16, 32x32, or 64x64 transform blocks. The 4x4 blocks in Figure 5 represent luma or chroma blocks.

[0126] Meanwhile, as described above, when an input signal is a syntax element that is not a binary value, the encoding device can binarize the value of the input signal to convert the input signal to a binary value. Furthermore, the decoding device can decode the syntax element to derive a binarized value (i.e., a binarized bin) of the syntax element, and can debinarize the binarized value to derive the value of the syntax element. The binarization process can be performed using a truncated Rice (TR) binarization process, a k-th order Exp-Golomb (EGk) binarization process, a k-th order Limited Exp-Golomb (Limited k-th order Exp-Golomb, Limited EGk), a fixed-length (FL) binarization process, or the like, which will be described later. Also, the inverse binarization process may represent a process of deriving the value of the syntax element based on the TR binarization process, the EGk binarization process, or the FL binarization process.

[0127] For example, the TR binarization process can be performed as follows.

[0128] The input of the TR binarization process may be the TR binarization request and the syntax element cMax and cRiceParam, and the output of the TR binarization process may be the TR binarization for the value symbolVal corresponding to the bin string.

[0129] Specifically, for example, if a suffix bin string exists for a syntax element, the TR bin string for the syntax element may be a concatenation of a prefix bin string and a suffix bin string, and if the suffix bin string does not exist, the TR bin string for the syntax element may be the prefix bin string. For example, the prefix bin string may be derived as described below.

[0130] The prefix value of the symbolVal for the syntax element can be derived as follows:

[0131]

number

[0132] Here, prefixVal may represent a prefix value of the symbolVal. The prefix of the TR bin string of the syntax element (i.e., prefix bin string) may be derived as described below.

[0133] For example, if prefixVal is smaller than cMax>>cRiceParam, the prefix bin string can be a bit string of length prefixVal+1 indexed by binIdx. That is, if prefixVal is smaller than cMax>>cRiceParam, the prefix bin string can be a bit string of prefixVal+1 bits pointed to by binIdx. The bin for binIdx smaller than prefixVal can be equal to 1. Also, the bin for binIdx equal to prefixVal can be equal to 0.

[0134] For example, the bit string derived by unary binarization for the prefixVal can be as shown in the following table.

[0135]

Table 6

[0136] On the other hand, when the prefixVal is not less than cMax >> cRiceParam, the prefix bit string can be a bit string with a length of cMax >> cRiceParam and all bits being 1.

[0137] Also, when cMax is greater than symbolVal and cRiceParam is greater than 0, a suffix bit string of the TR bit string may exist. For example, the suffix bit string can be derived as described later.

[0138] The suffix value of the symbolVal for the syntax element can be derived as in the following formula.

[0139]

Equation

[0140] Here, suffixVal can represent the suffix value of the symbolVal.

[0141] The suffix of the TR bit string (i.e., the suffix bit string) can be derived based on the FL binarization process for suffixVal where the cMax value is (1 << cRiceParam) - 1.

[0142] On the other hand, if the value of the input parameter cRiceParam is 0, the TR binarization can be exactly truncated unary binarization, and the cMax value can always be the same as the maximum possible value of the syntax element being decoded.

[0143] Also, for example, the EGk binarization process can be performed as follows: The syntax elements coded by ue(v) can be Exp-Golomb coded syntax elements.

[0144] As an example, a 0-th order Exp-Golomb (EG0) binarization process can be performed as follows.

[0145] The parsing process for the syntax element can begin by reading the bits containing the first non-zero bit starting from the current position in the bitstream and counting the number of leading bits such as 0. This process can be represented as follows:

[0146] [Table 7]

[0147] The variable codeNum can be derived using the following formula:

[0148]

number

[0149] Here, the value returned by read_bits(leadingZeroBits), i.e., the value represented by read_bits(leadingZeroBits), can be interpreted as a binary representation of an unsigned integer for the most significant bit recorded first.

[0150] The structure of the Exp-Golomb code, which separates the bit string into "prefix" bits and "suffix" bits, can be represented as shown in the following table.

[0151] [Table 8]

[0152] The "prefix" bits are the bits parsed as described above for the leadingZeroBits calculation, and can be represented as 0 or 1 in the bit string in Table 8. That is, a bit string starting with 0 or 1 in Table 8 above can indicate a prefix bit string. The "suffix" bits are the bits parsed in the codeNum calculation, and are represented as xi in Table 8 above. That is, a bit string starting with xi in Table 8 above can indicate a suffix bit string, where i can be a value ranging from 0 to LeadingZeroBits-1. Also, each xi can be equal to 0 or 1.

[0153] The bit strings assigned to the codeNum are as shown in the following table.

[0154] [Table 9]

[0155] If the descriptor of a syntax element is ue(v), that is, if the syntax element is coded with ue(v), the value of the syntax element may be the same as codeNum.

[0156] Also, for example, the EGk binarization process can be performed as follows.

[0157] An input of the EGk binarization process may be a request for EGk binarization, and an output of the EGk binarization process may be an EGk binarization for a value symbolVal corresponding to a bin string.

[0158] The bit string of the EGk binarization process for symbolVal can be derived as follows:

[0159] [Table 10]

[0160] Referring to Table 10 above, a binary value X can be added to the end of the bin string via each call of put(x), where x can be 0 or 1.

[0161] Also, for example, the Limited EGk binarization process can be performed as follows.

[0162] The input of the Limited EGk binarization process may be a request for Limited EGk binarization and a Rice parameter riceParam, a variable representing the binary logarithm of the maximum value log2TransformRange, and a variable representing the maximum prefix extension length maxPreExtLen. Also, the output of the Limited EGk binarization process may be Limited EGk binarization for the value symbolVal corresponding to the bin string.

[0163] The bit string of the Limited EGk binarization process for symbolVal can be derived as follows:

[0164] [Table 11]

[0165] Also, for example, the FL binarization process can be performed as follows.

[0166] The input of the FL binarization process may be a request for FL binarization and cMax for the syntax element, and the output of the FL binarization process may be the FL binarization for the value symbolVal corresponding to the bin string.

[0167] FL binarization may be performed using a bit string having a number of bits that is a fixed length of the symbol value symbolVal. Here, the fixed length bit string may be an unsigned integer bit string. That is, a bit string for the symbol value symbolVal may be derived by FL binarization, and the bit length (i.e., the number of bits) of the bit string may be a fixed length.

[0168] For example, the fixed length can be derived as follows:

[0169]

number

[0170] The indexing of bins for FL binarization may be a method using values ​​that increase in order from the most significant bit to the least significant bit. For example, the bin index associated with the most significant bit may be binIdx=0.

[0171] Meanwhile, for example, the binarization process for the syntax element abs_remainder of the residual information can be performed as follows.

[0172] The inputs of the binarization process for the abs_remainder may be a binarization request for the syntax element abs_remainder[n], a color component cIdx, and a luma position (x0, y0). The luma position (x0, y0) may refer to the top left sample of the current luma transform block relative to the top left luma sample of the picture.

[0173] The output of the binarization process for the abs_remainder may be the binarization of the abs_remainder (i.e., the binarized bin string of the abs_remainder). The binarization process may derive an available bin string for the abs_remainder.

[0174] The Rice parameter cRiceParam for the abs_remainder[n] can be derived through a Rice parameter derivation process that is performed using the color component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth, which is the binary logarithm of the width of the transform block, and log2TbHeight, which is the binary logarithm of the height of the transform block, as inputs. The Rice parameter derivation process will be described in detail below.

[0175] Also, for example, cMax for the currently coded abs_remainder[n] can be derived based on the Rice parameter cRiceParam. The cMax can be derived as follows:

[0176]

number

[0177] Meanwhile, the binarization for the abs_remainder, i.e., the bin string for the abs_remainder, may be the concatenation of a prefix bin string and a suffix bin string if a suffix bin string exists, or may be the prefix bin string if the suffix bin string does not exist.

[0178] For example, the prefix bin string may be derived as described below.

[0179] The prefix value prefixVal of the abs_remainder[n] can be derived as follows:

[0180]

number

[0181] The prefix of the bin string of the abs_remainder[n] (ie, the prefix bin string) may be derived through a TR binarization process on the prefixVal using the cMax and the cRiceParam as inputs.

[0182] If the prefix bin string is identical to a bit string with all bits equal to 1 and a bit length of 6, then there may be a suffix bin string of the bin string of abs_remainder[n], which may be derived as described below.

[0183] The Rice parameter for abs_remainder[n] is derived as follows.

[0184] Inputs of the Rice parameter derivation process may be a color component index cIdx, a luma position (x0, y0), a current coefficient scan position (xC, yC), log2TbWidth, which is the binary logarithm of the width of the transform block, and log2TbHeight, which is the binary logarithm of the height of the transform block. The luma position (x0, y0) may refer to the top-left sample of the current luma transform block relative to the top-left luma sample of the picture. Also, an output of the Rice parameter derivation process may be the Rice parameter cRiceParam.

[0185] For example, based on a given component index cIdx and an array AbsLevel[x][y] for a transform block having the upper-left luma position (x0, y0), the variable locSumAbs can be derived as shown in the pseudo code disclosed in the following table:

[0186] [Table 12]

[0187] Then, based on the given variable locSumAbs, the rice parameter cRiceParam can be derived as shown in the following table:

[0188] [Table 13]

[0189] Also, for example, in the process of deriving the Rice parameter for abs_remainder[n], baseLevel can be set to 4.

[0190] Alternatively, the Rice parameter cRiceParam may be determined based on whether or not a transform skip is performed on the current block. That is, if no transform is applied to the current TB including the current CG, in other words, if a transform skip is applied to the current TB including the current CG, the Rice parameter cRiceParam may be derived as 1.

[0191] In addition, the suffix value suffixVal of the abs_remainder can be derived as follows:

[0192]

number

[0193] The suffix bin string of the bin string of the abs_remainder can be derived by a Limited EGk binarization process on the suffixVal, where k is set to cRiceParam+1, riceParam is set to cRiceParam, log2TransformRange is set to 15, and maxPreExtLen is set to 11.

[0194] Meanwhile, for example, the binarization process for the syntax element dec_abs_level of the residual information can be performed as follows.

[0195] Inputs to the binarization process for the dec_abs_level may include a binarization request for the syntax element dec_abs_level[n], a color component cIdx, a luma position (x0, y0), a current coefficient scan position (xC, yC), log2TbWidth, which is the binary logarithm of the width of the transform block, and log2TbHeight, which is the binary logarithm of the height of the transform block. The luma position (x0, y0) may refer to the top left sample of the current luma transform block based on the top left luma sample of the picture.

[0196] The output of the binarization process for the dec_abs_level may be the binarization of the dec_abs_level (i.e., the binarized bin string of the dec_abs_level). The binarization process may derive an available bin string for the dec_abs_level.

[0197] The Rice parameter cRiceParam for the dec_abs_level[n] can be derived through a Rice parameter derivation process that uses the color component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth, which is the binary logarithm of the width of the transform block, and log2TbHeight, which is the binary logarithm of the height of the transform block, as inputs. The Rice parameter derivation process will be described in detail later.

[0198] Also, for example, cMax for the dec_abs_level[n] can be derived based on the rice parameter cRiceParam. The cMax can be derived as follows:

[0199]

number

[0200] Meanwhile, the binarization for the dec_abs_level[n], i.e., the bin string for the dec_abs_level[n], may be the concatenation of a prefix bin string and a suffix bin string if a suffix bin string exists, or may be the prefix bin string if the suffix bin string does not exist.

[0201] For example, the prefix bin string can be derived as described below.

[0202] The prefix value prefixVal of the dec_abs_level[n] can be derived as follows:

[0203]

number

[0204] The prefix of the bin string of the dec_abs_level[n] (ie, the prefix bin string) can be derived by a TR binarization process on the prefixVal using the cMax and the cRiceParam as inputs.

[0205] If the prefix bin string is identical to a bit string with all bits equal to 1 and a bit length of 6, then a suffix bin string of the bin string of dec_abs_level[n] may exist and may be derived as described below.

[0206] The Rice parameter derivation process for dec_abs_level[n] can be as follows.

[0207] Inputs of the Rice parameter derivation process may be a color component index cIdx, a luma position (x0, y0), a current coefficient scan position (xC, yC), log2TbWidth, which is the binary logarithm of the width of the transform block, and log2TbHeight, which is the binary logarithm of the height of the transform block. The luma position (x0, y0) may refer to the top left sample of the current luma transform block based on the top left luma sample of the picture. In addition, an output of the Rice parameter derivation process may be the Rice parameter cRiceParam.

[0208] For example, based on a given component index cIdx and an array AbsLevel[x][y] for a transform block having the top left luma position (x0, y0), the variable locSumAbs can be derived as shown in the pseudo code in the following table.

[0209] [Table 14]

[0210] Then, based on the given variable locSumAbs, the rice parameter cRiceParam can be derived as shown in the following table.

[0211] [Table 15]

[0212] Also, for example, in the process of deriving the Rice parameter for dec_abs_level[n], baseLevel can be set to 0, and ZeroPos[n] can be derived as follows:

[0213]

number

[0214] Also, the suffix value suffixVal of the dec_abs_level[n] can be derived as follows:

[0215]

number

[0216] The suffix bin string of the bin string of the dec_abs_level[n] can be derived through a Limited EGk binarization process on the suffixVal, where k is set to cRiceParam+1, truncSuffixLen is set to 15, and maxPreExtLen is set to 11.

[0217] Meanwhile, the above-mentioned RRC and TSRC may have the following differences.

[0218] For example, the Rice parameter cRiceParam of the syntax elements abs_remainder[] and dec_abs_level[] in RRC may be derived based on the locSumAbs, look-up table, and / or baseLevel as described above, but the Rice parameter cRiceParam of the syntax element abs_remainder[] in TSRC may be derived as 1. That is, for example, if a transform skip is applied to a current block (e.g., a current TB), the Rice parameter cRiceParam for abs_remainder[] of TSRC for the current block may be derived as 1.

[0219] - Also, for example, referring to Tables 3 and 4, abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1] may be signaled in RRC, while abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3] and abs_level_gtx_flag[n][4] may be signaled in TSRC. Here, the abs_level_gtx_flag[n][0] may be expressed as abs_level_gt1_flag or the first coefficient level flag, the abs_level_gtx_flag[n][1] may be expressed as abs_level_gt3_flag or the second coefficient level flag, the abs_level_gtx_flag[n][2] may be expressed as abs_level_gt5_flag or the third coefficient level flag, the abs_level_gtx_flag[n][3] may be expressed as abs_level_gt7_flag or the fourth coefficient level flag, and the abs_level_gtx_flag[n][4] may be expressed as abs_level_gt9_flag or the fifth coefficient level flag. Specifically, the first coefficient level flag may be a flag indicating whether the coefficient level is greater than a first threshold value (e.g., 1), the second coefficient level flag may be a flag indicating whether the coefficient level is greater than a second threshold value (e.g., 3), the third coefficient level flag may be a flag indicating whether the coefficient level is greater than a third threshold value (e.g., 5), the fourth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fourth threshold value (e.g., 7), and the fifth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fifth threshold value (e.g., 9). As described above, compared to the RRC, the TSRC may further include abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and abs_level_gtx_flag[n][4] in addition to abs_level_gtx_flag[n][0] and abs_level_gtx_flag[n][1].

[0220] Also, for example, the syntax element coeff_sign_flag may be bypass coded in RRC, but the syntax element coeff_sign_flag may be bypass coded or context coded in TSRC.

[0221] Furthermore, dependent quantization can be proposed for the quantization process of residual samples. Dependent quantization may refer to a scheme in which a set of reconstruction values ​​allowed for a current transform coefficient depends on the value of a transform coefficient preceding the current transform coefficient in the reconstruction order (the value of the transform coefficient level). That is, for example, dependent quantization can be implemented by (a) defining two scalar quantizers for each reconstruction level, and (b) defining a process for switching between the scalar quantizers. Compared to existing independent scalar quantization, dependent quantization may have the advantage that allowed reconstruction vectors are more densely packed in an N-dimensional vector space. Here, N may represent the number of transform coefficients in a transform block.

[0222] FIG. 6 exemplarily illustrates a scalar quantizer used in dependent quantization. Referring to FIG. 6, the position of available reconstruction levels may be designated as the quantization step size Δ. Referring to FIG. 6, the scalar quantizers may be represented by Q0 and Q1. The scalar quantizer used may be derived without being explicitly signaled in the bitstream. For example, the quantizer used for a current transform coefficient may be determined by the parity of the transform coefficient level preceding the current transform coefficient in the coding / reconstruction order.

[0223] FIG. 7 shows an exemplary state transition and quantizer selection for dependent quantization.

[0224] Referring to Figure 7, switching between two scalar quantizers (Q0 and Q1) can be realized by a state machine with four states. The four states can have four different values ​​(0, 1, 2, 3). The state for a current transform coefficient can be determined by the parity of the transform coefficient level before the current transform coefficient in the coding / decoding order.

[0225] For example, when an inverse quantization process for a transform block is initiated, the state for dependent quantization may be set to 0. Thereafter, the transform coefficients for the transform block may be restored in scan order (i.e., the same order as those entropy decoded). For example, after a current transform coefficient is restored, the state for dependent quantization may be updated as shown in FIG. 7. The inverse quantization process for transform coefficients restored after the current transform coefficient is restored in the scan order may be performed based on the updated state. k shown in FIG. 7 may represent the value of a transform coefficient, i.e., the level value of a transform coefficient. For example, if the current state is 0, if k (the value of the current transform coefficient) & 1 is 0, the state may be updated to 0, and if k & 1 is 1, the state may be updated to 2. Also, for example, if the current state is 1, if k & 1 is 0, the state may be updated to 2, and if k & 1 is 1, the state may be updated to 0. Also, for example, if the current state is 2, if k&1 is 0, the state may be updated to 1, and if k&1 is 1, the state may be updated to 3. Also, for example, if the current state is 3, if k&1 is 0, the state may be updated to 3, and if k&1 is 1, the state may be updated to 1. Referring to Figure 7, if the state is one of 0 and 1, the scalar quantizer used in the inverse quantization process may be Q0, and if the state is one of 2 and 3, the scalar quantizer used in the inverse quantization process may be Q1. The transform coefficients may be inverse quantized based on a quantization parameter for the restoration level of the transform coefficients by the scalar quantizer for the current state.

[0226] Meanwhile, this document proposes embodiments related to residual data coding. The embodiments described in this document may be combined with each other. As mentioned above, residual data coding methods may include Regular Residual Coding (RRC) and Transform Skip Residual Coding (TSRC).

[0227] Of the two methods, the residual data coding method for the current block may be determined based on the values ​​of transform_skip_flag and sh_ts_residual_coding_disabled_flag, as shown in Table 1. Here, the syntax element sh_ts_residual_coding_disabled_flag may indicate whether the TSRC is available. Therefore, even if the transform_skip_flag indicates that the transform is skipped, if the sh_ts_residual_coding_disabled_flag indicates that the TSRC is not available, a syntax element according to RRC may be signaled for the transform skipped block. That is, if the value of transform_skip_flag is 0 or the value of slice_ts_residual_coding_disabled_flag is 1, RRC may be used, and in other cases, TSRC may be used.

[0228] Although the slice_ts_residual_coding_disabled_flag can be used to achieve high coding efficiency in certain applications (e.g., lossless coding, etc.), existing video / image coding standards do not propose any restrictions on when the aforementioned dependent quantization and the slice_ts_residual_coding_disabled_flag are used together. That is, when dependent quantization is activated at a higher level (e.g., sequence parameter set (SPS) syntax / video parameter set (VPS) syntax / decoding parameter set (DPS) syntax / picture header syntax / slice header syntax, etc.) or a lower level (CU / TU) and the slice_ts_residual_coding_disabled_flag is 1, coding performance may be reduced by performing an unnecessary operation (i.e., an operation based on dependent quantization) using a value dependent on the state of dependent quantization in RRC, or an unintended loss of coding performance may occur due to an incorrect setting in the encoding device. Therefore, in this embodiment, a proposal is proposed to set a dependency / constraint between the two technologies in order to prevent unintended coding loss or malfunction when dependent quantization and residual coding when slice_ts_residual_coding_disabled_flag=1 are used together (i.e., coding residual samples of a transform skip block in the current slice by RRC).

[0229] In one embodiment, this document proposes a method in which slice_ts_residual_coding_disabled_flag is subordinate to ph_dep_quant_enabled_flag. For example, the syntax elements proposed in this embodiment are as shown in the following table.

[0230] [Table 16]

[0231] According to this embodiment, the slice_ts_residual_coding_disabled_flag may be signaled when the value of the ph_dep_quant_enabled_flag is 0. Here, the ph_dep_quant_enabled_flag may indicate whether dependent quantization is enabled. For example, when the value of the ph_dep_quant_enabled_flag is 1, the ph_dep_quant_enabled_flag may indicate that dependent quantization is enabled, and when the value of the ph_dep_quant_enabled_flag is 0, the ph_dep_quant_enabled_flag may indicate that dependent quantization is not enabled.

[0232] Therefore, according to this embodiment, slice_ts_residual_coding_disabled_flag may be signaled only when the dependent quantization is not available, and when the dependent quantization is available and the slice_ts_residual_coding_disabled_flag is not signaled, the slice_ts_residual_coding_disabled_flag may be regarded as 0 (infer). Meanwhile, the ph_dep_quant_enabled_flag and the slice_ts_residual_coding_disabled_flag may be signaled in a picture header syntax and / or a slice header syntax, or may be signaled in another higher level syntax (High Level Syntax, HLS) (e.g., SPS syntax / VPS syntax / DPS syntax, etc.) or a lower level (CU / TU) other than the picture header syntax and slice header syntax. If the ph_dep_quant_enabled_flag is signaled in a syntax other than the picture header syntax, it may be called by another name, for example, the ph_dep_quant_enabled_flag may be represented as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or sps_dep_quant_enabled_flag.

[0233] Furthermore, this document proposes another embodiment for setting a dependency / constraint between dependent quantization and residual coding when slice_ts_residual_coding_disabled_flag=1 (i.e., coding residual samples of a transform skip block in the current slice by RRC). For example, this embodiment proposes a scheme in which the state of dependent quantization is not used in coding level values ​​of transform coefficients when the value of slice_ts_residual_coding_disabled_flag is 1, in order to prevent unintended coding loss or malfunctions caused by the combined use of dependent quantization and residual coding when slice_ts_residual_coding_disabled_flag=1 (i.e., coding residual samples of a transform skip block in the current slice by RRC). The syntax of residual coding according to this embodiment is as shown in the following table.

[0234] [Table 17-1]

[0235] [Table 17-2]

[0236] [Table 17-3]

[0237] [Table 17-4]

[0238] [Table 17-5]

[0239] [Table 17-6]

[0240] Referring to Table 17 above, when the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, a QState may be derived, and a transform coefficient value (transform coefficient level) may be derived based on the QState. For example, referring to Table 17, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived by (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] may be the absolute value of the transform coefficient derived based on the transform coefficient syntax element, coeff_sign_flag[n] may be a sign flag syntax element representing the sign of the transform coefficient, and (QState>1?1:0) may represent that the value is 1 when the value of the state QState is greater than 1, i.e., when the value of the state QState is 2 or 3, and 0 when the value of the state QState is less than or equal to 1, i.e., when the value of the state QState is 0 or 1.

[0241] Also, referring to Table 17, when the value of slice_ts_residual_coding_disabled_flag is 1, the value of the transform coefficient (transform coefficient level) may be derived without using the QState. For example, referring to Table 17, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived by AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]), where AbsLevel[xC][yC] may be the absolute value of the transform coefficient derived based on the transform coefficient syntax element, and coeff_sign_flag[n] may be a sign flag syntax element indicating the sign of the transform coefficient.

[0242] Also, according to this embodiment, if the value of slice_ts_residual_coding_disabled_flag is 1, the dependent quantization state is not used in coding the level values ​​of the transform coefficients, and updating of the state may not be performed. For example, the syntax of residual coding according to this embodiment is as shown in the following table.

[0243] [Table 18-1]

[0244] [Table 18-2]

[0245] [Table 18-3]

[0246] [Table 18-4]

[0247] [Table 18-5]

[0248] [Table 18-6]

[0249] Referring to Table 18 above, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, QState may be updated. For example, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, QState may be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. Also, if the value of slice_ts_residual_coding_disabled_flag is 1, the process of updating QState may not be performed.

[0250] Also, referring to Table 18 above, when the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, the value of the transform coefficient (transform coefficient level) may be derived based on the QState. For example, referring to Table 18, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] may be the absolute value of the transform coefficient derived based on the transform coefficient syntax element, coeff_sign_flag[n] may be a syntax element of a sign flag representing the sign of the transform coefficient, and (QState>1?1:0) may represent that the value is 1 when the value of the state QState is greater than 1, i.e., when the value of the state QState is 2 or 3, and 0 when the value of the state QState is less than or equal to 1, i.e., when the value of the state QState is 0 or 1.

[0251] Also, referring to Table 18, when the value of slice_ts_residual_coding_disabled_flag is 1, the value of the transform coefficient (transform coefficient level) may be derived without using the QState. For example, referring to Table 18, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived by AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]), where AbsLevel[xC][yC] may be the absolute value of the transform coefficient derived based on the transform coefficient syntax element, and coeff_sign_flag[n] may be a sign flag syntax element indicating the sign of the transform coefficient.

[0252] This document also proposes another embodiment for setting a dependency / constraint between dependent quantization and residual coding (i.e., coding residual samples of a transform skip block in a current slice by RRC) when slice_ts_residual_coding_disabled_flag=1. For example, this embodiment proposes adding a constraint using transform_skip_flag to a process of updating the state of dependent quantization in RRC or deriving the value of a transform coefficient (transform coefficient level) depending on the state. That is, this embodiment proposes not to use a process of updating the state of dependent quantization in RRC and / or deriving the value of a transform coefficient (transform coefficient level) depending on the state based on the transform_skip_flag. The syntax of residual coding according to this embodiment is as shown in the following table.

[0253] [Table 19-1]

[0254] [Table 19-2]

[0255] [Table 19-3]

[0256] [Table 19-4]

[0257] [Table 19-5]

[0258] [Table 19-6]

[0259] Referring to Table 19 above, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, QState may be updated. For example, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, QState may be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. Also, if the value of transform_skip_flag is 1, the process of updating QState may not be performed.

[0260] Also, referring to Table 19 above, when the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, a QState may be derived, and a transform coefficient value (transform coefficient level) may be derived based on the QState. For example, referring to Table 19, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived by (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] may be the absolute value of the transform coefficient derived based on the transform coefficient syntax element, coeff_sign_flag[n] may be a syntax element of a sign flag representing the sign of the transform coefficient, and (QState>1?1:0) may represent that the value is 1 when the value of the state QState is greater than 1, i.e., when the value of the state QState is 2 or 3, and 0 when the value of the state QState is less than or equal to 1, i.e., when the value of the state QState is 0 or 1.

[0261] Also, referring to Table 19, when the value of transform_skip_flag is 1, the value of the transform coefficient (transform coefficient level) may be derived without using the QState. Therefore, when residual data is coded by RRC for a transform skip block, the value of the transform coefficient may be derived without using QState. For example, referring to Table 19, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] may be the absolute value of the transform coefficient derived based on the transform coefficient syntax element, and coeff_sign_flag[n] may be a syntax element of a sign flag indicating the sign of the transform coefficient.

[0262] Meanwhile, as described above, the information (syntax elements) in the syntax tables disclosed in this document can be included in image / video information, configured / encoded by an encoding device, and transmitted to a decoding device in the form of a bitstream. The decoding device can parse / decode the information (syntax elements) in the syntax tables. The decoding device can perform a block / image / video reconstruction procedure based on the decoded information.

[0263] FIG. 8 schematically illustrates an image encoding method by an encoding device according to the present disclosure. The method disclosed in FIG. 8 may be performed by the encoding device disclosed in FIG. 2. Specifically, for example, steps S800 to S840 in FIG. 8 may be performed by an entropy encoding unit of the encoding device. Also, although not shown, a process of deriving predicted samples may be performed by a prediction unit of the encoding device, a process of deriving residual samples for the current block based on original samples and predicted samples for the current block may be performed by a subtraction unit of the encoding device, and a process of generating reconstructed samples and reconstructed pictures for the current block based on the residual samples and predicted samples for the current block may be performed by an addition unit of the encoding device.

[0264] The encoding device encodes a dependent quantization available flag (S800). The encoding device may encode a dependent quantization available flag indicating whether dependent quantization is available. The image information may include the dependent quantization available flag. For example, the encoding device may determine whether dependent quantization is available for a block of a picture in a sequence, and encode a dependent quantization available flag indicating whether dependent quantization is available. For example, the dependent quantization available flag may be a flag indicating whether dependent quantization is available. For example, the dependent quantization available flag may indicate whether dependent quantization is available for a block of a picture in a sequence. For example, the dependent quantization available flag may indicate whether a dependent quantization used flag indicating whether dependent quantization is used for a current slice is present. For example, a value of 1 for the dependent quantization enabled flag may indicate that the dependent quantization is enabled, and a value of 0 for the dependent quantization enabled flag may indicate that the dependent quantization is not enabled. Also, for example, the dependent quantization enabled flag may be signaled in an SPS syntax or a slice header syntax. The syntax element for the dependent quantization enabled flag may be the aforementioned sps_dep_quant_enabled_flag. The sps_dep_quant_enabled_flag may be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.

[0265] The encoding apparatus encodes a Transform Skip Residual Coding (TSRC) availability flag based on the dependent quantization availability flag (S810). The image information may include a TSRC availability flag.

[0266] For example, the encoding device may encode the TSRC available flag based on the dependent quantization available flag. For example, the TSRC available flag may be encoded based on the dependent quantization available flag having a value of 0. That is, for example, when the value of the dependent quantization available flag is 0 (i.e., when the dependent quantization available flag indicates that dependent quantization is not available), the TSRC available flag may be encoded. In other words, for example, when the value of the dependent quantization available flag is 0 (i.e., when the dependent quantization available flag indicates that dependent quantization is not available), the TSRC available flag may be signaled. Also, for example, when the value of the dependent quantization available flag is 1, the TSRC available flag may not be encoded, and the value of the TSRC available flag may be derived as 0 in the decoding device. That is, for example, if the value of the dependent quantization available flag is 1 (e.g., if dependent quantization is applied (or used) to the current block), the TSRC available flag may not be signaled, and the value of the TSRC available flag may be derived as 0 in a decoding device. Thus, for example, if dependent quantization is not available for the current block, the TSRC available flag may be signaled (or encoded). If dependent quantization is available for the current block, the TSRC available flag may not be signaled (or encoded), and the value of the TSRC available flag may be derived as 0 in a decoding device. Here, the current block may be a coding block (CB) or a transform block (TB).

[0267] Here, for example, the TSRC availability flag may be a flag indicating whether a TSRC is available. That is, for example, the TSRC availability flag may be a flag indicating whether a TSRC is available for a block in a slice. For example, the TSRC availability flag having a value of 1 may indicate that the TSRC is not available, and the TSRC availability flag having a value of 0 may indicate that the TSRC is available. Also, for example, the TSRC availability flag may be signaled in a slice header syntax. A syntax element of the TSRC availability flag may be the above-mentioned sh_ts_residual_coding_disabled_flag.

[0268] The encoding device determines a residual coding syntax for the current block based on the TSRC availability flag (S820). The encoding device may determine the residual coding syntax for the current block based on the TSRC availability flag. For example, the encoding device may determine the residual coding syntax for the current block to be one of a Regular Residual Coding (RRC) syntax and a Transform Skip Residual Coding (TSRC) syntax based on the TSRC availability flag. The RRC syntax may represent a syntax according to RRC, and the TSRC syntax may represent a syntax according to TSRC.

[0269] For example, based on the TSRC availability flag having a value of 1, the residual coding syntax for the current block may be determined to be a Regular Residual Coding (RRC) syntax. In this case, for example, a transform skip flag indicating whether the current block is transform skipped may be encoded, and the value of the transform skip flag may be 1. For example, the image information may include a transform skip flag for the current block. The transform skip flag may indicate whether the current block is transform skipped. That is, the transform skip flag may indicate whether a transform is applied to the transform coefficients of the current block. A syntax element representing the transform skip flag may be the above-mentioned transform_skip_flag. For example, if the transform skip flag has a value of 1, the transform skip flag may indicate that no transform is applied to the current block (i.e., transform skipped), and if the transform skip flag has a value of 0, the transform skip flag may indicate that a transform is applied to the current block. For example, if the current block is a transform skip block, the transform skip flag for the current block may have a value of 1.

[0270] Also, for example, the residual coding syntax for the current block may be determined to be a Transform Skip Residual Coding (TSRC) syntax based on the TSRC availability flag being a value of 0. Also, for example, a transform skip flag indicating whether the transform skip of the current block is enabled may be encoded, and the residual coding syntax for the current block may be determined to be a Transform Skip Residual Coding (TSRC) syntax based on the transform skip flag being a value of 1 and the TSRC availability flag being a value of 0. Also, for example, a transform skip flag indicating whether the transform skip of the current block is enabled may be encoded, and the residual coding syntax for the current block may be determined to be a Regular Residual Coding (RRC) syntax based on the transform skip flag being a value of 0 and the TSRC availability flag being a value of 0.

[0271] The encoding device encodes residual information of the determined residual coding syntax for the current block (S830). The encoding device may derive residual samples for the current block and encode the residual information of the determined residual coding syntax for the residual samples of the current block. The image information may include residual information.

[0272] For example, the encoding device may determine whether to perform inter prediction or intra prediction on the current block, and may determine a specific inter prediction mode or a specific intra prediction mode based on the RD cost. Depending on the determined mode, the encoding device may derive prediction samples for the current block and derive residual samples for the current block by subtracting the prediction samples from original samples for the current block.

[0273] Thereafter, for example, the encoding device may derive transform coefficients of the current block based on the residual samples. For example, the encoding device may determine whether a transform is applied to the current block. That is, the encoding device may determine whether a transform is applied to the residual samples of the current block. The encoding device may determine whether a transform is applied to the current block in consideration of coding efficiency. For example, the encoding device may determine that a transform is not applied to the current block. The block to which a transform is not applied may be referred to as a transform skip block. That is, for example, the current block may be a transform skip block.

[0274] If a transform is not applied to the current block, i.e., if a transform is not applied to the residual samples, the encoding apparatus may derive the derived residual samples as the transform coefficients. If a transform is applied to the current block, i.e., if a transform is applied to the residual samples, the encoding apparatus may perform a transform on the residual samples to derive the transform coefficients. The current block may include a plurality of sub-blocks or coefficient groups (CGs). The size of the sub-blocks of the current block may be 4x4 or 2x2. That is, the sub-blocks of the current block may include up to 16 non-zero transform coefficients or up to 4 non-zero transform coefficients. Here, the current block may be a coding block (CB) or a transform block (TB). Transform coefficients may also be referred to as residual coefficients.

[0275] Meanwhile, the encoding device may determine whether dependent quantization is applied to the current block. For example, if dependent quantization is applied to the current block, the encoding device may perform the dependent quantization process on the transform coefficients to derive the transform coefficients of the current block. For example, if dependent quantization is applied to the current block, the encoding device may update a state (Qstate) for dependent quantization based on the coefficient level of the transform coefficient immediately preceding the current transform coefficient in scanning order, derive the coefficient level of the current transform coefficient based on the updated state and a syntax element for the current transform coefficient, and quantize the derived coefficient level to derive the current transform coefficient. For example, the current transform coefficient may be quantized based on a quantization parameter for the reconstruction level of the current transform coefficient using a scalar quantizer for the updated state.

[0276] For example, if the residual coding syntax for the current block is determined to be the RRC syntax, an encoding device may encode residual information of the RRC syntax for the current block. For example, the residual information of the RRC syntax may include the syntax elements disclosed in Table 2 above.

[0277] For example, the residual information of the RRC syntax may include a syntax element for a transform coefficient of the current block, where the transform coefficient may also be referred to as a residual coefficient.

[0278] For example, the syntax elements may include syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1]), abs_remainder, dec_abs_level, and / or coeff_sign_flag.

[0279] Specifically, for example, the syntax element may include position information indicating the position of the last non-zero transform coefficient in an array of residual coefficients of the current block. That is, the syntax element may include position information indicating the position of the last non-zero transform coefficient in the scanning order of the current block. The position information may include information indicating a prefix of the column position of the last non-zero transform coefficient, information indicating a prefix of the row position of the last non-zero transform coefficient, information indicating a suffix of the column position of the last non-zero transform coefficient, and information indicating a suffix of the row position of the last non-zero transform coefficient. The syntax elements for the position information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. Meanwhile, non-zero transform coefficients may also be referred to as significant coefficients.

[0280] Also, for example, the syntax element may include a coded sub-block flag indicating whether the current sub-block of the current block includes a non-zero transform coefficient, a significant coefficient flag indicating whether the transform coefficient of the current block is a non-zero transform coefficient, a first coefficient level flag indicating whether the coefficient level for the transform coefficient is greater than a first critical value, a parity level flag indicating the parity of the coefficient level, and / or a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second critical value. Here, the coded sub-block flag may be sb_coded_flag or coded_sub_block_flag, the significant coefficient flag may be sig_coeff_flag, the first coefficient level flag may be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag may be par_level_flag, and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.

[0281] Also, for example, the syntax element may include coefficient value related information for values ​​of the transform coefficients of the current block, which may be abs_remainder and / or dec_abs_level.

[0282] Also, for example, the syntax element may include a sign flag indicating the sign of the transform coefficient, which may be coeff_sign_flag.

[0283] For example, if the residual coding syntax for the current block is determined to be the TSRC syntax, the encoding device may encode residual information of the TSRC syntax for the current block. For example, the residual information of the TSRC syntax may include the syntax elements disclosed in Table 3 above.

[0284] For example, the residual information of the TSRC syntax may include syntax elements for transform coefficients of the current block, where the transform coefficients may also be referred to as residual coefficients.

[0285] For example, the syntax elements may include context-coded syntax elements and / or bypass-coded syntax elements for transform coefficients, such as sig_coeff_flag, coeff_sign_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and / or abs_level_gtx_flag[n][4]), abs_remainder, and / or coeff_sign_flag.

[0286] For example, the context-coded syntax element for the transform coefficient may include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a sign flag indicating the sign of the transform coefficient, a first coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a first critical value, and / or a parity level flag indicating the parity of the coefficient level of the transform coefficient. Also, for example, the context-coded syntax element may include a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second critical value, a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third critical value, a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth critical value, and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth critical value. Here, the significance coefficient flag may be sig_coeff_flag, the sign flag may be ceff_sign_flag, the first coefficient level flag may be abs_level_gt1_flag, the parity level flag may be par_level_flag, the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag may be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag may be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag may be abs_level_gt9_flag or abs_level_gtx_flag.

[0287] Also, for example, the bypass-coded syntax element for the transform coefficient may include coefficient level information for the value (or coefficient level) of the transform coefficient and / or a sign flag indicating a sign for the transform coefficient. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.

[0288] The encoding device generates a bitstream including the dependent quantization available flag, the TSRC available flag, and the residual information (S840). For example, the encoding device can output image information including the dependent quantization available flag, the TSRC available flag, and the residual information as a bitstream. The bitstream can include the dependent quantization available flag, the TSRC available flag, and the residual information.

[0289] Meanwhile, the image information may include prediction-related information for the current block, which may include prediction mode information for an inter prediction mode or an intra prediction mode to be performed on the current block.

[0290] Meanwhile, the bitstream can be transmitted to the decoding device via a network or a (digital) storage medium, where the network can include a broadcasting network and / or a communication network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.

[0291] FIG. 9 schematically illustrates an encoding device that performs the image encoding method according to the present document. The method disclosed in FIG. 8 can be performed by the encoding device disclosed in FIG. 9. Specifically, for example, the entropy encoding unit of the encoding device of FIG. 9 can perform S800 to S840 of FIG. 8. Also, although not shown, the process of deriving predicted samples can be performed by a prediction unit of the encoding device, the process of deriving residual samples for the current block based on original samples and predicted samples for the current block can be performed by a subtraction unit of the encoding device, and the process of generating reconstructed samples and reconstructed pictures for the current block based on the residual samples and predicted samples for the current block can be performed by an addition unit of the encoding device.

[0292] Figure 10 schematically illustrates an image decoding method by a decoding device according to the present document. The method disclosed in Figure 10 can be performed by the decoding device disclosed in Figure 3. Specifically, for example, steps S1000 to S1030 of Figure 10 can be performed by an entropy decoding unit of the decoding device, step S1040 of Figure 10 can be performed by a residual processing unit of the decoding device, and step S1050 can be performed by an adder unit of the decoding device. Also, although not shown, the process of receiving prediction information for a current block can be performed by the entropy decoding unit of the decoding device, and the process of deriving prediction samples for the current block can be performed by a prediction unit of the decoding device.

[0293] The decoding device acquires a dependent quantization available flag (S1000). The decoding device can acquire image information including the dependent quantization available flag via a bitstream. The image information may include the dependent quantization available flag. For example, the dependent quantization available flag may be a flag indicating whether dependent quantization is available. For example, the dependent quantization available flag may indicate whether dependent quantization is available for a block of a picture in a sequence. For example, the dependent quantization available flag may indicate whether a dependent quantization used flag indicating whether dependent quantization is used for a current slice is present. For example, a value of 1 for the dependent quantization enabled flag may indicate that the dependent quantization is enabled, and a value of 0 for the dependent quantization enabled flag may indicate that the dependent quantization is not enabled. Also, for example, the dependent quantization enabled flag may be signaled in an SPS syntax or a slice header syntax. The syntax element for the dependent quantization enabled flag may be the aforementioned sps_dep_quant_enabled_flag. The sps_dep_quant_enabled_flag may be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.

[0294] The decoding device obtains a Transform Skip Residual Coding (TSRC) availability flag based on the dependent quantization availability flag (S1010). The image information may include a TSRC availability flag.

[0295] For example, the decoding device may acquire the TSRC available flag based on the dependent quantization available flag. For example, the TSRC available flag may be acquired based on the dependent quantization available flag having a value of 0. That is, for example, when the value of the dependent quantization available flag is 0 (i.e., when the dependent quantization available flag indicates that dependent quantization is not available), the TSRC available flag may be acquired. In other words, for example, when the value of the dependent quantization available flag is 0 (i.e., when the dependent quantization available flag indicates that dependent quantization is not available), the TSRC available flag may be signaled. Also, for example, when the value of the dependent quantization available flag is 1, the TSRC available flag may not be acquired, and the value of the TSRC available flag may be derived as 0. That is, for example, when the value of the dependent quantization available flag is 1 (e.g., when dependent quantization is applied (or used) for the current block), the TSRC available flag may not be signaled and the value of the TSRC available flag may be derived as 0. Thus, for example, when dependent quantization is not available for the current block, the TSRC available flag may be signaled (or obtained). When dependent quantization is available for the current block, the TSRC available flag may not be signaled (or obtained) and the value of the TSRC available flag may be derived as 0. Here, the current block may be a coding block (CB) or a transform block (TB).

[0296] Here, for example, the TSRC availability flag may be a flag indicating whether a TSRC is available. That is, for example, the TSRC availability flag may be a flag indicating whether a TSRC is available for a block in a slice. For example, the TSRC availability flag having a value of 1 may indicate that the TSRC is not available, and the TSRC availability flag having a value of 0 may indicate that the TSRC is available. Also, for example, the TSRC availability flag may be signaled in a slice header syntax. A syntax element of the TSRC availability flag may be the above-mentioned sh_ts_residual_coding_disabled_flag.

[0297] The decoding device determines a residual coding syntax for the current block based on the TSRC availability flag (S1020). The decoding device may determine the residual coding syntax for the current block based on the TSRC availability flag. For example, the decoding device may determine the residual coding syntax for the current block to be one of a Regular Residual Coding (RRC) syntax and a Transform Skip Residual Coding (TSRC) syntax based on the TSRC availability flag. The RRC syntax may represent a syntax according to RRC, and the TSRC syntax may represent a syntax according to TSRC.

[0298] For example, based on the TSRC availability flag having a value of 1, the residual coding syntax for the current block may be determined to be a Regular Residual Coding (RRC) syntax. In this case, for example, a transform skip flag indicating whether the current block is transform skipped may be obtained, and the value of the transform skip flag may be 1. For example, the image information may include a transform skip flag for the current block. The transform skip flag may indicate whether the current block is transform skipped. That is, the transform skip flag may indicate whether a transform is applied to the transform coefficients of the current block. A syntax element representing the transform skip flag may be the above-mentioned transform_skip_flag. For example, if the transform skip flag has a value of 1, the transform skip flag may indicate that no transform is applied to the current block (i.e., transform skipped), and if the transform skip flag has a value of 0, the transform skip flag may indicate that a transform is applied to the current block. For example, if the current block is a transform skip block, the value of the transform skip flag for the current block may be 1.

[0299] Furthermore, for example, based on the TSRC availability flag being a value of 0, the residual coding syntax for the current block may be determined to be a Transform Skip Residual Coding (TSRC) syntax. Furthermore, for example, a transform skip flag indicating whether the transform skip of the current block is enabled may be obtained, and based on the transform skip flag being a value of 1 and the TSRC availability flag being a value of 0, the residual coding syntax for the current block may be determined to be a Transform Skip Residual Coding (TSRC) syntax. Furthermore, for example, a transform skip flag indicating whether the transform skip of the current block is enabled may be obtained, and based on the transform skip flag being a value of 0 and the TSRC availability flag being a value of 0, the residual coding syntax for the current block may be determined to be a Regular Residual Coding (RRC) syntax.

[0300] The decoding device acquires residual information of the determined residual coding syntax for the current block (S1030). The decoding device may acquire the residual information of the determined residual coding syntax for the current block. The image information may include residual information.

[0301] For example, if the residual coding syntax for the current block is determined to be the RRC syntax, the decoding device may obtain residual information of the RRC syntax for the current block. For example, the residual information of the RRC syntax may include the syntax elements disclosed in Table 2 above.

[0302] For example, the residual information of the RRC syntax may include a syntax element for a transform coefficient of the current block, where the transform coefficient may also be referred to as a residual coefficient.

[0303] For example, the syntax elements may include syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1]), abs_remainder, dec_abs_level, and / or coeff_sign_flag.

[0304] Specifically, for example, the syntax element may include position information indicating the position of the last non-zero transform coefficient in an array of residual coefficients of the current block. That is, the syntax element may include position information indicating the position of the last non-zero transform coefficient in the scanning order of the current block. The position information may include information indicating a prefix of the column position of the last non-zero transform coefficient, information indicating a prefix of the row position of the last non-zero transform coefficient, information indicating a suffix of the column position of the last non-zero transform coefficient, and information indicating a suffix of the row position of the last non-zero transform coefficient. The syntax elements for the position information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. Meanwhile, non-zero transform coefficients may also be referred to as significant coefficients.

[0305] For example, the syntax element may include a coded sub-block flag indicating whether a current sub-block of the current block includes a non-zero transform coefficient, a significant coefficient flag indicating whether a transform coefficient of the current block is a non-zero transform coefficient, a first coefficient level flag indicating whether a coefficient level of the transform coefficient is greater than a first threshold value, a parity level flag indicating parity of the coefficient level, and / or a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold value. Here, the coded sub-block flag may be sb_coded_flag or coded_sub_block_flag, the significant coefficient flag may be sig_coeff_flag, the first coefficient level flag may be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag may be par_level_flag, and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.

[0306] Also, for example, the syntax element may include coefficient value related information for values ​​of the transform coefficients of the current block, which may be abs_remainder and / or dec_abs_level.

[0307] Also, for example, the syntax element may include a sign flag indicating the sign of the transform coefficient, which may be coeff_sign_flag.

[0308] For example, if the residual coding syntax for the current block is determined to be the TSRC syntax, the decoding device may obtain residual information of the TSRC syntax for the current block. For example, the residual information of the TSRC syntax may include the syntax elements disclosed in Table 3 above.

[0309] For example, the residual information of the TSRC syntax may include syntax elements for transform coefficients of the current block, where the transform coefficients may also be referred to as residual coefficients.

[0310] For example, the syntax elements may include context-coded syntax elements and / or bypass-coded syntax elements for transform coefficients, such as sig_coeff_flag, coeff_sign_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and / or abs_level_gtx_flag[n][4]), abs_remainder, and / or coeff_sign_flag.

[0311] For example, the context-coded syntax element for the transform coefficient may include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a sign flag indicating the sign of the transform coefficient, a first coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a first critical value, and / or a parity level flag indicating the parity of the coefficient level of the transform coefficient. Also, for example, the context-coded syntax element may include a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second critical value, a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third critical value, a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth critical value, and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth critical value. Here, the significance coefficient flag may be sig_coeff_flag, the sign flag may be ceff_sign_flag, the first coefficient level flag may be abs_level_gt1_flag, the parity level flag may be par_level_flag, the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag may be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag may be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag may be abs_level_gt9_flag or abs_level_gtx_flag.

[0312] Also, for example, the bypass-coded syntax element for the transform coefficient may include coefficient level information for the value (or coefficient level) of the transform coefficient and / or a sign flag indicating the sign of the transform coefficient, where the coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.

[0313] The decoding device derives residual samples of the current block based on the residual information (S1040). For example, the decoding device may derive transform coefficients of the current block based on the residual information and derive residual samples of the current block based on the transform coefficients.

[0314] For example, a decoding device may derive transform coefficients of the current block based on the residual information syntax element. Then, the decoding device may derive residual samples of the current block based on the transform coefficients. For example, if it is determined based on the transform skip flag that no transform is applied to the current block, i.e., if the transform skip flag has a value of 1, the decoding device may derive the transform coefficients as the residual samples of the current block. Alternatively, if it is determined based on the transform skip flag that no transform is applied to the current block, i.e., if the transform skip flag has a value of 1, the decoding device may dequantize the transform coefficients and derive the residual samples of the current block. Alternatively, if it is determined based on the transform skip flag that a transform is applied to the current block, i.e., if the transform skip flag has a value of 0, the decoding device may inverse transform the transform coefficients and derive the residual samples of the current block. Alternatively, for example, if it is determined based on the transform skip flag that a transform has been applied to the current block, i.e., if the value of the transform skip flag is 0, the decoding device may dequantize the transform coefficients and inverse transform the dequantized transform coefficients to derive the residual samples of the current block.

[0315] Meanwhile, whether the dependent quantization is applied to the current block may be determined based on the dependent quantization available flag. For example, if the value of the dependent quantization available flag is 1 (i.e., if the dependent quantization available flag indicates that the dependent quantization is available), dependent quantization may be applied to the current block. For example, if the dependent quantization is applied to the current block, the decoding device may perform the dependent quantization process on the transform coefficients and derive the residual samples of the current block. That is, for example, if the dependent quantization is applied to the current block, the decoding device may derive the residual samples of the current block based on the dependent quantization of the transform coefficients. For example, when the dependent quantization is applied to the current block, the decoding device may update a state (Qstate) for dependent quantization based on a coefficient level of a transform coefficient immediately preceding the current transform coefficient in scanning order, derive a coefficient level of the current transform coefficient based on the updated state and a syntax element for the current transform coefficient, and dequantize the derived coefficient level to derive a residual sample. For example, the current transform coefficient may be dequantized based on a quantization parameter for a restoration level of the current transform coefficient using a scalar quantizer for the updated state. Here, the restoration level may be derived based on a syntax element for the current transform coefficient.

[0316] Furthermore, for example, if the dependent quantization is not applied to the current block, the decoding device may derive coefficient levels of the transform coefficients based on syntax elements for the transform coefficients of the current block, and may derive residual samples by inverse quantizing the coefficient levels. That is, for example, if the dependent quantization is not applied to the current block, the decoding device may not perform a state (Qstate) update process that is performed based on the coefficient level of the transform coefficient immediately before the current transform coefficient in the scanning order.

[0317] The decoding device generates a reconstructed picture based on the residual sample (S1050). For example, the decoding device may generate a reconstructed sample and / or a reconstructed picture of the current block based on the residual sample. For example, the decoding device may perform inter prediction mode or intra prediction mode on the current block based on prediction information received via a bitstream, derive a prediction sample, and generate the reconstructed sample by adding the prediction sample and the residual sample.

[0318] Hereafter, as mentioned above, in-loop filtering procedures such as deblocking filtering, SAO and / or ALF procedures may be applied to the reconstructed pictures to improve the subjective / objective image quality, if necessary.

[0319] Figure 11 schematically illustrates a decoding device that performs the image decoding method according to the present document. The method disclosed in Figure 10 can be performed by the decoding device disclosed in Figure 11. Specifically, for example, the entropy decoding unit of the decoding device of Figure 11 can perform steps S1000 to S1030 of Figure 10, the residual processing unit of the decoding device of Figure 11 can perform step S1040 of Figure 10, and the adder of the decoding device of Figure 11 can perform step S1050 of Figure 10. Also, although not shown, the process of receiving prediction information for a current block can be performed by the entropy decoding unit of the decoding device of Figure 11, and the process of deriving predicted samples of the current block can be performed by a prediction unit of the decoding device of Figure 11.

[0320] According to the above document, the efficiency of residual coding can be increased.

[0321] In addition, according to this document, a signaling relationship between the dependent quantization available flag and the TSRC available flag can be established, and the TSRC available flag can be signaled when dependent quantization is not available. Through this, when TSRC is not available and RRC syntax is coded for a transform skip block, dependent quantization is not used, thereby improving coding efficiency, reducing the amount of coded bits, and improving overall residual coding efficiency.

[0322] Also, according to this document, the TSRC available flag can be signaled only when dependent quantization is not used, thereby preventing the RRC syntax coding and the use of dependent quantization for the transform skip block from being performed in a redundant manner, and allowing the TSRC available flag to be coded more effectively, thereby reducing the amount of bits and improving overall residual coding efficiency.

[0323] In the above-described embodiments, the method is described based on a flow chart as a series of steps or blocks, but this document is not limited to the order of steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Furthermore, those skilled in the art will understand that the steps shown in the flow chart are not exclusive, and other steps may be included, or one or more steps of the flow chart may be deleted without affecting the scope of this document.

[0324] The embodiments described herein may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in the drawings may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for implementation may be stored in a digital recording medium.

[0325] In addition, the decoding device and encoding device to which the embodiments of this document are applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interaction device, a real-time communication device such as video communication, a mobile streaming device, a recording medium, a camcorder, a custom video (VoD) service providing device, an over-the-top (OTT) video (over-the-top) device, an internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, a vehicle terminal (e.g., a vehicle terminal, an airplane terminal, a ship terminal, etc.), a medical video device, etc., and may be used to process video signals or data signals. For example, an over-the-top (OTT) video (over-the-top) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.

[0326] In addition, a processing method to which an embodiment of this document is applied may be produced in the form of a computer-executable program and stored in a computer-readable recording medium. Multimedia data having a data structure according to this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The computer-readable recording medium may also include media implemented in the form of a carrier wave (e.g., transmission via the Internet). The bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0327] Furthermore, the embodiments of the present document may be implemented in a computer program product by program code, which may be executed by a computer in accordance with the embodiments of the present document. The program code may be stored on a computer-readable carrier.

[0328] FIG. 12 exemplarily illustrates a structural diagram of a content streaming system to which the embodiments of this document are applied.

[0329] A content streaming system to which the embodiments of this document are applied can broadly include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.

[0330] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.

[0331] The bitstream can be generated by an encoding method or a bitstream generation method to which an embodiment of this document is applied, and the streaming server can temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0332] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, which then transmits the multimedia data to the user. The content streaming system may include a separate control server, which controls commands and responses between devices in the content streaming system.

[0333] The streaming server can receive content from a media repository and / or an encoding server. For example, if content is received from the encoding server, the content can be received in real time. In this case, the streaming server can store the bitstream for a certain period of time to provide a smooth streaming service.

[0334] Examples of the user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, and head mounted displays (HMDs)), digital TVs, desktop computers, digital signage, etc. Each server in the content streaming system can be operated as a distributed server, and in this case, data received by each server can be processed in a distributed manner.

[0335] The claims described in this specification may be combined in various ways. For example, the technical features of the method claims in this specification may be combined to be realized as an apparatus, and the technical features of the apparatus claims in this specification may be combined to be realized as a method. Furthermore, the technical features of the method claims and the technical features of the apparatus claims in this specification may be combined to be realized as an apparatus, and the technical features of the method claims and the technical features of the apparatus claims in this specification may be combined to be realized as a method.

Claims

1. 1. A decoding device for decoding an image, comprising: Memory and at least one processor coupled to the memory; The at least one processor Get the dependent quantization available flag, obtaining a TSRC (Transform Skip Residual Coding) disable flag based on the dependent quantization enable flag; determining a residual coding syntax for a current block based on the TSRC invalid flag; obtaining residual information of the residual coding syntax for the current block; deriving a residual sample of the current block based on the residual information; generating a reconstructed picture based on the residual samples; The dependent quantization availability flag is a flag indicating whether dependent quantization is available, The TSRC invalid flag is obtained based on the value of the dependent quantization available flag being 0; The residual coding syntax structure is used based on the TSRC invalid flag being set to a value of 1; A decoding device, wherein the structure of the residual coding syntax is not used based on the value of the TSRC invalid flag being 0.

2. 1. An encoding device for encoding an image, comprising: Memory and at least one processor coupled to the memory; The at least one processor Encode a dependent quantization available flag; Encoding a Transform Skip Residual Coding (TSRC) disable flag based on the dependent quantization available flag; determining a residual coding syntax for a current block based on the TSRC invalid flag; encoding residual information of the residual coding syntax for the current block; generating a bitstream including the dependent quantization available flag, the TSRC invalid flag, and the residual information; The dependent quantization availability flag is a flag indicating whether dependent quantization is available, The TSRC invalid flag is obtained based on the value of the dependent quantization available flag being 0; The residual coding syntax structure is used based on the TSRC invalid flag being set to a value of 1; An encoding device, wherein the structure of the residual coding syntax is not used based on the value of the TSRC invalid flag being 0.

3. 1. An apparatus for transmitting data for an image, comprising: at least one processor configured to obtain a bitstream for the image, the bitstream comprising: encoding a dependent quantization available flag; encoding a Transform Skip Residual Coding (TSRC) disable flag based on the dependent quantization available flag; determining a residual coding syntax for a current block based on the TSRC invalid flag; encoding residual information of the residual coding syntax for the current block; generating the bitstream including the dependent quantization available flag, the TSRC invalid flag, and the residual information; a transmitter configured to transmit the data including the bitstream; The dependent quantization availability flag is a flag indicating whether dependent quantization is available, The TSRC invalid flag is obtained based on the value of the dependent quantization available flag being 0; The residual coding syntax structure is used based on the TSRC invalid flag being set to a value of 1; The apparatus, wherein the structure of the residual coding syntax is not used based on the value of the TSRC invalid flag being 0.

Citation Information

Patent Citations

  • Method and apparatus for processing video signals using reduced transform

    US20190387241A1

  • Binarization in transform skip residual coding

    US20200404286A1