Image decoding method and apparatus for encoding image information including a tsrc available flag

By obtaining prediction and residual information in the image decoding method, deriving samples and generating reconstructed images, and establishing signaling relationships to reduce the amount of coding bits, the high cost problem of high-resolution images is solved and the efficiency of residual coding is improved.

CN115668946BActive Publication Date: 2026-06-16LG ELECTRONICS INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LG ELECTRONICS INC
Filing Date
2021-03-30
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

The transmission and storage costs of high-resolution, high-quality images are high, necessitating improvements in image coding efficiency, particularly residual coding efficiency.

Method used

By obtaining prediction-related information and residual information of the current block in the image decoding method, prediction samples and residual samples are derived, and reconstructed images are generated. The TSRC enable flag and other signaling relationships are established to reduce the amount of encoded bits and improve coding efficiency.

🎯Benefits of technology

Without enabling TSRC, the overall residual coding efficiency is improved and the transmission and storage costs are reduced by decreasing the number of encoded bits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115668946B_ABST
    Figure CN115668946B_ABST
Patent Text Reader

Abstract

A method of decoding an image by a decoding apparatus according to the present document includes the steps of obtaining prediction-related information on a current block; obtaining residual information on the current block; deriving prediction samples of the current block based on the prediction-related 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

Technical Field

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

[0002] Recently, the demand for high-resolution, high-quality images, such as HD (high-definition) and UHD (ultra-high-definition) images, has been 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.

[0003] 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

[0004] Technical issues

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

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

[0007] Technical solution

[0008] According to embodiments of this disclosure, an image decoding method performed by a decoding device is provided. The method includes the following steps: obtaining prediction-related information of a current block; obtaining residual information of the current block; deriving prediction samples of the current block based on the prediction-related information; deriving residual samples of the current block based on the residual information; and generating a reconstructed image based on the prediction samples and the residual samples.

[0009] 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 acquire prediction-related information of a current block and residual information of the current block; a predictor configured to derive prediction samples of the current block based on the prediction-related 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.

[0010] 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 or intra-frame prediction; deriving residual samples for the current block based on the prediction samples; encoding prediction-related information of the current block; encoding residual information of the residual samples; and generating a bitstream including the prediction-related information and the residual information.

[0011] 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 or intra-frame prediction; a subtractor configured to derive residual samples for the current block based on the prediction samples; and an entropy encoder configured to encode prediction-related information of the current block and residual information of the residual samples, generating a bitstream including the prediction-related information and the residual information.

[0012] According to another embodiment of this disclosure, a non-transitory computer-readable storage medium is provided for storing a bitstream of image information that causes an image decoding method to be executed. In this non-transitory computer-readable storage medium, the image decoding method includes the following steps: obtaining prediction-related information of a current block; obtaining residual information of the current block; deriving a prediction sample of the current block based on the prediction-related 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.

[0013] Technical effect

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

[0015] According to this disclosure, the TSRC enable flag can be signaled when symbolic data hiding is not enabled by setting the signaling relationship between the symbolic data hiding enable flag and the TSRC enable flag. In this way, when encoding RRC syntax for transform skip blocks because TSRC is not enabled, symbolic data hiding is not used, thereby improving encoding efficiency. Furthermore, the overall residual coding efficiency can be improved by reducing the number of bits encoded.

[0016] According to this disclosure, a signaling relationship is 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 encoded for the transform skip block, dependent quantization will not be used, thereby improving coding efficiency. Furthermore, the overall residual coding efficiency can be improved by reducing the number of bits encoded.

[0017] According to this disclosure, a signaling relationship is established between the transform skip enable flag and the TSRC enable flag. If transform skip is enabled, the TSRC enable flag can be signaled, thereby improving the overall residual coding efficiency by reducing the number of encoded bits. Attached Figure Description

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

[0019] 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.

[0020] 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.

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

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

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

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

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

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

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

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

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

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

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

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

[0033] 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.

[0034] 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.

[0035] 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.

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

[0037] 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.

[0038] 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.

[0039] 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.

[0040] 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.

[0041] 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.

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

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

[0044] 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.).

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

[0046] 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.

[0047] 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.

[0048] 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.

[0049] 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”.

[0050] 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".

[0051] 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".

[0052] 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".

[0053] 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".

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

[0055] 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.

[0056] 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.

[0057] 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.

[0058] 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.

[0059] 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.

[0060] 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.

[0061] 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.

[0062] 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.

[0063] 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.

[0064] 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.

[0065] 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.

[0066] 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 inverse quantization and inverse transform to the quantization transform coefficients using inverse quantizer 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.

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

[0068] 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.

[0069] 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.

[0070] 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.

[0071] 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.

[0072] 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.

[0073] 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.

[0074] 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.

[0075] 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 perform dequantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain the transform coefficients.

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

[0077] 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.

[0078] Predictor 330 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 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 a 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. The palette mode can be considered as 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.

[0079] 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.

[0080] 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.

[0081] 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.

[0082] 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.

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

[0084] 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.

[0085] 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.

[0086] 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.

[0087] 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.

[0088] 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.

[0089] Furthermore, as mentioned above, prediction is performed during video encoding to improve compression efficiency. Accordingly, a prediction block can be generated that includes prediction samples for the current block, which is 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 information about the residual between the original block and the prediction block (residual information) rather than the original sample values ​​of the original block to the decoding device, 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.

[0090] 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 to the decoding device (via bitstream). Here, the residual information may include the value information, position information, transform technique, transform kernel, quantization parameters, etc., of the quantized transform coefficients. The decoding device can perform inverse quantization / 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, for reference in subsequent inter-frame prediction of the image, the encoding device can also perform inverse quantization / inverse transform on the quantized transform coefficients to derive residual blocks and generate a reconstructed image based on them.

[0091] Intra-frame prediction can refer to the prediction of a block based on reference samples in the image to which the current block belongs (hereinafter referred to as the current image). When intra-frame prediction is applied to the current block, neighboring reference samples for intra-frame prediction of the current block can be derived. The neighboring reference samples of the current block may include samples adjacent to the left boundary of the current block (size nW×nH) and a total of 2×nH samples adjacent to the lower left side of the current block, samples adjacent to the top boundary of the current block, and a total of 2×nW samples adjacent to the upper right side of the current block and a sample adjacent to the upper left side. Alternatively, the neighboring reference samples of the current block may include multiple columns of upper neighbor samples and multiple rows of left neighbor samples. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block (size nW×nH), a total of nW samples adjacent to the bottom boundary of the current block, and a sample adjacent to the lower right side of the current block.

[0092] However, some of the neighboring reference samples in the current block may not have been decoded or may be unavailable. In this case, the decoder can construct neighboring reference samples to be used for prediction by replacing unavailable samples with available samples. Alternatively, the neighboring reference samples to be used for prediction can be configured by interpolation of available samples.

[0093] When deriving neighboring reference samples, (i) the predicted sample can be derived based on the average or interpolation of the neighboring reference samples of the current block, or (ii) the predicted sample can be derived based on a reference sample existing in a specific (predictive) direction for the predicted sample among the neighboring reference samples of the current block. Case (i) can be referred to as non-directional mode or non-angular mode, and case (ii) can be referred to as directional mode or angular mode.

[0094] Alternatively, prediction samples can be generated by interpolating the first neighboring sample in the prediction direction of the intra-prediction mode of the current block and the second neighboring sample in the opposite direction from the prediction direction of the current block's prediction sample. This can be called linear interpolation intra-prediction (LIP). Additionally, chroma prediction samples can be generated based on luminance samples using a linear model (LM). This can be called LM mode or chroma component LM (CCLM) mode.

[0095] Furthermore, provisional prediction samples for the current block can be derived based on filtered neighboring reference samples, and prediction samples for the current block can also be derived by weighted summing of at least one reference sample derived from the intra-prediction mode among the provisional prediction samples and existing neighboring reference samples (i.e., unfiltered neighboring reference samples). This process can be referred to as position-dependent intra-prediction (PDPC).

[0096] Alternatively, the reference sample line with the highest prediction accuracy among multiple neighboring reference sample lines in the current block is selected, and the predicted sample is derived using reference samples in the selected line located in the prediction direction. In this case, intra-frame prediction coding can be performed by indicating (signaling) the reference sample line used to the decoding device. The above situation can be referred to as multi-reference line intra-frame prediction or MRL-based intra-frame prediction.

[0097] Furthermore, the current block is divided into vertical or horizontal sub-partitions, and intra-prediction is performed based on the same intra-prediction mode, but neighboring reference samples can be derived and used on a sub-partition basis. That is, in this case, the intra-prediction mode for the current block is applied equally to the sub-partitions, but in some cases, intra-prediction performance can be improved by deriving and using neighboring reference samples on a sub-partition basis. This prediction method can be called intra-prediction based on intra-partition sub-partitions (ISP).

[0098] The intra-prediction methods described above can be referred to as intra-prediction types distinct from intra-prediction modes. Intra-prediction types can be referred to by various terms such as intra-prediction techniques or additional intra-prediction modes. For example, an intra-prediction type (or additional intra-prediction mode, etc.) can include at least one of the aforementioned LIP, PDPC, MRL, and ISP. General intra-prediction methods that exclude specific intra-prediction types such as LIP, PDPC, MRL, and ISP can be referred to as ordinary intra-prediction types. Ordinary intra-prediction types can generally be applied without applying the specific intra-prediction types mentioned above and can perform predictions based on the aforementioned intra-prediction modes. Furthermore, post-processing filtering can be performed on the derived prediction samples when necessary.

[0099] Specifically, the intra-frame prediction process may include an intra-frame prediction mode / type determination step, a neighboring reference sample derivation step, and a prediction sample derivation step based on the intra-frame prediction mode / type. Additionally, if necessary, a post-filtering step may be performed on the derived prediction samples.

