Image decoding method, image encoding method, and transmission method

By optimizing the residual coding process and establishing a signaling relationship between the quantization enable flag and the TSRC enable flag, the problem of high transmission and storage costs for high-resolution, high-quality images is solved, achieving more efficient image coding and storage.

CN116456108BActive Publication Date: 2026-07-10LG ELECTRONICS INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LG ELECTRONICS INC
Filing Date
2021-02-05
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

The transmission and storage of high-resolution, high-quality images are costly, and existing image coding technologies are inefficient, making it difficult to effectively compress and transmit high-resolution, high-quality images.

Method used

By establishing a signaling relationship between the dependency quantization enable flag and the TSRC enable flag, the TSRC enable flag is only notified when dependency quantization is not enabled, and dependency quantization is not used when the transform skip block is used, thus optimizing the residual coding process.

Benefits of technology

It improves image coding efficiency, reduces the number of coding bits, enhances residual coding efficiency, and reduces transmission and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0004223044560000231
    Figure BDA0004223044560000231
  • Figure BDA0004223044560000241
    Figure BDA0004223044560000241
  • Figure BDA0004223044560000251
    Figure BDA0004223044560000251
Patent Text Reader

Abstract

Image decoding method, image encoding method, and transmission method. An image decoding method implemented by a decoding apparatus according to the present document includes the steps of: obtaining prediction-related information of a current block; obtaining prediction-related information of a current block; obtaining a dependent quantization enabled flag related to whether dependent quantization is available; obtaining a transform skip residual coding (TSRC) enabled flag related to whether TSRC is available based on the dependent quantization enabled flag; obtaining residual information of a residual coding syntax of the current block derived based on the TSRC enabled flag; deriving motion information of the current block based on the prediction-related information; deriving prediction samples of the current block based on the motion information; deriving residual samples of the current block based on the residual information; and generating a reconstructed picture based on the prediction samples and the residual samples.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the original patent application No. 202180025496.6 (International Application No.: PCT / KR2021 / 001513, Application Date: February 5, 2021, Invention Title: Image Decoding Method Associated with Residual Coding and Apparatus Therefor). Technical Field

[0002] This disclosure relates to image coding techniques, and more specifically, to an image decoding method and an apparatus therefor encoding flag information indicating whether TSRC is enabled when encoding residual data of the current block in an image coding system. Background Technology

[0003] Recently, the demand for high-resolution, high-quality images, such as HD (high-definition) and UHD (ultra-high-definition) images, has been growing across various fields. Because image data is high-resolution and high-quality, the amount of information or bits to be transmitted increases compared to traditional image data. Therefore, transmission and storage costs increase when using media such as traditional wired / wireless broadband lines to send image data or when storing image data using existing storage media.

[0004] Therefore, there is a need for efficient image compression technology to effectively transmit, store, and reproduce information from high-resolution, high-quality images. Summary of the Invention

[0005] Technical issues

[0006] This disclosure provides methods and apparatus for improving image coding efficiency.

[0007] This disclosure also provides methods and apparatus for improving the efficiency of residual coding.

[0008] Technical solution

[0009] According to embodiments of this disclosure, an image decoding method executed by a decoding device is provided. The method includes the following steps: obtaining prediction-related information of a current block; obtaining a dependency quantization enable flag indicating whether dependency quantization is enabled; obtaining a TSRC enable flag indicating whether transform skip residual coding (TSRC) is enabled based on the dependency quantization enable flag; obtaining residual information of the residual coding syntax of the current block derived based on the TSRC enable flag; deriving motion information of the current block based on the prediction-related information; deriving a prediction sample of the current block based on the motion information; deriving a residual sample of the current block based on the residual information; and generating a reconstructed image based on the prediction sample and the residual sample.

[0010] According to another embodiment of this disclosure, a decoding apparatus for performing image decoding is provided. The decoding apparatus includes: an entropy decoder configured to obtain prediction-related information of a current block, obtain a dependency quantization enable flag for whether dependency quantization is enabled, obtain a TSRC enable flag for whether transform skip residual coding (TSRC) is enabled based on the dependency quantization enable flag, and obtain residual information of the residual coding syntax of the current block derived based on the TSRC enable flag; a predictor configured to derive motion information of the current block based on the prediction-related information, and derive prediction samples of the current block based on the motion information; a residual processor configured to derive residual samples of the current block based on the residual information; and an adder configured to generate a reconstructed image based on the prediction samples and the residual samples.

[0011] According to another embodiment of this disclosure, a video coding method performed by an encoding device is provided. The method includes the following steps: deriving prediction samples for a current block based on inter-frame prediction; encoding prediction-related information of the current block; encoding a dependency quantization enable flag for whether to enable dependency quantization; encoding a TSRC enable flag for whether to enable transform skip residual coding (TSRC) based on the dependency quantization enable flag; determining a residual coding syntax for the current block based on the TSRC enable flag; encoding residual information of the determined residual coding syntax for the current block; and generating a bitstream including the prediction-related information, the dependency quantization enable flag, the TSRC enable flag, and the residual information.

[0012] According to another embodiment of this disclosure, a video encoding apparatus is provided. The encoding apparatus includes: a predictor configured to derive prediction samples for a current block based on inter-frame prediction; and an entropy encoder configured to encode prediction-related information of the current block, encode a dependency quantization enable flag for whether to enable dependency quantization, encode a TSRC enable flag for whether to enable transform skip residual coding (TSRC) based on the dependency quantization enable flag, determine a residual coding syntax for the current block based on the TSRC enable flag, encode residual information of the determined residual coding syntax for the current block, and generate a bitstream including the prediction-related information, the dependency quantization enable flag, the TSRC enable flag, and the residual information.

[0013] According to another embodiment of this disclosure, a non-transitory computer-readable storage medium is provided for storing a bitstream of image information that enables an image decoding method to be executed. In the non-transitory computer-readable storage medium, the image decoding method includes the following steps: obtaining prediction-related information of a current block; obtaining a dependency quantization enable flag for whether dependency quantization is enabled; obtaining a TSRC enable flag for whether transform skip residual coding (TSRC) is enabled based on the dependency quantization enable flag; obtaining residual information of the residual coding syntax of the current block derived based on the TSRC enable flag; deriving motion information of the current block based on the prediction-related information; deriving a prediction sample of the current block based on the motion information; deriving a residual sample of the current block based on the residual information; and generating a reconstructed image based on the prediction sample and the residual sample.

[0014] Technical effect

[0015] According to this disclosure, the efficiency of image coding performed based on inter-frame prediction and / or residual coding can be improved.

[0016] According to this disclosure, residual coding efficiency can be enhanced.

[0017] According to this disclosure, a signaling relationship is established between a dependent quantization enable flag and a TSRC enable flag. If dependent quantization is not enabled, the TSRC enable flag can be signaled. In this way, if TSRC is not enabled and the RRC syntax is encoded for the transform skip block, dependent quantization is not used, thereby improving coding efficiency and improving overall residual coding efficiency by reducing the number of encoded bits.

[0018] According to this disclosure, the TSRC enable flag is signaled only when dependent quantization is not used, and in this way, the encoding of the RRC syntax and the use of dependent quantization do not overlap with each other for transform skip blocks, and the TSRC enable flag is encoded more efficiently, so the number of bits can be reduced and the overall residual coding efficiency can be improved. Attached Figure Description

[0019] Figure 1 Examples of video / image encoding apparatuses to which embodiments of the present disclosure are applied are briefly illustrated.

[0020] Figure 2 This is a schematic diagram illustrating the configuration of a video / image encoding device to which embodiments of the present disclosure can be applied.

[0021] Figure 3 This is a schematic diagram illustrating the configuration of a video / image decoding device to which embodiments of the present disclosure can be applied.

[0022] Figure 4 An example of a video / image coding method based on inter-frame prediction is shown.

[0023] Figure 5 An example of a video / image decoding method based on inter-frame prediction is shown.

[0024] Figure 6 The inter-frame prediction process is illustrated schematically.

[0025] Figure 7 An example is shown of context-adaptive binary arithmetic coding (CABAC) for encoding syntax elements.

[0026] Figure 8 This is a diagram showing exemplary transformation coefficients within a 4×4 block.

[0027] Figure 9 An example is provided illustrating a scalar quantizer used in dependent quantization.

[0028] Figure 10 Examples illustrate state transitions and quantizer selection for quantization-dependent operations.

[0029] Figure 11 The image encoding method performed by the encoding device according to this document is illustrated schematically.

[0030] Figure 12 An encoding device for performing an image encoding method according to this document is illustrated schematically.

[0031] Figure 13 The image decoding method performed by the decoding device according to this document is illustrated schematically.

[0032] Figure 14 A decoding device for performing an image decoding method according to this document is illustrated schematically.

[0033] Figure 15 A structural diagram illustrating a content streaming system using this disclosure is provided. Detailed Implementation

[0034] This disclosure may be modified in various forms, and specific embodiments thereof will be described and illustrated in the accompanying drawings. However, these embodiments are not intended to limit this disclosure. The terminology used in the following description is for the purpose of describing specific embodiments only and is not intended to limit this disclosure. Singular expressions include plural expressions, provided that they are clearly read differently. Terms such as “comprising” and “having” are intended to indicate the presence of the features, numbers, steps, operations, elements, components or combinations thereof used in the following description, and therefore it should be understood that the possibility of having or adding one or more different features, numbers, steps, operations, elements, components or combinations thereof is not excluded.

[0035] Furthermore, the elements in the figures described in this disclosure are drawn independently for the purpose of illustrating different specific functions, but this does not mean that these elements are implemented by independent hardware or independent software. For example, two or more of these elements may be combined to form a single element, or a single element may be divided into multiple elements. Embodiments in which elements are combined and / or divided are part of this disclosure without departing from its concept.

[0036] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Furthermore, throughout the drawings, similar reference numerals are used to indicate similar elements, and identical descriptions of similar elements will be omitted.

[0037] Figure 1 Examples of video / image encoding apparatuses to which embodiments of the present disclosure may be applied are briefly illustrated.

[0038] Reference Figure 1 A video / image encoding system may include a first device (source device) and a second device (receiver). The source device may transmit encoded video / image information or data to the receiving device in the form of a file or stream via a digital storage medium or network.

[0039] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display, and the display may be configured as a separate device or an external component.

[0040] Video sources can acquire video / images through processes that capture, synthesize, or generate video / images. Video sources may include video / image capture devices and / or video / image generation devices. Video / image capture devices may include, for example, one or more cameras, video / image archives including previously captured video / images, etc. Video / image generation devices may include, for example, computers, tablets, and smartphones, and can generate video / images (electronically). For example, virtual video / images can be generated by computers, etc. In this case, the video / image capture process can be replaced by a process that generates related data.

[0041] Encoding devices can encode input video / images. They can perform a series of processes such as prediction, transformation, and quantization to achieve compression and encoding efficiency. The encoded data (encoded video / image information) can be output as a bitstream.

[0042] The transmitter can send encoded images / image information or data, output as a bitstream, to the receiver of the receiving device in the form of a file or stream via a digital storage medium or network. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter can include elements for generating media files according to a predetermined file format and may include elements for transmission via a broadcast / communication network. The receiver can receive / extract the bitstream and send the received bitstream to a decoding device.

[0043] Decoding devices can decode video / images by performing a series of processes, such as dequantization, inverse transform, and prediction, that correspond to the operations of encoding devices.

[0044] The renderer can render decoded video / images. The rendered video / images can then be displayed on a monitor.

[0045] This disclosure relates to video / image coding. For example, the methods / implementations disclosed in this disclosure can be applied to methods disclosed in Universal Video Coding (VVC), EVC (Essential Video Coding) standard, AOMedia Video 1 (AV1) standard, second-generation audio-visual coding standard (AVS2), or next-generation video / image coding standards (e.g., H.267 or H.268, etc.).

[0046] This disclosure presents various implementations of video / image coding, and unless otherwise mentioned, these implementations can be combined with each other.

[0047] In this disclosure, video can refer to a series of images over time. An image typically refers to a unit representing an image within a specific time region, and sub-images / slices / tiles are units that constitute part of an image during encoding. Sub-images / slices / tiles may include one or more coding tree units (CTUs). An image may consist of one or more sub-images / slices / tiles. An image may consist of one or more groups of tiles. A group of tiles may include one or more tiles. A brick can represent a rectangular area of ​​a row of CTUs within a tile in an image. A tile can be divided into multiple bricks, each of which consists of one or more rows of CTUs within the tile. A tile that is not divided into multiple bricks may also be called a brick. Brick scanning is a specific ordering of the CTUs in a segmented image, where CTUs are ordered by raster scans of CTUs within a brick, bricks within a tile are ordered sequentially by raster scans of the tiles within a tile, and tiles within an image are ordered sequentially by raster scans of the tiles within the image. Additionally, a sub-image can represent a rectangular region of one or more slices within an image. That is, a sub-image contains one or more slices that collectively cover a rectangular region of the image. A tile is a rectangular region of CTUs within a specific tile column and a specific tile row in an image. A tile column is a rectangular region of CTUs with a height equal to the height of the image and a width specified by a syntax element in the image parameter set. A tile row is a rectangular region of CTUs with a height specified by a syntax element in the image parameter set and a width equal to the width of the image. A tile scan is a specific ordering of the CTUs in a segmented image: CTUs are ordered consecutively by a raster scan of CTUs within a tile, and tiles in the image are ordered consecutively by a raster scan of the tiles in the image. A slice comprises an integer number of tiles of an image that can be exclusively contained within a single NAL unit. A slice can consist of a consecutive sequence of either multiple complete tiles or only one complete tile. In this disclosure, tile groups and slices can be used interchangeably. For example, in this disclosure, a tile group / tile group header can be referred to as a slice / slice header.

[0048] A pixel, or image unit, can refer to the smallest unit that makes up a picture (or image). Additionally, the term "sample" can be used as the counterpart to a pixel. A sample can typically represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component or only the pixel / pixel value of the chrominance component.

[0049] A unit can represent a basic unit of image processing. A unit may include a specific region of an image and at least one of the information associated with that region. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, the terms "unit" and "block" or "region" may be used interchangeably. Typically, an M×N block may include a set (or array) of samples (or transform coefficients) with M columns and N rows.

[0050] In this specification, “A or B” may mean “A only”, “B only”, or “both A and B”. In other words, in this specification, “A or B” can be interpreted as “A and / or B”. For example, “A, B or C” in this document means “A only”, “B only”, “C only”, or “any one and any combination of A, B and C”.

[0051] The forward slash ( / ) or comma (,) used in this specification can mean "and / or". For example, "A / B" can mean "A and / or B". Accordingly, "A / B" can mean "A only", "B only", or "both A and B". For example, "A, B, C" can mean "A, B, or C".

[0052] In this specification, "at least one of A and B" may mean "A only", "B only" or "both A and B". Furthermore, in this specification, the expression "at least one of A or B" or "at least one of A and / or B" may be interpreted as the same as "at least one of A and B".

[0053] Additionally, in this specification, "at least one of A, B, and C" means "A only", "B only", "C only" or "any combination of A, B, and C". Furthermore, "at least one of A, B, or C" or "at least one of A, B, and / or C" may mean "at least one of A, B, and C".

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

[0055] In this specification, a technical feature described individually in a single drawing may be implemented individually or simultaneously.

[0056] The following figures were created to illustrate specific examples of this specification. Since the names of specific devices or signals / messages / fields described in the figures are presented by way of example, the technical features of this specification are not limited to the specific names used in the following figures.

[0057] Figure 2 This is a schematic diagram illustrating the configuration of a video / image encoding apparatus to which embodiments of the present disclosure may be applied. Hereinafter, a video encoding apparatus may include an image encoding apparatus.

[0058] Reference Figure 2 The encoding device 200 includes an image segmenter 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-frame predictor 221 and an intra-frame predictor 222. The residual processor 230 may include a transform 232, a quantizer 233, an inverse quantizer 234, and an inverse transform 235. The residual processor 230 may also include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstruction block generator. According to embodiments, the image segmenter 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filter 260 may be constituted by at least one hardware component (e.g., an encoder chipset or a processor). Additionally, the memory 270 may include a decoded image buffer (DPB) or may be constituted by a digital storage medium. The hardware component may also include the memory 270 as an internal / external component.

