Image decoding method, image encoding method, and image data transmission method
By using symbol data hiding enable flags and TSRC enable flags in the image encoding system, the problem of low encoding efficiency of high-resolution images is solved, and more efficient encoding and decoding is achieved, reducing costs.
Patent Information
- Application Number
- CN202510417421.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2020-03-31
- Filing Date
- 2021-03-30
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art is difficult to effectively encode and decode high-resolution, high-quality images, resulting in increased transmission and storage costs.
By introducing symbol data hiding enable flags and transform skip residual coding (TSRC) enable flags in the image encoding system, we decide whether to enable symbol data hiding and TSRC, thereby improving coding efficiency.
The efficiency of image encoding and decoding is improved, and the amount of encoded bits is reduced, thereby reducing transmission and storage costs.
Smart Images

Figure CN119996712A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with the original application number 202180035003.7 (international application number: PCT / KR2021 / 003892, application date: March 30, 2021, invention name: Image decoding and encoding method, storage medium and data sending method). Technical Field
[0002] The present disclosure relates to an image encoding technology, and more particularly, to an image decoding method and apparatus for encoding flag information indicating whether TSRC is enabled when encoding residual data of a current block in an image encoding system. Background Art
[0003] Recently, in various fields, the demand for high-resolution, high-quality images such as HD (high definition) images and UHD (ultra high definition) images is growing. Because image data has high resolution and high quality, the amount of information or bits to be transmitted increases relative to conventional image data. Therefore, when image data is transmitted using a medium such as a conventional wired / wireless broadband line or stored using an existing storage medium, its transmission cost and storage cost increase.
[0004] Therefore, there is a need for efficient image compression technology for effectively transmitting, storing and reproducing information of high-resolution and high-quality images. Summary of the invention
[0005] Technical issues
[0006] The present disclosure provides a method and an apparatus for improving image coding efficiency.
[0007] The present disclosure also provides a method and an apparatus for improving residual coding efficiency.
[0008] Technical Solution
[0009] According to an embodiment of the present disclosure, there is provided an image decoding method performed by a decoding device. The method comprises the following steps: obtaining a symbol data hiding enable flag; obtaining a transform skip residual coding (TSRC) enable flag based on the symbol data hiding enable flag; obtaining residual information of a current block based on the TSRC enable flag; deriving residual samples of the current block based on the residual information; and generating a reconstructed picture based on the residual samples, wherein the symbol data hiding enable flag is a flag for whether to enable symbol data hiding, wherein the TSRC enable flag is a flag for whether to enable TSRC, and wherein the TSRC enable flag is obtained based on the symbol data hiding enable flag having a value of 0.
[0010] According to another embodiment of the present disclosure, a decoding device for performing image decoding is provided. The decoding device includes: an entropy decoder, the entropy decoder is configured to obtain a symbol data hiding enable flag, obtain a transform skip residual coding (TSRC) enable flag based on the symbol data hiding enable flag, and obtain residual information of a current block based on the TSRC enable flag; a residual processor, the residual processor is configured to derive residual samples of the current block based on the residual information; and an adder, the adder is configured to generate a reconstructed picture based on the residual samples, wherein the symbol data hiding enable flag is a flag for whether to enable symbol data hiding, wherein the TSRC enable flag is a flag for whether to enable TSRC, and wherein the TSRC enable flag is obtained based on the symbol data hiding enable flag having a value of 0.
[0011] According to another embodiment of the present disclosure, a video encoding method performed by an encoding device is provided. The method includes the following steps: encoding a symbol data hiding enable flag for whether to enable symbol data hiding; encoding a TSRC enable flag for whether to enable transform skip residual coding (TSRC) based on the symbol data hiding enable flag; encoding residual information of a current block based on the TSRC enable flag; and generating a bitstream including the symbol data hiding enable flag, the TSRC enable flag and the residual information, wherein the TSRC enable flag is encoded based on the symbol data hiding enable flag having a value of 0.
[0012] According to another embodiment of the present disclosure, a video encoding device is provided. The encoding device includes: an entropy encoder, the entropy encoder is configured to encode a symbol data hiding enable flag for whether to enable symbol data hiding, encode a TSRC enable flag for whether to enable transform skip residual coding (TSRC) based on the symbol data hiding enable flag, encode residual information of a current block based on the TSRC enable flag, and generate a bit stream including the symbol data hiding enable flag, the TSRC enable flag, and the residual information, wherein the TSRC enable flag is encoded based on the symbol data hiding enable flag having a value of 0.
[0013] According to yet another embodiment of the present disclosure, a non-transitory computer-readable storage medium storing a bitstream including image information causing an image decoding method to be executed is provided. In the non-transitory computer-readable storage medium, the image decoding method includes the following steps: obtaining a symbol data hiding enable flag; obtaining a transform skip residual coding (TSRC) enable flag based on the symbol data hiding enable flag; obtaining residual information of a current block based on the TSRC enable flag; deriving residual samples of the current block based on the residual information; and generating a reconstructed picture based on the residual samples, wherein the symbol data hiding enable flag is a flag for whether to enable symbol data hiding, wherein the TSRC enable flag is a flag for whether to enable TSRC, and wherein the TSRC enable flag is obtained based on the symbol data hiding enable flag having a value of 0.
[0014] Technical Effects
[0015] According to the present disclosure, residual coding efficiency can be enhanced.
[0016] According to the present disclosure, the TSRC enable flag can be signaled when symbol data hiding is not enabled by setting a signaling relationship between the symbol data hiding enable flag and the TSRC enable flag, and in this way, when the RRC syntax is encoded for the transform skip block because TSRC is not enabled, symbol data hiding is not used, thereby improving the coding efficiency, and the overall residual coding efficiency can be improved by reducing the amount of encoded bits.
[0017] According to the present disclosure, a signaling relationship between a dependent quantization enable flag and a TSRC enable flag is established, and if dependent quantization is not enabled, the TSRC enable flag can be signaled, and in this way, if TSRC is not enabled and the RRC syntax is encoded for a transform skip block, dependent quantization will not be used, so that the coding efficiency is improved, and the overall residual coding efficiency can be improved by reducing the amount of encoded bits.
[0018] According to the present disclosure, a signaling relationship between a transform skip enable flag and a TSRC enable flag is established, and if transform skip is enabled, the TSRC enable flag can be signaled, and by doing so, the overall residual coding efficiency can be improved by reducing the amount of encoded bits. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 An example of a video / image encoding device to which the embodiments of the present disclosure are applicable is briefly illustrated.
[0020] Figure 2 is a schematic diagram illustrating a configuration of a video / image encoding device to which an embodiment of the present disclosure can be applied.
[0021] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.
[0022] Figure 4 Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements is exemplarily shown.
[0023] Figure 5 is a diagram showing exemplary transform coefficients within a 4×4 block.
[0024] Figure 6 A scalar quantizer used in dependent quantization is exemplarily illustrated.
[0025] Figure 7 State transitions and quantizer selection for dependent quantization are exemplarily illustrated.
[0026] Figure 8 The figure schematically shows an image encoding method performed by an encoding device according to the present disclosure.
[0027] Fig. 9 The invention schematically shows an encoding device for executing an image encoding method according to the present disclosure.
[0028] Fig.10 The figure schematically shows an image decoding method performed by a decoding device according to the present disclosure.
[0029] Fig.11 A decoding device for executing an image decoding method according to the present disclosure is schematically shown.
[0030] Fig.12 A structural diagram of a content streaming system to which the present disclosure is applied is illustrated. DETAILED DESCRIPTION
[0031] The present disclosure can be modified in various forms, and its specific embodiments will be described and illustrated in the accompanying drawings. However, these embodiments are not intended to limit the present disclosure. The terms used in the following description are only used to describe specific embodiments and are not intended to limit the present disclosure. The singular expression includes the plural expression as long as it is clearly read out differently. Terms such as "including" and "having" are intended to indicate the presence of features, numbers, steps, operations, elements, components or combinations thereof used in the following description, so it should be understood that there is no possibility of excluding the presence or addition of one or more different features, numbers, steps, operations, elements, components or combinations thereof.
[0032] In addition, for the purpose of conveniently illustrating different specific functions, the elements in the figures described in the present disclosure are drawn independently, which does not mean that these elements are implemented by independent hardware or independent software. For example, two or more of these elements can be combined to form a single element, or an element can be divided into multiple elements. Without departing from the concept of the present disclosure, embodiments in which elements are combined and / or divided belong to the present disclosure.
[0033] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. In addition, throughout the accompanying drawings, like reference numerals are used to indicate like elements, and the same description of like elements will be omitted.
[0034] Figure 1 An example of a video / image encoding device to which an embodiment of the present disclosure can be applied is briefly illustrated.
[0035] Reference Figure 1 The video / image coding system may include a first device (source device) and a second device (receiver). The source device may send coded video / image information or data to the receiving device in the form of a file or stream via a digital storage medium or a 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] The video source can obtain the video / image by capturing, synthesizing or generating the video / image process. The video source may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generation device may include, for example, a computer, a tablet computer, and a smart phone, and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capture process may be replaced by a process that generates relevant data.
[0038] The encoding device can encode the input video / image. The encoding device can perform a series of processes such as prediction, transformation and quantization to achieve compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0039] The transmitter may transmit the encoded image / image information or data output in the form of a bit stream to the receiver of the receiving device in the form of a file or stream through a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include an element for generating a media file in a predetermined file format, and may include an element for transmitting through a broadcast / communication network. The receiver may receive / extract a bit stream and transmit the received bit stream to a decoding device.
[0040] The decoding device may decode the video / image by performing a series of processes such as dequantization, inverse transformation, and prediction corresponding to the operations of the encoding device.
[0041] The renderer can render the decoded video / image, and the rendered video / image can be displayed through a display.
[0042] The present disclosure relates to video / image coding. For example, the methods / implementations disclosed in the present disclosure may be applied to methods disclosed in the Versatile Video Coding (VVC), EVC (Basic Video Coding) standard, AOMedia Video 1 (AV1) standard, the second generation audio video coding standard (AVS2), or the next generation video / image coding standard (e.g., H.267 or H.268, etc.).
[0043] The present disclosure proposes various embodiments of video / image encoding, and unless otherwise mentioned, these embodiments may be performed in combination with each other.
[0044] In the present disclosure, a video may refer to a series of images over time. A picture generally refers to a unit representing a picture in a specific time region, and a sub-picture / slice / tile is a unit that constitutes a part of a picture when encoded. A sub-picture / slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more sub-pictures / slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles. A brick may represent a rectangular area of a CTU row within a tile in a picture. A tile may be divided into a plurality of bricks, each of which is composed of one or more CTU rows within a tile. A tile that is not divided into a plurality of bricks may also be referred to as a brick. Brick scanning is a specific ordering of CTUs of the following segmented pictures: sorting CTUs by CTU raster scanning in bricks, continuously sorting bricks within tiles by raster scanning of bricks of tiles, and continuously sorting tiles in a picture by raster scanning of tiles of pictures. In addition, a sub-picture may represent a rectangular area of one or more slices within a picture. That is, a sub-picture contains one or more slices that together cover a rectangular area of a picture. A tile is a rectangular area of a CTU within a specific tile column and a specific tile row in a picture. A tile column is a rectangular area of a CTU whose height is equal to the height of the picture and whose width is specified by a syntax element in a picture parameter set. A tile row is a rectangular area of a CTU whose height is specified by a syntax element in a picture parameter set and whose width is equal to the width of the picture. Tile scanning is a specific order sorting of CTUs of a partitioned picture as follows: CTUs are sorted continuously by a raster scan of CTUs in tiles, and tiles in a picture are sorted continuously by a raster scan of tiles of a picture. A slice includes an integer number of bricks of a picture that can be exclusively contained in a single NAL unit. A slice may consist of either a plurality of complete tiles or a continuous sequence of complete bricks of only one tile. In the present disclosure, tile groups and slices may be used interchangeably. For example, in the present disclosure, a tile group / tile group header may be referred to as a slice / slice header.
[0045] A pixel or a pel may refer to the smallest unit constituting a picture (or image). In addition, a "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, may represent only a pixel / pixel value of a luminance component, or may represent only a pixel / pixel value of a chrominance component.
[0046] A unit may represent a basic unit of image processing. A unit may include at least one of a specific area of a picture and information related to the area. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as a block or an area. In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients.
[0047] In this specification, "A or B" may mean "only A", "only B", or "both A and B". In other words, in this specification, "A or B" may be interpreted as "A and / or B". For example, "A, B or C" herein means "only A", "only B", "only C", or "any one and any combination of A, B, and C".
[0048] A slash ( / ) or a comma (,) used in this specification may mean "and / or". For example, "A / B" may mean "A and / or B". Accordingly, "A / B" may mean "only A", "only B", or "both A and B". For example, "A, B, C" may mean "A, B, or C".
[0049] In the present specification, "at least one of A and B" may mean "only A", "only B", or "both A and B". In addition, in the present specification, the expression "at least one of A or B" or "at least one of A and / or B" may be interpreted as being the same as "at least one of A and B".
[0050] In addition, in the present specification, "at least one of A, B, and C" means "only A", "only B", "only C", or "any combination of A, B, and C". In addition, "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] In addition, brackets used in the present 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 the present specification is not limited to "intra-frame prediction", and "intra-frame prediction" may be proposed as an example of "prediction". In addition, even when "prediction (ie, intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction".
[0052] In this specification, technical features described individually in one drawing may be implemented individually or may be implemented simultaneously.
[0053] The following figures are created to illustrate specific examples of this specification. Since the names of specific devices or the names of specific signals / messages / fields described in the figures are provided 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 is a schematic diagram illustrating a configuration of a video / image encoding device to which an embodiment of the present disclosure can be applied. Hereinafter, a video encoding device may include an image encoding device.
[0055] Reference Figure 2 , the encoding device 200 includes an image segmenter 210, a predictor 220, a residual processor 230 and 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 transformer 232, a quantizer 233, an inverse quantizer 234 and an inverse transformer 235. The residual processor 230 may also include a subtractor 231. The adder 250 may be called a reconstructor or a reconstructed block generator. According to an embodiment, the image segmenter 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250 and the filter 260 may be composed of at least one hardware component (e.g., an encoder chipset or processor). In addition, the memory 270 may include a decoded picture buffer (DPB) or may be composed of a digital storage medium. The hardware component may also include a memory 270 as an internal / external component.
[0056] The image divider 210 may divide the input image (or picture or frame) input to the encoding device 200 into one or more processors. For example, the processor may be referred to as a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, a coding unit may be divided into a plurality of coding units with a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, a quadtree structure may be applied first, and then a binary tree structure and / or a ternary structure may be applied. Alternatively, a binary tree structure may be applied first. The encoding process according to the present disclosure may be performed based on a final coding unit that is no longer divided. In this case, the maximum coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or if necessary, the coding unit may be recursively divided into coding units with a deeper depth and a coding unit with an optimal size may be used as the final coding unit. Here, the encoding process may include a process of prediction, transformation, and reconstruction, which will be described later. As another example, the processor may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be separated or partitioned from the above-mentioned final coding unit. The prediction unit may be a unit for sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.
[0057] In some cases, a unit may be used interchangeably with terms such as a block or region. In general, an M×N block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, may represent a pixel / pixel value of a luminance component only, or may represent a pixel / pixel value of a chrominance component only. A sample may be used as a term corresponding to a picture (or image) of a pixel or a picture element.
[0058] In the encoding device 200, the prediction signal (prediction block, prediction sample array) output from the inter predictor 221 or the intra 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 transformer 232. In this case, as shown in the figure, the unit for subtracting the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) in the encoding device 200 can be called a 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 including the prediction samples of the current block. The predictor can determine whether to apply intra prediction or inter 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 in the form of a bit stream.
[0059] The intra-frame predictor 222 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the referenced sample can be located near the current block, or can be far away from the current block. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the setting. The intra-frame predictor 222 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0060] The inter-frame predictor 221 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. Here, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block, a co-located CU (colCU), etc., and the reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter-frame predictor 221 may configure a motion information candidate list based on neighboring blocks, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter-frame prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter-frame predictor 221 may use the motion information of the neighboring block as the motion information of the current block. In skip mode, unlike merge mode, a residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be indicated by signaling a motion vector difference.
[0061] The predictor 220 may generate a prediction signal based on various prediction methods described below. For example, the predictor may not only apply intra prediction or inter prediction to predict a block, but may also apply both intra prediction and inter prediction at the same time. This may be referred to as intra-frame combined prediction (CIIP). In addition, the predictor may predict a block based on an intra-block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode may be used for content image / video encoding of games, etc., such as screen content coding (SCC). IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction because the reference block is derived in the current picture. That is, IBC may use at least one of the inter prediction techniques described in the present disclosure. The palette mode may be considered as an example of intra coding or intra prediction. When the palette mode is applied, the sample values within the picture may be signaled based on information about the palette table and the palette index.
[0062] The prediction signal generated by the predictor (including the inter-frame predictor 221 and / or the intra-frame predictor 222) can be used to generate a reconstruction signal or to generate a residual signal. The transformer 232 can generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT represents 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 a prediction signal generated using all previously reconstructed pixels. In addition, the transform process can be applied to square pixel blocks of the same size, or can be applied to blocks of variable size rather than square.
[0063] The quantizer 233 may quantize the transform coefficients and send them to the entropy encoder 240, and the entropy encoder 240 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. Information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the block type quantized transform coefficients into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. Information about the transform coefficients may be generated. The entropy encoder 240 may perform various encoding methods, such as, for example, exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 240 may encode information required for video / image reconstruction (e.g., values of syntax elements, etc.) other than the quantized transform coefficients together or separately. Encoded information (e.g., encoded video / image information) may be transmitted or stored in units of NAL (network abstraction layer) in the form of a bitstream. The video / image information may also include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. In the present disclosure, information and / or syntax elements sent / signaled from an encoding device to a decoding device may be included in the video / image information. The video / image information may be encoded and included in a bitstream through the above-mentioned encoding process. The bitstream may be sent through a network, or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, 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 sends a signal output from the entropy encoder 240 and / or a storage unit (not shown) that stores the signal may be included as an internal / external element of the encoding device 200, and alternatively, the transmitter may be included in the entropy encoder 240.
[0064] The quantized transform coefficients output from the 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 transformation to the quantized transform coefficients using the inverse quantizer 234 and the inverse transformer 235. The adder 250 adds the reconstructed residual signal to the prediction signal output from the inter-frame predictor 221 or the intra-frame predictor 222 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If the block to be processed has no residual (such as the case where the skip mode is applied), the prediction block can be used as a reconstructed block. The adder 250 can be called a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.
[0065] Furthermore, during picture encoding and / or reconstruction, luma mapping and chroma scaling (LMCS) may be applied.
[0066] The filter 260 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 270 (specifically, the DPB of the memory 270). Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various information related to filtering, and send the generated information to the entropy encoder 240, as described later in the description of various filtering methods. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bit stream.
[0067] The modified reconstructed picture sent to the memory 270 may be used as a reference picture in the inter-frame predictor 221. When inter-frame prediction is applied by the encoding device, prediction mismatch between the encoding device 200 and the decoding device may be avoided, and encoding efficiency may be improved.
[0068] The DPB of the memory 270 may store a modified reconstructed picture used as a reference picture in the inter-frame predictor 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a reconstructed block in the picture. The stored motion information may be sent to the inter-frame predictor 221 and used as motion information of a spatially adjacent block or motion information of a temporally adjacent block. The memory 270 may store reconstructed samples of a reconstructed block in the current picture and may transmit the reconstructed samples to the intra-frame predictor 222.
[0069] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding device to which an embodiment 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 an embodiment, the entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be composed of hardware components (e.g., a decoder chipset or a processor). In addition, the memory 360 may include a decoded picture buffer (DPB), or may be composed of a digital storage medium. The hardware component may also include a memory 360 as an internal / external component.
[0071] When a bit stream including video / image information is input, the decoding device 300 can be used with Figure 2 The image is reconstructed correspondingly to the processing of the video / image information in the encoding device. For example, the decoding device 300 can derive the unit / block based on the block segmentation related information obtained from the bit stream. The decoding device 300 can perform decoding using a processor applied in the encoding device. Therefore, the decoding processor can be, for example, a coding unit, and the coding unit can be segmented from the coding tree unit or the maximum coding unit according to a quadtree structure, a binary tree structure and / or a ternary tree structure. One or more transform units can be derived from the coding unit. The reconstructed image signal decoded and output by the decoding device 300 can be reproduced by a reproduction device.
[0072] The decoding device 300 may receive the bit stream from Figure 2The received signal 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 an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The signaled / received information and / or syntax elements described later in this disclosure may be decoded by a decoding process and obtained from the bitstream. For example, the entropy decoder 310 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs the syntax elements required for image reconstruction and the quantized values of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method can receive a bin corresponding to each syntax element in the bitstream, use the decoding target syntax element information, the decoding information of the decoding target block, or the information of the symbol / bin decoded in the previous stage to determine the context model, and arithmetically decode the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate a symbol 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 symbol / bin for the context model of the next symbol / bin. The information related to prediction among the information decoded by the entropy decoder 310 can be provided to the predictor (inter-frame predictor 332 and intra-frame predictor 331), and the residual value (that is, quantized transform coefficients and related parameter information) for which entropy decoding is performed in the entropy decoder 310 can be input to the residual processor 320. The residual processor 320 can derive a residual signal (residual block, residual sample, residual sample array). In addition, the information about filtering among the information decoded by the entropy decoder 310 can be provided to the filter 350. In addition, a receiver (not shown) for receiving a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiver may be a component of the entropy decoder 310. In addition, the decoding device according to the present disclosure may be referred to as a video / image / picture decoding device, and the decoding device may be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoder 310, and the sample decoder may include at least one of the inverse quantizer 321, the inverse transformer 322, the adder 340, the filter 350, the memory 360, the inter-frame predictor 332, and the intra-frame predictor 331.
[0073] The inverse quantizer 321 may dequantize the quantized transform coefficients and output the transform coefficients. The inverse quantizer 321 may rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding device. The inverse quantizer 321 may dequantize the quantized transform coefficients by using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficients.
[0074] The inverse transformer 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0075] The predictor may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block based on information on prediction output from the entropy decoder 310, and may determine a specific intra / inter 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 prediction or inter prediction to predict a block, but also apply intra prediction and inter prediction at the same time. This can be called inter-frame and intra-frame combined prediction (CIIP). In addition, the predictor can predict blocks based on intra-frame block copy (IBC) prediction mode or palette mode. IBC prediction mode or palette mode can be used for content image / video encoding of games, etc., such as screen content coding (SCC). IBC basically performs prediction in the current picture, but IBC can be performed similar to inter prediction because the reference block is derived in the current picture. That is, IBC can use at least one of the inter prediction techniques described in this disclosure. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, the sample value within the picture can be signaled based on information about the palette table and the palette index.
[0077] The intra-frame predictor 331 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the referenced sample can be located near the current block, or can be far away from the current block. In intra-frame prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. The intra-frame predictor 331 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
[0078] The inter-frame predictor 332 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter-frame predictor 332 may configure a motion information candidate list based on the neighboring blocks, and derive a motion vector and / or a reference picture index of the current block based on the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and information about the prediction may include information indicating a mode of inter-frame prediction for the current block.
[0079] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 332 and / or the intra-frame predictor 331). If the block to be processed has no residual (for example, when the skip mode is applied), the prediction block can be used as the reconstructed block.
[0080] The adder 340 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, may be output through filtering as described below, or may be used for inter prediction of the next picture.
[0081] In addition, luma mapping and chroma scaling (LMCS) can be applied during picture decoding.
[0082] The filter 350 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 360 (specifically, the DPB of the memory 360). Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0083] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter-frame predictor 332. The memory 360 can store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the reconstructed block in the picture. The stored motion information can be sent to the inter-frame predictor 332 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 360 can store the reconstructed samples of the reconstructed block in the current picture, and can transmit the reconstructed samples to the intra-frame predictor 331.
[0084] In the present disclosure, the embodiments described in the filter 260, the inter-frame predictor 221, and the intra-frame predictor 222 of the encoding device 200 may be the same as the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300 or may be respectively applied to correspond to the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300. The same contents may also be applied to the inter-frame predictor 332 and the intra-frame predictor 331.
[0085] In the present disclosure, at least one of quantization / inverse quantization and / or transform / inverse transform may be omitted. When quantization / inverse quantization is omitted, the quantized transform coefficient may be referred to as a transform coefficient. When transform / inverse transform is omitted, the transform coefficient may be referred to as a coefficient or a residual coefficient, or may still be referred to as a transform coefficient for the sake of uniformity of expression.
[0086] In the present disclosure, the quantized transform coefficient and the transform coefficient may be referred to as a transform coefficient and a scaled transform coefficient, respectively. In this case, the residual information may include information about the transform coefficient, and the information about the transform coefficient may be signaled by a residual coding syntax. The transform coefficient may be derived based on the residual information (or information about the transform coefficient), and the scaled transform coefficient may be derived by inversely transforming (scaling) the transform coefficient. The residual sample may be derived based on inversely transforming (transforming) the scaled transform coefficient. This may also be applied / expressed in other parts of the present disclosure.
[0087] As described above, the encoding device can perform various encoding methods such as exponential Golomb, context adaptive variable length coding (CAVLC), and context adaptive binary arithmetic coding (CABAC). In addition, the decoding device can decode the information in the bit stream based on the encoding method such as exponential Golomb coding, CAVLC, or CABAC, and output the value of the syntax element required for image reconstruction and the quantized value of the transform coefficient related to the residual.
[0088] For example, the above encoding method may be performed as follows.
[0089] Figure 4 Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements is exemplified. For example, in the CABAC encoding process, 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. In addition, when the input signal is already a binary value (that is, when the value of the input signal is a binary value), binarization may not be performed and may be bypassed. Here, each binary number 0 or 1 constituting a binary value may be referred to as a bin. For example, if the binary string after binarization is 110, each of 1, 1, and 0 may be referred to as a bin. A bin for a syntax element may indicate the value of the syntax element.
[0090] Thereafter, the binarized bins of the syntax elements may be input to a conventional coding engine or a bypass coding engine. The conventional coding engine of the coding device may assign a context model reflecting a probability value to the corresponding bin, and encode the corresponding bin based on the assigned context model. The conventional coding engine of the coding device may update the context model for each bin after encoding each bin. The bin encoded as described above may be referred to as a context-encoded bin.
[0091] In addition, when the binarized bins of the syntax elements are input to the bypass coding engine, they can be encoded as follows. For example, the bypass coding engine of the coding device omits the process of estimating the probability of the input bin and the process of updating the probability model applied to the bin after coding. When bypass coding is applied, the coding device can encode the input bin by applying a uniform probability distribution instead of allocating a context model, thereby increasing the coding rate. The bin encoded as described above can be referred to as a bypass bin.
[0092] Entropy decoding may mean a process of performing the same process as the above-described entropy encoding in reverse order.
[0093] For example, when decoding a syntax element based on a context model, the decoding device may receive a bin corresponding to the syntax element through a bitstream, determine the context model using the syntax element and the decoding information of the decoding target block or the adjacent block or the information of the symbol / bin decoded in the previous stage, predict the occurrence probability of the received bin according to the determined context model, and perform arithmetic decoding on the bin to derive the value of the syntax element. Thereafter, the context model of the decoded bin may be updated using the determined context model.
[0094] In addition, for example, when a syntax element is bypass-decoded, the decoding device may receive a bin corresponding to the syntax element through a bitstream and decode the input bin by applying a uniform probability distribution. In this case, the process of deriving a context model of the syntax element and the process of updating the context model applied to the bin after decoding may be omitted.
[0095] As described above, the residual samples can be derived into quantized transform coefficients through transformation and quantization processing. Quantized transform coefficients may 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 may include residual coding syntax. That is, the encoding device can configure the residual coding syntax using the residual information, encode it, and output it in the form of 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 may 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 there are valid transform coefficients in the sub-block, the size / sign of the valid transform coefficient, etc., as will be described later.
[0096] For example, syntax elements related to residual data encoding / decoding may be represented as shown in the following table.
[0097] [Table 1]
[0098]
[0099]
[0100]
[0101] transform_skip_flag indicates whether the transform is skipped in the associated block. transform_skip_flag can be a syntax element of the transform skip flag. The associated block can be a coding block (CB) or a transform block (TB). With respect to the transform (and quantization) and residual coding process, CB and TB can be used interchangeably. For example, as described above, residual samples can be derived for CB, and transform coefficients can be derived (quantized) by transforming and quantizing the residual samples, and through the residual coding process, information (e.g., syntax elements) that efficiently indicate the position, size, sign, etc. of the (quantized) transform coefficients can be generated and signaled. The quantized transform coefficients can be referred to as transform coefficients for short. Typically, when the CB is not larger 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 residually encoded can be referred to as a CB or a TB. In addition, when the CB is larger than the maximum TB, the target block to be transformed (and quantized) and residually encoded can be referred to as a TB. Hereinafter, signaling of syntax elements related to residual encoding in units of transform blocks (TBs) will be described, but this is an example and as described above, TBs may be used interchangeably with coding blocks (CBs).
[0102] In addition, the syntax elements signaled after the transform skip flag is signaled may be the same as the syntax elements disclosed in the following Table 2 and / or Table 3, and a detailed description about the syntax elements is described below.
[0103] [Table 2]
[0104]
[0105]
[0106]
[0107]
[0108]
[0109] [Table 3]
[0110]
[0111]
[0112]
[0113] According to the present embodiment, as shown in Table 1, residual coding may be divided according to the value of the syntax element transform_skip_flag of the transform skip flag. That is, based on the value of the transform skip flag (based on whether the transform is skipped), different syntax elements may be used for residual coding. The residual coding used when the transform skip is not applied (i.e., when the transform is applied) may be referred to as conventional residual coding (RRC), and the residual coding used when the transform skip is applied (i.e., when the transform is not applied) may be referred to as transform skip residual coding (TSRC). In addition, conventional residual coding may be referred to as general residual coding. In addition, conventional residual coding may be referred to as a conventional residual coding syntax structure, and transform skip residual coding may be referred to as a transform skip residual coding syntax structure. Table 2 above may show 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 may show the syntax elements of residual coding when the value of transform_skip_flag is 1 (i.e., when the transform is not applied).
[0114] Specifically, for example, a transform skip flag indicating whether the transform of the transform block is skipped may be parsed, and it may be determined whether the transform skip flag is 1. If the value of the transform skip flag is 0, 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 of the residual coefficient of the transform block may be parsed, and the residual coefficient may be derived based on the syntax elements. In this case, the syntax elements may be parsed sequentially, and the parsing order may be changed. In addition, abs_level_gtx_flag may represent abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n][0] may be an example of a first transform coefficient level flag (abs_level_gt1_flag), and abs_level_gtx_flag[n][1] may be an example of a second transform coefficient level flag (abs_level_gt3_flag).
[0115] Referring to Table 2 above, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level may be encoded / decoded. In addition, sb_coded_flag may be expressed as coded_sub_block_flag.
[0116] In an embodiment, the encoding device may 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 significant coefficient in the scan order within the transform block, last_sig_coeff_y_prefix represents the prefix of the row position of the last significant coefficient in the scan order within the transform block, last_sig_coeff_x_suffix represents the suffix of the column position of the last significant coefficient in the scan order within the transform block, and last_sig_coeff_y_suffix represents the suffix of the row position of the last significant coefficient in the scan order within the transform block. Here, the significant coefficient may represent a non-zero coefficient. In addition, the scanning order may be a right-angled diagonal scanning order. Alternatively, the scanning order may be a horizontal scanning order or a vertical scanning order. The scanning order may be determined based on whether intra prediction / inter prediction and / or a specific intra prediction / inter prediction mode is applied to a target block (CB or CB including a TB).
[0117] Thereafter, the encoding apparatus may 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 is a non-zero coefficient in the current sub-block.
[0118] If the value of coded_sub_block_flag is 0, there is no more information to be sent, and therefore, the encoding device may terminate the encoding process of the current subblock. Conversely, if the value of coded_sub_block_flag is 1, the encoding device may continuously perform the encoding process on sig_coeff_flag. Since the subblock including the last non-zero coefficient does not need to encode coded_sub_block_flag and the subblock including the DC information of the transform block has a high probability of including a non-zero coefficient, coded_sub_block_flag may not be encoded and its value may be assumed to be 1.
[0119] If the value of coded_sub_block_flag is 1 and it is therefore determined that there is a non-zero coefficient in the current sub-block, the encoding device may encode a sig_coeff_flag having a binary value according to a reverse scanning order. The encoding device may encode a 1-bit syntax element sig_coeff_flag for each transform coefficient according to a scanning order. If the value of the transform coefficient at the current scanning position is not 0, the value of sig_coeff_flag may be 1. Here, in the case of a sub-block including the last non-zero coefficient, sig_coeff_flag does not need to be encoded for the last non-zero coefficient, so the encoding process for the sub-block may be omitted. Level information encoding may be performed only when sig_coeff_flag is 1, and four syntax elements may be used in the level information encoding process. More specifically, each sig_coeff_flag[xC][yC] may indicate whether the level (value) of the corresponding transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero. In an embodiment, sig_coeff_flag may correspond to an example of a syntax element of a significant coefficient flag indicating whether a quantized transform coefficient is a non-zero significant coefficient.
[0120] The level value remaining after encoding sig_coeff_flag may be derived as shown in the following equation: That is, the syntax element remAbsLevel indicating the level value to be encoded may be derived from the following equation.
[0121] [Formula 1]
[0122] remAbsLevel=|coeff|-1
[0123] Herein, coeff means the actual transform coefficient value.
[0124] In addition, abs_level_gt1_flag may indicate whether remAbsLevel' of the corresponding scanning 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 of the corresponding position may be 1. In addition, when the value of abs_level_gt1_flag is 1, remAbsLevel indicating a level value to be encoded later may be updated as shown in the following equation.
[0125] [Formula 2]
[0126] remAbsLevel=remAbsLevel-1
[0127] In addition, the least significant coefficient (LSB) value of remAbsLevel described in the above-mentioned Equation 2 may be encoded through par_level_flag as in Equation 3 below.
[0128] [Formula 3]
[0129] par_level_flag = |coeff|&1
[0130] Herein, par_level_flag[n] may indicate the parity of a transform coefficient level (value) at a scan position (n).
[0131] The transform coefficient level value remAbsLevel to be encoded after performing par_level_flag encoding may be updated as shown in the following equation.
[0132] [Formula 4]
[0133] remAbsLevel=remAbsLevel>>1
[0134] abs_level_gt3_flag may indicate whether the remAbsLevel' corresponding to the scanning position (n) is greater than 3. Only when rem_abs_gt3_flag is equal to 1, the encoding of abs_remainder may be performed. The relationship between the actual transform coefficient value coeff and each syntax element may be expressed as follows by the following formula.
[0135] [Formula 5]
[0136] |coeff|=sig_coeff_flag+abs_level_gt1_flag+par_level_flag+2*(abs_level_gt3_flag+abs_remainder)
[0137] In addition, the following table indicates examples related to the above-mentioned Formula 5.
[0138] [Table 4]
[0139]
[0140] Herein, |coeff| indicates a transform coefficient level (value), and may also be indicated as AbsLevel of the transform coefficient. In addition, the sign of each coefficient may be encoded by using coeff_sign_flag which is a 1-bit symbol.
[0141] In addition, if the value of the transform skip flag is 1, 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 coefficient of the transform block may be parsed, and the residual coefficient may be derived based on the syntax elements. In this case, the syntax elements may be parsed sequentially, and the parsing order may be changed. In addition, abs_level_gtx_flag may represent abs_level_gt1_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and / or abs_level_gt9_flag. For example, abs_level_gtx_flag[n][j] may be a flag indicating whether the absolute value or level (value) of the transform coefficient at the scan position n is greater than (j<<1)+1. The condition (j<<1)+1 may optionally be replaced with a specific threshold value such as a first threshold value, a second threshold value, or the like.
[0142] In addition, CABAC provides high performance, but has the disadvantage of poor throughput performance. This is caused by the conventional coding engine of CABAC. Conventional coding (i.e., coding performed by the conventional coding engine of CABAC) exhibits a high degree of data dependence because it uses the probability state and range updated by encoding the previous bin, and reading the probability interval and determining the current state may take a lot of time. The throughput problem of CABAC can be solved by limiting the number of bins for context coding. For example, as shown in Table 2 above, the sum of the bins used to represent sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag can be limited to the number of bins depending on the corresponding block size. In addition, for example, as shown in the above-mentioned Table 3, the sum of 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, abs_level_gt9_flag may be limited to the number of bins depending on the corresponding block size. For example, if the corresponding block is a 4×4 sized block, the sum of 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 may be limited to 32 (or, for example, 28), and if the corresponding block is a 2×2 sized block, the sum of bins of sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag may be limited to 8 (or, for example, 7). The limited number of bins may be represented by remBinsPass1 or RemCcbs. Alternatively, for example, for higher CABAC throughput, the number of context-coded bins may be limited for a block (CB or TB) including a coding target CG. In other words, the number of context-coded bins may be limited per block (CB or TB).For example, when the size of the current block is 16×16, the number of bins used for context encoding of the current block can be limited to 1.75 times the number of pixels of the current block (i.e., 448), regardless of the current CG.
[0143] In this case, if a limited number of bins for all context encoding are used when encoding the context element, the encoding device may binarize the remaining coefficients by the method of binarizing the coefficients as described below, instead of using context encoding, and bypass encoding may be performed. In other words, for example, if the number of bins for context encoding for 4×4CG encoding is 32 (or, for example, 28), or if the number of bins for context encoding for 2×2CG encoding is 8 (or, for example, 7), sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag encoded with the context encoding bin may no longer be encoded and may be directly encoded as dec_abs_level. Alternatively, for example, when the number of context-coded bins for 4×4 block encoding is 1.75 times the number of pixels of the entire block, that is, when limited to 28, sig_coeff_flag, abs_level_gt1_flag, par_level_flag and abs_level_gt3_flag encoded as context-coded bins may no longer be encoded and may be directly encoded as dec_abs_level, as shown in Table 5 below.
[0144] [Table 5]
[0145] |coeffff[n]| decabslevel[n] 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 ... ...
[0146] The value |coeff| may be derived based on dec_abs_level. In this case, the transform coefficient value may be derived as shown in the following equation, ie, |coeff|.
[0147] [Formula 6]
[0148] |coeff|=dec_abs_level
[0149] In addition, coeff_sign_flag may indicate the sign of the transform coefficient level at the corresponding scanning position n. That is, coeff_sign_flag may indicate the sign of the transform coefficient at the corresponding scanning position n.
[0150] Figure 5 An example of transform coefficients in a 4x4 block is shown.
[0151] Figure 5The 4×4 block represents an example of quantized coefficients. Figure 5 The block may 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 5 A 4×4 block can represent a luma block or a chroma block.
[0152] In addition, as described 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 binarizing the value of the input signal. In addition, the decoding device can decode the syntax element to derive the binarized value (e.g., binarized bin) of the syntax element, and can de-binarize the binarized value to derive the value of the syntax element. The binarization process can be performed as a truncated Rice (TR) binarization process, a k-order exponential Golomb (EGk) binarization process, a limited k-order exponential Golomb (limited EGk), a fixed length (FL) binarization process, etc. In addition, the de-binarization process can represent a process performed based on the TR binarization process, the EGk binarization process, or the FL binarization process to derive the value of the syntax element.
[0153] For example, the TR binarization process can be performed as follows.
[0154] The input of the TR binarization process may be cMax and cRiceParam for the syntax element and a request for TR binarization. In addition, the output of the TR binarization process may be the TR binarization for symbolVal which is a value corresponding to the bin string.
[0155] Specifically, for example, in the case where there is a suffix bin string for a syntax element, the TR bin string for the syntax element may be a concatenation of a prefix bin string and a suffix bin string, and in the case where there is no suffix bin string, the TR bin string for the syntax element may be a prefix bin string. For example, the prefix bin string may be derived as described below.
[0156] The prefix value of symbolVal for a syntax element may be derived as shown in the following formula.
[0157] [Formula 7]
[0158] prefixVal=symbolVal>>cRiceParam
[0159] Herein, prefixVal may represent a prefix value of symbolVal. A prefix of a TR bin string of a syntax element (ie, a prefix bin string) may be derived as described below.
[0160] For example, if prefixVal is less than cMax >> cRiceParam, the prefix bin string can be a bit string of length prefixVal + 1 indexed by binIdx. That is, if prefixVal is less than cMax >> cRiceParam, the prefix bin string can be a bit string with the number of bits indicated by binIdx being prefixVal + 1. The bin of binIdx less than prefixVal can be equal to 1. Additionally, the bin of binIdx equal to prefixVal can be equal to 0.
[0161] For example, the bin string derived by unary - binary encoding prefixVal can be as shown in the following table.
[0162] [Table 6]
[0163]
[0164] In addition, if prefixVal is not less than cMax >> cRiceParam, the prefix bin string can be a bit string of length cMax >> cRiceParam with all bits being 1.
[0165] Additionally, if cMax is greater than symbolVal and if cRiceParam is greater than 0, there can be a bin suffix bit string of the TR bin string. For example, the suffix bit string can be derived as described below.
[0166] The suffix value for symbolVal of the syntax element can be derived as shown in the following formula.
[0167] [Formula 8]
[0168] suffixVal = symbolVal - ((prefixVal) << cRiceParam)
[0169] In this article, suffixVal can represent the suffix value of symbolVal.
[0170] The suffix of the TR bin string (i.e., the suffix bin string) can be derived based on the FL binary encoding process for suffixVal whose value of cMax is (1 << cRiceParam) - 1.
[0171] In addition, if the value of the input parameter (i.e., cRiceParam) is 0, the TR binary encoding can be exactly truncated unary binary encoding and can always use the same value cMax as the possible maximum value of the syntax element to be decoded.
[0172] In addition, for example, the EGk binarization process may be performed as follows: The syntax element encoded using ue(v) may be an exponential Golomb-encoded syntax element.
[0173] For example, the 0th-order Exponential Golomb (EG0) binarization process may be performed as follows.
[0174] The parsing process for a syntax element may start by reading the bits including the first non-zero bit starting from the current position of the bitstream and counting the number of leading bits equal to 0. The process may be represented as shown in the following table.
[0175] [Table 7]
[0176]
[0177] Additionally, the variable codeNum may be derived as follows.
[0178] [Formula 9]
[0179] codeNum=2 leadingZeroBits -1+read_bits(leadingZeroBits)
[0180] Herein, the value returned from read_bits(leadingZeroBits) (ie, the value indicated by read_bits(leadingZeroBits)) may be interpreted as a binary representation of an unsigned integer with the most significant bit recorded first.
[0181] The structure of an Exponential Golomb code in which a bit string is divided into "prefix" bits and "suffix" bits can be represented as shown in the following table.
[0182] [Table 8]
[0183] Bit string format Range of codeNum 1 0 <![CDATA[0 1 x 0 ]]> 1..2 <![CDATA[0 0 1 x 1 x 0 ]]> 3..6 <![CDATA[0 0 0 1 x 2 x 1 x 0 ]]> 7..14 <![CDATA[0 0 0 1 x 3 x 2 x 1 x 0 ]]> 15..30 <![CDATA[0 0 0 0 0 1 x A x 3 x 2 x 1 x 0 ]]> 31..62 ... ...
[0184] The "prefix" bit can be a bit parsed as described above to calculate leadingZeroBits, 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 above can represent the prefix bit string. The "suffix" bit can be a bit parsed when calculating codeNum, and can be represented by xi in Table 8 above. That is, the bit string indicated by xi in Table 8 above 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.
[0185] The bit string assigned to codeNum may be as shown in the following table.
[0186] [Table 9]
[0187] Bit string codeNum 1 0 0 1 0 1 0 1 1 2 0 0 1 0 0 3 0 0 1 0 1 4 0 0 1 1 0 5 0 0 1 1 1 6 0 0 0 1 0 0 0 7 0 0 0 1 0 0 1 8 0 0 0 1 0 1 0 9 ... ...
[0188] If the descriptor of the syntax element is ue(v) (ie, if the syntax element is encoded with ue(v)), the value of the syntax element may be equal to codeNum.
[0189] In addition, for example, the EGk binarization process can be performed as follows.
[0190] The input to the EGk binarization process may be a request for EGk binarization. Additionally, the output of the EGk binarization process may be the EGk binarization for symbolVal (ie, the value corresponding to the bin string).
[0191] The bit string of the EGk binarization process for symbolVal can be derived as follows.
[0192] [Table 10]
[0193]
[0194] Referring to Table 10 above, a binary value X can be added to the end of the bin string by each call of put(X). Herein, X can be 0 or 1.
[0195] In addition, for example, the limited EGk binarization process can be performed as follows.
[0196] The input of the limited EGk binarization process can be a request for limited EGk binarization, a rice parameter ricParam, a log2TransformRange as a variable representing the binary logarithm of the maximum value, and a maxPreExtLen as a variable representing the maximum prefix extension length. In addition, the output of the limited EGk binarization process can be a limited EGk binarization for symbolVal as a value corresponding to the empty string.
[0197] The bit string for the finite EGk binarization of symbolVal can be derived as follows.
[0198] [Table 11]
[0199]
[0200] In addition, for example, the FL binarization process can be performed as follows.
[0201] The input of the FL binarization process may be a request for cMax and FL binarization for a syntax element. In addition, the output of the FL binarization process may be the FL binarization for symbolVal which is a value corresponding to the bin string.
[0202] The FL binarization can be configured by using a bit string whose number of bits has a fixed length of symbolVal. In this article, the fixed length bit may be an unsigned integer bit string. That is, the bit string for symbolVal as a symbol value can be derived by FL binarization, and the bit length (ie, the number of bits) of the bit string may be a fixed length.
[0203] For example, the fixed length may be derived as shown in the following equation.
[0204] [Formula 10]
[0205] fixedLength=Ceil(Log2(cMax+1))
[0206] The index of the bin for FL binarization may be a method of 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 may be binIdx=0.
[0207] Furthermore, for example, binarization processing on the syntax element abs_remainder in the residual information may be performed as follows.
[0208] The input to the binarization process for abs_remainder may be a request for binarization of the syntax element abs_remainder[n], the color component cIdx, and the luma position (x0, y0). The luma position (x0, y0) may indicate the top left sample of the current luma transform block based on the top left luma sample of the picture.
[0209] The output of the binarization process for abs_remainder may be the binarization of abs_remainder (ie, the binarization bin string of abs_remainder). A usable bit string for abs_remainder may be derived through the binarization process.
[0210] The Rice parameter cRiceParam for abs_remainder[n] can be derived using a Rice parameter derivation process performed by inputting the color component cIdx and the luminance position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth as the binary logarithm of the transform block width, and log2TbHeight as the binary logarithm of the transform block height. A detailed description of the Rice parameter derivation process will be described later.
[0211] In addition, for example, cMax of abs_remainder[n] currently to be encoded can be derived based on the Rice parameter cRiceParam. cMax can be derived as shown in the following formula.
[0212] [Formula 11]
[0213] cMax=6< <cRiceParam
[0214] In addition, the binarization for abs_remainder (ie, the bin string for abs_remainder) may be the concatenation of the prefix bin string and the suffix bin string when there is a suffix bin string. In addition, in the absence of a suffix bin string, the bin string for abs_remainder may be the prefix bin string.
[0215] For example, the prefix bin string may be derived as follows.
[0216] The prefix value prefixVal of abs_remainder[n] can be derived as shown in the following formula.
[0217] [Formula 12]
[0218] prefixVal=Min(cMax,abs_remainder[n])
[0219] The prefix of the bin string of abs_remainder[n] (ie, the prefix bin string) can be derived by a TR binarization process for prefixVal, where cMax and cRiceParam are used as inputs.
[0220] If the prefix bin string is identical to a bit string in which all bits are 1 and the bit length is 6, a suffix bin string of the bin string of abs_remainder[n] may exist and can be derived as described below.
[0221] The Rice parameter derivation process for dec_abs_level[n] can be as follows.
[0222] The input of the Rice parameter derivation process can be the color component index cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the log2TbWidth as the binary logarithm of the transform block width, and the log2TbHeight as the binary logarithm of the transform block height. The luma position (x0, y0) can indicate the upper left sample of the current luma transform block based on the upper left luma sample of the picture. In addition, the output of the Rice parameter derivation process can be the Rice parameter cRiceParam.
[0223] For example, the variable locSumAbs may be derived similar to the pseudo code disclosed in the following table based on the array AbsLevel[x][y] of the transform block with a given component index cIdx and an upper left luma position (x0, y0).
[0224] [Table 12]
[0225]
[0226] Then, based on the given variable locSumAbs, the Rice parameter cRiceParam can be derived as shown in the following table.
[0227] [Table 13]
[0228] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0229] In addition, for example, in the Rice parameter derivation process for abs_remainder[n], baseLevel can be set to 4.
[0230] Alternatively, for example, the Rice parameter cRiceParam can be determined based on whether transform skipping is applied to the current block. That is, if no transform is applied to the current TB including the current CG, in other words, if transform skipping is applied to the current TB including the current CG, the Rice parameter cRiceParam can be derived as 1.
[0231] In addition, the suffix value suffixVal of abs_remainder may be derived as shown in the following formula.
[0232] [Formula 13]
[0233] suffixVal=abs_remainder[n]-cMax
[0234] The suffix bin string of the bin string of abs_remainder can be derived by a finite EGk binarization process on suffixVal, where k is set to cRiceParam+1, riceParam is set to cRiceParam, and log2TransformRange is set to 15, and maxPreExtLen is set to 11.
[0235] Furthermore, for example, binarization processing on the syntax element dec_abs_level in the residual information may be performed as follows.
[0236] The input to the binarization process for dec_abs_level may be a request for binarization of the syntax element dec_abs_level[n], the color component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth as the binary logarithm of the transform block width, and log2TbHeight as the binary logarithm of the transform block height. The luma position (x0, y0) may indicate the top left sample of the current luma transform block based on the top left luma sample of the picture.
[0237] The output of the binarization process for dec_abs_level may be the binarization of dec_abs_level (ie, the binarization bin string of dec_abs_level). An available bin string of dec_abs_level may be derived through the binarization process.
[0238] The Rice parameter cRiceParam of dec_abs_level[n] can be derived by performing a Rice parameter derivation process with the color component cIdx, the luminance position (x0, y0), the current coefficient scanning position (xC, yC), log2TbWidth as the binary logarithm of the transform block width, and log2TbHeight as the binary logarithm of the transform block height. Hereinafter, the Rice parameter derivation process will be described in detail.
[0239] In addition, for example, cMax of dec_abs_level[n] can be derived based on the Rice parameter cRiceParam. cMax can be derived as shown in the following table.
[0240] [Formula 14]
[0241] cMax=6< <cRiceParam
[0242] In addition, the binarization for dec_abs_level[n] (ie, the bin string for dec_abs_level[n]) may be the concatenation of the prefix bin string and the suffix bin string if there is a suffix bin string. In addition, if there is no suffix bin string, the bin string for dec_abs_level[n] may be the prefix bin string.
[0243] For example, the prefix bin string may be derived as follows.
[0244] The prefix value prefixVal of dec_abs_level[n] may be derived as shown in the following formula.
[0245] [Formula 15]
[0246] prefixVal=Min(cMax, dec_abs_level[n])
[0247] The prefix of the bin string of dec_abs_level[n] (ie, the prefix bin string) may be derived through a TR binarization process for prefixVal, where cMax and cRiceParam are used as inputs.
[0248] If the prefix bin string is the same as a bit string in which all bits are 1 and the bit length is 6, a suffix bin string of the bin string of dec_abs_level[n] may exist and can be derived as described below.
[0249] The Rice parameter derivation process for dec_abs_level[n] can be as follows.
[0250] The input of the Rice parameter derivation process can be the color component index cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the log2TbWidth as the binary logarithm of the transform block width, and the log2TbHeight as the binary logarithm of the transform block height. The luma position (x0, y0) can indicate the upper left sample of the current luma transform block based on the upper left luma sample of the picture. In addition, the output of the Rice parameter derivation process can be the Rice parameter cRiceParam.
[0251] For example, the variable locSumAbs may be derived similar to the pseudo code disclosed in the following table based on the array AbsLevel[x][y] of the transform block with a given component index cIdx and an upper left luma position (x0, y0).
[0252] [Table 14]
[0253]
[0254] Then, based on the given variable locSumAbs, the Rice parameter cRiceParam can be derived as shown in the following table.
[0255] [Table 15]
[0256] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0257] In addition, 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.
[0258] [Formula 16]
[0259] ZeroPos[n]=(QState<2?1:2)< <cRiceParam
[0260] In addition, the suffix value suffixVal of dec_abs_level[n] can be derived as shown in the following formula.
[0261] [Formula 17]
[0262] suffixVal=dec_abs_level[n]-cMax
[0263] The suffix bin string of the bin string of dec_abs_level[n] can be derived by a finite EGk binarization process on suffixVal, where k is set to cRiceParam+1, truncSuffixLen is set to 15, and maxPreExtLen is set to 11.
[0264] Furthermore, RRC and TSRC may have the following differences.
[0265] -For example, the Rice parameter cRiceParam of the syntax elements abs_remainder[] and dec_abs_level[] in RRC may be derived based on locSumAbs, a lookup table, and / or baseLevel as described above, but the Rice parameter cRiceParam of the syntax element abs_remainder[] in TSRC may be derived as 1. That is, for example, when transform skip is applied to a current block (e.g., a current TB), the Rice parameter cRiceParam of abs_remainder[] of the TSRC for the current block may be derived as 1.
[0266] - In addition, for example, referring to Table 3 and Table 4, in RRC, abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1] may be signaled, but in TSRC, abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and abs_level_gtx_flag[n][4] may be signaled. Here, abs_level_gtx_flag[n][0] may be represented as abs_level_gt1_flag or a first coefficient level flag, abs_level_gtx_flag[n][1] may be represented as abs_level_gt3_flag or a second coefficient level flag, abs_level_gtx_flag[n][2] may be represented as abs_level_gt5_flag or a third coefficient level flag, abs_level_gtx_flag[n][3] may be represented as abs_level_gt7_flag or a fourth coefficient level flag, and abs_level_gtx_flag[n][4] may be represented as abs_level_gt9_flag or a fifth coefficient level flag. Specifically, the first coefficient level flag may be a flag for whether the coefficient level is greater than a first threshold value (e.g., 1), the second coefficient level flag may be a flag for whether the coefficient level is greater than a second threshold value (e.g., 3), the third coefficient level flag may be a flag for whether the coefficient level is greater than a third threshold value (e.g., 5), the fourth coefficient level flag may be a flag for whether the coefficient level is greater than a fourth threshold value (e.g., 7), and the fifth coefficient level flag may be a flag for whether the coefficient level is greater than a fifth threshold value (e.g., 9). As described above, in TSRC, compared with RRC, abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], and abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], abs_level_gtx_flag[n][4] may also be included.
[0267] - In addition, for example, in RRC, the syntax element coeff_sign_flag may be bypass coded, but in TSRC, the syntax element coeff_sign_flag may be bypass coded or context coded.
[0268] In addition, for the residual sample quantization process, dependent quantization can be proposed. Dependent quantization can represent a method that depends on the value of the transform coefficient (the value of the transform coefficient level), in which a set of reconstruction values for the current transform coefficient is allowed to precede the current transform coefficient in the reconstruction order. That is, for example, dependent quantization can be achieved by (a) defining two scalar quantizers with different reconstruction levels and (b) defining a process for transitioning between scalar quantizers. Compared with existing independent scalar quantization, dependent quantization can have the effect of allowing the reconstruction vector to be more concentrated in the N-dimensional vector space. Here, N can represent the number of transform coefficients of the transform block.
[0269] Figure 6 The scalar quantizer used in the dependent quantization is exemplified. Figure 6 , the location of the enabled reconstruction level can be specified by the quantization step size △. Figure 6 , scalar quantizers may be denoted as Q0 and Q1. The scalar quantizer used may be derived without explicit signaling from the bitstream. For example, the quantizer used for the current transform coefficient may be determined by the parity of the transform coefficient levels preceding the current transform coefficient in the coding / reconstruction order.
[0270] Figure 7 State transitions and quantizer selection for dependent quantization are exemplarily illustrated.
[0271] Reference Figure 7 , the transition between the two scalar quantizers Q0 and Q1 can be implemented by a state machine with four states. These four states can have four different values (0, 1, 2 and 3). In the coding / reconstruction order, the state of the current transform coefficient can be determined by the parity of the transform coefficient level before the current transform coefficient.
[0272] For example, when the inverse quantization process for a transform block starts, the state of the dependent quantization may be configured to be 0. Thereafter, the transform coefficients of the transform block may be reconstructed in a scanning order (i.e., the same order as the order of entropy decoding). For example, after reconstructing the current transform coefficients, such as Figure 7 As illustrated in , the state of the dependent quantization can be updated. In the scanning order, the inverse quantization processing of the transform coefficient reconstructed after the current transform coefficient is reconstructed can be performed based on the updated state. Figure 7, k can represent the value of the transform coefficient, that is, the value of the transform coefficient level value. For example, if k (the value of the current transform coefficient) & 1 is 0 when the current state is 0, the state can be updated to 0, and if k & 1 is 1, the state can be updated to 2. In addition, for example, if k & 1 is 0 when the current state is 1, the state can be updated to 2, and if k & 1 is 1, the state can be updated to 0. In addition, for example, if k & 1 is 0 when the current state is 2, the state can be updated to 1, and if k & 1 is 1, the state can be updated to 3. In addition, for example, if k & 1 is 0 when the current state is 3, the state can be updated to 3, and if k & 1 is 1, the state can be updated to 1. Refer to Figure 7 , if the state is 0 or 1, the scalar quantizer used in the inverse quantization process may be Q0, and if the state is 2 or 3, the scalar quantizer used in the inverse quantization process may be Q1. The transform coefficient may be inversely quantized by the scalar quantizer for the current state based on the quantization parameter of the reconstruction level of the transform coefficient.
[0273] In addition, the present disclosure proposes embodiments related to residual data coding. The embodiments described in the present disclosure may be combined with each other. In the residual data coding method as described above, there may be regular residual coding (RRC) and transform skip residual coding (TSRC).
[0274] Among the two methods described above, the residual data encoding method of the current block can be determined based on the values of transform_skip_flag and sh_ts_residual_coding_disabled_flag as illustrated in Table 1. Here, the syntax element sh_ts_residual_coding_disabled_flag can indicate whether TSRC is enabled. Therefore, if slice_ts_residual_coding_disabled_flag indicates that TSRC is not enabled even when transform_skip_flag indicates transform skipping, the syntax element according to RRC can be signaled for the transform skip block. That is, if the value of transform_skip_flag is 0, or if the value of slice_ts_residual_coding_disabled_flag is 1, RRC can be used, otherwise, TSRC can be used.
[0275] Although high coding efficiency can be obtained in specific applications (e.g., lossless coding, etc.) by using slice_ts_residual_coding_disabled_flag, in existing video / image coding standards, no restrictions have been proposed on the case where dependent quantization and slice_ts_residual_coding_disabled_flag are used together. That is, dependent quantization can be activated at a high level (e.g., sequence parameter set (SPS) syntax / video parameter set (VPS) syntax / decoding parameter set (DPS) syntax / picture header syntax / slice header syntax) or a low level (CU / TU), and if slice_ts_residual_coding_disabled_flag is 1, unnecessary operations (i.e., operations according to dependent quantization) may be performed depending on the value of the state of dependent quantization in RRC, thereby degrading coding performance, or unexpected loss of coding performance may occur due to an incorrect configuration in the coding device. Therefore, this embodiment proposes a scheme for configuring the correlation / restriction between the two techniques of dependent quantization and residual coding (i.e., coding of residual samples of transform skipped blocks in the current slice of RRC) used together when slice_ts_residual_coding_disabled_flag=1 to prevent unexpected coding loss or failure.
[0276] As an implementation, the present disclosure proposes a method in which slice_ts_residual_coding_disabled_flag depends on ph_dep_quant_enabled_flag. For example, the syntax elements proposed in this implementation may be in the following table.
[0277] [Table 16]
[0278]
[0279] According to the present embodiment, slice_ts_residual_coding_disabled_flag may be signaled when the value of ph_dep_quant_enabled_flag is 0. Here, ph_dep_quant_enabled_flag may indicate whether dependent quantization is enabled. For example, if the value of ph_dep_quant_enabled_flag is 1, this may indicate that dependent quantization is enabled, and if the value of ph_dep_quant_enabled_flag is 0, this may indicate that dependent quantization is not enabled.
[0280] Accordingly, according to the present embodiment, slice_ts_residual_coding_disabled_flag may be signaled only when dependent quantization is not enabled, and in a case where dependent quantization is enabled and slice_ts_residual_coding_disabled_flag is therefore not signaled, slice_ts_residual_coding_disabled_flag may be inferred to be 0. In addition, ph_dep_quant_enabled_flag and slice_ts_residual_coding_disabled_flag may be signaled to picture header syntax and / or slice header syntax, or may be signaled to another high-level syntax (HLS) (e.g., SPS syntax / VPS syntax / DPS syntax) that is not picture header syntax and slice header syntax or is not at a low level (CU / TU). If ph_dep_quant_enabled_flag is signaled to a syntax that does not include a picture header syntax, it may be referred to by another name. For example, ph_dep_quant_enabled_flag may be expressed as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or sps_dep_quant_enabled_flag.
[0281] In addition, the present disclosure proposes another embodiment for configuring the correlation / restriction between dependent quantization and residual coding (i.e., the coding of residual samples of the transform skip block in the current slice of the RRC) when slice_ts_residual_coding_disabled_flag=1. For example, the present embodiment proposes the following scheme: when the value of slice_ts_residual_coding_disabled_flag is 1, the state of dependent quantization is not used to encode the level value of the transform coefficient, so as to prevent unexpected coding loss or failure due to the use of dependent quantization and residual coding (i.e., the coding of residual samples of the transform skip block in the current slice of the RRC) together when slice_ts_residual_coding_disabled_flag=1. The residual coding syntax according to the present embodiment can be as shown in the following table.
[0282] [Table 17]
[0283]
[0284]
[0285]
[0286]
[0287]
[0288] Referring to Table 17 as described above, when the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, QState may be derived, and the value of the transform coefficient (transform coefficient level) may be derived based on Qstate. For example, referring to Table 17, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the transform coefficient, and (QState>1?1:0) can represent 1 when the value of state QState is greater than 1 (that is, when the value of state Qstate is 2 or 3), and can represent 0 when the value of state Qstate is equal to or less than 1 (that is, when the value of state Qstate is 0 or 1).
[0289] In addition, referring to Table 17 as described above, if the value of slice_ts_residual_coding_disabled_flag is 1, the value of the transform coefficient (transform coefficient level) can be derived without using Qstate. For example, referring to Table 17, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be an absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, and coeff_sign_flag[n] can be a syntax element of a sign flag representing the sign of the transform coefficient.
[0290] In addition, according to this embodiment, if the value of slice_ts_residual_coding_disabled_flag is 1, the quantization-dependent state may not be used to encode the level value of the transform coefficient, and the state update may not be performed. For example, the residual coding syntax according to this embodiment may be as shown in the following table.
[0291] [Table 18]
[0292]
[0293]
[0294]
[0295]
[0296]
[0297] Referring to Table 18 as described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, Qstate may be updated. For example, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, Qstate may be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. In addition, if the value of slice_ts_residual_coding_disabled_flag is 1, the process of updating Qstate may not be performed.
[0298] In addition, referring to Table 18 as described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, the value of the transform coefficient (transform coefficient level) may be derived based on QState. For example, referring to Table 18, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the transform coefficient, and (QState>1?1:0) can represent 1 when the value of state QState is greater than 1 (that is, when the value of state Qstate is 2 or 3), and can represent 0 when the value of state Qstate is equal to or less than 1 (that is, when the value of state Qstate is 0 or 1).
[0299] In addition, referring to Table 18 as described above, if the value of slice_ts_residual_coding_disabled_flag is 1, the value of the transform coefficient (transform coefficient level) can be derived without using Qstate. For example, referring to Table 18, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be an absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, and coeff_sign_flag[n] can be a syntax element of a sign flag representing the sign of the transform coefficient.
[0300] In addition, the present disclosure proposes another embodiment for configuring the correlation / restriction between dependent quantization and residual coding (i.e., the encoding of residual samples of the transform skip block in the current slice of the RRC) when slice_ts_residual_coding_disabled_flag=1. For example, the present embodiment proposes a scheme for adding restrictions using transform_skip_flag in the process of deriving the value of the transform coefficient (transform coefficient level) depending on the state or state update of dependent quantization in RRC. That is, the present embodiment proposes the following scheme: based on transform_skip_flag, the process of deriving the value of the transform coefficient (transform coefficient level) is not used depending on the state and / or state update of dependent quantization in RRC. The residual coding syntax according to the present embodiment can be as shown in the following table.
[0301] [Table 19]
[0302]
[0303]
[0304]
[0305]
[0306]
[0307] Referring to Table 19 as described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, Qstate may be updated. For example, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, Qstate may be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. In addition, if the value of transform_skip_flag is 1, the process of updating Qstate may not be performed.
[0308] In addition, referring to Table 19 as described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, QState can be derived, and the value of the transform coefficient (transform coefficient level) can be derived based on QState. For example, referring to Table 19, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the transform coefficient, and (QState>1?1:0) can represent 1 when the value of state QState is greater than 1 (that is, when the value of state Qstate is 2 or 3), and can represent 0 when the value of state Qstate is equal to or less than 1 (that is, when the value of state Qstate is 0 or 1).
[0309] In addition, referring to Table 19 as described above, if the value of transform_skip_flag is 1, the value of the transform coefficient (transform coefficient level) can be derived without using Qstate. Accordingly, in the case of encoding the residual data according to RRC for a transform skip block, the value of the transform coefficient can be derived without using Qstate. For example, referring to Table 19, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, and coeff_sign_flag[n] can be a syntax element of a sign flag representing the sign of the transform coefficient.
[0310] In addition, the present disclosure proposes various implementations related to the signaling of the above-mentioned syntax element sh_ts_residual_coding_disabled_flag.
[0311] For example, as described above, sh_ts_residual_coding_disabled_flag is a syntax element that defines whether TSRC is not enabled, and when transform skip blocks are not used, it may not be necessary to signal. That is, only when the syntax element for whether to use transform skip blocks indicates that transform skip blocks are used, it may be important to perform signaling of sh_ts_residual_coding_disabled_flag.
[0312] Accordingly, the present disclosure proposes an implementation in which sh_ts_residual_coding_disabled_flag is signaled only if sps_transform_skip_enabled_flag is 1. The syntax according to this implementation is as shown in the following table.
[0313] [Table 20]
[0314]
[0315] Referring to Table 20, if sps_transform_skip_enabled_flag is 1, sh_ts_residual_coding_disabled_flag may be signaled, and if sps_transform_skip_enabled_flag is 0, sh_ts_residual_coding_disabled_flag may not be signaled. Here, for example, sps_transform_skip_enabled_flag may indicate whether a transform skip block is used. That is, for example, sps_transform_skip_enabled_flag may indicate whether transform skip is enabled. For example, if the value of sps_transform_skip_enabled_flag is 1, sps_transform_skip_enabled_flag may indicate that a transform skip flag (transform_skip_flag) may be present in the transform unit syntax, and if the value of sps_transform_skip_enabled_flag is 0, sps_transform_skip_enabled_flag may indicate that a transform skip flag is not present in the transform unit syntax. In addition, if sh_ts_residual_coding_disabled_flag is not signaled, it can be inferred that sh_ts_residual_coding_disabled_flag is 0. In addition, the above-mentioned sps_transform_skip_enabled_flag can be signaled in SPS, or can be signaled in other high-level syntax (VPS, PPS, picture header syntax, and slice header syntax) or low-level syntax (slice data syntax, coding unit syntax, and transform unit syntax) that is not SPS. In addition, it can be signaled before slice_ts_residual_coding_disabled_flag.
[0316] In addition, the present disclosure proposes an implementation scheme combining the above implementation schemes for the signaling of sh_ts_residual_coding_disabled_flag. For example, as shown in the following table, an implementation scheme for signaling sh_ts_residual_coding_disabled_flag may be proposed.
[0317] [Table 21]
[0318]
[0319] Referring to Table 21, when sps_transform_skip_enabled_flag is 1 or ph_dep_quant_enabled_flag is 0, sh_ts_residual_coding_disabled_flag may be signaled, otherwise sh_ts_residual_coding_disabled_flag may not be signaled. In addition, when sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be inferred to be 0.
[0320] In addition, for example, an implementation for signaling sh_ts_residual_coding_disabled_flag as in the following table may be proposed.
[0321] [Table 22]
[0322]
[0323] Referring to Table 22, sh_ts_residual_coding_disabled_flag may be signaled to the picture header. sh_ts_residual_coding_disabled_flag may be expressed as ph_ts_residual_coding_disabled_flag. In addition, referring to Table 22, ph_dep_quant_enabled_flag may be signaled to the picture header.
[0324] For example, referring to Table 22, when ph_dep_quant_enabled_flag is 0 and sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may be signaled, otherwise, ph_ts_residual_coding_disabled_flag may not be signaled. In addition, when ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag may be inferred to be 0.
[0325] In the existing video / image coding standards regarding syntax elements described in the embodiments of the present disclosure, ph_dep_quant_enabled_flag can be signaled in the picture header syntax, and sh_ts_residual_coding_disabled_flag can be signaled in the slice header syntax. In this regard, the present disclosure proposes an embodiment for signaling two syntax elements with the same high-level syntax or low-level syntax.
[0326] For example, an implementation may be proposed in which both ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag are signaled in the picture header syntax. In this case, sh_ts_residual_coding_disabled_flag may be referred to as ph_ts_residual_coding_disabled_flag.
[0327] In addition, for example, an embodiment in which both ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag are signaled in the slice header syntax may be proposed. In this case, ph_dep_quant_enabled_flag may be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or slice_dep_quant_enabled_flag.
[0328] In addition, for example, the following embodiment may be proposed: both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS, but ph_ts_residual_coding_disabled_flag is signaled only when the value of ph_dep_quant_enabled_flag is 0. For example, an example in which both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the picture header syntax may be as shown in the following table.
[0329] [Table 23]
[0330]
[0331] Referring to Table 23, ph_dep_quant_enabled_flag may be signaled in the picture header syntax, and if the value of ph_dep_quant_enabled_flag is 0, ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax, and if the value of ph_dep_quant_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may not be signaled. For example, if ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag may be inferred to be 0.
[0332] Furthermore, the above embodiments are examples, and an example may be given in which ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in other high-level syntaxes (VPS, SPS, PPS, and slice header syntax) or low-level syntaxes (slice data syntax, coding unit syntax, and transform unit syntax) instead of picture header syntax.
[0333] In addition, for example, the following embodiment may be proposed: both ph_ts_residual_coding_disabled_flag and ph_dep_quant_enabled_flag are signaled in the same HLS, but ph_dep_quant_enabled_flag is signaled only when the value of ph_ts_residual_coding_disabled_flag is 0.
[0334] [Table 24]
[0335]
[0336] Referring to Table 24, ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax, and if the value of ph_ts_residual_coding_disabled_flag is 0, ph_dep_quant_enabled_flag may be signaled in the picture header syntax, whereas if the value of ph_ts_residual_coding_disabled_flag is 1, ph_dep_quant_enabled_flag may not be signaled. For example, if ph_dep_quant_enabled_flag is not signaled, ph_dep_quant_enabled_flag may be inferred to be 0.
[0337] Furthermore, the above embodiments are examples, and an example may be given in which ph_ts_residual_coding_disabled_flag and ph_dep_quant_enabled_flag are signaled in other high-level syntaxes (VPS, SPS, PPS, and slice header syntax) or low-level syntaxes (slice data syntax, coding unit syntax, and transform unit syntax) instead of picture header syntax.
[0338] In addition, for example, an embodiment combining the above embodiments with each other may be proposed. For example, an embodiment in which both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS, but ph_ts_residual_coding_disabled_flag is signaled only when the value of ph_dep_quant_enabled_flag is 0 or the value of sps_transform_skip_enabled_flag is 1 may be proposed.
[0339] [Table 25]
[0340]
[0341] Referring to Table 25, ph_dep_quant_enabled_flag may be signaled in the picture header syntax, and in the case where the value of ph_dep_quant_enabled_flag is 0 or the value of sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax, otherwise, ph_ts_residual_coding_disabled_flag may not be signaled. Here, for example, sps_transform_skip_enabled_flag may indicate whether a transform skip block is used. That is, for example, sps_transform_skip_enabled_flag may indicate whether transform skipping is enabled. For example, if the value of sps_transform_skip_enabled_flag is 1, sps_transform_skip_enabled_flag may indicate that a transform skip flag (transform_skip_flag) may be present in the transform unit syntax, and if the value of sps_transform_skip_enabled_flag is 0, sps_transform_skip_enabled_flag may indicate that a transform skip flag is not present in the transform unit syntax. For example, if ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag may be inferred to be 0.
[0342] In addition, for example, the following implementation may be proposed: both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS (e.g., slice header syntax, etc.), but ph_ts_residual_coding_disabled_flag is signaled only when the value of ph_dep_quant_enabled_flag is 0 and the value of sps_transform_skip_enabled_flag is 1.
[0343] [Table 26]
[0344]
[0345] Referring to Table 26, ph_dep_quant_enabled_flag may be signaled in the picture header syntax, and in the case where the value of ph_dep_quant_enabled_flag is 0 and the value of sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax, otherwise, ph_ts_residual_coding_disabled_flag may not be signaled. For example, if ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag may be inferred to be 0.
[0346] In addition, for example, the following embodiment may be proposed: both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS, but ph_ts_residual_coding_disabled_flag is signaled only when the value of sps_transform_skip_enabled_flag is 1, and ph_dep_quant_enabled_flag is signaled only when the value of ph_ts_residual_coding_disabled_flag is 0.
[0347] [Table 27]
[0348]
[0349] Referring to Table 27, if the value of sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax, and if the value of ph_ts_residual_coding_disabled_flag is 0, ph_dep_quant_enabled_flag may be signaled in the picture header syntax. For example, if the value of sps_transform_skip_enabled_flag is 0, ph_ts_residual_coding_disabled_flag may not be signaled. For example, if ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag may be inferred to be 0. In addition, for example, if the value of ph_ts_residual_coding_disabled_flag is 1, ph_dep_quant_enabled_flag may not be signaled. For example, if ph_dep_quant_enabled_flag is not signaled, then ph_dep_quant_enabled_flag may be inferred to be 0.
[0350] In addition, as described above, the information (syntax elements) in the syntax table disclosed in the present disclosure may be included in the image / video information, configured / encoded by the encoding device, and transmitted to the decoding device in the form of a bitstream. The decoding device may parse / decode the information (syntax elements) in the corresponding syntax table. The decoding device may perform a block / image / video reconstruction process based on the decoded information.
[0351] In addition, the present disclosure proposes various implementations related to the signaling of the above-mentioned syntax element sh_ts_residual_coding_disabled_flag.
[0352] For example, as described above, by using slice_ts_residual_coding_disabled_flag, high coding efficiency can be obtained in specific applications (e.g., lossless coding, etc.), but in existing video / image coding standards, no constraints are proposed for the case where slice_ts_residual_coding_disabled_flag is used together with symbol data hiding (SDH).
[0353] Here, the sign data hiding method may be as follows. When deriving a transform coefficient, the sign of the transform coefficient may be derived based on a 1-bit sign flag (the above-mentioned syntax element coeff_sign_flag). In this regard, the SDH may indicate a technique for omitting explicit signaling of coeff_sign_flag of the first significant transform coefficient in a sub-block / coefficient group (CG) in order to improve coding efficiency. Here, the value of coeff_sign_flag of the first significant transform coefficient may be derived based on the sum of the absolute levels (i.e., absolute values) of the significant transform coefficients in the corresponding sub-block / coefficient group. That is, the sign of the first significant transform coefficient may be derived based on the sum of the absolute levels of the significant transform coefficients in the corresponding sub-block / coefficient group. In addition, a significant transform coefficient may mean a non-zero transform coefficient whose (absolute) value is not 0. For example, when the sum of the absolute levels of the significant transform coefficients is an even number, the value of coeff_sign_flag of the first significant transform coefficient may be derived as 1, and when the sum of the absolute levels of the significant transform coefficients is an odd number, the value of coeff_sign_flag of the first significant transform coefficient may be derived as 0. In other words, for example, when the sum of the absolute levels of the significant transform coefficients is an even number, the value of coeff_sign_flag of the first significant transform coefficient may be derived as a negative value, and when the sum of the absolute levels of the significant transform coefficients is an odd number, the value of coeff_sign_flag of the first significant transform coefficient may be derived as a positive value. Alternatively, for example, when the sum of the absolute levels of the significant transform coefficients is an even number, the value of coeff_sign_flag of the first significant transform coefficient may be derived as 0, and when the sum of the absolute levels of the significant transform coefficients is an odd number, the value of coeff_sign_flag of the first significant transform coefficient may be derived as 1. In other words, for example, when the sum of the absolute levels of the significant transform coefficients is an even number, the value of coeff_sign_flag of the first significant transform coefficient may be derived as a positive value, and when the sum of the absolute levels of the significant transform coefficients is an odd number, the value of coeff_sign_flag of the first significant transform coefficient may be derived as a negative value.
[0354] For example, the SDH in the residual syntax may be as shown in the following table.
[0355] [Table 28]
[0356]
[0357] Referring to Table 28, the variable signHiddenFlag may indicate whether SDH is applied. The variable signHiddenFlag may be referred to as signHidden. For example, when the value of the variable signHiddenFlag is 0, the variable signHiddenFlag may indicate that SDH is not applied, and when the value of the variable signHiddenFlag is 1, the variable signHiddenFlag may indicate that SDH is applied. For example, the value of the variable signHiddenFlag may be set based on signaled flag information (e.g., sh_sign_data_hiding_used_flag or pic_sign_data_hiding_enabled_flag or sps_sign_data_hiding_enabled_flag). In addition, for example, the value of the variable signHiddenFlag may be set based on lastSigScanPosSb and firstSigScanPosSb. Here, lastSigScanPosSb may indicate the position of the last valid transform coefficient searched in the corresponding sub-block / coefficient group according to the scanning order, and firstSigScanPosSb may indicate the position of the first valid transform coefficient searched in the corresponding sub-block / coefficient group according to the scanning order. Typically, lastSigScanPosSb may be located in a frequency component region relatively higher than firstSigScanPosSb. Accordingly, when lastSigScanPosSb-firstSigScanPosSb is greater than a predetermined threshold, the signHidden value may be derived as 1 (i.e., SDH is applied), otherwise the signHidden value may be derived as 0 (i.e., SDH is not applied). Here, for example, referring to Table 28, the threshold may be set to 3.
[0358] In addition, when symbol data hiding is activated in high-level syntax (VPS, SPS, PPS, slice header syntax, etc.) or low-level syntax (slice data syntax, coding unit syntax, transform unit syntax, etc.) and slice_ts_residual_coding_disabled_flag is 1, the symbol data hiding process of RRC can be used for lossless coding. Accordingly, lossless coding may become impossible due to incorrect settings in the encoding device. Alternatively, when lossy coding (i.e., irreversible coding method) other than lossless coding is applied and the residual signal skipped by the applied transform is encoded with RRC and BDPCM is applied at the same time, although the interval where the residual value becomes 0 occurs more frequently than usual due to the difference between the residuals in BDPCM, coding loss may occur because SDH is performed according to SDH application conditions. Specifically, for example, when there are valid transform coefficients (non-zero residual data) at positions 0 and 15 in the CG, respectively, and the values of the transform coefficients at the remaining positions in the CG are 0, SDH can be applied to the CG according to the above-mentioned SDH application conditions, so the sign data of the first valid transform coefficient of the CG (i.e., the encoding of the sign flag) can be omitted. Accordingly, in this case, only the parity of the two residual data of the CG can be adjusted in the quantization step to omit the sign data, and it is not a case where SDH is not applied, but more coding losses may occur. This situation may even occur in blocks where BDPCM is not applied, but due to the characteristics of BDPCM, the level is reduced by the difference with the adjacent residual, so unfavorable situations may occur more frequently when SDH is applied.
[0359] Therefore, in order to prevent SDH and residual coding with slice_ts_residual_coding_disabled_flag=1 (i.e., encoding residual samples of transform skip blocks in the current slice with RRC) from being used together to cause unexpected coding loss or failure, the present disclosure proposes an implementation for setting the correlation / constraint between the two techniques.
[0360] For example, the present disclosure proposes a method in which slice_ts_residual_coding_disabled_flag depends on pic_sign_data_hiding_enabled_flag. The residual coding syntax according to the present embodiment may be as shown in the following table.
[0361] [Table 29]
[0362]
[0363] Here, slice_ts_residual_coding_disabled_flag can be signaled as a slice header syntax or a high-level syntax (HLS) other than the slice header syntax (e.g., SPS syntax / VPS syntax / DPS syntax, etc.) or a low level (CU / TU). In addition, pic_sign_data_hiding_enabled_flag can be signaled in a picture header syntax or other high-level syntax (HLS) other than the picture header syntax (e.g., SPS syntax / VPS syntax / DPS syntax, etc.) or a low level (CU / TU). For example, when pic_sign_data_hiding_enabled_flag is signaled in a syntax other than the picture header syntax, it can be called by another name. For example, pic_sign_data_hiding_enabled_flag can be represented by sps_sign_data_hiding_enabled_flag.
[0364] In addition, sps_sign_data_hiding_enabled_flag may be a flag indicating whether symbol data hiding is enabled. That is, for example, pic_sign_data_hiding_enabled_flag may indicate whether symbol data hiding is enabled. For example, when the value of sps_sign_data_hiding_enabled_flag is 1, sps_sgn_data_hiding_enable_flag may indicate that symbol data hiding is enabled, and when the value of sps_sign_data_hiding_enabled_flag is 0, sps_sign_data_hiding_enabled_flag may indicate that symbol data hiding is not enabled.
[0365] According to Table 29 disclosing the present embodiment, slice_ts_residual_coding_disabled_flag may be signaled only when symbol data hiding is not enabled. In addition, when symbol data hiding is enabled, slice_ts_residual_coding_disabled_flag may not be signaled, and the value of slice_ts_residual_coding_disabled_flag may be inferred to be 0 (encoding the residual samples of the transform skipped blocks in the current slice using the TSRC syntax) or 1 (encoding the residual samples of the transform skipped blocks in the current slice using the RRC syntax).
[0366] In addition, the present disclosure proposes an embodiment combining the above-mentioned embodiments with respect to the signaling of sh_ts_residual_coding_disabled_flag. For example, an embodiment of signaling sh_ts_residual_coding_disabled_flag may be proposed as shown in the following table.
[0367] [Table 30]
[0368]
[0369] Referring to Table 30, when sps_transform_skip_enabled_flag is 1, ph_dep_quant_enabled_flag is 0, and pic_sign_data_hiding_enabled_flag is 0, sh_ts_residual_coding_disabled_flag may be signaled, otherwise sh_ts_residual_coding_disabled_flag may not be signaled. On the other hand, when sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be inferred to be 0.
[0370] Furthermore, the implementation of Table 31 is an example, and an example may be proposed in which ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and ph_ts_residual_coding_disabled_flag are all signaled in the same HLS (eg, slice header syntax, etc.).
[0371] Alternatively, for example, an implementation of signaling sh_ts_residual_coding_disabled_flag as shown in the following table may be proposed.
[0372] [Table 31]
[0373]
[0374] Referring to Table 31, when ph_dep_quant_enabled_flag is 0 and pic_sign_data_hiding_enabled_flag is 0, sh_ts_residual_coding_disabled_flag may be signaled, otherwise sh_ts_residual_coding_disabled_flag may not be signaled. On the other hand, when sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be inferred to be 0.
[0375] Furthermore, the implementation of Table 31 is an example, and an example may be proposed in which ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and ph_ts_residual_coding_disabled_flag are all signaled in the same HLS (eg, slice header syntax, etc.).
[0376] Alternatively, for example, an implementation of signaling sh_ts_residual_coding_disabled_flag as shown in the following table may be proposed.
[0377] [Table 32]
[0378]
[0379] Referring to Table 32, when ph_dep_quant_enabled_flag is 0 or pic_sign_data_hiding_enabled_flag is 0, sh_ts_residual_coding_disabled_flag may be signaled, otherwise, sh_ts_residual_coding_disabled_flag may not be signaled. On the other hand, when sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be inferred to be 0.
[0380] In addition, the present disclosure proposes an embodiment in which the above-mentioned syntax elements ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and slice_ts_residual_coding_disabled_flag are signaled in the same high-level syntax or low-level syntax.
[0381] For example, the following implementation may be proposed: ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag and slice_ts_residual_coding_disabled_flag are all signaled in the picture header syntax, as shown in the following table.
[0382] [Table 33]
[0383]
[0384] In this case, slice_ts_residual_coding_disabled_flag may be referred to as ph_ts_residual_coding_disabled_flag.
[0385] Referring to Table 33, ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax, and when the value of ph_ts_residual_coding_disabled_flag is 0, if the value of sps_dep_quant_enabled_flag is 1, ph_dep_quant_enabled_flag may be signaled in the picture header syntax. In addition, when the value of ph_ts_residual_coding_disabled_flag is 0, if the value of sps_sign_data_hiding_enabled_flag is 1 and ph_dep_quant_enabled_flag is 0, pic_sign_data_hiding_enabled_flag may be signaled in the picture header syntax. In addition, for example, when the value of ph_ts_residual_coding_disabled_flag is 1, ph_dep_quant_enabled_flag and pic_sign_data_hiding_enabled_flag may not be signaled.
[0386] Alternatively, for example, an implementation as shown in the following table may be proposed: ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and slice_ts_residual_coding_disabled_flag are all signaled in the picture header syntax.
[0387] [Table 34]
[0388]
[0389] Referring to Table 34, when the value of sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax. In addition, for example, when the value of sps_transform_skip_enabled_flag is 0, ph_ts_residual_coding_disabled_flag may not be signaled. When ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag may be inferred to be 0 in the decoding device.
[0390] In addition, referring to Table 34, when the value of ph_ts_residual_coding_disabled_flag is 0 and the value of sps_dep_quant_enabled_flag is 1, ph_dep_quant_enabled_flag may be signaled in the picture header syntax. In addition, when the value of ph_ts_residual_coding_disabled_flag is 0, if the value of sps_sign_data_hiding_enabled_flag is 1 and ph_dep_quant_enabled_flag is 0, pic_sign_data_hiding_enabled_flag may be signaled in the picture header syntax. In addition, for example, when the value of ph_ts_residual_coding_disabled_flag is 1, ph_dep_quant_enabled_flag and pic_sign_data_hiding_enabled_flag may not be signaled. Additionally, for example, when ph_dep_quant_enabled_flag is not signaled, ph_dep_quant_enabled_flag may be inferred as 0 in the decoding device. Additionally, for example, when pic_sign_data_hiding_enabled_flag is not signaled, pic_sign_data_hiding_enabled_flag may be inferred as 0 in the decoding device.
[0391] In addition, the above-mentioned embodiments are examples, and the following example can be proposed: signaling ph_ts_residual_coding_disabled_flag, ph_dep_quant_enabled_flag and pic_sign_data_hiding_enabled_flag in high-level syntax (VPS, SPS, PPS, slice header syntax, etc.) or low-level syntax (slice data syntax, coding unit syntax, etc.) other than picture header syntax.
[0392] In addition, as described above, the information (syntax elements) in the syntax table disclosed in the present disclosure may be included in the image / video information, and may be configured / encoded in the encoding device and sent to the decoding device in the form of a bitstream. The decoding device may parse / decode the information (syntax elements) in the corresponding syntax table. The decoding device may perform block / image / video reconstruction processing based on the decoded information.
[0393] Figure 8 The image encoding method performed by the encoding device according to the present disclosure is briefly illustrated. Figure 8 The method disclosed in can be Figure 2 Specifically, for example, Figure 8 S800 to S830 in the above may be performed by an entropy encoder of the encoding device. In addition, although not shown in the figure, the process of deriving the prediction sample may be performed by a predictor of the encoding device, the process of deriving the residual sample of the current block based on the original sample and the prediction sample of the current block may be performed by a subtractor of the encoding device, and the process of generating the reconstructed sample and the reconstructed picture of the current block based on the residual sample and the prediction sample of the current block may be performed by an adder of the encoding device.
[0394] The encoding device encodes a symbol data hiding enable flag for whether to enable symbol data hiding (S800). The encoding device may encode the symbol data hiding enable flag for whether to enable symbol data hiding. The image information may include the symbol data hiding enable flag. For example, the encoding device may determine whether to enable symbol data hiding for a block of a picture in a sequence, and may encode the symbol data hiding enable flag for whether to enable symbol data hiding. For example, the symbol data hiding enable flag may be a flag for whether to enable symbol data hiding. For example, the symbol data hiding enable flag may indicate whether symbol data hiding is enabled. That is, for example, the symbol data hiding enable flag may indicate whether symbol data hiding is enabled for a block of a picture in a sequence. For example, the symbol data hiding enable flag may indicate whether there may be a symbol data hiding use flag indicating whether symbol data hiding is used for the current slice. For example, a symbol data hiding enable flag having a value of 1 may indicate that symbol data hiding is enabled, and a symbol data hiding enable flag having a value of 0 may indicate that symbol data hiding is not enabled. For example, a symbol data hiding enabled flag having a value of 1 may indicate that a symbol data hiding use flag may be present, and a symbol data hiding enabled flag having a value of 0 may indicate that a symbol data hiding use flag is not present. In addition, for example, the symbol data hiding enabled flag may be signaled in an SPS syntax. Alternatively, for example, the symbol data hiding enabled flag may be signaled in a picture header syntax or a slice header syntax. The syntax element of the symbol data hiding enabled flag may be sps_sign_data_hiding_enabled_flag.
[0395] The encoding apparatus encodes a transform skip residual coding (TSRC) enable flag for whether to enable TSRC based on the symbol data hiding enable flag (S810). The image information may include the TSRC enable flag.
[0396] For example, the encoding device may encode the TSRC enable flag based on the symbol data hiding enable flag. For example, the TSRC enable flag may be encoded based on the symbol data hiding enable flag having a value of 0. That is, for example, when the value of the symbol data hiding enable flag is 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled), the TSRC enable flag may be encoded. In other words, for example, when the value of the symbol data hiding enable flag is 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled), the TSRC enable flag may be signaled. In addition, for example, when the value of the symbol data hiding enable flag is 1, the TSRC enable flag may not be encoded, and the value of the TSRC enable flag may be derived as 0 in the decoding device. That is, for example, when the value of the symbol data hiding enable flag is 1, the TSRC enable flag may not be signaled, and the value of the TSRC enable flag may be derived as 0 in the decoding device.
[0397] Here, for example, the TSRC enable flag may be a flag for whether to enable TSRC. That is, for example, the TSRC enable flag may be a flag indicating whether TSRC is enabled for a block in a slice. For example, a TSRC enable flag having a value of 1 may indicate that TSRC is not enabled, and a TSRC enable flag having a value of 0 may indicate that TSRC is enabled. In addition, for example, the TSRC enable flag may be signaled in the slice header syntax. The syntax element of the TSRC enable flag may be the above-mentioned sh_ts_residual_coding_disabled_flag.
[0398] In addition, for example, the encoding device may determine whether to enable dependent quantization for a block of a picture in a sequence, and may encode a dependent quantization enable flag for whether to enable dependent quantization. The image information may include a dependent quantization enable flag. For example, the dependent quantization enable flag may be a flag for whether to enable dependent quantization. For example, the dependent quantization enable flag may indicate whether dependent quantization is enabled. That is, for example, the dependent quantization enable flag may indicate whether dependent quantization is enabled for a block of a picture in a sequence. For example, the dependent quantization enable flag may indicate whether there may be a dependent quantization use flag indicating whether dependent quantization is used for the current slice. For example, a dependent quantization enable flag having a value of 1 may indicate that dependent quantization is enabled, and a dependent quantization enable flag having a value of 0 may indicate that dependent quantization is not enabled. In addition, for example, the dependent quantization enable flag may be signaled in an SPS syntax or a slice header syntax. The syntax element of the dependent quantization enable flag may be the above-mentioned sps_dep_quant_enabled_flag. sps_dep_quant_enabled_flag may be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.
[0399] In addition, for example, the encoding device may encode a transform skip enable flag for whether to enable transform skip. The image information may include a transform skip enable flag. For example, the encoding device may determine whether transform skip is enabled for a block of a picture in a sequence, and may encode a transform skip enable flag for whether transform skip is enabled. For example, the transform skip enable flag may be a flag for whether transform skip is enabled. For example, the transform skip enable flag may indicate whether transform skip is enabled. That is, for example, the transform skip enable flag may indicate whether transform skip is enabled for a block of a picture in a sequence. For example, the transform skip enable flag may indicate whether a transform skip flag may exist. For example, a transform skip enable flag having a value of 1 may indicate that transform skip is enabled, and a transform skip enable flag having a value of 0 may indicate that transform skip is not enabled. That is, for example, a transform skip enable flag having a value of 1 may indicate that a transform skip flag may exist, and a transform skip enable flag having a value of 0 may indicate that a transform skip flag does not exist. In addition, for example, the transform skip enable flag may be signaled to a sequence parameter set (SPS) syntax. The syntax element of the transform skip enable flag may be the above-mentioned sps_transform_skip_enabled_flag.
[0400] In addition, for example, the TSRC enable flag may be encoded based on a symbol data hiding enable flag, a dependent quantization enable flag, and / or a transform skip enable flag. For example, the TSRC enable flag may be encoded based on a symbol data hiding enable flag having a value of 0, a dependent quantization enable flag having a value of 0, and a transform skip enable flag having a value of 1. That is, for example, when the value of the symbol data hiding enable flag is 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled), the value of the dependent quantization enable flag is 0 (i.e., the dependent quantization enable flag indicates that dependent quantization is not enabled), and the value of the transform skip enable flag is 1 (i.e., the transform skip enable flag indicates that transform skip is enabled), the TSRC enable flag may be encoded (or signaled). In addition, for example, when the value of the dependent quantization enable flag is 1, the TSRC enable flag may not be encoded, and the value of the TSRC enable flag may be derived as 0 in the decoding device. That is, for example, when the value of the dependent quantization enable flag is 1, the TSRC enable flag may not be signaled, and the value of the TSRC enable flag may be derived as 0 in the decoding device. In addition, for example, when the value of the transform skip enable flag is 0, the TSRC enable flag may not be encoded, and the value of the TSRC enable flag may be derived as 0. That is, for example, when the value of the transform skip enable flag is 0, the TSRC enable flag may not be signaled, and the value of the TSRC enable flag may be derived as 0.
[0401] The encoding device encodes the residual information of the current block based on the TSRC enable flag (S820). The decoding device may encode the residual information of the current block based on the TSRC enable flag.
[0402] For example, the encoding device may determine the residual coding syntax of the current block based on the TSRC enable flag. For example, the encoding device may determine the residual coding syntax of the current block as one of a regular residual coding (RRC) syntax and a transform skip residual coding (TSRC) syntax based on the TSRC enable flag. The RRC syntax may represent the syntax according to the RRC, and the TSRC syntax may represent the syntax according to the TSRC.
[0403] For example, based on the TSRC enable flag having a value of 1, the residual coding syntax of the current block may be determined as a conventional residual coding (RRC) syntax. In this case, for example, a transform skip flag for whether the current block is a transform skip block may be encoded, and the value of the transform skip flag may be 1. For example, the image information may include a transform skip flag of the current block. The transform skip flag may indicate whether the current block is a transform skip block. That is, the transform skip flag may indicate whether a transform has been applied to the transform coefficients of the current block. The syntax element representing the transform skip flag may be transform_skip_flag as described above. For example, if the value of the transform skip flag is 1, the transform skip flag may indicate that a transform has not been applied to the current block (ie, the transform is skipped), and if the value of the transform skip flag is 0, the transform skip flag may indicate that a transform has been applied to the current block. For example, if the current block is a transform skip block, the value of the transform skip flag of the current block may be 1.
[0404] In addition, for example, based on a TSRC enable flag having a value of 0, the residual coding syntax of the current block may be determined as a transform skip residual coding (TSRC) syntax. In addition, for example, a transform skip flag for whether the current block is a transform skip block may be encoded, and based on a transform skip flag having a value of 1 and a TSRC enable flag having a value of 0, the residual coding syntax of the current block may be determined as a transform skip residual coding (TSRC) syntax. In addition, for example, a transform skip flag for whether the current block is a transform skip block may be encoded, and based on a transform skip flag having a value of 0 and a TSRC enable flag having a value of 0, the residual coding syntax of the current block may be determined as a regular residual coding (RRC) syntax.
[0405] Thereafter, for example, the encoding device may encode the residual information of the residual coding syntax determined for the current block. The encoding device may derive the residual samples of the current block, and may encode the residual information of the determined residual coding syntax of the residual samples of the current block. For example, the residual information of the conventional residual coding (RRC) syntax may be encoded based on the TSRC enable flag having a value of 1, and the residual information of the TSRC syntax may be encoded based on the TSRC enable flag having a value of 0. The image information may include the residual information.
[0406] For example, the encoding device may determine whether to perform inter prediction or intra prediction on the current block, and may determine a specific inter prediction mode or a specific intra prediction mode based on the RD cost. According to the determined mode, the encoding device may derive a prediction sample of the current block, and may derive a residual sample of the current block by subtracting the prediction sample from the original sample of the current block.
[0407] Then, for example, the encoding device may derive a transform coefficient of the current block based on the residual samples. For example, the encoding device may determine whether to apply a transform to the current block. That is, the encoding device may determine whether to apply a transform to the residual samples of the current block. The encoding device may determine whether to apply a transform to the current block in consideration of coding efficiency. For example, the encoding device may determine not to apply a transform to the current block. A block to which a transform is not applied may be represented as a transform skip block. That is, for example, the current block may be a transform skip block.
[0408] If the transform is not applied to the current block, that is, if the transform is not applied to the residual samples, the encoding device may derive the derived residual samples as the current transform coefficients. In addition, if the transform is applied to the current block, that is, if the transform is applied to the residual samples, the encoding device may derive the transform coefficients by performing the transform on the residual samples. The current block may include a plurality of sub-blocks or coefficient groups (CGs). In addition, the size of the sub-blocks of the current block may be 4×4 or 2×2. That is, the sub-blocks of the current block may include up to 16 non-zero transform coefficients or 4 non-zero transform coefficients. Here, the current block may be a coding block (CB) or a transform block (TB). In addition, the transform coefficients may be represented as residual coefficients.
[0409] In addition, the encoding device may determine whether to apply dependent quantization to the current block. For example, if dependent quantization is applied to the current block, the encoding device may derive the transform coefficient of the current block by performing dependent quantization processing on the transform coefficient. For example, if dependent quantization is applied to the current block, the encoding device may update the state of dependent quantization (Qstate) based on the coefficient level of the transform coefficient just before the current transform coefficient in the scanning order, may derive the coefficient level of the current transform coefficient based on the syntax element of the current transform coefficient and the updated state, and may derive the current transform coefficient by quantizing the derived coefficient level. For example, the current transform coefficient may be quantized based on a quantization parameter of a reconstruction level of the current transform coefficient in a scalar quantizer for the updated state.
[0410] For example, if the residual coding syntax of the current block is determined to be an RRC syntax, the encoding device may encode the residual information of the RRC syntax of the current block. For example, the residual information of the RRC syntax may include the syntax elements disclosed in Table 2 as described above.
[0411] For example, the residual information of the RRC syntax may include syntax elements of the transform coefficients of the current block. Here, the transform coefficients may be represented as residual coefficients.
[0412] For example, the syntax elements may include syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1]), abs_remainder, dec_abs_level, and / or coeff_sign_flag.
[0413] Specifically, for example, the syntax element may include position 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 position information indicating the position of the last non-zero transform coefficient in the scanning order of the current block. The position information may include information indicating a prefix of the column position of the last non-zero transform coefficient, information indicating a prefix of the row position of the last non-zero transform coefficient, information indicating a suffix of the column position of the last non-zero transform coefficient, and information indicating a suffix of the row position of the last non-zero transform coefficient. The syntax elements of the position information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. In addition, the non-zero transform coefficient may be referred to as a valid coefficient.
[0414] In addition, for example, the syntax element may include a coded sub-block flag indicating whether a current sub-block of the current block includes a non-zero transform coefficient, a significant coefficient flag indicating whether a transform coefficient of the current block is a non-zero transform coefficient, a first coefficient level flag for whether a coefficient level of the transform coefficient is greater than a first threshold, a parity level flag for parity of the coefficient level, and / or a second coefficient level flag for whether the coefficient level of the transform coefficient is greater than a second threshold. Here, the coded sub-block flag may be sb_coded_flag or coded_sub_block_flag, the significant coefficient flag may be sig_coeff_flag, the first coefficient level flag may be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag may be par_level_flag, and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
[0415] In addition, for example, the syntax element may include coefficient value related information of the transform coefficient value of the current block. The coefficient value related information may be abs_remainder and / or dec_abs_level.
[0416] In addition, for example, the syntax element may include a sign flag indicating the sign of the transform coefficient. The sign flag may be coeff_sign_flag.
[0417] In addition, for example, when symbol data hiding is applied to the current block, the symbol 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 symbol data hiding is applied to the current block, the syntax element may not include a symbol flag representing the symbol of the first valid transform coefficient. In addition, for example, whether symbol data hiding is applied to the current block can be derived based on the symbol data hiding enable flag and / or the position of the first valid transform coefficient and the position of the last valid transform coefficient of the current CG. For example, when the value of the symbol 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 (that is, when the value of the symbol data hiding enable flag is 1 and the number of valid transform coefficients in the current CG is greater than 3), symbol data hiding can be applied to the current CG of the current block.
[0418] In addition, for example, if the residual coding syntax of the current block is determined to be a TSRC syntax, the encoding device may encode the residual information of the TSRC syntax of the current block. For example, the residual information of the TSRC syntax may include the syntax elements disclosed in Table 3 as described above.
[0419] For example, the residual information of the TSRC syntax may include syntax elements of the transform coefficient of the current block. Here, the transform coefficient may be expressed as a residual coefficient.
[0420] For example, the syntax elements may include context coding syntax elements and / or bypass coding syntax elements for transform coefficients. The syntax elements may include syntax elements such as sig_coeff_flag, coeff_sign_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3] and / or abs_level_gtx_flag[n][4]), abs_remainder and / or coeff_sign_flag.
[0421] For example, the context coding syntax element of the transform coefficient may include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a sign flag indicating the sign of the transform coefficient, a first coefficient level flag for whether the coefficient level of the transform coefficient is greater than a first threshold, and / or a parity level flag for the parity of the transform level of the transform coefficient. In addition, for example, the context coding syntax element may include a second coefficient level flag for whether the coefficient level of the transform coefficient is greater than a second threshold, a third coefficient level flag for whether the coefficient level of the transform coefficient is greater than a third threshold, a fourth coefficient level flag for whether the coefficient level of the transform coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag for whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the significant coefficient flag may be sig_coeff_flag, the sign flag may be ceff_sign_flag, the first coefficient level flag may be abs_level_gt1_flag, and the parity level flag may be par_level_flag. In addition, the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag may be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag may be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag may be abs_level_gt9_flag or abs_level_gtx_flag.
[0422] In addition, for example, the bypass coding syntax element of the transform coefficient may include coefficient level information of the value of the transform coefficient (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.
[0423] The encoding device generates a bitstream including a symbol data hiding enable flag, a TSRC enable flag, and residual information (S830). For example, the encoding device may output image information including a symbol data hiding enable flag, a TSRC enable flag, and residual information as a bitstream. The bitstream may include a symbol data hiding enable flag, a TSRC enable flag, and residual information. In addition, the bitstream may also include a dependent quantization enable flag and / or a transform skip enable flag.
[0424] In addition, the image information may include prediction related information of the current block. The prediction related information may include prediction mode information of an inter prediction mode or an intra prediction mode performed on the current block.
[0425] In addition, the bitstream can be sent to the decoding device via a network or a (digital) storage medium. Here, the network can include a broadcast network and / or a communication network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD and SSD.
[0426] Fig. 9 An encoding device that performs an image encoding method according to the present disclosure is briefly illustrated. Figure 8 The method disclosed in can be Fig. 9 Specifically, for example, Fig. 9 The entropy encoder of the encoding device can perform Figure 8 In addition, although not illustrated, the process of deriving the prediction sample may be performed by the predictor of the encoding device, the process of deriving the residual sample of the current block based on the original sample and the prediction sample of the current block may be performed by the subtractor of the encoding device, and the process of generating the reconstructed sample and the reconstructed picture of the current block based on the residual sample and the prediction sample of the current block may be performed by the adder of the encoding device.
[0427] Fig.10 The image decoding method performed by the decoding device according to the present disclosure is briefly illustrated. Fig.10 The method disclosed in can be Figure 3 Specifically, for example, Fig.10 S1000 to S1020 in the above method may be performed by an entropy decoder of a decoding device. Fig.10S1030 in the above process may be performed by a residual processor of a decoding device, and S1040 may be performed by an adder of a decoding device. In addition, although not illustrated, the process of receiving prediction information of the current block may be performed by an entropy decoder of a decoding device, and the process of deriving a prediction sample of the current block may be performed by a predictor of the decoding device.
[0428] The decoding device obtains a symbol data hiding enable flag (S1000). The decoding device may obtain image information including a symbol data hiding enable flag through a bitstream. The image information may include a symbol data hiding enable flag. For example, the symbol data hiding enable flag may be a flag for whether to enable symbol data hiding. For example, the symbol data hiding enable flag may indicate whether symbol data hiding is enabled. That is, for example, the symbol data hiding enable flag may indicate whether symbol data hiding is enabled for a block of a picture in a sequence. For example, the symbol data hiding enable flag may indicate whether there may be a symbol data hiding use flag indicating whether symbol data hiding is used for the current slice. For example, a symbol data hiding enable flag having a value of 1 may indicate that symbol data hiding is enabled, and a symbol data hiding enable flag having a value of 0 may indicate that symbol data hiding is not enabled. For example, a symbol data hiding enable flag having a value of 1 may indicate that a symbol data hiding use flag may exist, and a symbol data hiding enable flag having a value of 0 may indicate that there is no symbol data hiding use flag. In addition, for example, the symbol data hiding enable flag may be signaled in an SPS syntax. Alternatively, for example, the symbol data hiding enable flag may be signaled in a picture header syntax or a slice header syntax. The syntax element of the sign data hiding enabled flag may be sps_sign_data_hiding_enabled_flag.
[0429] The decoding apparatus obtains a transform skip residual coding (TSRC) enable flag based on the symbol data hiding enable flag (S1010). The image information may include the TSRC enable flag.
[0430] For example, the decoding device may acquire the TSRC enable flag based on the symbol data hiding enable flag. For example, the TSRC enable flag may be acquired based on the symbol data hiding enable flag having a value of 0. That is, for example, when the value of the symbol data hiding enable flag is 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled), the TSRC enable flag may be acquired. In other words, for example, when the value of the symbol data hiding enable flag is 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled), the TSRC enable flag may be signaled. In addition, for example, when the value of the symbol data hiding enable flag is 1, the TSRC enable flag may not be acquired, and the value of the TSRC enable flag may be derived as 0. That is, for example, when the value of the symbol data hiding enable flag is 1, the TSRC enable flag may not be signaled, and the value of the TSRC enable flag may be derived as 0.
[0431] Here, for example, the TSRC enable flag may be a flag for whether to enable TSRC. That is, for example, the TSRC enable flag may be a flag indicating whether TSRC is enabled for a block in a slice. For example, a TSRC enable flag having a value of 1 may indicate that TSRC is not enabled, and a TSRC enable flag having a value of 0 may indicate that TSRC is enabled. In addition, for example, the TSRC enable flag may be signaled in the slice header syntax. The syntax element of the TSRC enable flag may be the above-mentioned sh_ts_residual_coding_disabled_flag.
[0432] In addition, for example, the decoding device may obtain a dependent quantization enable flag. The decoding device may obtain image information including a dependent quantization enable flag through a bitstream. The image information may include a dependent quantization enable flag. For example, the dependent quantization enable flag may be a flag for whether to enable dependent quantization. For example, the dependent quantization enable flag may indicate whether dependent quantization is enabled. That is, for example, the dependent quantization enable flag may indicate whether dependent quantization is enabled for a block of a picture in a sequence. For example, the dependent quantization enable flag may indicate whether there may be a dependent quantization use flag indicating whether dependent quantization is used for the current slice. For example, a dependent quantization enable flag having a value of 1 may indicate that dependent quantization is enabled, and a dependent quantization enable flag having a value of 0 may indicate that dependent quantization is not enabled. In addition, for example, the dependent quantization enable flag may be signaled in an SPS syntax or a slice header syntax. The syntax element of the dependent quantization enable flag may be the above-mentioned sps_dep_quant_enabled_flag. sps_dep_quant_enabled_flag may be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.
[0433] In addition, for example, the decoding device may obtain a transform skip enable flag. The decoding device may obtain image information including a transform skip enable flag through a bitstream. The image information may include a transform skip enable flag. Here, the current block may be a coding block (CB) or a transform block (TB). For example, the transform skip enable flag may be a flag for whether to enable transform skip. For example, the transform skip enable flag may indicate whether transform skip is enabled. That is, for example, the transform skip enable flag may indicate whether transform skip is enabled for a block of a picture in a sequence. For example, the transform skip enable flag may indicate whether a transform skip flag may exist. For example, a transform skip enable flag having a value of 1 may indicate that transform skip is enabled, and a transform skip enable flag having a value of 0 may indicate that transform skip is not enabled. That is, for example, a transform skip enable flag having a value of 1 may indicate that a transform skip flag may exist, and a transform skip enable flag having a value of 0 may indicate that a transform skip flag does not exist. In addition, for example, the transform skip enable flag may be signaled to a sequence parameter set (SPS) syntax. The syntax element of the transform skip enable flag may be the above-mentioned sps_transform_skip_enabled_flag.
[0434] In addition, for example, the TSRC enable flag may be obtained based on a symbol data hiding enable flag, a dependent quantization enable flag, and / or a transform skip enable flag. For example, the TSRC enable flag may be obtained based on a symbol data hiding enable flag having a value of 0, a dependent quantization enable flag having a value of 0, and a transform skip enable flag having a value of 1. That is, for example, when the value of the symbol data hiding enable flag is 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled), the value of the dependent quantization enable flag is 0 (i.e., the dependent quantization enable flag indicates that dependent quantization is not enabled), and the value of the transform skip enable flag is 1 (i.e., the transform skip enable flag indicates that transform skipping is enabled), the TSRC enable flag may be obtained (or signaled). In addition, for example, when the value of the dependent quantization enable flag is 1, the TSRC enable flag may not be obtained, and the value of the TSRC enable flag may be derived as 0. That is, for example, when the value of the dependent quantization enable flag is 1, the TSRC enable flag may not be signaled, and the value of the TSRC enable flag may be derived as 0. In addition, for example, when the value of the transform skip enable flag is 0, the TSRC enable flag may not be acquired, and the value of the TSRC enable flag may be derived as 0. That is, for example, when the value of the transform skip enable flag is 0, the TSRC enable flag may not be signaled, and the value of the TSRC enable flag may be derived as 0.
[0435] The decoding device acquires residual information of the current block based on the TSRC enable flag (S1020). The decoding device may acquire residual information of the current block based on the TSRC enable flag.
[0436] For example, the decoding device may determine the residual coding syntax of the current block based on the TSRC enable flag. For example, the decoding device may determine the residual coding syntax of the current block as one of a regular residual coding (RRC) syntax and a transform skip residual coding (TSRC) syntax based on the TSRC enable flag. The RRC syntax may represent a syntax according to the RRC, and the TSRC syntax may represent a syntax according to the TSRC.
[0437] For example, based on the TSRC enable flag having a value of 1, the residual coding syntax of the current block may be determined as a conventional residual coding (RRC) syntax. In this case, for example, a transform skip flag for whether to apply transform skip to the current block may be obtained based on a transform skip enable flag having a value of 1, and the value of the transform skip flag may be 1. For example, the image information may include a transform skip flag of the current block. The transform skip flag may indicate whether the current block is a transform skip block. That is, the transform skip flag may indicate whether a transform has been applied to the transform coefficients of the current block. The syntax element representing the transform skip flag may be transform_skip_flag as described above. For example, if the value of the transform skip flag is 1, the transform skip flag may indicate that a transform has not been applied to the current block (ie, a transform is skipped), and if the value of the transform skip flag is 0, the transform skip flag may indicate that a transform has been applied to the current block. For example, if the current block is a transform skip block, the value of the transform skip flag of the current block may be 1.
[0438] In addition, for example, based on the TSRC enable flag having a value of 0, the residual coding syntax of the current block can be determined as a transform skip residual coding (TSRC) syntax. In addition, for example, a transform skip flag for whether to apply transform skip to the current block can be obtained, and based on the transform skip flag having a value of 1 and the TSRC enable flag having a value of 0, the residual coding syntax of the current block can be determined as a transform skip residual coding (TSRC) syntax. In addition, for example, a transform skip flag for whether to apply transform skip to the current block can be obtained, and based on the transform skip flag having a value of 0 and the TSRC enable flag having a value of 0, the residual coding syntax of the current block can be determined as a regular residual coding (RRC) syntax.
[0439] Thereafter, for example, the decoding device may obtain residual information of the residual coding syntax determined for the current block. For example, residual information of a conventional residual coding (RRC) syntax may be obtained based on a TSRC enable flag having a value of 1, and residual information of a TSRC syntax may be obtained based on a TSRC enable flag having a value of 0. The image information may include the residual information.
[0440] For example, if the residual coding syntax of the current block is determined to be an RRC syntax, the decoding device may obtain residual information of the RRC syntax for the current block. For example, the residual information of the RRC syntax may include the syntax elements disclosed in Table 2 as described above.
[0441] For example, the residual information of the RRC syntax may include syntax elements of the transform coefficients of the current block. Here, the transform coefficients may be represented as residual coefficients.
[0442] For example, the syntax elements may include syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1]), abs_remainder, dec_abs_level, and / or coeff_sign_flag.
[0443] Specifically, for example, the syntax element may include position 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 position information indicating the position of the last non-zero transform coefficient in the scanning order of the current block. The position information may include information indicating a prefix of the column position of the last non-zero transform coefficient, information indicating a prefix of the row position of the last non-zero transform coefficient, information indicating a suffix of the column position of the last non-zero transform coefficient, and information indicating a suffix of the row position of the last non-zero transform coefficient. The syntax elements of the position information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. In addition, the non-zero transform coefficient may be referred to as a valid coefficient.
[0444] In addition, for example, the syntax element may include a coded sub-block flag indicating whether a current sub-block of the current block includes a non-zero transform coefficient, a significant coefficient flag indicating whether a transform coefficient of the current block is a non-zero transform coefficient, a first coefficient level flag for whether a coefficient level of the transform coefficient is greater than a first threshold, a parity level flag for parity of the coefficient level, and / or a second coefficient level flag for whether the coefficient level of the transform coefficient is greater than a second threshold. Here, the coded sub-block flag may be sb_coded_flag or coded_sub_block_flag, the significant coefficient flag may be sig_coeff_flag, the first coefficient level flag may be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag may be par_level_flag, and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
[0445] In addition, for example, the syntax element may include coefficient value related information of the transform coefficient value of the current block. The coefficient value related information may be abs_remainder and / or dec_abs_level.
[0446] In addition, for example, the syntax element may include a sign flag indicating the sign of the transform coefficient. The sign flag may be coeff_sign_flag.
[0447] In addition, for example, when symbol data hiding is applied to the current block, the symbol 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 symbol data hiding is applied to the current block, the syntax element may not include a symbol flag representing the symbol of the first valid transform coefficient. In addition, for example, whether symbol data hiding is applied to the current block can be derived based on the symbol data hiding enable flag and / or the position of the first valid transform coefficient and the position of the last valid transform coefficient of the current CG. For example, when the value of the symbol 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 (that is, when the value of the symbol data hiding enable flag is 1 and the number of valid transform coefficients in the current CG is greater than 3), symbol data hiding can be applied to the current CG of the current block.
[0448] In addition, for example, if the residual coding syntax of the current block is determined to be a TSRC syntax, the decoding device may obtain residual information of the TSRC syntax of the current block. For example, the residual information of the TSRC syntax may include the syntax elements disclosed in Table 3 as described above.
[0449] For example, the residual information of the TSRC syntax may include syntax elements of the transform coefficient of the current block. Here, the transform coefficient may be expressed as a residual coefficient.
[0450] For example, the syntax elements may include context coding syntax elements and / or bypass coding syntax elements for transform coefficients. The syntax elements may include syntax elements such as sig_coeff_flag, coeff_sign_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3] and / or abs_level_gtx_flag[n][4]), abs_remainder and / or coeff_sign_flag.
[0451] For example, the context coding syntax element of the transform coefficient may include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a sign flag indicating the sign of the transform coefficient, a first coefficient level flag for whether the coefficient level of the transform coefficient is greater than a first threshold, and / or a parity level flag for the parity of the transform level of the transform coefficient. In addition, for example, the context coding syntax element may include a second coefficient level flag for whether the coefficient level of the transform coefficient is greater than a second threshold, a third coefficient level flag for whether the coefficient level of the transform coefficient is greater than a third threshold, a fourth coefficient level flag for whether the coefficient level of the transform coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag for whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the significant coefficient flag may be sig_coeff_flag, the sign flag may be ceff_sign_flag, the first coefficient level flag may be abs_level_gt1_flag, and the parity level flag may be par_level_flag. In addition, the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag may be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag may be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag may be abs_level_gt9_flag or abs_level_gtx_flag.
[0452] In addition, for example, the bypass coding syntax element of the transform coefficient may include coefficient level information of the value of the transform coefficient (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.
[0453] The decoding apparatus derives residual samples of the current block based on the residual information (S1030). For example, the decoding apparatus may derive a transform coefficient of the current block based on the residual information, and may derive residual samples of the current block based on the transform coefficient.
[0454] For example, the decoding device may derive the transform coefficient of the current block based on the syntax element of the residual information. Thereafter, the decoding device may derive the residual sample of the current block based on the transform coefficient. As an example, if it is derived based on the transform skip flag that the transform is not applied to the current block, that is, if the value of the transform skip flag is 1, the decoding device may derive the transform coefficient as the residual sample of the current block. In addition, for example, if it is derived based on the transform skip flag that the transform is not applied to the current block, that is, if the value of the transform skip flag is 1, the decoding device may derive the residual sample of the current block by inverse quantizing the transform coefficient. In addition, for example, if it is derived based on the transform skip flag that the transform is applied to the current block, that is, if the value of the transform skip flag is 0, the decoding device may derive the residual sample of the current block by performing an inverse transform of the transform coefficient. In addition, for example, if it is derived based on the transform skip flag that the transform is applied to the current block, that is, if the value of the transform skip flag is 0, the decoding device may derive the residual sample of the current block by inverse quantizing the transform coefficient and performing an inverse transform on the inverse quantized transform coefficient.
[0455] In addition, in the case where dependent quantization is applied to the current block, the decoding device may derive the residual sample of the current block by performing dependent quantization processing on the transform coefficient. For example, in the case where dependent quantization is applied to the current block, the decoding device may update the state of dependent quantization (Qstate) based on the coefficient level of the transform coefficient just before the current transform coefficient in the scanning order, may derive the coefficient level of the current transform coefficient based on the syntax element of the current transform coefficient and the updated state, and may derive the residual sample by dequantizing the derived coefficient level. For example, the current transform coefficient may be dequantized based on the quantization parameter of the reconstruction level of the current transform coefficient in the scalar quantizer for the updated state. Here, the reconstruction level may be derived based on the syntax element of the current transform coefficient.
[0456] In addition, for example, when sign data hiding is applied to the current block, the sign of the first effective transform coefficient of the current CG in the current block can be derived based on the sum of the absolute values of the effective transform coefficients in the current CG. For example, when the sum of the absolute values of the effective transform coefficients is an even number, the sign of the first effective transform coefficient can be derived as a positive value, and when the sum of the absolute values of the effective transform coefficients is an odd number, the sign of the first effective transform coefficient can be derived as a negative value.
[0457] The decoding device generates a reconstructed picture based on the residual sample (S1040). For example, the decoding device may generate a reconstructed sample and / or a reconstructed picture of the current block based on the residual sample. For example, the decoding device may derive a prediction sample by performing an inter-frame prediction mode or an intra-frame prediction mode on the current block based on prediction information received through a bitstream, and may generate a reconstructed sample by adding the prediction sample to the residual sample.
[0458] Thereafter, if necessary, in order to enhance the subjective / objective picture quality, a loop filtering process such as a deblocking filter, SAO and / or ALF process may be applied to the reconstructed picture as described above.
[0459] Fig.11 A decoding device for performing an image decoding method according to the present disclosure is briefly illustrated. Fig.10 The method disclosed in can be Fig.11 Specifically, for example, Fig.11 The entropy decoder of the decoding device can perform Fig.10 S1000 to S1020, Fig.11 The residual processor of the decoding device can perform Fig.10 S1030 in the Fig.11 The decoder device's adder can perform Fig.10 In addition, although not illustrated, the process of receiving the prediction information of the current block may be performed by Fig.11 The entropy decoder of the decoding device is performed, and the process of deriving the prediction sample of the current block can be performed by Fig.11 The predictor of the decoding device is performed.
[0460] According to the present disclosure, residual coding efficiency can be enhanced.
[0461] In addition, according to the present disclosure, the TSRC enable flag can be signaled when symbol data hiding is not enabled by setting a signaling relationship between the symbol data hiding enable flag and the TSRC enable flag, and in this way, when the RRC syntax is encoded for the transform skip block because TSRC is not enabled, symbol data hiding is not used to improve coding efficiency, and the overall residual coding efficiency can be improved by reducing the amount of encoded bits.
[0462] In addition, according to the present disclosure, a signaling relationship between a dependent quantization enable flag and a TSRC enable flag can be established, and if dependent quantization is not enabled, the TSRC enable flag can be signaled, and by doing so, if TSRC is not enabled and then the RRC syntax is encoded for a transform skip block, dependent quantization will not be used, so that the coding efficiency can be improved, and the overall residual coding efficiency can be improved by reducing the amount of encoded bits.
[0463] In addition, according to the present disclosure, a signaling relationship between a transform skip enable flag and a TSRC enable flag may be established, and if transform skip is enabled, the TSRC enable flag may be signaled, and by doing so, the overall residual coding efficiency may be improved by reducing the amount of encoded bits.
[0464] In the above embodiments, the method is described based on a flow chart with a series of steps or boxes. The present disclosure is not limited to the order of the above steps or boxes. Some steps or boxes can be performed in an order different from other steps or boxes mentioned above or performed simultaneously. In addition, it will be understood by those skilled in the art that the steps shown in the flow chart are not exclusive, and other steps may also be included, or one or more steps in the flow chart may be deleted without affecting the scope of the present disclosure.
[0465] The embodiments described in this specification may be implemented on a processor, a microprocessor, a controller or a chip. For example, the functional units shown in each figure may be implemented on a computer, a processor, a microprocessor, a controller or a chip. In this case, information (e.g., information about instructions) or algorithms for implementation may be stored in a digital storage medium.
[0466] In addition, the decoding device and encoding device of the present disclosure can be included in the following devices: multimedia broadcast sending / receiving devices, mobile communication terminals, home theater video devices, digital theater video devices, surveillance cameras, video chat devices, real-time communication devices such as video communication, mobile streaming devices, storage media, portable 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, aircraft user devices, and ship user devices) and medical video devices; and the decoding device and encoding device of the present 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, smart phones, tablet computers, digital video recorders (DVRs), etc.
[0467] In addition, the processing method of the present invention can be generated in the form of a program executed by a computer, and can be stored in a computer-readable recording medium. The multimedia data with a data structure according to the present invention can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, BD, universal serial bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage device. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier wave (e.g., transmission via the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or transmitted via a wired / wireless communication network.
[0468] In addition, the embodiments of the present disclosure may be implemented using a computer program product according to a program code, and the program code may be executed in a computer through the embodiments of the present disclosure. The program code may be stored on a computer readable carrier.
[0469] Fig.12 A structural diagram of a content streaming system to which the present disclosure is applied is illustrated.
[0470] The content streaming system to which the embodiments of the present disclosure are applied may mainly include an encoding server, a streaming server, a network server, a media storage, a user device, and a multimedia input device.
[0471] The encoding server compresses the content input from a multimedia input device such as a smartphone, a camera, or a camcorder into digital data to generate a bitstream and sends the bitstream to the streaming server. As another example, when a multimedia input device such as a smartphone, a camera, or a camcorder directly generates a bitstream, the encoding server can be omitted.
[0472] A bitstream may be generated by the encoding method or the bitstream generating method to which the embodiments of the present disclosure are applied, and a streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0473] The streaming server sends multimedia data to the user device through the network server based on the user request, and the network server is used as a medium to notify the user of the service. When the user requests the required service from the network server, the network server delivers the request to the streaming server, and the streaming server sends the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the command / response between the devices within the content streaming system.
[0474] The streaming server can receive content from a media storage and / or encoding server. For example, when receiving content from an encoding server, the content can be received in real time. In this case, in order to provide a stable streaming service, the streaming server can store the bitstream for a predetermined period of time.
[0475] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigators, touch screen PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, and head mounted displays), digital TVs, desktop computers, and digital signage, etc. Each server within the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.
[0476] 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 as a device, and the technical features of the device claims of this disclosure can be combined to implement as a method. In addition, the technical features of the method claims of this disclosure and the technical features of the device claims can be combined to implement as a device, and the technical features of the method claims of this disclosure and the technical features of the device claims can be combined to implement as a method.
Claims
1. An image decoding method performed by a decoding device, the image decoding method comprising the following steps: Obtain a dependent quantization enable flag from a bitstream, wherein the dependent quantization enable flag equal to 1 indicates enabling dependent quantization, and the dependent quantization enable flag equal to 0 indicates disabling the dependent quantization; Obtain a transform skip residual coding TSRC disable flag based on the dependent quantization enable flag, wherein the TSRC disable flag equal to 1 indicates that residual coding syntax is used, and the TSRC disable flag equal to 0 indicates that TSRC syntax is used; obtaining residual information for the current block based on at least one of a transform skip flag for the current block or the TSRC disable flag, wherein the transform skip flag indicates whether to apply a transform to the current block; deriving residual samples of the current block based on the residual information; and Generate a reconstructed picture based on the residual samples, Wherein, based on the value of the dependent quantization enabling flag being equal to 0, the TSRC disabling flag is obtained from the bit stream.
2. The image decoding method according to claim 1, wherein: Based on the TSRC disable flag being equal to 1, the residual information for the current block is obtained from the residual coding syntax.
3. The image decoding method according to claim 1, wherein: Based on the transform skip flag indicating that the transform is not applied to the current block and the TSRC disable flag being equal to 0, the residual information for the current block is obtained from the TSRC syntax.
4. The image decoding method according to claim 3, wherein: The residual information of the TSRC syntax includes syntax elements for context coding of transform coefficients, and Among them, the context-encoded syntax elements include: a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a parity level flag for the parity of the coefficient level used for the transform coefficient, a sign flag indicating the sign used for the transform coefficient, a first coefficient level flag for whether the coefficient level is greater than a first threshold, and a second coefficient level flag for whether the coefficient level of the transform coefficient is greater than a second threshold.
5. An image encoding method performed by an encoding device, the image encoding method comprising the following steps: encoding a dependent quantization enable flag, wherein the dependent quantization enable flag equal to 1 indicates enabling dependent quantization, and the dependent quantization enable flag equal to 0 indicates disabling the dependent quantization; encoding a transform skip residual coding TSRC disable flag based on the dependent quantization enable flag, wherein the TSRC disable flag equal to 1 indicates that residual coding syntax is used, and the TSRC disable flag equal to 0 indicates that TSRC syntax is used; encoding residual information for a current block based on at least one of the TSRC disable flag or a transform skip flag, wherein the transform skip flag indicates whether a transform is applied to the current block; and generating a bitstream including the dependent quantization enabling flag, the TSRC disabling flag and the residual information, Wherein, based on the value of the dependent quantization enabling flag being equal to 0, the TSRC disabling flag is encoded into the bitstream.
6. A method for transmitting data for image information, the method comprising the steps of: encoding a dependent quantization enable flag, wherein the dependent quantization enable flag equal to 1 indicates enabling dependent quantization, and the dependent quantization enable flag equal to 0 indicates disabling the dependent quantization; encoding a transform skip residual coding TSRC disable flag based on the dependent quantization enable flag, wherein the TSRC disable flag equal to 1 indicates that residual coding syntax is used, and the TSRC disable flag equal to 0 indicates that TSRC syntax is used; encoding residual information for a current block based on at least one of the TSRC disable flag or a transform skip flag, wherein the transform skip flag indicates whether a transform is applied to the current block; generating a bitstream including the dependent quantization enabling flag, the TSRC disabling flag, and the residual information; and sending said data comprising said bit stream, Wherein, based on the value of the dependent quantization enabling flag being equal to 0, the TSRC disabling flag is encoded into the bitstream.