[0100] When applying intra-prediction, the intra-prediction mode applied to the current block can be determined using the intra-prediction modes of neighboring blocks. For example, the decoding device can select one of the most probable modes (MPMs) derived from additional candidate modes of the current block's neighboring blocks (e.g., left and / or top neighboring blocks) and intra-prediction mode inference, or select one of the remaining intra-prediction modes not included in the MPM candidates (and planar modes) based on the remaining intra-prediction mode information. The MPM list can be configured to include or exclude planar modes as candidates. For example, the MPM list can have 6 candidates when it includes planar modes as candidates, and 5 candidates when it excludes planar modes as candidates. When the MPM list excludes planar modes as candidates, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra-prediction mode of the current block is not a planar mode can be signaled. For example, the MPM flag can be signaled first, and when the MPM flag is 1, the MPM index and non-planar flag can be signaled. Additionally, when the non-planar flag is set to 1, the MPM index can be signaled. Here, the MPM list is configured not to include planar patterns as candidates because planar patterns are always considered MPMs, while non-planar patterns are not. Therefore, the flag (non-planar flag) is signaled first to check if it is a planar pattern.

[0101] For example, an MPM flag (e.g., `intra_luma_mpm_flag`) can be used to indicate whether the intra prediction mode applied to the current block is among MPM candidates (and planar modes) or other modes. An MPM flag with a value of 1 indicates that the intra prediction mode of the current block is among MPM candidates (and planar modes), and an MPM flag with a value of 0 indicates that the intra prediction mode of the current block is not among MPM candidates (and planar modes). A non-planar flag with a value of 0 (e.g., `intra_luma_not_planar_flag`) indicates that the intra prediction mode of the current block is planar, and a non-planar flag with a value of 1 indicates that the intra prediction mode of the current block is not planar. The MPM index can be signaled in the form of `mpm_idx` or `intra_luma_mpm_idx` syntax elements, and other intra prediction mode information can be signaled in the form of `rem_intra_luma_pred_mode` or `intra_luma_mpm_remainder` syntax elements. For example, the remaining intra-prediction mode information can be indexed in order of prediction mode number to indicate one of the remaining intra-prediction modes not included in the MPM candidates (and planar modes) among all intra-prediction modes. The intra-prediction mode can be an intra-prediction mode for the luma component (sample). Hereinafter, the intra-prediction mode information may include at least one of the following: an MPM flag (e.g., intra_luma_mpm_flag), a non-planar flag (e.g., intra_luma_not_planar_flag), an MPM index (e.g., mpm_idx or intra_luma_mpm_idx), or remaining intra-prediction mode information (rem_intra_luma_pred_mode or intra_luma_mpm_remainder). In this disclosure, the MPM list can be referred to using various terms such as MPM candidate list and candModeList. When applying MIP to the current block, the individual MPM flags (e.g., intra_mip_mpm_flag), MPM index (e.g., intra_mip_mpm_idx), and other intra-prediction mode information (e.g., intra_mip_mpm_remainder) of the MIP can be signaled, and the non-plane flags can be not signaled.

[0102] In other words, when performing block segmentation on an image, the current block and its neighboring blocks typically have similar image characteristics. Therefore, there is a high probability that the current block and its neighboring blocks have the same or similar intra-prediction modes. Thus, the encoder can use the intra-prediction modes of neighboring blocks to encode the intra-prediction mode of the current block.

[0103] For example, the decoding / encoding device can construct a list of most probable modes (MPMs) for the current block. This MPM list can be referred to as an MPM candidate list. Here, MPM can refer to a mode used to improve coding efficiency by taking into account the similarity between the current block and neighboring blocks during intra-frame prediction mode coding. As mentioned above, the MPM list can be constructed to include planar modes, or it can be constructed to exclude planar modes. For example, when the MPM list includes planar modes, the number of candidates in the MPM list can be 6. And when the MPM list excludes planar modes, the number of candidates in the MPM list can be 5.

[0104] The encoder / decoder can construct an MPM list that includes five or six MPMs.

[0105] To construct an MPM list, three types of modes can be considered, such as the default intra-frame mode, the neighboring intra-frame mode, and the derived intra-frame mode.

[0106] For the near-intra-frame mode, two neighboring blocks can be considered: the left neighboring block and the top neighboring block.

[0107] As mentioned above, if the MPM list is constructed to exclude flat patterns, then flat patterns can be excluded from the list, and the number of candidates in the MPM list can be set to five.

[0108] In addition, non-directional (or non-angular) modes in intra-frame prediction modes can include DC mode based on the average of neighboring reference samples of the current block or planar mode based on interpolation.

[0109] Furthermore, 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 a picture other than the current picture. 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 picture indicated by the reference picture 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 picture 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 by using the sum of the motion vector predictor and the motion vector difference.

[0110] Depending on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), motion information may also include L0 motion information and / or L1 motion information. The L0 direction motion vector may be referred to as the L0 motion vector or MVL0, and the L1 direction motion vector may be referred to as the L1 motion vector or MVL1. Prediction based on the L0 motion vector may be called L0 prediction, prediction based on the L1 motion vector may be called L1 prediction, and prediction based on both L0 and L1 motion vectors may be called bidirectional prediction. Here, the L0 motion vector may indicate the motion vector associated with the reference image list L0, and the L1 motion vector may indicate the motion vector associated with the reference image list L1. As reference images, the reference image list L0 may include images preceding the current image in output order, and the reference image list L1 may include images following the current image in output order. The previous image may be referred to as the forward (reference) image, and the subsequent image may be referred to as the backward (reference) image. The reference image list L0 may also include images following the current image in output order as reference images. In this scenario, the reference image list L0 can first index the previous images, and then index the subsequent images. The reference image list L1 can also include images that precede the current image in the output order as reference images. In this case, the reference image list L1 can first index the subsequent images, and then index the previous images. Here, the output order can correspond to the Picture Order Count (POC) order.

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

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

[0113] 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 process 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 of 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 of 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 minimal, equal to, or less than a predetermined standard. Based on this derivation, a reference image index indicating the reference image where the reference block is located can be derived, 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 under various prediction modes and determine the best prediction mode for the current block.

[0114] For example, when applying a skip mode or merge mode to the current block, the encoding device can configure a merge candidate list, as described below, and deduce a reference block among the reference blocks indicated by the merge candidates included in the merge candidate list whose difference from the current block is minimal, equal to, or less than a predetermined standard. In this case, a 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.

[0115] As another example, when applying the (A)MVP mode 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 the motion vector prediction sub-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 as the difference obtained 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. Additionally, when applying the (A)MVP mode, the value of the reference image index can be configured as reference image index information and signaled separately to the decoding device.

[0116] 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 of the current block with the predicted samples.

[0117] 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, 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) as 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 bidirectional prediction has been applied. The residual information is information about residual samples. The residual information may include information about the quantization transform coefficients for the residual samples.

[0118] 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.

[0119] 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, thus improving encoding efficiency. 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. A loop filtering process can also be applied to the reconstructed image as described above.

[0120] The video / image decoding process based on inter-frame prediction can illustratively include, for example, the following.

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

[0122] 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 based on the received prediction information and derive prediction samples.

[0123] 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.

[0124] For example, a merge flag can be used to determine whether to apply a merge mode or (A)MVP mode to the current block. Alternatively, a mode index can be used to select one of a variety of inter-frame prediction mode candidates. Inter-frame prediction mode candidates may include skip mode, merge mode, and / or (A)MVP mode, or may include a variety of inter-frame prediction modes as described below.

[0125] The decoding device derives motion information for the current block based on the determined inter-frame prediction mode (S510). For example, when applying a skip mode or a merge mode to the current block, the decoding device can configure a merge candidate list, as described below, and select one of 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.

[0126] As another example, when applying the (A)MVP mode 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 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 can be derived based on information about the current block's MVD, and the motion vector of the current block can be derived based on the MVD and MVP of the current block. Additionally, 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 of the current block can be derived as the reference image referenced by the inter-frame prediction of the current block.

[0127] 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.

[0128] The decoding device can generate a prediction sample 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 the prediction sample for the current block can be derived by using the sample of the reference block indicated by the motion vector of the current block on the reference image. In this case, and in some cases, a filtering process for all or some of the prediction samples in the prediction sample of the current block can also be performed.

[0129] 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 can determine the prediction mode of the current block based on the received prediction mode information. The motion information derivation unit can 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 can derive the prediction samples of the current block.

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

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

[0132] 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) 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 apparatus may include an encoding device and / or a decoding device.

[0133] 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 to predict the current block in the image. For example, modes 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 can be used. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bidirectional prediction with CU-level weights (BCW), and bidirectional optical flow (BDOF) can also be used as additional modes. The affine mode can also be referred to as the affine motion prediction mode. The MVP mode can also be referred to as the advanced motion vector prediction (AMVP) mode. In this document, some modes and / or motion information candidates derived from some modes can also be included in one of the motion information related candidates of other modes. For example, an HMVP candidate can be added to the merge candidate of the merge / skip mode, or it can also be added to the MVP candidate of the MVP mode. If an HMVP candidate is used as a motion information candidate for the merge mode or skip mode, then the HMVP candidate can be referred to as an HMVP merge candidate.

[0134] The encoding device can signal prediction mode information, indicating the inter-frame prediction mode of the current block, 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 several 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 a flag for additional differentiation can also 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.

[0135] The encoding device derives the motion information of the current block (S610). Motion information can be derived based on the inter-frame prediction mode.

[0136] The encoding device can perform inter-frame prediction using motion information about the current block. The encoding device can derive 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 in a predetermined search range within a reference image, using original blocks from the original image of the current block, on a fractional-pixel basis, and derive motion information from the searched reference blocks. Block similarity can be derived based on the difference between 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 using various methods.

[0137] The encoding device performs prediction based on the motion information of the current block (S620). The encoding device can derive the prediction sample of the current block based on the motion information. The current block, which includes the prediction sample, can be called the prediction block.

[0138] 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). For example, the decoding device can decode information in a 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.

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

[0140] 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.

[0141] 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.

[0142] 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.

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

[0144] 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.

[0145] 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.

[0146] 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.

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

[0148] [Table 1]