[0059] Image segmenter 210 can segment an input image (or picture or frame) input to encoding device 200 into one or more processors. For example, a processor may be referred to as a coding unit (CU). In this case, coding units can be recursively segmented from coding tree units (CTUs) or maximum coding units (LCUs) according to a quadtree-binary-trinary tree (QTBTTT) structure. For example, a coding unit can be segmented into multiple deeper coding units based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, a quadtree structure can be applied first, followed by a binary tree structure and / or a ternary structure. Alternatively, a binary tree structure can be applied first. The encoding process according to this disclosure can be performed based on the final coding unit that is no longer segmented. In this case, the maximum coding unit can be used as the final coding unit based on encoding efficiency according to image characteristics, or, if necessary, the coding unit can be recursively segmented into deeper coding units, and the coding unit with the optimal size can be used as the final coding unit. Here, the encoding process may include prediction, transformation, and reconstruction processes, which will be described later. As another example, the processor may also include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit can be separated or divided from the final encoding unit described above. The prediction unit may be a unit for predicting samples, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving residual signals from transform coefficients.

[0060] In some cases, a unit can be used interchangeably with terms such as a block or region. Generally, an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can typically represent a pixel or pixel value, and may represent only the pixel / pixel value of the luminance component or only the pixel / pixel value of the chrominance component. A sample can be used as a term corresponding to a picture (or image) of pixels or pictographs.

[0061] In the encoding device 200, the predicted signal (prediction block, prediction sample array) output from the inter-frame predictor 221 or the intra-frame predictor 222 is subtracted from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is sent to the converter 232. In this case, as shown, the unit in the encoding device 200 used to subtract the predicted signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) can be called the subtractor 231. The predictor can perform prediction on the block to be processed (hereinafter referred to as the current block) and generate a prediction block that includes the prediction samples of the current block. The predictor can determine whether to apply intra-frame prediction or inter-frame prediction based on the current block or CU. As described later in the description of each prediction mode, the predictor can generate various information related to the prediction, such as prediction mode information, and send the generated information to the entropy encoder 240. The information about the prediction can be encoded in the entropy encoder 240 and output as a bitstream.

[0062] Intra-predictor 222 can predict the current block by referencing samples in the current image. Depending on the prediction mode, the referenced samples may be located near or far from the current block. In intra-prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. Non-directional modes can include, for example, DC mode and planar mode. Depending on the level of detail in the prediction direction, the directional modes can include, for example, 33 or 65 directional prediction modes. However, this is just an example, and more or fewer directional prediction modes may be used depending on the settings. Intra-predictor 222 can determine the prediction mode to be applied to the current block by using prediction modes applied to neighboring blocks.

[0063] Inter-frame predictor 221 can deduce the predicted block of the current block based on a reference block (reference sample array) specified by motion vectors on a reference image. Here, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted on a block, sub-block, or sample basis based on the correlation between motion information between neighboring blocks and the current block. Motion information may include motion vectors and reference image indices. Motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, neighboring blocks may include spatially neighboring blocks existing in the current image and temporally neighboring blocks existing in the reference image. The reference image including the reference block and the reference image including the temporally neighboring block may be the same or different. The temporally neighboring block may be called a juxtaposed reference block, a co-located CU (colCU), etc., and the reference image including the temporally neighboring block may be called a juxtaposed image (colPic). For example, inter-frame predictor 221 can configure a motion information candidate list based on neighboring blocks and generate information indicating which candidate to use to deduce the motion vector and / or reference image index of the current block. Inter-frame prediction can be performed based on various prediction modes. For example, in skip mode and merge mode, the inter-frame predictor 221 can use motion information from neighboring blocks as motion information for the current block. In skip mode, unlike merge mode, residual signals may not be transmitted. In motion vector prediction (MVP) mode, motion vectors from neighboring blocks can be used as motion vector predictors, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0064] Predictor 220 can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra-frame prediction or inter-frame prediction to predict a block, but can also apply both intra-frame prediction and inter-frame prediction simultaneously. This can be referred to as Inter-intra-frame Combined Prediction (CIIP). Alternatively, the predictor can predict blocks based on an Intra-Block Copy (IBC) prediction mode or a palette mode. IBC prediction modes or palette modes can be used for content image / video coding such as games, for example, Screen Content Coding (SCC). IBC essentially performs prediction in the current frame, but can be performed similarly to inter-frame prediction because the reference block is derived in the current frame. That is, IBC can use at least one of the inter-frame prediction techniques described in this disclosure. A palette mode can be considered as an example of intra-frame coding or intra-frame prediction. When a palette mode is applied, sample values ​​within the frame can be signaled based on information about the palette table and palette index.

[0065] The predicted signal generated by the predictor (including inter-frame predictor 221 and / or intra-frame predictor 222) can be used to generate a reconstructed signal or a residual signal. Transformer 232 can generate transform coefficients by applying transform techniques to the residual signal. For example, the transform technique can include at least one of Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), Karhunen-Loève Transform (KLT), Graph-Based Transform (GBT), or Conditional Nonlinear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is represented by a graph. CNT refers to a transform generated based on the predicted signal generated using all previously reconstructed pixels. Furthermore, the transform processing can be applied to square pixel blocks of the same size, or it can be applied to blocks of variable size that are not square.

[0066] Quantizer 233 quantizes the transform coefficients and sends them to entropy encoder 240, which encodes the quantized signal (information about the quantized transform coefficients) and outputs a bitstream. This information about the quantized transform coefficients can be called residual information. Quantizer 233 can rearrange the block-type quantized transform coefficients into a one-dimensional vector based on the coefficient scan order and generate information about the quantized transform coefficients based on this one-dimensional vector form. Entropy encoder 240 can perform various encoding methods, such as Golomb, Context Adaptive Variable Length Coding (CAVLC), and Context Adaptive Binary Arithmetic Coding (CABAC). Entropy encoder 240 can encode information required for video / image reconstruction other than the quantized transform coefficients (e.g., values ​​of syntax elements) together or separately. It can send or store encoded information (e.g., encoded video / image information) in bitstream form at NAL (Network Abstraction Layer) units. The video / image information may also include information about various parameter sets such as Adaptive Parameter Set (APS), Picture Parameter Set (PPS), Sequence Parameter Set (SPS), or Video Parameter Set (VPS). Additionally, the video / image information may also include general constraint information. In this disclosure, information and / or syntax elements that transmit / signal notifications from the encoding device to the decoding device may be included in the video / image information. The video / image information may be encoded by the encoding process described above and included in a bitstream. The bitstream may be transmitted over a network or stored in a digital storage medium. The network may include broadcast networks and / or communication networks, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits a signal output from the entropy encoder 240 and / or a storage unit (not shown) that stores the signal may be included as internal / external components of the encoding device 200, and alternatively, the transmitter may be included in the entropy encoder 240.

[0067] The quantization transform coefficients output from quantizer 233 can be used to generate a prediction signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transform to the quantization transform coefficients using dequantizer 234 and inverse transformer 235. Adder 250 adds the reconstructed residual signal to the prediction signal output from inter-frame predictor 221 or intra-frame predictor 222 to generate a reconstructed signal (reconstructed image, reconstructed block, reconstructed sample array). If the block to be processed has no residual (such as when a skip mode is applied), the prediction block can be used as a reconstructed block. Adder 250 can be referred to as a reconstructor or reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current image, and can be used for inter-frame prediction of the next image by filtering as described below.

[0068] In addition, Luminance Mapping and Chroma Scaling (LMCS) can be applied during image encoding and / or reconstruction.

[0069] Filter 260 can improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, filter 260 can generate a modified reconstructed image by applying various filtering methods to the reconstructed image and store the modified reconstructed image in memory 270 (specifically, the DPB of memory 270). Various filtering methods may include, for example, deblocking filtering, sample adaptive offsetting, adaptive loop filtering, bilateral filtering, etc. Filter 260 can generate various filtering-related information and send the generated information to entropy encoder 240, as described later in the description of the various filtering methods. The filtering-related information can be encoded by entropy encoder 240 and output as a bitstream.

[0070] The modified reconstructed image sent to memory 270 can be used as a reference image in inter-frame predictor 221. When inter-frame prediction is applied through the encoding device, prediction mismatch between the encoding device 200 and the decoding device can be avoided, and encoding efficiency can be improved.

[0071] The DPB of memory 270 can store a modified reconstructed image used as a reference image in inter-frame predictor 221. Memory 270 can store motion information of blocks from which motion information in the current image is derived (or encoded) and / or motion information of reconstructed blocks in the image. The stored motion information can be sent to inter-frame predictor 221 and used as motion information for spatially or temporally neighboring blocks. Memory 270 can store reconstructed samples of reconstructed blocks in the current image and can transmit these reconstructed samples to intra-frame predictor 222.

[0072] Figure 3 This is a schematic diagram illustrating the configuration of a video / image decoding device to which embodiments of the present disclosure can be applied.

[0073] Reference Figure 3 The decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter-frame predictor 332 and an intra-frame predictor 331. The residual processor 320 may include an inverse quantizer 321 and an inverse transformer 322. According to embodiments, the entropy decoder 310, residual processor 320, predictor 330, adder 340, and filter 350 may be constructed from hardware components (e.g., a decoder chipset or processor). Additionally, the memory 360 may include a decoded image buffer (DPB) or may be constructed from a digital storage medium. The hardware components may also include the memory 360 as an internal / external component.

[0074] When the input includes a bitstream containing video / image information, the decoding device 300 can interact with... Figure 2 The processing of video / image information in the encoding device correspondingly reconstructs the image. For example, the decoding device 300 can deduce units / blocks based on block segmentation information obtained from the bitstream. The decoding device 300 can use a processor applied in the encoding device to perform decoding. Therefore, the decoding processor can be, for example, an encoding unit, and the encoding unit can be segmented from the encoding tree unit or the maximum encoding unit according to a quadtree structure, binary tree structure, and / or ternary tree structure. One or more transform units can be derived from the encoding unit. The reconstructed image signal decoded and output by the decoding device 300 can be reproduced by a reproduction device.

[0075] Decoding device 300 can receive data in bitstream form from... Figure 2The signal output by the encoding device can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets such as Adaptive Parameter Set (APS), Picture Parameter Set (PPS), Sequence Parameter Set (SPS), or Video Parameter Set (VPS). In addition, the video / image information may also include general constraint information. The decoding device can also decode the picture based on the information about the parameter sets and / or general constraint information. The signaling / receiving information and / or syntax elements described later in this disclosure can be decoded and obtained from the bitstream through the decoding process. For example, the entropy decoder 310 decodes the information in the bitstream based on encoding methods such as exponential Golomb coding, CAVLC, or CABAC, and outputs the quantized values ​​of the syntax elements and transform coefficients of the residuals required for image reconstruction. More specifically, the CABAC entropy decoding method can receive a bin corresponding to each syntax element in the bitstream, determine the context model using information about the target syntax element, decoding information about the target block, or information about symbols / bins decoded in previous stages, and perform arithmetic decoding on the bin by predicting the occurrence probability of the bin based on the determined context model, generating symbols corresponding to the value of each syntax element. In this case, after determining the context model, the CABAC entropy decoding method can update the context model by using information from the decoded symbols / bins for the context model of the next symbol / bin. Prediction-related information from the information decoded by the entropy decoder 310 can be provided to the predictors (inter-frame predictor 332 and intra-frame predictor 331), and the residual values ​​(i.e., quantization transform coefficients and related parameter information) from which entropy decoding was performed in the entropy decoder 310 can be input to the residual processor 320. The residual processor 320 can derive the residual signals (residual blocks, residual samples, residual sample arrays). Additionally, filtering information from the information decoded by the entropy decoder 310 can be provided to the filter 350. Furthermore, the receiver (not shown) for receiving the signal output from the encoding device can be further configured as an internal / external element of the decoding device 300, or the receiver can be a component of the entropy decoder 310. Additionally, the decoding device according to this disclosure can be referred to as a video / image / picture decoding device, and the decoding device can be classified as an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoder 310, and the sample decoder may include at least one of an inverse quantizer 321, an inverse transformer 322, an adder 340, a filter 350, a memory 360, an inter-frame predictor 332, and an intra-frame predictor 331.

[0076] The dequantizer 321 can dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 321 can rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement can be performed based on the coefficient scan order performed in the encoding device. The dequantizer 321 can also dequantize the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain the transform coefficients.

[0077] The inverse transformer 322 performs an inverse transformation on the transformation coefficients to obtain the residual signal (residual block, residual sample array).

[0078] The predictor can perform prediction on the current block and generate a prediction block that includes the prediction samples of the current block. The predictor can determine whether to apply intra-frame prediction or inter-frame prediction to the current block based on the prediction information output from the entropy decoder 310, and can determine the specific intra-frame / inter-frame prediction mode.

[0079] The predictor can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra-frame prediction or inter-frame prediction to predict a block, but can also apply intra-frame prediction and inter-frame prediction simultaneously. This can be referred to as combined intra-frame and inter-frame prediction (CIIP). Alternatively, the predictor can predict blocks based on an intra-block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or palette mode can be used for content image / video coding, such as screen content coding (SCC), for games, etc. IBC essentially performs prediction within the current frame, but can be performed similarly to inter-frame prediction because a reference block is derived within the current frame. That is, IBC can use at least one of the inter-frame prediction techniques described in this disclosure. The palette mode can be considered an example of intra-frame coding or intra-frame prediction. When applying a palette mode, sample values ​​within the frame can be signaled based on information about the palette table and palette index.

[0080] Intra-predictor 331 can predict the current block by referencing samples in the current image. Depending on the prediction mode, the referenced samples may be located near or far from the current block. In intra-prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. Intra-predictor 331 can determine the prediction mode applied to the current block by using prediction modes applied to neighboring blocks.

[0081] Inter-frame predictor 332 can deduce the predicted block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference image. In this case, to reduce the amount of motion information transmitted in the inter-frame prediction mode, motion information can be predicted on a block, sub-block, or sample basis based on the correlation of motion information between neighboring blocks and the current block. Motion information may include motion vectors and reference image indices. Motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, neighboring blocks may include spatially neighboring blocks existing in the current image and temporally neighboring blocks existing in the reference image. For example, inter-frame predictor 332 can configure a motion information candidate list based on neighboring blocks and deduce the motion vector and / or reference image index of the current block based on the received candidate selection information. Inter-frame prediction can be performed based on various prediction modes, and the information about the prediction may include information indicating the mode of inter-frame prediction for the current block.

[0082] Adder 340 can generate a reconstruction signal (reconstructed image, reconstruction block, reconstruction sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including inter-frame predictor 332 and / or intra-frame predictor 331). If the block to be processed has no residual (e.g., when a skip mode is applied), the prediction block can be used as the reconstruction block.

[0083] Adder 340 can be called a reconstructor or reconstruction block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current image, through filtering output as described below, or it can be used for inter-frame prediction of the next image.

[0084] In addition, Luminance Mapping and Chromaticity Scaling (LMCS) can be applied during image decoding.

[0085] Filter 350 can improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, filter 350 can generate a modified reconstructed image by applying various filtering methods to the reconstructed image and store the modified reconstructed image in memory 360 (specifically, the DPB of memory 360). Various filtering methods may include, for example, deblocking filtering, adaptive sample shifting, adaptive loop filtering, bilateral filtering, etc.

[0086] The (modified) reconstructed image stored in the DPB of memory 360 can be used as a reference image in inter-frame predictor 332. Memory 360 can store motion information of blocks from which motion information in the current image is derived (or decoded) and / or motion information of reconstructed blocks in the image. The stored motion information can be sent to inter-frame predictor 332 for use as motion information of spatially or temporally neighboring blocks. Memory 360 can store reconstructed samples of reconstructed blocks in the current image and can transmit the reconstructed samples to intra-frame predictor 331.

[0087] In this disclosure, the embodiments described in the filter 260, inter-frame predictor 221, and intra-frame predictor 222 of the encoding device 200 can be the same as, or applied to, the filter 350, inter-frame predictor 332, and intra-frame predictor 331 of the decoding device 300, respectively. The same content can also be applied to the inter-frame predictor 332 and intra-frame predictor 331.

