Image decoding method and apparatus for residual coding.
The image decoding method improves coding efficiency by using TSRC flags to optimize residual coding, reducing bit usage and enhancing image compression for high-resolution images.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- LG ELECTRONICS INC
- Filing Date
- 2025-03-21
- Publication Date
- 2026-07-07
AI Technical Summary
The increasing demand for high-resolution and high-quality images has led to a surge in transmission and storage costs due to the increased amount of information, necessitating a high-efficiency image compression technology.
An image decoding method and apparatus that utilizes transform skip residual coding (TSRC) by determining the availability of dependent quantization and TSRC through flags, deriving motion and residual information, and generating reconstructed pictures to improve coding efficiency.
The method enhances image coding efficiency by reducing the number of bits required for transmission and storage, particularly in residual coding, by signaling the TSRC flag only when dependent quantization is not available, thereby preventing overlapping usage and improving overall coding efficiency.
Smart Images

Figure 0007886452000061 
Figure 0007886452000062 
Figure 0007886452000063
Abstract
Description
Technical Field
[0006] , , ,
[0001] This document relates to image coding technology, and more particularly, to an image decoding method and apparatus for coding flag information indicating whether TSRC is enabled when coding residual data of a current block in an image coding system.
Background Art
[0002] Recently, the demand for high-resolution and high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images has been increasing in various fields. As the image data becomes higher in resolution and quality, the amount of information or bits to be transmitted relatively increases compared to the existing image data. Therefore, when transmitting image data using a medium such as an existing wired or wireless broadband line, or storing image data using an existing recording medium, the transmission cost and storage cost increase.
[0003] Thus, in order to effectively transmit, store, and reproduce information of high-resolution and high-quality images, a high-efficiency image compression technology is required.
Summary of the Invention
Problems to be Solved by the Invention
[0004] The technical problem of this document is to provide a method and apparatus for increasing image coding efficiency.
[0005] Another technical problem of this document is to provide a method and apparatus for increasing the efficiency of residual coding.
Means for Solving the Problems
[0006] According to one embodiment of this document, an image decoding method is provided that is performed by a decoding device. The method is characterized by comprising the steps of: obtaining prediction-related information for the current block; obtaining a dependent quantization enabled flag indicating whether dependent quantization is available; obtaining a TSRC enabled flag indicating whether transform skip residual coding (TSRC) is available based on the dependent quantization enabled flag; obtaining residual information of the syntax of the residual coding for the current block derived based on the TSRC enabled flag; deriving motion information for the current block based on the prediction-related information; deriving a predicted sample of the current block based on the motion information; deriving a residual sample of the current block based on the residual information; and generating a reconstructed picture based on the predicted sample and the residual sample.
[0007] According to another embodiment of this document, a decoding device for performing image decoding is provided. The decoding device is characterized by comprising: an entropy decoding (decoding) unit that acquires prediction-related information for the current block, acquires a dependent quantization availability flag indicating whether dependent quantization is available, acquires a transform skip residual coding (TSRC) availability flag indicating whether transform skip residual coding is available based on the dependent quantization availability flag, and acquires residual information of the syntax of the residual coding for the current block derived based on the TSRC availability flag; a prediction unit that derives motion information for the current block based on the prediction-related information and derives predicted samples for the current block based on the motion information; a residual processing unit that derives residual samples for the current block based on the residual information; and an addition unit that generates a reconstructed picture based on the predicted samples and the residual samples.
[0008] Another embodiment of this document provides a video encoding method performed by an encoding device. The method is characterized by comprising the steps of: deriving predicted samples of a current block based on interpretation; encoding prediction-related information for the current block; encoding a dependent quantization-enabled flag indicating whether dependent quantization is available; encoding a TSRC-enabled flag indicating whether transform skip residual coding (TSRC) is available based on the dependent quantization-enabled flag; determining the syntax of residual coding for the current block based on the TSRC-enabled flag; encoding residual information of the determined residual coding syntax for the current block; and generating a bitstream having the prediction-related information, the dependent quantization-enabled flag, the TSRC-enabled flag, and the residual information.
[0009] Another embodiment of this document provides a video encoding device. The encoding device is characterized by comprising: a prediction unit that derives predicted samples of the current block based on interpretation; and an entropy encoding unit that encodes prediction-related information for the current block, encodes a dependent quantization-enabled flag indicating whether dependent quantization is available, encodes a TSRC-enabled flag indicating whether transform skip residual coding (TSRC) is available based on the dependent quantization-enabled flag, determines the syntax of residual coding for the current block based on the TSRC-enabled flag, encodes residual information of the determined residual coding syntax for the current block, and generates a bitstream having the prediction-related information, the dependent quantization-enabled flag, the TSRC-enabled flag, and the residual information.
[0010] According to yet another embodiment of this document, a computer-readable digital storage medium is provided which stores a bitstream having image information that triggers an image decoding method. The computer-readable digital storage medium is characterized by the image decoding method comprising: obtaining prediction-related information for the current block; obtaining a dependent quantization-enabled flag indicating whether dependent quantization is available; obtaining a TSRC-enabled flag indicating whether transform skip residual coding (TSRC) is available based on the dependent quantization-enabled flag; obtaining residual information of the syntax of residual coding for the current block derived based on the TSRC-enabled flag; deriving motion information for the current block based on the prediction-related information; deriving a predicted sample of the current block based on the motion information; deriving a residual sample of the current block based on the residual information; and generating a reconstructed picture based on the predicted sample and the residual sample. [Effects of the Invention]
[0011] According to this document, the efficiency of image coding performed based on interpretation and / or residual coding can be improved.
[0012] According to this document, the efficiency of residual coding can be improved.
[0013] According to this document, a signaling relationship can be established between the dependent quantization enabled flag and the TSRC enabled flag. This allows the TSRC enabled flag to be signaled when dependent quantization is not available, thereby improving coding efficiency by preventing the use of dependent quantization when TSRC is not available and the RRC syntax is coded for the transform skip block. This reduces the amount of bits coded and improves overall residual coding efficiency.
[0014] According to this document, the TSRC-enabled flag can only be signaled when dependent quantization is not used, thereby preventing the coding of RRC syntax for transform skip blocks from overlapping with the use of dependent quantization, and allowing the TSRC-enabled flag to be coded more effectively (efficiently), reducing the number of bits and improving overall residual coding efficiency. [Brief explanation of the drawing]
[0015] [Figure 1] This figure schematically illustrates an example of a video / image coding system to which the embodiments described herein may be applied. [Figure 2] This figure schematically illustrates the configuration of a video / image encoding device to which the embodiments described herein may be applied. [Figure 3] This figure schematically illustrates the configuration of a video / image decoding device to which the embodiments described herein may be applied. [Figure 4] This figure shows an example of an interpretation-based video / image encoding method. [Figure 5] This figure shows an example of an interpretation-based video / image decoding method. [Figure 6] This diagram illustrates the interpretation prediction procedure. [Figure 7]A diagram exemplarily showing CABAC (Context-Adaptive Binary Arithmetic Coding) for encoding a syntax element. [Figure 8] A diagram illustrating examples such as transform coefficients within a 4×4 block. [Figure 9] A diagram exemplarily showing a scalar quantizer used in dependent quantization. [Figure 10] A diagram exemplarily showing state transition for dependent quantization and selection of a quantizer. [Figure 11] A diagram schematically showing an image encoding method by an encoding device according to this document. [Figure 12] A diagram schematically showing an encoding device for performing the image encoding method according to this document. [Figure 13] A diagram schematically showing an image decoding method by a decoding device according to this document. [Figure 14] A diagram schematically showing a decoding device for performing the image decoding method according to this document. [Figure 15] A diagram exemplarily showing a content streaming system structure diagram to which embodiments of this document are applied.
Embodiments for Carrying Out the Invention
[0016] This document can be modified in various ways, can have various embodiments, and specific embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to specific embodiments. The terms commonly used in this specification are merely used to describe specific embodiments and are not intended to limit the technical idea of this document. Singular expressions include plural expressions unless the context clearly indicates otherwise. Terms such as "including" or "having" in this specification are intended to specify the existence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and it should be understood that the existence or addition possibility of one or more other features, numbers, steps, operations, components, parts, or combinations thereof, etc., is not precluded in advance.
[0017] On the other hand, each configuration on the drawings described in this document is independently illustrated for the convenience of explaining different characteristic functions, and it does not mean that each configuration is realized by separate hardware or separate software. For example, among each configuration, two or more configurations can be combined to form one configuration, and one configuration can also be divided into multiple configurations. Embodiments in which each configuration is integrated and / or separated are included in the scope of rights of this document as long as they do not deviate from the essence of this document.
[0018] Hereinafter, referring to the attached drawings, the preferred embodiments of this document will be described in more detail. Hereinafter, the same reference numerals will be used for the same components on the drawings, and overlapping descriptions for the same components can be omitted.
[0019] FIG. 1 schematically shows an example of a video / image coding system to which an embodiment of this document can be applied.
[0020] As shown in Figure 1, a video / image coding system may include a first device (source device) and a second device (receiving device). The source device can transmit encoded video / image information or data to the receiving device in file or streaming form via a digital recording medium or network.
[0021] The source device may comprise a video source, an encoding device, and a transmitter. The receiving device may comprise a receiver, a decoder, and a renderer. The encoding device may be called a video / image encoder, and the decoder may be called a video / image decoder. The transmitter may be included in the encoding device. The receiver may be included in the decoder. The renderer may comprise a display unit, which may consist of a separate device or external component.
[0022] A video source can acquire video / images through processes such as video / image capture, synthesis, or generation. A video source may include video / image capture devices and / or video / image generation devices. A video / image capture device may include, for example, one or more cameras, or a video / image archive containing previously captured video / images. A video / image generation device may include, for example, a computer, tablet, and smartphone, and can generate video / images (electronically). For example, virtual video / images can be generated via a computer, in which case the video / image capture process can be replaced by the process of generating the associated data.
[0023] An encoding device can encode input video / images. For compression and coding efficiency, the encoding device can perform a series of steps, including prediction, transformation, and quantization. The encoded data (encoded video / image information) can be output in bitstream format.
[0024] The transmitting unit can transmit encoded video / image information or data output in bitstream format to the receiving unit of a receiving device via a digital recording medium or network in file or streaming format. The digital recording medium can include various recording media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. The transmitting unit may include elements for generating media files via a predetermined file format and elements for transmission via a broadcast / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.
[0025] A decoding device can decode video / images by performing a series of steps, such as inverse quantization, inverse transformation, and prediction, corresponding to the operation of the encoding device.
[0026] The renderer can render the decoded video / image. The rendered video / image can be displayed via the display unit.
[0027] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the VVC (Versatile Video Coding) standard, the EVC (Essential Video Coding) standard, the AV1 (AOMedia Video 1) standard, the AVS2 (2nd Generation of Audio Video Coding Standard), or next-generation video / image coding standards (e.g., H.267 or H.268).
[0028] This document presents various embodiments relating to video / image coding, and unless otherwise noted, these embodiments can also be implemented in combination with each other.
[0029] In this document, "video" can mean a collection of images over time. "Picture" generally refers to a unit representing a single image at a specific time point in time, while "subpicture," "slice," and "tile" are units that constitute a part of a picture in coding. A subpicture, slice, or tile may contain one or more Coding Tree Units (CTUs). A single picture may consist of one or more subpictures, slices, or tiles. A single picture may consist of one or more groups of tiles. A tile group may contain one or more tiles. A brick may represent a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each of which consists of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick.A brick scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in a CTU raster scan in a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A subpicture may represent a rectangular region of one or more slices within a picture. In other words, a subpicture contains one or more slices that collectively cover a rectangular region of a picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture.The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set. The tile row is a rectangular region of CTUs having a width specified by syntax elements in the picture parameter set and a height equal to the width of the picture. A tile scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture.A slice includes an integer number of bricks of a picture that may exclusively contain in a single NAL unit. A slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile. In this document, tile groups and slices may be used interchangeably. For example, in this document, a tile group / tile group header may be called a slice / slice header.
[0030] A pixel or pel can refer to the smallest unit that makes up a picture (or image). Alternatively, the term "sample" can be used as a counterpart to pixel. A sample can generally represent a pixel or a pixel value, and can represent only the luma component pixel / pixel value, or only the chroma component pixel / pixel value.
[0031] A unit can represent a basic unit of image processing. A unit can contain at least one of a specific region of a picture and information associated with that region. A unit can contain one luma block and two chroma (e.g., cb, cr) blocks. The term unit may sometimes be used interchangeably with terms such as block or area. In general, an M×N block can contain a sample (or sample array) consisting of M columns and N rows, or a set (or array) of transform coefficients.
[0032] 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" may be interpreted as "A and / or B." For example, in this specification, "A, B or C" may mean "A only," "B only," "C only," or "any combination of A, B and C."
[0033] In this specification, slashes ( / ) and commas may mean "and / or". For example, "A / B" may mean "A and / or B". Thus, "A / B" may mean "A only", "B only", or "both A and B". For example, "A, B, C" may mean "A, B or C".
[0034] 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 expressions "at least one of A or B" and "at least one of A and / or B" may be interpreted similarly to "at least one of A and B."
[0035] Furthermore, in this specification, "at least one of A, B and C" may mean "A only," "B only," "C only," or "any combination of A, B and C." Also, "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."
[0036] Furthermore, parentheses used in this specification may mean "for example." Specifically, when "prediction (intra-prediction)" is indicated, "intra-prediction" may be proposed as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra-prediction," and "intra-prediction" may be proposed as an example of "prediction." Also, when "prediction (i.e., intra-prediction)" is indicated, "intra-prediction" may be proposed as an example of "prediction."
[0037] Technical features described individually in each drawing in this specification may be implemented individually or simultaneously.
[0038] The following drawings have been prepared to illustrate a specific example of this specification. The names of specific devices and signals / messages / fields shown in the drawings are presented illustratively, and the technical features of this specification are not limited to the specific names used in the following drawings.
[0039] Figure 2 is a schematic diagram illustrating the configuration of a video / image encoding device to which the embodiments described in this document may be applied. Hereinafter, the term "video encoding device" may include an image encoding device.
[0040] As shown in Figure 2, the encoding device 200 can be configured to include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter-prediction unit 221 and an intra-prediction unit 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be called a reconstructor or a reconstructed block generator. The aforementioned image segmentation unit 210, prediction unit 220, residual processing unit 230, entropy coding unit 240, addition unit 250, and filtering unit 260 can be configured by one or more hardware components (e.g., an encoder chipset or processor) depending on the embodiment. Furthermore, the memory 270 may include a DPB (Decoded Picture Buffer) and may be configured by a digital recording medium. The hardware components may also further include the memory 270 as an internal / external component.
[0041] The image splitting unit 210 can split the input image (or picture, frame) input to the encoding device 200 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, coding units can be recursively split from a coding tree unit (CTU) or a largeest coding unit (LCU) using a QTBTTT (Quad-Tree Binary-Tree Ternary-Tree) structure. For example, one coding unit can be split into multiple coding units of deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. In this case, for example, the quad-tree structure may be applied first, followed by the binary-tree structure and / or ternary-tree structure. Alternatively, the binary-tree structure may be applied first. The coding procedure described in this document can be executed based on a final coding unit that cannot be further divided. In this case, based on coding efficiency according to image characteristics, the largest coding unit can be immediately used as the final coding unit, or, if necessary, the coding unit can be recursively divided into lower-depth coding units so that the optimally sized coding unit is used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further comprise a prediction unit (PU) or a transformation unit (TU). In this case, the prediction unit and the transformation unit can each be divided or partitioned from the final coding unit described above.The above prediction unit is the unit of sample prediction, and the above conversion unit is the unit for deriving (inducing) conversion coefficients and / or the unit for deriving residual signals from conversion coefficients.
[0042] The term "unit" can sometimes be confused with terms such as "block" or "area." Generally, an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and may represent only the pixel / pixel value of the lumen component, or only the pixel / pixel value of the chroma component. A sample can be used as the term corresponding to a single picture (or image) as a pixel or pel.
[0043] The encoding device 200 can generate a residual signal (residual block, residual sample array) by subtracting the predicted signal (predicted block, predicted sample array) output from the inter-prediction unit 221 or intra-prediction unit 222 from the input image signal (original block, original sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, the unit that subtracts the predicted signal (predicted block, predicted sample array) from the input image signal (original block, original sample array) within the encoder 200 can be called the subtraction unit 231. The prediction unit can perform a prediction on the block to be processed (hereinafter referred to as the current block) and generate a predicted block that includes the predicted sample for the current block. The prediction unit can determine whether intra-prediction or inter-prediction is applied on a current block or CU basis. The prediction unit can generate various information related to prediction, such as prediction mode information, and transmit it to the entropy encoding unit 240, as will be described later in the explanation of each prediction mode. Prediction information can be encoded by the entropy encoding unit 240 and output in bitstream format.
[0044] The intra-prediction unit 222 can predict the current block by referring to a sample in the current picture. The referenced sample can be located in the vicinity (neighbor) of the current block or at a distance, depending on the prediction mode. 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. Directional modes can include, for example, 33 directional prediction modes or 65 directional prediction modes, depending on the degree of fineness of the prediction direction. However, this is merely an example, and more or fewer directional prediction modes can be used depending on the settings. The intra-prediction unit 222 can also determine the prediction mode to be applied to the current block using the prediction modes applied to adjacent blocks.
[0045] The interprediction unit 221 can derive predicted blocks relative to the current block based on a reference block (reference sample array) identified by motion vectors on the reference picture. In this case, in order to reduce the amount of motion information transmitted in interprediction mode, motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between adjacent blocks and the current block. The motion information may include motion vectors and reference picture indices. The motion information may further include interprediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of interprediction, adjacent blocks may include spatial neighboring blocks that exist in the current picture and temporal neighboring blocks that exist in the reference picture. The reference picture containing the above reference block and the reference picture containing the above temporal neighboring block may be the same or different. The above temporal neighboring block may be called a collocated reference block (colCU), and the reference picture containing the above temporal neighboring block may be called a collocated picture (colPic). For example, the interpretation unit 221 can construct a motion information candidate list based on adjacent blocks and generate information indicating which candidates are used to derive the motion vector and / or reference picture index of the current block. Interpretation can be performed based on various prediction modes; for example, in skip mode and merge mode, the interpretation unit 221 can use the motion information of adjacent blocks as the motion information of the current block. In skip mode, unlike merge mode, a residual signal may not be transmitted.In Motion Vector Prediction (MVP) mode, the motion vector of an adjacent block is used as a Motion Vector Predictor, and the motion vector of the current block can be instructed by signaling the motion vector difference.
[0046] The prediction unit 220 can generate prediction signals based on various prediction methods described later. For example, the prediction unit can apply intra-prediction or inter-prediction for predictions on a single block, and can also apply intra-prediction and inter-prediction simultaneously. This can be called combined inter and intra prediction (CIIP). The prediction unit can also be based on an intra-block copy (IBC) prediction mode or a palette mode for predictions on blocks. The above IBC prediction mode or palette mode can be used for content image / video coding such as games, for example, as in SCC (Screen Content Coding). IBC basically performs predictions within the current picture, but can be performed similarly to inter-prediction in that it derives reference blocks within the current picture. That is, IBC can utilize at least one of the inter-prediction techniques described in this document. Palette mode can be seen as an example of intra-coding or intra-prediction. When palette mode is applied, sample values within the picture can be signaled based on information about the palette table and palette index.
[0047] The prediction signal generated via the above prediction unit (including the inter-prediction unit 221 and / or the intra-prediction unit 222) can be used to generate a reconstructed signal or a residual signal. The transformation unit 232 can generate transformation coefficients by applying a transformation technique to the residual signal. For example, the transformation technique may include at least one of the following: DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen-Loeve Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Here, GBT refers to a transformation obtained from a graph when relational information between pixels is represented by this graph. CNT refers to a transformation obtained by generating a prediction signal using all previously reconstructed pixels and obtaining a transformation based on it. The transformation process can also be applied to pixel blocks of the same size and square, or to non-square, variable-sized blocks.
[0048] The quantization unit 233 quantizes the conversion coefficients and transmits them to the entropy encoding unit 240, which can encode the quantized signal (information about the quantized conversion coefficients) and output it as a bitstream. The information about the quantized conversion coefficients can be called residual information. The quantization unit 233 can rearrange the block-shaped quantized conversion coefficients into a one-dimensional vector form based on the coefficient scan order, and can also generate information about the quantized conversion coefficients based on the one-dimensional vector form of the quantized conversion coefficients. The entropy encoding unit 240 can perform various encoding methods, such as exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding). In addition to the quantized conversion coefficients, the entropy encoding unit 240 can also encode information necessary for video / image restoration (e.g., the values of syntax elements) together with or separately from the quantized conversion coefficients. Encoded information (e.g., encoded video / image information) can be transmitted or stored in bitstream form in units of Network Abstraction Layer (NAL) units. The video / image information may further include information about various parameter sets, such as the Adaptation Parameter Set (APS), Picture Parameter Set (PPS), Sequence Parameter Set (SPS), or Video Parameter Set (VPS). The video / image information may also further include general constraint information. Information and / or syntax elements transmitted / signaled from the encoding device to the decoding device in this document may be included in the video / image information. The video / image information may be encoded via the encoding procedure described above and included in the bitstream.The bitstream described above can be transmitted over a network or stored on a digital recording medium. Here, the network may include broadcast networks and / or communication networks, and the digital recording medium may include various recording media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) that transmits and / or stores the signal output from the entropy encoding unit 240 may be configured as an internal / external element of the encoding device 200, or the transmitting unit may be included in the entropy encoding unit 240.
[0049] The quantized conversion coefficients output from the quantization unit 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 transformation to the quantized conversion coefficients via the inverse quantization unit 234 and the inverse transformation unit 235. The adder 250 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter-prediction unit 221 or the intra-prediction unit 222. If there are no residuals for the block to be processed, as in the case of skip mode, the predicted block can be used as the reconstructed block. The adder 250 can be called the reconstruction unit or reconstructed block generation unit. The generated reconstructed signal can be used for intra-prediction of the next block to be processed in the current picture, and can also be used for inter-prediction of the next picture after filtering, as described later.
[0050] On the other hand, LMCS (Luma Mapping with Chroma Scaling) can also be applied during the picture encoding and / or restoration process.
[0051] The filtering unit 260 can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit 260 can apply various filtering methods to the restored picture to generate a modified restored picture, and the modified restored picture can be stored in the memory 270, specifically in the DPB of the memory 270. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, and bilateral filter. The filtering unit 260 can generate various filtering-related information and transmit it to the entropy encoding unit 240, as will be described later in the explanation of each filtering method. The filtering-related information can be encoded by the entropy encoding unit 240 and output in bitstream format.
[0052] The corrected restored picture sent to memory 270 can be used as a reference picture in the interpretation unit 221. Through this, the encoding device can avoid prediction mismatches between the encoding device 200 and the decoding device 300 when interpretation is applied, and can also improve encoding efficiency.
[0053] Memory 270DPB can store the corrected restored picture for use as a reference picture in the inter-prediction unit 221. Memory 270 can store motion information of blocks from which motion information in the current picture has been derived (or encoded) and / or motion information of blocks in already restored pictures. The stored motion information can be transmitted to the inter-prediction unit 221 for use as motion information of spatially adjacent blocks or motion information of temporally adjacent blocks. Memory 270 can store restored samples of restored blocks in the current picture and transmit them to the intra-prediction unit 222.
[0054] Figure 3 is a schematic diagram illustrating the configuration of a video / image decoding device to which the embodiments described in this document may be applied.
[0055] As shown in Figure 3, the decoding device 300 can be configured to 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 can include an inter-prediction unit 331 and an intra-prediction unit 332. The residual processor 320 can include a dequantizer 321 and an inverse transformer 322. The aforementioned entropy decoder 310, residual processor 320, predictor 330, adder 340, and filtering unit 350 can be configured by a single hardware component (e.g., a decoder chipset or processor) depending on the embodiment. The memory 360 can also include a DPB (Decoded Picture Buffer) and can be configured by a digital recording medium. The above hardware components may also include Memory 360 as an internal / external component.
[0056] When a bitstream containing video / image information is input, the decoding device 300 can reconstruct the image corresponding to the process by which the video / image information was processed in the encoding device shown in Figure 2. For example, the decoding device 300 can derive units / blocks based on block division-related information obtained from the bitstream. The decoding device 300 can perform decoding using the processing units applied in the encoding device. Thus, the decoding processing unit is, for example, a coding unit, which can be divided from a coding tree unit or a maximum coding unit according to a quadtree structure, a binary tree structure, and / or a ternary tree structure. One or more transformation units can be derived from the coding unit. The reconstructed image signal decoded and output via the decoding device 300 can then be reproduced via a playback device.
[0057] The decoding device 300 can receive the signal output from the encoding device shown in Figure 2 in bitstream form, and the received signal can be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 can parse the bitstream to derive information necessary for image restoration (or picture restoration) (e.g., video / image information). The video / image information may further include information about various parameter sets, such as the adaptation parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS). The video / image information may also further include general constraint information. The decoding device can further decode the picture based on the parameter set information and / or the general constraint information. The signaling / received information and / or syntax elements described later in this document can be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 can decode information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of syntax elements necessary for image reconstruction, quantized values of transformation coefficients related to residuals, etc. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using the information of the syntax element to be decoded, as well as the decoded information of the surrounding and decoded blocks, or the symbol / bin information decoded in a previous step, predicts the probability of bin occurrence based on the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element. At this time, after determining the context model, the CABAC entropy decoding method can update the context model using the decoded symbol / bin information for the context model of the next symbol / bin.Of the information decoded by the entropy decoding unit 310, information related to prediction is provided to the prediction unit (inter-prediction unit 332 and intra-prediction unit 331), and the residual values obtained by entropy decoding in the entropy decoding unit 310, i.e., quantized conversion coefficients and related parameter information, can be input to the residual processing unit 320. The residual processing unit 320 can derive residual signals (residual blocks, residual samples, residual sample arrays). In addition, of the information decoded by the entropy decoding unit 310, information related to filtering can be provided to the filtering unit 350. On the other hand, a receiving unit (not shown) that receives signals output from the encoding device can be further configured as an internal / external element of the decoding device 300, or the receiving unit is a component of the entropy decoding unit 310. On the other hand, the decoding device relating to this document may be called a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, inverse transform unit 322, adder 340, filtering unit 350, memory 360, inter-prediction unit 332, and intra-prediction unit 331.
[0058] The inverse quantization unit 321 can inverse quantize the quantized transformation coefficients and output the transformation coefficients. The inverse quantization unit 321 can rearrange the quantized transformation coefficients in a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scan order performed by the encoding device. The inverse quantization unit 321 can perform inverse quantization on the quantized transformation coefficients using quantization parameters (e.g., quantization step size information) and obtain the transformation coefficients.
[0059] The inverse transform unit 322 performs an inverse transform on the transformation coefficients to obtain the residual signal (residual block, residual sample array).
[0060] The prediction unit can perform a prediction on the current block and generate a predicted block containing the predicted sample for the current block. Based on the prediction information output from the entropy decoding unit 310, the prediction unit can determine whether intra-prediction or inter-prediction is applied to the current block, and can determine a specific intra / inter-prediction mode.
[0061] The prediction unit 320 can generate prediction signals based on various prediction methods described later. For example, the prediction unit can apply intra-prediction or inter-prediction for prediction of a single block, and can also apply intra-prediction and inter-prediction simultaneously. This can be called combined inter and intra prediction (CIIP). The prediction unit can also be based on an intra-block copy (IBC) prediction mode or a palette mode for prediction of a block. The above IBC prediction mode or palette mode can be used for content image / video coding such as games, for example, as in SCC (Screen Content Coding). IBC basically performs prediction within the current picture, but can be performed similarly to inter-prediction in that it derives reference blocks within the current picture. That is, IBC can utilize at least one of the inter-prediction techniques described in this document. Palette mode can be seen as an example of intra-coding or intra-prediction. When palette mode is applied, information about the palette table and palette index can be included in the above video / image information and signaled.
[0062] The intra-prediction unit 331 can predict the current block by referring to a sample within the current picture. The referenced sample can be located in the vicinity (neighbor) of the current block or at a distance, depending on the prediction mode. In intra-prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. The intra-prediction unit 331 can also determine the prediction mode to be applied to the current block using the prediction modes applied to adjacent blocks.
[0063] The interprediction unit 332 can derive predicted blocks for the current block based on a reference block (reference sample array) identified by motion vectors on a reference picture. In this case, to reduce the amount of motion information transmitted from the interprediction mode, motion information can be predicted in blocks, subblocks, or samples based on the correlation of motion information between adjacent blocks and the current block. The motion information may include motion vectors and reference picture indices. The motion information may further include interprediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of interprediction, adjacent blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the interprediction unit 332 can construct a motion information candidate list based on adjacent blocks and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Interprediction can be performed based on various prediction modes, and the prediction information may include information indicating the mode of interprediction for the current block.
[0064] The summing unit 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to the predicted signal (predicted block, predicted sample array) output from the prediction unit (including the inter-prediction unit 332 and / or intra-prediction unit 331). If there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as the reconstructed block.
[0065] The summing unit 340 may be called the restoration unit or restoration block generation unit. The generated restoration signal can be used for intra-prediction of the next block to be processed in the current picture, and can be output after filtering as described later, or it can be used for intra-prediction of the next picture.
[0066] On the other hand, LMCS (Luma Mapping with Chroma Scaling) can also be applied during the picture decoding process.
[0067] The filtering unit 350 can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit 350 can apply various filtering methods to the restored picture to generate a modified restored picture, and can transmit the modified restored picture to the memory 360, specifically to the DPB of the memory 360. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, and bilateral filter.
[0068] The restored picture stored (modified) in the DPB of memory 360 can be used as a reference picture by the inter-prediction unit 332. Memory 360 can store motion information of blocks from which motion information in the current picture has been derived (or decoded) and / or motion information of blocks in already restored pictures. The stored motion information can be transmitted to the inter-prediction unit 260 for use as motion information of spatially adjacent blocks or motion information of temporally adjacent blocks. Memory 360 can store restored samples of restored blocks in the current picture and transmit them to the intra-prediction unit 331.
[0069] In this specification, the embodiments described for the filtering unit 260, inter-prediction unit 221, and intra-prediction unit 222 of the encoding device 200 can be applied identically or in a corresponding manner to the filtering unit 350, inter-prediction unit 332, and intra-prediction unit 331 of the decoding device 300, respectively.
[0070] In this document, at least one of quantization / inverse quantization and / or transformation / inverse transformation may be omitted. If quantization / inverse quantization is omitted, the quantized transformation coefficients may be called transformation coefficients. If transformation / inverse transformation is omitted, the transformation coefficients may be called coefficients or residual coefficients, or for consistency of expression, they may still be called transformation coefficients.
[0071] In this document, quantized transformation coefficients and transformation coefficients may be referred to as transformation coefficients and scaled transformation coefficients, respectively. In this case, residual information may include information about the transformation coefficient(s), and such information about the transformation coefficient(s) may be signaled via residual coding syntax. Transformation coefficients may be derived based on the residual information (or information about the transformation coefficient(s)), and scaled transformation coefficients may be derived via inverse transformation (scaling) of the transformation coefficient(s). Residual samples may be derived based on inverse transformation (transformation) of the scaled transformation coefficient(s). This can be applied / expressed similarly in other parts of this document.
[0072] As described above, prediction is performed during video coding to improve compression efficiency. Through this, a predicted block containing predicted samples can be generated for the current block, which is the block to be coded. Here, the predicted block contains predicted samples in the spatial domain (or pixel domain). The predicted block is derived identically by the encoding device and the decoding device, and the encoding device can improve image coding efficiency by signaling the decoding device information about the residuals between the original block and the predicted block (residual information), which is not the original sample value of the original block itself. The decoding device can derive a residual block containing residual samples based on the residual information, and can generate a restored block containing restored samples by combining the residual block and the predicted block, and can generate a restored picture containing the restored block.
[0073] The residual information described above can be generated through transformation and quantization procedures. For example, an encoding device can derive a residual block between the original block and the predicted block, perform a transformation procedure on the residual samples (residual sample array) contained in the residual block to derive transformation coefficients, perform a quantization procedure on the transformation coefficients to derive quantized transformation coefficients, and signal the relevant residual information to a decoding device (via a bitstream). Here, the residual information may include information such as the value information, position information, transformation technique, transformation kernel, and quantization parameters of the quantized transformation coefficients. The decoding device can perform an inverse quantization / inverse transformation procedure based on the residual information to derive residual samples (or residual blocks). The decoding device can generate a reconstructed picture based on the predicted block and the residual block. The encoding device can further derive a residual block by inverse quantization / inverse transformation of the quantized transformation coefficients for reference for subsequent interpretation of pictures, and generate a reconstructed picture based on this.
[0074] When inter-prediction is applied, the prediction unit of the encoding / decoding device can perform inter-prediction on a block-by-block basis to derive predicted samples. Inter-prediction can represent a prediction derived in a manner that is dependent on data elements (e.g., sample values or motion information) of picture(s) other than the current picture. When inter-prediction is applied to the current block, a predicted block (predicted sample array) for the current block can be derived based on a reference block (reference sample array) identified by motion vectors on the reference picture pointed to by the reference picture index. In this case, in order to reduce the amount of motion information transmitted in inter-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 surrounding blocks and the current block. The motion information may include motion vectors and reference picture indexes. The motion information may further include inter-prediction type information (e.g., L0 prediction, L1 prediction, Bi prediction). When interpretation is applied, a neighboring block may include a spatial neighboring block that exists within the current picture and a temporal neighboring block that exists within the reference picture. The reference picture containing the above reference block and the reference picture containing the above temporal neighboring block may be the same or different. The above temporal neighboring block may be called a collocated reference block or collocated CU (colCU), and the reference picture containing the above temporal neighboring block may also be called a collocated picture (colPic).For example, a list of motion information candidates may be constructed based on the surrounding blocks of the current block, and flags or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled. Interpretation can be performed based on various prediction modes; for example, in skip mode and merge mode, the motion information of the current block may be the same as the motion information of the selected surrounding blocks. In skip mode, unlike merge mode, a residual signal may not be transmitted. In Motion Vector Prediction (MVP) mode, the motion vector of the selected surrounding block is used as a motion vector predictor, and the motion vector difference may be signaled. In this case, the motion vector of the current block can be derived using the sum of the motion vector predictor and the motion vector difference.
[0075] The above motion information may include L0 motion information and / or L1 motion information depending on the interpretation type (L0 prediction, L1 prediction, Bi prediction, etc.). A motion vector in the L0 direction may be called an L0 motion vector or MVL0, and a motion vector in the L1 direction may be called an L1 motion vector or MVL1. A prediction based on an L0 motion vector may be called an L0 prediction, a prediction based on an L1 motion vector may be called an L1 prediction, and a prediction based on both the above L0 motion vector and the above L1 motion vector may be called a paired (Bi) prediction. Here, an L0 motion vector may represent a motion vector associated with a reference picture list L0 (L0), and an L1 motion vector may represent a motion vector associated with a reference picture list L1 (L1). A reference picture list L0 may contain pictures that are earlier (before) the current picture in terms of output order, and a reference picture list L1 may contain pictures that are later (after) the current picture in terms of output order. Pictures prior to the above can be called forward (reference) pictures, and pictures after the above can be called reverse (reference) pictures. The above reference picture list L0 can further include pictures that are in the output order after the above current picture as reference pictures. In this case, the above earlier pictures can be indexed first in the above reference picture list L0, and the above later pictures can be indexed next. The above reference picture list L1 can further include pictures that are in the output order before the above current picture as reference pictures. In this case, the above later pictures can be indexed first in the above reference picture list 1 (L1), and the above earlier pictures can be indexed next. Here, the output order can correspond to the POC (Picture Order Count) order.
[0076] A video / image encoding procedure based on interpretation could, in general terms, include the following:
[0077] Figure 4 shows an example of an interpretation-based video / image encoding method.
[0078] The encoding device performs interpretation for the current block (S400). The encoding device derives the interpretation mode and motion information of the current block and can generate prediction samples for the current block. Here, the interpretation mode determination, motion information derivation, and prediction sample generation procedures can be performed simultaneously, and any one procedure can be performed before the others. For example, the interpretation unit of the encoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit can determine the prediction mode for the current block, the motion information derivation unit can derive the motion information of the current block, and the prediction sample derivation unit can derive prediction samples for the current block. For example, the interpretation unit of the encoding device can search for blocks similar to the current block within a certain area (search area) of the reference picture via motion estimation and derive reference blocks whose difference from the current block is the minimum or below a certain standard. Based on this, a reference picture index pointing to the reference picture 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 which of the various prediction modes is applied to the current block. The encoding device can compare the RD costs for the various prediction modes and determine the optimal prediction mode for the current block.
[0079] For example, when skip mode or merge mode is applied to the current block, the encoding device can configure a merge candidate list, as described later, and derive a reference block from among the reference blocks pointed to by the merge candidates included in the merge candidate list, the current block and the reference block whose difference from the current block is the minimum or below a certain standard. In this case, the merge candidate associated with the derived reference block is selected, and merge index information pointing to the selected merge candidate is generated and signaled to the decoding device. The movement information of the current block can be derived using the movement information of the selected merge candidate.
[0080] As another example, when the (A)MVP mode is applied to the current block, the encoding device can configure the (A)MVP candidate list described later, and use the motion vector of the selected mvp candidate from among the mvp (motion vector predictor) candidates included in the (A)MVP candidate list as the mvp of the current block. In this case, for example, the motion vector pointing to the reference block derived by the motion estimation described above can be used as the motion vector of the current block, and the mvp candidate having the motion vector with the smallest difference from the motion vector of the current block can become the selected mvp candidate. The MVD (Motion Vector Difference), which is the difference obtained by subtracting the mvp from the motion vector of the current block, can be derived. In this case, information regarding the MVD can be signaled to the decoding device. Also, when the (A)MVP mode is applied, the value of the reference picture index can be composed of reference picture index information and separately signaled to the decoding device.
[0081] The encoding device can derive the residual sample based on the predicted sample (S410). The encoding device can derive the residual sample by comparing the original sample of the current block with the predicted sample.
[0082] The encoding device encodes image information including prediction information and residual information (S420). The encoding device can output the encoded image information in bitstream format. The prediction information may include prediction mode information (e.g., skip flag, merge flag, or mode index) and motion information as information related to the prediction procedure. The motion information may include candidate selection information (e.g., merge index, mvp flag, or mvp index) which is information for deriving the motion vector. The motion information may also include the MVD information and / or reference picture index information described above. Furthermore, the motion information may include information indicating whether L0 prediction, L1 prediction, or paired (bi) prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantized transformation coefficients for the residual sample.
[0083] The output bitstream can be stored on a (digital) recording medium and transmitted to a decoding device, or it can be transmitted to a decoding device via a network.
[0084] On the other hand, as described above, the encoding device can generate a reconstructed picture (including the reconstructed sample and reconstructed block) based on the reference sample and the residual sample. This is because the encoding device derives the same prediction results as the decoding device, thereby increasing coding efficiency. Therefore, the encoding device can store the reconstructed picture (or reconstructed sample, reconstructed block) in memory and use it as a reference picture for interpretation. As described above, in-loop filtering procedures and the like can be further applied to the reconstructed picture.
[0085] A video / image decoding procedure based on interpretation may, in general, include the following:
[0086] Figure 5 shows an example of an interpretation-based video / image decoding method.
[0087] As shown in Figure 5, the decoding device can perform operations corresponding to those performed by the encoding device. Based on the received prediction information, the decoding device can make predictions for the current block and derive prediction samples.
[0088] Specifically, the decoding device can determine the prediction mode for the current block based on the received prediction information (S500). The decoding device can determine which inter-prediction mode is applied to the current block based on the prediction mode information within the prediction information.
[0089] For example, based on the merge flag, it can be determined whether the merge mode described above is applied to the current block, or whether the (A)MVP mode is determined. Alternatively, one of several inter-prediction mode candidates can be selected based on the mode index described above. These inter-prediction mode candidates may include skip mode, merge mode, and / or (A)MVP mode, or may include the various inter-prediction modes described later.
[0090] The decoding device derives motion information for the current block based on the determined interpretation mode (S510). For example, if a skip mode or merge mode is applied to the current block, the decoding device can configure a merge candidate list, as described later, and select one merge candidate from among the merge candidates included in the merge candidate list. This selection can be made based on the selection information (merge index) described above. The motion information for the current block can be derived using the motion information for the selected merge candidate. The motion information for the selected merge candidate can be used as the motion information for the current block.
[0091] As another example, when the (A)MVP mode is applied to the current block, the decoding device can configure the (A)MVP candidate list described later, and use the motion vector of the selected mvp candidate from among the mvp (motion vector predictor) candidates included in the (A)MVP candidate list as the mvp of the current block. The above selection can be made based on the selection information (mvp flag or mvp index) described above. In this case, the MVD of the current block can be derived based on the information about the MVD, and the motion vector of the current block can be derived based on the mvp of the current block and the MVD. In addition, the reference picture index of the current block can be derived based on the reference picture index information. In the reference picture list for the current block, the picture pointed to by the reference picture index can be derived as the reference picture referenced for interpretation of the current block.
[0092] On the other hand, as will be described later, the movement information of the current block can be derived without constructing a candidate list, and in this case, the movement information of the current block can be derived by the procedure disclosed in the prediction mode described later. In this case, the candidate list construction described above can be omitted.
[0093] The decoding device can generate predicted samples for the current block based on the motion information of the current block (S520). In this case, the reference picture can be derived based on the reference picture index of the current block, and the predicted samples for the current block can be derived using the sample of the reference block pointed to by the motion vector of the current block on the reference picture. In this case, as will be described later, a further prediction sample filtering procedure may be performed on all or some of the predicted samples for the current block.
[0094] For example, the interpretation 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 determines the prediction mode for the current block based on the prediction mode information received, the motion information derivation unit derives motion information (such as motion vectors and / or reference picture indices) for the current block based on the motion information received, and the prediction sample derivation unit derives prediction samples for the current block.
[0095] The decoding device generates a residual sample for the current block based on the received residual information (S530). The decoding device generates a reconstructed sample for the current block based on the predicted sample and the residual sample, and can generate a reconstructed picture based on this (S540). As described above, in-loop filtering procedures and the like may be further applied to the reconstructed picture thereafter.
[0096] Figure 6 illustrates the interpretation prediction procedure.
[0097] Referring to Figure 6, as described above, the interpretation procedure may include an interpretation mode determination step, a motion information derivation step based on the determined prediction mode, and a prediction execution (prediction sample generation) step based on the derived motion information. The above interpretation procedure may be performed by an encoding device and a decoding device, as described above. In this document, the coding device may include an encoding device and / or a decoding device.
[0098] As shown in Figure 6, the coding device determines the interpretation mode for the current block (S600). Various interpretation modes can be used to predict the current block in the picture. For example, various modes can be used, such as merge mode, skip mode, MVP (Motion Vector Prediction) mode, affine mode, subblock merge mode, and MMVD (Merge with MVD) mode. DMVR (Decoder side Motion Vector Refinement) mode, AMVR (Adaptive Motion Vector Resolution) mode, Bi-prediction with CU-level Weight (BCW), and Bi-Directional Optical Flow (BDOF) can be used as additional or alternative modes. The affine mode can also be called the affine motion prediction mode. The MVP mode can also be called the AMVP (Advanced Motion Vector Prediction) mode. In this document, motion information candidates derived by some modes and / or some modes may also be included as one of the motion information related candidates for other modes. For example, an HMVP candidate can be added as a merge candidate in the merge / skip mode described above, or as an MVP candidate in the MVP mode described above. When the HMVP candidate is used as a motion information candidate in the merge mode or skip mode described above, the HMVP candidate can be called an HMVP merge candidate.
[0099] Prediction mode information indicating the inter-prediction mode of the current block can be signaled from the encoding device to the decoding device. 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-prediction mode can be indicated via hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, a skip flag may be signaled to indicate whether a skip mode can be applied, and if the skip mode is not applied, a merge flag may be signaled to indicate whether a merge mode can be applied, and if the merge mode is not applied, it may indicate that the MVP mode should be applied, or flags for additional distinctions may be further signaled. Affine modes can be signaled as independent modes, or as modes dependent on merge modes or MVP modes, etc. For example, affine modes may include affine merge mode and affine MVP mode.
[0100] The coding device derives motion information for the current block (S610). The motion information can be derived based on the inter-prediction mode.
[0101] The coding device can perform interpretation using motion information of the current block. The encoding device can derive optimal motion information for the current block through a motion estimation procedure. For example, the encoding device can use the original block in the original picture for the current block to search for a highly correlated similar reference block in fractional (fractional) pixel units within a defined search range in the reference picture, thereby deriving motion information. Block similarity can be derived based on the difference in phase-based sample values. For example, block similarity can be calculated based on the SAD between the current block (or the template of the current block) and the reference block (or the template of the reference block). In this case, motion information can be derived based on the reference block with the smallest SAD in the search space. The derived motion information can be signaled to the decoding device in various ways based on the interpretation mode.
[0102] The coding device performs inter prediction based on the motion information for the current block (S620). The coding device can derive one or more predicted samples for the current block based on the motion information. The current block containing the predicted samples can be called a predicted block.
[0103] On the other hand, as mentioned above, encoding devices can perform a variety of encoding methods, such as exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding). Decoding devices can decode (decode) information within a bitstream based on coding methods such as exponential Golomb coding, CAVLC, or CABAC, and output the values of syntax elements necessary for image reconstruction, quantized values of transformation coefficients related to residuals, and so on.
[0104] For example, the coding methods described above can be implemented as described later.
[0105] Figure 7 illustrates CABAC (Context-Adaptive Binary Arithmetic Coding) for encoding syntax elements. For example, in the CABAC encoding process, if the input signal is a syntax element that is not a binary value, the encoding device can convert the input signal to a binary value by binaryizing the value of the input signal. If the input signal is already a binary value (i.e., the value of the input signal is a binary value), binaryization is not performed and the process can be bypassed. Here, each binary digit 0 or 1 that makes up the binary value can be called a bin. For example, if the binary string after binaryization is 110, then 1, 1, and 0 are each called one bin. The bin(s) for a syntax element can represent the value of the syntax element.
[0106] Subsequently, the binary-encoded bins of the above syntax elements can be input as a regular encoding engine or a bypass encoding engine. The encoding device's regular encoding engine can assign a context model that reflects probability values to the bin and encode the bin based on the assigned context model. After encoding each bin, the encoding device's regular encoding engine can update the context model for that bin. The bins encoded as described above can be referred to as context-coded bins.
[0107] On the other hand, when binary-evolved bins of the above syntax elements are input to the bypass encoding engine, they can be coded as follows. For example, the bypass encoding engine of the encoding device omits the steps of estimating probabilities for the input bins and updating the probability model applied to the bins after encoding. When bypass encoding is applied, the encoding device can encode the input bins by applying a uniform probability distribution instead of assigning a context model, thereby improving the encoding speed. Bins encoded as described above can be referred to as bypass bins.
[0108] Entropy decoding can be described as a process that performs the same steps as entropy coding described above, but in reverse order.
[0109] For example, if a syntax element is decoded 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 decoding information of the syntax element and the block to be decoded or surrounding blocks, or the symbol / bin information decoded in a previous step, predict the probability of the received bin occurring based on the determined context model, and derive the value of the syntax element by performing arithmetic decoding of the bin. Subsequently, the context model of the next bin to be decoded may be updated in the determined context model.
[0110] Furthermore, for example, if a syntax element is bypass-decoded, the decoding device can receive the bins corresponding to the syntax element via the bitstream and decode the input bins by applying a uniform probability distribution. In this case, the decoding device can omit the steps of deriving the context model of the syntax element and updating the context model applied to the bins after decoding.
[0111] As described above, residual samples can be derived as quantized transformation coefficients through a transformation and quantization process. These quantized transformation coefficients can also be called transformation coefficients. In this case, the transformation coefficients within a block can be signaled in the form of residual information. This residual information can include residual coding syntax. That is, an encoding device can construct residual coding syntax as residual information, encode it, and output it in bitstream form, and a decoding device can decode the residual coding syntax from the bitstream to derive residual (quantized) transformation coefficients. As will be described later, this residual coding syntax can include syntax elements that indicate whether a transformation was applied to the block, where the last effective transformation coefficient in the block is located, whether effective transformation coefficients exist in subblocks, and the magnitude / sign of the effective transformation coefficients.
[0112] For example, the syntax elements related to encoding / decoding residual data can be represented as shown in the following table.
[0113] [Table 1-1]
[0114] [Table 1-2]
[0115] [Table 1-3]
[0116] The `transform_skip_flag` indicates whether a transformation is skipped in the associated block. The `transform_skip_flag` can be a syntax element of the transformation skip flag. The associated block can be a CB (Coding Block) or a TB (Transform Block). CBs and TBs can be used interchangeably with respect to transformation (and quantization) and residual coding procedures. For example, residual samples can be derived from a CB, and (quantized) transformation coefficients can be derived through transformation and quantization of these residual samples. Information (e.g., syntax elements) that efficiently represents the position, magnitude, and sign of these (quantized) transformation coefficients can be generated and signaled through the residual coding procedure. Quantized transformation coefficients can simply be called transformation coefficients. Generally, if a CB is not larger than the maximum TB, the size of the CB can be the same as the size of the TB, in which case the block being transformed (and quantized) and residual coded can be called either a CB or a TB. On the other hand, if CB is greater than the maximum TB, the target block to be transformed (and quantized) and residual coded can be called TB. Below, we will explain that syntax elements related to residual coding are signaled in units of transformation block TB, but this is an example, and as mentioned above, the above TB can be used interchangeably with the coding block CB.
[0117] On the other hand, the syntax elements that are signaled after the above conversion skip flag is signaled are the same as the syntax elements disclosed in Table 2 and / or Table 3 below, and a specific explanation of the above syntax elements is given below.
[0118] [Table 2-1]
[0119] [Table 2-2]
[0120] [Table 2-3]
[0121] [Table 2-4]
[0122] [Table 2-5]
[0123] [Table 2-6]
[0124] [Table 3-1]
[0125] [Table 3-2]
[0126] [Table 3-3]
[0127] According to this embodiment, as shown in Table 1, residual coding can be branched depending 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 transform skipping is available). The residual coding used when transform skipping is not applied (i.e., when a transformation is applied) may be called Regular Residual Coding (RRC), and the residual coding when transform skipping is applied (i.e., when a transformation is not applied) may be called Transform Skip Residual Coding (TSRC). The above Regular Residual Coding may also be called General Residual Coding. The above Regular Residual Coding may also be called General Residual Coding. The above Regular Residual Coding may also be called the Syntax Structure of Regular Residual Coding, and the above Transform Skip Residual Coding may also be called the Syntax Structure of Transform Skip Residual Coding. Table 2 above may represent the syntax elements of residual coding when the value of transform_skip_flag is 0, i.e., when a transformation is applied, and Table 3 may represent the syntax elements of residual coding when the value of transform_skip_flag is 1, i.e., when a transformation is not applied.
[0128] Specifically, for example, a conversion skip flag indicating whether conversion skipping is available for a conversion block may be purged, and it can be determined whether the conversion skip flag is 1. If the value of the conversion skip flag is 0, 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 related to the residual coefficients of the conversion block may be purged, as shown in Table 2, and the residual coefficients may be derived based on the syntax elements. In this case, the syntax elements may be purged sequentially, or the order of purging may be changed. Furthermore, the above abs_level_gtx_flag may represent abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n][0] may be an example of the first conversion coefficient level flag (abs_level_gt1_flag), and abs_level_gtx_flag[n][1] may be an example of the second conversion coefficient level flag (abs_level_gt3_flag).
[0129] 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. On the other hand, sb_coded_flag can also be represented as coded_sub_block_flag.
[0130] In one embodiment, the encoding device can encode the (x, y) position information of the last non-zero conversion coefficient in the conversion 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 significant coefficient in the scanning order within the transformation block, last_sig_coeff_y_prefix represents the prefix of the row position of the last significant coefficient in the scanning order within the transformation block, last_sig_coeff_x_suffix represents the suffix of the column position of the last significant coefficient in the scanning order within the transformation block, and last_sig_coeff_y_suffix represents the row position of the last significant coefficient in the scanning order within the transformation block. This represents the suffix of the position. Here, the effective coefficient can represent the non-zero coefficient mentioned above. The scan order can be the upper right diagonal scan order. Alternatively, the scan order can be the horizontal scan order or the vertical scan order. The scan order can be determined based on whether intra / inter prediction is applied to the target block (CB, or CB including TB) and / or the specific intra / inter prediction mode.
[0131] Next, the encoding device divides the above conversion block into 4x4 sub-blocks, and then uses a 1-bit syntax element, coded_sub_block_flag, for each 4x4 sub-block to indicate whether or not a non-zero coefficient exists within the current sub-block.
[0132] If the value of coded_sub_block_flag is 0, there is no more information to transmit, and the encoding device can terminate the encoding process for the current subblock. Conversely, if the value of coded_sub_block_flag is 1, the encoding device can continue the encoding process for sig_coeff_flag. Subblocks containing the last non-zero coefficient do not require encoding of coded_sub_block_flag, and subblocks containing DC information of the transform block have a high probability of containing a non-zero coefficient, so coded_sub_block_flag can be assumed to have a value of 1 without being encoded.
[0133] If the value of coded_sub_block_flag is 1 and it is determined that a non-zero coefficient exists in the current subblock, the encoding device can encode sig_coeff_flag, which has a binary value, according to the reverse scanning order. The encoding device can encode a 1-bit syntax element sig_coeff_flag for each conversion coefficient according to the scan order. If the value of the conversion coefficient at the current scan position is not 0, the value of sig_coeff_flag can be 1. Here, in the case of a subblock containing the last non-zero coefficient, the encoding process for the last non-zero coefficient does not need to be encoded, so the encoding process for the above subblock may be omitted. Level information encoding can only be performed if sig_coeff_flag is 1, and four syntax elements may be used in the level information encoding process. More specifically, each sig_coeff_flag[xC][yC] can represent whether the level (value) of the conversion coefficient at each conversion coefficient position (xC, yC) in the current TB is non-zero. In one embodiment, the above sig_coeff_flag can be an example of a syntax element for an effectiveness coefficient flag that indicates whether the quantized conversion coefficient is an effective coefficient that is not zero.
[0134] The remaining level value after encoding for sig_coeff_flag can be derived as shown in the following formula. That is, the syntax element remAbsLevel, which represents the level value to be encoded, can be derived as shown in the following formula.
[0135] <Formula 1>
number
[0136] Here, coeff represents the actual conversion coefficient value.
[0137] Furthermore, abs_level_gt1_flag may indicate whether the remAbsLevel at the given scan position (n) is greater than 1. For example, if the value of abs_level_gt1_flag is 0, the absolute value of the conversion coefficient at that position may be 1. Also, if the value of abs_level_gt1_flag is 1, the remAbsLevel, which represents the level value to be encoded thereafter, can be updated as shown in the following formula.
[0138] <Formula 2>
number
[0139] Furthermore, the least significant coefficient (LSB) value of remAbsLevel described in equation 2 above can be encoded via par_level_flag as shown in equation 3 below.
[0140] <Formula 3>
number
[0141] Here, par_level_flag[n] may represent the parity of the conversion coefficient level (value) at scan position n.
[0142] The level value of the conversion coefficient to be encoded after encoding par_leve_flag, remAbsLevel, can be updated as shown in the following formula.
[0143] <Formula 4>
number
[0144] abs_level_gt3_flag may indicate whether the remAbsLevel at the given scan position (n) is greater than 3. Encoding for abs_remainder can only be performed if abs_level_gt3_flag is 1. The relationship between the actual conversion coefficient value, coeff, and each syntax element is given by the following formula.
[0145] <Formula 5>
number
[0146] The following table also shows an example related to the aforementioned formula 5.
[0147] [Table 4]
[0148] Here, |coeff| represents the level (value) of the conversion coefficient, and is sometimes written as AbsLevel for the conversion coefficient. Furthermore, the sign of each coefficient can be encoded using the 1-bit symbol coeff_sign_flag.
[0149] Furthermore, for example, if the value of the above conversion skip flag is 1, the syntax elements sb_coded_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag, par_level_flag and / or abs_remainder relating to the residual coefficients of the conversion block may be purged, as shown in Table 3, and the residual coefficients may be derived based on the above syntax elements. In this case, the above syntax elements may be purged sequentially, or the order of purging may be changed. Also, the above abs_level_gtx_flag may represent abs_level_gt1_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag and / or abs_level_gt9_flag. For example, abs_level_gtx_flag[n][j] may be a flag indicating whether the absolute value or level (value) of the conversion coefficient is greater than (j<<1)+1 at scan position n. The above (j<<1)+1 may be replaced by a predetermined threshold, such as a first threshold (critical value) or a second threshold, depending on the case.
[0150] On the other hand, while CABAC offers high performance, it suffers from poor throughput. This is due to CABAC's canonical encoding engine, which uses updated stochastic states and ranges via the encoding of previous bins, resulting in high data dependency and potentially long processing times to read the stochastic intervals and determine the current state. CABAC's throughput problem can be solved by limiting the number of context-coded bins. For example, as shown in Table 2 above, the sum of bins used to represent sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag can be limited to a number determined by the size of the block. Furthermore, as shown in Table 3 above, for example, the sum of the bins used to represent sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and abs_level_gt9_flag may be limited to the number of bins determined by the size of the block. For example, if the block is a 4x4 block, the sum of bins for sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag or sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag may be limited to 32 (or, for example, 28), and if the block is a 2x2 block, the sum of bins for sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag may be limited to 8 (or, for example, 7).The limited number of bins mentioned above can be represented by remBinsPass1 or RemCcbs. Alternatively, for example, to achieve higher CABAC throughput, the number of context coded bins may be limited for a block (CB or TB) containing the CG being coded. In other words, the number of context coded bins may be limited per block (CB or TB). For example, if the current block size is 16x16, the number of context coded bins for the current block may be limited to 1.75 times the number of pixels in the current block, i.e., 448, regardless of the current CG.
[0151] In this case, if the encoding device has used all the context-coded bins limited to encoding context elements, it can bypass coding by binary-coding the remaining coefficients through the binary-coding method for the coefficients described later, without using context coding. In other words, for example, if the number of context-coded bins coded for a 4x4 CG is 32 (or, for example, 28), or if the number of context-coded bins coded for a 2x2 CG is 8 (or, for example, 7), then any further sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag coded in context-coded bins may not be coded and can be immediately coded with dec_abs_level. Alternatively, for example, if the number of context-coded bins coded for a 4x4 block is limited to 1.75 times the total number of pixels in the block, i.e., 28, then sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag that would otherwise be coded in context-coded bins may not be coded at all and can instead be immediately coded in dec_abs_level, as shown in Table 5 below.
[0152] [Table 5]
[0153] The |coeff| value can be derived based on dec_abs_level. In this case, the conversion coefficient value |coeff| can be derived as shown in the following formula.
[0154] <Formula 6>
number
[0155] Furthermore, the above coeff_sign_flag indicates the sign of the conversion coefficient level at the scan position (n). In other words, the above coeff_sign_flag indicates the sign of the conversion coefficient at the scan position (n).
[0156] Figure 8 shows an example of conversion coefficients within a 4x4 block.
[0157] The 4x4 block in Figure 8 shows an example of quantized coefficients. The block shown in Figure 8 may be a 4x4 transformation block or a 4x4 subblock of an 8x8, 16x16, 32x32, or 64x64 transformation block. The 4x4 block in Figure 8 represents a luma block or a chroma block.
[0158] On the other hand, as described above, if the input signal is a syntax element that is not a binary value, the encoding device can convert the input signal into a binary value by binaryizing the value of the input signal. The decoding device can decode the syntax element to derive the binaryized value of the syntax element (i.e., the binaryized bin), and can then de-binaryize the binaryized value to derive the value of the syntax element. The binaryization process can be carried out using methods such as the truncated rice (TR) binary process, the k-th order Exp-Golomb (EGk) binary process, the k-th order Limited Exp-Golomb (EGk) binary process, or the fixed-length (FL) binary process, as described later. Furthermore, the inverse binary evolution process can represent the process of deriving the value of the syntax element by being performed based on the TR binary evolution process, the EGk binary evolution process, or the FL binary evolution process.
[0159] For example, the above TR binary evolution process can be carried out as follows.
[0160] The input to the above TR binary process can be a request for the TR binary and cMax and cRiceParam for the syntax element. The output to the above TR binary process can be the TR binary for the value symbolVal corresponding to the binstring.
[0161] Specifically, as an example, if a suffix binstring exists for a syntax element, the TR binstring for that syntax element can be a concatenation of a prefix binstring and a suffix binstring. If the suffix binstring does not exist, the TR binstring for the syntax element can be the prefix binstring. For example, the prefix binstring can be derived as described later.
[0162] The prefix value of symbolVal for the above syntax element can be derived as shown in the following formula.
[0163] <Formula 7>
number
[0164] Here, prefixVal can represent the prefix value of symbolVal above. The prefix of the TR binstring of the syntax element above (i.e., the prefix binstring) can be derived as described later.
[0165] For example, if the above prefixVal is less than cMax>>cRiceParam, the prefix binstring can be a bit string of length prefixVal+1 that is indexed by binIdx. That is, if the above prefixVal is less than cMax>>cRiceParam, the above prefix binstring can be a bit string of prefixVal+1 bits pointed to by binIdx. The bin for a binIdx smaller than prefixVal can be the same as 1. Also, the bin for a binIdx that is the same as prefixVal can be the same as 0.
[0166] For example, the bin string derived by unary binarization for the above prefixVal can be as follows in the following table.
[0167] [Table 6]
[0168] On the other hand, when the above prefixVal is not less than cMax >> cRiceParam, the prefix bit string can be a bit string with a length of cMax >> cRiceParam and all bits being 1.
[0169] Also, when cMax is greater than symbolVal and cRiceParam is greater than 0, a suffix bit string of the TR bin string may exist. For example, the above suffix bit string can be derived as described later.
[0170] The suffix value of the above symbolVal for the above syntax element can be derived as in the following formula.
[0171] <Formula 8> [Number]
[0172] Here, suffixVal can represent the suffix value of the above symbolVal.
[0173] The suffix of the TR bin string (that is, the suffix bit string) can be derived based on the FL binarization process for suffixVal where the cMax value is (1 << cRiceParam) - 1.
[0174] On the other hand, if the value of the input parameter cRiceParam is 0, the above TR binarization can be a precisely truncated unary binarization, and the same cMax value as the maximum possible value of the syntax element being decoded can always be used.
[0175] Furthermore, for example, the above EGk binary evolution process can be carried out as follows: A syntax element coded with ue(v) can be a syntax element coded with Exp-Golomb.
[0176] As an example, the 0th-order Exp-Golomb (EG0) binary evolution process can be carried out as follows:
[0177] The parsing process for the above syntax element can begin by reading the bits containing the first non-zero bit, starting from the current position of the bitstream, and counting the number of leading bits, such as zero. The above process can be represented as shown in the following table.
[0178] [Table 7]
[0179] Furthermore, the variable codeNum can be derived as shown in the following formula.
[0180] <Formula 9>
number
[0181] Here, the value returned by read_bits(leadingZeroBits), that is, the value represented by read_bits(leadingZeroBits), can be interpreted as the binary representation of the unsigned integer for the most significant bit (most significant bit) recorded first.
[0182] The structure of the Exp-Golomb code, which separates the bit string into "prefix" bits and "suffix" bits, can be represented as shown in the following table.
[0183] [Table 8]
[0184] The "prefix" bits are the bits purged as described above for the leadingZeroBits calculation and can be represented as 0 or 1 in the bit string in Table 8. That is, any bit string starting with 0 or 1 in Table 8 above can represent the prefix bit string. The "suffix" bits are the bits purged in the codeNum calculation and can be represented as xi in Table 8 above. That is, any bit string starting with xi in Table 8 above can represent the suffix bit string, where i can be a value in the range of 0 to LeadingZeroBits-1, and each xi can be identical to 0 or 1.
[0185] The bit strings assigned to the above codeNum are as follows:
[0186] [Table 9]
[0187] If the descriptor of a syntax element is ue(v), that is, if the syntax element is coded with ue(v), then the value of the syntax element can be the same as codeNum.
[0188] Furthermore, for example, the above EGk binary evolution process can be carried out as follows.
[0189] The input to the above EGk binary process can be a request for EGk binary. The output of the above EGk binary process can be an EGk binary for the value symbolVal corresponding to the binstring.
[0190] The bitstring of the EGk binary evolution process for symbolVal can be derived as follows:
[0191] [Table 10]
[0192] Referring to Table 10 above, the binary value X can be appended to the end of the binstring via each call to put(x), where x can be 0 or 1.
[0193] Furthermore, for example, the Limited EGk binary evolution process described above can be carried out as follows.
[0194] The input to the above Limited EGk binary process can be the requirements and rice parameters for the Limited EGk binary, log2TransformRange which is a variable representing the binary logarithm of the maximum value, and maxPreExtLen which is a variable representing the maximum prefix extension length. The output to the above Limited EGk binary process can be the Limited EGk binary for the value symbolVal which corresponds to the binstring.
[0195] The bitstring for the Limited EGk binary evolution process for symbolVal can be derived as follows:
[0196] [Table 11]
[0197] Furthermore, for example, the above FL binary evolution process can be carried out as follows.
[0198] The input to the above FL binary process can be the request for the FL binary and the cMax for the syntax element. The output to the above FL binary process can be the FL binary for the value symbolVal corresponding to the binstring.
[0199] FL binary can be constructed using a bitstring having a fixed length of bits for the symbol value symbolVal. Here, the fixed length of bits can be an unsigned integer bitstring. That is, a bitstring for the symbol value symbolVal can be derived by FL binary, and the bit length (i.e., number of bits) of the bitstring can be fixed length.
[0200] For example, the above fixed length can be derived as shown in the following formula.
[0201] <Formula 10>
number
[0202] Indexing for FL binary, such as bins, can be a method that uses values increasing 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.
[0203] On the other hand, for example, the binary evolution process for the syntax element abs_remainder among the residual information described above can be performed as follows.
[0204] The input to the binary evolution process for the above abs_remainder can be the binary evolution request for the syntax element abs_remainder[n], the color component cIdx, and the luma position (x0, y0). The above luma position (x0, y0) can refer to the top-left sample of the current luma transformation block, relative to the top-left luma sample of the picture.
[0205] The output of the binary evolution process for the above abs_remainder can be the binary evolution of the above abs_remainder (i.e., the binary evolution of the above abs_remainder's binstring). The above binary evolution process can derive the available binstrings for the above abs_remainder.
[0206] The Rice parameter cRiceParam for the above abs_remainder[n] can be derived through a Rice parameter derivation process that takes the above hue component cIdx and luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth (the binary logarithm of the width of the transformation block), and log2TbHeight (the binary logarithm of the height of the transformation block) as inputs. A detailed explanation of the above Rice parameter derivation process will be given later.
[0207] Furthermore, for example, the cMax for the currently coded abs_remainder[n] can be derived based on the above rice parameter cRiceParam. The above cMax can be derived as follows:
[0208] <Formula 11>
number
[0209] On the other hand, the binary evolution for the above abs_remainder, that is, the binstring for the above abs_remainder, can be a concatenation of a prefix binstring and a suffix binstring if a suffix binstring exists. Also, if the above suffix binstring does not exist, the binstring for the above abs_remainder can be the above prefix binstring.
[0210] For example, the above prefix binstring can be derived as described below.
[0211] The prefix value prefixVal of the above abs_remainder[n] can be derived as follows:
[0212] <Formula 12>
number
[0213] The prefix of the binstring in abs_remainder[n] above (i.e., the prefix binstring) can be derived through a TR binary process on prefixVal using cMax and cRiceParam as inputs.
[0214] If the above prefix binstring is identical to a bitstring where all bits are 1 and the bit length is 6, then a suffix binstring of the above binstring in abs_remainder[n] may exist and can be derived as described below.
[0215] The derivation process for the Rice parameter for the above abs_remainder[n] is as follows:
[0216] The inputs to the above Rice parameter derivation process may be the color component index cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the width of the transformation block log2TbWidth, and the binary logarithm of the height of the transformation block log2TbHeight. The above luma position (x0, y0) may refer to the upper-left sample of the current luma transformation block, relative to the upper-left luma sample of the picture. The output of the above Rice parameter derivation process may be the above Rice parameter cRiceParam.
[0217] For example, based on a given component index cIdx and the array AbsLevel[x][y] for a transformation block having the above upper-left luma position (x0, y0), the variable locSumAbs may be derived as shown in the pseudocode disclosed in the following table.
[0218] [Table 12]
[0219] Subsequently, based on the given variable locSumAbs, the above rice parameter cRiceParam can be derived as shown in the following table.
[0220] [Table 13]
[0221] Furthermore, for example, in the process of deriving the Rice parameter for abs_remainder[n], baseLevel can be set to 4.
[0222] Alternatively, the above rice parameter cRiceParam can be determined, for example, based on whether a transform skip is available for the current block. That is, if no transformation is applied to the current TB containing the current CG, in other words, if a transform skip is applied to the current TB containing the current CG, the above rice parameter cRiceParam can be derived to be 1.
[0223] Furthermore, the suffix value (suffixVal) of the above abs_remainder can be derived as shown in the following formula.
[0224] <Formula 13>
number
[0225] The suffix binstring of the above abs_remainder can be derived by the Limited EGk binary evolution process for the above suffixVal, where k is set to cRiceParam+1, riceParam is set to cRiceParam, log2TransformRange is set to 15, and maxPreExtLen is set to 11.
[0226] On one hand, for example, among the above residual information, the binary process for the syntax element dec_abs_level can be performed as follows.
[0227] The input to the binary process for the dec_abs_level can be the requirement for the binary of the syntax element dec_abs_level[n], the hue component (colour component) cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the width of the transform block, i.e., log2TbWidth, and the binary logarithm of the height of the transform block, i.e., log2TbHeight. The above luma position (x0, y0) can refer to the upper left sample of the current luma transform block based on the upper left luma sample of the picture.
[0228] The output of the binary process for the dec_abs_level can be the binary of the dec_abs_level (i.e., the binary bin string of the dec_abs_level). The available bin string for the dec_abs_level can be derived through the above binary process.
[0229] The Rice parameter cRiceParam for the dec_abs_level[n] can be derived through a Rice parameter derivation process that takes the above hue component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the width of the transform block, i.e., log2TbWidth, and the binary logarithm of the height of the transform block, i.e., log2TbHeight as inputs. A specific description of the above Rice parameter derivation process will be described later.
[0230] Also, for example, cMax for the dec_abs_level[n] can be derived based on the above Rice parameter cRiceParam. The cMax can be derived as follows in the following mathematical formula.
[0231] <Equation 14>
Number
[0232] On the other hand, the binary evolution for the above dec_abs_level[n], that is, the bin string for the above dec_abs_level[n] can be the concatenation of the prefix bin string and the suffix bin string if the suffix bin string exists. Also, if the above suffix bin string does not exist, the above bin string for the above dec_abs_level[n] can be the above prefix bin string.
[0233] For example, the above prefix bin string can be derived as described later.
[0234] The prefix value prefixVal of the above dec_abs_level[n] can be derived as in the following equation.
[0235] <Equation 15>
Number
[0236] The prefix of the above bin string of the above dec_abs_level[n] (that is, the prefix bin string) can be derived by the TR binary evolution process for the above prefixVal using the above cMax and the above cRiceParam as inputs.
[0237] If the above prefix bin string is the same as the bit string where all bits are 1 and the bit length is 6, the suffix bin string of the above bin string of the above dec_abs_level[n] may exist and can be derived as described later.
[0238] The process for deriving the Rice parameter for the above dec_abs_level[n] can be as follows:
[0239] The inputs to the above Rice parameter derivation process can be the color component index (cIdx), luma position (x0, y0), current coefficient scan position (xC, yC), the binary logarithm of the width of the transformation block (log2TbWidth), and the binary logarithm of the height of the transformation block (log2TbHeight). The luma position (x0, y0) can refer to the upper-left sample of the current luma transformation block, relative to the upper-left luma sample of the picture. The output of the above Rice parameter derivation process can be the above Rice parameter (cRiceParam).
[0240] For example, based on the array AbsLevel[x][y] for a transformation block having a given component index cIdx and the above upper-left corner position (x0, y0), the variable locSumAbs can be derived as shown in the pseudo code disclosed in the following table.
[0241] [Table 14]
[0242] Subsequently, based on the given variable locSumAbs, the above rice parameter cRiceParam can be derived as shown in the following table.
[0243] [Table 15]
[0244] Also, for example, in the process of deriving the Rice parameter for dec_abs_level[n], baseLevel can be set to 0, and the above ZeroPos[n] can be derived as follows in the following formula.
[0245] <Formula 16> [Number]
[0246] Also, the suffix value suffixVal of the above dec_abs_level[n] can be derived as follows in the following formula.
[0247] <Formula 17> [Number]
[0248] The suffix bit string of the above bin string of dec_abs_level[n] can be derived through the Limited EGk binary evolution process for the above suffixVal where k is set to cRiceParam + 1, truncSuffixLen is set to 15, and maxPreExtLen is set to 11.
[0249] On the other hand, the above-mentioned RRC and TSRC may have the following differences.
[0250] - For example, the rice parameter cRiceParam of the syntax elements abs_remainder[] and dec_abs_level[] in RRC can be derived based on the locSumAbs, look-up table and / or baseLevel as described above, but the rice parameter cRiceParam of the syntax element abs_remainder[] in TSRC can be derived as 1. That is, for example, if a transform skip is applied to the current block (e.g., the current TB), the rice parameter cRiceParam for abs_remainder[] in TSRC for the current block can be derived as 1.
[0251] - Also, for example, referring to Tables 3 and 4, in RRC, abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1] may be signaled, while 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] may be signaled. Here, the above abs_level_gtx_flag[n][0] may be represented as abs_level_gt1_flag or the first coefficient level flag, the above abs_level_gtx_flag[n][1] may be represented as abs_level_gt3_flag or the second coefficient level flag, the above abs_level_gtx_flag[n][2] may be represented as abs_level_gt5_flag or the third coefficient level flag, the above abs_level_gtx_flag[n][3] may be represented as abs_level_gt7_flag or the fourth coefficient level flag, and the above abs_level_gtx_flag[n][4] may be represented as abs_level_gt9_flag or the fifth coefficient level flag. Specifically, the first coefficient level flag may be a flag indicating whether the coefficient level is greater than a first threshold (e.g., 1), the second coefficient level flag may be a flag indicating whether the coefficient level is greater than a second threshold (e.g., 3), the third coefficient level flag may be a flag indicating whether the coefficient level is greater than a third threshold (e.g., 5), the fourth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fourth threshold (e.g., 7), and the fifth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fifth threshold (e.g., 9). As described above, TSRC may, in addition to abs_level_gtx_flag[n][0] and abs_level_gtx_flag[n][1], further include abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3] and abs_level_gtx_flag[n][4] compared to RRC.
[0252] - Also, for example, in RRC the syntax element coeff_sign_flag can be bypass-coded, but in TSRC the syntax element coeff_sign_flag can be bypass-coded or context-coded.
[0253] Furthermore, a dependent quantization can be proposed for the quantization process of residual samples. Dependent quantization can represent a method in which the set of allowed restoration values for the current transformation coefficients depends on the values of the transformation coefficients that precede the current transformation coefficients in the restoration order (values of the transformation coefficient levels). That is, for example, dependent quantization can be realized by (a) defining two other scalar quantizers for the restoration levels, and (b) defining a process for switching between the above scalar quantizers. Compared to existing independent scalar quantization, dependent quantization can have the effect of making the allowed restoration vectors more densely packed in an N-dimensional vector space. Here, N can represent the number of transformation coefficients in the transformation block.
[0254] Figure 9 illustrates scalar quantizers used in dependent quantization. Referring to Figure 9, the position of the available restoration level can be specified by the size of the quantization step Δ. Referring to Figure 9, the scalar quantizers can be represented by Q0 and Q1. The scalar quantizers used can be derived without explicit signaling in the bitstream. For example, the quantizer used for the current transformation coefficient can be determined by the parity of the transformation coefficient level preceding the current transformation coefficient in the coding / restoration order.
[0255] Figure 10 illustrates the state transition and quantizer selection for dependent quantization.
[0256] Referring to Figure 10, the switching between two scalar quantizers (Q0 and Q1) can be realized by a state machine with four states. The four states can have four different values (0, 1, 2, 3). In the coding / reconstruction order, the state for the current transformation coefficient can be determined by the parity of the transformation coefficient levels prior to the current transformation coefficient.
[0257] For example, when the inverse quantization process for a transformation block is initiated, the state for dependent quantization can be set to 0. Subsequently, the transformation coefficients for the above transformation block can be restored in scan order (i.e., the same order as when entropy-decoded). For example, after the current transformation coefficients are restored, the state for dependent quantization can be updated as shown in Figure 10. In the above scan order, the inverse quantization process for the transformation coefficients restored after the current transformation coefficients are restored can be performed based on the updated state. k in Figure 10 can represent the value of the transformation coefficient, i.e., the level value of the transformation coefficient. For example, if the current state is 0, then if k (value of the current transformation coefficient)&1 is 0, the state can be updated to 0, and if k&1 is 1, the state can be updated to 2. Also, for example, if the current state is 1, then if k&1 is 0, the state can be updated to 2, and if k&1 is 1, the state can be updated to 0. Furthermore, for example, if the current state is 2, then if k&1 is 0, the state can be updated to 1, and if k&1 is 1, the state can be updated to 3. Also, for example, if the current state is 3, then if k&1 is 0, the state can be updated to 3, and if k&1 is 1, the state can be updated to 1. Referring to Figure 10, if the state is one of 0 and 1, the scalar quantizer used in the inverse quantization process can be Q0, and if the state is one of 2 and 3, the scalar quantizer used in the inverse quantization process can be Q1. The transformation coefficients can be inverse quantized with the scalar quantizer for the current state based on the quantization parameter for the restoration level of the transformation coefficients.
[0258] On the other hand, this document proposes embodiments related to residual data coding. The embodiments described herein may be combined with each other. As mentioned above, residual data coding methods may include Regular Residual Coding (RRC) and Transform Skip Residual Coding (TSRC).
[0259] Of the two methods described above, the method for coding residual data for the current block can be determined based on the values of transform_skip_flag and sh_ts_residual_coding_disabled_flag, as shown in Table 1. Here, the syntax element sh_ts_residual_coding_disabled_flag may indicate whether the above TSRC is available. Therefore, even if the above transform_skip_flag indicates that the transformation will be skipped, if sh_ts_residual_coding_disabled_flag indicates that the above TSRC is not available, the syntax element with RRC may be signaled for the transformation skip block. That is, if the value of transform_skip_flag is 0 or the value of slice_ts_residual_coding_disabled_flag is 1, RRC may be used, and in other cases, TSRC may be used.
[0260] While the above-mentioned slice_ts_residual_coding_disabled_flag can achieve high coding efficiency in certain applications (e.g., lossless coding), existing video / image coding standards do not propose any constraints when the aforementioned dependent quantization and slice_ts_residual_coding_disabled_flag are used together. In other words, if dependent quantization is activated at a higher level (e.g., SPS (Sequence Parameter Set) syntax / VPS (Video Parameter Set) syntax / DPS (Decoding Parameter Set) syntax / picture header syntax / slice header syntax, etc.) or a lower level (CU / TU), and the above slice_ts_residual_coding_disabled_flag is 1, then the coding performance may degrade due to unnecessary operation (i.e., operation due to dependent quantization) of values that depend on the state of dependent quantization in RRC, or an unintended loss of coding performance may occur due to incorrect settings in the encoding device. Therefore, in this embodiment, dependent quantization and residual coding when slice_ts_residual_coding_disabled_flag=1 (i.e., coding residual samples of transformation skip blocks in the current slice with RRC) are used together, and we propose setting dependencies / constraints between the two techniques to prevent unintended coding losses or malfunctions.
[0261] This document proposes, as one embodiment, a method in which slice_ts_residual_coding_disabled_flag is subordinate to ph_dep_quant_enabled_flag. For example, the syntax elements proposed in this embodiment are as shown in the following table.
[0262] [Table 16]
[0263] According to this embodiment, the slice_ts_residual_coding_disabled_flag may be signaled when the value of the ph_dep_quant_enabled_flag is 0. Here, the ph_dep_quant_enabled_flag may indicate whether dependent quantization is available. For example, if the value of the ph_dep_quant_enabled_flag is 1, the ph_dep_quant_enabled_flag may indicate that dependent quantization is available, and if the value of the ph_dep_quant_enabled_flag is 0, the ph_dep_quant_enabled_flag may indicate that dependent quantization is not available.
[0264] Therefore, according to this embodiment, slice_ts_residual_coding_disabled_flag may be signaled only when dependent quantization is unavailable, and if dependent quantization is available and slice_ts_residual_coding_disabled_flag is not signaled, slice_ts_residual_coding_disabled_flag may be considered 0 (infer). On the other hand, ph_dep_quant_enabled_flag and slice_ts_residual_coding_disabled_flag may be signaled in picture header syntax and / or slice header syntax, or in other higher-level syntax (HLS) (e.g., SPS syntax / VPS syntax / DPS syntax, etc.) or lower-level (CU / TU) syntax that is not picture header syntax and slice header syntax. If the above ph_dep_quant_enabled_flag is signaled using a syntax other than the picture header syntax described above, it may be referred to by a different name. For example, the above ph_dep_quant_enabled_flag may also be represented as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or sps_dep_quant_enabled_flag.
[0265] Furthermore, this document proposes another embodiment that sets a dependency / constraint between dependent quantization and residual coding when slice_ts_residual_coding_disabled_flag=1 (i.e., coding residual samples of transformation skip blocks in the current slice with RRC). For example, this embodiment proposes that, in order to prevent unintended coding losses or malfunctions when dependent quantization and residual coding when slice_ts_residual_coding_disabled_flag=1 are used together (i.e., coding residual samples of transformation skip blocks in the current slice with RRC), the state of dependent quantization is not used in coding the level values of the transformation coefficients when the value of slice_ts_residual_coding_disabled_flag is 1. The syntax of residual coding according to this embodiment is as shown in the following table.
[0266] [Table 17-1]
[0267] [Table 17-2]
[0268] [Table 17-3]
[0269] [Table 17-4]
[0270] [Table 17-5]
[0271] [Table 17-6]
[0272] Referring to Table 17 above, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, a QState can be derived, and based on the above QState, the value of the conversion coefficient (conversion coefficient level) can be derived. For example, referring to Table 17, the above conversion 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 conversion coefficient derived based on the syntax element of the conversion coefficient, coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the conversion coefficient, and (QState>1?1:0) can represent 1 if the value of state QState is greater than 1, i.e., 2 or 3, and 0 if the value of state QState is 1 or less, i.e., 0 or 1.
[0273] Furthermore, referring to Table 17 above, if the value of slice_ts_residual_coding_disabled_flag is 1, the value of the conversion coefficient (conversion coefficient level) can be derived without using the above QState. For example, referring to Table 17, the above conversion 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 conversion coefficient derived based on the syntax element of the conversion coefficient, and coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the conversion coefficient.
[0274] Furthermore, according to this embodiment, if the value of slice_ts_residual_coding_disabled_flag is 1, the dependent quantization state may not be used in coding the level values of the conversion coefficients, and the state update may not be performed. For example, the syntax of residual coding according to this embodiment is as shown in the following table.
[0275] [Table 18-1]
[0276] [Table 18-2]
[0277] [Table 18-3]
[0278] [Table 18-4]
[0279] [Table 18-5]
[0280] [Table 18-6]
[0281] 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 QState may be updated. For example, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, the QState may be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. Also, if the value of slice_ts_residual_coding_disabled_flag is 1, the process of updating the QState may not be performed.
[0282] Furthermore, referring to Table 18 mentioned 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 conversion coefficient (conversion coefficient level) can be derived based on the above QState. For example, referring to Table 18, the above conversion 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 conversion coefficient derived based on the syntax element of the conversion coefficient, coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the conversion coefficient, and (QState>1?1:0) can represent 1 if the value of state QState is greater than 1, i.e., 2 or 3, and 0 if the value of state QState is 1 or less, i.e., 0 or 1.
[0283] Furthermore, referring to Table 18 above, if the value of slice_ts_residual_coding_disabled_flag is 1, the value of the conversion coefficient (conversion coefficient level) can be derived without using the above QState. For example, referring to Table 18, the above conversion 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 conversion coefficient derived based on the syntax element of the conversion coefficient, and coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the conversion coefficient.
[0284] Furthermore, this document proposes another embodiment that sets a dependency / constraint between dependent quantization and residual coding when slice_ts_residual_coding_disabled_flag=1 (i.e., coding residual samples of transform skip blocks in the current slice with RRC). For example, this embodiment proposes adding a constraint using transform_skip_flag to the process of deriving the value of the transform coefficient (transform coefficient level) in the RRC depending on the state update of dependent quantization or the state. That is, this embodiment proposes that, based on the transform_skip_flag, the process of deriving the value of the transform coefficient (transform coefficient level) in the RRC depending on the state update of dependent quantization and / or the state is not used. The syntax of residual coding according to this embodiment is as shown in the following table.
[0285] [Table 19-1]
[0286] [Table 19-2]
[0287] [Table 19-3]
[0288] [Table 19-4]
[0289] [Table 19-5]
[0290] [Table 19-6]
[0291] Referring to Table 19 above, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, the QState may be updated. For example, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, the QState may be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. Also, if the value of transform_skip_flag is 1, the process of updating the QState may not be performed.
[0292] Furthermore, referring to Table 19 mentioned above, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, a QState can be derived, and based on the above QState, the value of the transformation coefficient (transformation coefficient level) can be derived. For example, referring to Table 19, the above transformation 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 conversion coefficient derived based on the syntax element of the conversion coefficient, coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the conversion coefficient, and (QState>1?1:0) can represent 1 if the value of state QState is greater than 1, i.e., 2 or 3, and 0 if the value of state QState is 1 or less, i.e., 0 or 1.
[0293] Furthermore, referring to Table 19 above, if the value of transform_skip_flag is 1, the value of the transformation coefficient (transformation coefficient level) can be derived without using the above QState. Therefore, when residual data is coded by RRC for a transformation skip block, the value of the transformation coefficient can be derived without using Qstate. For example, referring to Table 19, the above transformation coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived by AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transformation coefficient derived based on the syntax element of the transformation coefficient, and coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the transformation coefficient.
[0294] On the other hand, as mentioned above, the information (syntax elements) in the syntax table disclosed in this document may be included in image / video information, configured / encoded by an encoding device, and transmitted to a decoding device in the form of a bitstream. The decoding device can parse / decode the information (syntax elements) in the syntax table. The decoding device can perform block / image / video restoration procedures based on the decoded information.
[0295] Figure 11 schematically shows an image encoding method using an encoding device relating to this document. The method disclosed in Figure 11 can be performed by the encoding device disclosed in Figure 2. Specifically, for example, S1100 in Figure 11 can be performed by the prediction unit of the encoding device, and S1110 to S1160 in Figure 11 can be performed by the entropy encoding unit of the encoding device. Although not shown, the process of deriving residual samples for the current block based on original samples and predicted samples for the current block can be performed by the subtraction unit of the encoding device, and the process of generating restored samples and restored pictures for the current block based on residual samples and predicted samples for the current block can be performed by the addition unit of the encoding device.
[0296] The encoding device derives predicted samples of the current block based on interpretation (S1100). For example, the encoding device can derive the interpretation mode and motion information of the current block and generate predicted samples of the current block. Here, the procedures for determining the interpretation mode, deriving motion information, and generating predicted samples may be performed simultaneously as described above, or any of the procedures may be performed before the others. For example, the encoding device can search for blocks similar to the current block within a certain area (search area) of the reference picture via motion estimation and derive reference blocks whose difference from the current block is the minimum or below a certain standard. Based on this, the encoding device can derive the index of the reference picture that points to the reference picture in which the reference block is located and derive a motion vector based on the positional difference between the reference block and the current block. The encoding device can determine which interpretation mode to apply to the current block from among a variety of interpretation modes. For example, the encoding device can compare the RD costs for the various interpretation modes described above and determine the optimal interpretation mode for the current block.
[0297] For example, the encoding device may construct a list of motion information candidates for the current block, and may derive a reference block from among the reference blocks pointed to by the motion information candidates included in the motion information candidate list whose difference from the current block is the smallest or below a certain standard. In this case, a motion information candidate associated with the derived reference block may be selected, and the motion information of the current block may be derived based on the motion information of the selected motion information candidate.
[0298] The encoding device encodes prediction-related information for the current block (S1110). The image information may include prediction-related information for the current block. For example, the prediction-related information is information related to the prediction procedure and may include prediction mode information and information regarding the motion of the current block. The information regarding the motion may include index information of motion information candidates, which is information for deriving motion vectors. Also, for example, the information regarding the motion may include the aforementioned MVD (Motion Vector Difference, MVD) information and / or index information of a reference picture.
[0299] The encoding device encodes a dependent quantization enabled flag indicating whether dependent quantization is available (S1120). The encoding device can encode a dependent quantization enabled flag indicating whether dependent quantization is available. Image information may include a dependent quantization enabled flag. For example, the encoding device can determine whether dependent quantization is available for a block of pictures in a sequence and encode a dependent quantization enabled flag indicating whether dependent quantization is available. For example, the dependent quantization enabled flag may indicate whether dependent quantization is available for a block of pictures in a sequence. For example, the dependent quantization enabled flag may indicate whether a dependent quantization enabled flag can exist, which indicates whether dependent quantization is used for the current slice. For example, a value of 1 for the dependent quantization enabled flag may indicate that dependent quantization is enabled, and a value of 0 for the dependent quantization enabled flag may indicate that dependent quantization is not enabled. Also, for example, the dependent quantization enabled flag may be signaled in the SPS syntax or slice header syntax. The syntax element of the dependent quantization enabled flag may be the aforementioned sps_dep_quant_enabled_flag. The sps_dep_quant_enabled_flag may be called sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.
[0300] The encoding device encodes a TSRC-enabled flag indicating whether Transform Skip Residual Coding (TSRC) is available, based on the dependent quantization-enabled flag (S1130). The image information may include the TSRC-enabled flag.
[0301] For example, the encoding device can encode the TSRC enabled flag based on the dependent quantization enabled flag. For example, the TSRC enabled flag can be encoded based on the dependent quantization enabled flag, which has a value of 0. That is, for example, if the value of the dependent quantization enabled flag is 0 (i.e., the dependent quantization enabled flag indicates that dependent quantization is not enabled), the TSRC enabled flag can be encoded. In other words, for example, if the value of the dependent quantization enabled flag is 0 (i.e., the dependent quantization enabled flag indicates that dependent quantization is not enabled), the TSRC enabled flag can be signaled. Also, for example, if the value of the dependent quantization enabled flag is 1, the TSRC enabled flag may not be encoded, and the decoding device may derive the value of the TSRC enabled flag as 0. That is, for example, if the value of the dependent quantization enabled flag is 1 (for example, if dependent quantization is applied (or used) to the current block), the TSRC enabled flag may not be signaled, and the decoding device may derive the value of the TSRC enabled flag as 0. Therefore, for example, if dependent quantization is not available to the current block, the TSRC enabled flag may be signaled (or encoded). If dependent quantization is available to the current block, the TSRC enabled flag may not be signaled (or encoded), and the decoding device may derive the value of the TSRC enabled flag as 0. Here, the current block may be a coding block (CB) or a transform block (TB).
[0302] Here, for example, the TSRC enabled flag could be a flag indicating whether TSRC is enabled or disabled. That is, for example, the TSRC enabled flag could be a flag indicating whether TSRC is enabled or disabled for a block in a slice. For example, a value of 1 for the TSRC enabled flag could indicate that TSRC is disabled, and a value of 0 for the TSRC enabled flag could indicate that TSRC is enabled. Also, for example, the TSRC enabled flag could be signaled in the slice header syntax. The syntax element for the TSRC enabled flag could be the aforementioned sh_ts_residual_coding_disabled_flag.
[0303] The encoding device determines the syntax for residual coding for the current block based on the TSRC enabled flag (S1140). The encoding device can determine the syntax for residual coding for the current block based on the TSRC enabled flag. For example, the encoding device can determine the syntax for residual coding for the current block based on the TSRC enabled flag as one of the syntaxes for Regular Residual Coding (RRC) and Transform Skip Residual Coding (TSRC). The RRC syntax may represent syntax using RRC, and the TSRC syntax may represent syntax using TSRC.
[0304] For example, based on the above TSRC enabled flag, which has a value of 1, the syntax for the residual coding for the current block may be determined as the syntax for Regular Residual Coding (RRC). In this case, for example, a transform skip flag indicating whether transform skipping is enabled for the current block may be encoded, and the value of the transform skip flag may be 1. For example, the image information may include a transform skip flag for the current block. The transform skip flag may indicate whether transform skipping is enabled for the current block. That is, the transform skip flag may indicate whether a transformation has been applied to the transformation coefficients of the current block. The syntax element representing the transform skip flag may be the transform_skip_flag mentioned above. For example, if the value of the transform skip flag is 1, the transform skip flag may indicate that no transformation is applied to the current block (i.e., the transformation is skipped), and if the value of the transform skip flag is 0, the transform skip flag may indicate that a transformation is applied to the current block. For example, if the current block is a transform skip block, the value of the transform skip flag for the current block may be 1.
[0305] Furthermore, for example, based on the TSRC enabled flag having a value of 0, the syntax of the residual coding for the current block may be determined as the syntax of Transform Skip Residual Coding (TSRC). Furthermore, for example, a transform skip flag indicating whether transform skipping is enabled for the current block may be encoded, and based on the transform skip flag having a value of 1 and the TSRC enabled flag having a value of 0, the syntax of the residual coding for the current block may be determined as the syntax of Transform Skip Residual Coding (TSRC). Furthermore, for example, a transform skip flag indicating whether transform skipping is enabled for the current block may be encoded, and based on the transform skip flag having a value of 0 and the TSRC enabled flag having a value of 0, the syntax of the residual coding for the current block may be determined as the syntax of Regular Residual Coding (RRC).
[0306] The encoding device encodes residual information of the determined residual coding syntax for the current block (S1150). The encoding device can derive residual samples for the current block and encode residual information of the determined residual coding syntax for the residual samples of the current block. The image information may include residual information.
[0307] For example, the encoding device may derive a residual sample for the current block by subtracting the original sample for the current block from the predicted sample.
[0308] Subsequently, for example, the encoding device can derive the conversion coefficients for the current block based on the residual samples. For example, the encoding device can determine whether a conversion is applied to the current block. That is, the encoding device can determine whether a conversion is applied to the residual samples of the current block. The encoding device can determine whether it is possible to apply a conversion to the current block, taking coding efficiency into consideration. For example, the encoding device can determine that no conversion is applied to the current block. Blocks to which the above conversion is not applied can be represented as conversion-skip blocks. That is, for example, the current block may be a conversion-skip block.
[0309] If no transformation is applied to the current block, i.e., if no transformation is applied to the residual sample, the encoding device may derive the derived residual sample as the transformation coefficient. If a transformation is applied to the current block, i.e., if a transformation is applied to the residual sample, the encoding device may perform a transformation on the residual sample and derive the transformation coefficient. The current block may contain multiple subblocks or coefficient groups (CG). The size of the subblocks of the current block may be 4x4 or 2x2. That is, the subblocks of the current block may contain up to 16 non-zero transformation coefficients or up to 4 non-zero transformation coefficients. Here, the current block may be a coding block (CB) or a transform block (TB). The transform coefficient may also be expressed as a residual coefficient.
[0310] On the other hand, the encoding device can determine whether dependent quantization is applied to the current block. For example, if dependent quantization is applied to the current block, the encoding device can perform the dependent quantization process on the transformation coefficients and derive the transformation coefficients of the current block. For example, if dependent quantization is applied to the current block, the encoding device can update the state (Qstate) for dependent quantization based on the coefficient level of the transformation coefficient immediately preceding the current transformation coefficient in the scan order, derive the coefficient level of the current transformation coefficient based on the updated state and the syntax elements relating to the current transformation coefficient, quantize the derived coefficient level and derive the current transformation coefficient. For example, the current transformation coefficient can be quantized by a scalar quantizer for the updated state based on the quantization parameter for the restored level of the current transformation coefficient.
[0311] For example, if the syntax of the residual coding for the current block is determined to be the RRC syntax, the encoding device can encode the residual information of the RRC syntax for the current block. For example, the residual information of the RRC syntax may include the syntax elements disclosed in Table 2 above.
[0312] For example, the residual information in the above RRC syntax may include syntax elements relating to the transformation coefficient of the current block. Here, the transformation coefficient can also be expressed as the residual coefficient.
[0313] For example, the above 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.
[0314] Specifically, for example, the syntax element may include position information representing the position of the last non-zero conversion coefficient in the array of residual coefficients of the current block. That is, the syntax element may include position information representing the position of the last non-zero conversion coefficient in the scanning order of the current block. The position information may include information representing the column position prefix of the last non-zero conversion coefficient, information representing the row position prefix of the last non-zero conversion coefficient, information representing the column position suffix of the last non-zero conversion coefficient, and information representing the row position suffix of the last non-zero conversion coefficient. The syntax elements related to the above 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. On the other hand, the non-zero conversion coefficient may also be called the significant coefficient.
[0315] Furthermore, for example, the syntax element may include a coded subblock flag indicating whether the current subblock of the current block contains a non-zero conversion coefficient, an effective coefficient flag indicating whether the conversion coefficient of the current block is a non-zero conversion coefficient, a first coefficient level flag indicating whether the coefficient level for the conversion coefficient is greater than a first threshold, a parity level flag indicating the parity of the coefficient level, and / or a second coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a second threshold. Here, the coded subblock flag may be sb_coded_flag or coded_sub_block_flag, the effective 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.
[0316] Furthermore, for example, the syntax element described above may include coefficient value-related information for the conversion coefficients of the current block. This coefficient value-related information may be abs_remainder and / or dec_abs_level.
[0317] Furthermore, for example, the syntax element may include a sign flag representing the sign of the conversion coefficient. This sign flag may be coeff_sign_flag.
[0318] For example, if the syntax of the residual coding for the current block is determined to be the TSRC syntax, the encoding device can encode the residual information of the TSRC syntax for the current block. For example, the residual information of the TSRC syntax may include the syntax elements disclosed in Table 3 above.
[0319] For example, the residual information in the TSRC syntax described above may include syntax elements relating to the transformation coefficient of the current block. Here, the transformation coefficient can also be expressed as the residual coefficient.
[0320] For example, the above syntax elements may include context-coded and / or bypass-coded syntax elements for conversion coefficients. The above 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.
[0321] For example, the context-coded syntax element for the above conversion coefficient may include a valid coefficient flag indicating whether the conversion coefficient is a non-zero conversion coefficient, a sign flag indicating the sign of the conversion coefficient, a first coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a first threshold, and / or a parity level flag indicating the parity of the coefficient level of the conversion coefficient. Also, for example, the context-coded syntax element may include a second coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a second threshold, a third coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a third threshold, a fourth coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a fifth threshold. Here, the effective 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. Also, the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag may be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag may be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag may be abs_level_gt9_flag or abs_level_gtx_flag.
[0322] Furthermore, for example, the bypass-coded syntax element for the above conversion coefficient may include coefficient level information relating to the value (or coefficient level) of the above conversion coefficient and / or a sign flag representing the sign of the above conversion coefficient. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.
[0323] The encoding device generates a bitstream containing the prediction-related information, the dependent quantization enable flag, the TSRC enable flag, and the residual information (S1160). For example, the encoding device can output image information containing the prediction-related information, the dependent quantization enable flag, the TSRC enable flag, and the residual information as a bitstream. The bitstream may contain the prediction-related information, the dependent quantization enable flag, the TSRC enable flag, and the residual information.
[0324] On the other hand, the bitstream described above can be transmitted to a decoding device via a network or (digital) storage medium. Here, the network may include broadcast networks and / or communication networks, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.
[0325] Figure 12 schematically shows an encoding device that performs the image encoding method relating to this document. The method disclosed in Figure 11 can be performed by the encoding device disclosed in Figure 12. Specifically, for example, the prediction unit of the encoding device in Figure 12 can perform S1100 in Figure 11, and the entropy encoding unit of the encoding device in Figure 12 can perform S1110 to S1160 in Figure 11. Although not shown, the process of deriving residual samples for the current block based on the original samples and predicted samples for the current block can be performed by the subtraction unit of the encoding device, and the process of generating restored samples and restored pictures for the current block based on the residual samples and predicted samples for the current block can be performed by the addition unit of the encoding device.
[0326] Figure 13 schematically illustrates the image decoding method using the decoding device relating to this document. The method disclosed in Figure 13 can be performed by the decoding device disclosed in Figure 3. Specifically, for example, steps S1300 to S1330 in Figure 13 can be performed by the entropy decoding unit of the decoding device, steps (S1300 to) S1340 to S1350 in Figure 13 can be performed by the prediction unit of the decoding device, step S1360 in Figure 13 can be performed by the residual processing unit of the decoding device, and step S1370 can be performed by the addition unit of the decoding device.
[0327] The decoding device acquires prediction-related information for the current block (S1300). The decoding device can acquire prediction-related information for the current block via a bitstream. For example, the image information may include prediction-related information for the current block. For example, the prediction-related information may include prediction mode information for the current block. Based on the prediction mode information, the decoding device can determine which inter-prediction mode is applied to the current block. For example, the inter-prediction mode may include skip mode, merge mode and / or (A)MVP mode, or may include the various inter-prediction modes described above.
[0328] The decoding device obtains a dependent quantization enabled flag (S1310) indicating whether dependent quantization is available. The decoding device can obtain image information including the dependent quantization enabled flag via a bitstream. The image information may include the dependent quantization enabled flag. For example, the dependent quantization enabled flag may indicate whether dependent quantization is available. For example, the dependent quantization enabled flag may indicate whether dependent quantization is available for a block of pictures in a sequence. For example, the dependent quantization enabled flag may indicate whether a dependent quantization enabled flag exists that indicates whether dependent quantization is used for the current slice. For example, a dependent quantization enabled flag with a value of 1 may indicate that dependent quantization is available, and a dependent quantization enabled flag with a value of 0 may indicate that dependent quantization is not available. Furthermore, for example, the dependent quantization enabled flag can be signaled in the SPS syntax or slice header syntax. The syntax element of the dependent quantization enabled flag may be the aforementioned sps_dep_quant_enabled_flag. The sps_dep_quant_enabled_flag may be called sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.
[0329] Based on the dependent quantization enabled flag mentioned above, the decoding device obtains a TSRC enabled flag indicating whether Transform Skip Residual Coding (TSRC) is available (S1320). Image information may include the TSRC enabled flag.
[0330] For example, a decoding device can obtain the TSRC-enabled flag based on the dependent quantization-enabled flag. For example, the TSRC-enabled flag can be obtained based on the dependent quantization-enabled flag having a value of 0. That is, for example, if the value of the dependent quantization-enabled flag is 0 (i.e., the dependent quantization-enabled flag indicates that dependent quantization is not available), the TSRC-enabled flag can be obtained. In other words, for example, if the value of the dependent quantization-enabled flag is 0 (i.e., the dependent quantization-enabled flag indicates that dependent quantization is not available), the TSRC-enabled flag can be signaled. Also, for example, if the value of the dependent quantization-enabled flag is 1, the TSRC-enabled flag may not be obtained, and the value of the TSRC-enabled flag may be derived as 0. That is, for example, if the value of the dependent quantization enabled flag is 1 (for example, if dependent quantization is applied (or used) to the current block), the TSRC enabled flag may not be signaled, and the value of the TSRC enabled flag may be derived as 0. Therefore, for example, if dependent quantization is not available to the current block, the TSRC enabled flag may be signaled (or acquired). If dependent quantization is available to the current block, the TSRC enabled flag may not be signaled (or acquired), and the value of the TSRC enabled flag may be derived as 0. Here, the current block may be a coding block (CB) or a transform block (TB).
[0331] Here, for example, the TSRC enabled flag could be a flag indicating whether TSRC is enabled or disabled. That is, for example, the TSRC enabled flag could be a flag indicating whether TSRC is enabled or disabled for a block in a slice. For example, a value of 1 for the TSRC enabled flag could indicate that TSRC is disabled, and a value of 0 for the TSRC enabled flag could indicate that TSRC is enabled. Also, for example, the TSRC enabled flag could be signaled in the slice header syntax. The syntax element for the TSRC enabled flag could be the aforementioned sh_ts_residual_coding_disabled_flag.
[0332] The decoding device obtains residual information of the syntax of the residual coding for the current block derived based on the TSRC enabled flag (S1330). The decoding device may derive one of the syntaxes of Regular Residual Coding (RRC) and TSRC as the syntax of the residual coding for the current block based on the TSRC enabled flag, and may obtain residual information of the derived residual coding syntax.
[0333] For example, a decoding device may derive the syntax for residual coding for the current block based on the TSRC enabled flag. For example, a decoding device may derive the syntax for residual coding for the current block based on the TSRC enabled flag as one of the syntaxes for Regular Residual Coding (RRC) and Transform Skip Residual Coding (TSRC). The RRC syntax may represent the syntax using RRC, and the TSRC syntax may represent the syntax using TSRC.
[0334] For example, based on the above TSRC enabled flag, which has a value of 1, the syntax for the residual coding for the current block can be derived as the syntax for Regular Residual Coding (RRC). In this case, for example, a transform skip flag can be obtained regarding whether transform skipping is enabled for the current block, and the value of the transform skip flag can be 1. For example, the image information may include a transform skip flag for the current block. The transform skip flag can indicate whether transform skipping is enabled for the current block. That is, the transform skip flag can indicate whether a transformation is applied to the transformation coefficients of the current block. The syntax element representing the transform skip flag can be the transform_skip_flag mentioned above. For example, if the value of the transform skip flag is 1, the transform skip flag can indicate that no transformation is applied to the current block (i.e., the transformation is skipped), and if the value of the transform skip flag is 0, the transform skip flag can indicate that a transformation is applied to the current block. For example, if the current block is a transform skip block, the value of the transform skip flag for the current block can be 1.
[0335] Furthermore, for example, based on the TSRC enabled flag having a value of 0, the syntax for the residual coding for the current block can be derived as the syntax for Transform Skip Residual Coding (TSRC). Also, for example, a transform skip flag indicating whether transform skipping is enabled for the current block can be obtained, and based on the transform skip flag having a value of 1 and the TSRC enabled flag having a value of 0, the syntax for the residual coding for the current block can be derived as the syntax for Transform Skip Residual Coding (TSRC). Also, for example, a transform skip flag indicating whether transform skipping is enabled for the current block can be obtained, and based on the transform skip flag having a value of 0 and the TSRC enabled flag having a value of 0, the syntax for the residual coding for the current block can be derived as the syntax for Regular Residual Coding (RRC).
[0336] Subsequently, for example, the decoding device can obtain residual information of the derived residual coding syntax for the current block. The image information may include residual information.
[0337] For example, if the syntax of the residual coding for the current block is derived as the RRC syntax, the decoding device can obtain residual information of the RRC syntax for the current block. For example, the residual information of the RRC syntax may include the syntax elements disclosed in Table 2 above.
[0338] For example, the residual information in the above RRC syntax may include syntax elements relating to the transformation coefficient of the current block. Here, the transformation coefficient can also be expressed as the residual coefficient.
[0339] For example, the above 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.
[0340] Specifically, for example, the syntax element may include position information representing the position of the last non-zero conversion coefficient in the array of residual coefficients of the current block. That is, the syntax element may include position information representing the position of the last non-zero conversion coefficient in the scanning order of the current block. The position information may include information representing the column position prefix of the last non-zero conversion coefficient, information representing the row position prefix of the last non-zero conversion coefficient, information representing the column position suffix of the last non-zero conversion coefficient, and information representing the row position suffix of the last non-zero conversion coefficient. The syntax elements related to the above 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. On the other hand, the non-zero conversion coefficient may also be called the significant coefficient.
[0341] Furthermore, for example, the syntax element may include an encoded subblock flag indicating whether the current subblock of the current block contains a non-zero conversion coefficient, an effective coefficient flag indicating whether the conversion coefficient of the current block is a non-zero conversion coefficient, a first coefficient level flag indicating whether the coefficient level for the conversion coefficient is greater than a first threshold, a parity level flag indicating the parity of the coefficient level, and / or a second coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a second threshold. Here, the coded subblock flag may be sb_coded_flag or coded_sub_block_flag, the effective 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.
[0342] Furthermore, for example, the syntax element described above may include coefficient value-related information relating to the conversion coefficients of the current block. This coefficient value-related information may be abs_remainder and / or dec_abs_level.
[0343] Furthermore, for example, the syntax element may include a sign flag representing the sign of the conversion coefficient. This sign flag may be coeff_sign_flag.
[0344] For example, if the syntax of the residual coding for the current block is derived as the TSRC syntax, the decoding device can obtain residual information of the TSRC syntax for the current block. For example, the residual information of the TSRC syntax may include the syntax elements disclosed in Table 3 above.
[0345] For example, the residual information in the TSRC syntax described above may include syntax elements relating to the transformation coefficient of the current block. Here, the transformation coefficient can also be expressed as the residual coefficient.
[0346] For example, the above syntax elements may include context-coded and / or bypass-coded syntax elements for conversion coefficients. The above 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.
[0347] For example, the context-coded syntax element for the above conversion coefficient may include a valid coefficient flag indicating whether the conversion coefficient is a non-zero conversion coefficient, a sign flag indicating the sign of the conversion coefficient, a first coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a first threshold, and / or a parity level flag indicating the parity of the coefficient level of the conversion coefficient. Also, for example, the context-coded syntax element may include a second coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a second threshold, a third coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a third threshold, a fourth coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a fifth threshold. Here, the effective 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. Also, the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag may be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag may be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag may be abs_level_gt9_flag or abs_level_gtx_flag.
[0348] Furthermore, for example, the bypass-coded syntax element for the above conversion coefficient may include coefficient level information relating to the value (or coefficient level) of the above conversion coefficient and / or a sign flag representing the sign of the above conversion coefficient. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.
[0349] The decoding device derives motion information for the current block based on the prediction-related information (S1340). For example, the decoding device may derive motion information for the current block based on the inter-prediction mode determined based on the prediction-related information. For example, the decoding device may construct a list of motion information candidates for the current block, select one motion information candidate from the motion information candidate list based on the index information of the motion information candidates included in the prediction-related information, and derive motion information for the current block based on the selected motion information candidate.
[0350] The decoding device derives a predicted sample of the current block based on the motion information (S1350). For example, the decoding device may derive the reference picture of the current block based on the index of the reference picture of the current block, and may derive a predicted sample of the current block based on the sample of the reference block pointed to by the motion vector of the current block on the reference picture. The motion information may include the index of the reference picture of the current block and the motion vector.
[0351] The decoding device derives a residual sample of the current block based on the residual information (S1360). For example, the decoding device can derive a conversion coefficient of the current block based on the residual information, and can derive a residual sample of the current block based on the conversion coefficient.
[0352] For example, the decoding device may derive the transformation coefficients of the current block based on the syntax elements of the residual information. Subsequently, the decoding device may derive the residual samples of the current block based on the transformation coefficients. For example, if it is derived that no transformation is applied to the current block based on the transformation skip flag, i.e., if the value of the transformation skip flag is 1, the decoding device may derive the transformation coefficients as the residual samples of the current block. Alternatively, for example, if it is derived that no transformation is applied to the current block based on the transformation skip flag, i.e., if the value of the transformation skip flag is 1, the decoding device may dequantize the transformation coefficients and derive the residual samples of the current block. Alternatively, for example, if it is derived that a transformation has been applied to the current block based on the transformation skip flag, i.e., if the value of the transformation skip flag is 0, the decoding device may dequantize the transformation coefficients and derive the residual samples of the current block. Alternatively, for example, if it is derived that a transformation has been applied to the current block based on the transformation skip flag, that is, if the value of the transformation skip flag is 0, the decoding device may dequantize the transformation coefficients and dequantize the dequantized transformation coefficients to derive the residual samples of the current block.
[0353] On the other hand, for example, whether the dependent quantization can be applied to the current block can be determined based on the dependent quantization enabled flag. For example, if the value of the dependent quantization enabled flag is 1 (i.e., the dependent quantization enabled flag indicates that the dependent quantization is enabled), then the dependent quantization can be applied to the current block. For example, if the dependent quantization is applied to the current block, the decoding device can perform the dependent quantization process on the conversion coefficients and derive the residual sample of the current block. That is, for example, if the dependent quantization is applied to the current block, the decoding device can derive the residual sample of the current block based on the dependent quantization on the conversion coefficients. For example, when the dependent quantization described above is applied to the current block, the decoding device can update the state (Qstate) for the dependent quantization based on the coefficient level of the transformation coefficient immediately preceding the current transformation coefficient in the scan order, derive the coefficient level of the current transformation coefficient based on the updated state and the syntax elements relating to the current transformation coefficient, and derive the residual sample by inverse quantization of the derived coefficient level. For example, the current transformation coefficient can be inverse quantized in the scalar quantizer for the updated state based on the quantization parameter for the restored level of the current transformation coefficient. Here, the restored level can be derived based on the syntax elements relating to the current transformation coefficient.
[0354] Furthermore, for example, if the dependent quantization described above is not applied to the current block, the decoding device may derive the coefficient level of the transformation coefficient based on the syntax element relating to the transformation coefficient of the current block, and may derive the residual sample by inverse quantization of the coefficient level. That is, for example, if the dependent quantization described above is not applied to the current block, the decoding device may not perform the process of updating the state (Qstate) based on the coefficient level of the transformation coefficient immediately preceding the current transformation coefficient in the scan sequence.
[0355] The decoding device generates a reconstructed picture based on the predicted sample and the residual sample (S1370). For example, the decoding device can generate a reconstructed sample and / or a reconstructed picture of the current block based on the predicted sample and the residual sample. For example, the decoding device can generate the reconstructed sample by adding the predicted sample and the residual sample.
[0356] As previously mentioned, in-loop filtering procedures such as deblocking filtering, SAO, and / or ALF procedures may be applied to the restored pictures as needed to improve subjective / objective image quality.
[0357] Figure 14 schematically shows a decoding device that performs the image decoding method relating to this document. The method disclosed in Figure 13 can be performed by the decoding device disclosed in Figure 14. Specifically, for example, the entropy decoding unit of the decoding device in Figure 14 can perform S1300 to S1330 of Figure 13, the prediction unit of the decoding device in Figure 14 can perform S1340 to S1350 of Figure 13, the residual processing unit of the decoding device in Figure 14 can perform S1360 of Figure 13, and the addition unit of the decoding device in Figure 14 can perform S1370 of Figure 13.
[0358] According to the aforementioned document, the efficiency of residual coding can be improved.
[0359] Furthermore, according to this document, a signaling relationship can be established between the dependent quantization enabled flag and the TSRC enabled flag. This allows the TSRC enabled flag to be signaled when dependent quantization is not available, thereby improving coding efficiency, reducing the amount of bits coded, and improving overall residual coding efficiency by preventing dependent quantization from being used when TSRC is not available and the RRC syntax is coded for the transform skip block.
[0360] Furthermore, according to this document, the TSRC-enabled flag can only be signaled when dependent quantization is not used. This prevents the coding of RRC syntax for transform skip blocks from overlapping with the use of dependent quantization, allowing the TSRC-enabled flag to be coded more effectively (efficiently), reducing the bit size and improving overall residual coding efficiency.
[0361] In the embodiments described above, the method is explained based on a flowchart in a series of steps or blocks, but this document is not limited to the order of the steps, and some steps may occur in different steps and in different orders or simultaneously than those described above. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of this document.
[0362] The embodiments described herein can be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in each drawing can be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information on instructions or algorithms for implementation can be stored on a digital recording medium.
[0363] Furthermore, the decoding and encoding devices to which the embodiments of this document apply can include multimedia broadcasting transceivers, mobile communication terminals, home cinema video equipment, digital cinema video equipment, surveillance cameras, video interaction devices, real-time communication devices such as video communication, mobile streaming devices, recording media, camcorders, video-on-demand (VoD) service providers, OTT video (Over The Top video) devices, internet streaming service providers, 3D video devices, image-phone video devices, transportation terminals (e.g., vehicle terminals, airplane terminals, ship terminals, etc.), and medical video equipment, and can be used to process video signals or data signals. For example, OTT video (Over The Top video) devices may include game consoles, Blu-ray players, internet-connected TVs, home theater systems, smartphones, tablet PCs, DVRs (Digital Video Recorders), etc.
[0364] Furthermore, the processing methods to which the embodiments of this document apply can be produced in the form of programs executed on a computer and stored on a computer-readable recording medium. Multimedia data having the data structure relating to this document can also be stored on a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices that store data that can be read by a computer. The computer-readable recording medium can include, for example, Blu-ray discs (BDs), Universal Serial Bus (USB), ROMs, PROMs, EPROMs, EEPROMs, RAMs, CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices. The computer-readable recording medium also includes media implemented in the form of carrier waves (e.g., transmission over the Internet). In addition, bitstreams generated by encoding methods can be stored on a computer-readable recording medium or transmitted over a wireless network.
[0365] Furthermore, the embodiments described in this document can be implemented as a computer program product using program code, and the program code can be executed on a computer according to the embodiments described in this document. The program code can be stored on a computer-readable carrier.
[0366] Figure 15 illustrates a content streaming system structure diagram to which the embodiments described in this document apply.
[0367] The content streaming system to which the embodiments described herein apply may broadly include an encoding server, a streaming server, a web server, a media storage device (storage), a user device, and a multimedia input device.
[0368] The above-mentioned encoding server is responsible for compressing content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data to generate a bitstream, and then transmitting this bitstream to the above-mentioned streaming server. In other cases, if the multimedia input device such as a smartphone, camera, or camcorder directly generates the bitstream, the above-mentioned encoding server can be omitted.
[0369] The bitstream described above can be generated by an encoding method or bitstream generation method to which an embodiment of this document applies, and the streaming server can temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0370] The streaming server transmits multimedia data to user devices based on user requests via a web server, and the web server acts as an intermediary to inform users about available services. When a user requests a desired service from the web server, the web server transmits this to the streaming server, which then transmits the multimedia data to the user. In this case, the content streaming system may include a separate control server, in which case the control server controls the commands and responses between the devices within the content streaming system.
[0371] The above-mentioned streaming server can receive content from a media storage device and / or an encoding server. For example, when receiving content from the above-mentioned encoding server, the content can be received in real time. In this case, in order to provide a smooth streaming service, the above-mentioned streaming server can store the above-mentioned bitstream for a certain period of time.
[0372] Examples of user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, PDAs (Personal Digital Assistants), PMPs (Portable Multimedia Players), navigation systems, slate PCs, tablet PCs, ultrabooks (ULTRABOOK®), wearable devices (such as smartwatches, smart glasses, and HMDs (Head Mounted Displays)), digital TVs, desktop computers, and digital signatures (Signiji). Each server within the above content streaming system can be operated as a distributed server, in which case the data received by each server can be processed in a distributed manner.
[0373] The claims described herein can be combined in various ways. For example, the technical features of the method claims herein can be combined to realize an apparatus, and the technical features of the apparatus claims herein can be combined to realize a method. Furthermore, the technical features of the method claims and the technical features of the apparatus claims herein can be combined to realize an apparatus, and the technical features of the method claims and the technical features of the apparatus claims herein can be combined to realize a method.
Claims
1. An image decoding method performed by a decoding device, A step to obtain a dependent quantization enabled flag indicating whether dependent quantization is available, Based on the dependent quantization enabled flag, the step of obtaining a TSRC disabled flag indicating whether TSRC (Transform Skip Residual Coding) is enabled or disabled, The steps include obtaining residual information of the residual coding syntax for the current block, derived based on the aforementioned TSRC invalid flag, The steps include: deriving a residual sample of the current block based on the residual information; The step of generating a reconstructed picture based on the residual sample is included, The TSRC disabled flag is obtained based on the dependent quantization enabled flag, which has a value of 0. The aforementioned TSRC invalid flag is signaled via slice header syntax, A method in which the syntax structure of residual coding is used based on the fact that the TSRC invalid flag is obtained based on the dependent quantization enabled flag and the value of the TSRC invalid flag is equal to 1.
2. An image encoding method performed by an encoding device, A step of encoding a dependent quantization enabled flag indicating whether dependent quantization is available, A step of encoding a TSRC invalid flag indicating whether TSRC (Transform Skip Residual Coding) is available or not based on the dependent quantization enabled flag, The steps include determining the syntax of residual coding for the current block based on the aforementioned TSRC invalid flag, The steps include encoding the residual information of the determined residual coding syntax for the current block, The steps include generating a bitstream that includes the dependent quantization enabled flag, the TSRC disabled flag, and the residual information, The TSRC disabled flag is encoded based on the dependent quantization enabled flag, which has a value of 0. The aforementioned TSRC invalid flag is signaled via slice header syntax, A method in which the syntax structure of residual coding is used based on the fact that the TSRC invalid flag is obtained based on the dependent quantization enabled flag and the value of the TSRC invalid flag is equal to 1.
3. A method for transmitting data including a bitstream of image information, A step of acquiring the bitstream of the image information including residual information, wherein the bitstream is A step of encoding a dependent quantization enabled flag indicating whether dependent quantization is available, A step of encoding a TSRC invalid flag indicating whether TSRC (Transform Skip Residual Coding) is available or not based on the dependent quantization enabled flag, The steps include determining the syntax of residual coding for the current block based on the aforementioned TSRC invalid flag, The steps include encoding the residual information of the determined residual coding syntax for the current block, A step of generating a bitstream including the dependent quantization enabled flag, the TSRC disabled flag, and the residual information, and a step of generating a bitstream by the above, The step of transmitting the data, which includes the bitstream of the image information including the residual information, The TSRC disabled flag is encoded based on the dependent quantization enabled flag, which has a value of 0. The aforementioned TSRC invalid flag is signaled via slice header syntax, A transmission method in which the syntax structure of residual coding is used based on the fact that the TSRC invalid flag is obtained based on the dependent quantization enabled flag and the value of the TSRC invalid flag is equal to 1.