[0149]

[0150]

[0151]

[0152] 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).

[0153] 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.

[0154] [Table 2]

[0155]

[0156]

[0157]

[0158]

[0159]

[0160] [Table 3]

[0161]

[0162]

[0163]

[0164] 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).

[0165] 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).

[0166] 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.

[0167] 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).

[0168] 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.

[0169] 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.

[0170] 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 be performed only 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 can correspond to an example of a syntax element that indicates whether the quantized transform coefficients are non-zero valid coefficients.

[0171] 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.

[0172] [Formula 1]

[0173] remAbsLevel = |coeff| - 1

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

[0175] 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.

[0176] [Equation 2]

[0177] remAbsLevel = remAbsLevel - 1

[0178] 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.

[0179] [Formula 3]

[0180] par_level_flag = |coeff| & 1

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

[0182] 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.

[0183] [Formula 4]

[0184] remAbsLevel=remAbsLevel>>1

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

[0186] [Formula 5]

[0187] |coeff|=sig_coeff_flag+abs_level_gt1_flag+par_level_flag+2*(abs_level_gt3_flag+abs_remainder)

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

[0189] [Table 4]

[0190]

[0191] 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 symbol.

[0192] 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.

[0193] 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.

[0194] 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 bins sig_coeff_flag, abs_level_gtl_flag, par_level_flag, and abs_level_gt3_flag that are encoded as context encoding bins may no longer be encoded and may be directly encoded as dec_abs_level, as shown in Table 5 below.

[0195] [Table 5]

[0196] |coeff[n]| decabs_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 ... ...

[0197] 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.

[0198] [Formula 6]

[0199] |coeff|=dec_abs_level

[0200] 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.

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

[0202] 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.

[0203] 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.

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

[0205] 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.

[0206] 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.

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

[0208] [Formula 7]

[0209] prefixVal=symbolVal>>cRiceParam

[0210] 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.

[0211] 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 indicated by binIdx being prefixVal + 1. 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.

[0212] For example, the bin string derived by unary binary encoding of prefixVal can be as shown in the following table.

[0213] [Table 6]

[0214]

[0215] 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 being 1.

[0216] 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 follows.

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

[0218] [Formula 8]

[0219] suffixVal = symbolVal - ((prefixVal) << cRiceParam)

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

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

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

[0223] 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.

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

[0225] 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.

[0226] [Table 7]

[0227]

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

[0229] [Formula 9]

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

[0231] 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.

[0232] 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.

[0233] [Table 8]

[0234] 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 x3 x1 x0]]> 15..30 <![CDATA[0 0 0 0 0 1 x4 x3 x2 x1 x0]]> 31..62 ... ...

[0235] 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.

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

[0237] [Table 9]

[0238] 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 1 0 9 ... ...

[0239] 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.

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

[0241] 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).

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

[0243] [Table 10]

[0244]

[0245] 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.

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

[0247] 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.

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

[0249] [Table 11]

[0250]

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

[0252] 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.

[0253] 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.

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

[0255] [Formula 10]

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

[0257] 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.

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

[0259] 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.

[0260] 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.

[0261] 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.

[0262] 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.

[0263] [Equation 11]

[0264] cMax = 6 << cRiceParam

[0265] 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.

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

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

[0268] [Equation 12]

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

[0270] 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.

[0271] 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 described below.

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

[0273] 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.

[0274] 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.

[0275] [Table 12]

[0276]

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

[0278] [Table 13]

[0279] 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

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

[0281] 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.

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

[0283] [Equation 13]

[0284] suffixVal=abs_remainder[n]cMax

[0285] The suffix bin string of absremainder 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.

[0286] In addition, for example, the binary processing of the grammar element decabslevel in the residual information can be performed as follows.

[0287] 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.

[0288] 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.

[0289] 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.

[0290] 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.

[0291] [Formula 14]

[0292] cMax = 6 << cRiceParam

[0293] 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.

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

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

[0296] [Formula 15]

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

[0298] 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.

[0299] 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 dec_abs_level[n] bin string, which can be derived as described below.

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

[0301] 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.

[0302] 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.

[0303] [Table 14]

[0304]

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

[0306] [Table 15]

[0307] 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

[0308] 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.

[0309] [Formula 16]

[0310] ZeroPos[n]=(QState<2?1∶2)<<cRiceParam

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

[0312] [Equation 17]

[0313] suffixVal=dec_abs_level[n]-cMax

[0314] 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.

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

[0316] - 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.

[0317] - 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].

[0318] - 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.

[0319] Furthermore, for the residual sample quantization process, 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), in which the set of reconstructed values ​​for the current transform coefficient is allowed to precede the current transform coefficient in the reconstruction order. That is, for example, dependent quantization can be implemented by (a) defining two scalar quantizers with different reconstruction levels and (b) defining a process for transitioning between the scalar quantizers. Dependent quantization can have the effect of allowing a more concentrated reconstructed vector in an N-dimensional vector space compared to existing independent scalar quantization. Here, N can represent the number of transform coefficients in the transform block.

[0320] 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 being used can be derived without explicit signaling from the bitstream. For example, the quantizer being 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.

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

[0322] 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.

[0323] For example, at the start of the dequantization process for a transform block, the state dependent on quantization 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, the dequantization process for 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 transform coefficients can be dequantized by the scalar quantizer for the current state based on the quantization parameters of the reconstructed level of the transform coefficients.

[0324] 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.

[0325] 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.

[0326] While high coding efficiency can be achieved in specific applications (e.g., lossless coding) using `slice_ts_residual_coding_disabled_flag`, 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 either 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 the following scheme: configuring the correlation / limitation between the two techniques of dependent quantization and residual coding (i.e., coding of residual samples of blocks skipped by transformation in the current slice of RRC) when slice_ts_residual_coding_disabled_flag=1 to prevent unexpected coding loss or failure.

[0327] 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.

[0328] [Table 16]

[0329]

[0330] 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.

[0331] 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 slice header syntax (e.g., SPS syntax / VPS syntax / DPS syntax) or at a low level (CU / TU). 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.

[0332] Furthermore, this disclosure proposes another implementation: 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 when encoding the level values ​​of transform coefficients, in order to prevent unexpected coding loss or failures due to the use of 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 as shown in the table below.

[0333] [Table 17]

[0334]

[0335]

[0336]

[0337]

[0338]

[0339] 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., 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., the value of state QState is 0 or 1).

[0340] 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.

[0341] 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.

[0342] [Table 18]

[0343]

[0344]

[0345]

[0346]

[0347]

[0348] 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.

[0349] 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., 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., the value of state QState is 0 or 1).

[0350] 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.

[0351] Furthermore, this disclosure proposes another implementation: 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 during the process of deriving the values ​​of transform coefficients (transform coefficient levels) depending on the state or state update of dependent quantization in the RRC. That is, this implementation proposes a scheme to make the process of deriving the values ​​of transform coefficients (transform coefficient levels) independent of the state and / or state update of dependent quantization in the RRC, based on transform_skip_flag. The residual coding syntax according to this implementation can be shown in the table below.

[0352] [Table 19]

[0353]

[0354]

[0355]

[0356]

[0357]

[0358] 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, the process of updating Qstate can be skipped.

[0359] 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, then QState can be derived, and the values ​​of the transform coefficients (transform coefficient levels) can be derived based on 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., 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., the value of state QState is 0 or 1).

[0360] 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 residual data according to RRC for transform skip blocks, 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.

[0361] In addition, for example, this disclosure provides embodiments as shown in the table below.

[0362] [Table 20]

[0363]

[0364]

[0365] Referring to Table 20, a method can be chosen to derive the ZeroPos of dec_abs_level based on ph_dep_quant_enabled_flag and transform_skip_flag. For example, when ph_dep_quant_enabled_flag is 1 and transform_skip_flag is 1, the ZeroPos of dec_abs_level can be derived based on a formula that does not use dependent quantization of the state values. For example, as shown in Table 20 above, ZeroPos can be derived as 1 < <cRiceParam。

[0366] Furthermore, for example, when the value of ph_dep_quant_enabled_flag is 0 or the value of transform_skip_flag is 0, the ZeroPos of dec_abs_level can be derived from the state value dependent on quantization.

[0367] In addition, this disclosure proposes various implementations related to the signaling notification of the above-mentioned syntax element sh_ts_residual_coding_disabled_flag.

[0368] For example, as mentioned above, `sh_ts_residual_coding_disabled_flag` is a syntax element that defines whether TSRC is disabled, and it may not need to be signaled if a transform skip block is not used. That is, it is only important to signal `sh_ts_residual_coding_disabled_flag` if the syntax element indicating whether a transform skip block is used indicates that a transform skip block is used.

[0369] Accordingly, this disclosure proposes an implementation that signals the sh_ts_residual_coding_disabled_flag only when sps_transform_skip_enabled_flag is 1. The syntax according to this implementation is shown in the table below.

[0370] [Table 21]

[0371]

[0372] Referring to Table 21, if `sps_transform_skip_enabled_flag` is 1, then `sh_ts_residual_coding_disabled_flag` can be signaled; if `sps_transform_skip_enabled_flag` is 0, then `sh_ts_residual_coding_disabled_flag` is not signaled. Here, for example, `sps_transform_skip_enabled_flag` can indicate whether a transform skip block is used. That is, for example, `sps_transform_skip_enabled_flag` can indicate whether transform skipping is enabled. For example, if the value of `sps_transform_skip_enabled_flag` is 1, then `sps_transform_skip_enabled_flag` can indicate that the transform skip flag (`transform_skip_flag`) can exist in the transform unit syntax; while if the value of `sps_transform_skip_enabled_flag` is 0, then `sps_transform_skip_enabled_flag` can indicate that the transform skip flag does not exist in the transform unit syntax. Furthermore, if `sh_ts_residual_coding_disabled_flag` is not signaled, it can be inferred that `sh_ts_residual_coding_disabled_flag` is 0. Additionally, the aforementioned `sps_transform_skip_enabled_flag` can be signaled in SPS, or in other higher-level syntaxes (VPS, PPS, image header syntax, and slice header syntax) or lower-level syntaxes (slice data syntax, encoding unit syntax, and transform unit syntax). Furthermore, it can be signaled before `slice_ts_residual_coding_disabled_flag`.