[0088] In this disclosure, at least one of quantization / inverse quantization and / or transformation / inverse transformation may be omitted. When quantization / inverse quantization is omitted, the transformation coefficients of the quantization may be referred to as transformation coefficients. When transformation / inverse transformation is omitted, the transformation coefficients may be referred to as coefficients or residual coefficients, or for the sake of consistency, they may still be referred to as transformation coefficients.

[0089] In this disclosure, quantization transform coefficients and transform coefficients can be referred to as transform coefficients and scaling transform coefficients, respectively. In this case, residual information can include information about the transform coefficients, and this information can be signaled via residual coding syntax. Transform coefficients can be derived based on residual information (or information about the transform coefficients), and scaling transform coefficients can be derived by inverse transforming (scaling) the transform coefficients. Residual samples can be derived based on the inverse transform (scaling) of the scaling transform coefficients. This can also be applied / expressed in other parts of this disclosure.

[0090] Furthermore, as mentioned above, prediction is performed during video encoding to improve compression efficiency. This generates a prediction block, including prediction samples for the current block, as the block to be encoded (i.e., the target block for encoding). Here, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block is derived in the same manner in both the encoding and decoding devices, and the encoding device can signal the decoding device with information about the residual between the original block and the prediction block (residual information), rather than the original sample values ​​of the original block, thereby improving image encoding efficiency. The decoding device can derive a residual block including residual samples based on the residual information, add the residual block and the prediction block to generate a reconstructed block including reconstructed samples, and generate a reconstructed image including the reconstructed block.

[0091] Residual information can be generated through transformation and quantization processes. For example, the encoding device can derive a residual block between the original block and the prediction block, perform a transformation process on the residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization process on the transform coefficients to derive quantized transform coefficients, and signal the relevant residual information (via bitstream) to the decoding device. Here, the residual information may include the values ​​of the quantized transform coefficients, their positions, the transform technique, the transform core, and the values ​​of quantization parameters. The decoding device can perform dequantization / inverse transform processes based on the residual information and derive residual samples (or residual blocks). The decoding device can generate a reconstructed image based on the prediction block and the residual block. Furthermore, as a reference for inter-frame prediction of subsequent reference images, the encoding device can dequantize / inverse transform the quantized transform coefficients to derive residual blocks and generate a reconstructed image based on them.

[0092] When applying inter-frame prediction, the predictor of the encoding / decoding device can derive prediction samples by performing inter-frame prediction on a block-by-block basis. Inter-frame prediction can be applied when performing prediction on the current block. That is, the predictor of the encoding / decoding device (more specifically, the inter-frame predictor) can derive prediction samples by performing inter-frame prediction on a block-by-block basis. Inter-frame prediction can represent a prediction derived by a method that depends on data elements (e.g., sample values ​​or motion information) of images other than the current image. When applying inter-frame prediction to the current block, the prediction block (prediction sample array) of the current block can be derived based on the reference block (reference sample array) specified by the motion vector on the reference image indicated by the reference image index. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, the motion information of the current block can be predicted on a block, sub-block, or sample-by-sample basis based on the correlation of motion information between neighboring blocks and the current block. Motion information can include motion vectors and reference image indices. Motion information can also include inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the application of inter-frame prediction, neighboring blocks can include spatially neighboring blocks present in the current image and temporally neighboring blocks present in a reference image. The reference image including the reference block and the reference image including the temporally neighboring block can be the same as or different from each other. The temporally neighboring block can be referred to by names such as juxtaposed reference block, juxtaposed CU (colCU), etc., and the reference image including the temporally neighboring block can be referred to as the juxtaposed image (colPic). For example, a candidate list of motion information can be configured based on the neighboring blocks of the current block, and a flag or index information indicating which candidate to select (use) can be signaled to derive the motion vector of the current block and / or the reference image index. Inter-frame prediction can be performed based on various prediction modes, and for example, in skip mode and merge mode, the motion information of the current block can be the same as the motion information of the selected neighboring block. In skip mode, residual signaling is not required as in merge mode. In motion vector prediction (MVP) mode, the motion vector of the selected neighboring block can be used as a motion vector predictor, and the motion vector difference can be signaled. In this case, the motion vector of the current block can be derived using the sum of the motion vector predictor and the motion vector difference.

[0093] Depending on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), motion information can further include L0 motion information and / or L1 motion information. The L0 direction motion vector can be referred to as the L0 motion vector or MVL0, and the L1 direction motion vector can be referred to as the L1 motion vector or MVL1. Prediction based on the L0 motion vector can be called L0 prediction, prediction based on the L1 motion vector can be called L1 prediction, and prediction based on both L0 and L1 motion vectors can be called bi-prediction. Here, the L0 motion vector can indicate the motion vector associated with the reference image list L0, and the L1 motion vector can indicate the motion vector associated with the reference image list L1. The reference image list L0 can include images preceding the current image in output order, and the reference image list L1 can include images following the current image in output order, serving as reference images. The previous image can be referred to as the forward (reference) image, and the subsequent image can be referred to as the backward (reference) image. The reference image list L0 can further include images following the current image in output order, serving as reference images. In this scenario, previous images can be indexed first in the reference image list L0, and then subsequent images can be indexed. The reference image list L1 can further include images preceding the current image in the output order as reference images. In this case, subsequent images can be indexed first in the reference image list L1, and then previous images can be indexed. Here, the output order can correspond to the image order counting (POC) order.

[0094] The video / image coding process based on inter-frame prediction can schematically include, for example, the following.

[0095] Figure 4 An example of a video / image coding method based on inter-frame prediction is shown.

[0096] The encoding device performs inter-frame prediction on the current block (S400). The encoding device can deduce the inter-frame prediction mode and motion information of the current block and generate prediction samples for the current block. Here, the inter-frame prediction mode determination process, the motion information derivation process, and the prediction sample generation process can be executed simultaneously, and any one of these processes can be executed earlier than the others. For example, the inter-frame prediction unit of the encoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit can determine the prediction mode for the current block, the motion information derivation unit can deduce the motion information of the current block, and the prediction sample derivation unit can deduce the prediction samples for the current block. For example, the inter-frame prediction unit of the encoding device can search for blocks similar to the current block in a predetermined region (search region) of a reference image through motion estimation, and deduce a reference block whose difference from the current block is the smallest or equal to or less than a predetermined criterion. Based on this derivation, a reference image index of the reference image in which the reference block is located can be indicated, and a motion vector can be derived based on the positional difference between the reference block and the current block. The encoding device can determine the mode applicable to the current block among various prediction modes. The encoding device can compare the RD costs of various prediction modes and determine the best prediction mode for the current block.

[0097] For example, when a skip mode or merge mode is applied to the current block, the encoding device can configure a merge candidate list (described below) and deduce a reference block among the reference blocks indicated by the merge candidates included in the merge candidate list that has a difference from the current block that is smallest, equal to, or less than a predetermined standard. In this case, the merge candidate associated with the deduced reference block can be selected, and merge index information indicating the selected merge candidate can be generated and signaled to the decoding device. The motion information of the current block can be deduced using the motion information of the selected merge candidate.

[0098] As another example, when the (A)MVP mode is applied to the current block, the encoding device can configure an (A)MVP candidate list, as described below, and use the motion vector of the selected MVP candidate from among the motion vector predictor (MVP) candidates included in the (A)MVP candidate list as the MVP of the current block. In this case, for example, the motion vector of a reference block derived through motion estimation can be used as the motion vector of the current block, and the MVP candidate with the motion vector having the smallest difference from the motion vector of the current block can be selected as the MVP candidate. The motion vector difference (MVD) can be derived by subtracting the MVP from the motion vector of the current block. In this case, information about the MVD can be signaled to the decoding device. Furthermore, when the (A)MVP mode is applied, the value of the reference picture index can be configured as reference picture index information and signaled to the decoding device separately.

[0099] The encoding device can derive residual samples based on the predicted samples (S410). The encoding device can derive residual samples by comparing the original samples and the predicted samples of the current block.

[0100] The encoding device encodes image information, including prediction information and residual information (S420). The encoding device can output the encoded image information in the form of a bitstream. The prediction information may include information about prediction mode information (e.g., skip flag, merge flag, or mode index, etc.) and information about motion information, as information related to the prediction process. The information about motion information may include candidate selection information (e.g., merge index, MVP flag, or MVP index), which is information used to derive motion vectors. In addition, the information about motion information may include information about MVD and / or reference image index information. Furthermore, the information about motion information may include information indicating whether L0 prediction, L1 prediction, or dual prediction is applied. The residual information is information about residual samples. The residual information may include information about the quantization transform coefficients used for the residual samples.

[0101] The output bitstream can be stored in a (digital) storage medium and transmitted to a decoding device, or transmitted to a decoding device via a network.

[0102] Furthermore, as mentioned above, the encoding device can generate a reconstructed image (including reconstructed samples and reconstructed blocks) based on reference samples and residual samples. This is to derive the same prediction result as that performed by the decoding device, and as a result, encoding efficiency can be improved. Therefore, the encoding device can store the reconstructed image (or reconstructed samples or reconstructed blocks) in memory and use the reconstructed image as a reference image. As mentioned above, in-loop filtering can be further applied to the reconstructed image.

[0103] Video / image decoding processing based on inter-frame prediction can schematically include, for example, the following.

[0104] Figure 5 An example of a video / image decoding method based on inter-frame prediction is shown.

[0105] Reference Figure 5 The decoding device can perform operations corresponding to those performed by the encoding device. The decoding device can perform predictions on the current block and derive prediction samples based on the received prediction information.

[0106] Specifically, the decoding device can determine the prediction mode of the current block based on the received prediction information (S500). The decoding device can determine which inter-frame prediction mode to apply to the current block based on the prediction mode information in the prediction information.

[0107] For example, a merge flag can be used to determine whether merge mode or (A)MVP mode is applied to the current block. Alternatively, a variety of inter-frame prediction mode candidates can be selected based on a mode index. Inter-frame prediction mode candidates may include skip mode, merge mode, and / or (A)MVP mode, or may include various inter-frame prediction modes described below.

[0108] The decoding device derives motion information for the current block based on the determined inter-frame prediction mode (S510). For example, when a skip mode or merge mode is applied to the current block, the decoding device can be configured with a merge candidate list described below, and select a merge candidate from among the merge candidates included in the merge candidate list. Here, the selection can be performed based on selection information (merge index). The motion information for the current block can be derived using the motion information of the selected merge candidate. The motion information of the selected merge candidate can be used as the motion information for the current block.

[0109] As another example, when the (A)MVP mode is applied to the current block, the decoding device can configure an (A)MVP candidate list, as described below, and use the motion vector of the selected MVP candidate from among the motion vector prediction sub-candidates (MVPs) included in the (A)MVP candidate list as the MVP of the current block. Here, selection can be performed based on selection information (MVP flag or MVP index). In this case, the MVD of the current block can be derived based on information about the MVD, and the motion vector of the current block can be derived based on the MVP and MVD of the current block. Furthermore, the reference image index of the current block can be derived based on reference image index information. The image indicated by the reference image index in the reference image list for the current block can be derived as the reference image referenced by the inter-frame prediction of the current block.

[0110] Furthermore, as described below, the motion information of the current block can be derived without a candidate list configuration, and in this case, the motion information of the current block can be derived based on the process disclosed in the prediction mode. In this case, the candidate list configuration can be omitted.

[0111] The decoding device can generate prediction samples for the current block based on the motion information of the current block (S520). In this case, a reference image can be derived based on the reference image index of the current block, and prediction samples for the current block can be derived by using samples of the reference block indicated by the motion vector of the current block on the reference image. In some cases, a prediction sample filtering process for all or some of the prediction samples for the current block can be further performed.

[0112] For example, the inter-frame prediction unit of the decoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit may determine the prediction mode for the current block based on the received prediction mode information. The motion information derivation unit may derive the motion information (motion vector and / or reference image index) of the current block based on information about the received motion information. The prediction sample derivation unit may derive the prediction samples of the current block.

[0113] The decoding device generates residual samples for the current block based on the received residual information (S530). The decoding device can generate reconstruction samples for the current block based on the predicted samples and residual samples, and generate a reconstructed image based on the generated reconstruction samples (S540). Thereafter, as described above, the in-loop filtering process can be further applied to the reconstructed image.

[0114] Figure 6 The inter-frame prediction process is illustrated schematically.

[0115] Reference Figure 6 As described above, the inter-frame prediction process may include an inter-frame prediction mode determination step, a motion information derivation step based on the determined prediction mode, and a prediction processing step (prediction sample generation) step based on the derivation of motion information. The inter-frame prediction process may be performed by the encoding and decoding devices described above. In this document, the encoding device may include an encoding device and / or a decoding device.

[0116] Reference Figure 6 The encoding device determines the inter-frame prediction mode for the current block (S600). Various inter-frame prediction modes can be used for predicting the current block in the image. For example, various modes can be used, such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, merge with MVD (MMVD) mode, and history motion vector prediction (HMVP) mode. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, dual prediction with CU-level weights (BCW), and bidirectional optical flow (BDOF) can be further used as additional modes. Affine mode can also be called affine motion prediction mode. MVP mode can also be called advanced motion vector prediction (AMVP) mode. In this paper, some modes and / or motion information candidates derived from some modes can also be included in one of the motion information-related candidates in other modes. For example, HMVP candidates can be added to the merge candidates of merge / skip mode, or to the MVP candidates of MVP mode. If an HMVP candidate is used as a motion information candidate for merge mode or skip mode, then the HMVP candidate can be called an HMVP merge candidate.

[0117] Prediction mode information, indicating the inter-frame prediction mode of the current block, can be signaled from the encoding device to the decoding device. In this case, the prediction mode information can be included in the bitstream and received by the decoding device. The prediction mode information may include index information indicating one of a plurality of candidate modes. Alternatively, the inter-frame prediction mode can be indicated by hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, a skip flag can be signaled to indicate whether a skip mode is applied; a merge flag can be signaled to indicate whether a merge mode is applied when a skip mode is not applied; and an MVP mode can be signaled when a merge mode is not applied, or further flags for additional differentiation can be signaled. Affine modes can be signaled as independent modes or as subordinate modes to merge or MVP modes. For example, affine modes may include affine merge mode and affine MVP mode.

[0118] The encoding device derives motion information for the current block (S610). Motion information derivation can be based on inter-frame prediction modes.

[0119] The encoding device can perform inter-frame prediction using motion information from the current block. The encoding device can derive the optimal motion information for the current block through a motion estimation process. For example, the encoding device can search for highly correlated similar reference blocks within a predetermined search range in a reference image, using original blocks from the original image used for the current block, on a fractional-pixel basis, and derive motion information using the searched reference blocks. Block similarity can be derived based on the difference in phase-based sample values. For example, block similarity can be calculated based on the sum of absolute differences (SAD) between the current block (or its template) and a reference block (or its template). In this case, motion information can be derived based on the reference block with the minimum SAD in the search region. The derived motion information can be signaled to the decoding device based on the inter-frame prediction mode, according to various methods.

[0120] The encoding device performs inter-frame prediction based on motion information for the current block (S620). The encoding device can derive one or more prediction samples for the current block based on the motion information. The current block, including the prediction samples, can be called the prediction block.

[0121] Furthermore, as mentioned above, the encoding device can perform various encoding methods such as exponential Golomb, context-adaptive variable-length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). Additionally, the decoding device can decode information in the bitstream based on encoding methods such as exponential Golomb coding, CAVLC, or CABAC, and output the values ​​of the syntax elements required for image reconstruction and the quantized values ​​of the transform coefficients associated with the residuals.

[0122] For example, the above encoding method can be performed as follows.

[0123] Figure 7 An example is illustrated using Context Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements. For instance, in CABAC encoding processing, when the input signal is a syntax element rather than a binary value, the encoding device can convert the input signal into a binary value by binarizing the value of the input signal. Alternatively, when the input signal is already a binary value (i.e., when the value of the input signal is binary), binarization can be skipped and bypassed. Here, each binary number 0 or 1 that constitutes the binary value can be referred to as a bin. For example, if the binarized binary string is 110, then each of 1, 1, and 0 can be referred to as a bin. The bin for a syntax element can indicate the value of the syntax element.

