Image encoding / decoding method and method for transmitting data
By controlling the residual coding process in the image coding system and utilizing symbolic data hiding enable flags and TSRC enable flags, the problem of high transmission and storage costs for high-resolution, high-quality images is solved, and coding efficiency is improved.
Patent Information
- Application Number
- CN202511777928.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2020-02-27
- Filing Date
- 2021-02-25
- Publication Date
- 2026-01-02
AI Technical Summary
The transmission and storage of high-resolution, high-quality images are costly, necessitating efficient image compression techniques to reduce the amount of information transmitted and stored.
By controlling the residual coding process through the symbolic data hiding enable flag and the transform skip residual coding (TSRC) enable flag in the image coding system, coding efficiency can be improved.
By reducing symbol data hiding in transform skip blocks without TSRC enabled, the number of bits to be encoded is reduced, thus improving the overall residual coding efficiency.
Smart Images

Figure CN121262384A_ABST
Abstract
Description
[0001] This application is a divisional application of the original invention patent application No. 202180028533.9 (International Application No.: PCT / KR2021 / 002411, Application Date: February 25, 2021, Invention Title: Image Decoding Method and Apparatus for Residual Coding). Technical Field
[0002] This document relates to image coding technology, and more specifically, to a video decoding method and apparatus, wherein, when encoding residual data of the current block in an image coding system, flag information regarding whether TSRC is enabled / disabled is encoded based on flag information regarding whether SDH is enabled. Background Technology
[0003] Recently, the demand for high-resolution, high-quality images, such as HD (high-definition) and UHD (ultra-high-definition) images, has been growing across various fields. Because image data is high-resolution and high-quality, the amount of information or bits to be transmitted increases compared to traditional image data. Therefore, transmission and storage costs increase when using media such as traditional wired / wireless broadband lines to send image data or when storing image data using existing storage media.
[0004] Therefore, there is a need for efficient image compression technology to effectively transmit, store, and reproduce information from high-resolution, high-quality images. Summary of the Invention
[0005] Technical issues
[0006] This disclosure provides a method and apparatus for improving image coding efficiency.
[0007] This disclosure also provides a method and apparatus for improving residual coding efficiency.
[0008] Technical solution
[0009] According to the embodiments of this document, an image decoding method performed by a decoding device is provided. The method includes the following steps: obtaining a symbolic data hiding enable flag indicating whether symbolic data hiding is enabled in the current slice; obtaining a TSRC enable flag indicating whether transform skipped residual coding (TSRC) is enabled for transform skipped blocks in the current slice; obtaining residual coding information of the current block in the current slice based on the TSRC enable flag; deriving a prediction sample of the current block based on received prediction information of the current block; deriving a residual sample of the current block based on the residual coding information; and generating a reconstructed image based on the prediction sample and the residual sample, wherein the current block is a transform skipped block in the current slice, and wherein the TSRC enable flag is obtained based on the symbolic data hiding enable flag.
[0010] According to another embodiment of this document, a decoding device for performing image decoding is provided. The decoding device includes: an entropy decoder configured to obtain a symbolic data hiding enable flag for whether symbolic data hiding is enabled in a current slice, obtain a TSRC enable flag for whether transform skipped blocks in the current slice have transform skipped residual coding (TSRC) enabled, and obtain residual coding information of a current block in the current slice based on the TSRC enable flag; a predictor configured to derive a prediction sample of the current block based on the received prediction information of the current block; a residual processor configured to derive a residual sample of the current block based on the residual coding information; and an adder configured to generate a reconstructed image based on the prediction sample and the residual sample, wherein the current block is a transform skipped block in the current slice, and wherein the TSRC enable flag is obtained based on the symbolic data hiding enable flag.
[0011] According to another embodiment of this document, a video encoding method performed by an encoding device is provided. The method includes the following steps: deriving a prediction sample for a current block by performing a prediction on a current block in a current slice; deriving a residual sample for the current block based on the prediction sample; encoding prediction information used for the prediction; encoding a symbolic data hiding enable flag for whether symbolic data hiding is enabled for the current slice; encoding a TSRC enable flag for whether transform skipped residual coding (TSRC) is enabled for a transform skipped block in the current slice based on the symbolic data hiding flag; encoding residual information for the current block based on the TSRC enable flag; and generating a bitstream including the symbolic data hiding enable flag, the TSRC enable flag, the prediction information, and the residual information, wherein the current block is a transform skipped block in the current slice.
[0012] According to another embodiment of this document, a video encoding apparatus is provided. The encoding apparatus includes: a predictor configured to derive a prediction sample of a current block by performing a prediction on a current block in a current slice; a residual processor configured to derive a residual sample of the current block based on the prediction sample; and an entropy encoder configured to encode prediction information used for the prediction, encode a symbol data hiding enable flag for whether symbol data hiding is enabled in the current slice, encode a TSRC enable flag for whether transform skipped blocks in the current slice are enabled for transform skipped residual coding (TSRC) based on the symbol data hiding enable flag, encode residual information of the current block based on the TSRC enable flag, and generate a bitstream including the symbol data hiding enable flag, the TSRC enable flag, the prediction information, and the residual information, wherein the current block is the transform skipped block in the current slice.
[0013] According to another embodiment of this document, a computer-readable digital storage medium is provided that stores a bitstream of image information including image information that enables a decoding device to perform an image decoding method. In the computer-readable digital storage medium, the image decoding method includes: obtaining a symbolic data hiding enable flag for whether symbolic data hiding is enabled in a current slice; obtaining another symbolic data hiding enable flag for whether symbolic data hiding is enabled in a current slice; obtaining a TSRC enable flag for whether transform skipped residual coding (TSRC) is enabled for a transform skipped block in the current slice; obtaining residual coding information of a current block in the current slice based on the TSRC enable flag; deriving a prediction sample of the current block based on received prediction information of the current block; deriving a residual sample of the current block based on the residual coding information; and generating a reconstructed image based on the prediction sample and the residual sample, wherein the current block is a transform skipped block in the current slice, and wherein the TSRC enable flag is obtained based on the symbolic data hiding enable flag.
[0014] Beneficial effects
[0015] This document describes how to improve the efficiency of residual coding.
[0016] According to this document, the TSRC enable flag can be signaled based on the symbolic data hiding enable flag. This can improve coding efficiency by preventing symbolic data hiding from being used in transform skip blocks where TSRC is not enabled, and improve overall residual coding efficiency by reducing the number of bits to be encoded.
[0017] According to this document, the TSRC enable flag can be signaled based on the transform skip enable flag and the symbol data hiding enable flag. In this way, coding efficiency can be improved by preventing symbol data hiding from being used in transform skip blocks where TSRC is not enabled, and the total residual coding efficiency can be improved by reducing the number of bits to be encoded. Attached Figure Description
[0018] Figure 1 Examples of video / image encoding apparatuses to which embodiments of the present disclosure are applied are briefly illustrated.
[0019] Figure 2 This is a schematic diagram illustrating the configuration of a video / image encoding device to which embodiments of the present disclosure can be applied.
[0020] Figure 3 This is a schematic diagram illustrating the configuration of a video / image decoding device to which embodiments of the present disclosure can be applied.
[0021] Figure 4 An example of a video / image coding method based on inter-frame prediction is shown.
[0022] Figure 5 An example of a video / image decoding method based on inter-frame prediction is shown.
[0023] Figure 6 The inter-frame prediction process is illustrated schematically.
[0024] Figure 7 An example is shown of context-adaptive binary arithmetic coding (CABAC) for encoding syntax elements.
[0025] Figure 8 This is a diagram showing exemplary transformation coefficients within a 4×4 block.
[0026] Figure 9 A brief illustration is provided of an image encoding method performed by an encoding device according to the present disclosure.
[0027] Figure 10 A brief illustration is provided of an encoding device for performing an image encoding method according to the present disclosure.
[0028] Figure 11 A brief illustration is provided of an image decoding method performed by a decoding device according to the present disclosure.
[0029] Figure 12 A decoding apparatus for performing an image decoding method according to the present disclosure is briefly illustrated.
[0030] Figure 13 An example of the structure of a content streaming system applying this disclosure is shown in the diagram. Detailed Implementation
[0031] This disclosure may be modified in various forms, and specific embodiments thereof will be described and illustrated in the accompanying drawings. However, these embodiments are not intended to limit this disclosure. The terminology used in the following description is for the purpose of describing specific embodiments only and is not intended to limit this disclosure. Singular expressions include plural expressions, provided that they are clearly read differently. Terms such as “comprising” and “having” are intended to indicate the presence of the features, numbers, steps, operations, elements, components or combinations thereof used in the following description, and therefore it should be understood that the possibility of having or adding one or more different features, numbers, steps, operations, elements, components or combinations thereof is not excluded.
[0032] Furthermore, the elements in the figures described in this disclosure are drawn independently for the purpose of illustrating different specific functions, but this does not mean that these elements are implemented by independent hardware or independent software. For example, two or more of these elements may be combined to form a single element, or a single element may be divided into multiple elements. Embodiments in which elements are combined and / or divided are part of this disclosure without departing from its concept.
[0033] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Furthermore, throughout the drawings, similar reference numerals are used to indicate similar elements, and identical descriptions of similar elements will be omitted.
[0034] Figure 1 Examples of video / image encoding apparatuses to which embodiments of the present disclosure may be applied are briefly illustrated.
[0035] Reference Figure 1 A video / image encoding system may include a first device (source device) and a second device (receiver). The source device may transmit encoded video / image information or data to the receiving device in the form of a file or stream via a digital storage medium or network.
[0036] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display, and the display may be configured as a separate device or an external component.
[0037] Video sources can acquire video / images through processes that capture, synthesize, or generate video / images. Video sources may include video / image capture devices and / or video / image generation devices. Video / image capture devices may include, for example, one or more cameras, video / image archives including previously captured video / images, etc. Video / image generation devices may include, for example, computers, tablets, and smartphones, and can generate video / images (electronically). For example, virtual video / images can be generated by computers, etc. In this case, the video / image capture process can be replaced by a process that generates related data.
[0038] Encoding devices can encode input video / images. They can perform a series of processes such as prediction, transformation, and quantization to achieve compression and encoding efficiency. The encoded data (encoded video / image information) can be output as a bitstream.
[0039] The transmitter can send encoded images / image information or data, output as a bitstream, to the receiver of the receiving device in the form of a file or stream via a digital storage medium or network. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter can include elements for generating media files according to a predetermined file format and may include elements for transmission via a broadcast / communication network. The receiver can receive / extract the bitstream and send the received bitstream to a decoding device.
[0040] Decoding devices can decode video / images by performing a series of processes, such as dequantization, inverse transform, and prediction, that correspond to the operations of encoding devices.
[0041] The renderer can render decoded video / images. The rendered video / images can then be displayed on a monitor.
[0042] This disclosure relates to video / image coding. For example, the methods / implementations disclosed in this disclosure can be applied to methods disclosed in Universal Video Coding (VVC), EVC (Essential Video Coding) standard, AOMedia Video 1 (AV1) standard, second-generation audio-visual coding standard (AVS2), or next-generation video / image coding standards (e.g., H.267 or H.268).
[0043] This disclosure presents various implementations of video / image coding, and unless otherwise mentioned, these implementations can be combined with each other.
[0044] In this disclosure, video can refer to a series of images over time. An image typically refers to a unit representing an image within a specific time region, and sub-images / slices / tiles are units that constitute part of an image during encoding. Sub-images / slices / tiles may include one or more coding tree units (CTUs). An image may consist of one or more sub-images / slices / tiles. An image may consist of one or more groups of tiles. A group of tiles may include one or more tiles. A brick can represent a rectangular region of CTU rows within a tile in an image. A tile can be divided into multiple tiles, each of which consists of one or more CTU rows within the tile. A tile that is not divided into multiple tiles can also be called a tile. Tile scanning is a specific ordering of the CTUs in the segmented image: CTUs are ordered by raster scans of CTUs within a tile, tiles within a tile are ordered sequentially by raster scans of tiles within a tile, and tiles in an image are ordered sequentially by raster scans of tiles within an image. Additionally, a sub-image can represent a rectangular region of one or more slices within an image. That is, a sub-image contains one or more slices that collectively cover a rectangular region of the image. A tile is a rectangular region of CTUs within a specific tile column and a specific tile row in an image. A tile column is a rectangular region of CTUs with a height equal to the height of the image and a width specified by a syntax element in the image parameter set. A tile row is a rectangular region of CTUs with a height specified by a syntax element in the image parameter set and a width equal to the width of the image. A tile scan is a specific ordering of the CTUs in a segmented image: CTUs are ordered consecutively by raster scan of CTUs within a tile, and tiles in the image are ordered consecutively by raster scan of the tiles in the image. A slice comprises an integer number of tiles of an image that can be exclusively contained in a single NAL unit. A slice can consist of a consecutive sequence of either multiple complete tiles or only one complete tile. In this disclosure, tile groups and slices can be used interchangeably. For example, in this disclosure, a tile group / tile group header can be referred to as a slice / slice header.
[0045] A pixel, or image unit, can refer to the smallest unit that makes up a picture (or image). Additionally, the term "sample" can be used as the counterpart to a pixel. A sample can typically represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component or only the pixel / pixel value of the chrominance component.
[0046] A unit can represent a basic unit of image processing. A unit may include a specific region of an image and at least one of the information associated with that region. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, the terms "unit" and "block" or "region" may be used interchangeably. Typically, an M×N block may include a set (or array) of samples (or transform coefficients) with M columns and N rows.
[0047] In this specification, “A or B” may mean “A only”, “B only”, or “both A and B”. In other words, in this specification, “A or B” can be interpreted as “A and / or B”. For example, “A, B or C” in this document means “A only”, “B only”, “C only”, or “any one and any combination of A, B and C”.
[0048] In this specification, a forward slash ( / ) or a comma (,) can mean "and / or". For example, "A / B" can mean "A and / or B". Accordingly, "A / B" can mean "A only", "B only", or "both A and B". For example, "A, B, C" can mean "A, B, or C".
[0049] In this specification, "at least one of A and B" may mean "A only", "B only" or "both A and B". Furthermore, in this specification, the expression "at least one of A or B" or "at least one of A and / or B" may be interpreted as the same as "at least one of A and B".
[0050] Additionally, in this specification, "at least one of A, B, and C" means "A only", "B only", "C only" or "any combination of A, B, and C". Furthermore, "at least one of A, B, or C" or "at least one of A, B, and / or C" may mean "at least one of A, B, and C".
[0051] Additionally, the parentheses used in this specification may mean "for example". Specifically, when "prediction (intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction". In other words, "prediction" in this specification is not limited to "intra-frame prediction", and "intra-frame prediction" may be proposed as an example of "prediction". Furthermore, even when "prediction (i.e., intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction".
[0052] In this specification, a technical feature described individually in a single drawing may be implemented individually or simultaneously.
[0053] The following figures were created to illustrate specific examples of this specification. Since the names of specific devices or signals / messages / fields described in the figures are presented by way of example, the technical features of this specification are not limited to the specific names used in the following figures.
[0054] Figure 2 This is a schematic diagram illustrating the configuration of a video / image encoding apparatus to which embodiments of the present disclosure may be applied. Hereinafter, a video encoding apparatus may include an image encoding apparatus.
[0055] Reference Figure 2 The encoding device 200 includes an image segmenter 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter-frame predictor 221 and an intra-frame predictor 222. The residual processor 230 may include a transform 232, a quantizer 233, an inverse quantizer 234, and an inverse transform 235. The residual processor 230 may also include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstruction block generator. According to embodiments, the image segmenter 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filter 260 may be constituted by at least one hardware component (e.g., an encoder chipset or a processor). Additionally, the memory 270 may include a decoded image buffer (DPB) or may be constituted by a digital storage medium. The hardware component may also include the memory 270 as an internal / external component.
[0056] Image segmenter 210 can segment an input image (or picture or frame) input to encoding device 200 into one or more processors. For example, a processor may be referred to as a coding unit (CU). In this case, coding units can be recursively segmented from coding tree units (CTUs) or maximum coding units (LCUs) according to a quadtree-binary-trinary (QTBTTT) structure. For example, a coding unit can be segmented into multiple deeper coding units based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, a quadtree structure can be applied first, followed by a binary tree structure and / or a ternary structure. Alternatively, a binary tree structure can be applied first. The encoding process according to this disclosure can be performed based on the final coding unit that is no longer segmented. In this case, the maximum coding unit can be used as the final coding unit based on encoding efficiency according to image characteristics, or, if necessary, the coding unit can be recursively segmented into deeper coding units, and the coding unit with the optimal size can be used as the final coding unit. Here, the encoding process may include prediction, transformation, and reconstruction processes, which will be described later. As another example, the processor may also include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit can be separated or divided from the final encoding unit described above. The prediction unit may be a unit for predicting samples, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving residual signals from transform coefficients.
[0057] In some cases, a unit can be used interchangeably with terms such as a block or region. Generally, an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can typically represent a pixel or pixel value, and may represent only the pixel / pixel value of the luminance component or only the pixel / pixel value of the chrominance component. A sample can be used as a term corresponding to a picture (or image) of pixels or pictographs.
[0058] In the encoding device 200, the predicted signal (prediction block, prediction sample array) output from the inter-frame predictor 221 or the intra-frame predictor 222 is subtracted from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is sent to the converter 232. In this case, as shown, the unit in the encoding device 200 used to subtract the predicted signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) can be called the subtractor 231. The predictor can perform prediction on the block to be processed (hereinafter referred to as the current block) and generate a prediction block that includes the prediction samples of the current block. The predictor can determine whether to apply intra-frame prediction or inter-frame prediction based on the current block or CU. As described later in the description of each prediction mode, the predictor can generate various information related to the prediction, such as prediction mode information, and send the generated information to the entropy encoder 240. The information about the prediction can be encoded in the entropy encoder 240 and output as a bitstream.
[0059] Intra-predictor 222 can predict the current block by referencing samples in the current image. Depending on the prediction mode, the referenced samples may be located near or far from the current block. In intra-prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. Non-directional modes can include, for example, DC mode and planar mode. Depending on the level of detail in the prediction direction, the directional modes can include, for example, 33 or 65 directional prediction modes. However, this is just an example, and more or fewer directional prediction modes may be used depending on the settings. Intra-predictor 222 can determine the prediction mode to be applied to the current block by using prediction modes applied to neighboring blocks.
[0060] Inter-frame predictor 221 can deduce the predicted block of the current block based on a reference block (reference sample array) specified by motion vectors on a reference image. Here, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted on a block, sub-block, or sample basis based on the correlation between motion information between neighboring blocks and the current block. Motion information may include motion vectors and reference image indices. Motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, neighboring blocks may include spatially neighboring blocks existing in the current image and temporally neighboring blocks existing in the reference image. The reference image including the reference block and the reference image including the temporally neighboring block may be the same or different. The temporally neighboring block may be called a juxtaposed reference block, a co-located CU (colCU), etc., and the reference image including the temporally neighboring block may be called a juxtaposed image (colPic). For example, inter-frame predictor 221 can configure a motion information candidate list based on neighboring blocks and generate information indicating which candidate to use to deduce the motion vector and / or reference image index of the current block. Inter-frame prediction can be performed based on various prediction modes. For example, in skip mode and merge mode, the inter-frame predictor 221 can use motion information from neighboring blocks as motion information for the current block. In skip mode, unlike merge mode, residual signals may not be sent. In motion vector prediction (MVP) mode, motion vectors from neighboring blocks can be used as motion vector predictors, and the motion vector of the current block can be indicated by signaling the motion vector difference.
[0061] Predictor 220 can generate prediction signals based on various prediction methods described below. For example, the predictor can not only apply intra-frame prediction or inter-frame prediction to predict a block, but can also apply both intra-frame prediction and inter-frame prediction simultaneously. This can be referred to as Inter-intra-frame Combined Prediction (CIIP). Alternatively, the predictor can predict blocks based on an Intra-Block Copy (IBC) prediction mode or a palette mode. IBC prediction modes or palette modes can be used for content image / video coding, such as screen content coding (SCC), for games, etc. IBC essentially performs prediction in the current frame, but can be performed similarly to inter-frame prediction because the reference block is derived in the current frame. That is, IBC can use at least one of the inter-frame prediction techniques described in this disclosure. A palette mode can be considered as an example of intra-frame coding or intra-frame prediction. When a palette mode is applied, sample values within the frame can be signaled based on information about the palette table and palette index.
[0062] The predicted signal generated by the predictor (including inter-frame predictor 221 and / or intra-frame predictor 222) can be used to generate a reconstructed signal or a residual signal. Transformer 232 can generate transform coefficients by applying transform techniques to the residual signal. For example, the transform technique can include at least one of Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), Karhunen-Loève Transform (KLT), Graph-Based Transform (GBT), or Conditional Nonlinear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is represented by a graph. CNT refers to a transform generated based on the predicted signal generated using all previously reconstructed pixels. Furthermore, the transform processing can be applied to square pixel blocks of the same size, or it can be applied to blocks of variable size that are not square.
[0063] The quantizer 233 quantizes the transform coefficients and sends them to the entropy encoder 240, which encodes the quantized signal (information about the quantized transform coefficients) and outputs a bitstream. This information about the quantized transform coefficients can be called residual information. The quantizer 233 can rearrange the block-type quantized transform coefficients into a one-dimensional vector based on the coefficient scan order and generate information about the quantized transform coefficients based on this one-dimensional vector form. The entropy encoder 240 can perform various encoding methods, such as Golomb, Context Adaptive Variable Length Coding (CAVLC), and Context Adaptive Binary Arithmetic Coding (CABAC). The entropy encoder 240 can encode information required for video / image reconstruction other than the quantized transform coefficients (e.g., values of syntax elements) together or separately. It can send or store encoded information (e.g., encoded video / image information) in bitstream form at NAL (Network Abstraction Layer) units. The video / image information may also include information about various parameter sets such as Adaptive Parameter Set (APS), Picture Parameter Set (PPS), Sequence Parameter Set (SPS), or Video Parameter Set (VPS). Additionally, the video / image information may include general constraint information. In this disclosure, information and / or syntax elements that transmit / signal notifications from the encoding device to the decoding device may be included in the video / image information. The video / image information may be encoded by the encoding process described above and included in a bitstream. The bitstream may be transmitted over a network or stored in a digital storage medium. The network may include broadcast networks and / or communication networks, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits a signal output from the entropy encoder 240 and / or a storage unit (not shown) that stores the signal may be included as internal / external components of the encoding device 200, and alternatively, the transmitter may be included in the entropy encoder 240.
[0064] The quantized transform coefficients output from quantizer 233 can be used to generate a prediction signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transform to the quantized transform coefficients using dequantizer 234 and inverse transformer 235. Adder 250 adds the reconstructed residual signal to the prediction signal output from inter-frame predictor 221 or intra-frame predictor 222 to generate a reconstructed signal (reconstructed image, reconstructed block, reconstructed sample array). If the block to be processed has no residual (such as when a skip mode is applied), the prediction block can be used as a reconstructed block. Adder 250 can be called a reconstructor or reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current image, and can be used for inter-frame prediction of the next image by filtering as described below.
[0065] In addition, Luminance Mapping and Chroma Scaling (LMCS) can be applied during image encoding and / or reconstruction.
[0066] Filter 260 can improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, filter 260 can generate a modified reconstructed image by applying various filtering methods to the reconstructed image and store the modified reconstructed image in memory 270 (specifically, the DPB of memory 270). Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc. Filter 260 can generate various filtering-related information and send the generated information to entropy encoder 240, as described later in the description of the various filtering methods. The filtering-related information can be encoded by entropy encoder 240 and output as a bitstream.
[0067] The modified reconstructed image sent to memory 270 can be used as a reference image in inter-frame predictor 221. When inter-frame prediction is applied through the encoding device, prediction mismatch between the encoding device 200 and the decoding device can be avoided, and encoding efficiency can be improved.
[0068] The DPB of memory 270 can store a modified reconstructed image used as a reference image in inter-frame predictor 221. Memory 270 can store motion information of blocks from which motion information in the current image is derived (or encoded) and / or motion information of reconstructed blocks in the image. The stored motion information can be sent to inter-frame predictor 221 and used as motion information for spatially or temporally neighboring blocks. Memory 270 can store reconstructed samples of reconstructed blocks in the current image and can transmit these reconstructed samples to intra-frame predictor 222.
[0069] Figure 3 This is a schematic diagram illustrating the configuration of a video / image decoding device to which embodiments of the present disclosure can be applied.
[0070] Reference Figure 3 The decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter-frame predictor 332 and an intra-frame predictor 331. The residual processor 320 may include an inverse quantizer 321 and an inverse transformer 322. According to embodiments, the entropy decoder 310, residual processor 320, predictor 330, adder 340, and filter 350 may be constructed from hardware components (e.g., a decoder chipset or processor). Additionally, the memory 360 may include a decoded image buffer (DPB) or may be constructed from a digital storage medium. The hardware components may also include the memory 360 as an internal / external component.
[0071] When the input includes a bitstream containing video / image information, the decoding device 300 can interact with... Figure 2 The processing of video / image information in the encoding device correspondingly reconstructs the image. For example, the decoding device 300 can deduce units / blocks based on block segmentation information obtained from the bitstream. The decoding device 300 can use a processor applied in the encoding device to perform decoding. Therefore, the decoding processor can be, for example, an encoding unit, and the encoding unit can be segmented from the encoding tree unit or the maximum encoding unit according to a quadtree structure, binary tree structure, and / or ternary tree structure. One or more transform units can be derived from the encoding unit. The reconstructed image signal decoded and output by the decoding device 300 can be reproduced by a reproduction device.
[0072] Decoding device 300 can receive data in bitstream form from... Figure 2The signal output by the encoding device can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets such as Adaptive Parameter Set (APS), Picture Parameter Set (PPS), Sequence Parameter Set (SPS), or Video Parameter Set (VPS). In addition, the video / image information may also include general constraint information. The decoding device can also decode the picture based on the information about the parameter sets and / or general constraint information. The signaling / receiving information and / or syntax elements described later in this disclosure can be decoded and obtained from the bitstream through the decoding process. For example, the entropy decoder 310 decodes the information in the bitstream based on encoding methods such as exponential Golomb coding, CAVLC, or CABAC, and outputs the quantized values of the syntax elements and transform coefficients of the residuals required for image reconstruction. More specifically, the CABAC entropy decoding method can receive a bin corresponding to each syntax element in the bitstream, determine the context model using information about the target syntax element, decoding information about the target block, or information about symbols / bins decoded in previous stages, and perform arithmetic decoding on the bin by predicting the occurrence probability of the bin based on the determined context model, generating symbols corresponding to the value of each syntax element. In this case, after determining the context model, the CABAC entropy decoding method can update the context model by using the information of the decoded symbols / bins for the context model of the next symbol / bin. Prediction-related information from the information decoded by the entropy decoder 310 can be provided to the predictors (inter-frame predictor 332 and intra-frame predictor 331), and the residual values (i.e., quantization transform coefficients and related parameter information) from which entropy decoding was performed in the entropy decoder 310 can be input to the residual processor 320. The residual processor 320 can derive the residual signals (residual blocks, residual samples, residual sample arrays). Additionally, filtering information from the information decoded by the entropy decoder 310 can be provided to the filter 350. Furthermore, the receiver (not shown) for receiving the signal output from the encoding device can be further configured as an internal / external element of the decoding device 300, or the receiver can be a component of the entropy decoder 310. Additionally, the decoding device according to this disclosure can be referred to as a video / image / picture decoding device, and the decoding device can be classified as an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoder 310, and the sample decoder may include at least one of an inverse quantizer 321, an inverse transformer 322, an adder 340, a filter 350, a memory 360, an inter-frame predictor 332, and an intra-frame predictor 331.
[0073] The dequantizer 321 can dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 321 can rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement can be performed based on the coefficient scan order executed in the encoding device. The dequantizer 321 can also dequantize the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain the transform coefficients.
[0074] The inverse transformer 322 performs an inverse transformation on the transformation coefficients to obtain the residual signal (residual block, residual sample array).
[0075] The predictor can perform prediction on the current block and generate a prediction block that includes the prediction samples of the current block. The predictor can determine whether to apply intra-frame prediction or inter-frame prediction to the current block based on the prediction information output from the entropy decoder 310, and can determine the specific intra-frame / inter-frame prediction mode.
[0076] The predictor can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra-frame prediction or inter-frame prediction to predict a block, but can also apply both intra-frame prediction and inter-frame prediction simultaneously. This can be referred to as combined intra-frame and inter-frame prediction (CIIP). Alternatively, the predictor can predict blocks based on an intra-block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or palette mode can be used for content image / video coding, such as screen content coding (SCC), for games, etc. IBC essentially performs prediction within the current image, but can be performed similarly to inter-frame prediction because a reference block is derived within the current image. That is, IBC can use at least one of the inter-frame prediction techniques described in this disclosure. The palette mode can be considered an example of intra-frame coding or intra-frame prediction. When applying a palette mode, sample values within the image can be signaled based on information about the palette table and palette index.
[0077] Intra-predictor 331 can predict the current block by referencing samples in the current image. Depending on the prediction mode, the referenced samples may be located near or far from the current block. In intra-prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. Intra-predictor 331 can determine the prediction mode applied to the current block by using prediction modes applied to neighboring blocks.
[0078] Inter-frame predictor 332 can deduce the predicted block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference image. In this case, to reduce the amount of motion information transmitted in the inter-frame prediction mode, motion information can be predicted on a block, sub-block, or sample basis based on the correlation of motion information between neighboring blocks and the current block. Motion information may include motion vectors and reference image indices. Motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, neighboring blocks may include spatially neighboring blocks existing in the current image and temporally neighboring blocks existing in the reference image. For example, inter-frame predictor 332 can configure a motion information candidate list based on neighboring blocks and deduce the motion vector and / or reference image index of the current block based on the received candidate selection information. Inter-frame prediction can be performed based on various prediction modes, and the information about the prediction may include information indicating the mode of inter-frame prediction for the current block.
[0079] Adder 340 can generate a reconstruction signal (reconstructed image, reconstruction block, reconstruction sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including inter-frame predictor 332 and / or intra-frame predictor 331). If the block to be processed has no residual (e.g., when a skip mode is applied), the prediction block can be used as the reconstruction block.
[0080] Adder 340 can be called a reconstructor or reconstruction block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current image, through filtering output as described below, or it can be used for inter-frame prediction of the next image.
[0081] In addition, Luminance Mapping and Chromaticity Scaling (LMCS) can be applied during image decoding.
[0082] Filter 350 can improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, filter 350 can generate a modified reconstructed image by applying various filtering methods to the reconstructed image and store the modified reconstructed image in memory 360 (specifically, the DPB of memory 360). Various filtering methods may include, for example, deblocking filtering, adaptive sample shifting, adaptive loop filtering, bilateral filtering, etc.
[0083] The (modified) reconstructed image stored in the DPB of memory 360 can be used as a reference image in inter-frame predictor 332. Memory 360 can store motion information of blocks from which motion information in the current image is derived (or decoded) and / or motion information of reconstructed blocks in the image. The stored motion information can be sent to inter-frame predictor 332 for use as motion information of spatially or temporally neighboring blocks. Memory 360 can store reconstructed samples of reconstructed blocks in the current image and can transmit the reconstructed samples to intra-frame predictor 331.
[0084] In this disclosure, the embodiments described in the filter 260, inter-frame predictor 221, and intra-frame predictor 222 of the encoding device 200 can be the same as, or applied to, the filter 350, inter-frame predictor 332, and intra-frame predictor 331 of the decoding device 300, respectively. The same content can also be applied to the inter-frame predictor 332 and intra-frame predictor 331.
[0085] In this disclosure, at least one of quantization / inverse quantization and / or transformation / inverse transformation may be omitted. When quantization / inverse quantization is omitted, the transformation coefficients of the quantization may be referred to as transformation coefficients. When transformation / inverse transformation is omitted, the transformation coefficients may be referred to as coefficients or residual coefficients, or for the sake of consistency, they may still be referred to as transformation coefficients.
[0086] In this disclosure, quantization transform coefficients and transform coefficients can be referred to as transform coefficients and scaling transform coefficients, respectively. In this case, residual information can include information about the transform coefficients, and this information can be signaled via residual coding syntax. Transform coefficients can be derived based on residual information (or information about the transform coefficients), and scaling transform coefficients can be derived by inverse transforming (scaling) the transform coefficients. Residual samples can be derived based on the inverse transform (scaling) of the scaling transform coefficients. This can also be applied / expressed in other parts of this disclosure.
[0087] Furthermore, as mentioned above, prediction is performed during video encoding to improve compression efficiency. This generates a prediction block, including prediction samples for the current block, as the block to be encoded (i.e., the target block for encoding). Here, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block is derived in the same manner in both the encoding and decoding devices, and the encoding device can signal the decoding device with information about the residual between the original block and the prediction block (residual information), rather than the original sample values of the original block, thereby improving image encoding efficiency. The decoding device can derive a residual block including residual samples based on the residual information, add the residual block and the prediction block to generate a reconstructed block including reconstructed samples, and generate a reconstructed image including the reconstructed block.
[0088] Residual information can be generated through transformation and quantization processes. For example, the encoding device can derive a residual block between the original block and the prediction block, perform a transformation process on the residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization process on the transform coefficients to derive quantized transform coefficients, and signal the relevant residual information (via bitstream) to the decoding device. Here, the residual information may include the values of the quantized transform coefficients, their positions, the transform technique, the transform core, and the values of quantization parameters. The decoding device can perform dequantization / inverse transform processes based on the residual information and derive residual samples (or residual blocks). The decoding device can generate a reconstructed image based on the prediction block and the residual block. Furthermore, as a reference for inter-frame prediction of subsequent reference images, the encoding device can dequantize / inverse transform the quantized transform coefficients to derive residual blocks and generate a reconstructed image based on them.
[0089] Intra-frame prediction can refer to the prediction of a block based on reference samples in the image to which the current block belongs (hereinafter referred to as the current image). When intra-frame prediction is applied to the current block, neighboring reference samples to be used for intra-frame prediction of the current block can be derived. The neighboring reference samples of the current block may include samples adjacent to the left boundary of the current block of size nW×nH and a total of 2×nH samples adjacent to the lower left of the current block, samples adjacent to the top boundary of the current block and a total of 2×nW samples adjacent to the upper right of the current block and a sample adjacent to the upper left of the current block. Alternatively, the neighboring reference samples of the current block may include multiple column top neighbor samples and multiple row left neighbor samples. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nW×nH, a total of nW samples adjacent to the bottom boundary of the current block, and a sample adjacent to the lower right boundary of the current block.
[0090] However, some neighboring reference samples of the current block have not yet been decoded or may be unavailable. In this case, the decoder can construct neighboring reference samples to be used for prediction by replacing unavailable samples with available samples. Alternatively, the neighboring reference samples to be used for prediction can be configured by interpolating the available samples.
[0091] When deriving neighboring reference samples, (i) the predicted sample can be derived based on the average or interpolation of the neighboring reference samples of the current block, or (ii) the predicted sample can be derived based on a reference sample among the neighboring reference samples of the current block that exists in a specific (predictive) direction relative to the predicted sample. Case (i) can be referred to as non-directional mode or non-angular mode, while case (ii) can be referred to as directional mode or angular mode.
[0092] Alternatively, prediction samples can be generated by interpolating the first neighboring sample in the prediction direction of the intra-prediction mode within the current block and the second neighboring sample in the opposite direction among the neighboring reference samples, based on the prediction samples of the current block. This can be called Linear Interpolation Intra-Prediction (LIP). Additionally, a linear model (LM) can be used to generate chroma prediction samples based on luminance samples. This can be called LM mode or Chromatic Component LM (CCLM) mode.
[0093] Additionally, provisional prediction samples for the current block can be derived based on filtered neighboring reference samples, and prediction samples for the current block can also be derived by weighted summing of at least one reference sample derived from the intra-prediction mode in existing neighboring reference samples (i.e., unfiltered neighboring reference samples) and the provisional prediction sample. This process can be referred to as position-dependent intra-prediction (PDPC).
[0094] Alternatively, the reference sample line with the highest prediction accuracy is selected from among the neighboring reference sample lines of the current block, and the prediction sample is derived using reference samples located in the prediction direction of the selected line. In this case, intra-frame prediction coding can be performed by instructing (signaling) the reference sample line used to the decoding device. This situation can be called multi-reference line intra-frame prediction or MRL-based intra-frame prediction.
[0095] Furthermore, the current block is divided into vertical or horizontal sub-partitions, and intra-prediction is performed based on the same intra-prediction mode. However, neighboring reference samples can be derived and used on a sub-partition basis. That is, in this case, the intra-prediction mode of the current block is applied equally to the sub-partitions, but in some cases, intra-prediction performance can be improved by deriving and using neighboring reference samples on a sub-partition basis. This prediction method can be called intra-prediction based on internal sub-partitions (ISP).
[0096] The intra-prediction methods described above can be referred to as intra-prediction types to distinguish them from intra-prediction modes. Intra-prediction types can be referred to by various terms such as intra-prediction techniques or additional intra-prediction modes. For example, an intra-prediction type (or additional intra-prediction mode, etc.) can include at least one of LIP, PDPC, MRL, and ISP described above. A general intra-prediction method that excludes specific intra-prediction types such as LIP, PDPC, MRL, and ISP can be referred to as a normal intra-prediction type. When no specific intra-prediction type is applied, a normal intra-prediction type can typically be applied, and prediction can be performed based on the intra-prediction modes described above. Furthermore, post-processing filtering can be performed on the derived prediction samples if necessary.
[0097] Specifically, intra-frame prediction processing may include an intra-frame prediction mode / type determination step, a neighboring reference sample derivation step, and a prediction sample derivation step based on the intra-frame prediction mode / type. Furthermore, if necessary, a post-filtering step may be performed on the derived prediction samples.
[0098] When applying intra-prediction, the intra-prediction modes of neighboring blocks can be used to determine the intra-prediction mode to be applied to the current block. For example, the decoding device can choose one of the most probable mode (MPM) candidates derived from the intra-prediction modes of the current block's neighboring blocks (e.g., the left neighboring block and / or the top neighboring block) and additional candidate modes, or choose one of the remaining intra-prediction modes (and planar modes) not included in the MPM candidates, based on remaining intra-prediction mode information. The MPM list can be configured to include or exclude planar modes as candidates. For example, the MPM list can have 6 candidates when it includes planar modes as candidates, and 5 candidates when it excludes planar modes as candidates. When the MPM list excludes planar modes as candidates, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra-prediction mode of the current block is not a planar mode can be signaled. For example, the MPM flag can be signaled first, and the MPM index and non-planar flag can be signaled when the MPM flag is 1. Furthermore, when the non-flat flag is 1, the MPM index can be signaled. Here, the MPM list is configured not to include flat patterns as candidates because flat patterns are always considered MPMs, and non-flat patterns are not MPMs. Therefore, the flag (non-flat flag) is first signaled to check if it is a flat pattern.
[0099] For example, MPM flags (e.g., `intra_luma_mpm_flag`) can be used to indicate whether the intra-prediction mode applied to the current block is among the MPM candidates (and planar modes) or among the remaining modes. An MPM flag of 1 indicates that the intra-prediction mode of the current block is among the MPM candidates (and planar modes), and an MPM flag of 0 indicates that the intra-prediction mode of the current block is not among the MPM candidates (and planar modes). A non-planar flag of 0 (e.g., `intra_luma_not_planar_flag`) indicates that the intra-prediction mode of the current block is planar, and a non-planar flag of 1 indicates that the intra-prediction mode of the current block is not planar. The MPM index can be signaled in the form of `mpm_idx` or `intra_luma_mpm_idx` syntax elements, and the remaining intra-prediction mode information can be signaled in the form of `rem_intra_luma_pred_mode` or `intra_luma_mpm_remainder` syntax elements. For example, the remaining intra-prediction mode information can be indexed in order of prediction mode number to indicate one of the remaining intra-prediction modes not included in the MPM candidates (and planar modes) among all intra-prediction modes. The intra-prediction mode can be an intra-prediction mode for the luma component (samples). In the following, the intra-prediction mode information may include at least one of the following: an MPM flag (e.g., intra_luma_mpm_flag), a non-planar flag (e.g., intra_luma_not_planar_flag), an MPM index (e.g., mpm_idx or intra_luma_mpm_idx), or remaining intra-prediction mode information (rem_intra_luma_luma_mpm_mode or intra_luma_mpminder). In this disclosure, the MPM list may be referred to by various terms such as the MPM candidate list and candModeList. When a MIP is applied to the current block, the MIP’s individual MPM flags (e.g., intra_mip_mpm_flag), MPM index (e.g., intra_mip_mpm_idx), and remaining intra-prediction mode information (e.g., intra_mip_mpm_remainder) can be signaled, while the non-plane flags can be left unsigned.
[0100] In other words, when performing block segmentation of an image, the current block to be encoded and its neighboring blocks typically have similar image characteristics. Therefore, there is a high probability that the current block and its neighboring blocks have the same or similar intra-prediction modes. Thus, the encoder can use the intra-prediction modes of neighboring blocks to encode the intra-prediction mode of the current block.
[0101] For example, the decoding / encoding device can construct a list of most probable modes (MPMs) for the current block. This MPM list can be referred to as an MPM candidate list. Here, MPM can refer to a mode used to improve coding efficiency during intra-frame prediction mode coding, taking into account the similarity between the current block and neighboring blocks. As mentioned above, the MPM list can be constructed to include planar modes, or it can be constructed to exclude planar modes. For example, when the MPM list includes planar modes, the number of candidates in the MPM list can be 6. And when the MPM list does not include planar modes, the number of candidates in the MPM list can be 5.
[0102] The encoder / decoder can construct an MPM list that includes five or six MPMs.
[0103] To construct an MPM list, three types of modes can be considered, such as default intra-frame mode, neighboring intra-frame mode, and deduced intra-frame mode.
[0104] For the near-intra-frame mode, two neighboring blocks can be considered (i.e., the left neighboring block and the top neighboring block).
[0105] As mentioned above, if the MPM list is constructed to exclude planar patterns, then planar patterns can be excluded from the list, and the number of candidates in the MPM list can be set to five.
[0106] In addition, non-directional (or non-angular) modes in intra-frame prediction modes can include DC modes based on the average of neighboring reference samples of the current block or planar modes based on interpolation.
[0107] Furthermore, when applying inter-frame prediction, the predictor of the encoding / decoding device can derive prediction samples by performing inter-frame prediction on a block-by-block basis. Inter-frame prediction can be applied when performing prediction on the current block. That is, the predictor of the encoding / decoding device (more specifically, the inter-frame predictor) can derive prediction samples by performing inter-frame prediction on a block-by-block basis. Inter-frame prediction can represent a prediction derived by a method that depends on data elements (e.g., sample values or motion information) of images other than the current image. When applying inter-frame prediction to the current block, the prediction block (prediction sample array) of the current block can be derived based on the reference block (reference sample array) specified by the motion vector on the reference image indicated by the reference image index. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, the motion information of the current block can be predicted on a block, sub-block, or sample-by-sample basis based on the correlation of motion information between neighboring blocks and the current block. Motion information can include motion vectors and reference image indices. Motion information can also include inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the application of inter-frame prediction, neighboring blocks can include spatially neighboring blocks present in the current image and temporally neighboring blocks present in a reference image. The reference image including the reference block and the reference image including the temporally neighboring block can be the same as or different from each other. The temporally neighboring block can be referred to by names such as juxtaposed reference block, juxtaposed CU (colCU), etc., and the reference image including the temporally neighboring block can be referred to as the juxtaposed image (colPic). For example, a motion information candidate list can be configured based on the neighboring blocks of the current block, and a flag or index information indicating which candidate to select (use) can be signaled to derive the motion vector of the current block and / or the reference image index. Inter-frame prediction can be performed based on various prediction modes, and for example, in skip mode and merge mode, the motion information of the current block can be the same as the motion information of the selected neighboring block. In skip mode, residual signaling is not required as in merge mode. In motion vector prediction (MVP) mode, the motion vector of the selected neighboring block can be used as a motion vector predictor, and the motion vector difference can be signaled. In this case, the motion vector of the current block can be derived using the sum of the motion vector predictor and the motion vector difference.
[0108] Depending on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), motion information can further include L0 motion information and / or L1 motion information. The L0 direction motion vector can be referred to as the L0 motion vector or MVL0, and the L1 direction motion vector can be referred to as the L1 motion vector or MVL1. Prediction based on the L0 motion vector can be called L0 prediction, prediction based on the L1 motion vector can be called L1 prediction, and prediction based on both L0 and L1 motion vectors can be called bi-prediction. Here, the L0 motion vector can indicate the motion vector associated with the reference image list L0, and the L1 motion vector can indicate the motion vector associated with the reference image list L1. The reference image list L0 can include images preceding the current image in output order, and the reference image list L1 can include images following the current image in output order, serving as reference images. The previous image can be referred to as the forward (reference) image, and the subsequent image can be referred to as the backward (reference) image. The reference image list L0 can further include images following the current image in output order, serving as reference images. In this scenario, previous images can be indexed first in the reference image list L0, and then subsequent images can be indexed. The reference image list L1 can further include images that precede the current image in the output order as reference images. In this case, subsequent images can be indexed first in the reference image list L1, and then previous images can be indexed. Here, the output order can correspond to the image order counting (POC) order.
[0109] The video / image coding process based on inter-frame prediction can schematically include, for example, the following.
[0110] Figure 4 An example of a video / image coding method based on inter-frame prediction is shown.
[0111] The encoding device performs inter-frame prediction on the current block (S400). The encoding device can deduce the inter-frame prediction mode and motion information of the current block and generate prediction samples for the current block. Here, the inter-frame prediction mode determination process, the motion information derivation process, and the prediction sample generation process can be executed simultaneously, and any one of these processes can be executed earlier than the others. For example, the inter-frame prediction unit of the encoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit can determine the prediction mode for the current block, the motion information derivation unit can deduce the motion information of the current block, and the prediction sample derivation unit can deduce the prediction samples for the current block. For example, the inter-frame prediction unit of the encoding device can search for blocks similar to the current block in a predetermined region (search region) of a reference image through motion estimation, and deduce a reference block whose difference from the current block is the smallest or equal to or less than a predetermined criterion. Based on this derivation, a reference image index of the reference image in which the reference block is located can be indicated, and a motion vector can be derived based on the positional difference between the reference block and the current block. The encoding device can determine the mode applicable to the current block among various prediction modes. The encoding device can compare the RD costs of various prediction modes and determine the best prediction mode for the current block.
[0112] For example, when a skip mode or merge mode is applied to the current block, the encoding device can configure a merge candidate list (described below) and deduce a reference block among the reference blocks indicated by the merge candidates included in the merge candidate list that has a difference from the current block that is smallest, equal to, or less than a predetermined standard. In this case, the merge candidate associated with the deduced reference block can be selected, and merge index information indicating the selected merge candidate can be generated and signaled to the decoding device. The motion information of the current block can be deduced using the motion information of the selected merge candidate.
[0113] As another example, when the (A)MVP mode is applied to the current block, the encoding device can configure an (A)MVP candidate list, as described below, and use the motion vector of the selected MVP candidate from among the motion vector predictor (MVP) candidates included in the (A)MVP candidate list as the MVP of the current block. In this case, for example, the motion vector of a reference block derived through motion estimation can be used as the motion vector of the current block, and the MVP candidate with the motion vector having the smallest difference from the motion vector of the current block can be selected as the MVP candidate. The motion vector difference (MVD) can be derived by subtracting the MVP from the motion vector of the current block. In this case, information about the MVD can be signaled to the decoding device. Furthermore, when the (A)MVP mode is applied, the value of the reference picture index can be configured as reference picture index information and signaled to the decoding device separately.
[0114] The encoding device can derive residual samples based on the predicted samples (S410). The encoding device can derive residual samples by comparing the original samples and the predicted samples of the current block.
[0115] The encoding device encodes image information, including prediction information and residual information (S420). The encoding device can output the encoded image information in the form of a bitstream. The prediction information may include information about prediction mode information (e.g., skip flag, merge flag, or mode index, etc.) and information about motion information, as information related to the prediction process. The information about motion information may include candidate selection information (e.g., merge index, MVP flag, or MVP index), which is information used to derive motion vectors. In addition, the information about motion information may include information about MVD and / or reference image index information. Furthermore, the information about motion information may include information indicating whether L0 prediction, L1 prediction, or dual prediction is applied. The residual information is information about residual samples. The residual information may include information about the quantization transform coefficients used for the residual samples.
[0116] The output bitstream can be stored in a (digital) storage medium and transmitted to a decoding device, or transmitted to a decoding device via a network.
[0117] Furthermore, as mentioned above, the encoding device can generate a reconstructed image (including reconstructed samples and reconstructed blocks) based on reference samples and residual samples. This is to derive the same prediction result as that performed by the decoding device, and as a result, encoding efficiency can be improved. Therefore, the encoding device can store the reconstructed image (or reconstructed samples or reconstructed blocks) in memory and use the reconstructed image as a reference image. As mentioned above, in-loop filtering can be further applied to the reconstructed image.
[0118] Video / image decoding processing based on inter-frame prediction can schematically include, for example, the following.
[0119] Figure 5 An example of a video / image decoding method based on inter-frame prediction is shown.
[0120] Reference Figure 5 The decoding device can perform operations corresponding to those performed by the encoding device. The decoding device can perform predictions on the current block and derive prediction samples based on the received prediction information.
[0121] Specifically, the decoding device can determine the prediction mode of the current block based on the received prediction information (S500). The decoding device can determine which inter-frame prediction mode to apply to the current block based on the prediction mode information in the prediction information.
[0122] For example, a merge flag can be used to determine whether merge mode or (A)MVP mode is applied to the current block. Alternatively, a variety of inter-frame prediction mode candidates can be selected based on a mode index. Inter-frame prediction mode candidates may include skip mode, merge mode, and / or (A)MVP mode, or may include various inter-frame prediction modes described below.
[0123] The decoding device derives motion information for the current block based on the determined inter-frame prediction mode (S510). For example, when a skip mode or merge mode is applied to the current block, the decoding device can be configured with a merge candidate list described below, and select a merge candidate from among the merge candidates included in the merge candidate list. Here, the selection can be performed based on selection information (merge index). The motion information for the current block can be derived using the motion information of the selected merge candidate. The motion information of the selected merge candidate can be used as the motion information for the current block.
[0124] As another example, when the (A)MVP mode is applied to the current block, the decoding device can configure an (A)MVP candidate list, as described below, and use the motion vector of the selected MVP candidate from among the motion vector prediction sub-candidates (MVPs) included in the (A)MVP candidate list as the MVP of the current block. Here, selection can be performed based on selection information (MVP flags or MVP indices). In this case, the MVD of the current block can be derived based on information about the MVD, and the motion vector of the current block can be derived based on the MVP and MVD of the current block. Furthermore, the reference image index of the current block can be derived based on reference image index information. The image indicated by the reference image index in the reference image list for the current block can be derived as the reference image referenced by the inter-frame prediction of the current block.
[0125] Furthermore, as described below, the motion information of the current block can be derived without a candidate list configuration, and in this case, the motion information of the current block can be derived based on the process disclosed in the prediction mode. In this case, the candidate list configuration can be omitted.
[0126] The decoding device can generate prediction samples for the current block based on the motion information of the current block (S520). In this case, a reference image can be derived based on the reference image index of the current block, and prediction samples for the current block can be derived by using samples of the reference block indicated by the motion vector of the current block on the reference image. In some cases, a prediction sample filtering process for all or some of the prediction samples for the current block can be further performed.
[0127] For example, the inter-frame prediction unit of the decoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit may determine the prediction mode for the current block based on the received prediction mode information. The motion information derivation unit may derive the motion information (motion vector and / or reference image index) of the current block based on information about the received motion information. The prediction sample derivation unit may derive the prediction samples of the current block.
[0128] The decoding device generates residual samples for the current block based on the received residual information (S530). The decoding device can generate reconstruction samples for the current block based on the predicted samples and residual samples, and generate a reconstructed image based on the generated reconstruction samples (S540). Thereafter, as described above, the in-loop filtering process can be further applied to the reconstructed image.
[0129] Figure 6 The inter-frame prediction process is illustrated schematically.
[0130] Reference Figure 6 As described above, the inter-frame prediction process may include an inter-frame prediction mode determination step, a motion information derivation step based on the determined prediction mode, and a prediction processing step (prediction sample generation) based on the derivation of motion information. The inter-frame prediction process may be performed by the encoding and decoding devices described above. In this document, the encoding device may include an encoding device and / or a decoding device.
[0131] Reference Figure 6 The encoding device determines the inter-frame prediction mode for the current block (S600). Various inter-frame prediction modes can be used for the prediction of the current block in the image. For example, various modes can be used, such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, merge with MVD (MMVD) mode, and history motion vector prediction (HMVP) mode. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, dual prediction with CU-level weights (BCW), and bidirectional optical flow (BDOF) can be further used as additional modes. Affine mode can also be called affine motion prediction mode. MVP mode can also be called advanced motion vector prediction (AMVP) mode. In this paper, some modes and / or motion information candidates derived from some modes can also be included in one of the motion information-related candidates in other modes. For example, HMVP candidates can be added to the merge candidates of merge / skip mode, or to the MVP candidates of MVP mode. If an HMVP candidate is used as a motion information candidate for merge mode or skip mode, then the HMVP candidate can be called an HMVP merge candidate.
[0132] Prediction mode information, indicating the inter-frame prediction mode of the current block, can be signaled from the encoding device to the decoding device. In this case, the prediction mode information can be included in the bitstream and received by the decoding device. The prediction mode information may include index information indicating one of a plurality of candidate modes. Alternatively, the inter-frame prediction mode can be indicated by hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, a skip flag can be signaled to indicate whether a skip mode is applied; a merge flag can be signaled to indicate whether a merge mode is applied when a skip mode is not applied; and an MVP mode can be signaled when a merge mode is not applied, or further flags for additional differentiation can be signaled. Affine modes can be signaled as independent modes or as subordinate modes to merge or MVP modes. For example, affine modes may include affine merge mode and affine MVP mode.
[0133] The encoding device derives motion information for the current block (S610). Motion information derivation can be based on inter-frame prediction modes.
[0134] The encoding device can perform inter-frame prediction using motion information from the current block. The encoding device can derive the optimal motion information for the current block through a motion estimation process. For example, the encoding device can use an original block from the original image used for the current block, search for highly correlated similar reference blocks within a predetermined search range in a reference image, on a fractional pixel basis, and derive motion information using the searched reference blocks. Block similarity can be derived based on the difference in phase-based sample values. For example, block similarity can be calculated based on the sum of absolute differences (SAD) between the current block (or its template) and a reference block (or its template). In this case, motion information can be derived based on the reference block with the minimum SAD in the search region. The derived motion information can be signaled to the decoding device based on the inter-frame prediction mode, according to various methods.
[0135] The encoding device performs inter-frame prediction based on motion information for the current block (S620). The encoding device can derive one or more prediction samples for the current block based on the motion information. The current block, which includes the prediction samples, can be called the prediction block.
[0136] Furthermore, as mentioned above, the encoding device can perform various encoding methods such as exponentia Golomb, context-adaptive variable-length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). Additionally, the decoding device can decode information in the bitstream based on encoding methods such as exponentia Golomb coding, CAVLC, or CABAC, and output the values of the syntax elements required for image reconstruction and the quantized values of the transform coefficients associated with the residuals.
[0137] For example, the above encoding method can be performed as follows.
[0138] Figure 7 An example is illustrated using Context Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements. For instance, in CABAC encoding processing, when the input signal is a syntax element rather than a binary value, the encoding device can convert the input signal into a binary value by binarizing the value of the input signal. Alternatively, when the input signal is already a binary value (i.e., when the value of the input signal is binary), binarization can be skipped and bypassed. Here, each binary number 0 or 1 that constitutes the binary value can be referred to as a bin. For example, if the binarized binary string is 110, then each of 1, 1, and 0 can be referred to as a bin. The bin for a syntax element can indicate the value of the syntax element.
[0139] Subsequently, the binary representation of the syntax elements (bins) can be input into either the regular encoding engine or the bypass encoding engine. The regular encoding engine of the encoding device can assign a context model reflecting probability values to the corresponding bin and encode the corresponding bin based on the assigned context model. The regular encoding engine of the encoding device can update the context model for each bin after encoding each bin. The bin encoded as described above can be referred to as a context-encoded bin.
[0140] Furthermore, when the binary bins of syntax elements are input to the bypass coding engine, they can be encoded as follows. For example, the bypass coding engine of the encoding device omits the process of estimating the probability of the input bins and the process of updating the probability model applied to the bins after encoding. When bypass coding is applied, the encoding device can improve the encoding speed by applying a uniform probability distribution instead of assigning a context model to encode the input bins. The bins encoded as described above can be called bypass bins.
[0141] Entropy decoding can represent a process that performs the same process as entropy encoding described above in reverse order.
[0142] For example, when decoding a syntax element based on a context model, the decoding device can receive the bin corresponding to the syntax element via a bitstream, determine the context model using the syntax element and decoding information of the target block or neighboring blocks, or information of symbols / bins decoded in the previous stage, predict the probability of occurrence of the received bin based on the determined context model, and perform arithmetic decoding on the bin to derive the value of the syntax element. Subsequently, the determined context model can be used to update the context model of the decoded bin.
[0143] Furthermore, for example, when a syntax element is bypassed and decoded, the decoding device can receive the bin corresponding to the syntax element via a bitstream and decode the input bin by applying a uniform probability distribution. In this case, the process of deriving the context model for the syntax element and the process of updating the context model applied to the bin after decoding can be omitted.
[0144] As described above, residual samples can be derived into quantized transform coefficients through transformation and quantization processing. Quantized transform coefficients can also be referred to as transform coefficients. In this case, the transform coefficients in the block can be signaled in the form of residual information. The residual information can include residual coding syntax. That is, the encoding device can configure the residual coding syntax using the residual information, encode it, and output it as a bitstream, and the decoding device can decode the residual coding syntax from the bitstream and derive the residual (quantized) transform coefficients. The residual coding syntax can include syntax elements indicating whether a transform is applied to the corresponding block, the position of the last valid transform coefficient in the block, whether valid transform coefficients exist in the sub-block, the size / sign of the valid transform coefficients, etc., as described later.
[0145] For example, syntax elements related to residual data encoding / decoding can be represented as shown in the table below.
[0146] [Table 1]
[0147]
[0148]
[0149]
[0150] The `transform_skip_flag` indicates whether a transform was skipped in the associated block. `transform_skip_flag` can be a syntax element of the transform skip flag. The associated block can be a coded block (CB) or a transform block (TB). CB and TB can be used interchangeably regarding the transform (and quantization) and residual encoding processes. For example, as mentioned above, residual samples can be derived for a CB, and transform coefficients can be derived (quantized) by transforming and quantizing the residual samples. Information (e.g., syntax elements) indicating the position, size, sign, etc., of the (quantized) transform coefficients can be generated and signaled efficiently through the residual encoding process. Quantized transform coefficients can be simply referred to as transform coefficients. Typically, when the CB is not greater than the maximum TB, the size of the CB can be the same as the size of the TB, and in this case, the target block to be transformed (and quantized) and residual encoded can be referred to as either a CB or a TB. Furthermore, when the CB is greater than the maximum TB, the target block to be transformed (and quantized) and residual encoded can be referred to as a TB. The following will describe signaling of syntax elements related to residual coding in units of transform blocks (TBs), but this is just an example, and as mentioned above, TBs can be used interchangeably with code blocks (CBs).
[0151] Furthermore, the syntax elements for signaling after the signaling change skip flag can be the same as those disclosed in Tables 2 and / or 3 below, and a detailed description of the syntax elements is described below.
[0152] [Table 2]
[0153]
[0154]
[0155]
[0156]
[0157]
[0158]
[0159] [Table 3]
[0160]
[0161]
[0162]
[0163] According to this embodiment, as shown in Table 1, residual coding can be divided based on the value of the transform_skip_flag syntax element. That is, different syntax elements can be used for residual coding based on the value of the transform skip flag (based on whether the transform is skipped). The residual coding used when no transform skip is applied (i.e., when the transform is applied) can be called regular residual coding (RRC), while the residual coding used when transform skip is applied (i.e., when no transform is applied) can be called transform skip residual coding (TSRC). In addition, regular residual coding can be called general residual coding. Furthermore, regular residual coding can be called regular residual coding syntax structure, and transform skip residual coding can be called transform skip residual coding syntax structure. Table 2 above shows the syntax elements of residual coding when the value of transform_skip_flag is 0 (i.e., when the transform is applied), and Table 3 above shows the syntax elements of residual coding when the value of transform_skip_flag is 1 (i.e., when no transform is applied).
[0164] Specifically, for example, a transform skip flag indicating whether to skip a transform block can be parsed, and it can be determined whether the transform skip flag is 1. If the transform skip flag is 0, then as shown in Table 2, the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gtx_flag, par_level_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level for the residual coefficients of the transform block can be parsed, and the residual coefficients can be derived based on the syntax elements. In this case, the syntax elements can be parsed sequentially, and the parsing order can be changed. Additionally, abs_level_gtx_flag can represent abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n] could be an example of the first transform coefficient level flag (abs_level_gt1_flag), and abs_level_gtx_flag[n] could be an example of the second transform coefficient level flag (abs_level_gt3_flag).
[0165] Referring to Table 2 above, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level can be encoded / decoded. Furthermore, sb_coded_flag can be represented as coded_sub_block_flag.
[0166] In the implementation, the encoding device can encode the (x, y) position information of the last non-zero transform coefficient in the transform block based on the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. More specifically, last_sig_coeff_x_prefix represents the prefix of the column position of the last valid coefficient in the transform block according to the scan order, last_sig_coeff_y_prefix represents the prefix of the row position of the last valid coefficient in the transform block according to the scan order, last_sig_coeff_x_suffix represents the suffix of the column position of the last valid coefficient in the transform block according to the scan order, and last_sig_coeff_y_suffix represents the suffix of the row position of the last valid coefficient in the transform block according to the scan order. Here, a valid coefficient can represent a non-zero coefficient. Furthermore, the scan order can be a right-angled diagonal scan order. Alternatively, the scan order can be a horizontal scan order or a vertical scan order. The scan order can be determined based on whether intra-frame prediction / inter-frame prediction and / or a specific intra-frame prediction / inter-frame prediction mode is applied to the target block (CB or CB including TB).
[0167] After this, the encoding device can divide the transform block into 4×4 sub-blocks, and then use a 1-bit syntax element coded_sub_block_flag for each 4×4 sub-block to indicate whether there are non-zero coefficients in the current sub-block.
[0168] If the value of `coded_sub_block_flag` is 0, no more information needs to be sent, and therefore the encoding device can terminate the encoding process for the current sub-block. Conversely, if the value of `coded_sub_block_flag` is 1, the encoding device can continuously perform encoding processing on `sig_coeff_flag`. Since sub-blocks containing the last non-zero coefficients do not need to encode `coded_sub_block_flag`, and sub-blocks containing DC information of the transform block have a high probability of including non-zero coefficients, `coded_sub_block_flag` may not be encoded and its value can be assumed to be 1.
[0169] If the value of `coded_sub_block_flag` is 1, thus indicating the presence of a non-zero coefficient in the current subblock, the encoding device can encode the `sig_coeff_flag` with its binary value according to the reverse scan order. The encoding device can encode the 1-bit syntax element `sig_coeff_flag` for each transform coefficient according to the scan order. If the value of the transform coefficient at the current scan position is not 0, the value of `sig_coeff_flag` can be 1. Here, in the case of subblocks including the last non-zero coefficient, `sig_coeff_flag` does not need to be encoded for the last non-zero coefficient, and therefore the encoding process for the subblock can be omitted. Level information encoding can only be performed when `sig_coeff_flag` is 1, and four syntax elements can be used in the level information encoding process. More specifically, each `sig_coeff_flag[xC][yC]` can indicate whether the level (value) of the corresponding transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero. In implementation, sig_coeff_flag may correspond to an example of a syntax element that indicates whether the quantized transform coefficients are non-zero valid coefficients.
[0170] The remaining level value after encoding sig_coeff_flag can be derived as shown in the following formula. That is, the syntax element remAbsLevel, which indicates the level value to be encoded, can be derived from the following formula.
[0171] [Formula 1]
[0172]
[0173] In this article, coeff refers to the actual transformation coefficient value.
[0174] Additionally, `abs_level_gt1_flag` can indicate whether `remAbsLevel'` at the corresponding scan position (n) is greater than 1. For example, when the value of `abs_level_gt1_flag` is 0, the absolute value of the transform coefficient at the corresponding position can be 1. Furthermore, when the value of `abs_level_gt1_flag` is 1, `remAbsLevel`, which indicates the level value to be encoded later, can be updated as shown in the following formula.
[0175] [Equation 2]
[0176]
[0177] Alternatively, the minimum effective coefficient (LSB) value of remAbsLevel described in Equation 2 above can be encoded using par_level_flag, just as in Equation 3 below.
[0178] [Formula 3]
[0179]
[0180] In this paper, par_level_flag[n] can indicate the parity of the transformation coefficient level (value) at the scan position (n).
[0181] The transform coefficient level value remAbsLevel, which is to be encoded after par_level_flag encoding, can be updated in the same way as shown in the following formula.
[0182] [Formula 4]
[0183]
[0184] The `abs_level_gt3_flag` indicates whether the `remAbsLevel` at the corresponding scan position (n) is greater than 3. Encoding of `abs_remainder` can only be performed if `rem_abs_gt3_flag` is equal to 1. The relationship between the actual transform coefficient value `coeff` and each syntax element can be represented as follows:
[0185] [Formula 5]
[0186]
[0187] Additionally, the table below indicates examples related to Equation 5 above.
[0188] [Table 4]
[0189]
[0190] In this paper, |coeff| indicates the transform coefficient level (value), and can also be used to indicate the AbsLevel of the transform coefficient. Additionally, the sign of each coefficient can be encoded using the coeff_sign_flag as a 1-bit symbol.
[0191] Additionally, if the transform skip flag is set to 1, then as shown in Table 3, the syntax elements sb_coded_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag, par_level_flag, and / or abs_remainder for the residual coefficients of the transform block can be parsed, and the residual coefficients can be derived based on the syntax elements. In this case, the syntax elements can be parsed sequentially, and the parsing order can be changed. Furthermore, abs_level_gtx_flag can represent abs_level_gt1_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and / or abs_level_gt9_flag. For example, abs_level_gtx_flag[n][j] can be a flag indicating whether the absolute value or level (value) of the transform coefficient at scan position n is greater than (j<<1)+1. The condition (j<<1)+1 can optionally be replaced with a specific threshold such as a first threshold, a second threshold, etc.
[0192] Furthermore, while CABAC offers high performance, it suffers from poor throughput performance. This is due to CABAC's conventional encoding engine. Conventional encoding (i.e., encoding performed using CABAC's conventional encoding engine) exhibits high data dependency because it uses probabilistic states and ranges updated through the encoding of the previous bin, and reading the probability interval and determining the current state can take a significant amount of time. CABAC's throughput problem can be addressed by limiting the number of bins used for context encoding. For example, as shown in Table 2 above, the total number of bins used to represent sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag can be limited to the number of bins that depend on the corresponding block size. Additionally, for example, as shown in Table 3 above, the sum of the bins used to represent sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and abs_level_gt9_flag can be limited to the number of bins that depend on the size of the corresponding block. For example, if the corresponding block is a 4×4 block, the sum of the bins of sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag or sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag can be limited to 32 (or, for example, 28), and if the corresponding block is a 2×2 block, the sum of the bins of sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag can be limited to 8 (or, for example, 7). The limited number of bins can be represented by remBinsPass1 or RemCcbs. Alternatively, for example, for higher CABAC throughput, the number of bins for context encoding can be limited for blocks (CBs or TBs) that include the encoded target CG. In other words, the number of bins for context encoding can be limited in units of blocks (CBs or TBs).For example, when the current block size is 16×16, the number of bins used for context encoding of the current block can be limited to 1.75 times the number of pixels in the current block (i.e., 448), regardless of the current CG.
[0193] In this scenario, if a limited number of context-encoded bins are used when encoding context elements, the encoding device can binarynize the remaining coefficients using the method described below, instead of using context encoding, and can perform bypass encoding. In other words, for example, if the number of context-encoded bins for 4×4 CG encoding is 32 (or, for example, 28), or if the number of context-encoded bins for 2×2 CG encoding is 8 (or, for example, 7), then sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag encoded using context-encoded bins no longer need to be encoded and can be directly encoded as dec_abs_level. Alternatively, for example, when the number of bins for context encoding for a 4×4 block is 1.75 times the number of pixels in the entire block, i.e., when limited to 28, the sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag that are encoded as bins for context encoding may no longer be encoded and may be directly encoded as dec_abs_level, as shown in Table 5 below.
[0194] [Table 5]
[0195]
[0196] The value |coeff| can be derived based on dec_abs_level. In this case, the transformation coefficient value, i.e., |coeff|, can be derived as shown in the following equation.
[0197] [Formula 6]
[0198]
[0199] Additionally, `coeff_sign_flag` can indicate the sign of the transform coefficients at the corresponding scan position n. That is, `coeff_sign_flag` can indicate the sign of the transform coefficients at the corresponding scan position n.
[0200] Figure 8 An example of the transformation coefficients in a 4×4 block is shown.
[0201] Figure 8The 4×4 block represents an example of quantization coefficients. Figure 8 The block can be a 4×4 transform block or a 4×4 sub-block of an 8×8, 16×16, 32×32 or 64×64 transform block. Figure 8 A 4x4 block can represent a luminance block or a chrominance block.
[0202] Furthermore, as mentioned above, when the input signal is not a binary value but a syntax element, the encoding device can transform the input signal into a binary value by binaryizing the input signal's value. Additionally, the decoding device can decode the syntax element to derive its binary value (e.g., a binary bin), and can debind the binary value to derive the syntax element's value. Binary conversion can be performed as truncated Rice (TR) binary conversion, k-order exponential Golomb (EGk) binary conversion, finite k-order exponential Golomb (finite EGk), fixed-length (FL) binary conversion, etc. Furthermore, debinding can refer to processing performed based on TR binary conversion, EGk binary conversion, or FL binary conversion to derive the syntax element's value.
[0203] For example, TR binary conversion can be performed as follows.
[0204] The input to TR binaryization can be cMax and cRiceParam for the syntax elements, as well as a request for TR binaryization. The output of TR binaryization can be the TR binaryization of symbolVal, which is the value corresponding to the bin string.
[0205] Specifically, for example, if a suffix bin string exists for a syntax element, the TR bin string for that syntax element can be a concatenation of the prefix bin string and the suffix bin string; conversely, if a suffix bin string does not exist, the TR bin string for that syntax element can be the prefix bin string. For example, the prefix bin string can be derived as follows.
[0206] The prefix value of symbolVal for a syntax element can be derived as shown in the following formula.
[0207] [Formula 7]
[0208]
[0209] In this paper, prefixVal can represent the prefix value of symbolVal. The prefix (i.e., the prefix bin string) of the TRbin string of the syntax element can be derived as follows.
[0210] For example, if prefixVal is less than cMax >> cRiceParam, then the prefix bin string can be a bit string of length prefixVaL1, indexed by binIdx. That is, if prefixVal is less than cMax >> cRiceParam, then the prefix bin string can be a bit string of length prefixVal+1, indicated by binIdx. The bin value of binIdx less than prefixVal can be equal to 1. Furthermore, the bin value of binIdx identical to prefixVal can be equal to 0.
[0211] For example, the bin string derived by unary binaryization of prefixVal can be shown in the table below.
[0212] [Table 6]
[0213]
[0214] Furthermore, if prefixVal is not less than cMax >> cRiceParam, then the prefix bin string can be a bit string of length cMax >> cRiceParam with all bits equal to 1.
[0215] Additionally, if cMax is greater than symbolVal and cRiceParam is greater than 0, then a bin suffix bin string of a TRbin string can exist. For example, the suffix bin string can be derived as follows.
[0216] The suffix value of symbolVal for a syntax element can be derived as shown in the following formula.
[0217] [Formula 8]
[0218]
[0219] In this article, suffixVal can represent the suffix value of symbolVal.
[0220] The suffix of the TRbin string (i.e., the suffix bin string) can be derived based on the FL binaryization of the suffixVal with a value cMax of (1 << cRiceParam) - 1.
[0221] Furthermore, if the value of the input parameter (i.e., cRiceParam) is 0, the TR binaryization can be an exact truncated unary binaryization, and can always use the same value cMax as the possible maximum value of the syntax element to be decoded.
[0222] Alternatively, for example, EGk binary conversion can be performed as follows. Syntax elements encoded using ue(v) can be syntax elements encoded using exponential Golomb encoding.
[0223] For example, the binary conversion of the 0th exponent Columbus (EG0) can be performed as follows.
[0224] Parsing a syntax element can begin by reading the first non-zero bit, starting from the current position in the bitstream, and counting the number of leading bits equal to 0. This process can be represented as shown in the table below.
[0225] [Table 7]
[0226]
[0227] Alternatively, the variable codeNum can be derived as follows.
[0228] [Formula 9]
[0229]
[0230] In this paper, the value returned by read_bits(leadingZeroBits) (i.e., the value indicated by read_bits(leadingZeroBits)) can be interpreted as the binary representation of the unsigned integer of the highest significant bit first recorded.
[0231] The structure of the exponential Columbus code, in which the bit string is divided into "prefix" bits and "suffix" bits, can be represented as shown in the table below.
[0232] [Table 8]
[0233]
[0234] The “prefix” bits can be the bits parsed for calculating leadingZeroBits as described above, and can be indicated by 0 or 1 in the bit string in Table 8. That is, the bit string indicated by 0 or 1 in Table 8 can represent the prefix bit string. The “suffix” bits can be the bits parsed when calculating codeNum, and can be represented by xi in Table 8. That is, the bit string indicated by xi in Table 8 can represent the suffix bit string. Here, i can be a value from 0 to LeadingZeroBits-1. In addition, each xi can be equal to 0 or 1.
[0235] The bit string assigned to codeNum can be shown in the table below.
[0236] [Table 9]
[0237]
[0238] If the descriptor of a syntax element is ue(v) (i.e., if the syntax element is encoded in ue(v)), then the value of the syntax element can be equal to codeNum.
[0239] Alternatively, for example, EGk binary conversion can be performed as follows.
[0240] The input to EGk binaryization can be a request for EGk binaryization. Additionally, the output of EGk binaryization can be an EGk binaryization of symbolVal (i.e., the value corresponding to the bin string).
[0241] The bit string for the binary processing of symbolVal using EGk can be derived as follows.
[0242] [Table 10]
[0243]
[0244] Referring to Table 10 above, the binary value X can be appended to the end of the bin string with each call to put(X). In this article, X can be 0 or 1.
[0245] Alternatively, for example, finite EGk binary conversion can be performed as follows.
[0246] The input to the finite EGk binaryization process can be a request for finite EGk binaryization, the Rice parameter ricParam, log2TransformRange as a variable representing the binary logarithm of the maximum value, and maxPreExtLen as a variable representing the maximum prefix extension length. Furthermore, the output of the finite EGk binaryization process can be the finite EGk binaryization of symbolVal as the value corresponding to the empty string.
[0247] The bit string for finite EGk binary processing of symbolVal can be derived as follows.
[0248] [Table 11]
[0249]
[0250] Alternatively, for example, FL binary conversion can be performed as follows.
[0251] The input to FL binary processing can be a request for cMax and FL binary processing for syntax elements. Additionally, the output of FL binary processing can be the FL binary processing for symbolVal, which is the value corresponding to the bin string.
[0252] FL binaryization can be configured by using a fixed-length bit string with a number of bits equal to symbolVal. In this paper, the fixed-length bit string can be an unsigned integer bit string. That is, the bit string used as the symbol value symbolVal can be derived through FL binaryization, and the bit length (i.e., the number of bits) of the bit string can be fixed.
[0253] For example, a fixed length can be derived as shown in the following formula.
[0254] [Formula 10]
[0255]
[0256] The index of a bin in FL binary can be obtained by using values that increase sequentially from the most significant bit to the least significant bit. For example, the bin index associated with the most significant bit could be binIdx = 0.
[0257] In addition, for example, the binary processing of the syntax element abs_remainder in the residual information can be performed as follows.
[0258] The input for binary processing of abs_remainder can be a request to binary the syntax element abs_remainder[n], the color component cIdx, and the luminance position (x0, y0). The luminance position (x0, y0) can indicate the top-left sample of the current luminance transform block based on the top-left luminance sample of the image.
[0259] The output of the binary processing of abs_remainder can be the binary representation of abs_remainder (i.e., the binary binary string of abs_remainder). The bit string available for abs_remainder can be derived through the binary processing.
[0260] The Rice parameter cRiceParam for abs_remainder[n] can be derived using Rice parameter derivation processing performed by inputting the color component cIdx and the luminance position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth (the binary logarithm of the transform block width), and log2TbHeight (the binary logarithm of the transform block height). A detailed description of the Rice parameter derivation processing will be provided later.
[0261] Alternatively, for example, the cMax of the abs_remainder[n] to be encoded can be derived based on the Rice parameter cRiceParam. cMax can be derived as shown in the following formula.
[0262] [Equation 11]
[0263]
[0264] Furthermore, the binary representation of `abs_remainder` (i.e., the bin string used for `abs_remainder`) can be a concatenation of the prefix and suffix bin strings if a suffix bin string exists. Conversely, if no suffix bin string exists, the bin string used for `abs_remainder` can be the prefix bin string.
[0265] For example, the prefix bin string can be derived as follows.
[0266] The prefix value prefixVal of abs_remainder[n] can be derived as shown in the following formula.
[0267] [Equation 12]
[0268]
[0269] The prefix of the bin string (i.e., the prefix bin string) of abs_remainder[n] can be derived by performing TR binary processing on prefixVal, where cMax and cRiceParam are used as input.
[0270] If the prefix bin string is the same as a bit string with all bits set to 1 and a bit length of 6, then there may be a suffix bin string of the bin string of abs_remainder[n], which can be derived as follows.
[0271] The derivation of the Rice parameter for dec_abs_level[n] can be performed as follows.
[0272] The inputs to the Rice parameter derivation process can be the color component index cIdx, the luminance position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth (the binary logarithm of the transform block width), and log2TbHeight (the binary logarithm of the transform block height). The luminance position (x0, y0) can indicate the top-left sample of the current luminance transform block based on the top-left luminance sample of the image. Furthermore, the output of the Rice parameter derivation process can be the Rice parameter cRiceParam.
[0273] For example, the variable locSumAbs can be derived from an array AbsLevel[x][y] of transform blocks with a given component index cIdx and a top-left luminance position (x0, y0), similar to the pseudocode disclosed in the table below.
[0274] [Table 12]
[0275]
[0276] Then, based on the given variable locSumAbs, the Rice parameter cRiceParam can be derived as shown in the table below.
[0277] [Table 13]
[0278]
[0279] Additionally, for example, in the Rice parameter derivation process for abs_remainder[n], baseLevel can be set to 4.
[0280] Alternatively, for example, the Rice parameter cRiceParam can be determined based on whether a transformation skip is applied to the current block. That is, if no transformation is applied to the current TB including the current CG, in other words, if a transformation skip is applied to the current TB including the current CG, then the Rice parameter cRiceParam can be derived to be 1.
[0281] Additionally, the suffix value suffixVal of abs_remainder can be derived as shown in the following formula.
[0282] [Equation 13]
[0283]
[0284] The suffix bin string of abs_remainder can be derived by performing a finite EGk binary transformation on suffixVal, where k is set to cRiceParam+1, riceParam is set to cRiceParam, log2TransformRange is set to 15, and maxPreExtLen is set to 11.
[0285] In addition, for example, the binary processing of the syntax element dec_abs_level in the residual information can be performed as follows.
[0286] The input for the binary processing of dec_abs_level can be a request to binary-code the syntax element dec_abs_level[n], the color component cIdx, the luminance position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth (the binary logarithm of the transform block width), and log2TbHeight (the binary logarithm of the transform block height). The luminance position (x0, y0) can indicate the top-left sample of the current luminance transform block based on the top-left luminance sample of the image.
[0287] The output of the binary processing of dec_abs_level can be the binary representation of dec_abs_level (i.e., the binary bin string of dec_abs_level). The available bin strings for dec_abs_level can be derived through the binary processing.
[0288] The Rice parameter cRiceParam of dec_abs_level[n] can be derived through Rice parameter derivation processing performed with inputs of color component cIdx, luminance position (x0, y0), current coefficient scan position (xC, yC), log2TbWidth (the binary logarithm of the transform block width), and log2TbHeight (the binary logarithm of the transform block height). The Rice parameter derivation processing will be described in detail below.
[0289] Alternatively, for example, the cMax of dec_abs_level[n] can be derived based on the Rice parameter cRiceParam. cMax can be derived as shown in the table below.
[0290] [Formula 14]
[0291]
[0292] Furthermore, the binary representation of dec_abs_level[n] (i.e., the bin string used for dec_abs_level[n]) can be a concatenation of the prefix bin string and the suffix bin string if a suffix bin string exists. Alternatively, if no suffix bin string exists, the bin string used for dec_abs_level[n] can be the prefix bin string.
[0293] For example, the prefix bin string can be derived as follows.
[0294] The prefix value prefixVal of dec_abs_level[n] can be derived as shown in the following formula.
[0295] [Formula 15]
[0296]
[0297] The prefix of the bin string (i.e., the prefix bin string) of dec_abs_level[n] can be derived by performing TR binary processing on prefixVal, where cMax and cRiceParam are used as input.
[0298] If the prefix bin string is the same as a bit string with all bits set to 1 and a bit length of 6, then there may be a suffix bin string of dec_abs_level[n] bin string, which can be derived as described below.
[0299] The derivation of the Rice parameter for dec_abs_level[n] can be performed as follows.
[0300] The inputs to the Rice parameter derivation process can be the color component index cIdx, the luminance position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth (the binary logarithm of the transform block width), and log2TbHeight (the binary logarithm of the transform block height). The luminance position (x0, y0) can indicate the top-left sample of the current luminance transform block based on the top-left luminance sample of the image. Furthermore, the output of the Rice parameter derivation process can be the Rice parameter cRiceParam.
[0301] For example, the variable locSumAbs can be derived from an array AbsLevel[x][y] of transform blocks with a given component index cIdx and a top-left luminance position (x0, y0), similar to the pseudocode disclosed in the table below.
[0302] [Table 14]
[0303]
[0304] Then, based on the given variable locSumAbs, the Rice parameter cRiceParam can be derived as shown in the table below.
[0305] [Table 15]
[0306]
[0307] Additionally, for example, in the Rice parameter derivation process for dec_abs_level[n], baseLevel can be set to 0, and ZeroPos[n] can be derived as follows.
[0308] [Formula 16]
[0309]
[0310] Additionally, the suffix value suffixVal of dec_abs_level[n] can be derived as shown in the following formula.
[0311] [Equation 17]
[0312]
[0313] The suffix bin string of dec_abs_level[n] can be derived by performing finite EGk binary processing on suffixVal, where k is set to cRiceParam+1, truncSuffixLen is set to 15, and maxPreExtLen is set to 11.
[0314] In addition, RRC and TSRC can have the following differences.
[0315] For example, the Rice parameter of the syntax element abs_remainder[] in TSRC can be deduced to be 1. The Rice parameter cRiceParaM of the syntax element abs_remainder[] in RRC can be deduced based on lastAbsRemainder and lastRiceParaM as described above, but the Rice parameter cRiceParaM of the syntax element abs_remainder[] in TSRC can be deduced to be 1. That is, for example, when a transformation skip is applied to the current block (e.g., the current TB), the Rice parameter cRiceParaM of abs_remainder[] for the current block in TSRC can be deduced to be 1.
[0316] - Additionally, for example, referring to Tables 3 and 4, in RRC, abs_level_gtx_flag[n] and / or abs_level_gtx_flag[n] can be signaled, but in TSRC, abs_level_gtx_flag[n], abs_level_gtx_flag[n], abs_level_gtx_flag[n], abs_level_gtx_flag[n], and abs_level_gtx_flag[n] can be signaled. Here, abs_level_gtx_flag[n] can be represented as abs_level_gt1_flag or the first coefficient level flag, abs_level_gtx_flag[n] can be represented as abs_level_gt3_flag or the second coefficient level flag, abs_level_gtx_flag[n] can be represented as abs_level_gt5_flag or the third coefficient level flag, abs_level_gtx_flag[n] can be represented as abs_level_gt7_flag or the fourth coefficient level flag, and abs_level_gtx_flag[n] can be represented as abs_level_gt9_flag or the fifth coefficient level flag. Specifically, the first coefficient level flag can be a flag indicating whether the coefficient level is greater than a first threshold (e.g., 1), the second coefficient level flag can be a flag indicating whether the coefficient level is greater than a second threshold (e.g., 3), the third coefficient level flag can be a flag indicating whether the coefficient level is greater than a third threshold (e.g., 5), the fourth coefficient level flag can be a flag indicating whether the coefficient level is greater than a fourth threshold (e.g., 7), and the fifth coefficient level flag can be a flag indicating whether the coefficient level is greater than a fifth threshold (e.g., 9). As mentioned above, in TSRC, compared with RRC, it can also include abs_level_gtx_flag[n], abs_level_gtx_flag[n], abs_level_gtx_flag[n], abs_level_gtx_flag[n], abs_level_gtx_flag[n].
[0317] - Additionally, for example, in RRC, the syntax element coeff_sign_flag can be bypassed, but in TSRC, the syntax element coeff_sign_flag can be either bypassed or context-encoded.
[0318] - In addition, for example, when the bin for the context encoding of the current block is exhausted, in RRC it can be encoded as the syntax element dec_abs_level, but in TSRC it can be encoded as the syntax element abs_remainder.
[0319] - Furthermore, for example, the order of the analytical transform coefficients of RRC can be resolved in the upper right-lower left direction based on the last non-zero coefficient in the upper right diagonal scan order, but in the case of TSRC, it can be resolved in the upper right-lower left direction in the upper right diagonal order, and the position information of the last non-zero coefficient can be omitted.
[0320] - In addition, for example, in RRC, dependency quantization (DQ) or symbolic data hiding (SDH) methods can be applied, but in TSRC, dependency quantization and symbolic data hiding methods can be omitted.
[0321] Furthermore, a symbolic data hiding (SDH) method can be proposed for residual coding. The symbolic data hiding method can be as follows.
[0322] When deriving transform coefficients, the sign of the transform coefficients can be derived based on a 1-bit sign flag (the syntax element `coeff_sign_flag` mentioned above). In this regard, SDH can indicate explicit signaling for omitting the `coeff_sign_flag` of the first valid transform coefficient in a sub-block / coefficient group (CG) to improve coding efficiency. Here, the value of `coeff_sign_flag` of the first valid transform coefficient can be derived based on the sum of the absolute levels (i.e., absolute values) of the valid transform coefficients in the corresponding sub-block / coefficient group. That is, the sign of the first valid transform coefficient can be derived based on the sum of the absolute levels of the valid transform coefficients in the corresponding sub-block / coefficient group. Furthermore, a valid transform coefficient can refer to a non-zero transform coefficient whose (absolute) value is not 0. For example, when the sum of the absolute levels of the valid transform coefficients is even, the value of `coeff_sign_flag` of the first valid transform coefficient can be derived as 1, and when the sum of the absolute levels of the valid transform coefficients is odd, the value of `coeff_sign_flag` of the first valid transform coefficient can be derived as 0. In other words, for example, when the sum of the absolute levels of the effective transform coefficients is even, the sign of the first effective transform coefficient can be derived as negative, and when the sum of the absolute levels of the effective transform coefficients is odd, the sign of the first effective transform coefficient can be derived as positive. Alternatively, for example, when the sum of the absolute levels of the effective transform coefficients is even, the value of coeff_sign_flag of the first effective transform coefficient can be derived as 0, and when the sum of the absolute levels of the effective transform coefficients is odd, the value of coeff_sign_flag of the first effective transform coefficient can be derived as 1. In other words, for example, when the sum of the absolute levels of the effective transform coefficients is even, the sign of the first effective transform coefficient can be derived as positive, and when the sum of the absolute levels of the effective transform coefficients is odd, the sign of the first effective transform coefficient can be derived as negative.
[0323] For example, SDH in residual syntax can be represented as shown in the table below.
[0324] [Table 16]
[0325]
[0326] Referring to Table 16, the variable `signHiddenFlag` indicates whether SDH is applied. The variable `signHiddenFlag` can also be called `signHidden`. For example, when the value of `signHiddenFlag` is 0, it indicates that SDH is not applied, while when the value of `signHiddenFlag` is 1, it indicates that SDH is applied. For example, the value of `signHiddenFlag` can be set based on signaling flags (e.g., `sh_sign_data_hidden_used_flag`, `pic_sign_data_hiding_enabled_flag`, or `sps_sign_data_hiding_enabled_flag`). Furthermore, for example, the value of `signHiddenFlag` can be set based on `lastSigScanPosSb` and `firstSigScanPosSb`. Here, `lastSigScanPosSb` can indicate the position of the last valid transform coefficient searched in the corresponding sub-block / coefficient group according to the scan order, and `firstSigScanPosSb` can indicate the position of the first valid transform coefficient searched in the corresponding sub-block / coefficient group according to the scan order. Typically, `lastSigScanPosSb` can be located in a relatively high frequency component region compared to `firstSigScanPosSb`. Therefore, when `lastSigScanPosSb - firstSigScanPosSb` is greater than a predetermined threshold, the `signHidden` value can be derived as 1 (i.e., SDH is applied), and otherwise the `signHidden` value can be derived as 0 (i.e., SDH is not applied). Here, for example, referring to Table 35, the threshold can be set to 3.
[0327] Additionally, referring to Table 16, even if the value of signHiddenFlag is 0 (i.e., !signHiddenFlag), if the current coefficient is not the first valid coefficient in the (sub)block according to the scan order (i.e., n != firstSigScanPosSb), then the coeff_sign_flag[n] of the current coefficient can be explicitly signaled.
[0328] Furthermore, referring to Table 16, if the value of signHiddenFlag is 1, and the current coefficient is the first valid coefficient in the (sub)block according to the scan order (i.e., n = first_sigscanpossb), then the explicit signaling of coeff_sign_flag[n] for the current coefficient can be omitted. In this case, the value of coeff_sign_flag[n] for the current coefficient (i.e., the first valid coefficient) can be derived as follows. For example, the value of coeff_sign_flag[n] for the first valid coefficient can be derived based on the values of coeff_sign_flag[n] for the remaining valid coefficients in the corresponding (sub)block, excluding the first valid coefficient. For example, when the sum of the coeff_sign_flag[n] values of the valid coefficients is even, the coeff_sign_flag[n] for the first valid coefficient can be derived as 1, and when the sum of the coeff_sign_flag[n] values of the valid coefficients is odd, the coeff_sign_flag[n] for the first valid coefficient can be derived as 0. Alternatively, when the sum of the values of coeff_sign_flag[n] of the effective coefficients is even, the coeff_sign_flag[n] of the first effective coefficient can be derived as 0, and when the sum of the values of coeff_sign_flag[n] of the effective coefficients is odd, the coeff_sign_flag[n] of the first effective coefficient can be derived as 1.
[0329] Furthermore, if the aforementioned symbolic data hiding is activated in a high-level syntax (VPS, SPS, PPS, slice header syntax, etc.) or a low-level syntax (slice data syntax, coding unit syntax, transform unit syntax, etc.), and if sh_ts_residual_coding_disabled_flag is 1, then RRC's symbolic data hiding processing can be used for lossless coding. Therefore, lossless coding may become impossible due to incorrect settings in the coding device. Alternatively, if a lossy coding method other than lossless coding (i.e., an irreversible coding method) is applied, and RRC is used to encode the residual signal that has already been transformed and skipped while applying BDPCM, although the intervals where the residual values become 0 actually occur more frequently than usual due to the differences between the residuals, BDPCM may also suffer coding losses because SDH is performed according to the SDH application conditions. Specifically, for example, if the effective transform coefficients (non-zero residual data) exist at positions 0 and 15 in the CG, and the transform coefficients at the remaining positions in the CG are 0, then SDH can be applied to the CG according to the above SDH application conditions, thereby omitting the symbol data (i.e., the encoding of the symbol flag) of the first effective transform coefficients of the CG. Therefore, in this case, to omit the symbol data, the parity of only two residual data of the CG can be adjusted in the quantization step, potentially resulting in more coding loss compared to not applying SDH. This situation may also occur in blocks where BDPCM is not applied, but due to the characteristics of BDPCM, which reduces the level through differences with neighboring residuals, this unfavorable situation may occur more frequently when applying SDH.
[0330] Therefore, in this document, to prevent unintended coding loss or failures caused by using SDH and residual coding together (i.e., encoding residual samples of transform skip blocks in the current slice using RRC) when sh_ts_residual_coding_disabled_flag=1, an implementation method for setting the dependency / constraint between the two techniques is provided.
[0331] In addition, as mentioned above, residual data encoding methods can include conventional residual coding (RRC) and transform skip residual coding (TSRC).
[0332] As shown in Table 1, the residual data encoding method for the current block can be determined based on the values of `transform_skip_flag` and `sh_ts_residual_coding_disabled_flag`. Here, the syntax element `sh_ts_residual_coding_disabled_flag` indicates whether TSRC is enabled. Therefore, even when `transform_skip_flag` indicates that the transform is skipped, if `sh_ts_residual_coding_disabled_flag` indicates that TSRC is not enabled, a signal can be sent to the syntax element regarding RRC for the transformed skipped block. That is, RRC can be used when the value of `transform_skip_flag` is 0 or the value of `sh_ts_residual_coding_disabled_flag` is 1, and TSRC can be used otherwise.
[0333] This document proposes an implementation method where sh_ts_residual_coding_disabled_flag depends on pic_sign_data_hiding_enabled_flag. For example, the syntax elements proposed in this implementation can be shown in the following table.
[0334] [Table 17]
[0335]
[0336] Here, for example, `pic_sign_data_hiding_enabled_flag` can be a flag used to indicate whether symbolic data hiding is enabled. For example, `pic_sign_data_hiding_enabled_flag` can indicate whether symbolic data hiding is enabled. That is, for example, `pic_sign_data_hiding_enabled_flag` can indicate whether symbolic data hiding is enabled for blocks of a picture for a sequence or picture header structure (i.e., `picture_header_structure()`). For example, `pic_sign_data_hiding_enabled_flag` can indicate whether a symbolic data hiding usage flag indicating whether symbolic data hiding is used for the current slice can exist. For example, a value of 1 for `pic_sign_data_hiding_enabled_flag` can indicate that symbolic data hiding is enabled, while a value of 0 for `pic_sign_data_hiding_enabled_flag` can indicate that symbolic data hiding is not enabled. For example, a value of 1 for pic_sign_data_hiding_enabled_flag can indicate that a symbol flag to which symbol data hiding has been applied can exist, while a value of 0 for pic_sign_data_hiding_enabled_flag can indicate that a symbol flag to which symbol data hiding has been applied does not exist.
[0337] According to Table 17 above, the `sh_ts_residual_coding_disabled_flag` flag can only be signaled when symbolic data hiding is not enabled. Alternatively, when symbolic data hiding is enabled, the `sh_ts_residual_coding_disabled_flag` flag can be notified without signaling, and its value can be inferred to be either 0 (encoding the residual samples of the transform skip blocks in the current slice using TSRC syntax) or 1 (encoding the residual samples of the transform skip blocks in the current slice using RRC syntax).
[0338] Here, for example, `pic_sign_data_hiding_enabled_flag` can be signaled as either image header syntax or slice header syntax. For example, when `pic_sign_data_hiding_enabled_flag` is signaled as a syntax other than image header syntax, it can be referred to by another name. For example, when `pic_sign_data_hiding_enabled_flag` is signaled as slice header syntax, `pic_sign_data_hiding_enabled_flag` can be represented as `sh_sign_data_hiding_enabled_flag`. Additionally, `sh_ts_residual_coding_disabled_flag` can be signaled as slice header syntax, or it can be signaled using a higher-level syntax (HLS) (e.g., SPS syntax / VPS syntax / PPS syntax / Image Header (PH) syntax / DPS syntax, etc.) or a lower-level (CU / TU) syntax other than slice header syntax. When the residual coding method is determined by whether SDH is enabled, it can be interpreted as conforming to this implementation method regardless of the upper / lower relationship or syntactic position of the signaling notification syntax.
[0339] Furthermore, according to traditional image / video coding, SDH is enabled in high-level syntax (SPS syntax / VPS syntax / PPS syntax / DPS syntax / picture header syntax / slice header syntax, etc.) or low-level (CU / TU). When sh_ts_residual_coding_disabled_flag is 1, SDH in the aforementioned RRC can be used for lossless coding. Therefore, due to incorrect settings in the coding device, lossless coding may become impossible. Therefore, in this document, to prevent unexpected coding losses or failures caused by using SDH and residual coding together when sh_ts_residual_coding_disabled_flag=1 (i.e., encoding residual samples of transform skip blocks in the current slice using RRC), an implementation is provided in which SDH is not used when encoding at the level of transform coefficients when the value of transform_skip_flag is 1. The residual coding syntax according to the proposed implementation can be shown in the following table.
[0340] [Table 18]
[0341]
[0342]
[0343]
[0344]
[0345]
[0346]
[0347] Referring to Table 18 above, the variable signHidden, which indicates whether SDH should be applied, can be derived based on the value of transform_skip_flag. For example, when the value of transform_skip_flag is 1, the value of signHidden can be derived as 0. That is, for example, when the value of transform_skip_flag is 1, SDH can be omitted when deriving the sign of the transform coefficients of the current block.
[0348] Furthermore, to prevent unintended coding losses or failures caused by using SDH and residual coding together when sh_ts_residual_coding_disabled_flag=1 (i.e., using RRC to encode residual samples of transform skip blocks in the current slice), this paper provides an implementation in which SDH is not used when encoding the level of transform coefficients when the value of BdpcmFlag is 1. The residual coding syntax according to the proposed implementation is shown in the table below.
[0349] [Table 19]
[0350]
[0351]
[0352]
[0353]
[0354]
[0355]
[0356] Referring to Table 19 above, the variable signHidden, which indicates whether SDH should be applied, can be derived based on the value of the variable BdpcmFlag, which indicates whether BDPCM should be applied. For example, when the value of BdpcmFlag is 1, the value of signHidden can be derived as 0. That is, for example, when the value of BdpcmFlag is 1 (when BDPCM is applied to the current block), SDH can be omitted when deriving the sign of the transform coefficients of the current block.
[0357] Referring to Table 19, when BdpcmFlag is 1, if lossy encoding is applied, SDH of TSRC is allowed, but if BDPCM is applied, SDH is not allowed.
[0358] In addition, this document proposes various implementations related to the signaling of the above syntax element sh_ts_residual_coding_disabled_flag.
[0359] For example, as mentioned above, since sh_ts_residual_coding_disabled_flag is a syntax element that defines whether TSRC is disabled, it may not be necessary to signal it when the transform skip block is not used. That is, it may only make sense to signal sh_ts_residual_coding_disabled_flag if the syntax element used to indicate whether the transform skip block is used indicates that the transform skip block is used.
[0360] Therefore, this document proposes an implementation that signals the sh_ts_residual_coding_disabled_flag only when sps_transform_skip_enabled_flag is 1. The syntax according to this implementation is shown in the table below.
[0361] [Table 20]
[0362]
[0363] Referring to Table 20, when `sps_transform_skip_enabled_flag` is 1, a signal can be sent to `sh_ts_residual_coding_disabled_flag`, while when `sps_transform_skip_enabled_flag` is 0, no signal can be sent to `sh_ts_residual_coding_disabled_flag`. Here, for example, `sps_transform_skip_enabled_flag` can indicate whether to use the transform skip block. That is, for example, `sps_transform_skip_enabled_flag` can indicate whether transform skipping is enabled. For example, when the value of `sps_transform_skip_enabled_flag` is 1, it indicates that the transform skip flag (`transform_skip_flag`) can exist in the transform unit syntax, while when the value of `sps_transform_skip_enabled_flag` is 0, it indicates that the transform skip flag does not exist in the transform unit syntax. Furthermore, when `sh_ts_residual_coding_disabled_flag` is not signaled, it can be inferred to be 0. Additionally, the aforementioned `sps_transform_skip_enabled_flag` can be signaled in SPS, or in higher-level syntaxes (VPS, PPS, image header syntax, slice header syntax, etc.) or lower-level syntaxes (slice data syntax, coding unit syntax, transform unit syntax, etc.). Moreover, it can be signaled before `sh_ts_residual_coding_disabled_flag`.
[0364] In addition, this document proposes an implementation method that combines with the above-described implementation of signaling the sh_ts_residual_coding_disabled_flag. For example, an implementation method for signaling the sh_ts_residual_coding_disabled_flag, as shown in the table below, can be proposed.
[0365] [Table 21]
[0366]
[0367] Referring to Table 21, when `sps_transform_skip_enabled_flag` is 1 and `pic_sign_data_hiding_enabled_flag` is 0, a signal can be sent to `sh_ts_residual_coding_disabled_flag`; otherwise, no signal is sent. Furthermore, if `sh_ts_residual_coding_disabled_flag` is not signaled, it can be inferred that `sh_ts_residual_coding_disabled_flag` is 0.
[0368] Alternatively, for example, an implementation of signaling the sh_ts_residual_coding_disabled_flag as shown in the table below can be proposed.
[0369] [Table 22]
[0370]
[0371] Referring to Table 22, when `pic_sign_data_hiding_enabled_flag` is 0 or `sps_transform_skip_enabled_flag` is 1, a signal can be sent to `sh_ts_residual_coding_disabled_flag`; otherwise, no signal is sent. Furthermore, if `sh_ts_residual_coding_disabled_flag` is not signaled, it can be inferred that `sh_ts_residual_coding_disabled_flag` is 0.
[0372] Furthermore, for example, according to this implementation, a method can be proposed to signal the syntax elements `ph_dep_quant_enabled_flag` and `sh_ts_residual_coding_disabled_flag` in the same high-level or low-level syntax. For example, referring to Table 22 above, both `ph_dep_quant_enabled_flag` and `sh_ts_residual_coding_disabled_flag` can be signaled in the image header syntax. In this case, `sh_ts_residual_coding_disabled_flag` can be referred to as `ph_ts_residual_coding_disabled_flag`. Furthermore, `ph_dep_quant_enabled_flag` can be a flag indicating whether dependency quantization is enabled. For example, `ph_dep_quant_enabled_flag` can indicate whether dependency quantization is enabled. That is, for example, `ph_dep_quant_enabled_flag` can indicate whether dependency quantization is enabled for blocks of images in the sequence. For example, `ph_dep_quant_enabled_flag` can indicate whether a dependency quantization usage flag indicating whether dependency quantization is used for the current slice exists. For example, a value of 1 for ph_dep_quant_enabled_flag can indicate that dependency quantization is enabled, while a value of 0 for ph_dep_quant_enabled_flag can indicate that dependency quantization is disabled. Furthermore, for example, depending on the signaling syntax, ph_dep_quant_enabled_flag can be referred to as sh_dep_quant_enabled_flag.
[0373] Alternatively, for example, an implementation of signaling the sh_ts_residual_coding_disabled_flag as shown in the table below can be proposed.
[0374] [Table 23]
[0375]
[0376] Referring to Table 23, when `pic_sign_data_hiding_enabled_flag` is 0 and `sps_transform_skip_enabled_flag` is 1, `sh_ts_residual_coding_disabled_flag` can be signaled; otherwise, it can remain unsigned. Furthermore, if `sh_ts_residual_coding_disabled_flag` is not signaled, it can be inferred to be 0. Additionally, for example, referring to Table 23 above, both `ph_dep_quant_enabled_flag` and `sh_ts_residual_coding_disabled_flag` can be signaled in the image header syntax. In this case, `sh_ts_residual_coding_disabled_flag` can be referred to as `ph_ts_residual_coding_disabled_flag`.
[0377] Furthermore, this document proposes an implementation method in which the aforementioned syntax elements ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and / or sh_ts_residual_coding_disabled_flag are signaled in the same high-level syntax (VPS, SPS, PPS, image header, slice header, etc.) or low-level syntax (slice data, coding unit, transform unit, etc.).
[0378] For example, as shown in the table below, an implementation can be proposed in which both pic_sign_data_hiding_enabled_flag and sh_ts_residual_coding_disabled_flag are signaled in the image header syntax.
[0379] [Table 24]
[0380]
[0381] In this case, sh_ts_residual_coding_disabled_flag can be called ph_ts_residual_coding_disabled_flag.
[0382] According to this implementation, the syntax element indicating whether SDH is enabled in the HLS (i.e., pic_sign_data_hiding_enabled_flag) is enabled (i.e., sh_ts_residual_coding_disabled_flag) can only be signaled when the value of the syntax element indicating whether SDH is enabled in the HLS (i.e., pic_sign_data_hiding_enabled_flag) is 0. For example, referring to Table 24, pic_sign_data_hiding_enabled_flag can be signaled in the picture header syntax, and when the value of pic_sign_data_hiding_enabled_flag is 0, ph_ts_residual_coding_disabled_flag can also be signaled in the picture header syntax. Furthermore, for example, when the value of pic_sign_data_hiding_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may not be signaled. When sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag can be inferred to be 0. Furthermore, when the value of sps_sign_data_hiding_enabled_flag is 1, pic_sign_data_hiding_enabled_flag can be signaled in the image header syntax.
[0383] The above implementation according to Table 24 is merely an example, and the two syntax elements can be signaled using high-level syntax (VPS, SPS, PPS, slice header, etc.) or low-level syntax (slice data, encoding unit, transform unit, etc.) other than the image header.
[0384] Alternatively, for example, as shown in the table below, an implementation may be provided that signals the syntax element indicating whether SDH is enabled only when the value of the syntax element indicating whether the residual coding of the transform skip block (i.e., TSRC) is enabled is 0 (i.e., when TSRC is enabled).
[0385] [Table 25]
[0386]
[0387] Referring to Table 25, when the value of ph_ts_residual_coding_disabled_flag is 0, pic_sign_data_hiding_enabled_flag can be signaled in the image header syntax. Furthermore, for example, when the value of ph_ts_residual_coding_disabled_flag is 1, pic_sign_data_hiding_enabled_flag may not be signaled. Additionally, for example, when pic_sign_data_hiding_enabled_flag is not signaled, pic_sign_data_hiding_enabled_flag can be inferred to be 0 in the decoding device.
[0388] The above implementation according to Table 25 is merely an example, and the two syntax elements can be signaled using high-level syntax (VPS, SPS, PPS, slice header, etc.) or low-level syntax (slice data, encoding unit, transform unit, etc.) other than the image header.
[0389] Alternatively, for example, methods may be proposed for restricting pic_sign_data_hiding_enabled_flag and / or ph_dep_quant_enabled_flag based on ph_ts_residual_coding_disabled_flag.
[0390] For example, as shown in the table below, an implementation can be provided that signals pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag only when the value of ph_ts_residual_coding_disabled_flag is 0.
[0391] [Table 26]
[0392]
[0393] Referring to Table 26, when the value of ph_ts_residual_coding_disabled_flag is 0, pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag can be signaled in the image header syntax. Furthermore, for example, when the value of ph_ts_residual_coding_disabled_flag is 1, pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag may not be signaled. Additionally, for example, when pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag are not signaled, they can be inferred to be 0 in the decoding device.
[0394] In addition, for example, referring to Table 26 above, ph_ts_residual_coding_disabled_flag, pic_sign_data_hiding_enabled_flag, and ph_dep_quant_enabled_flag can all be signaled in the image header syntax.
[0395] In addition, this document proposes an implementation method that combines with the above-described implementation of signaling the sh_ts_residual_coding_disabled_flag. For example, an implementation method for signaling the sh_ts_residual_coding_disabled_flag, as shown in the table below, can be proposed.
[0396] [Table 27]
[0397]
[0398] Referring to Table 27, when `pic_sign_data_hiding_enabled_flag` is 0 or `sps_transform_skip_enabled_flag` is 1, a signal can be sent to `ph_ts_residual_coding_disabled_flag`; otherwise, no signal is sent. Furthermore, when `ph_ts_residual_coding_disabled_flag` is not signaled, it can be inferred to be 0 in the decoding device. Additionally, when `sps_sign_data_hiding_enabled_flag` is 1, a signal can be sent to `pic_sign_data_hiding_enabled_flag` in the image header syntax.
[0399] Alternatively, for example, an implementation of signaling the sh_ts_residual_coding_disabled_flag as shown in the table below can be proposed.
[0400] [Table 28]
[0401]
[0402] Referring to Table 28, when `pic_sign_data_hiding_enabled_flag` is 0 and `sps_transform_skip_enabled_flag` is 1, a signal can be sent to `ph_ts_residual_coding_disabled_flag`; otherwise, no signal is sent. Furthermore, when `ph_ts_residual_coding_disabled_flag` is not signaled, it can be inferred to be 0 in the decoding device. Additionally, when `sps_sign_data_hiding_enabled_flag` is 1, a signal can be sent to `pic_sign_data_hiding_enabled_flag` in the image header syntax.
[0403] Alternatively, for example, an implementation of the signaling sh_ts_residual_coding_disabled_flag as shown in the table below can be proposed.
[0404] [Table 29]
[0405]
[0406] Referring to Table 29, when `sps_transform_skip_enabled_flag` is 1, a signal can be sent to `ph_ts_residual_coding_disabled_flag`; otherwise, no signal is sent. Furthermore, referring to Table 29, when `ph_ts_residual_coding_disabled_flag` is 0, a signal can be sent to `pic_sign_data_hiding_enabled_flag`; otherwise, no signal is sent. Additionally, when `ph_ts_residual_coding_disabled_flag` is not signaled, it can be inferred to be 0 in the decoding device. Furthermore, when `pic_sign_data_hiding_enabled_flag` is not signaled, it can be inferred to be 0 in the decoding device.
[0407] Alternatively, for example, an implementation of the signaling sh_ts_residual_coding_disabled_flag as shown in the table below can be proposed.
[0408] [Table 30]
[0409]
[0410] Referring to Table 30, when `sps_transform_skip_enabled_flag` is 1, a signal can be sent to `ph_ts_residual_coding_disabled_flag`; otherwise, no signal needs to be sent. Additionally, referring to Table 30, when `ph_ts_residual_coding_disabled_flag` is 0, a signal can be sent to `pic_sign_data_hiding_enabled_flag` and `ph_dep_quant_enabled_flag`; otherwise, no signal needs to be sent. Furthermore, when `ph_ts_residual_coding_disabled_flag` is not signaled, it can be inferred to be 0 in the decoding device. Furthermore, when pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag are not signaled, they can be inferred to be 0 in the decoding device.
[0411] Furthermore, as mentioned above, the information (syntax elements) in the syntax table disclosed in this document can be included in image / video information and can be configured / encoded in the encoding device and sent to the decoding device in the form of a bitstream. The decoding device can parse / decode the information (syntax elements) in the corresponding syntax table. The decoding device can perform block / image / video reconstruction processing based on the decoded information.
[0412] Figure 9 A brief illustration is provided of an image encoding method performed by an encoding device according to the present disclosure. Figure 9 The method disclosed in the article can be derived from Figure 2 The encoding device disclosed in the document executes the code. Specifically, for example, Figure 9 The S900 can be executed by the predictor of the encoding device, and the S910 can be executed by the residual processor of the encoding device. Figure 9 S920 to S960 can be executed by the entropy encoder of the encoding device. Additionally, although not shown, the process of generating reconstructed samples and a reconstructed image of the current block based on the residual samples and predicted samples of the current block can be performed by the adder of the encoding device.
[0413] The encoding device derives a prediction sample for the current block by performing prediction on the current block in the current slice (S900). For example, the encoding device can derive a prediction sample for the current block by performing intra-frame prediction or inter-frame prediction on the current block. For example, the encoding device can determine whether to perform inter-frame prediction or intra-frame prediction on the current block, can determine a specific inter-frame prediction mode or a specific intra-frame prediction mode based on the RD cost, and can derive a prediction sample for the current block based on the determined prediction mode.
[0414] For example, the encoding device can deduce the inter-frame prediction mode and motion information of the current block and generate prediction samples for the current block. Here, the inter-frame prediction mode determination process, motion information deduction process, and prediction sample generation process can be executed simultaneously, and any one process can be executed earlier than the others. For example, the inter-frame prediction unit of the encoding device may include a prediction mode determination unit, a motion information deduction unit, and a prediction sample deduction unit. The prediction mode determination unit can determine the prediction mode of the current block, the motion information deduction unit can deduce the motion information of the current block, and the prediction sample deduction unit can deduce the prediction samples of the current block. For example, the inter-frame prediction unit of the encoding device can search for blocks similar to the current block in a predetermined region (search region) of a reference image through motion estimation and deduce the reference block whose difference from the current block is the smallest, equal to, or less than a predetermined standard. Based on this, a reference image index indicating the reference image where the reference block is located can be derived, and a motion vector can be derived based on the positional difference between the reference block and the current block. The encoding device can determine the mode to be applied to the current block among various prediction modes. The encoding device can compare the RD costs of various prediction modes and determine the optimal prediction mode for the current block.
[0415] For example, the encoding device can configure a motion information candidate list for the current block and deduce a reference block among the reference blocks indicated by the motion information candidates included in the motion information candidate list whose difference from the current block is minimum, equal to, or less than a predetermined standard. In this case, a motion information candidate associated with the deduced reference block can be selected, and the motion information of the current block can be deduced based on the motion information of the selected motion information candidate.
[0416] The encoding device derives the residual sample of the current block based on the predicted sample (S910). For example, the encoding device can derive the residual sample of the current block by subtracting the predicted sample from the original sample of the current block.
[0417] The encoding device encodes the prediction information used for prediction (S920). The image information may include prediction information for the current block. For example, the prediction information may include prediction mode information and information related to the motion information of the current block as information related to the prediction process. The information related to the motion information of the current block may include motion information candidate index information as information for deriving motion vectors. In addition, for example, the information related to motion information may include the aforementioned motion vector difference (MVD) information and / or reference image index information.
[0418] The encoding device encodes a symbol data hiding enable flag for determining whether symbol data hiding is enabled in the current slice (S930). The encoding device can encode the symbol data hiding enable flag for determining whether symbol data hiding is enabled in the current slice. Image information may include the symbol data hiding enable flag. For example, the encoding device can determine whether symbol data hiding is enabled for image blocks in the sequence, and can encode the symbol data hiding enable flag for whether symbol data hiding is enabled. For example, the symbol data hiding enable flag can be a flag indicating whether symbol data hiding is enabled. For example, the symbol data hiding enable flag can indicate whether symbol data hiding is enabled. That is, for example, the symbol data hiding enable flag can indicate whether symbol data hiding is enabled for image blocks in the sequence. For example, the symbol data hiding enable flag can indicate whether a symbol data hiding usage flag indicating whether symbol data hiding is used for the current slice exists. For example, a symbol data hiding enable flag with a value of 1 can indicate that symbol data hiding is enabled, while a symbol data hiding enable flag with a value of 0 can indicate that symbol data hiding is not enabled. For example, a symbolic data hiding enable flag with a value of 1 can indicate the presence of a symbolic flag to which symbolic data hiding has been applied, while a symbolic data hiding enable flag with a value of 0 can indicate the absence of a symbolic flag to which symbolic data hiding has been applied. Furthermore, for example, the symbolic data hiding enable flag can be signaled in the Sequence Parameter Set (SPS) syntax. Alternatively, for example, the symbolic data hiding enable flag can be signaled in the image header syntax or the slice header syntax. The syntax element for the symbolic data hiding enable flag can be the aforementioned `sps_sign_data_hiding_enabled_flag`.
[0419] The encoding device encodes the TSRC enable flag, which is used to determine whether to enable Transform Skip Residual Coding (TSRC) for transform skip blocks in the current slice, based on the symbol data hiding enable flag (S940). Image information may include the TSRC enable flag.
[0420] For example, the encoding device can encode the TSRC enable flag based on the symbol data hiding enable flag. For example, the TSRC enable flag can be encoded based on a value of 0. That is, for example, the TSRC enable flag can be encoded when the value of the symbol data hiding enable flag is 0 (i.e., when the symbol data hiding enable flag indicates that symbol data hiding is not enabled). In other words, for example, the TSRC enable flag can be signaled when the value of the symbol data hiding enable flag is 0 (i.e., when the symbol data hiding enable flag indicates that symbol data hiding is not enabled). Furthermore, for example, the TSRC enable flag may not be encoded when the value of the symbol data hiding enable flag is 1, and the value of the TSRC enable flag can be deduced as 0 in the decoding device. That is, for example, the TSRC enable flag may not be signaled when the value of the symbol data hiding enable flag is 1, and the value of the TSRC enable flag can be deduced as 0 in the decoding device.
[0421] Here, for example, the TSRC enable flag can be a flag used to indicate whether TSRC is enabled. That is, for example, the TSRC enable flag can be a flag indicating whether TSRC is enabled for blocks in a slice. In other words, for example, the TSRC enable flag can be a flag indicating whether TSRC is enabled for transform skip blocks in a slice. For example, a TSRC enable flag with a value of 1 can indicate that TSRC is not enabled, while a TSRC enable flag with a value of 0 can indicate that TSRC is enabled. Furthermore, for example, the TSRC enable flag can be signaled in the slice header syntax. The syntax element for the TSRC enable flag can be the sh_ts_residual_coding_disabled_flag mentioned above. The TSRC enable flag can be referred to as the TSRC disable flag.
[0422] Furthermore, for example, the encoding device can determine whether dependent quantization is enabled for a block of images in the sequence, and can encode a dependent quantization enable flag used to determine whether dependent quantization is enabled. Image information may include a dependent quantization enable flag. For example, the dependent quantization enable flag can be a flag indicating whether dependent quantization is enabled. For example, the dependent quantization enable flag can indicate whether dependent quantization is enabled. That is, for example, the dependent quantization enable flag can indicate whether dependent quantization is enabled for a block of images in the sequence. For example, the dependent quantization enable flag can indicate whether a dependent quantization usage flag indicating whether dependent quantization is used for the current slice exists. For example, a dependent quantization enable flag with a value of 1 can indicate that dependent quantization is enabled, and a dependent quantization enable flag with a value of 0 can indicate that dependent quantization is not enabled. Furthermore, for example, the dependent quantization enable flag can be signaled in the SPS syntax, slice header syntax, etc. The syntax element of the dependent quantization enable flag can be the aforementioned `sps_dep_quant_enabled_flag`.
[0423] Furthermore, for example, the encoding device can encode a transform skip enable flag for whether transform skipping is enabled for the current slice. Image information may include the transform skip enable flag. For example, the encoding device can determine whether transform skipping is enabled for a block of images in the sequence, and can encode the transform skip enable flag for whether transform skipping is enabled. For example, the transform skip enable flag can be a flag for whether transform skipping is enabled. For example, the transform skip enable flag can indicate whether transform skipping is enabled. That is, for example, the transform skip enable flag can indicate whether transform skipping is enabled for a block of images in the sequence. For example, the transform skip enable flag can indicate whether a transform skip flag can exist. For example, a transform skip enable flag with a value of 1 can indicate that transform skipping is enabled, and a transform skip enable flag with a value of 0 can indicate that transform skipping is not enabled. That is, for example, a transform skip enable flag with a value of 1 can indicate that a transform skip flag can exist, and a transform skip enable flag with a value of 0 can indicate that a transform skip flag does not exist. Furthermore, for example, the transform skip enable flag can be signaled in the Sequence Parameter Set (SPS) syntax. The syntax element of the transform skip enable flag can be the sps_transform_skip_enabled_flag described above.
[0424] Furthermore, for example, the TSRC enable flag can be encoded based on the symbol data hiding enable flag and / or the transform skip enable flag. For example, the TSRC enable flag can be encoded based on a symbol data hiding enable flag with a value of 0 and a transform skip enable flag with a value of 1. That is, for example, when the symbol data hiding enable flag has a value of 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled) and the transform skip enable flag has a value of 1 (i.e., when the transform skip enable flag indicates that transform skipping is enabled), the TSRC enable flag can be encoded (or signaled). Furthermore, for example, when the transform skip enable flag has a value of 0, the TSRC enable flag may not be encoded, and the value of the TSRC enable flag can be deduced to be 0. That is, for example, when the transform skip enable flag has a value of 0, the TSRC enable flag may not be signaled, and the value of the TSRC enable flag can be deduced to be 0.
[0425] The encoding device encodes the residual information for the current block based on the TSRC enable flag (S950). The encoding device can encode the residual information for the current block based on the TSRC enable flag.
[0426] For example, the encoding device can determine the residual coding syntax for the current block based on the TSRC enable flag. For example, the encoding device can determine the residual coding syntax for the current block as either regular residual coding (RRC) syntax or transform skip residual coding (TSRC) syntax based on the TSRC enable flag. The RRC syntax can indicate the syntax according to RRC, and the TSRC syntax can indicate the syntax according to TSRC.
[0427] For example, based on a TSRC enable flag with a value of 1, the residual coding syntax for the current block can be determined as regular residual coding (RRC) syntax. In this case, for example, a transform skip flag for determining whether the current block has undergone transform skipping can be encoded, and the value of the transform skip flag can be 1. For example, image information can include the transform skip flag for the current block. The transform skip flag can indicate whether the current block has undergone transform skipping. That is, the transform skip flag can indicate whether a transform has been applied to the transform coefficients of the current block. The syntax element representing the transform skip flag can be transform_skip_flag as described above. For example, when the transform skip flag is 1, the transform skip flag can indicate that no transform has been applied to the current block (i.e., the transform is skipped), while if the transform skip flag is 0, the transform skip flag can indicate that a transform has been applied to the current block. For example, if the current block is a transform skipped block, the value of the transform skip flag for the current block can be 1.
[0428] Furthermore, for example, based on a TSRC enable flag with a value of 0, the residual coding syntax for the current block can be determined as Transform Skip Residual Coding (TSRC) syntax. Furthermore, for example, a transform skip flag for determining whether the current block is transformed skipped can be encoded, and the residual coding syntax for the current block can be determined as Transform Skip Residual Coding (TSRC) syntax based on a transform skip flag with a value of 1 and a TSRC enable flag with a value of 0. Furthermore, for example, a transform skip flag for determining whether the current block is transformed skipped can be encoded, and the residual coding syntax for the current block can be determined as regular residual coding (RRC) syntax based on a transform skip flag with a value of 0 and a TSRC enable flag with a value of 0.
[0429] Then, for example, the encoding device can encode residual information for a given residual coding syntax for the current block. The encoding device can encode residual information for a given residual coding syntax of residual samples for the current block. For example, residual information for a regular residual coding (RRC) syntax for the current block can be encoded based on a TSRC enable flag with a value of 1, and residual information for a TSRC syntax for the current block can be encoded based on a TSRC enable flag with a value of 0. Image information may include residual information.
[0430] Specifically, for example, the encoding device can derive the transform coefficients of the current block based on the residual samples. For instance, the encoding device can determine whether to apply a transform to the current block. That is, the encoding device can determine whether to apply a transform to the residual samples of the current block. The encoding device can consider encoding efficiency to determine whether to apply a transform to the current block. For example, the encoding device can determine that no transform is applied to the current block. Furthermore, a block to which no transform is applied can be referred to as a transform-skipped block.
[0431] When the transform is not applied to the current block, i.e., when the transform is not applied to the residual samples, the encoding device can derive the transform coefficients of the current block from the derived residual samples. Furthermore, when the transform is applied to the current block, i.e., when the transform is applied to the residual samples, the encoding device can perform a transform on the residual samples to derive the transform coefficients of the current block. The current block can include multiple sub-blocks or coefficient groups (CGs). Additionally, the size of the sub-blocks of the current block can be 4×4 or 2×2. That is, the sub-blocks of the current block can include up to 16 non-zero transform coefficients or up to 4 non-zero transform coefficients. Here, the current block can be a coded block (CB) or a transform block (TB). Furthermore, the transform coefficients can be referred to as residual coefficients.
[0432] When the residual coding syntax for the current block is determined to be 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 as described above.
[0433] For example, the residual information in an RRC syntax can include syntax elements of the transform coefficients for the current block. Here, the transform coefficients can be referred to as residual coefficients.
[0434] For example, syntax elements may include syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, abs_remainder, dec_abs_level, and / or coeff_sign_flag.
[0435] Specifically, for example, the syntax element may include positional information indicating the location of the last non-zero transform coefficient in the residual coefficient array of the current block. That is, the syntax element may include positional information indicating the location of the last non-zero transform coefficient in the scan order of the current block. The positional information may include information indicating the prefix of the column position of the last non-zero transform coefficient, information indicating the prefix of the row position of the last non-zero transform coefficient, information indicating the suffix of the column position of the last non-zero transform coefficient, and information indicating the suffix of the row position of the last non-zero transform coefficient. The syntax element for the positional information may be `last_sig_coeff_x_prefix`, `last_sig_coeff_y_prefix`, `last_sig_coeff_x_suffix`, and `last_sig_coeff_y_suffix`. Furthermore, non-zero transform coefficients may be referred to as valid coefficients.
[0436] Furthermore, for example, syntax elements may include a coded subblock flag indicating whether the subblocks of the current block include non-zero transform coefficients, a valid coefficient flag indicating whether the transform coefficients of the current block are non-zero transform coefficients, a first coefficient level flag indicating whether the coefficient level for the transform coefficients is greater than a first threshold, a parity level flag indicating the parity of the coefficient levels, and / or a second coefficient level flag indicating whether the coefficient level for the transform coefficients is greater than a second threshold. Here, the coded subblock flag may be sb_coded_flag or coded_sub_block_flag; the valid coefficient flag may be sig_coeff_flag; the first coefficient level flag may be abs_level_gt1_flag or abs_level_gtx_flag; the parity level flag may be par_level_flag; and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
[0437] Furthermore, for example, syntax elements may include coefficient value information related to the values of the transform coefficients of the current block. This coefficient value information may be `abs_remainder` and / or `dec_abs_level`.
[0438] Furthermore, for example, syntax elements may include a sign flag indicating the sign of the transform coefficients. The sign flag may be `coeff_sign_flag`.
[0439] Furthermore, for example, when symbolic data hiding is applied to the current block, the sign flag of the first valid transform coefficient of the current coefficient group (CG) in the current block may not be encoded and signaled. That is, for example, when symbolic data hiding is applied to the current block, the syntax element may not include the sign flag indicating the sign of the first valid transform coefficient. Furthermore, for example, whether symbolic data hiding is applied to the current block can be deduced based on the symbolic data hiding enable flag and / or the position of the first valid transform coefficient of the current CG in the current block and the position of the last valid transform coefficient. For example, when the value of the symbolic data hiding enable flag is 1, and the value obtained by subtracting the position of the first valid transform coefficient from the position of the last valid transform coefficient is greater than 3 (i.e., when the value of the symbolic data hiding enable flag is 1, and the number of valid transform coefficients in the current CG is greater than 3), symbolic data hiding can be applied to the current CG of the current block.
[0440] Additionally, for example, when the residual coding syntax of the current block is determined to be TSRC syntax, the encoding device can encode the residual information of the TSRC syntax for the current block. For example, the residual information of the TSRC syntax may include the syntax elements shown in Table 3 above.
[0441] For example, the residual information in the TSRC syntax can include syntax elements of the transform coefficients for the current block. Here, the transform coefficients can also be referred to as residual coefficients.
[0442] For example, syntax elements may include context-encoded syntax elements and / or bypass-encoded syntax elements for transform coefficients. Syntax elements may include syntax elements such as sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, and / or abs_remainder.
[0443] For example, the context coding syntax elements for transform coefficients may include: a valid coefficient flag, indicating whether the transform coefficient is a non-zero transform coefficient; a sign flag, indicating the sign of the transform coefficient; a first coefficient level flag, used to determine whether the coefficient level of the transform coefficient is greater than a first threshold; and / or a parity level flag, used for parity checking of the coefficient level of the transform coefficient. Alternatively, the context coding syntax elements may include: a second coefficient level flag, used to determine whether the coefficient level of the transform coefficient is greater than a second threshold; a third coefficient level flag, used to determine whether the coefficient level of the transform coefficient is greater than a third threshold; a fourth coefficient level flag, used to determine whether the coefficient level of the transform coefficient is greater than a fourth threshold; and / or a fifth coefficient level flag, used to determine whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the valid coefficient flag may be `sig_coeff_flag`; the sign flag may be `coeff_sign_flag`; the first coefficient level flag may be `abs_level_gt1_flag`; and the parity level flag may be `par_level_flag`. Additionally, the second coefficient level flag can be either abs_level_gt3_flag or abs_level_gtx_flag; the third coefficient level flag can be either abs_level_gt5_flag or abs_level_gtx_flag; the fourth coefficient level flag can be either abs_level_gt7_flag or abs_level_gtx_flag; and the fifth coefficient level flag can be either abs_level_gt9_flag or abs_level_gtx_flag.
[0444] Additionally, for example, the bypass coding syntax elements for transform coefficients may include coefficient level information of the transform coefficient's value (or coefficient level) and / or a sign flag indicating the sign of the transform coefficient. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.
[0445] The encoding device generates a bitstream including a symbolic data hiding enable flag, a TSRC enable flag, prediction information, and residual information (S960). For example, the encoding device can output image information including the symbolic data hiding enable flag, the TSRC enable flag, prediction information, and residual information as a bitstream. The bitstream may include the symbolic data hiding enable flag, the TSRC enable flag, prediction information, and residual information. Additionally, the bitstream may also include a dependent quantization enable flag and / or a transform skip enable flag.
[0446] In addition, the bitstream can be sent to the decoding device via a network or (digital) storage medium. Here, the network can include broadcast networks, communication networks, etc., and the digital storage medium can include various storage media such as Universal Serial Bus (USB), Secure Digital (SD), Optical Disc (CD), Digital Video Disc (DVD), Blu-ray, Hard Disk Drive (HDD), Solid State Drive (SSD), etc.
[0447] Figure 10 A brief illustration is provided of an encoding device for performing an image encoding method according to the present disclosure. Figure 9 The method disclosed in the article can be derived from Figure 10 The encoding device disclosed in the document executes the code. Specifically, for example, Figure 10 The predictor of the encoding device can perform Figure 9 The S900 in the middle, Figure 10 The residual processor of the encoding device can perform Figure 9 The S910 in the middle, and Figure 10 The entropy encoder of the encoding device can perform Figure 9 S920 to S960. Additionally, although not shown, the adder of the encoding device can perform the process of generating reconstructed samples and a reconstructed image of the current block based on the residual samples and predicted samples of the current block.
[0448] Figure 11 A brief illustration is provided of an image decoding method performed by a decoding device according to the present disclosure. Figure 11 The method disclosed in the article can be derived from Figure 3 The decoding device disclosed in the document performs the operation. Specifically, for example, Figure 11 S1100 to S1120 can be executed by the entropy decoder of the decoding device. Figure 11 S1130 can be executed by the predictor of the decoding device. Figure 11 S1140 can be executed by the residual processor of the decoding device, and S1150 can be executed by the adder of the decoding device. Additionally, although not shown, the processing of receiving prediction information for the current block can be executed by the entropy decoder of the decoding device.
[0449] The decoding device obtains a symbol data hiding enable flag (S1100) indicating whether symbol data hiding for the current slice is enabled. The decoding device can obtain image information, including the symbol data hiding enable flag, via the bitstream. The image information may include the symbol data hiding enable flag. For example, the symbol data hiding enable flag can be a flag indicating whether symbol data hiding is enabled. For example, the symbol data hiding enable flag can indicate whether symbol data hiding is enabled. That is, for example, the symbol data hiding enable flag can indicate whether symbol data hiding is enabled for blocks of images in the sequence. For example, the symbol data hiding enable flag can indicate whether a symbol data hiding usage flag indicating whether symbol data hiding is used for the current slice exists. For example, a symbol data hiding enable flag with a value of 1 can indicate that symbol data hiding is enabled, while a symbol data hiding enable flag with a value of 0 can indicate that symbol data hiding is not enabled. For example, a symbol data hiding enable flag with a value of 1 can indicate that a symbol flag with applied symbol data hiding exists, while a symbol data hiding enable flag with a value of 0 can indicate that a symbol flag with applied symbol data hiding does not exist. Furthermore, for example, the symbol data hiding enable flag can be signaled in the Sequence Parameter Set (SPS) syntax. Alternatively, for example, the symbolic data hiding enable flag can be signaled in the image header syntax or the slice header syntax. The syntax element for the symbolic data hiding enable flag can be the sps_sign_data_hiding_enabled_flag mentioned above.
[0450] The decoding device obtains a Transform Skip Residual Coding (TSRC) enable flag (S1110) for determining whether TSRC is enabled for the transform skip block in the current slice. Image information may include the TSRC enable flag.
[0451] For example, the decoding device can obtain the TSRC enable flag based on the symbol data hiding enable flag. For example, the TSRC enable flag can be obtained based on a symbol data hiding enable flag with a value of 0. That is, for example, the TSRC enable flag can be obtained when the symbol data hiding enable flag is 0 (i.e., when the symbol data hiding enable flag indicates that symbol data hiding is not enabled). In other words, for example, the TSRC enable flag can be signaled when the symbol data hiding enable flag is 0 (i.e., when the symbol data hiding enable flag indicates that symbol data hiding is not enabled). Furthermore, for example, the TSRC enable flag may not be obtained when the symbol data hiding enable flag is 1, and the value of the TSRC enable flag can be deduced to be 0. That is, for example, the TSRC enable flag may not be signaled when the symbol data hiding enable flag is 1, and the value of the TSRC enable flag can be deduced to be 0.
[0452] Here, for example, the TSRC enable flag can be a flag used to indicate whether TSRC is enabled. That is, for example, the TSRC enable flag can be a flag indicating whether TSRC is enabled for a block within a slice. In other words, for example, the TSRC enable flag can be a flag indicating whether TSRC is enabled for a transform skip block within a slice. Here, the block can be a coded block (CB) or a transform block (TB). For example, a TSRC enable flag with a value of 1 can indicate that TSRC is not enabled, and a TSRC enable flag with a value of 0 can indicate that TSRC is enabled. Furthermore, for example, the TSRC enable flag can be signaled in the slice header syntax. The syntax element for the TSRC enable flag can be the sh_ts_residual_coding_disabled_flag mentioned above. The TSRC enable flag can be referred to as the TSRC disable flag.
[0453] Furthermore, for example, the decoding device can obtain a dependency quantization enable flag. The decoding device can obtain image information, including the dependency quantization enable flag, from the bitstream. The image information can include the dependency quantization enable flag. For example, the dependency quantization enable flag can be a flag indicating whether dependency quantization is enabled. For example, the dependency quantization enable flag can indicate whether dependency quantization is enabled. That is, for example, the dependency quantization enable flag can indicate whether dependency quantization is enabled for blocks of images in the sequence. For example, the dependency quantization enable flag can indicate whether a dependency quantization usage flag indicating whether dependency quantization is used for the current slice exists. For example, a dependency quantization enable flag with a value of 1 can indicate that dependency quantization is enabled, and a dependency quantization enable flag with a value of 0 can indicate that dependency quantization is not enabled. Furthermore, for example, the dependency quantization enable flag can be signaled in the SPS syntax, slice header syntax, etc. The syntax element of the dependency quantization enable flag can be the aforementioned `sps_dep_quant_enabled_flag`.
[0454] Furthermore, for example, the decoding device can obtain a transform skip enabled flag. The decoding device can obtain image information, including the transform skip enabled flag, through the bitstream. The image information can include the transform skip enabled flag. For example, the transform skip enabled flag can be a flag used to indicate whether transform skipping is enabled. For example, the transform skip enabled flag can indicate whether transform skipping is enabled. That is, for example, the transform skip enabled flag can indicate whether transform skipping is enabled for blocks of images in the sequence. For example, the transform skip enabled flag can indicate whether a transform skip flag can exist. For example, a transform skip enabled flag with a value of 1 can indicate that transform skipping is enabled, and a transform skip enabled flag with a value of 0 can indicate that transform skipping is not enabled. That is, for example, a transform skip enabled flag with a value of 1 can indicate that a transform skip flag can exist, and a transform skip enabled flag with a value of 0 can indicate that a transform skip flag does not exist. Furthermore, for example, the transform skip enabled flag can be signaled in the Sequence Parameter Set (SPS) syntax. The syntax element for the transform skip enabled flag can be the aforementioned sps_transform_skip_enabled_flag.
[0455] Furthermore, for example, the TSRC enable flag can be obtained based on the symbol data hiding enable flag and / or the transform skip enable flag. For example, the TSRC enable flag can be obtained based on a symbol data hiding enable flag with a value of 0 and a transform skip enable flag with a value of 1. That is, for example, when the symbol data hiding enable flag has a value of 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled), and the transform skip enable flag has a value of 1 (i.e., when the transform skip enable flag indicates that transform skipping is enabled), the TSRC enable flag can be obtained (or signaled). Furthermore, for example, when the transform skip enable flag has a value of 0, the TSRC enable flag may not be obtained, and the value of the TSRC enable flag can be deduced to be 0. That is, for example, when the transform skip enable flag has a value of 0, the TSRC enable flag may not be signaled, and the value of the TSRC enable flag can be deduced to be 0.
[0456] The decoding device obtains residual coding information for the current block in the current slice based on the TSRC enable flag (S1120). The decoding device can obtain residual information for the current block in the current slice based on the TSRC enable flag. Here, the current block can be a coded block (CB) or a transform block (TB).
[0457] For example, the decoding device can determine the residual coding syntax for the current block in the current slice based on the TSRC enable flag. For instance, the decoding device can determine the residual coding syntax for the current block as either regular residual coding (RRC) syntax or transform skip residual coding (TSRC) syntax based on the TSRC enable flag. The RRC syntax can indicate the syntax according to RRC, and the TSRC syntax can indicate the syntax according to TSRC. Furthermore, for example, the current block can be a transform skip block in the current slice. Here, a transform skip block can mean a block for which no transform has been applied.
[0458] For example, the residual coding syntax for the current block in the current slice can be determined as regular residual coding (RRC) syntax based on a TSRC enable flag with a value of 1. In this case, for example, a transform skip flag for determining whether the current block is transformed skipped can be obtained based on a transform skip enable flag with a value of 1, and the transform skip flag can have a value of 1. For example, image information may include transform skip flags for transform skipped blocks. The transform skip flag can indicate whether the current block is transformed skipped. That is, the transform skip flag can indicate whether a transform is applied to the transform coefficients of the current block. The syntax element representing the transform skip flag can be the transform_skip_flag mentioned above. For example, when the transform skip flag has a value of 1, the transform skip flag can indicate that the transform is not applied to the current block (i.e., transform skipped), while when the transform skip flag has a value of 0, the transform skip flag can indicate that the transform is applied to the current block. For example, the transform skip flag for the current block can have a value of 1.
[0459] Furthermore, for example, the residual coding syntax for the current block can be determined as Transform Skip Residual Coding (TSRC) syntax based on a TSRC enable flag with a value of 0. Furthermore, for example, a transform skip flag indicating whether the current block is transformed skipped can be obtained, and the residual coding syntax for the current block can be determined as Transform Skip Residual Coding (TSRC) syntax based on a transform skip flag with a value of 1 and a TSRC enable flag with a value of 0. Furthermore, for example, a transform skip flag indicating whether the current block is transformed skipped can be obtained, and the residual coding syntax for the current block can be determined as regular residual coding (RRC) syntax based on a transform skip flag with a value of 0 and a TSRC enable flag with a value of 0.
[0460] Then, for example, the decoding device can obtain residual information for a specific residual coding syntax for the current block. For example, residual information for a regular residual coding (RRC) syntax can be obtained based on a TSRC enable flag with a value of 1, and residual information for a TSRC syntax can be obtained based on a TSRC enable flag with a value of 0. Image information may include residual information.
[0461] For example, when the residual coding syntax for the current block is determined to be RRC syntax, the decoding device can obtain 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 shown in Table 2 above.
[0462] For example, the residual information in an RRC syntax can include syntax elements of the transform coefficients for the current block. Here, the transform coefficients can be referred to as residual coefficients.
[0463] For example, syntax elements may include syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, abs_remainder, dec_abs_leveL, and / or coeff_sign_flag.
[0464] Specifically, for example, the syntax element may include positional information indicating the position of the last non-zero transform coefficient in the residual coefficient array of the current block. That is, the syntax element may include positional information indicating the position of the last non-zero transform coefficient in the scan order of the current block. The positional information may include information indicating a prefix of the column position of the last non-zero transform coefficient, information indicating a prefix of the row position of the last non-zero transform coefficient, information indicating a suffix of the column position of the last non-zero transform coefficient, and information indicating a suffix of the row position of the last non-zero transform coefficient. The syntax element for the positional information may be `last_sig_coeff_x_prefix`, `last_sig_coeff_y_prefix`, `last_sig_coeff_x_suffix`, and `last_sig_coeff_y_suffix`. Furthermore, non-zero transform coefficients may be referred to as valid coefficients.
[0465] Furthermore, for example, syntax elements may include a coded subblock flag indicating whether the current subblock of the current block includes non-zero transform coefficients, a valid coefficient flag indicating whether the transform coefficients of the current block are non-zero transform coefficients, a first coefficient level flag indicating whether the coefficient level for the transform coefficients is greater than a first threshold, a parity level flag indicating the parity of the coefficient levels, and / or a second coefficient level flag indicating whether the coefficient level for the transform coefficients is greater than a second threshold. Here, the coded subblock flag may be sb_coded_flag or coded_sub_block_flag, the valid coefficient flag may be sig_coeff_flag, the first coefficient level flag may be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag may be par_level_flag, and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
[0466] Furthermore, for example, syntax elements may include coefficient value information related to the transform coefficient values of the current block. This coefficient value information may be `abs_remainder` and / or `dec_abs_level`.
[0467] Furthermore, for example, syntax elements may include a sign flag indicating the sign of the transform coefficients. The sign flag may be `coeff_sign_flag`.
[0468] Furthermore, for example, when symbolic data hiding is applied to the current block, the sign flag of the first valid transform coefficient of the current coefficient group (CG) in the current block may not be signaled. That is, for example, when symbolic data hiding is applied to the current block, the syntax element may not include a sign flag indicating the sign of the first valid transform coefficient. Furthermore, for example, whether symbolic data hiding is applied to the current block can be deduced based on the symbolic data hiding enable flag and / or the positions of the first and last valid transform coefficients in the current CG. For example, when the symbolic data hiding enable flag is 1 and the value obtained by subtracting the first valid transform coefficient position from the last valid transform coefficient position is greater than 3 (i.e., when the symbolic data hiding enable flag is 1 and the number of valid transform coefficients in the current CG is greater than 3), symbolic data hiding can be applied to the current CG of the current block.
[0469] Additionally, for example, when the residual coding syntax for the current block is determined to be 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 shown in Table 3 above.
[0470] For example, the residual information in the TSRC syntax can include syntax elements of the transform coefficients for the current block. Here, the transform coefficients can be referred to as residual coefficients.
[0471] For example, syntax elements may include context-encoded syntax elements and / or bypass-encoded syntax elements for transform coefficients. Syntax elements may include syntax elements such as sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, and / or abs_remainder.
[0472] For example, the context-encoded syntax elements for transform coefficients may include a valid coefficient flag indicating whether a transform coefficient is a non-zero transform coefficient; a sign flag indicating the sign of a transform coefficient; a first coefficient level flag indicating whether the coefficient level for a transform coefficient is greater than a first threshold; and / or a parity level flag indicating parity for the coefficient level of a transform coefficient. Furthermore, for example, the context-encoded syntax elements may include a second coefficient level flag indicating whether the coefficient level for a transform coefficient is greater than a second threshold; a third coefficient level flag indicating whether the coefficient level for a transform coefficient is greater than a third threshold; a fourth coefficient level flag indicating whether the coefficient level for a transform coefficient is greater than a fourth threshold; and / or a fifth coefficient level flag indicating whether the coefficient level for a transform coefficient is greater than a fifth threshold. Here, the valid coefficient flag may be `sig_coeff_flag`; the sign flag may be `coeff_sign_flag`; the first coefficient level flag may be `abs_level_gt1_flag`; and the parity level flag may be `par_level_flag`. Additionally, the second coefficient level flag may be `abs_level_gt3_flag` or `abs_level_gtx_flag`. The third coefficient level flag can be either abs_level_gt5_flag or abs_level_gtx_flag; the fourth coefficient level flag can be either abs_level_gt7_flag or abs_level_gtx_flag; and the fifth coefficient level flag can be either abs_level_gt9_flag or abs_level_gtx_flag.
[0473] Furthermore, for example, the bypass coding syntax elements for transform coefficients may include coefficient level information of the transform coefficient's value (or coefficient level) and / or a sign flag indicating the sign of the transform coefficient. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.
[0474] The decoding device derives a prediction sample for the current block based on the received prediction information for the current block (S1130). For example, the decoding device may derive the prediction sample for the current block based on an inter-frame prediction mode or an intra-frame prediction mode determined according to the received prediction information. For example, the decoding device may derive motion information for the current block based on an inter-frame prediction mode determined according to the received prediction information. For example, the decoding device may construct a motion information candidate list for the current block, select a motion information candidate from the motion information candidate list based on motion information candidate index information included in the prediction information, and derive motion information for the current block based on the selected motion information candidate. Then, for example, the decoding device may derive a reference image for the current block based on a reference image index for the current block, and may derive a prediction sample for the current block based on a sample of the reference block indicated by a motion vector of the current block on the reference image. The motion information may include a reference image index and a motion vector for the current block.
[0475] The decoding device derives the residual sample of the current block based on the residual coding information (S1140). For example, the decoding device can derive the transform coefficients of the current block based on the residual coding information, and can derive the residual sample of the current block based on the transform coefficients.
[0476] For example, the decoding device can derive the transform coefficients of the current block based on the syntax elements of the residual coding information. Subsequently, the decoding device can derive the residual samples of the current block based on the transform coefficients. For example, when it is deduced from the transform skip flag that the transform was not applied to the current block, i.e., when the transform skip flag is 1, the decoding device can derive the residual samples of the current block from the transform coefficients. Alternatively, for example, when deriving from the transform skip flag without applying a transform to the current block, i.e., when the transform skip flag is 1, the decoding device can dequantize the transform coefficients to derive the residual samples of the current block. Alternatively, for example, when the transform is applied to the current block in the current slice and then deduced simultaneously, i.e., when the transform skip flag for the current block is 0, the decoding device can perform an inverse transform on the transform coefficients to derive the residual samples of the current block. Alternatively, for example, when the transform is applied to the current block based on the transform skip flag and then derived, i.e. when the transform skip flag is 0, the decoding device can dequantize the transform coefficients and perform an inverse transform on the dequantized transform coefficients to derive the residual samples of the current block.
[0477] Furthermore, for example, when symbolic data hiding is applied to the current block, the sign of the first effective transform coefficient in the current block can be derived based on the sum of the absolute values of the effective transform coefficients in the current CG. For example, when the sum of the absolute values of the effective transform coefficients is even, the sign of the first effective transform coefficient can be derived as positive, while when the sum of the absolute values of the effective transform coefficients is odd, the sign of the first effective transform coefficient can be derived as negative.
[0478] The decoding device generates a reconstructed image based on the predicted samples and residual samples (S1150). For example, the decoding device can generate reconstructed samples and / or a reconstructed image of the current block based on the predicted samples and residual samples. For example, the decoding device can generate reconstructed samples by adding the predicted samples and residual samples.
[0479] Subsequently, as mentioned above, in-loop filtering processes such as ALF, SAO, and / or deblocking filtering can be applied to the reconstructed images as needed to improve subjective / objective video quality.
[0480] Figure 12 A decoding device for performing the image decoding method according to this disclosure is briefly illustrated. Figure 11 The method disclosed in the article can be derived from Figure 12 The decoding device disclosed in the document performs the operation. Specifically, for example, Figure 12 The entropy decoder of the decoding device can perform Figure 11 S1100 to S1120, Figure 12 The predictor of the decoding device can perform Figure 11 The S1130, Figure 12 The residual processor of the decoding device can perform Figure 11 The S1140, and Figure 12 The adder of the decoding device can perform Figure 11 S1150. Additionally, although not shown, the processing of receiving prediction information for the current block can be performed by... Figure 12 The entropy decoder of the decoding device is used to perform the decoding.
[0481] According to this document, as described above, the efficiency of residual coding can be improved.
[0482] Additionally, according to this document, the TSRC can be signaled to enable the symbolic data hiding flag. This can improve coding efficiency by preventing symbolic data hiding from being used in transform skip blocks that are not enabled by the TSRC, and improve overall residual coding efficiency by reducing the number of bits to be encoded.
[0483] Additionally, according to this document, the TSRC enable flag can be signaled based on the transform skip enable flag and the symbol data hiding enable flag. This can improve coding efficiency by preventing symbol data hiding for transform skip blocks without TSRC enabled, and improve total residual coding efficiency by reducing the number of bits to be encoded.
[0484] In the above embodiments, the method is described based on a flowchart having a series of steps or blocks. This disclosure is not limited to the order of the above steps or blocks. Some steps or blocks can be performed in a different order than the other steps or blocks described above, or simultaneously. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and may include other steps, or one or more steps in the flowchart may be deleted without affecting the scope of this disclosure.
[0485] The embodiments described in this specification can be executed by being implemented on a processor, microprocessor, controller, or chip. For example, the functional unit shown in each figure can be executed by being implemented on a computer, processor, microprocessor, controller, or chip. In this case, the information for implementation (e.g., information about instructions) or algorithm can be stored in a digital storage medium.
[0486] Furthermore, the decoding and encoding devices using this disclosure can be included in the following devices: multimedia broadcasting transmitters / receivers, mobile communication terminals, home theater video devices, digital cinema video devices, surveillance cameras, video chat devices, real-time communication devices such as video communication, mobile streaming devices, storage media, portable video cameras, VoD service providers, over-the-top (OTT) video devices, internet streaming service providers, three-dimensional (3D) video devices, teleconferencing video devices, transportation user devices (e.g., vehicle user devices, airplane user devices, and ship user devices), and medical video devices; and the decoding and encoding devices using this disclosure can be used to process video signals or data signals. For example, over-the-top (OTT) video devices may include game consoles, Blu-ray players, internet-access televisions, home theater systems, smartphones, tablet computers, digital video recorders (DVRs), etc.
[0487] Furthermore, the processing methods of this disclosure can be generated in the form of a computer-executable program and can be stored in a computer-readable recording medium. Multimedia data with data structures according to this disclosure can also be stored in a computer-readable recording medium. A computer-readable recording medium includes all types of storage devices in which computer-readable data is stored. Computer-readable recording media can include, for example, BD, Universal Serial Bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices. Additionally, computer-readable recording media include media implemented in the form of a carrier wave (e.g., transmission via the Internet). Furthermore, bitstreams generated by encoding methods can be stored in a computer-readable recording medium or transmitted via wired / wireless communication networks.
[0488] Furthermore, embodiments of this disclosure can be implemented using computer program products based on program code, and the program code can be executed on a computer using embodiments of this disclosure. The program code can be stored on a computer-readable medium.
[0489] Figure 13 A structural diagram illustrating a content streaming system that applies this disclosure is shown.
[0490] The content streaming media system using the embodiments of this disclosure may mainly include an encoding server, a streaming server, a network server, a media storage device, a user device, and a multimedia input device.
[0491] An encoding server compresses content input from multimedia input devices such as smartphones, cameras, or camcorders into digital data to generate a bitstream, which is then sent to a streaming server. As another example, when multimedia input devices such as smartphones, cameras, or camcorders generate bitstreams directly, the encoding server can be omitted.
[0492] A bit stream can be generated by an encoding method or bit stream generation method that applies the embodiments of this disclosure, and the streaming server can temporarily store the bit stream during the sending or receiving of the bit stream.
[0493] The streaming server sends multimedia data to the user's device via a web server based on a user request, and the web server acts as a medium for notifying the user of services. When a user requests a desired service from the web server, the web server delivers the request to the streaming server, and the streaming server sends the multimedia data to the user. In this scenario, the content streaming system may include a separate control server. In this case, the control server is used to control the commands / responses between devices within the content streaming system.
[0494] A streaming server can receive content from media storage and / or encoding servers. For example, when receiving content from an encoding server, the content can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a predetermined period of time.
[0495] Examples of user devices can include mobile phones, smartphones, laptops, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigators, touchscreen PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, and head-mounted displays), digital TVs, desktop computers, and digital signage. Each server within a content streaming system can operate as a distributed server, in which case data received from each server can be distributed.
[0496] The claims described in this disclosure can be combined in various ways. For example, the technical features of the method claims of this disclosure can be combined to implement an apparatus, and the technical features of the apparatus claims of this disclosure can be combined to implement a method. Furthermore, the technical features of the method claims and the apparatus claims of this disclosure can be combined to implement an apparatus, and the technical features of the method claims and the apparatus claims of this disclosure can be combined to implement a method.
Claims
1. An image decoding method performed by a decoding device, the image decoding method comprising the following steps: Obtain the symbol data hiding enable flag used to determine whether to enable symbol data hiding; Obtain the TSRC deactivation flag used to determine whether to use the Transform Skip Residual Encoding (TSRC) syntax for transform skip blocks in the current slice; Residual information for the current block in the current slice is obtained based on the TSRC deactivation flag; The prediction sample for the current block is derived based on the prediction information for the current block; The residual sample of the current block is derived based on the residual information; as well as A reconstructed image is generated based on the predicted samples and the residual samples. Wherein, the current block is the transform skip block in the current slice. The TSRC deactivation flag is obtained from the slice header syntax in the bitstream based on the symbol data hiding enable flag. Specifically, based on the TSRC deactivation flag being equal to 1, residual coding syntax is used to obtain the residual information for the current block, and Wherein, based on the TSRC deactivation flag being equal to 0, the TSRC syntax is used to obtain the residual information for the current block.
2. An image encoding method performed by an encoding device, the image encoding method comprising the following steps: The predicted sample of the current block is derived by performing a prediction on the current block in the current slice; The residual sample of the current block is derived based on the predicted sample; The prediction information used for the prediction is encoded; Encode the symbol data hiding enable flag used to determine whether to enable symbol data hiding; Based on the symbol data hiding enable flag, the TSRC disable flag, which is used to encode whether the Transform Skip Residual Coding (TSRC) syntax is used for transform skip blocks in the current slice; The residual information for the current block is encoded based on the TSRC deactivation flag; as well as Generate a bitstream including the symbol data hiding enable flag, the TSRC deactivation flag, the prediction information, and the residual information. Wherein, the current block is the transform skip block in the current slice. The TSRC deactivation flag is encoded into the slice header syntax of the bitstream. Specifically, based on the TSRC deactivation flag being equal to 1, residual coding syntax is used to encode the residual information for the current block, and Wherein, based on the TSRC deactivation flag being equal to 0, the TSRC syntax is used to encode the residual information for the current block.
3. A method for transmitting data relating to image information, the method comprising the following steps: The predicted sample of the current block is derived by performing a prediction on the current block in the current slice; The residual sample of the current block is derived based on the predicted sample; The prediction information used for the prediction is encoded; Encode the symbol data hiding enable flag used to determine whether to enable symbol data hiding; Based on the symbol data hiding enable flag, the TSRC disable flag, which is used to encode whether the Transform Skip Residual Coding (TSRC) syntax is used for transform skip blocks in the current slice; The residual information for the current block is encoded based on the TSRC deactivation flag; Generate a bitstream including the symbol data hiding enable flag, the TSRC deactivation flag, the prediction information, and the residual information; as well as Send the data including the bit stream. Wherein, the current block is the transform skip block in the current slice. The TSRC deactivation flag is encoded into the slice header syntax of the bitstream. Specifically, based on the TSRC deactivation flag being equal to 1, residual coding syntax is used to encode the residual information for the current block, and Wherein, based on the TSRC deactivation flag being equal to 0, the TSRC syntax is used to encode the residual information for the current block.