[0373] Furthermore, this disclosure proposes an implementation of the above-described embodiment for signaling notification of sh_ts_residual_coding_disabled_flag. For example, as shown in the table below, an implementation for signaling notification of sh_ts_residual_coding_disabled_flag can be proposed.

[0374] [Table 22]

[0375]

[0376] Referring to Table 22, when `sps_transform_skip_enabled_flag` is 1 or `ph_dep_quant_enabled_flag` is 0, a signal can be sent to `sh_ts_residual_coding_disabled_flag`; otherwise, no signal needs to be sent. Furthermore, if no signal is sent to `sh_ts_residual_coding_disabled_flag`, then `sh_ts_residual_coding_disabled_flag` can be inferred to be 0.

[0377] Alternatively, for example, the implementation of signaling sh_ts_residual_coding_disabled_flag as shown in the table below can be proposed.

[0378] [Table 23]

[0379]

[0380] Referring to Table 23, the `sh_ts_residual_coding_disabled_flag` can be signaled to the image header. `sh_ts_residual_coding_disabled_flag` can be represented as `ph_ts_residual_coding_disabled_flag`. Additionally, referring to Table 23, the `ph_dep_quant_enabled_flag` can be signaled to the image header.

[0381] For example, referring to Table 23, if `ph_dep_quant_enabled_flag` is 0 and `sps_transform_skip_enabled_flag` is 1, then `ph_ts_residual_coding_disabled_flag` can be signaled; otherwise, it can be left unsigned. Furthermore, if `ph_ts_residual_coding_disabled_flag` is not signaled, then `ph_ts_residual_coding_disabled_flag` can be inferred to be 0.

[0382] In existing video / image coding standards for the syntax elements described in embodiments of this disclosure, the ph_dep_quant_enabled_flag can be signaled in the image header syntax, and the sh_ts_residual_coding_disabled_flag can be signaled in the slice header syntax. In this regard, this disclosure proposes embodiments for signaling two syntax elements with the same high-level or low-level syntax.

[0383] For example, an implementation could be proposed where both ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag are signaled in the image header syntax. In this case, sh_ts_residual_coding_disabled_flag could be referred to as ph_ts_residual_coding_disabled_flag.

[0384] Alternatively, for example, an implementation could be proposed where both ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag are signaled in the slice header syntax. In this case, ph_dep_quant_enabled_flag could be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or slice_dep_quant_enabled_flag.

[0385] Alternatively, for example, the following implementation can be proposed: both `ph_dep_quant_enabled_flag` and `ph_ts_residual_coding_disabled_flag` are signaled within the same HLS, but `ph_ts_residual_coding_disabled_flag` is only signaled when the value of `ph_dep_quant_enabled_flag` is 0. For example, an example of signaling both `ph_dep_quant_enabled_flag` and `ph_ts_residual_coding_disabled_flag` in the image header syntax can be shown in the table below.

[0386] [Table 24]

[0387]

[0388] Referring to Table 24, `ph_dep_quant_enabled_flag` can be signaled in the image header syntax. If the value of `ph_dep_quant_enabled_flag` is 0, then `ph_ts_residual_coding_disabled_flag` can be signaled in the image header syntax; if the value of `ph_dep_quant_enabled_flag` is 1, then `ph_ts_residual_coding_disabled_flag` may not be signaled. For example, if `ph_ts_residual_coding_disabled_flag` is not signaled, then `ph_ts_residual_coding_disabled_flag` can be inferred to be 0.

[0389] Furthermore, the above implementation is an example, and the following examples can be proposed: ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag signal notifications in other high-level syntaxes (VPS, SPS, PPS, and slice header syntax) or low-level syntaxes (slice data syntax, coding unit syntax, and transform unit syntax) instead of image header syntax.

[0390] Alternatively, for example, the following implementation can be proposed: both ph_ts_residual_coding_disabled_flag and ph_dep_quant_enabled_flag are signaled in the same HLS, but ph_dep_quant_enabled_flag is only signaled when the value of ph_ts_residual_coding_disabled_flag is 0.

[0391] [Table 25]

[0392]

[0393] Referring to Table 25, `ph_ts_residual_coding_disabled_flag` can be signaled in the image header syntax. If the value of `ph_ts_residual_coding_disabled_flag` is 0, then `ph_dep_quant_enabled_flag` can be signaled in the image header syntax; conversely, if the value of `ph_ts_residual_coding_disabled_flag` is 1, then `ph_dep_quant_enabled_flag` may not be signaled. For example, if `ph_dep_quant_enabled_flag` is not signaled, then `ph_dep_quant_enabled_flag` can be inferred to be 0.

[0394] Furthermore, the above implementation is an example, and the following examples can be proposed: ph_ts_residual_coding_disabled_flag and ph_dep_quant_enabled_flag signal notifications in other high-level syntaxes (VPS, SPS, PPS, and slice header syntax) or low-level syntaxes (slice data syntax, coding unit syntax, and transform unit syntax) instead of image header syntax.

[0395] Alternatively, implementations that combine the above-described implementations can be proposed. For example, the following implementation can be proposed: both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS, but ph_ts_residual_coding_disabled_flag is only signaled when the value of ph_dep_quant_enabled_flag is 0 or the value of sps_transform_skip_enabled_flag is 1.

[0396] [Table 26]

[0397]

[0398] Referring to Table 26, `ph_dep_quant_enabled_flag` can be signaled in the image header syntax. Furthermore, if `ph_dep_quant_enabled_flag` is 0 or `sps_transform_skip_enabled_flag` is 1, then `ph_ts_residual_coding_disabled_flag` can be signaled in the image header syntax; otherwise, `ph_ts_residual_coding_disabled_flag` may not be signaled. For example, `sps_transform_skip_enabled_flag` can indicate whether to use the transform skip block. That is, for example, `sps_transform_skip_enabled_flag` can indicate whether to enable transform skipping. For example, if the value of `sps_transform_skip_enabled_flag` is 1, then `sps_transform_skip_enabled_flag` indicates that the transform skip flag (`transform_skip_flag`) can exist in the transform unit syntax, while if the value of `sps_transform_skip_enabled_flag` is 0, then `sps_transform_skip_enabled_flag` can indicate that the transform skip flag does not exist in the transform unit syntax. For example, if `ph_ts_residual_coding_disabled_flag` is not signaled, then `ph_ts_residual_coding_disabled_flag` can be inferred to be 0.

[0399] Alternatively, for example, the following implementation can be proposed: both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS (e.g., slice header syntax, etc.), but ph_ts_residual_coding_disabled_flag is only signaled if the value of ph_dep_quant_enabled_flag is 0 and the value of sps_transform_skip_enabled_flag is 1.

[0400] [Table 27]

[0401]

[0402] Referring to Table 27, `ph_dep_quant_enabled_flag` can be signaled in the image header syntax. Furthermore, `ph_ts_residual_coding_disabled_flag` can be signaled in the image header syntax if `ph_dep_quant_enabled_flag` is 0 and `sps_transform_skip_enabled_flag` is 1; otherwise, `ph_ts_residual_coding_disabled_flag` may not be signaled. For example, if `ph_ts_residual_coding_disabled_flag` is not signaled, it can be inferred to be 0.

[0403] Alternatively, for example, the following implementation can be proposed: both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS, but ph_ts_residual_coding_disabled_flag is only signaled when the value of sps_transform_skip_enabled_flag is 1, and ph_dep_quant_enabled_flag is only signaled when the value of ph_ts_residual_coding_disabled_flag is 0.

[0404] [Table 28]

[0405]

[0406] Referring to Table 28, if the value of `sps_transform_skip_enabled_flag` is 1, then `ph_ts_residual_coding_disabled_flag` can be signaled in the image header syntax; if the value of `ph_ts_residual_coding_disabled_flag` is 0, then `ph_dep_quant_enabled_flag` can be signaled in the image header syntax. For example, if the value of `sps_transform_skip_enabled_flag` is 0, then `ph_ts_residual_coding_disabled_flag` may not be signaled. For example, if `ph_ts_residual_coding_disabled_flag` is not signaled, then `ph_ts_residual_coding_disabled_flag` can be inferred to be 0. Additionally, for example, if the value of `ph_ts_residual_coding_disabled_flag` is 1, then `ph_dep_quant_enabled_flag` may not be signaled. For example, if ph_dep_quant_enabled_flag is not signaled, then ph_dep_quant_enabled_flag can be inferred to be 0.

[0407] 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) in the corresponding syntax table. The decoding device can perform a block / image / video reconstruction process based on the decoded information.

[0408] In addition, this disclosure proposes various implementations related to the signaling notification of the above-mentioned syntax element sh_ts_residual_coding_disabled_flag.

[0409] For example, by using slice_ts_residual_coding_disabled_flag as described above, high coding efficiency can be achieved in certain applications (e.g., lossless coding, etc.), but existing video / image coding standards do not impose any restrictions on the use of slice_ts_residual_coding_disabled_flag for symbolic data hiding (SDH).