[0124] Subsequently, the binary representation of the syntax elements (bins) can be input into either the regular encoding engine or the bypass encoding engine. The regular encoding engine of the encoding device can assign a context model reflecting probability values ​​to the corresponding bin and encode the corresponding 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 each bin. The bin encoded as described above can be referred to as a context-encoded bin.

[0125] Furthermore, when the binary bins of syntax elements are input to the bypass coding engine, they can be encoded as follows. For example, the bypass coding engine of the encoding device omits the process of estimating the probability of the input bins and the process of updating the probability model applied to the bins after encoding. When bypass coding is applied, the encoding device can improve the encoding speed by applying a uniform probability distribution instead of assigning a context model to encode the input bins. The bins encoded as described above can be called bypass bins.

[0126] Entropy decoding can represent a process that performs the same process as entropy encoding described above in reverse order.

[0127] For example, when decoding a syntax element based on a context model, the decoding device can receive the bin corresponding to the syntax element via a bitstream, determine the context model using the syntax element and decoding information of the target block or neighboring blocks, or information of symbols / bins decoded in the previous stage, predict the probability of occurrence of the received bin based on the determined context model, and perform arithmetic decoding on the bin to derive the value of the syntax element. Subsequently, the determined context model can be used to update the context model of the decoded bin.

[0128] Furthermore, for example, when a syntax element is bypassed and decoded, the decoding device can receive the bin corresponding to the syntax element via a bitstream and decode the input bin by applying a uniform probability distribution. In this case, the process of deriving the context model for the syntax element and the process of updating the context model applied to the bin after decoding can be omitted.

[0129] As described above, residual samples can be derived into quantized transform coefficients through transformation and quantization processing. Quantized transform coefficients can also be referred to as transform coefficients. In this case, the transform coefficients in the block can be signaled in the form of residual information. The residual information can include residual coding syntax. That is, the encoding device can configure the residual coding syntax using the residual information, encode it, and output it as a bitstream, and the decoding device can decode the residual coding syntax from the bitstream and derive the residual (quantized) transform coefficients. The residual coding syntax can include syntax elements indicating whether a transform is applied to the corresponding block, the position of the last valid transform coefficient in the block, whether valid transform coefficients exist in the sub-block, the size / sign of the valid transform coefficients, etc., as described later.

[0130] For example, syntax elements related to residual data encoding / decoding can be represented as shown in the table below.

[0131] [Table 1]

[0132]

[0133]

[0134]

[0135] The `transform_skip_flag` indicates whether a transform was skipped in the associated block. `transform_skip_flag` can be a syntax element of the transform skip flag. The associated block can be a coded block (CB) or a transform block (TB). CB and TB can be used interchangeably regarding the transform (and quantization) and residual encoding processes. For example, as mentioned above, residual samples can be derived for a CB, and transform coefficients can be derived (quantized) by transforming and quantizing the residual samples. Information (e.g., syntax elements) indicating the position, size, sign, etc., of the quantized transform coefficients can be generated and signaled efficiently through the residual encoding process. Quantized transform coefficients can be simply referred to as transform coefficients. Typically, when the CB is not greater than the maximum TB, the size of the CB can be the same as the size of the TB, and in this case, the target block to be transformed (and quantized) and residual encoded can be referred to as either a CB or a TB. Furthermore, when the CB is greater than the maximum TB, the target block to be transformed (and quantized) and residual encoded can be referred to as a TB. The following will describe signaling of syntax elements related to residual coding in units of transform blocks (TBs), but this is just an example, and as mentioned above, TBs can be used interchangeably with code blocks (CBs).

[0136] Furthermore, the syntax elements for signaling after the signaling change skip flag can be the same as those disclosed in Tables 2 and / or 3 below, and a detailed description of the syntax elements is described below.

[0137] [Table 2]

[0138]

[0139]

[0140]

[0141]

[0142]

[0143] [Table 3]

[0144]

[0145]

[0146]

[0147] According to this embodiment, as shown in Table 1, residual coding can be divided based on the value of the transform_skip_flag syntax element. That is, different syntax elements can be used for residual coding based on the value of the transform skip flag (based on whether the transform is skipped). The residual coding used when no transform skip is applied (i.e., when the transform is applied) can be called regular residual coding (RRC), while the residual coding used when transform skip is applied (i.e., when no transform is applied) can be called transform skip residual coding (TSRC). In addition, regular residual coding can be called general residual coding. Furthermore, regular residual coding can be called regular residual coding syntax structure, and transform skip residual coding can be called transform skip residual coding syntax structure. Table 2 above shows the syntax elements of residual coding when the value of transform_skip_flag is 0 (i.e., when the transform is applied), and Table 3 above shows the syntax elements of residual coding when the value of transform_skip_flag is 1 (i.e., when no transform is applied).

[0148] Specifically, for example, a transform skip flag indicating whether to skip a transform block can be parsed, and it can be determined whether the transform skip flag is 1. If the transform skip flag is 0, then as shown in Table 2, the 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 the residual coefficients of the transform block can be parsed, and the residual coefficients can be derived based on the syntax elements. In this case, the syntax elements can be parsed sequentially, and the parsing order can be changed. Additionally, abs_level_gtx_flag can represent abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n][0] could be an example of the first transform coefficient level flag (abs_level_gt1_flag), and abs_level_gtx_flag[n][1] could be an example of the second transform coefficient level flag (abs_level_gt3_flag).

[0149] 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 can be encoded / decoded. Furthermore, sb_coded_flag can be represented as coded_sub_block_flag.

[0150] In an implementation, the encoding device can encode the (x,y) position information of the last non-zero transform coefficient in the transform block based on the 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, last_sig_coeff_x_prefix represents the prefix of the column position of the last valid coefficient in the transform block according to the scan order, last_sig_coeff_y_prefix represents the prefix of the row position of the last valid coefficient in the transform block according to the scan order, last_sig_coeff_x_suffix represents the suffix of the column position of the last valid coefficient in the transform block according to the scan order, and last_sig_coeff_y_suffix represents the suffix of the row position of the last valid coefficient in the transform block according to the scan order. Here, a valid coefficient can represent a non-zero coefficient. Furthermore, the scan order can be a right-angled diagonal scan order. Alternatively, the scan order can be a horizontal scan order or a vertical scan order. The scan order can be determined based on whether intra-frame prediction / inter-frame prediction and / or a specific intra-frame prediction / inter-frame prediction mode is applied to the target block (CB or CB including TB).

[0151] After this, the encoding device can divide the transform block into 4×4 sub-blocks, and then use a 1-bit syntax element coded_sub_block_flag for each 4×4 sub-block to indicate whether there are non-zero coefficients in the current sub-block.

[0152] If the value of `coded_sub_block_flag` is 0, no more information needs to be sent, and therefore the encoding device can terminate the encoding process for the current sub-block. Conversely, if the value of `coded_sub_block_flag` is 1, the encoding device can continuously perform encoding processing on `sig_coeff_flag`. Since sub-blocks containing the last non-zero coefficients do not need to encode `coded_sub_block_flag`, and sub-blocks containing DC information of the transform block have a high probability of including non-zero coefficients, `coded_sub_block_flag` may not be encoded and its value can be assumed to be 1.

[0153] If the value of `coded_sub_block_flag` is 1, thus indicating the presence of a non-zero coefficient in the current subblock, the encoding device can encode the `sig_coeff_flag` with its binary value according to the reverse scan order. The encoding device can encode the 1-bit syntax element `sig_coeff_flag` for each transform coefficient according to the scan order. If the value of the transform coefficient at the current scan position is not 0, the value of `sig_coeff_flag` can be 1. Here, in the case of subblocks including the last non-zero coefficient, `sig_coeff_flag` does not need to be encoded for the last non-zero coefficient, and therefore the encoding process for the subblock can be omitted. Level information encoding can only be performed when `sig_coeff_flag` is 1, and four syntax elements can be used in the level information encoding process. More specifically, each `sig_coeff_flag[xC][yC]` can 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 implementation, sig_coeff_flag may correspond to an example of a syntax element that indicates whether the quantized transform coefficients are non-zero valid coefficients.

[0154] The remaining level value after encoding sig_coeff_flag can be derived as shown in the following formula. That is, the syntax element remAbsLevel, which indicates the level value to be encoded, can be derived from the following formula.

[0155] [Formula 1]

[0156] remAbsLevel = |coeff| - 1

[0157] In this article, coeff refers to the actual transformation coefficient value.

[0158] Additionally, `abs_level_gt1_flag` can indicate whether `remAbsLevel'` at the corresponding scan position (n) is greater than 1. For example, when the value of `abs_level_gt1_flag` is 0, the absolute value of the transform coefficient at the corresponding position can be 1. Furthermore, when the value of `abs_level_gt1_flag` is 1, `remAbsLevel`, which indicates the level value to be encoded later, can be updated as shown in the following formula.

[0159] [Equation 2]

[0160] remAbsLevel = remAbsLevel - 1

[0161] Alternatively, the minimum effective coefficient (LSB) value of remAbsLevel described in Equation 2 above can be encoded using par_level_flag, just as in Equation 3 below.

[0162] [Formula 3]

[0163] par_level_flag = |coeff| & 1

[0164] In this paper, par_level_flag[n] can indicate the parity of the transformation coefficient level (value) at scan position (n).

[0165] The transform coefficient level value remAbsLevel, which is to be encoded after par_level_flag encoding, can be updated in the same way as shown in the following formula.

[0166] [Formula 4]

[0167] remAbsLevel=remAbsLevel>>1

[0168] The `abs_level_gt3_flag` indicates whether the `remAbsLevel` at the corresponding scan position (n) is greater than 3. Encoding of `abs_remainder` can only be performed if `rem_abs_gt3_flag` is equal to 1. The relationship between the actual transform coefficient value `coeff` and each syntax element can be represented as follows:

[0169] [Formula 5]

[0170] |coeff|=sig_coeff_flag+abs_level_gt1_flag+par_level_flag+2*(abs_level_gt3-flag+abs_remainder)

[0171] Additionally, the table below indicates examples related to Equation 5 above.

[0172] [Table 4]

[0173]

[0174] In this paper, |coeff| indicates the transform coefficient level (value), and can also be used to indicate the AbsLevel of the transform coefficient. Additionally, the sign of each coefficient can be encoded using the coeff_sign_flag as a 1-bit sign.

[0175] Additionally, if the transform skip flag is set to 1, then as shown in Table 3, the syntax elements sb_coded_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag, par_level_flag, and / or abs_remainder for the residual coefficients of the transform block can be parsed, and the residual coefficients can be derived based on the syntax elements. In this case, the syntax elements can be parsed sequentially, and the parsing order can be changed. Furthermore, abs_level_gtx_flag can 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] can be a flag indicating whether the absolute value or level (value) of the transform coefficient at scan position n is greater than (j<<1)+1. The condition (j<<1)+1 can optionally be replaced with a specific threshold such as a first threshold, a second threshold, etc.

[0176] Furthermore, while CABAC offers high performance, it suffers from poor throughput performance. This is due to CABAC's conventional encoding engine. Conventional encoding (i.e., encoding performed using CABAC's conventional encoding engine) exhibits high data dependency because it uses probabilistic states and ranges updated through encoding the previous bin, and reading the probability intervals and determining the current state can take a significant amount of time. CABAC's throughput problem can be addressed by limiting the number of bins used for context encoding. For example, as shown in Table 2 above, the total number of bins used to represent sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag can be limited to the number of bins that depend on the corresponding block size. Additionally, for example, as shown 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 can be limited to the number of bins that depend on the size of the corresponding block. For example, if the corresponding block is a 4×4 block, the sum of the bins of 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 can be limited to 32 (or, for example, 28), and if the corresponding block is a 2×2 block, the sum of the bins of sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag can be limited to 8 (or, for example, 7). The limited number of bins can be represented by remBinsPass1 or RemCcbs. Alternatively, for example, for higher CABAC throughput, the number of bins for context encoding can be limited for blocks (CBs or TBs) that include the encoded target CG. In other words, the number of bins for context encoding can be limited on a block (CB or TB) basis.For example, when the size of the current block is 16×16, the number of bins used for context encoding of the current block can be limited to 1.75 times the number of pixels in the current block (i.e., 448), regardless of the current CG.

[0177] In this scenario, if a limited number of context-encoded bins are used when encoding context elements, the encoding device can binarynize the remaining coefficients using the method described below, instead of using context encoding, and can perform bypass encoding. In other words, for example, if the number of context-encoded bins for 4×4 CG encoding is 32 (or, for example, 28), or if the number of context-encoded bins for 2×2 CG encoding is 8 (or, for example, 7), then sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag encoded using context-encoded bins no longer need to be encoded and can be directly encoded as dec_abs_level. Alternatively, for example, when the number of bins for context encoding for a 4×4 block is 1.75 times the number of pixels in the entire block, i.e., when limited to 28, the sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag that are encoded as bins for context encoding may no longer be encoded and may be directly encoded as dec_abs_level, as shown in Table 5 below.

[0178] [Table 5]

[0179] |coeff[n]| dec_abs_level[n] 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 … …

[0180] The value |coeff| can be derived based on dec_abs_level. In this case, the transformation coefficient value, i.e., |coeff|, can be derived as shown in the following equation.

[0181] [Formula 6]

[0182] |coeff|=dec_abs_level

[0183] Additionally, `coeff_sign_flag` can indicate the sign of the transform coefficients at the corresponding scan position n. That is, `coeff_sign_flag` can indicate the sign of the transform coefficients at the corresponding scan position n.

[0184] Figure 8 An example of the transformation coefficients in a 4×4 block is shown.

[0185] Figure 8The 4×4 block represents an example of quantization coefficients. Figure 8 The block can be a 4×4 transform block or a 4×4 sub-block of an 8×8, 16×16, 32×32 or 64×64 transform block. Figure 8 A 4x4 block can represent a luminance block or a chrominance block.

[0186] Furthermore, as mentioned above, when the input signal is not a binary value but a syntax element, the encoding device can transform the input signal into a binary value by binaryizing the input signal's value. Additionally, the decoding device can decode the syntax element to derive its binary value (e.g., a binary bin), and can debind the binary value to derive the syntax element's value. Binary conversion can be performed as truncated Rice (TR) binary conversion, k-order exponential Golomb (EGk) binary conversion, finite k-order exponential Golomb (finite EGk), fixed-length (FL) binary conversion, etc. Furthermore, debinding can refer to processing performed based on TR binary conversion, EGk binary conversion, or FL binary conversion to derive the syntax element's value.

[0187] For example, TR binary conversion can be performed as follows.

[0188] The input to TR binaryization can be cMax and cRiceParam for the syntax elements, as well as a request for TR binaryization. The output of TR binaryization can be the TR binaryization of symbolVal, which is the value corresponding to the bin string.

[0189] Specifically, for example, if a suffix bin string exists for a syntax element, the TR bin string for that syntax element can be a concatenation of the prefix bin string and the suffix bin string; conversely, if a suffix bin string does not exist, the TR bin string for that syntax element can be the prefix bin string. For example, the prefix bin string can be derived as follows.

[0190] The prefix value of symbolVal for a syntax element can be derived as shown in the following formula.

[0191] [Formula 7]

[0192] prefixVal=symbolVal>>cRiceParam

[0193] In this paper, prefixVal can represent the prefix value of symbolVal. The prefix (i.e., the prefix bin string) of the TR bin string of the syntax element can be derived as follows.

[0194] For example, if prefixVal is less than cMax >> cRiceParam, the prefix bin string can be a bit string of length prefixVal + 1 indexed by binIdx. That is, if prefixVal is less than cMax >> cRiceParam, the prefix bin string can be a bit string with the number of bits equal to prefixVal + 1 indicated by binIdx. The bin of binIdx less than prefixVal can be equal to 1. Additionally, the bin of binIdx equal to prefixVal can be equal to 0.

[0195] For example, the bin string derived by unary - binaryizing prefixVal can be as shown in the following table.

[0196] [Table 6]

[0197]

[0198] In addition, if prefixVal is not less than cMax >> cRiceParam, the prefix bin string can be a bit string of length cMax >> cRiceParam and all bits are 1.

[0199] Additionally, if cMax is greater than symbolVal and if cRiceParam is greater than 0, there can be a bin suffix bit string of the TR bin string. For example, the suffix bit string can be derived as described below.

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

[0201] [Formula (8)]

[0202] suffixVal = symbolVal - ((prefixVal) << cRiceOaram)

[0203] In this article, suffixVal can represent the suffix value of symbolVal.

[0204] The suffix of the TR bin string (i.e., the suffix bin string) can be derived based on the FL binaryization process for suffixVal whose value of cMax is (1 << cRiceParam) - 1.

[0205] In addition, if the value of the input parameter (i.e., cRiceParam) is 0, the TR binaryization can be exactly truncated unary binaryization and can always use the same value cMax as the possible maximum value of the syntax element to be decoded.

[0206] Alternatively, for example, EGk binary conversion can be performed as follows. Syntax elements encoded using ue(v) can be syntax elements encoded using exponential Golomb encoding.

[0207] For example, the binary conversion of the 0th exponent Columbus (EG0) can be performed as follows.

[0208] Parsing a syntax element can begin by reading the first non-zero bit, starting from the current position in the bitstream, and counting the number of leading bits equal to 0. This process can be represented as shown in the table below.

[0209] [Table 7]

[0210]

[0211] Alternatively, the variable codeNum can be derived as follows.

[0212] [Formula 9]

[0213] codeNum=2 leadingZeroBits -1 + read_bits(leadingZeroBits)

[0214] In this paper, the value returned by read_bits(leadingZeroBits) (i.e., the value indicated by read_bits(leadingZeroBits)) can be interpreted as the binary representation of the unsigned integer of the most significant bit first recorded.

[0215] The structure of the exponential Columbus code, in which the bit string is divided into "prefix" bits and "suffix" bits, can be represented as shown in the table below.

[0216] [Table 8]

[0217] bit string form The scope of codeNum 1 0 <![CDATA[0 1 x0]]> 1..2 <![CDATA[0 0 1 x1 x0]]> 3..6 <![CDATA[0 0 0 1 x2 x1 x0]]> 7..14 <![CDATA[0 0 0 0 1 x3 x2 x1 x0]]> 15..30 <![CDATA[0 0 0 0 0 1 x4 x3 x2 x1 x0]]> 31..62 … …

[0218] The “prefix” bits can be the bits parsed for calculating leadingZeroBits as described above, and can be indicated by 0 or 1 in the bit string in Table 8. That is, the bit string indicated by 0 or 1 in Table 8 can represent the prefix bit string. The “suffix” bits can be the bits parsed when calculating codeNum, and can be represented by xi in Table 8. That is, the bit string indicated by xi in Table 8 can represent the suffix bit string. Here, i can be a value from 0 to LeadingZeroBits-1. In addition, each xi can be equal to 0 or 1.

[0219] The bit string assigned to codeNum can be shown in the table below.

[0220] [Table 9]

[0221] Bit string codeNum 1 0 0 1 0 1 0 1 1 2 0 0 1 0 0 3 0 0 1 0 1 4 0 0 1 1 0 5 0 0 1 1 1 6 0 0 0 1 0 0 0 7 0 0 0 1 0 0 1 8 0 0 0 1 0 1 0 9 … …

[0222] If the descriptor of a syntax element is ue(v) (i.e., if the syntax element is encoded in ue(v)), then the value of the syntax element can be equal to codeNum.

[0223] Alternatively, for example, EGk binary conversion can be performed as follows.

[0224] The input to EGk binaryization can be a request for EGk binaryization. Additionally, the output of EGk binaryization can be an EGk binaryization of symbolVal (i.e., the value corresponding to the bin string).

[0225] The bit string for the binary processing of symbolVal using EGk can be derived as follows.

[0226] [Table 10]

[0227]

[0228] Referring to Table 10 above, the binary value X can be appended to the end of the bin string with each call to put(X). In this article, X can be 0 or 1.

[0229] Alternatively, for example, finite EGk binary conversion can be performed as follows.

[0230] The input to finite EGk binaryization can be a request for finite EGk binaryization, the rice parameter ricParam, log2TransformRange as a variable representing the binary logarithm of the maximum value, and maxPreExtLen as a variable representing the maximum prefix extension length. Furthermore, the output of finite EGk binaryization can be a finite EGk binaryization of symbolVal as the value corresponding to the empty string.

[0231] The bit string for finite EGk binary processing of symbolVal can be derived as follows.

[0232] [Table 11]

[0233]

[0234] Alternatively, for example, FL binary conversion can be performed as follows.

[0235] The input to FL binary processing can be a request for cMax and FL binary processing for syntax elements. Additionally, the output of FL binary processing can be the FL binary processing for symbolVal, which is the value corresponding to the bin string.

[0236] FL binaryization can be configured by using a fixed-length bit string whose number of bits has symbolVal. In this paper, the fixed-length bit string can be an unsigned integer bit string. That is, the bit string used as symbolVal as the sign value can be derived by FL binaryization, and the bit length (i.e., the number of bits) of the bit string can be fixed.

[0237] For example, a fixed length can be derived as shown in the following formula.

[0238] [Formula 10]

[0239] fixedLength=Ceil(Log2(cMax+1))

[0240] The index of a bin in FL binary can be achieved by using values ​​that increase sequentially from the most significant bit to the least significant bit. For example, the bin index associated with the most significant bit could be binIdx = 0.

[0241] In addition, for example, the binary processing of the syntax element abs_remainder in the residual information can be performed as follows.

[0242] The input for binary processing of abs_remainder can be a request to binary the syntax element abs_remainder[n], the color component cIdx, and the luminance position (x0, y0). The luminance position (x0, y0) can indicate the top-left sample of the current luminance transform block based on the top-left luminance sample of the image.

[0243] The output of the binary processing of abs_remainder can be the binary representation of abs_remainder (i.e., the binary binary string of abs_remainder). The bit string available for abs_remainder can be derived through the binary processing.

[0244] The Rice parameter cRiceParam for abs_remainder[n] can be derived using Rice parameter derivation processing performed by inputting the color component cIdx and the luminance position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth (the binary logarithm of the transform block width), and log2TbHeight (the binary logarithm of the transform block height). A detailed description of the Rice parameter derivation processing will be provided later.

[0245] Alternatively, for example, the cMax of the abs_remainder[n] to be encoded can be derived based on the Rice parameter cRiceParam. cMax can be derived as shown in the following formula.

[0246] [Equation 11]

[0247] cMax = 6 << cRiceParam

[0248] Furthermore, the binary representation of `abs_remainder` (i.e., the bin string used for `abs_remainder`) can be a concatenation of the prefix and suffix bin strings if a suffix bin string exists. Conversely, if no suffix bin string exists, the bin string used for `abs_remainder` can be the prefix bin string.

[0249] For example, the prefix bin string can be derived as follows.

[0250] The prefix value prefixVal of abs_remainder[n] can be derived as shown in the following formula.

[0251] [Equation 12]

[0252] prefixVal=Min(cMax, abs_remainder[n])

[0253] The prefix of the bin string (i.e., the prefix bin string) of abs_remainder[n] can be derived by performing TR binary processing on prefixVal, where cMax and cRiceParam are used as input.

[0254] If the prefix bin string is the same as a bit string with all bits set 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 can be derived as follows.

[0255] The derivation of the Rice parameter for dec_abs_level[n] can be performed as follows.

[0256] The input to the Rice parameter derivation process can be the color component index cIdx, the luminance position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth (the binary logarithm of the transform block width), and log2TbHeight (the binary logarithm of the transform block height). The luminance position (x0, y0) can indicate the top-left sample of the current luminance transform block based on the top-left luminance sample of the image. Furthermore, the output of the Rice parameter derivation process can be the Rice parameter cRiceParam.

[0257] For example, the variable locSumAbs can be derived from an array AbsLevel[x][y] of transform blocks with a given component index cIdx and a top-left luminance position (x0, y0), similar to the pseudocode disclosed in the table below.

[0258] [Table 12]

[0259]

[0260] Then, based on the given variable locSumAbs, the Rice parameter cRiceParam can be derived as shown in the table below.

[0261] [Table 13]

[0262] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3

[0263] Additionally, for example, in the Rice parameter derivation process for abs_remainder[n], baseLevel can be set to 4.

[0264] Alternatively, for example, the Rice parameter cRiceParam can be determined based on whether a transformation skip is applied to the current block. That is, if no transformation is applied to the current TB including the current CG, in other words, if a transformation skip is applied to the current TB including the current CG, then the Rice parameter cRiceParam can be derived to be 1.

[0265] Additionally, the suffix value suffixVal of abs_remainder can be derived as shown in the following formula.

[0266] [Equation 13]

[0267] suffixVal=abs_remainder[n]-cMax

[0268] The suffix bin string of abs_remainder can be derived by performing a finite EGk binary transformation on suffixVal, where k is set to cRiceParam+1, riceParam is set to cRiceParam, log2TransformRange is set to 15, and maxPreExtLen is set to 11.

[0269] In addition, for example, the binary processing of the syntax element dec_abs_level in the residual information can be performed as follows.

[0270] The input for the binary processing of dec_abs_level can be a request to binary-code the syntax element dec_abs_level[n], the color component cIdx, the luminance position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth (the binary logarithm of the transform block width), and log2TbHeight (the binary logarithm of the transform block height). The luminance position (x0, y0) can indicate the top-left sample of the current luminance transform block based on the top-left luminance sample of the image.

[0271] The output of the binary processing of dec_abs_level can be the binary representation of dec_abs_level (i.e., the binary bin string of dec_abs_level). The available bin strings for dec_abs_level can be derived through the binary processing.

[0272] The Rice parameter cRiceParam of dec_abs_level[n] can be derived by performing a Rice parameter derivation process with inputs of color component cIdx, luminance position (x0, y0), current coefficient scan position (xC, yC), log2TbWidth (the binary logarithm of the transform block width), and log2TbHeight (the binary logarithm of the transform block height). The Rice parameter derivation process will be described in detail below.

[0273] Alternatively, for example, the cMax of dec_abs_level[n] can be derived based on the Rice parameter cRiceParam. cMax can be derived as shown in the table below.

[0274] [Formula 14]

[0275] cMax = 6 << cRiceParam

[0276] Furthermore, the binary representation of dec_abs_level[n] (i.e., the bin string used for dec_abs_level[n]) can be a concatenation of the prefix bin string and the suffix bin string if a suffix bin string exists. Alternatively, if no suffix bin string exists, the bin string used for dec_abs_level[n] can be the prefix bin string.

[0277] For example, the prefix bin string can be derived as follows.

[0278] The prefix value prefixVal of dec_abs_level[n] can be derived as shown in the following formula.

[0279] [Formula 15]

[0280] prefixVal=Min(cMax, dec_abs_level[n])

[0281] The prefix of the bin string (i.e., the prefix bin string) of dec_abs_level[n] can be derived by performing TR binary processing on prefixVal, where cMax and cRiceParam are used as input.

[0282] If the prefix bin string is the same as a bit string with all bits set to 1 and a length of 6, then there may be a suffix bin string of dec_abs_level[n] bin string, which can be derived as described below.

[0283] The derivation of the Rice parameter for dec_abs_level[n] can be performed as follows.

[0284] The input to the Rice parameter derivation process can be the color component index cIdx, the luminance position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth (the binary logarithm of the transform block width), and log2TbHeight (the binary logarithm of the transform block height). The luminance position (x0, y0) can indicate the top-left sample of the current luminance transform block based on the top-left luminance sample of the image. Furthermore, the output of the Rice parameter derivation process can be the Rice parameter cRiceParam.

[0285] For example, the variable locSumAbs can be derived from an array AbsLevel[x][y] of transform blocks with a given component index cIdx and a top-left luminance position (x0, y0), similar to the pseudocode disclosed in the table below.

[0286] [Table 14]

[0287]

[0288] Then, based on the given variable locSumAbs, the Rice parameter cRiceParam can be derived as shown in the table below.

[0289] [Table 15]

[0290] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3

[0291] Additionally, for example, in the Rice parameter derivation process for dec_abs_level[n], baseLevel can be set to 0, and ZeroPos[n] can be derived as follows.

[0292] [Formula 16]

[0293] ZeroPos[n]=(QState<2?1:2)<<cRiceParam

[0294] Additionally, the suffix value suffixVal of dec_abs_level[n] can be derived as shown in the following formula.

[0295] [Equation 17]

[0296] suffixVal=dec_abs_level[n]-cMax

[0297] The suffix bin string of dec_abs_level[n] can be derived by performing finite EGk binary processing on suffixVal, where k is set to cRiceParam+1, truncSuffixLen is set to 15, and maxPreExtLen is set to 11.

[0298] In addition, RRC and TSRC can have the following differences.

[0299] - For example, the Rice parameter cRiceParam of the syntax elements abs_remainder[] and dec_abs_level[] in RRC can be derived based on locSumAbs, lookup tables, and / or baseLevel as described above, but the Rice parameter cRiceParam of the syntax element abs_remainder[] in TSRC can be derived as 1. That is, for example, when a transformation skip is applied to the current block (e.g., the current TB), the Rice parameter cRiceParam of abs_remainder[] for the current block in TSRC can be derived as 1.

[0300] - Additionally, for example, referring to Tables 3 and 4, in RRC, abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1] can be signaled, but in TSRC, 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] can be signaled. Here, abs_level_gtx_flag[n][0] can be represented as abs_level_gt1_flag or the first coefficient level flag, abs_level_gtx_flag[n][1] can be represented as abs_level_gt3_flag or the second coefficient level flag, abs_level_gtx_flag[n][2] can be represented as abs_level_gt5_flag or the third coefficient level flag, abs_level_gtx_flag[n][3] can be represented as abs_level_gt7_flag or the fourth coefficient level flag, and abs_level_gtx_flag[n][4] can be represented as abs_level_gt9_flag or the fifth coefficient level flag. Specifically, the first coefficient level flag can be a flag indicating whether the coefficient level is greater than a first threshold (e.g., 1), the second coefficient level flag can be a flag indicating whether the coefficient level is greater than a second threshold (e.g., 3), the third coefficient level flag can be a flag indicating whether the coefficient level is greater than a third threshold (e.g., 5), the fourth coefficient level flag can be a flag indicating whether the coefficient level is greater than a fourth threshold (e.g., 7), and the fifth coefficient level flag can be a flag indicating whether the coefficient level is greater than a fifth threshold (e.g., 9). As mentioned above, in TSRC, compared with RRC, it can also include 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].

[0301] - Additionally, for example, in RRC, the syntax element coeff_sign_flag can be bypassed, but in TSRC, the syntax element coeff_sign_flag can be either bypassed or context-encoded.

[0302] Furthermore, for residual sample quantization, dependent quantization can be proposed. Dependent quantization can represent a method that depends on the values ​​of the transform coefficients (values ​​at the transform coefficient level), where the set of reconstructed values ​​allowed for the current transform coefficient is ordered before the current transform coefficient in reconstruction order. That is, for example, dependent quantization can be implemented by (a) defining two scalar quantizers with different reconstruction levels and (b) defining the processing for the transition between the scalar quantizers. Compared to existing independent scalar quantization, dependent quantization can have the effect of having a more concentrated set of allowed reconstructed vectors in an N-dimensional vector space. Here, N can represent the number of transform coefficients in the transform block.

[0303] Figure 9 An example is provided illustrating a scalar quantizer used in dependent quantization. (See also...) Figure 9 The location of the enabled reconstruction level can be specified by the quantization step size Δ. (See reference...) Figure 9 Scalar quantizers can be represented as Q0 and Q1. The scalar quantizers currently in use can be derived without explicit signaling from the bitstream. For example, the quantizer used for the current transform coefficient can be determined by the parity of the transform coefficient levels preceding the current transform coefficient in the encoding / reconstruction order.

[0304] Figure 10 Examples illustrate state transitions and quantizer selection for quantization-dependent operations.

[0305] Reference Figure 10 The transition between two scalar quantizers Q0 and Q1 can be implemented using a state machine with four states. These four states can have four different values ​​(0, 1, 2, and 3). In the encoding / reconstruction order, the state of the current transform coefficient can be determined by the parity of the transform coefficient levels preceding the current transform coefficient.