[0410] Here, the symbol data hiding method can be as follows. When deriving transform coefficients, the sign of the transform coefficient can be derived based on a 1-bit sign flag (the syntax element `coeff_sign_flag` mentioned above). In this regard, SDH can indicate explicit signaling to omit the `coeff_sign_flag` of the first valid transform coefficient in the sub-block / coefficient group (CG) to improve coding efficiency. Here, the value of `coeff_sign_flag` of the first valid transform coefficient can be derived based on the sum of the absolute levels (i.e., absolute values) of the valid transform coefficients in the corresponding sub-block / coefficient group. That is, the sign of the first valid transform coefficient can be derived based on the sum of the absolute levels of the valid transform coefficients in the corresponding sub-block / coefficient group. Furthermore, a valid transform coefficient can refer to a non-zero transform coefficient whose (absolute) value is not 0. For example, when the sum of the absolute levels of the valid transform coefficients is even, the value of `coeff_sign_flag` of the first valid transform coefficient can be derived as 1, and when the sum of the absolute levels of the valid transform coefficients is odd, the value of `coeff_sign_flag` of the first valid transform coefficient can be derived as 0. In other words, for example, when the sum of the absolute levels of the effective transform coefficients is even, the value of `coeff_sign_flag` for the first effective transform coefficient can be derived as negative, and when the sum of the absolute levels of the effective transform coefficients is odd, the value of `coeff_sign_flag` for the first effective transform coefficient can be derived as positive. Alternatively, for example, when the sum of the absolute levels of the effective transform coefficients is even, the value of `coeff_sign_flag` for the first effective transform coefficient can be derived as 0, and when the sum of the absolute levels of the effective transform coefficients is odd, the value of `coeff_sign_flag` for the first effective transform coefficient can be derived as 1. In other words, for example, when the sum of the absolute levels of the effective transform coefficients is even, the value of `coeff_sign_flag` for the first effective transform coefficient can be derived as positive, and when the sum of the absolute levels of the effective transform coefficients is odd, the value of `coeff_sign_flag` for the first effective transform coefficient can be derived as negative.

[0411] For example, SDH in residual syntax can be shown in the table below.

[0412] [Table 29]

[0413]

[0414] Referring to Table 29, the variable `signHiddenFlag` can indicate whether SDH is applied. The variable `signHiddenFlag` can also be referred to as `signHidden`. For example, when the value of `signHiddenFlag` is 0, it indicates that SDH is not applied, and when the value of `signHiddenFlag` is 1, it indicates that SDH is applied. For example, the value of `signHiddenFlag` can be set based on signaling flag information (e.g., `sh_sign_data_hiding_used_flag`, `pic_sign_data_hiding_enabled_flag`, or `sps_sign_data_hiding_enabled_flag`). Additionally, for example, the value of `signHiddenFlag` can be set based on `lastSigScanPosSb` and `firstSigScanPosSb`. Here, `lastSigScanPosSb` indicates the position of the last valid transform coefficient searched in the corresponding sub-block / coefficient group according to the scan order, and `firstSigScanPosSb` indicates the position of the first valid transform coefficient searched in the corresponding sub-block / coefficient group according to the scan order. Typically, `lastSigScanPosSb` can be located in a frequency component region relatively higher than `firstSigScanPosSb`. Accordingly, when `lastSigScanPosSb - firstSigScanPosSb` is greater than a predetermined threshold, the `signHidden` value can be derived as 1 (i.e., SDH is applied); otherwise, the `signHidden` value can be derived as 0 (i.e., SDH is not applied). Here, for example, referring to Table 29, the threshold can be set to 3.

[0415] Furthermore, the symbolic data hiding process of RRC can be used for lossless coding when symbolic data hiding is activated in a high-level syntax (VPS, SPS, PPS, slice header syntax, etc.) or a low-level syntax (slice data syntax, coding unit syntax, transform unit syntax, etc.) and slice_ts_residual_coding_disabled_flag is 1. Correspondingly, lossless coding may become impossible due to incorrect settings in the encoding device. Alternatively, when a lossy coding method other than lossless coding (i.e., an irreversible coding method) is applied and the residual signal with transform skipped is encoded with RRC while simultaneously applying BDPCM, although the intervals where the residual values ​​become 0 occur more frequently than usual due to the differences between residuals in BDPCM, coding loss may occur because SDH is performed according to the SDH application conditions. Specifically, for example, when there are valid transform coefficients (non-zero residual data) at positions 0 and 15 in the CG, and the transform coefficients at the remaining positions in the CG are 0, SDH can be applied to the CG according to the above SDH application conditions. Therefore, the symbol data of the first valid transform coefficient of the CG (i.e., the encoding of the symbol flag) can be omitted. Accordingly, in this case, it is possible to adjust the parity of only the two residual data of the CG in the quantization step to omit the symbol data, and it is not a case of not applying SDH, but rather a case of more encoding loss. This situation may even occur in blocks where BDPCM is not applied, but due to the characteristics of BDPCM, the level is reduced by the difference with the neighboring residuals, so the adverse situation may occur more frequently when SDH is applied.

[0416] Therefore, in order to prevent unintended coding loss or failures from being caused by using residual coding with slice_ts_residual_coding_disabled_flag=1 (i.e., encoding residual samples of transform skip blocks in the current slice using RRC) and SDH together, this disclosure proposes an implementation for setting the correlation / limitation between the two techniques.

[0417] For example, this disclosure proposes a method where slice_ts_residual_coding_disabled_flag depends on pic_sign_data_hiding_enabled_flag. The residual coding syntax according to this embodiment can be shown in the following table.

[0418] [Table 30]

[0419]

[0420] Here, `slice_ts_residual_coding_disabled_flag` can be signaled in the slice header syntax or in a higher-level syntax (HLS) other than the slice header syntax (e.g., SPS syntax / VPS syntax / DPS syntax, etc.) or a lower-level (CU / TU) syntax. Additionally, `pic_sign_data_hiding_enabled_flag` can be signaled in the image header syntax or in other higher-level syntax (HLS) other than the image header syntax (e.g., SPS syntax / VPS syntax / DPS syntax, etc.) or a lower-level (CU / TU) syntax. For example, when `pic_sign_data_hiding_enabled_flag` is signaled in a syntax other than the image header syntax, it can be referred to by another name. For example, `pic_sign_data_hiding_enabled_flag` can be represented by `sps_sign_data_hiding_enabled_flag`.

[0421] Additionally, `sps_sign_data_hiding_enabled_flag` can be a flag indicating whether symbol data hiding is enabled. That is, for example, `sps_sign_data_hiding_enabled_flag` can indicate whether symbol data hiding is enabled. For instance, when the value of `sps_sign_data_hiding_enabled_flag` is 1, it indicates that symbol data hiding is enabled, and when the value of `sps_sign_data_hiding_enabled_flag` is 0, it indicates that symbol data hiding is not enabled.

[0422] According to Table 30 of this embodiment, the slice_ts_residual_coding_disabled_flag can be signaled only when symbolic data hiding is not enabled. Alternatively, when symbolic data hiding is enabled, the slice_ts_residual_coding_disabled_flag can be left unsigned, and its value can be inferred to be 0 (encoding the residual samples of the transform skip blocks in the current slice using TSRC syntax) or 1 (encoding the residual samples of the transform skip blocks in the current slice using RRC syntax).

[0423] Furthermore, this disclosure proposes an implementation of the above-described embodiment for signaling notification of sh_ts_residual_coding_disabled_flag. For example, an implementation for signaling notification of sh_ts_residual_coding_disabled_flag can be proposed as shown in the following table.

[0424] [Table 31]

[0425]

[0426] Referring to Table 31, when `sps_transform_skip_enabled_flag` is 1, `ph_dep_quant_enabled_flag` is 0, and `pic_sign_data_hiding_enabled_flag` is 0, a signal can be sent to `sh_ts_residual_coding_disabled_flag`; otherwise, no signal needs to be sent. On the other hand, when no signal is sent to `sh_ts_residual_coding_disabled_flag`, `sh_ts_residual_coding_disabled_flag` can be inferred to be 0.

[0427] Furthermore, the implementation in Table 31 is an example, and the following example can be proposed: ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and ph_ts_residual_coding_disabled_flag are all signaled in the same HLS (e.g., slice header syntax, etc.).

[0428] Alternatively, for example, an implementation of signaling the sh_ts_residual_coding_disabled_flag as shown in the table below can be proposed.

[0429] [Table 32]

[0430]

[0431] Referring to Table 32, when both ph_dep_quant_enabled_flag and pic_sign_data_hiding_enabled_flag are 0, a signal can be sent to sh_ts_residual_coding_disabled_flag; otherwise, no signal needs to be sent. Conversely, if no signal is sent to sh_ts_residual_coding_disabled_flag, then sh_ts_residual_coding_disabled_flag can be inferred to be 0.

[0432] Furthermore, the implementation in Table 32 is an example, and the following example can be proposed: ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and ph_ts_residual_coding_disabled_flag are all signaled in the same HLS (e.g., slice header syntax, etc.).

[0433] Alternatively, for example, an implementation of signaling the sh_ts_residual_coding_disabled_flag as shown in the table below can be proposed.

[0434] [Table 33]

[0435]

[0436] Referring to Table 33, when ph_dep_quant_enabled_flag is 0 or pic_sign_data_hiding_enabled_flag is 0, a signal can be sent to sh_ts_residual_coding_disabled_flag; otherwise, no signal needs to be sent. Conversely, when no signal is sent to sh_ts_residual_coding_disabled_flag, sh_ts_residual_coding_disabled_flag can be inferred to be 0.

[0437] In addition, this disclosure proposes the following implementation: the above syntax elements ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag and slice_ts_residual_coding_disabled_flag are signaled in the same high-level syntax or low-level syntax.

[0438] For example, the following implementation can be proposed as shown in the table below: ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and slice_ts_residual_coding_disabled_flag are all signaled in the image header syntax.

[0439] [Table 34]

[0440]

[0441] In this case, slice_ts_residual_coding_disabled_flag can be called ph_ts_residual_coding_disabled_flag.

[0442] Referring to Table 34, a signal can be sent to `ph_ts_residual_coding_disabled_flag` in the image header syntax. Furthermore, if `sps_dep_quant_enabled_flag` is 1 when the value of `ph_ts_residual_coding_disabled_flag` is 0, a signal can also be sent to `ph_dep_quant_enabled_flag` in the image header syntax. Conversely, if `sps_sign_data_hiding_enabled_flag` is 1 and `ph_dep_quant_enabled_flag` is 0 when the value of `ph_ts_residual_coding_disabled_flag` is 0, a signal can also be sent to `pic_sign_data_hiding_enabled_flag` in the image header syntax. Additionally, for example, if the value of `ph_ts_residual_coding_disabled_flag` is 1, no signal can be sent to either `ph_dep_quant_enabled_flag` or `pic_sign_data_hiding_enabled_flag`.