[0306] For example, at the start of dequantization for a transform block, the quantization-dependent states can be configured to 0. Subsequently, the transform coefficients of the transform block can be reconstructed in scan order (i.e., the same order as the entropy decoding). For example, after reconstructing the current transform coefficients, as... Figure 10 As illustrated, the state dependent on quantization can be updated. Following the scan order, dequantization of the transform coefficients reconstructed after the current transform coefficients can be performed based on the updated state. Figure 10In this context, k can represent the value of the transformation coefficient, that is, the value of the transformation coefficient level. For example, if k (the current transformation coefficient value) & 1 is 0 in the current state 0, then the state can be updated to 0, while if k & 1 is 1, then the state can be updated to 2. Similarly, if k & 1 is 0 in the current state 1, then the state can be updated to 2, while if k & 1 is 1, then the state can be updated to 0. Likewise, if k & 1 is 0 in the current state 2, then the state can be updated to 1, while if k & 1 is 1, then the state can be updated to 3. And so on, if k & 1 is 0 in the current state 3, then the state can be updated to 3, while if k & 1 is 1, then the state can be updated to 1. (See reference...) Figure 10 If the state is 0 or 1, the scalar quantizer used in the dequantization process can be Q0, and if the state is 2 or 3, the scalar quantizer used in the dequantization process can be Q1. The quantization parameters at the reconstruction level of the transform coefficients can be dequantized by the scalar quantizer for the current state.

[0307] Furthermore, this disclosure proposes implementation methods related to residual data encoding. The implementation methods described in this disclosure can be combined with each other. In the residual data encoding methods described above, conventional residual coding (RRC) and transform skip residual coding (TSRC) may be present.

[0308] In either of the two methods described above, the residual data encoding method for the current block can be determined based on the values ​​of `transform_skip_flag` and `sh_ts_residual_coding_disabled_flag`, as illustrated in Table 1. Here, the syntax element `sh_ts_residual_coding_disabled_flag` can indicate whether TSRC is enabled. Therefore, if `slice_ts_residual_coding_disabled_flag` indicates that TSRC is not enabled even when `transform_skip_flag` indicates transform skipping, the transform skipping block can be signaled according to the syntax element of RRC. That is, if the value of `transform_skip_flag` is 0, or if the value of `slice_ts_residual_coding_disabled_flag` is 1, RRC can be used; otherwise, TSRC can be used.

[0309] While high coding efficiency can be achieved by using slice_ts_residual_coding_disabled_flag in certain applications (e.g., lossless coding), existing video / image coding standards have not introduced restrictions on the use of dependency quantization and slice_ts_residual_coding_disabled_flag together. That is, dependency quantization can be activated at a high level (e.g., Sequence Parameter Set (SPS) syntax / Video Parameter Set (VPS) syntax / Decoding Parameter Set (DPS) syntax / Picture Header Syntax / Slice Header Syntax) or a low level (CU / TU), and if slice_ts_residual_coding_disabled_flag is 1, the value of the dependency quantization state in the RRC may lead to unnecessary operations (i.e., operations based on dependency quantization) that degrade coding performance, or unexpected performance losses may occur due to misconfiguration in the coding device. Therefore, this implementation proposes a scheme for configuring the two techniques, dependency quantization and residual coding (i.e., coding of residual samples of blocks skipped by transformation in the current slice of RRC), to be used together when slice_ts_residual_coding_disabled_flag=1 to prevent unexpected coding loss or failure.

[0310] As an implementation method, this disclosure proposes a method where slice_ts_residual_coding_disabled_flag depends on ph_dep_quant_enabled_flag. For example, the syntax elements proposed in this implementation can be found in the following table.

[0311] [Table 16]

[0312]

[0313] According to this implementation, when the value of ph_dep_quant_enabled_flag is 0, a signal can be sent to slice_ts_residual_coding_disabled_flag. Here, ph_dep_quant_enabled_flag can indicate whether dependency quantization is enabled. For example, if the value of ph_dep_quant_enabled_flag is 1, it indicates that dependency quantization is enabled, while if the value of ph_dep_quant_enabled_flag is 0, it indicates that dependency quantization is not enabled.

[0314] Accordingly, according to this implementation, `slice_ts_residual_coding_disabled_flag` can be signaled only when dependency quantization is disabled, and when dependency quantization is enabled and therefore `slice_ts_residual_coding_disabled_flag` is not signaled, `slice_ts_residual_coding_disabled_flag` can be inferred to be 0. Furthermore, `ph_dep_quant_enabled_flag` and `slice_ts_residual_coding_disabled_flag` can be signaled to the image header syntax and / or the slice header syntax, or they can be signaled to another high-level syntax (HLS) that is not the image header syntax and the slice header syntax or is at a low level (CU / TU) (e.g., SPS syntax / VPS syntax / DPS syntax). If `ph_dep_quant_enabled_flag` is signaled to a syntax that does not include the image header syntax, it can be referred to by another name. For example, ph_dep_quant_enabled_flag can be represented as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or sps_dep_quant_enabled_flag.

[0315] Furthermore, this disclosure proposes another implementation for configuring the correlation / constraint between dependent quantization and residual coding (i.e., encoding of residual samples of transform skip blocks in the current slice of RRC) when slice_ts_residual_coding_disabled_flag = 1. For example, this implementation proposes a scheme where, when slice_ts_residual_coding_disabled_flag is 1, the state of dependent quantization is not used for encoding the level values ​​of transform coefficients, in order to prevent unexpected coding loss or failures due to using dependent quantization and residual coding (i.e., encoding of residual samples of transform skip blocks in the current slice of RRC) together when slice_ts_residual_coding_disabled_flag = 1. The residual coding syntax according to this implementation can be shown in the table below.

[0316] [Table 17]

[0317]

[0318]

[0319]

[0320]

[0321]

[0322] Referring to Table 17 above, with ph_dep_quant_enabled_flag set to 1 and slice_ts_residual_coding_disabled_flag set to 0, the Qstate can be derived, and the values ​​of the transform coefficients (transform coefficient levels) can be derived based on the Qstate. For example, referring to Table 17, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transformation coefficients derived from the syntax elements of the transformation coefficients, coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the transformation coefficients, and (QState>1?1:0) can represent 1 if the value of state QState is greater than 1 (i.e., if the value of state QState is 2 or 3), and can represent 0 if the value of state QState is equal to or less than 1 (i.e., if the value of state QState is 0 or 1).

[0323] Additionally, referring to Table 17 as described above, if the value of slice_ts_residual_coding_disabled_flag is 1, the values ​​of the transform coefficients (transform coefficient levels) can be derived without using Qstate. For example, referring to Table 17, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transform coefficient derived from the syntax elements of the transform coefficients, and coeff_sign_flag[n] can be a syntax element representing the sign flag of the transform coefficient.

[0324] Furthermore, according to this embodiment, if the value of slice_ts_residual_coding_disabled_flag is 1, the quantization-dependent state may not be used to encode the level values ​​of the transform coefficients, and state updates may not be performed. For example, the residual coding syntax according to this embodiment can be as shown in the table below.

[0325] [Table 18]

[0326]

[0327]

[0328]

[0329]

[0330]

[0331] Referring to Table 18 as described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, then QState can 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, then QState can be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. Alternatively, if the value of slice_ts_residual_coding_disabled_flag is 1, then the process of updating QState is not performed.

[0332] Additionally, 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, the value of the transform coefficient (transform coefficient level) can be derived based on Qstate. For example, referring to Table 18, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transformation coefficients derived from the syntax elements of the transformation coefficients, coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the transformation coefficients, and (QState>1?1:0) can represent 1 if the value of state QState is greater than 1 (i.e., if the value of state QState is 2 or 3), and can represent 0 if the value of state QState is equal to or less than 1 (i.e., if the value of state QState is 0 or 1).

[0333] Additionally, referring to Table 18 as described above, if the value of slice_ts_residual_coding_disabled_flag is 1, the values ​​of the transform coefficients (transform coefficient levels) can be derived without using Qstate. For example, referring to Table 18, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transform coefficient derived from the syntax elements of the transform coefficients, and coeff_sign_flag[n] can be a syntax element representing the sign flag of the transform coefficient.

[0334] Furthermore, this disclosure proposes another implementation for configuring the correlation / constraint between dependent quantization and residual coding (i.e., coding of residual samples of the transform skip block in the current slice of the RRC) when slice_ts_residual_coding_disabled_flag = 1. For example, this implementation proposes a scheme to add constraints using transform_skip_flag in the process of deriving the values ​​of transform coefficients (transform coefficient level) based on the state or state update of dependent quantization in the RRC. That is, this implementation proposes a scheme whereby the process of deriving the values ​​of transform coefficients (transform coefficient level) is not used based on transform_skip_flag, according to the state and / or state update of dependent quantization in the RRC. The residual coding syntax according to this implementation is shown in the table below.

[0335] [Table 19]

[0336]

[0337]

[0338]

[0339]

[0340]

[0341] Referring to Table 19 as described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, then QState can be updated. For example, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, then QState can be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. Alternatively, if the value of transform_skip_flag is 1, then updating QState is not required.

[0342] Additionally, 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, the Qstate can be derived, and the values ​​of the transform coefficients (transform coefficient levels) can be derived based on the Qstate. For example, referring to Table 19, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transformation coefficients derived from the syntax elements of the transformation coefficients, coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the transformation coefficients, and (QState>1?1:0) can represent 1 if the value of state QState is greater than 1 (i.e., if the value of state QState is 2 or 3), and can represent 0 if the value of state QState is equal to or less than 1 (i.e., if the value of state QState is 0 or 1).

[0343] Additionally, referring to Table 19 as described above, if the value of transform_skip_flag is 1, the values ​​of the transform coefficients (transform coefficient levels) can be derived without using Qstate. Accordingly, when encoding the residual data according to RRC for the transform skip block, the values ​​of the transform coefficients can be derived without using Qstate. For example, referring to Table 19, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transform coefficient derived based on the syntax elements of the transform coefficients, and coeff_sign_flag[n] can be a syntax element representing the sign flag of the transform coefficient.

[0344] Furthermore, as described above, the information (syntax elements) in the syntax table disclosed in this disclosure can be included in image / video information, configured / encoded by the encoding device, and transmitted to the decoding device in the form of a bitstream. The decoding device can parse / decode the information (syntax elements) corresponding to the syntax table. The decoding device can perform a block / image / video reconstruction process based on the decoded information.

[0345] Figure 11 A brief illustration is provided of an image encoding method performed by an encoding device according to the present disclosure. Figure 11 The method disclosed in the article can be derived from Figure 2 The encoding device disclosed in the document executes the code. Specifically, for example, Figure 11 S1100 can be performed by the predictor of the encoding device, and S1110 to S1160 can be performed by the entropy encoder of the encoding device. Additionally, although not illustrated, the process of deriving the residual samples of the current block based on the original samples and predicted samples of the current block can be performed by the subtractor of the encoding device, and the process of generating the reconstructed samples and reconstructed image of the current block based on the residual samples and predicted samples of the current block can be performed by the adder of the encoding device.

[0346] The encoding device derives prediction samples for the current block based on inter-frame prediction (S1100). For example, the encoding device can derive the inter-frame prediction mode and motion information for the current block, and can generate prediction samples for the current block. Here, the processes for determining the inter-frame prediction mode, deriving motion information, and generating prediction samples can be performed simultaneously as described above, or one process can be performed after the other. For example, the encoding device can search for blocks close to the current block within a certain region (search region) of the reference image through motion estimation, and can derive reference blocks whose differences from the current block are equal to or less than a minimum value or a predetermined standard. Based on this, the encoding device can derive a reference image index indicating the reference image where the reference block is located, and can derive motion vectors based on the positional differences between the reference block and the current block. The encoding device can determine the inter-frame prediction mode applicable to the current block among various inter-frame prediction modes. For example, the encoding device can compare the RD costs of various inter-frame prediction modes and determine the optimal inter-frame prediction mode for the current block.

[0347] For example, the encoding device can construct a motion information candidate list for the current block, and can deduce reference blocks whose difference from the current block is equal to or less than a minimum value or a predetermined standard from the reference blocks indicated by the motion information candidates included in the motion information candidate list. In this case, motion information candidates associated with the deduced reference blocks can be selected, and the motion information of the current block can be deduced based on the motion information of the selected motion information candidates.

[0348] The encoding device encodes the prediction-related information for the current block (S1110). The image information may include the prediction-related information for the current block. For example, the prediction-related information may include prediction mode information and motion information about the current block as information related to the prediction process. The motion information may include the aforementioned motion vector difference (MVD) information and / or reference image index information.

[0349] The encoding device encodes a dependency quantization enable flag (S1120) indicating whether dependency quantization is enabled. The encoding device can encode a dependency quantization enable flag for indicating whether dependency quantization is enabled. Image information may include the dependency quantization enable flag. For example, the encoding device can determine whether dependency quantization is enabled for a block of images in the sequence and encode a dependency quantization enable flag for indicating whether dependency quantization is enabled. For example, the dependency quantization enable flag can be a flag indicating whether dependency quantization is enabled. For example, the dependency quantization enable flag can indicate whether dependency quantization is enabled. That is, for example, the dependency quantization enable flag can indicate whether dependency quantization is enabled for a block of images in the sequence. For example, the dependency quantization enable flag can indicate whether a dependency quantization usage flag indicating whether dependency quantization is used for the current slice may exist. For example, a dependency quantization enable flag with a value of 1 can indicate that dependency quantization is enabled, and a dependency quantization enable flag with a value of 0 can indicate that dependency quantization is not enabled. Additionally, for example, the dependency quantization enable flag can be signaled to the SPS syntax or the slice header syntax. The syntax element of the dependency quantization enable flag can be `sps_dep_quant_enabled_flag` as described above. sps_dep_quant_enabled_flag can be called sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.

[0350] The encoding device encodes the TSRC enable flag, which is used to determine whether to enable transform skip residual coding (TSRC), based on the dependent quantization enable flag (S1130). The image information may include the TSRC enable flag.

[0351] For example, the encoding device can encode the TSRC enable flag based on the dependency quantization enable flag. For example, the TSRC enable flag can be encoded based on a dependency quantization enable flag with a value of 0. That is, for example, if the value of the dependency quantization enable flag is 0 (i.e., if the dependency quantization enable flag indicates that dependency quantization is not enabled), the TSRC enable flag can be encoded. In other words, for example, if the value of the dependency quantization enable flag is 0 (i.e., if the dependency quantization enable flag indicates that dependency quantization is not enabled), the TSRC enable flag can be signaled. Alternatively, for example, if the value of the dependency quantization enable flag is 1, the TSRC enable flag may not be encoded, and the value of the TSRC enable flag can be deduced as 0 in the decoding device. That is, for example, if the value of the dependency quantization enable flag is 1 (i.e., if dependency quantization is applied (or used) to the current block), the TSRC enable flag may not be signaled, and the value of the TSRC enable flag can be deduced as 0 in the decoding device. Accordingly, for example, if dependency quantization is not enabled for the current block, the TSRC enable flag can be signaled (or encoded). If dependent quantization is enabled for the current block, the TSRC enable flag can be omitted (or encoded), and the value of the TSRC enable flag can be deduced as 0 in the decoding device. Here, the current block can be a coded block (CB) or a transform block (TB).

[0352] Here, for example, the TSRC enable flag can be a flag used to indicate whether TSRC is enabled. That is, for example, the TSRC enable flag can be a flag indicating whether TSRC is enabled for blocks in a slice. For example, a TSRC enable flag with a value of 1 can indicate that TSRC is not enabled, and a TSRC enable flag with a value of 0 can indicate that TSRC is enabled. Alternatively, for example, the TSRC enable flag can be signaled to the slice header syntax. The syntax element of the TSRC enable flag can be sh_ts_residual_coding_disabled_flag as described above.

[0353] The encoding device determines the residual coding syntax of the current block based on the TSRC enable flag (S1140). The encoding device can determine the residual coding syntax of the current block based on the TSRC enable flag. For example, the encoding device can determine the residual coding syntax of the current block as either regular residual coding (RRC) syntax or transform skip residual coding (TSRC) syntax based on the TSRC enable flag. The RRC syntax can represent the syntax according to RRC, and the TSRC syntax can represent the syntax according to TSRC.

[0354] For example, based on the TSRC enable flag with a value of 1, the residual coding syntax of the current block can be determined as regular residual coding (RRC) syntax. In this case, for example, a transform skip flag for determining whether the current block is a transform skip block can be encoded, and the value of the transform skip flag can be 1. For example, image information can include the transform skip flag of the current block. The transform skip flag can indicate whether the current block is a transform skip block. That is, the transform skip flag can indicate whether a transform has been applied to the transform coefficients of the current block. The syntax element representing the transform skip flag can be transform_skip_flag as described above. For example, if the value of the transform skip flag is 1, the transform skip flag can indicate that no transform has been applied to the current block (i.e., the transform is skipped), while if the value of the transform skip flag is 0, the transform skip flag can indicate that a transform has been applied to the current block. For example, if the current block is a transform skip block, the value of the transform skip flag of the current block can be 1.

[0355] Additionally, for example, based on a TSRC enable flag with a value of 0, the residual coding syntax of the current block can be determined as Transform Skip Residual Coding (TSRC) syntax. Additionally, for example, the transform skip flag used to determine whether the current block is a transform skip block can be encoded, and based on a transform skip flag with a value of 1 and a TSRC enable flag with a value of 0, the residual coding syntax of the current block can be determined as Transform Skip Residual Coding (TSRC) syntax. Additionally, for example, the transform skip flag used to determine whether the current block is a transform skip block can be encoded, and based on a transform skip flag with a value of 0 and a TSRC enable flag with a value of 0, the residual coding syntax of the current block can be determined as Transform Skip Residual Coding (TSRC) syntax. Additionally, for example, the transform skip flag used to determine whether the current block is a transform skip block can be encoded, and based on a transform skip flag with a value of 0 and a TSRC enable flag with a value of 0, the residual coding syntax of the current block can be determined as Regular Residual Coding (RRC) syntax.

[0356] The encoding device encodes the residual information of the determined residual coding syntax for the current block (S1150). The encoding device can derive the residual samples of the current block and encode the residual information of the determined residual coding syntax for the residual samples of the current block. Image information may include residual information.

[0357] For example, an encoding device can derive the residual sample of the current block by subtracting the original sample from the predicted sample of the current block.

[0358] Subsequently, for example, the encoding device can derive the transform coefficients of the current block based on the residual samples. For example, the encoding device can determine whether to apply a transform to the current block. That is, the encoding device can determine whether to apply a transform to the residual samples of the current block. The encoding device can consider encoding efficiency to determine whether to apply a transform to the current block. For example, the encoding device can determine not to apply a transform to the current block. A block to which no transform is applied can be represented as a transform-skipped block. That is, for example, the current block can be a transform-skipped block.

[0359] If no transform is applied to the current block, i.e., if no transform is applied to the residual samples, the encoding device can derive transform coefficients from the derived residual samples. Alternatively, if a transform is applied to the current block, i.e., if a transform is applied to the residual samples, the encoding device can derive transform coefficients by performing a transform on the residual samples. The current block can include multiple sub-blocks or coefficient groups (CGs). Furthermore, the size of the sub-blocks of the current block can be 4×4 or 2×2. That is, the sub-blocks of the current block can include up to 16 non-zero transform coefficients or 4 non-zero transform coefficients. Here, the current block can be a coded block (CB) or a transform block (TB). Additionally, transform coefficients can be represented as residual coefficients.

[0360] Furthermore, the encoding device can determine whether to apply dependent quantization to the current block. For example, if dependent quantization is applied to the current block, the encoding device can derive the transform coefficients of the current block by performing dependent quantization on the transform coefficients. For example, if dependent quantization is applied to the current block, the encoding device can update the dependent quantization state (Qstate) based on the coefficient level of the transform coefficients that precede the current transform coefficient in the scan order, derive the coefficient level of the current transform coefficient based on the updated state and the syntax elements of the current transform coefficient, and derive the current transform coefficient through the coefficient level derived by quantization. For example, the current transform coefficient can be quantized based on the quantization parameters of the reconstruction level of the current transform coefficient in the scalar quantizer for the updated state.

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

[0362] For example, the residual information in the RRC syntax can include syntax elements of the transform coefficients of the current block. Here, the transform coefficients can be represented as residual coefficients.

[0363] For example, 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.

[0364] Specifically, for example, the syntax elements may include positional information indicating the position of the last non-zero transform coefficient in the residual coefficient array of the current block. That is, the syntax elements may include positional information indicating the position of the last non-zero transform coefficient in the scan order of the current block. The positional information may include information indicating the prefix of the column position of the last non-zero transform coefficient, information indicating the prefix of the row position of the last non-zero transform coefficient, information indicating the suffix of the column position of the last non-zero transform coefficient, and information indicating the suffix of the row position of the last non-zero transform coefficient. The syntax elements for the positional information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. Furthermore, non-zero transform coefficients may be referred to as valid coefficients.

[0365] Additionally, for example, syntax elements may include a coded subblock flag indicating whether the current subblock of the current block includes non-zero transform coefficients, a valid coefficient flag indicating whether the transform coefficients of the current block are non-zero transform coefficients, a first coefficient level flag indicating whether the coefficient level for the transform coefficients is greater than a first threshold, a parity level flag indicating the parity of the coefficient levels, and / or a second coefficient level flag indicating whether the coefficient level for the transform coefficients is greater than a second threshold. Here, the coded subblock flag may be sb_coded_flag or coded_sub_block_flag, the valid 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.

[0366] Additionally, for example, syntax elements can include coefficient value information related to the transform coefficient values ​​of the current block. This coefficient value information can be `abs_remainder` and / or `dec_abs_level`.

[0367] Additionally, for example, syntax elements may include a sign flag representing the sign of the transform coefficients. The sign flag could be `coeff_sign_flag`.

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

[0369] For example, the residual information in the TSRC syntax can include syntax elements of the transform coefficients of the current block. Here, the transform coefficients can also be represented as residual coefficients.

[0370] For example, syntax elements may include context-encoded syntax elements and / or bypass-encoded syntax elements for transform coefficients. Syntax elements may include syntax elements 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.

[0371] For example, the context-encoding syntax elements for transform coefficients may include a valid 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 threshold, and / or a parity level flag indicating the parity of the transform level of the transform coefficient. Alternatively, for example, the context-encoding syntax elements may include a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold, a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third threshold, a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the valid 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`, and the parity level flag may be `par_level_flag`. Additionally, the second coefficient level flag can be either abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag can be either abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag can be either abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag can be either abs_level_gt9_flag or abs_level_gtx_flag.

[0372] Additionally, for example, the bypass coding syntax elements for transform coefficients may include coefficient level information of the values ​​of the transform coefficients (or coefficient levels) and / or a sign flag indicating the sign of the transform coefficients. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.

[0373] The encoding device generates a bitstream including prediction-related information, a dependent quantization enable flag, a TSRC enable flag, and residual information (S1160). For example, the encoding device can output image information including prediction-related information, a dependent quantization enable flag, a TSRC enable flag, and residual information as a bitstream. The bitstream may include prediction-related information, a dependent quantization enable flag, a TSRC enable flag, and residual information.

[0374] In addition, the bitstream can be sent to the decoding device via a network or (digital) storage medium. Here, the network can include broadcast networks and / or communication networks, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.

[0375] Figure 12 A brief illustration is provided of an encoding device that performs an image encoding method according to the present disclosure. Figure 11 The method disclosed in the article can be derived from Figure 12 The encoding device disclosed in the document executes the code. Specifically, for example, Figure 12 The predictor of the encoding device can perform Figure 11 S1100 in, and Figure 12 The entropy encoder of the encoding device can perform Figure 11 S1110 to S1160. In addition, although not illustrated, the process of deriving the residual sample of the current block based on the original sample and the predicted sample of the current block can be performed by the subtractor of the encoding device, and the process of generating the reconstructed sample and the reconstructed image of the current block based on the residual sample and the predicted sample of the current block can be performed by the adder of the encoding device.

[0376] Figure 13 A brief illustration is provided of an image decoding method performed by a decoding device according to the present disclosure. Figure 13 The method disclosed in the article can be derived from Figure 3 The decoding device disclosed in the document performs the operation. Specifically, for example, Figure 13 S1300 to S1330 in the code can be executed by the entropy decoder of the decoding device. Figure 13 S1340 to S1350 can be executed by the predictor of the decoding device. Figure 13 S1360 can be executed by the residual processor of the decoding device, and S1370 can be executed by the adder of the decoding device.

[0377] The decoding device obtains prediction-related information for the current block (S1300). The decoding device can obtain the prediction-related information for the current block through the bitstream. For example, image information may include prediction-related information for the current block. For example, the prediction-related information may include prediction mode information for the current block. The decoding device can determine which inter-frame prediction mode to apply to the current block based on the prediction mode information. For example, the inter-frame prediction mode may include skip mode, merge mode, and / or (A)MVP mode, or may include various inter-frame prediction modes mentioned above.

[0378] The decoding device obtains a dependency quantization enable flag (S1310) for determining whether dependency quantization is enabled. The decoding device can obtain image information, including the dependency quantization enable flag, from the bitstream. The image information may include the dependency quantization enable flag. For example, the dependency quantization enable flag can be a flag indicating whether dependency quantization is enabled. For example, the dependency quantization enable flag can indicate whether dependency quantization is enabled. That is, for example, the dependency quantization enable flag can indicate whether dependency quantization is enabled for blocks of images in the sequence. For example, the dependency quantization enable flag can indicate whether there might be a dependency quantization usage flag indicating whether dependency quantization is used for the current slice. For example, a dependency quantization enable flag with a value of 1 can indicate that dependency quantization is enabled, and a dependency quantization enable flag with a value of 0 can indicate that dependency quantization is not enabled. Additionally, for example, the dependency quantization enable flag can be signaled to the SPS syntax or the slice header syntax. The syntax element of the dependency quantization enable flag can be `sps_dep_quant_enabled_flag` as described above. sps_dep_quant_enabled_flag can be called sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.

[0379] The decoding device obtains a TSRC enable flag (S1320) for whether to enable Transform Skip Residual Coding (TSRC) based on a dependent quantization enable flag. Image information may include the TSRC enable flag.

[0380] For example, the decoding device can obtain the TSRC enable flag based on the dependency quantization enable flag. For example, the TSRC enable flag can be obtained based on a dependency quantization enable flag with a value of 0. That is, for example, if the value of the dependency quantization enable flag is 0 (i.e., if the dependency quantization enable flag indicates that dependency quantization is not enabled), the TSRC enable flag can be obtained. In other words, for example, if the value of the dependency quantization enable flag is 0 (i.e., if the dependency quantization enable flag indicates that dependency quantization is not enabled), the TSRC enable flag can be signaled. Alternatively, for example, if the value of the dependency quantization enable flag is 1, the TSRC enable flag cannot be obtained, and the value of the TSRC enable flag can be deduced to be 0. That is, for example, if the value of the dependency quantization enable flag is 1 (i.e., if dependency quantization is applied (or used) for the current block), the TSRC enable flag cannot be signaled, and the value of the TSRC enable flag can be deduced to be 0. Accordingly, for example, if dependency quantization is not enabled for the current block, the TSRC enable flag can be signaled (or obtained). If dependent quantization is enabled for the current block, the TSRC enable flag cannot be signaled (or obtained), and the value of the TSRC enable flag can be deduced to be 0. Here, the current block can be a coded block (CB) or a transform block (TB).

[0381] Here, for example, the TSRC enable flag can be a flag used to indicate whether TSRC is enabled. That is, for example, the TSRC enable flag can be a flag indicating whether TSRC is enabled for blocks in a slice. For example, a TSRC enable flag with a value of 1 can indicate that TSRC is not enabled, and a TSRC enable flag with a value of 0 can indicate that TSRC is enabled. Alternatively, for example, the TSRC enable flag can be signaled to the slice header syntax. The syntax element of the TSRC enable flag can be sh_ts_residual_coding_disabled_flag as described above.

[0382] The decoding device obtains residual information of the residual coding syntax of the current block derived based on the TSRC enable flag (S1330). The decoding device can derive the residual coding syntax of the current block from either the TSRC syntax or the regular residual coding (RRC) syntax based on the TSRC enable flag, and can obtain the residual information of the derived residual coding syntax.

[0383] For example, a decoding device can deduce the residual coding syntax of the current block based on the TSRC enable flag. For example, a decoding device can deduce the residual coding syntax of the current block as either regular residual coding (RRC) syntax or transform skip residual coding (TSRC) syntax based on the TSRC enable flag. RRC syntax can represent syntax based on RRC, and TSRC syntax can represent syntax based on TSRC.

[0384] For example, based on the TSRC enable flag with a value of 1, the residual coding syntax of the current block can be derived as regular residual coding (RRC) syntax. In this case, for example, a transform skip flag can be obtained to indicate whether the current block is a transform skip block, and the value of the transform skip flag can be 1. For example, image information can include the transform skip flag of the current block. The transform skip flag can indicate whether the current block is a transform skip block. That is, the transform skip flag can indicate whether a transform has been applied to the transform coefficients of the current block. The syntax element representing the transform skip flag can be transform_skip_flag as described above. For example, if the value of the transform skip flag is 1, the transform skip flag can indicate that no transform has been applied to the current block (i.e., the transform is skipped), while if the value of the transform skip flag is 0, the transform skip flag can indicate that a transform has been applied to the current block. For example, if the current block is a transform skip block, the value of the transform skip flag of the current block can be 1.

[0385] Additionally, for example, based on a TSRC enable flag with a value of 0, the residual coding syntax of the current block can be derived as Transform Skip Residual Coding (TSRC) syntax. Additionally, for example, a transform skip flag for determining whether the current block is a transform skip block can be obtained, and based on a transform skip flag with a value of 1 and a TSRC enable flag with a value of 0, the residual coding syntax of the current block can be derived as Transform Skip Residual Coding (TSRC) syntax. Additionally, for example, a transform skip flag for determining whether the current block is a transform skip block can be obtained, and based on a transform skip flag with a value of 0 and a TSRC enable flag with a value of 0, the residual coding syntax of the current block can be determined as Transform Skip Residual Coding (TSRC) syntax. Additionally, for example, a transform skip flag for determining whether the current block is a transform skip block can be obtained, and based on a transform skip flag with a value of 0 and a TSRC enable flag with a value of 0, the residual coding syntax of the current block can be derived as regular residual coding (RRC) syntax.

[0386] Subsequently, for example, the decoding device can obtain residual information of the derived residual coding syntax for the current block. Image information may include residual information.

[0387] For example, if the residual coding syntax of the current block is derived as RRC syntax, the decoding device can obtain the residual information of the RRC syntax of the current block. For example, the residual information of the RRC syntax may include the syntax elements disclosed in Table 2 as described above.

[0388] For example, the residual information in the RRC syntax can include syntax elements of the transform coefficients of the current block. Here, the transform coefficients can be represented as residual coefficients.

[0389] For example, 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.

[0390] Specifically, for example, the syntax element may include positional information indicating the position of the last non-zero transform coefficient in the residual coefficient array of the current block. That is, the syntax element may include positional information indicating the position of the last non-zero transform coefficient in the scan order of the current block. The positional information may include information indicating the prefix of the column position of the last non-zero transform coefficient, information indicating the prefix of the row position of the last non-zero transform coefficient, information indicating the suffix of the column position of the last non-zero transform coefficient, and information indicating the suffix of the row position of the last non-zero transform coefficient. The syntax element for the positional information may be `last_sig_coeff_x_prefix`, `last_sig_coeff_y_prefix`, `last_sig_coeff_x_suffix`, and `last_sig_coeff_y_suffix`. Furthermore, non-zero transform coefficients may be referred to as effective coefficients.

[0391] Additionally, for example, syntax elements may include a coded subblock flag indicating whether the current subblock of the current block includes non-zero transform coefficients, a valid coefficient flag indicating whether the transform coefficients of the current block are non-zero transform coefficients, a first coefficient level flag indicating whether the coefficient level for the transform coefficients is greater than a first threshold, a parity level flag indicating the parity of the coefficient levels, and / or a second coefficient level flag indicating whether the coefficient level for the transform coefficients is greater than a second threshold. Here, the coded subblock flag may be sb_coded_flag or coded_sub_block_flag, the valid 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.

[0392] Additionally, for example, syntax elements can include coefficient value information related to the transform coefficient values ​​of the current block. This coefficient value information can be `abs_remainder` and / or `dec_abs_level`.

[0393] Additionally, for example, syntax elements may include a sign flag representing the sign of the transform coefficients. The sign flag could be `coeff_sign_flag`.

[0394] For example, if the residual coding syntax of the current block is derived as TSRC syntax, the decoding device can obtain the residual information of the TSRC syntax of the current block. For example, the residual information of the TSRC syntax may include the syntax elements disclosed in Table 3 as described above.

[0395] For example, the residual information in the TSRC syntax can include syntax elements of the transform coefficients of the current block. Here, the transform coefficients can also be represented as residual coefficients.

[0396] For example, syntax elements may include context-encoded syntax elements and / or bypass-encoded syntax elements for transform coefficients. Syntax elements may include syntax elements 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.

[0397] For example, the context-encoding syntax elements for transform coefficients may include a valid 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 threshold, and / or a parity level flag indicating the parity of the transform level of the transform coefficient. Alternatively, for example, the context-encoding syntax elements may include a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold, a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third threshold, a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the valid 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`, and the parity level flag may be `par_level_flag`. Additionally, the second coefficient level flag can be either abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag can be either abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag can be either abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag can be either abs_level_gt9_flag or abs_level_gtx_flag.