[0443] Alternatively, for example, the following implementation can be proposed as shown in the table below: ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and slice_ts_residual_coding_disabled_flag are all signaled in the image header syntax.

[0444] [Table 35]

[0445]

[0446] Referring to Table 35, when the value of `sps_transform_skip_enabled_flag` is 1, a signal can be sent to `ph_ts_residual_coding_disabled_flag` in the image header syntax. Alternatively, for example, when the value of `sps_transform_skip_enabled_flag` is 0, no signal can be sent to `ph_ts_residual_coding_disabled_flag`. When no signal is sent to `ph_ts_residual_coding_disabled_flag`, `ph_ts_residual_coding_disabled_flag` can be inferred as 0 in the decoding device.

[0447] Additionally, referring to Table 35, when the value of `ph_ts_residual_coding_disabled_flag` is 0 and the value of `sps_dep_quant_enabled_flag` is 1, a signal can be sent to `ph_dep_quant_enabled_flag` in the image header syntax. Furthermore, when the value of `ph_ts_residual_coding_disabled_flag` is 0, if the value of `sps_sign_data_hiding_enabled_flag` is 1 and `ph_dep_quant_enabled_flag` is 0, a signal can be sent to `pic_sign_data_hiding_enabled_flag` in the image header syntax. Moreover, for example, when the value of `ph_ts_residual_coding_disabled_flag` is 1, neither `ph_dep_quant_enabled_flag` nor `pic_sign_data_hiding_enabled_flag` needs to be signaled. Additionally, for example, when ph_dep_quant_enabled_flag is not signaled, ph_dep_quant_enabled_flag can be inferred as 0 in the decoding device. Also, for example, when pic_sign_data_hiding_enabled_flag is not signaled, pic_sign_data_hiding_enabled_flag can be inferred as 0 in the decoding device.

[0448] Furthermore, the above implementation is an example, and the following examples can be proposed: signaling ph_ts_residual_coding_disabled_flag, ph_dep_quant_enabled_flag, and pic_sign_data_hiding_enabled_flag in high-level syntax (VPS, SPS, PPS, slice header syntax, etc.) or low-level syntax (slice data syntax, encoding unit syntax, etc.) other than image header syntax.

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

[0450] Figure 11A 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 in the code can be executed by the predictor of the encoding device. Figure 11 S1110 in the encoding device can be executed by the subtractor, and Figure 11 S1120 to S1140 can be performed by the entropy encoder of the encoding device. Additionally, although not illustrated, the process of generating reconstructed samples and a 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.

[0451] The encoding device derives the prediction sample for the current block based on inter-frame prediction or intra-frame prediction (S1100). The encoding device may derive the prediction sample for the current block based on a prediction mode. In this case, various prediction methods disclosed in this disclosure, such as inter-frame prediction or intra-frame prediction, can be applied.

[0452] For example, the coding device can determine whether to perform inter-frame prediction or intra-frame prediction for the current block, and can determine a specific inter-frame prediction mode or a specific intra-frame prediction mode based on the RD cost. The coding device can then derive prediction samples for the current block according to the determined mode.

[0453] The encoding device can derive the residual sample of the current block based on the predicted sample (S1110). For example, the encoding device can derive the residual sample by subtracting the predicted sample from the original sample of the current block.

[0454] The encoding device encodes the prediction-related information for the current block (S1120). For example, the encoding device may generate and encode the prediction-related information for the current block. The prediction-related information may include prediction mode information representing the prediction mode of the current block.

[0455] The encoding device encodes the residual information of the residual samples (S1130). The encoding device can encode the residual information of the residual samples.

[0456] For example, the encoding device can encode a TSRC enable flag used to determine whether Transform Skip Residual Coding (TSRC) is enabled, and can encode residual information of the current block based on the TSRC enable flag. Image information may include the TSRC enable flag. For example, the TSRC enable flag can be a flag indicating 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 in the slice header syntax. The syntax element for the TSRC enable flag can be the sh_ts_residual_coding_disabled_flag mentioned above.

[0457] For example, the TSRC enable flag can be encoded based on a symbol data hiding enable flag used to indicate whether symbol data hiding is enabled. For example, the TSRC enable flag can be encoded based on a symbol data hiding enable flag with a value of 0. That is, for example, the TSRC enable flag can be encoded when the value of the symbol data hiding enable flag is 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled). In other words, for example, the TSRC enable flag can be signaled when the value of the symbol data hiding enable flag is 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled). Alternatively, for example, the TSRC enable flag may not be encoded when the value of the symbol data hiding enable flag is 1, and the value of the TSRC enable flag can be deduced as 0 in the decoding device. That is, for example, the TSRC enable flag may not be signaled when the value of the symbol data hiding enable flag is 1, and the value of the TSRC enable flag can be deduced as 0 in the decoding device.

[0458] Furthermore, for example, the encoding device can determine whether symbolic data hiding is enabled for blocks of images in the sequence, and can encode a symbolic data hiding enable flag for whether symbolic data hiding is enabled. Image information may include the symbolic data hiding enable flag. For example, the symbolic data hiding enable flag can be a flag for whether symbolic data hiding is enabled. For example, the symbolic data hiding enable flag can indicate whether symbolic data hiding is enabled. That is, for example, the symbolic data hiding enable flag can indicate whether symbolic data hiding is enabled for blocks of images in the sequence. For example, the symbolic data hiding enable flag can indicate whether a symbolic data hiding usage flag indicating whether symbolic data hiding is used for the current slice can exist. For example, a symbolic data hiding enable flag with a value of 1 can indicate that symbolic data hiding is enabled, and a symbolic data hiding enable flag with a value of 0 can indicate that symbolic data hiding is not enabled. For example, a symbolic data hiding enable flag with a value of 1 can indicate that a symbolic data hiding usage flag can exist, and a symbolic data hiding enable flag with a value of 0 can indicate that a symbolic data hiding usage flag does not exist. Additionally, for example, the symbolic data hiding enable flag can be signaled in the SPS syntax. Alternatively, for example, the symbolic data hiding enable flag can be signaled in the image header syntax or slice header syntax. The syntax element for the symbolic data hiding enable flag can be sps_sign_data_hiding_enabled_flag.

[0459] Additionally, for example, the TSRC enable flag can be encoded based on a symbol data hiding enable flag, a dependency quantization enable flag, and / or a transform skip enable flag. For example, the TSRC enable flag can be encoded based on a symbol data hiding enable flag with a value of 0, a dependency quantization enable flag with a value of 0, and a transform skip enable flag with a value of 1. That is, for example, the TSRC enable flag can be encoded (or signaled) when the symbol data hiding enable flag is 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled), the dependency quantization enable flag is 0 (i.e., the dependency quantization enable flag indicates that dependency quantization is not enabled), and the transform skip enable flag is 1 (i.e., the transform skip enable flag indicates that transform skip is enabled). Alternatively, for example, when 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, when the dependency quantization enable flag is 1, 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. Additionally, for example, when the transform skip enable flag is 0, the TSRC enable flag may not be encoded, and the value of the TSRC enable flag may be derived as 0. That is, for example, when the transform skip enable flag is 0, the TSRC enable flag may not be signaled, and the value of the TSRC enable flag may be derived as 0.

[0460] Furthermore, for example, the encoding device can determine whether dependency quantization is enabled for a block of images in the sequence, and can encode a dependency quantization enable flag for whether dependency quantization is enabled. Image information may include a dependency quantization enable flag. For example, the dependency quantization enable flag can be a flag for 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 use flag indicating whether dependency quantization is used for the current slice exists. 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 in the SPS syntax or slice header syntax. The syntax element of the dependency quantization enable flag can be the above-mentioned `sps_dep_quant_enabled_flag`. `sps_dep_quant_enabled_flag` can be called `sh_dep_quant_enabled_flag`, `sh_dep_quant_used_flag`, or `ph_dep_quant_enabled_flag`.

[0461] Additionally, for example, the encoding device can encode a transform skip enable flag for whether to enable transform skipping. Image information may include the transform skip enable flag. For example, the encoding device can determine whether to enable transform skipping for blocks of images in the sequence, and can encode the transform skip enable flag for whether to enable transform skipping. For example, the transform skip enable flag can be a flag for whether to enable transform skipping. For example, the transform skip enable flag can indicate whether transform skipping is enabled. That is, for example, the transform skip enable flag can indicate whether transform skipping is enabled for blocks of images in the sequence. For example, the transform skip enable flag can indicate whether a transform skip flag can exist. For example, a transform skip enable flag with a value of 1 can indicate that transform skipping is enabled, and a transform skip enable flag with a value of 0 can indicate that transform skipping is not enabled. That is, for example, a transform skip enable flag with a value of 1 can indicate that a transform skip flag can exist, and a transform skip enable flag with a value of 0 can indicate that a transform skip flag does not exist. Additionally, for example, the transform skip enable flag can be signaled to the Sequence Parameter Set (SPS) syntax. The syntax element of the transform skip enable flag can be the sps_transform_skip_enabled_flag mentioned above.

[0462] Alternatively, for example, the encoding device can encode the residual information of the current block based on the TSRC enable flag.

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

[0464] 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.

[0465] 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. Alternatively, 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. Alternatively, 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.

[0466] Subsequently, for example, the encoding device can encode the residual information of the residual coding syntax determined for the current block. The encoding device can deduce the residual samples of the current block and can encode the residual information of the determined residual coding syntax of the residual samples of the current block. For example, the residual information of the regular residual coding (RRC) syntax can be encoded based on the TSRC enable flag with a value of 1, and the residual information of the TSRC syntax can be encoded based on the TSRC enable flag with a value of 0. Image information may include residual information.

[0467] For example, the coding device can determine whether to perform inter-frame prediction or intra-frame prediction for the current block, and can determine a specific inter-frame prediction mode or a specific intra-frame prediction mode based on the RD cost. Based on the determined mode, the coding device can derive the prediction samples for the current block, and can derive the residual samples for the current block by subtracting the prediction samples from the original samples of the current block.

[0468] Then, 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.

[0469] 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 the current 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 the 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 a maximum of 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, the transform coefficients can be represented as residual coefficients.

[0470] 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 a dependent quantization process 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.

[0471] 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.

[0472] 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.

[0473] 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.

[0474] 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.

[0475] 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.

[0476] 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`.

[0477] 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`.

[0478] Furthermore, for example, when symbolic data hiding is applied to the current block, the sign flag of the first valid transform coefficient of the current coefficient group (CG) in the current block may not be encoded or signaled. That is, for example, when symbolic data hiding is applied to the current block, the syntax element may not include the sign flag representing the sign of the first valid transform coefficient. Furthermore, for example, whether to apply symbolic data hiding to the current block can be deduced based on the position of the first valid transform coefficient and the position of the last valid transform coefficient and / or the symbolic data hiding enable flag. For example, when the symbolic data hiding enable flag is 1 and the value obtained by subtracting the position of the first valid transform coefficient from the position of the last valid transform coefficient is greater than 3 (i.e., when the symbolic data hiding enable flag is 1 and the number of valid transform coefficients in the current CG is greater than 3), symbolic data hiding can be applied to the current CG of the current block.

[0479] Additionally, 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.

[0480] 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 be represented as residual coefficients.

[0481] 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.

[0482] 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.

[0483] Additionally, for example, the bypass coding syntax elements for transform coefficients may include coefficient level information for 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.

[0484] The encoding device generates a bitstream including prediction-related information and residual information (S1140). The encoding device can generate a bitstream including prediction-related information and residual information. Alternatively, for example, the encoding device can output image information including prediction-related information, symbolic data hiding enable flags, TSRC enable flags, and residual information as a bitstream. The bitstream can include prediction-related information, symbolic data hiding enable flags, TSRC enable flags, and residual information. Additionally, the bitstream may also include a dependent quantization enable flag and / or a transform skip enable flag.

[0485] 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.

[0486] 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 the middle, Figure 12 The subtractor of the encoding device can perform Figure 11 S1110 in the middle, Figure 12 The entropy encoder of the encoding device can perform Figure 11 S1120 to S1140. Additionally, although not illustrated, the process of generating reconstructed samples and a 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.

[0487] 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 S1310 in the process can be executed by the entropy decoder of the decoding device. Figure 13 S1320 in the code can be executed by the predictor of the decoding device. Figure 13S1330 in the code can be executed by the residual processor of the decoding device, and Figure 13 The S1340 can be executed by the adder of the decoding device.

[0488] The decoding device acquires prediction-related information for the current block (S1300). The decoding device can acquire 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, 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, inter-frame prediction modes may include skip mode, merge mode, and / or (A)MVP mode, or may include various inter-frame prediction modes mentioned above.

[0489] The decoding device acquires the residual information of the current block (S1310). The decoding device can acquire image information including the residual information of the current block through the bit stream.

[0490] The residual information may include syntax elements for the transform coefficients used in the current block. Here, the current block can be a coded block (CB) or a transform block (TB). Furthermore, the transform coefficients can be referred to as residual coefficients.

[0491] For example, the decoding device can obtain a TSRC enable flag for whether to enable Transform Skip Residual Coding (TSRC), and can obtain residual information of the residual coding syntax of the current block derived based on the TSRC enable flag. For example, the TSRC enable flag can be a flag indicating 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 in the slice header syntax. The syntax element of the TSRC enable flag can be the sh_ts_residual_coding_disabled_flag mentioned above.

[0492] For example, a decoding device can determine the residual coding syntax of the current block based on the TSRC enable flag. For example, a decoding 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. RRC syntax can represent syntax based on RRC, and TSRC syntax can represent syntax based on TSRC.

[0493] For example, based on a TSRC enable flag with a value of 1, the residual coding syntax of the current block can be determined to be regular residual coding (RRC) syntax. In this case, for example, a transform skip flag for determining whether to apply transform skip to the current block can be obtained based on a transform skip enable flag with a value of 1, and the transform skip flag can have a value of 1. For example, image information may 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 transform skip flag has a value of 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 transform skip flag has a value of 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 transform skip flag of the current block can have a value of 1.

[0494] 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 to be Transform Skip Residual Coding (TSRC) syntax. Additionally, for example, a transform skip flag for whether to apply transform skipping to the current 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 determined to be Transform Skip Residual Coding (TSRC) syntax. Additionally, for example, a transform skip flag for whether to apply transform skipping to the current 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 to be Regular Residual Coding (RRC) syntax.

[0495] Subsequently, for example, the decoding device can obtain residual information for the residual coding syntax determined for the current block. For instance, residual information for a regular residual coding (RRC) syntax can be obtained based on a TSRC enable flag with a value of 1, and residual information for a TSRC syntax can be obtained based on a TSRC enable flag with a value of 0. Image information may include residual information.

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

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

[0498] 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.

[0499] 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.

[0500] 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.

[0501] 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`.

[0502] 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`.

[0503] Furthermore, for example, when symbolic data hiding is applied to the current block, the sign flag of the first valid transform coefficient of the current coefficient group (CG) in the current block may not be signaled. That is, for example, when symbolic data hiding is applied to the current block, the syntax element may not include the sign flag representing the sign of the first valid transform coefficient. Furthermore, for example, whether to apply symbolic data hiding to the current block can be deduced based on the symbolic data hiding enable flag and / or the position of the first valid transform coefficient and the position of the last valid transform coefficient in the current CG. For example, when the symbolic data hiding enable flag is 1 and the value obtained by subtracting the position of the first valid transform coefficient from the position of the last valid transform coefficient is greater than 3 (i.e., when the symbolic data hiding enable flag is 1 and the number of valid transform coefficients in the current CG is greater than 3), symbolic data hiding can be applied to the current CG of the current block.

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

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

[0506] 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.

[0507] 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.

[0508] 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.

[0509] In addition, for example, the TSRC enable flag can be obtained based on the symbol data hiding enable flag used to determine whether symbol data hiding is enabled.

[0510] Specifically, for example, the decoding device can acquire image information, including a symbolic data hiding enable flag, from the bitstream. The image information may include the symbolic data hiding enable flag. For example, the symbolic data hiding enable flag can be a flag indicating whether symbolic data hiding is enabled. For example, the symbolic data hiding enable flag can indicate whether symbolic data hiding is enabled. That is, for example, the symbolic data hiding enable flag can indicate whether symbolic data hiding is enabled for blocks of images in the sequence. For example, the symbolic data hiding enable flag can indicate whether a symbolic data hiding usage flag indicating whether symbolic data hiding is used for the current slice can exist. For example, a symbolic data hiding enable flag with a value of 1 can indicate that symbolic data hiding is enabled, and a symbolic data hiding enable flag with a value of 0 can indicate that symbolic data hiding is not enabled. For example, a symbolic data hiding enable flag with a value of 1 can indicate that a symbolic data hiding usage flag can exist, and a symbolic data hiding enable flag with a value of 0 can indicate that a symbolic data hiding usage flag does not exist. Additionally, for example, the symbolic data hiding enable flag can be signaled in the SPS syntax. Alternatively, for example, the symbolic data hiding enable flag can be signaled in the image header syntax or slice header syntax. The syntax element for the symbolic data hiding enable flag can be sps_sign_data_hiding_enabled_flag.

[0511] Then, for example, the decoding device can obtain the TSRC enable flag based on the symbol data hiding enable flag. For example, the TSRC enable flag can be obtained based on the symbol data hiding enable flag having a value of 0. That is, for example, the TSRC enable flag can be obtained when the value of the symbol data hiding enable flag is 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled). In other words, for example, the TSRC enable flag can be signaled when the value of the symbol data hiding enable flag is 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled). Alternatively, for example, the TSRC enable flag can be left unobtained when the value of the symbol data hiding enable flag is 1, and the value of the TSRC enable flag can be deduced to be 0. That is, for example, the TSRC enable flag can be left unsigned when the value of the symbol data hiding enable flag is 1, and the value of the TSRC enable flag can be deduced to be 0.

[0512] Additionally, for example, the TSRC enable flag can be obtained based on the symbolic data hiding enable flag, the dependency quantization enable flag, and / or the transform skip enable flag. For example, the TSRC enable flag can be obtained based on the symbolic data hiding enable flag having a value of 0, the dependency quantization enable flag having a value of 0, and the transform skip enable flag having a value of 1. That is, for example, when the symbolic data hiding enable flag has a value of 0 (i.e., the symbolic data hiding enable flag indicates that symbolic data hiding is not enabled), the dependency quantization enable flag has a value of 0 (i.e., the dependency quantization enable flag indicates that dependency quantization is not enabled), and the transform skip enable flag has a value of 1 (i.e., the transform skip enable flag indicates that transform skip is enabled), the TSRC enable flag can be obtained (or signaled). Alternatively, for example, when the dependency quantization enable flag has a value of 1, the TSRC enable flag may not be obtained, and the value of the TSRC enable flag can be deduced to be 0. That is, for example, when the dependency quantization enable flag has a value of 1, the TSRC enable flag may not be signaled, and the value of the TSRC enable flag can be deduced to be 0. Additionally, for example, when the transform skip enable flag is 0, the TSRC enable flag may not be acquired, and the value of the TSRC enable flag can be deduced to be 0. That is, for example, when the transform skip enable flag is 0, the TSRC enable flag may not be signaled, and the value of the TSRC enable flag can be deduced to be 0.

[0513] Furthermore, for example, the decoding device can acquire a dependency quantization enable flag. The decoding device can acquire image information, including the dependency quantization enable flag, through the bitstream. The image information can include the dependency quantization enable flag. For example, the dependency quantization enable flag can be a flag used to indicate 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 a dependency quantization use flag indicating whether dependency quantization is used for the current slice can 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 in the SPS syntax or slice header syntax. The syntax element of the dependency quantization enable flag can be the above-mentioned `sps_dep_quant_enabled_flag`. `sps_dep_quant_enabled_flag` can be called `sh_dep_quant_enabled_flag`, `sh_dep_quant_used_flag`, or `ph_dep_quant_enabled_flag`.