[0398] Additionally, for example, the bypass coding syntax elements for transform coefficients may include coefficient level information of the values ​​of the transform coefficients (or coefficient levels) and / or a sign flag indicating the sign of the transform coefficients. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.

[0399] The decoding device derives motion information for the current block based on prediction-related information (S1340). For example, the decoding device may derive motion information for the current block based on an inter-frame prediction mode determined based on prediction-related information. For example, the decoding device may construct a motion information candidate list for the current block, select a motion information candidate from the motion information candidate list based on the motion information candidate index information included in the prediction-related information, and derive motion information for the current block based on the selected motion information candidate.

[0400] The decoding device derives a predicted sample for the current block based on motion information (S1350). For example, the decoding device may derive a reference image for the current block based on the reference image index of the current block, and derive a predicted sample for the current block based on samples of reference blocks in the reference image indicated by the motion vector of the current block. The motion information may include the motion vector of the current block and the reference image index.

[0401] The decoding device derives the residual sample of the current block based on the residual information (S1360). For example, the decoding device can derive the transform coefficients of the current block based on the residual information, and can derive the residual sample of the current block based on the transform coefficients.

[0402] For example, the decoding device can deduce the transform coefficients of the current block based on the syntax elements of the residual information. Then, the decoding device can deduce the residual samples of the current block based on the transform coefficients. As an example, if the transform skip flag indicates that no transform is applied to the current block (i.e., if the transform skip flag is 1), the decoding device can deduce the residual samples of the current block from the transform coefficients. Alternatively, if the transform skip flag indicates that no transform is applied to the current block (i.e., if the transform skip flag is 1), the decoding device can deduce the residual samples of the current block by inverse quantizing the transform coefficients. Alternatively, if the transform skip flag indicates that a transform is applied to the current block (i.e., if the transform skip flag is 0), the decoding device can deduce the residual samples of the current block by performing the inverse transform of the transform coefficients. Alternatively, if the transform skip flag indicates that a transform is applied to the current block (i.e., if the transform skip flag is 0), the decoding device can deduce the residual samples of the current block by inverse quantizing the transform coefficients and performing the inverse transform of the inverse transformed coefficients.

[0403] Furthermore, for example, it can be determined whether to apply dependency quantization to the current block based on a dependency quantization enable flag. For example, if the dependency quantization enable flag is 1 (i.e., if the dependency quantization enable flag indicates that dependency quantization is enabled), dependency quantization can be applied to the current block. For example, if dependency quantization is applied to the current block, the decoding device can derive the residual sample of the current block by performing dependency quantization on the transform coefficients. That is, for example, in the case of applying dependency quantization to the current block, the decoding device can derive the residual sample of the current block based on the dependency quantization of the transform coefficients. For example, in the case of applying dependency quantization to the current block, the decoding device can update the dependency quantization state (Qstate) based on the coefficient level of the transform coefficients that are exactly before the current transform coefficient in the scan order, derive the coefficient level of the current transform coefficient based on the updated state and the syntax elements of the current transform coefficient, and derive the residual sample by dequantizing the derived coefficient level. For example, the current transform coefficient can be quantized based on the quantization parameters of the reconstruction level of the current transform coefficient in the scalar quantizer for the updated state. Here, the reconstruction level can be derived based on the syntax elements of the current transform coefficient.

[0404] Additionally, for example, without applying dependent quantization to the current block, the decoding device can derive the coefficient level of the transform coefficients based on the syntax elements of the transform coefficients of the current block, and derive the residual samples by inverse quantization of the coefficient level. That is, for example, without applying dependent quantization to the current block, the decoding device may not perform state (Qstate) update processing based on the coefficient level of the transform coefficients that are exactly before the current transform coefficient in the scan order.

[0405] The decoding device generates a reconstructed image based on the predicted samples and residual samples (S1370). For example, the decoding device can generate reconstructed samples and / or a reconstructed image of the current block based on the predicted samples and residual samples. For example, the decoding device can generate reconstructed samples by adding the predicted samples and residual samples together.

[0406] Subsequently, when needed, in order to enhance the quality of subjective / objective images, loop filtering processes such as deblocking filtering, SAO and / or ALF processes can be applied to the reconstructed images as described above.

[0407] Figure 14 A decoding device for performing an image decoding method according to the present disclosure is briefly illustrated. Figure 13 The method disclosed in the article can be derived from Figure 14 The decoding device disclosed in the document performs the operation. Specifically, for example, Figure 14 The entropy decoder of the decoding device can perform Figure 13 S1300 to S1330, Figure 14 The predictor of the decoding device can perform Figure 13 S1340 to S1350 in the middle, Figure 14 The residual processor of the decoding device can perform Figure 13 S1360 in, and Figure 14 The adder of the decoding device can perform Figure 13 S1370 in the middle.

[0408] According to this disclosure, residual coding efficiency can be enhanced.

[0409] Furthermore, according to this disclosure, a signaling relationship can be established between the dependent quantization enable flag and the TSRC enable flag. If dependent quantization is not enabled, the TSRC enable flag can be signaled. In this way, if TSRC is not enabled and the RRC syntax is then encoded for the transform skip block, dependent quantization is not used, which improves coding efficiency and improves overall residual coding efficiency by reducing the number of encoded bits.

[0410] Furthermore, according to this disclosure, the TSRC enable flag can only be signaled when dependent quantization is not used. In this way, the encoding of the RRC syntax and the use of dependent quantization do not overlap with each other for transform skip blocks, and the TSRC enable flag can be encoded more efficiently, thereby reducing the number of bits and improving the overall residual coding efficiency.

[0411] In the above embodiments, the method is described based on a flowchart having a series of steps or blocks. This disclosure is not limited to the order of the above steps or blocks. Some steps or blocks can be performed in a different order than the other steps or blocks described above, or simultaneously. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and may include other steps, or one or more steps in the flowchart may be deleted without affecting the scope of this disclosure.

[0412] The embodiments described in this specification can be executed by being implemented on a processor, microprocessor, controller, or chip. For example, the functional unit shown in each figure can be executed by being implemented on a computer, processor, microprocessor, controller, or chip. In this case, the information for implementation (e.g., information about instructions) or algorithm can be stored in a digital storage medium.

[0413] Furthermore, the decoding and encoding devices using this disclosure can be included in the following devices: multimedia broadcasting transmitters / receivers, mobile communication terminals, home theater video devices, digital cinema video devices, surveillance cameras, video chat devices, real-time communication devices such as video communication, mobile streaming devices, storage media, portable video cameras, VoD service providers, over-the-top (OTT) video devices, internet streaming service providers, three-dimensional (3D) video devices, teleconferencing video devices, transportation user devices (e.g., vehicle user devices, airplane user devices, and ship user devices), and medical video devices; and the decoding and encoding devices using this disclosure can be used to process video signals or data signals. For example, over-the-top (OTT) video devices may include game consoles, Blu-ray players, internet-access televisions, home theater systems, smartphones, tablet computers, digital video recorders (DVRs), etc.

[0414] Furthermore, the processing methods of this disclosure can be generated in the form of a computer-executable program and can be stored in a computer-readable recording medium. Multimedia data with data structures according to this disclosure can also be stored in a computer-readable recording medium. A computer-readable recording medium includes all types of storage devices in which computer-readable data is stored. Computer-readable recording media can include, for example, BD, Universal Serial Bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices. Additionally, computer-readable recording media include media implemented in the form of a carrier wave (e.g., transmission via the Internet). Furthermore, bitstreams generated by encoding methods can be stored in a computer-readable recording medium or transmitted via wired / wireless communication networks.

[0415] Furthermore, embodiments of this disclosure can be implemented using computer program products based on program code, and the program code can be executed on a computer using embodiments of this disclosure. The program code can be stored on a computer-readable medium.

[0416] Figure 15 A structural diagram illustrating a content streaming system that applies this disclosure is shown.

[0417] The content streaming media system using the embodiments of this disclosure may mainly include an encoding server, a streaming media server, a network server, a media storage device, a user device, and a multimedia input device.

[0418] An encoding server compresses content input from multimedia input devices such as smartphones, cameras, or camcorders into digital data to generate a bitstream, which is then sent to a streaming media server. As another example, when multimedia input devices such as smartphones, cameras, or camcorders generate bitstreams directly, an encoding server can be omitted.

[0419] A bitstream can be generated by an encoding method or bitstream generation method that applies the embodiments of this disclosure, and the streaming media server can temporarily store the bitstream during the sending or receiving of the bitstream.

[0420] The streaming media server sends multimedia data to the user's device via a web server based on the user's request, and the web server acts as a medium for notifying the user of the service. When a user requests a desired service from the web server, the web server delivers the request to the streaming media server, and the streaming media server sends the multimedia data to the user. In this scenario, the content streaming media system may include a separate control server. In this case, the control server is used to control the commands / responses between devices within the content streaming media system.

[0421] A streaming media server can receive content from media storage and / or encoding servers. For example, when receiving content from an encoding server, the content can be received in real time. In this case, to provide a smooth streaming service, the streaming media server can store the bitstream for a predetermined period of time.

[0422] Examples of user equipment can include mobile phones, smartphones, laptops, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigators, touchscreen PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, and head-mounted displays), digital TVs, desktop computers, and digital signage. Each server within a content streaming system can operate as a distributed server, in which case data received from each server can be distributed.

[0423] The claims described in this disclosure can be combined in various ways. For example, the technical features of the method claims of this disclosure can be combined to implement an apparatus, and the technical features of the apparatus claims of this disclosure can be combined to implement a method. Furthermore, the technical features of the method claims and the apparatus claims of this disclosure can be combined to implement an apparatus, and the technical features of the method claims and the apparatus claims of this disclosure can be combined to implement a method.

Claims

1. An image decoding method performed by a decoding device, the image decoding method comprising the following steps: Obtain prediction-related information for the current block; Obtain the dependency quantization enable flag used to determine whether dependency quantization is enabled; The TSRC disable flag, used to determine whether to enable Transform Skip Residual Coding (TSRC), is obtained based on the dependent quantization enable flag. Obtain residual information of the residual coding syntax of the current block derived based on the TSRC disable flag; The motion information of the current block is derived based on the predicted relevant information; Based on the motion information, the predicted sample of the current block is derived; The residual sample of the current block is derived based on the residual information; as well as A reconstructed image is generated based on the predicted samples and the residual samples. The TSRC disable flag is obtained based on the dependency quantization enable flag with a value of 0, and Specifically, the TSRC disable flag is signaled through the slice header syntax.

2. The image decoding method according to claim 1, wherein, The dependency quantization enable flag with a value of 1 indicates that dependency quantization is enabled, and The dependency quantization enable flag with a value of 0 indicates that dependency quantization is not enabled.

3. The image decoding method according to claim 2, wherein, The derivation of the residual samples includes: When the dependency quantization is applied to the current block, the dependency quantization state Qstate is updated based on the coefficient level of the transform coefficients before the current transform coefficients; The coefficient level of the current transform coefficient is derived based on the syntax elements of the current transform coefficient and the updated state in the residual information; and The residual sample is derived by inverse quantizing the derived coefficient levels.

4. The image decoding method according to claim 1, wherein, A TSRC disable flag with a value of 1 indicates that the TSRC is not enabled, and The TSRC disable flag with a value of 0 indicates that the TSRC is enabled.

5. The image decoding method according to claim 1, wherein, When the value of the dependency quantization enable flag is 1, the TSRC disable flag is not obtained, and the value of the TSRC disable flag is deduced to be 0.

6. The image decoding method according to claim 1, wherein, When dependency quantization is not enabled for the current block, the TSRC disable flag is obtained.

7. The image decoding method according to claim 4, wherein, The residual coding syntax of the current block based on the TSRC disable flag with a value of 1 is determined to be the regular residual coding RRC syntax.

8. The image decoding method according to claim 7, wherein, When the current block is a transform skip block and the value of the TSRC disable flag is 0, the residual coding syntax of the current block is determined to be TSRC syntax.

9. The image decoding method according to claim 8, wherein, Obtain a transform skip flag for determining whether to apply transform skip to the current block, and The value of the transformation skip flag is 1.

10. The image decoding method according to claim 8, wherein, The TSRC syntax includes context-encoded syntax elements for transform coefficients, and The context-coded syntax elements include a valid coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a parity flag for the parity of the coefficient level of the transform coefficient, a sign flag indicating the sign of the transform coefficient, a first coefficient level flag for whether the coefficient level is greater than a first threshold, and a second coefficient level flag for whether the coefficient level of the transform coefficient is greater than a second threshold.

11. An image encoding method performed by an encoding device, the image encoding method comprising the following steps: The prediction sample for the current block is derived based on inter-frame prediction. Encode the prediction-related information for the current block; Encode the dependency quantization enable flag to determine whether dependency quantization is enabled; The TSRC disable flag, used to determine whether to enable Transform Skip Residual Coding (TSRC), is encoded based on the dependent quantization enable flag. The residual coding syntax of the current block is determined based on the TSRC disable flag; Encode the residual information of the determined residual coding syntax for the current block; as well as Generate a bitstream including the prediction-related information, the dependency quantization enable flag, the TSRC disable flag, and the residual information. The TSRC disable flag is encoded based on the dependency quantization enable flag having a value of 0, and Specifically, the TSRC disable flag is signaled through the slice header syntax.

12. The image encoding method according to claim 11, wherein, The dependency quantization enable flag with a value of 1 indicates that dependency quantization is enabled, and The dependency quantization enable flag with a value of 0 indicates that dependency quantization is not enabled.

13. The image encoding method according to claim 11, wherein, When dependency quantization is not enabled for the current block, the TSRC disable flag is encoded.

14. The image encoding method according to claim 11, wherein, When the value of the dependency quantization enable flag is 1, the TSRC disable flag is not encoded.

15. A method for transmitting data including a bitstream of image information, the method comprising the following steps: Obtain the bitstream of image information including residual information, wherein the bitstream is generated by the following operations: deriving prediction samples for the current block based on inter-frame prediction; encoding prediction-related information for the current block; encoding a dependency quantization enable flag (whether dependency quantization is enabled); encoding a TSRC disable flag (whether Transform Skip Residual Coding (TSRC) is enabled) based on the dependency quantization enable flag; determining the residual coding syntax for the current block based on the TSRC disable flag; encoding residual information of the determined residual coding syntax for the current block; and generating a bitstream including the prediction-related information, the dependency quantization enable flag, the TSRC disable flag, and the residual information. Send the data containing the bitstream of image information, including the residual information. The TSRC disable flag is encoded based on the dependency quantization enable flag having a value of 0, and Specifically, the TSRC disable flag is signaled through the slice header syntax.