[0514] Additionally, for example, the decoding device can acquire a transform skip enable flag. The decoding device can acquire image information, including the transform skip enable flag, through the bitstream. The image information can include the transform skip enable flag. Here, the current block can be a coded block (CB) or a transform block (TB). For example, the transform skip enable flag can be a flag used to indicate whether transform skipping is enabled. For example, the transform skip enable flag can indicate whether transform skipping is enabled. That is, for example, the transform skip enable flag can indicate whether transform skipping is enabled for a block of images in the sequence. For example, the transform skip enable flag can indicate whether a transform skip flag can exist. For example, a transform skip enable flag with a value of 1 can indicate that transform skipping is enabled, and a transform skip enable flag with a value of 0 can indicate that transform skipping is not enabled. That is, for example, a transform skip enable flag with a value of 1 can indicate that a transform skip flag can exist, and a transform skip enable flag with a value of 0 can indicate that a transform skip flag does not exist. Additionally, for example, the transform skip enable flag can be signaled to the Sequence Parameter Set (SPS) syntax. The syntax element of the transform skip enable flag can be the sps_transform_skip_enabled_flag mentioned above.

[0515] The decoding device derives the prediction sample for the current block based on prediction-related information (S1320). Based on the prediction-related information, the decoding device can determine whether to apply inter-frame prediction or intra-frame prediction to the current block, and based on this, it can perform the prediction.

[0516] For example, the decoding device can deduce the prediction mode applied to the current block based on prediction-related information, and can deduce the prediction samples of the current block based on the prediction mode. For example, when applying inter-frame prediction to the current block, the decoding device can deduce the motion information of the current block based on prediction-related information, and can deduce the prediction samples of the current block based on the motion information. In addition, for example, when applying intra-frame prediction to the current block, the decoding device can deduce reference samples based on neighboring samples of the current block, and can deduce the prediction samples of the current block based on the reference samples of the current block and the intra-frame prediction mode. The reference samples can include the upper reference sample and the left reference sample of the current block. For example, when the size of the current block is N×N and the x-component and y-component of the upper left sample position of the current block are 0, the left reference sample can be p[-1][0] to p[-1][2N-1], and the upper reference sample can be p[0][-1] to p[2N-1][-1].

[0517] The decoding device derives the residual sample of the current block based on the residual information (S1330). 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.

[0518] 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 information. 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 on 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 on the inverse-quantized transform coefficients.

[0519] Furthermore, when dependent quantization is applied to the current block, the decoding device can derive the residual samples of the current block by performing dependent quantization on the transform coefficients. For example, when dependent quantization is applied to the current block, the decoding 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. It can 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 samples by dequantizing the derived coefficient level. For example, the current transform coefficient can be dequantized 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.

[0520] Furthermore, for example, when symbolic data hiding is applied to the current block, the sign of the first effective transform coefficient of the current CG in the current block can be derived based on the sum of the absolute values ​​of the effective transform coefficients in the current CG. For example, when the sum of the absolute values ​​of the effective transform coefficients is even, the sign of the first effective transform coefficient can be derived as positive, and when the sum of the absolute values ​​of the effective transform coefficients is odd, the sign of the first effective transform coefficient can be derived as negative.

[0521] The decoding device generates a reconstructed image based on the predicted samples and residual samples (S1340). 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.

[0522] 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.

[0523] 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 S1310, Figure 14 The predictor of the decoding device can perform Figure 13 S1320 in the middle, Figure 14 The residual processor of the decoding device can perform Figure 13 S1330 in, and Figure 14 The adder of the decoding device can perform Figure 13 S1340 in the middle.

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

[0525] Furthermore, according to this disclosure, the TSRC enable flag can be signaled when symbolic data hiding is not enabled by setting the signaling relationship between the symbolic data hiding enable flag and the TSRC enable flag. In this way, when encoding RRC syntax for transform skip blocks because TSRC is not enabled, symbolic data hiding is not used, thereby improving encoding efficiency. Moreover, the overall residual coding efficiency can be improved by reducing the number of bits encoded.

[0526] 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 will not be used, thereby improving coding efficiency and improving overall residual coding efficiency by reducing the number of encoded bits.

[0527] Furthermore, according to this disclosure, a signaling relationship can be established between the transform skip enable flag and the TSRC enable flag, and if transform skip is enabled, the TSRC enable flag can be signaled, thereby improving the overall residual coding efficiency by reducing the number of encoded bits.

[0528] 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.

[0529] 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.

[0530] 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.

[0531] 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.

[0532] 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.

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

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

[0535] 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 server. As another example, when multimedia input devices such as smartphones, cameras, or camcorders generate bitstreams directly, the encoding server can be omitted.

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

[0537] The streaming server sends multimedia data to the user device via a web server based on user requests, and the web server acts as a medium for notifying the user of services. When a user requests a desired service from the web server, the web server delivers the request to the streaming server, and the streaming server sends multimedia data to the user. In this scenario, the content streaming 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 system.

[0538] A streaming 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 server can store the bitstream for a predetermined period of time.

[0539] Examples of user devices may include mobile phones, smartphones, laptops, digital broadcasting 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 the content streaming system can operate as a distributed server, in which case data received from each server can be distributed.

[0540] 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 residual information for the current block; Based on the prediction-related information, the prediction sample for 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 process of obtaining the residual information includes the following steps: Retrieve the TSRC disable flag from the bitstream to indicate whether to use the transform skip residual coding TSRC syntax; and Obtain the residual information of the residual encoding syntax for the current block, determined based on the TSRC disable flag. Specifically, the TSRC disable flag is obtained from the bitstream by setting the symbol data hiding enable flag to 0, the dependent quantization enable flag to 0, and the transform skip enable flag to 1. The TSRC disable flag with a value of 1 indicates that the TSRC syntax is not used, and the TSRC disable flag with a value of 0 indicates that the TSRC syntax is used. The symbol data hiding enable flag having a value of 1 indicates that symbol data hiding is enabled, and the symbol data hiding enable flag having a value of 0 indicates that symbol data hiding is disabled. 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. The transform skip enable flag having a value of 1 indicates that transform skipping is enabled, and the transform skip enable flag having a value of 0 indicates that transform skipping is not enabled.

2. The image decoding method according to claim 1, wherein, In response to the symbol data hiding enable flag being equal to 1, the TSRC disable flag is not obtained from the bitstream, and The value of the TSRC disable flag is deduced to be 0.

3. The image decoding method according to claim 2, wherein, In response to the symbol data hiding enable flag being equal to 1, the sign of the first valid transform coefficient of the current coefficient group CG is derived based on the sum of the absolute values ​​of the valid transform coefficients in the current coefficient group CG in the current block.

4. The image decoding method according to claim 3, wherein, In response to the symbol data hiding enable flag being equal to 1, the residual information does not include the symbol flag of the first valid transform coefficient.

5. The image decoding method according to claim 1, wherein, In response to the TSRC disable flag being equal to 1, the residual information of the current block is obtained from the regular residual coding RRC syntax.

6. The image decoding method according to claim 1, wherein, In response to the current block being a transform skip block and the TSRC disable flag being equal to 0, the residual information of the current block is obtained from the TSRC syntax.

7. The image decoding method according to claim 6, wherein, The residual information of the TSRC syntax includes context-coded syntax elements of the transform coefficients, and The context encoding syntax elements include a valid coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a parity level 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.

8. 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 or intra-frame prediction. The residual sample of the current block is derived based on the predicted sample; Encode the prediction-related information for the current block; The residual information of the residual samples is encoded; as well as Generate a bitstream including the prediction-related information and the residual information. Encoding the residual information includes the following steps: Encode the TSRC disable flag used to determine whether to use the transform skip residual coding TSRC syntax; and The residual information of the current block is encoded based on the TSRC disable flag, and Specifically, the TSRC disable flag is encoded based on the following: the symbolic data hiding enable flag is set to 0, the dependency quantization enable flag is set to 0, and the transform skip enable flag is set to 1. The TSRC disable flag with a value of 1 indicates that the TSRC syntax is not used, and the TSRC disable flag with a value of 0 indicates that the TSRC syntax is used. The symbol data hiding enable flag having a value of 1 indicates that symbol data hiding is enabled, and the symbol data hiding enable flag having a value of 0 indicates that symbol data hiding is disabled. 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. The transform skip enable flag having a value of 1 indicates that transform skipping is enabled, and the transform skip enable flag having a value of 0 indicates that transform skipping is not enabled.

9. A method for transmitting data for image information, the method comprising the steps of: The prediction sample for the current block is derived based on inter-frame prediction or intra-frame prediction. The residual sample of the current block is derived based on the predicted sample; Encode the prediction-related information for the current block; The residual information of the residual samples is encoded; Generate a bitstream including the prediction-related information and the residual information; as well as Send the bit stream, Encoding the residual information includes the following steps: Encode the TSRC disable flag used to determine whether to use the transform skip residual coding TSRC syntax; and The residual information of the current block is encoded based on the TSRC disable flag. Specifically, the TSRC disable flag is encoded based on the following: the symbolic data hiding enable flag is set to 0, the dependency quantization enable flag is set to 0, and the transform skip enable flag is set to 1. The TSRC disable flag with a value of 1 indicates that the TSRC syntax is not used, and the TSRC disable flag with a value of 0 indicates that the TSRC syntax is used. The symbol data hiding enable flag having a value of 1 indicates that symbol data hiding is enabled, and the symbol data hiding enable flag having a value of 0 indicates that symbol data hiding is disabled. 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. The transform skip enable flag having a value of 1 indicates that transform skipping is enabled, and the transform skip enable flag having a value of 0 indicates that transform skipping is not enabled.