Image decoding method and apparatus therefor

By encoding TSRC flag information based on SDH flag information in the image coding system, symbol data hiding is prevented, the problem of high-resolution and high-quality image transmission and storage costs is solved, and the efficiency of image coding and residual coding is improved.

CN115462084BActive Publication Date: 2025-10-10LG ELECTRONICS INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202180030544.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-02-27
Filing Date
2021-02-25
Publication Date
2025-10-10
Estimated Expiration
2041-02-25

AI Technical Summary

Technical Problem

The transmission and storage costs of high-resolution and high-quality images are high, and it is necessary to improve the efficiency of image coding.

Method used

By encoding TSRC flag information based on SDH flag information in an image coding system, symbol data is prevented from hiding a transform skip block for which TSRC is not enabled, the amount of coding bits is reduced, and the residual coding efficiency is improved.

Benefits of technology

The efficiency of image coding and residual coding is improved, the amount of coding bits is reduced, and the transmission and storage costs are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115462084B_ABST
    Figure CN115462084B_ABST
Patent Text Reader

Abstract

According to a feature of the image decoding method performed by the decoding device according to the present document, the method comprises the steps of: obtaining image information; and generating a reconstructed picture based on the image information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to image coding technology, and more particularly, to a video decoding method and apparatus, in which, when residual data of a current block is encoded in an image coding system, flag information on whether to enable / disable TSRC is encoded based on flag information on whether SDH is enabled. Background Art

[0002] Recently, demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition), has been growing in various fields. Because image data has high resolution and high quality, the amount of information or bits to be transmitted has increased compared to conventional image data. Consequently, when image data is transmitted using media such as conventional wired / wireless broadband lines or stored using existing storage media, transmission and storage costs increase.

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

[0004] Technical issues

[0005] The present disclosure provides a method and apparatus for improving image coding efficiency.

[0006] The present disclosure also provides a method and apparatus for improving residual coding efficiency.

[0007] Technical Solution

[0008] According to an embodiment of this document, a method for image decoding performed by a decoding device is provided, wherein the method comprises the following steps: obtaining image information; and generating a reconstructed picture based on the image information.

[0009] According to another embodiment of the present invention, a decoding device for performing image decoding is provided, wherein the decoding device includes an entropy decoder configured to obtain image information and a residual processor configured to generate a reconstructed picture based on the image information.

[0010] According to another embodiment of the present document, a video encoding method performed by an encoding device is provided, wherein the method comprises the following steps: generating a reconstructed picture of a current slice; and encoding image information of the current slice.

[0011] According to another embodiment of the present invention, a video encoding device is provided, wherein the encoding device includes a residual processor configured to generate a reconstructed picture of a current slice and an entropy encoder configured to encode image information of the current slice.

[0012] According to another embodiment of the present invention, a computer-readable digital storage medium storing a bitstream including image information for causing a decoding device to perform an image decoding method is provided. The computer-readable digital storage medium includes the image decoding method comprising the steps of: obtaining image information; and generating a reconstructed picture based on the image information.

[0013] Beneficial effects

[0014] According to this document, the efficiency of residual coding can be improved.

[0015] According to this document, the TSRC enable flag can be signaled based on the symbol data hiding enable flag, and by this, the coding efficiency can be improved by preventing the symbol data hiding from being used for transform skip blocks for which TSRC is not enabled, and the overall residual coding efficiency can be improved by reducing the amount of bits to be encoded.

[0016] According to this document, the TSRC enable flag can be signaled based on the transform skip enable flag and the symbol data hiding enable flag, and by this, the coding efficiency can be improved by preventing symbol data hiding from being used for transform skip blocks for which TSRC is not enabled, and the overall residual coding efficiency can be improved by reducing the amount of bits to be encoded. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 An example of a video / image encoding device to which the embodiments of the present disclosure are applicable is briefly illustrated.

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

[0019] Figure 3 FIG. 1 is a schematic diagram illustrating a configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.

[0020] Figure 4 An example of a video / image encoding method based on intra-frame prediction is illustrated.

[0021] Figure 5 An example of a video / image decoding method based on intra-frame prediction is illustrated.

[0022] Figure 6 The intra prediction process is schematically illustrated.

[0023] Figure 7 An example of a video / image encoding method based on inter-frame prediction is illustrated.

[0024] Figure 8An example of a video / image decoding method based on inter-frame prediction is illustrated.

[0025] Figure 9 The inter-frame prediction process is schematically illustrated.

[0026] Figure 10 Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements is exemplified.

[0027] Figure 11 is a diagram illustrating exemplary transform coefficients within a 4×4 block.

[0028] Figure 12 An image encoding method performed by an encoding device according to the present disclosure is briefly illustrated.

[0029] Figure 13 An encoding device for performing an image encoding method according to the present disclosure is briefly illustrated.

[0030] Figure 14 An image decoding method performed by a decoding device according to the present disclosure is briefly illustrated.

[0031] Figure 15 A decoding device for performing an image decoding method according to the present disclosure is briefly illustrated.

[0032] Figure 16 A structural diagram of a content streaming system to which the present disclosure is applied is illustrated. DETAILED DESCRIPTION

[0033] 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. Singular expressions include plural expressions as long as they are 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.

[0034] In addition, for the purpose of conveniently illustrating different specific functions, the elements in the figures described in this 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.

[0035] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Also, like reference numerals are used throughout the drawings to designate like elements, and the same description will be omitted.

[0036] Figure 1 A brief example of a video / image encoding apparatus to which embodiments of the present disclosure can be applied is illustrated.

[0037] Referring to Figure 1 A video / image encoding system can include a first apparatus (a source apparatus) and a second apparatus (a sink apparatus). The source apparatus can transmit encoded video / image information or data in the form of a file or a stream to the sink apparatus via a digital storage medium or a network.

[0038] The source apparatus can include a video source, an encoding device, and a transmitter. The sink apparatus can include a receiver, a decoding device, and a Tenderer. The encoding device can be referred to as a video / image encoding device, and the decoding device can be referred to as a video / image decoding device. The transmitter can be included in the encoding device. The receiver can be included in the decoding device. The Tenderer can include a display, and the display can be configured as a separate apparatus or an external component.

[0039] The video source can acquire video / images through a process of capturing, synthesizing, or generating video / images. The video source can include a video / image capturing apparatus and / or a video / image generating apparatus. The video / image capturing apparatus can include, for example, one or more cameras, a video / image archive including previously captured video / images, or the like. The video / image generating apparatus can include, for example, a computer, a tablet, and a smartphone, and can (electronically) generate video / images. For example, a virtual video / image can be generated through a computer or the like. In this case, the video / image capturing process can be replaced by a process of generating related data.

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

[0041] The transmitter can transmit the encoded image / image information or data output in the form of a bitstream to the receiver of the sink apparatus in the form of a file or a stream through a digital storage medium or a network. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, or the like. The transmitter can include an element for generating a media file through a predetermined file format, and can include an element for transmission through a broadcasting / communication network. The receiver can receive / extract the bitstream and transmit the received bitstream to the decoding apparatus.

[0042] The decoding device may decode a video / image by performing a series of processes such as dequantization, inverse transformation, and prediction corresponding to the operations of the encoding device.

[0043] The renderer can render the decoded video / image, and the rendered video / image can be displayed on a display.

[0044] 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 (Essential Video Coding) standard, the AOMedia Video 1 (AV1) standard, the second-generation Audio Video Coding standard (AVS2), or next-generation video / image coding standards (e.g., H.267 or H.268, etc.).

[0045] The present disclosure proposes various embodiments of video / image encoding, and unless otherwise mentioned, these embodiments may be performed in combination with each other.

[0046] In the present disclosure, video may refer to a series of images over time. A picture generally refers to a unit that represents an image 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 consist of one or more sub-pictures / slices / tiles. A picture may consist 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 multiple bricks, each of which consists of one or more CTU rows within the tile. A tile that is not divided into multiple bricks may also be referred to as a brick. Brick scanning is a specific ordering of the CTUs of a divided picture as follows: sorting the CTUs by raster scanning of the CTUs in the bricks, continuously sorting the bricks within the tile by raster scanning of the bricks of the tile, and continuously sorting the tiles in the picture by raster scanning of the tiles of the picture. 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 the picture parameter set. A tile row is a rectangular area of ​​a CTU whose height is specified by a syntax element in the picture parameter set and whose width is equal to the picture width. Tile scanning is a specific sequential ordering of the CTUs of a partitioned picture in which the CTUs are sequentially ordered by a raster scan of the CTUs in the tiles and the tiles in the picture are sequentially ordered by a raster scan of the tiles of the picture. A slice comprises an integer number of tiles 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 tiles 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.

[0047] A pixel or a picture element (pel) may refer to the smallest unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luminance component, or only a pixel / pixel value of a chrominance component.

[0048] A unit may represent a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. A unit may include a luma block and two chroma (e.g., CB, CR) blocks. In some cases, terms such as unit and block or region may be used interchangeably. 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.

[0049] 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 of A, B, and C and any combination thereof".

[0050] A slash mark ( / ) 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".

[0051] In this specification, “at least one of A and B” may mean “only A”, “only B”, or “both A and B”. In addition, in this specification, the expression “at least one of A or B” or “at least one of A and / or B” may be interpreted as the same as “at least one of A and B”.

[0052] In addition, in this 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".

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

[0054] In this specification, technical features described individually in one drawing may be implemented individually or may be implemented simultaneously.

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

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

[0057] 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, a dequantizer 234 and an inverse transformer 235. The residual processor 230 may also include a subtractor 231. The adder 250 may be referred to as 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 components may also include the memory 270 as an internal / external component.

[0058] The image splitter 210 can split the input image (or picture or frame) input to the encoding device 200 into one or more processors. For example, the processor can be referred to as a coding unit (CU). In this case, the coding unit can be recursively split from the coding tree unit (CTU) or the largest coding unit (LCU) according to the quadtree binary tree ternary tree (QTBTTT) structure. For example, a coding unit can be split into multiple coding units of deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quadtree structure can be applied first, and then the binary tree structure and / or ternary structure can be applied. Alternatively, the binary tree structure can be applied first. The encoding process according to the present disclosure can be performed based on the final coding unit that is no longer split. In this case, the maximum coding unit can be used as the final coding unit based on coding efficiency according to image characteristics, or if necessary, the coding unit can be recursively split into coding units of deeper depth and the coding unit with the optimal size can be used as the final coding unit. Here, the encoding process may include prediction, transformation, and reconstruction processes, which will be described later. As another example, the processor may 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 final coding unit. The prediction unit may be a unit for sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

[0059] In some cases, the term "unit" may be used interchangeably with terms such as "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 pixel value, and may represent only the pixel / pixel value of the luma component or only the pixel / pixel value of the chroma component. A sample may be used as a term corresponding to a picture (or image) of pixels or picture elements.

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

[0061] 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 samples 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 non-directional mode can include, for example, a DC mode and a planar mode. Depending on the level of detail of the prediction direction, the directional mode can 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 can be used depending on the settings. The intra-frame predictor 222 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.

[0062] The inter predictor 221 can derive a prediction block of a current block based on a reference block (a reference sample array) specified by a motion vector on a reference picture. Here, to reduce the amount of motion information transmitted in the inter prediction mode, motion information can be predicted in units of a block, a sub-block, or a sample based on the correlation of the motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block can be the same or different. The temporal neighboring block can be referred to as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block can be referred to as a collocated picture (colPic). For example, the inter predictor 221 can configure a motion information candidate list based on the neighboring blocks and generate information indicating which candidate to use to derive the motion vector and / or the reference picture index of the current block. Inter prediction can be performed based on various prediction modes. For example, in the case of a skip mode and a merge mode, the inter predictor 221 can use the motion information of the neighboring blocks as the motion information of the current block. In the skip mode, unlike the merge mode, a residual signal can not be transmitted. In the case of a motion vector prediction (MVP) mode, a motion vector of a neighboring block can be used as a motion vector predictor, and a motion vector of the current block can be indicated by signaling a motion vector difference.

[0063] The predictor 220 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 one block, but also can simultaneously apply both intra prediction and inter prediction. This can be referred to as combined inter-intra prediction (CIIP). In addition, the predictor can predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode can be used for content image / video encoding of a game or the like, for example, screen content coding (SCC). The IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC can use at least one of the inter prediction techniques described in the disclosure. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, sample values within a picture can be signaled based on information about a palette table and a palette index.

[0064] 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 refers to a transform obtained from a graph when the relationship information between pixels is represented by a graph. CNT refers to a transform generated based on 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 other than square.

[0065] The quantizer 233 can quantize the transform coefficients and transmit them to the entropy encoder 240, and the entropy encoder 240 can encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients can be referred to as residual information. The quantizer 233 can rearrange the block-type quantized transform coefficients into a one-dimensional vector form based on a coefficient scan order, and generate information about the quantized transform coefficients based on the one-dimensional vector-form quantized transform coefficients. Information about the transform coefficients can be generated. The entropy encoder 240 can perform various encoding methods such as, for example, exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), and the like. The entropy encoder 240 can encode information (e.g., values of syntax elements, etc.) required for video / image reconstruction, together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in units of NAL (network abstraction layer). The video / image information can further 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 can further include general constraint information. In the disclosure, information and / or syntax elements transmitted / signaled from the encoding apparatus to the decoding apparatus can be included in the video / picture information. The video / picture information can be encoded through the above-described encoding process and included in the bitstream. The bitstream can be transmitted through a network, or can be stored in a digital storage medium. 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, SSD, etc. A transmitter (not shown) that transmits a signal output from the entropy encoder 240 and / or a storage unit (not shown) that stores the signal can be included as an internal / external element of the encoding apparatus 200, and alternatively, the transmitter can be included in the entropy encoder 240.

[0066] 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 transform to the quantized transform coefficients using the dequantizer 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 when 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 through filtering as described below.

[0067] Furthermore, during picture encoding and / or reconstruction, luma mapping and chroma scaling (LMCS) may be applied.

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

[0069] 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 apparatus, prediction mismatch between the encoding apparatus 200 and the decoding apparatus may be avoided, and encoding efficiency may be improved.

[0070] 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 spatially neighboring blocks or motion information of temporally neighboring blocks. 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.

[0071] Figure 3 FIG. 1 is a schematic diagram illustrating a configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.

[0072] Reference Figure 3 , the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter-frame predictor 332 and an intra-frame predictor 331. The residual processor 320 may include a dequantizer 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 processor). In addition, the memory 360 may include a decoded picture buffer (DPB) or may be composed of a digital storage medium. The hardware components may also include the memory 360 as an internal / external component.

[0073] When a bit stream including video / image information is input, the decoding device 300 can be used with Figure 2 The image is reconstructed accordingly 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 divided from the coding tree unit or the maximum coding unit according to the quadtree structure, the binary tree structure and / or the 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.

[0074] The decoding device 300 can receive the data in the form of a bit stream from Figure 2The signal output by the encoding device of the encoding device can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information required for image reconstruction (or picture reconstruction) (for example, video / image information). 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 can be decoded through 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 syntax elements required for image reconstruction and 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 coefficient and related parameter information) on 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 a dequantizer 321, an inverse transformer 322, an adder 340, a filter 350, a memory 360, an inter-frame predictor 332, and an intra-frame predictor 331.

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

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

[0077] 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 the information on prediction output from the entropy decoder 310, and may determine a specific intra / inter prediction mode.

[0078] The predictor 330 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 and intra combined prediction (CIIP). In addition, the predictor can predict the block based on the intra block copy (IBC) prediction mode or palette mode. The IBC prediction mode or palette mode can be used for content image / video coding of games, etc., for example, screen content coding (SCC). IBC basically performs prediction in the current picture, but can be performed similarly 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.

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

[0080] The inter-frame predictor 332 can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector in a reference picture. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can 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 information on the inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks 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 the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter-frame prediction can be performed based on various prediction modes, and the prediction information may include information indicating the inter-frame prediction mode for the current block.

[0081] 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 skip mode is applied), the prediction block can be used as the reconstructed block.

[0082] The adder 340 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra-frame 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-frame prediction of the next picture.

[0083] In addition, luma mapping and chroma scaling (LMCS) can be applied during picture decoding.

[0084] 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 image by applying various filtering methods to the reconstructed image, and store the modified reconstructed image 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.

[0085] 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 spatially neighboring block or the motion information of the temporally 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.

[0086] 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 applied to correspond to the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300, respectively. The same contents can also be applied to the inter-frame predictor 332 and the intra-frame predictor 331.

[0087] 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, for uniformity of expression, may still be referred to as a transform coefficient.

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

[0089] In addition, as described above, when performing video encoding, prediction is performed to improve compression efficiency. In this way, a prediction block including prediction samples for the current block can be generated as a block to be encoded (i.e., an encoding target block). Here, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block is derived in the same manner in the encoding device and the decoding device, and the encoding device can signal information about the residual between the original block and the prediction block (residual information) instead of the original sample value of the original block to the decoding device, thereby improving image coding efficiency. The decoding device can derive a residual block including residual samples based on the residual information, add the residual block and the prediction block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.

[0090] Residual information can be generated through a transformation and quantization process. For example, the encoding device can derive a residual block between the original block and the prediction block, can perform a transformation process on the residual samples (residual sample array) included in the residual block to derive a transform coefficient, can perform a quantization process on the transform coefficient to derive a quantized transform coefficient, and can signal the relevant residual information (through a bitstream) to the decoding device. Here, the residual information may include value information, position information, transform technology, transform kernel, and quantization parameter value information of the quantized transform coefficient. The decoding device can perform a dequantization / inverse transform process based on the residual information and derive residual samples (or residual blocks). The decoding device can generate a reconstructed picture based on the prediction block and the residual block. In addition, for reference for inter-frame prediction of a reference picture later, the encoding device can dequantize / inverse transform the quantized transform coefficient to derive a residual block, and generate a reconstructed picture based on this.

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

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

[0093] When deriving neighboring reference samples, (i) the prediction sample can be derived based on the average or interpolation of the neighboring reference samples of the current block, or (ii) the prediction sample can be derived based on reference samples that exist in a specific (prediction) direction relative to the prediction sample among the neighboring reference samples of the current block. Case (i) can be called a non-directional mode or a non-angular mode, while case (ii) can be called a directional mode or an angular mode.

[0094] In addition, the prediction samples can be generated by interpolating the first neighboring samples located in the prediction direction of the intra prediction mode of the current block and the second neighboring samples located in the direction opposite to the prediction direction among the neighboring reference samples based on the prediction samples of the current block. The above situation can be called linear interpolation intra prediction (LIP). In addition, the chroma prediction samples can be generated based on the luma samples using a linear model (LM). This situation can be called LM mode or chroma component LM (CCLM) mode.

[0095] In addition, the temporary prediction sample of the current block is derived based on the filtered neighboring reference samples, and the prediction sample of the current block can also be derived by weighted summing at least one reference sample derived from the intra prediction mode among the existing neighboring reference samples (i.e., the unfiltered neighboring reference samples) and the temporary prediction sample. The above situation can be called position-dependent intra prediction (PDPC).

[0096] In addition, a reference sample row with the highest prediction accuracy is selected from multiple reference sample rows adjacent to the current block, and the prediction sample is derived using the reference sample in the prediction direction located in the selected row. In this case, intra-frame prediction coding can be performed by indicating (signaling) the reference sample row to be used to the decoding device. The above situation can be called multi-reference row intra-frame prediction or MRL-based intra-frame prediction.

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

[0098] The above-mentioned intra-frame prediction method may be referred to as an intra-frame prediction type to distinguish it from an intra-frame prediction mode. The intra-frame prediction type may be referred to by various terms such as intra-frame prediction technology or additional intra-frame prediction mode. For example, the intra-frame prediction type (or additional intra-frame prediction mode, etc.) may include at least one of the above-mentioned LIP, PDPC, MRL and ISP. A general intra-frame prediction method that excludes specific intra-frame prediction types such as LIP, PDPC, MRL and ISP may be referred to as a normal intra-frame prediction type. When the above-mentioned specific intra-frame prediction type is not applied, the normal intra-frame prediction type may generally be applied, and prediction may be performed based on the above-mentioned intra-frame prediction mode. In addition, if necessary, post-processing filtering may be performed on the derived prediction samples.

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

[0100] Figure 4 An example of a video / image encoding method based on intra-frame prediction is illustrated.

[0101] Reference Figure 4 , the encoding device performs intra prediction on the current block S400. The encoding device derives the intra prediction mode / type of the current block, derives the neighboring reference samples of the current block, and generates prediction samples in the current block based on the intra prediction mode / type and the neighboring reference samples. Here, the intra prediction mode / type determination, neighboring reference sample derivation and prediction sample generation processes can be performed simultaneously, or one process can be performed first and then the other process. The encoding device can determine the mode / type applied to the current block from a plurality of intra prediction modes / types. The encoding device can compare the RD costs of the intra prediction modes / types and determine the optimal intra prediction mode / type for the current block.

[0102] In addition, the encoding device may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post-filtering. The prediction sample filtering process may filter some or all of the prediction samples. In some cases, the prediction sample filtering process may be omitted.

[0103] The encoding apparatus generates residual samples of the current block based on the (filtered) prediction samples S410. The encoding apparatus may compare the prediction samples with the original samples of the current block based on phases and derive the residual samples.

[0104] The encoding apparatus can encode image information including information on intra prediction (prediction information) and residual information on residual samples S420. The prediction information can include intra prediction mode information and intra prediction type information. The encoding apparatus can output the encoded image information in the form of a bitstream. The output bitstream can be transmitted to a decoding apparatus through a storage medium or a network.

[0105] The residual information can include residual coding syntax, which will be described later. The encoding apparatus can transform / quantize the residual samples to derive quantized transform coefficients. The residual information can include information on the quantized transform coefficients.

[0106] Further, as described above, the encoding apparatus can generate a reconstructed picture including reconstructed samples and reconstructed blocks. To this end, the encoding apparatus can derive (modified) residual samples by performing inverse quantization / inverse transform on the quantized transform coefficients again. The reason for performing inverse quantization / inverse transform again on the transformed / quantized residual samples in this way is to derive the same residual samples as those derived in the decoding apparatus as described above. The encoding apparatus can generate a reconstructed block including reconstructed samples of the current block based on the prediction samples and the (modified) residual samples. A reconstructed picture of the current picture can be generated based on the reconstructed blocks. As described above, an in-loop filtering process can be further applied to the reconstructed picture.

[0107] Figure 5 An example of a video / image decoding method based on intra prediction is illustrated.

[0108] The decoding apparatus can perform operations corresponding to those performed by the encoding apparatus.

[0109] The prediction information and the residual information can be obtained from the bitstream. The residual samples of the current block can be derived based on the residual information. Specifically, the transform coefficients can be derived by performing inverse quantization based on the quantized transform coefficients derived from the residual information, and the residual samples of the current block can be derived by performing inverse transform on the transform coefficients.

[0110] Specifically, the decoding apparatus can derive an intra prediction mode / type of the current block based on the received prediction information (intra prediction mode / type information) S500. The decoding apparatus can derive neighboring reference samples of the current block S510. The decoding apparatus generates prediction samples in the current block based on the intra prediction mode / type and the neighboring reference samples S520. In this case, the decoding apparatus can perform a prediction sample filtering process. The prediction sample filtering can be referred to as post-filtering. The prediction sample filtering process can filter part or all of the prediction samples. In some cases, the prediction sample filtering process can be omitted.

[0111] The decoding apparatus generates residual samples of the current block based on the received residual information (S530). The decoding apparatus may generate reconstructed samples of the current block based on the predicted samples and the residual samples, and may derive a reconstructed block including the reconstructed samples (S540). A reconstructed picture of the current picture may be generated based on the reconstructed block. As described above, the in-loop filtering process may be further applied to the reconstructed picture.

[0112] The intra-frame prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether MPM (most probable mode) is applied to the current block or whether the residual mode is applied, and when MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra-frame prediction mode candidates (MPM candidates). The intra-frame prediction mode candidates (MPM candidates) may be composed of an MPM candidate list or an MPM list. In addition, when MPM is not applied to the current block, the intra-frame prediction mode information includes residual mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra-frame prediction modes other than the intra-frame prediction mode candidates (MPM candidates). The decoding device may determine the intra-frame prediction mode of the current block based on the intra-frame prediction mode information.

[0113] In addition, the intra-frame prediction type information can be implemented in various forms. For example, the intra-frame prediction type information may include intra-frame prediction type index information indicating one of the intra-frame prediction types. As another example, the intra-frame prediction type information may include at least one of the following items: reference sample row information (e.g., intra_luma_ref_idx), which indicates whether MRL is applied to the current block, and if applied, which reference sample row is used; ISP flag information (e.g., intrant_subpartitions_mode_flag), which indicates whether ISP is applied to the current block; ISP type information (e.g., intra_subpartitions_split_flag), which indicates the split type of the sub-partition when applying ISP; flag information indicating whether PDPC is applied or flag information indicating whether LIP is applied. In addition, the intra-frame prediction type information may include a MIP flag, which indicates whether matrix-based intra-frame prediction (MIP) is applied to the current block.

[0114] The intra-frame prediction mode information and / or the intra-frame prediction type information may be encoded / decoded by the encoding method described in the present disclosure. For example, the intra-frame prediction mode information and / or the intra-frame prediction type information may be encoded / decoded by entropy coding (e.g., CABAC, CAVLC).

[0115] Figure 6 The intra prediction process is schematically illustrated.

[0116] Reference Figure 6 As described above, the intra-frame prediction process may include the steps of determining an intra-frame prediction mode / type, deriving neighboring reference samples, and performing intra-frame prediction (generating prediction samples). The intra-frame prediction process may be performed by an encoding device and a decoding device as described above. In the present disclosure, an encoding device may include an encoding device and / or a decoding device.

[0117] Reference Figure 6 , the encoding apparatus determines the intra prediction mode / type S600.

[0118] The encoding device may determine the intra-frame prediction mode / type applied to the current block from among the various intra-frame prediction modes / types described above, and may generate prediction-related information. The prediction-related information may include intra-frame prediction mode information indicating the intra-frame prediction mode applied to the current block and / or intra-frame prediction type information indicating the intra-frame prediction type applied to the current block. The decoding device may determine the intra-frame prediction mode / type applied to the current block based on the prediction-related information.

[0119] The intra-frame prediction mode information may, for example, include flag information (e.g., intra_luma_mpm_flag) indicating whether the most probable mode (MPM) is applied to the current block or whether the residual mode is applied, and when the MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra-frame prediction mode candidates (MPM candidates). The intra-frame prediction mode candidates (MPM candidates) may be composed of an MPM candidate list or an MPM list. In addition, when the MPM is not applied to the current block, the intra-frame prediction mode information may further include residual mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra-frame prediction modes other than the intra-frame prediction mode candidates (MPM candidates). The decoding device may determine the intra-frame prediction mode of the current block based on the intra-frame prediction mode information.

[0120] In addition, the intra-frame prediction type information can be implemented in various forms. For example, the intra-frame prediction type information may include intra-frame prediction type index information indicating one of the intra-frame prediction types. As another example, the intra-frame prediction type information may include at least one of the following items: reference sample row information (e.g., intra_luma_ref_idx), which indicates whether MRL is applied to the current block, and if applied, which reference sample row is used; ISP flag information (e.g., intrant_subpartitions_mode_flag), which indicates whether ISP is applied to the current block; ISP type information (e.g., intra_subpartitions_split_flag), which indicates the split type of the sub-partition when applying ISP; flag information indicating whether PDPC is applied or flag information indicating whether LIP is applied. In addition, the intra-frame prediction type information may include a MIP flag, which indicates whether matrix-based intra-frame prediction (MIP) is applied to the current block.

[0121] For example, when intra prediction is applied, the intra prediction mode of the neighboring blocks can be used to determine the intra prediction mode applied to the current block. For example, the encoding device can select one of the most probable mode (MPM) candidates in the MPM list derived based on the intra prediction mode of the neighboring blocks (e.g., the left neighboring block and / or the upper neighboring block) of the current block and / or the additional candidate mode, or select one of the remaining intra prediction modes (and planar modes) not included in the MPM candidates based on the MPM residual information (remaining intra prediction mode information). The MPM list can be configured to include or exclude planar mode as a candidate. For example, when the MPM list includes planar mode as a candidate, the MPM list can have 6 candidates, and when the MPM list does not include planar mode as a candidate, the MPM list can have 5 candidates. When the MPM list does not include planar mode as a candidate, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not a planar mode can be signaled. For example, the MPM flag may be signaled first, and when the value of the MPM flag is 1, the MPM index and the non-planar flag may be signaled. Furthermore, when the value of the non-planar flag is 1, the MPM index may be signaled. Here, the fact that the MPM list is configured to exclude the planar mode as a candidate is that the planar mode is always considered to be an MPM, not that the planar mode is not an MPM, and therefore, the flag (not planar flag) is signaled first to check whether it is the planar mode.

[0122] For example, it can be indicated based on an MPM flag (e.g., intra_luma_mpm_flag) whether the intra prediction mode applied to the current block is in the MPM candidate (and planar mode) or in the remaining mode. An MPM flag with a value of 1 can indicate that the intra prediction mode of the current block is within the MPM candidate (and planar mode), and an MPM flag with a value of 0 can indicate that the intra prediction mode of the current block is not within the MPM candidate (and planar mode). A non-planar flag with a value of 0 (e.g., intra_luma_not_planar_flag) can indicate that the intra prediction mode of the current block is planar mode, and a non-planar flag with a value of 1 can indicate that the intra prediction mode of the current block is not planar mode. The MPM index can be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information can be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information may indicate one of the remaining intra prediction modes that is not included in the MPM candidates (and planar mode) among all intra prediction modes by indexing in the order of prediction mode numbers. The intra prediction mode may be an intra prediction mode for a luma component (sample). Hereinafter, the intra prediction mode information may include at least one of an MPM flag (e.g., intra_luma_mpm_flag), a non-planar flag (e.g., intra_luma_not_planar_flag), an MPM index (e.g., mpm_idx or intra_luma_mpm_idx), or remaining intra prediction mode information (rem_intra_luma_luma_mpm_mode or intra_luma_mpminder). In the present disclosure, the MPM list may be referred to by various terms such as MPM candidate list and candModeList.

[0123] When a MIP is applied to the current block, a separate mpm flag (e.g., intra_mip_mpm_flag), an mpm index (e.g., intra_mip_mpm_idx), and remaining intra prediction mode information (e.g., intra_mip_mpm_remainder) of the MIP may be signaled, while a non-plane flag may not be signaled.

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

[0125] The encoding device may construct a most probable mode (MPM) list for the current block. The MPM list may be referred to as an MPM candidate list. Here, MPM may refer to a mode for improving encoding efficiency by taking into account the similarity between the current block and the neighboring blocks during intra-frame prediction mode encoding. As described above, the MPM list may be constructed to include the planar mode, or may be constructed to exclude the planar mode. For example, when the MPM list includes the planar mode, the number of candidates in the MPM list may be 6. And, when the MPM list does not include the planar mode, the number of candidates in the MPM list may be 5.

[0126] The encoding device can perform prediction based on various intra prediction modes, and can determine the optimal intra prediction mode based on rate-distortion optimization (RDO) based on this. In this case, the encoding device can determine the optimal intra prediction mode by using only the MPM candidates and planar mode configured in the MPM list or by further using the remaining intra prediction modes and the MPM candidates and planar mode configured in the MPM list. Specifically, for example, if the intra prediction type of the current block is a specific type other than the normal intra prediction mode (for example, LIP, MRL or ISP), the encoding device can determine the optimal intra prediction mode by considering only the MPM candidates and planar mode as the prediction mode candidates for the current block. That is, in this case, the intra prediction mode of the current block can be determined only from the MPM candidates and planar mode, and in this case, encoding / signaling of the mpm flag may not be performed. In this case, the decoding device can infer that the mpm flag is 1 without separately signaling the mpm flag signal.

[0127] Furthermore, typically, when the intra prediction mode of the current block is not a planar mode and is one of the MPM candidates in the MPM list, the encoding apparatus generates an mpm index (mpm idx) indicating one of the MPM candidates. When the intra prediction mode of the current block is not included in the MPM list, the encoding apparatus generates MPM residual information (remaining intra prediction mode information) indicating the same mode as the intra prediction mode of the current block among the remaining intra prediction modes not included in the MPM list (and the planar model). For example, the MPM residual information may include an intra_luma_mpm_remainder syntax element.

[0128] The decoding apparatus obtains intra prediction mode information from the bitstream. As described above, the intra prediction mode information can include at least one of an MPM flag, a non-planar flag, an MPM index, and MPM residual information (residual intra prediction mode information). The decoding apparatus can construct an MPM list. The MPM list is constructed to be the same as the MPM list constructed in the encoding apparatus. That is, the MPM list can include intra prediction modes of neighboring blocks, or can further include a specific intra prediction mode according to a predetermined method.

[0129] The decoding apparatus can determine an intra prediction mode of the current block based on the MPM list and the intra prediction mode information. For example, when a value of the MPM flag is 1, the decoding apparatus can derive a planar mode as the intra prediction mode of the current block (based on the non-planar flag), or derive a candidate indicated by the MPM index among MPM candidates in the MPM list as the intra prediction mode of the current block. Here, the MPM candidates can mean only candidates included in the MPM list, or can include not only the candidates included in the MPM list but also the planar mode applicable when the value of the MPM flag is 1.

[0130] As another example, when a value of the MPM flag is 0, the decoding apparatus can derive an intra prediction mode indicated by the residual intra prediction mode information (which can be referred to as mpm residual information) among residual intra prediction modes not included in the MPM list and the planar mode as the intra prediction mode of the current block. Further, as another example, when an intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP, etc.), the decoding apparatus can derive the planar mode or the candidate indicated by the MPM flag in the MPM list as the intra prediction mode of the current block without parsing / decoding / checking the MPM flag.

[0131] The encoding apparatus derives neighboring reference samples of the current block S610. When intra prediction is applied to the current block, the neighboring reference samples to be used for the intra prediction of the current block can be derived. The neighboring reference samples of the current block can include samples neighboring a left boundary of the current block having a size of nWx nH and a total of 2x nH samples neighboring a lower left of the current block, samples neighboring an upper boundary of the current block and a total of 2x nW samples neighboring an upper right of the current block, and samples neighboring an upper left of the current block. Alternatively, the neighboring reference samples of the current block can include a plurality of columns of upper neighboring samples and a plurality of rows of left neighboring samples. In addition, the neighboring reference samples of the current block can include a total of nH samples neighboring a right boundary of the current block having a size of nWx nH, a total of nW samples neighboring a lower boundary of the current block, and samples neighboring a lower right of the current block.

[0132] On the other hand, when MRL is applied (i.e., when the value of the MRL index is greater than 0), the neighboring reference samples can be located in rows 1 to 2 instead of row 0 adjacent to the current block on the left / top. In this case, the number of neighboring reference samples may be further increased. In addition, when ISP is applied, the neighboring reference samples can be derived in units of sub-partitions.

[0133] The encoding apparatus derives prediction samples by performing intra prediction on the current block (S620). The encoding apparatus may derive the prediction samples based on the intra prediction mode / type and neighboring samples. The encoding apparatus may derive reference samples from neighboring reference samples of the current block according to the intra prediction mode of the current block, and may derive the prediction samples of the current block based on the reference samples.

[0134] Furthermore, when inter-frame prediction is applied, the predictor of the encoding / decoding device can derive prediction samples by performing inter-frame prediction on a block-by-block basis. When performing prediction on the current block, inter-frame prediction can be applied. That is, the predictor of the encoding / decoding device (more specifically, the inter-frame predictor) can derive prediction samples by performing inter-frame prediction on a block-by-block basis. Inter-frame prediction can refer to a prediction derived using a method that depends on data elements (e.g., sample values ​​or motion information) of a picture other than the current picture. When inter-frame prediction is applied to the current block, the prediction block (prediction sample array) of the current block can be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, the motion information of the current block can be predicted on a block, sub-block, or sample basis based on the correlation of motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can also include information on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). When inter-frame prediction is applied, neighboring blocks may include spatially neighboring blocks in the current picture and temporally neighboring blocks in the reference picture. The reference picture comprising the reference block and the reference picture comprising the temporally neighboring block may be the same or different. The temporally neighboring block may be referred to as a collocated reference block, collocated CU (colCU), etc., and the reference picture comprising the temporally neighboring block may be referred to as a collocated picture (colPic). For example, a motion information candidate list may be configured based on the neighboring blocks of the current block, and a flag or index information indicating which candidate is selected (used) for deriving the motion vector and / or reference picture index of the current block may be signaled. Inter-frame prediction can be performed based on various prediction modes. For example, in skip mode and merge mode, the motion information of the current block may be the same as that of the selected neighboring block. In skip mode, a residual signal may not be transmitted as in merge mode. In motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and the motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.

[0135] Depending on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), the motion information may further include L0 motion information and / or L1 motion information. The L0 direction motion vector may be referred to as the L0 motion vector or MVL0, and the L1 direction motion vector may be referred to as the L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as L0 prediction, prediction based on the L1 motion vector may be referred to as L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be referred to as bi-prediction. Here, the L0 motion vector may indicate a motion vector associated with the reference picture list L0, and the L1 motion vector may indicate a motion vector associated with the reference picture list L1. The reference picture list L0 may include pictures that precede the current picture in output order, and the reference picture list L1 may include pictures that follow the current picture in output order as reference pictures. The previous picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. The reference picture list L0 may further include pictures that follow the current picture in output order as reference pictures. In this case, the previous picture in the reference picture list L0 may be indexed first, and then the subsequent picture may be indexed. The reference picture list L1 may further include pictures preceding the current picture in the output order as reference pictures. In this case, the subsequent picture in the reference picture list L1 may be indexed first, and then the previous picture may be indexed. Here, the output order may correspond to the picture order count (POC) order.

[0136] The video / image encoding process based on inter-frame prediction may schematically include, for example, the following contents.

[0137] Figure 7 An example of a video / image encoding method based on inter-frame prediction is illustrated.

[0138] The encoding device performs inter-frame prediction on the current block (S700). The encoding device may derive an inter-frame prediction mode and motion information for the current block, and generate prediction samples for the current block. Here, the inter-frame prediction mode determination process, the motion information derivation process, and the prediction sample generation process may be performed simultaneously, and any one process may be performed earlier than the other. For example, the inter-frame prediction unit of the encoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit may determine a prediction mode for the current block, the motion information derivation unit may derive motion information for the current block, and the prediction sample derivation unit may derive prediction samples for the current block. For example, the inter-frame prediction unit of the encoding device may search for a block similar to the current block in a predetermined area (search area) of a reference picture through motion estimation, and derive a reference block having a minimum difference with the current block or equal to or less than a predetermined criterion. Based on this derivation, a reference picture index of the reference picture in which the reference block is located may be indicated, and a motion vector may be derived based on the position difference between the reference block and the current block. The encoding device may determine a mode to apply to the current block from among various prediction modes. The encoding apparatus may compare RD costs of various prediction modes and determine an optimal prediction mode for the current block.

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

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

[0141] The encoding apparatus may induce residual samples based on the prediction samples (S710). The encoding apparatus may induce residual samples by comparing original samples and prediction samples of the current block.

[0142] The encoding device encodes the image information including prediction information and residual information (S720). The encoding device can output the encoded image information in the form of a bitstream. The prediction information may include information about prediction mode information (e.g., a skip flag, a merge flag, or a mode index, etc.) and information about motion information as information related to the prediction process. The information about the motion information may include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index), which is information for deriving a motion vector. In addition, the information about the motion information may include information about MVD and / or reference picture index information. In addition, the information about the motion information may include information indicating whether L0 prediction, L1 prediction, or dual prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficients used for the residual sample.

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

[0144] In addition, as described above, the encoding device can generate a reconstructed picture (including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples. This is to derive the same prediction result as the prediction result performed by the decoding device, and as a result, the encoding efficiency can be improved. Therefore, the encoding device can store the reconstructed picture (or reconstructed sample or reconstructed block) in a memory and use the reconstructed picture as a reference picture. As described above, the in-loop filtering process can be further applied to the reconstructed picture.

[0145] The video / image decoding process based on inter-frame prediction may schematically include, for example, the following.

[0146] Figure 8 An example of a video / image decoding method based on inter-frame prediction is illustrated.

[0147] Reference Figure 8 , the decoding device may perform an operation corresponding to the operation performed by the encoding device. The decoding device may perform prediction on the current block based on the received prediction information and derive a prediction sample.

[0148] Specifically, the decoding apparatus may determine a prediction mode of the current block based on the received prediction information (S800).The decoding apparatus may determine which inter prediction mode to apply to the current block based on prediction mode information in the prediction information.

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

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

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

[0152] In addition, as described below, the motion information of the current block can be derived without the candidate list configuration, and in this case, the motion information of the current block can be derived according to the process disclosed in the prediction mode. In this case, the candidate list configuration can be omitted.

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

[0154] For example, an inter prediction unit of a decoding device can include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit, and the prediction mode determination unit can determine a prediction mode for a current block based on received prediction mode information, the motion information derivation unit can derive motion information (motion vector and / or reference picture index) for the current block based on information about received motion information, and the prediction sample derivation unit can derive prediction samples for the current block.

[0155] The decoding device generates residual samples for the current block based on the received residual information (S830). The decoding device can generate reconstructed samples for the current block based on the prediction samples and the residual samples, and generate a reconstructed picture based on the generated reconstructed samples (S840). Thereafter, in-loop filtering processes can be further applied to the reconstructed picture as described above.

[0156] Figure 9 An inter prediction process is schematically illustrated.

[0157] Reference Figure 9 As described above, an inter prediction process can include an inter prediction mode determination step, a motion information derivation step according to the determined prediction mode, and a prediction processing (prediction sample generation) step based on the derived motion information. The inter prediction process can be performed by an encoding device and a decoding device as described above. In this document, an encoding device can include an encoding device and / or a decoding device.

[0158] Reference Figure 9 The encoding device determines an inter prediction mode for a current block (S900). Various inter prediction modes can be used for prediction of the current block in a picture. For example, various modes such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, subblock merge mode, merge with MVD (MMVD) mode, and history motion vector prediction (HMVP) mode can be used. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bi-prediction with CU-level weights (BCW), and bi-directional optical flow (BDOF) etc. can be further used as additional modes. The affine mode can also be referred to as affine motion prediction mode. The MVP mode can also be referred to as advanced motion vector prediction (AMVP) mode. In this document, some modes and / or motion information candidates derived by some modes can also be included in one of motion information related candidates in other modes. For example, a HMVP candidate can be added to merge candidates of merge / skip mode, or to mvp candidates of MVP mode. If the HMVP candidate is used as a motion information candidate of the merge mode or the skip mode, the HMVP candidate can be referred to as a HMVP merge candidate.

[0159] Prediction mode information indicating an inter prediction mode of the current block can be signaled from the encoding device to the decoding device. In this case, the prediction mode information can be included in the bitstream and received by the decoding device. The prediction mode information can include index information indicating one of a plurality of candidate modes. Alternatively, the inter prediction mode can be indicated by hierarchical signaling of flag information. In this case, the prediction mode information can include one or more flags. For example, whether to apply a skip mode can be indicated by signaling a skip flag, when the skip mode is not applied, whether to apply a merge mode can be indicated by signaling a merge flag, and when the merge mode is not applied, an indication to apply a MVP mode or a flag for additional distinction can be further signaled. An affine mode can be signaled as an independent mode, or as a dependent mode with respect to the merge mode or the MVP mode. For example, the affine mode can include an affine merge mode and an affine MVP mode.

[0160] The encoding device derives motion information for the current block (S910). The motion information derivation can be based on the inter prediction mode.

[0161] The encoding device can perform inter prediction using the motion information of the current block. The encoding device can derive the optimal motion information for the current block through a motion estimation process. For example, the encoding device can search for a similar reference block having high correlation in a predetermined search range in a reference picture by using an original block in an original picture for the current block, in fractional pixel units, and derive the motion information through the searched reference block. The similarity of the blocks can be derived according to a difference in phase-based sample values. For example, the similarity of the blocks can be calculated based on a sum of absolute differences (SAD) between the current block (or a template of the current block) and the reference block (or a template of the reference block). In this case, the motion information can be derived based on the reference block having the smallest SAD in the search area. The derived motion information can be signaled to the decoding device according to various methods based on the inter prediction mode.

[0162] The encoding device performs inter prediction based on the motion information for the current block (S920). The encoding device can derive prediction sample(s) for the current block based on the motion information. The current block including the prediction samples can be referred to as a prediction block.

[0163] In addition, 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 information in the bitstream based on the encoding method such as exponential Golomb, 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.

[0164] For example, the above encoding method may be performed as follows.

[0165] Figure 10 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 (i.e., 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. The bin for a syntax element may indicate the value of the syntax element.

[0166] Thereafter, the binarized bins of the syntax elements may be input to a conventional encoding engine or a bypass encoding engine. The conventional encoding engine of the encoding 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 encoding engine of the encoding 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.

[0167] In addition, when the binarized bins of the syntax elements are input to the bypass coding engine, they can be coded as follows. For example, the bypass coding engine of the encoding 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 encoding device can encode the input bin by applying a uniform probability distribution instead of assigning a context model, thereby increasing the coding rate. The bin coded as described above can be referred to as a bypass bin.

[0168] Entropy decoding may mean a process of performing the same process as the above-described entropy encoding in reverse order.

[0169] 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 decoded information of a decoding target block or a neighboring block, or information about a symbol / bin decoded in a previous stage, predict the occurrence probability of the received bin based on the determined context model, and perform arithmetic decoding on the bin to derive the value of the syntax element. Thereafter, the determined context model may be used to update the context model of the next decoded bin.

[0170] Furthermore, 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 for the syntax element and the process of updating the context model applied to the bin after decoding may be omitted.

[0171] As described above, the residual samples can be derived into quantized transform coefficients through transformation and quantization processing. The quantized transform coefficients can also be referred to as transform coefficients. In this case, the transform coefficients in the block can be signaled in the form of residual information. The residual information 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 bit stream, and the decoding device can decode the residual coding syntax from the bit stream 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 is a valid transform coefficient in the sub-block, the size / sign of the valid transform coefficient, etc., as will be described later.

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

[0173] [Table 1]

[0174]

[0175]

[0176]

[0177] 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 the CB, and the 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 indicates the position, size, sign, etc. of the (quantized) transform coefficients can be generated and signaled. The quantized transform coefficients can be simply referred to as transform coefficients. Generally, 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 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).

[0178] In addition, the syntax elements signaled after the transform skip flag is signaled may be the same as the syntax elements disclosed in Table 2 and / or Table 3 below, and a detailed description of the syntax elements is described below.

[0179] [Table 2]

[0180]

[0181]

[0182]

[0183]

[0184]

[0185] [Table 3]

[0186]

[0187]

[0188]

[0189] According to this embodiment, as shown in Table 1, residual coding can 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 can be used for residual coding. The residual coding used when transform skip is not applied (i.e., when the transform is applied) can be referred to as regular residual coding (RRC), while the residual coding used when transform skip is applied (i.e., when the transform is not applied) can be referred to as transform skip residual coding (TSRC). In addition, regular residual coding can be referred to as general residual coding. In addition, regular residual coding can be referred to as a regular residual coding syntax structure, and transform skip residual coding can be referred to as a transform skip residual coding syntax structure. Table 2 above can 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 can show the syntax elements of residual coding when the value of transform_skip_flag is 1 (i.e., when the transform is not applied).

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

[0191] Referring to Table 2 above, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level can be encoded / decoded. Further, sb_coded_flag can be denoted as coded_sub_block_flag.

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

[0193] Thereafter, the encoding device can divide the transform block into 4x4 sub-blocks, and then indicate whether there is a non-zero coefficient in the current sub-block using a 1-bit syntax element coded_sub_block_flag for each 4x4 sub-block.

[0194] If the value of coded_sub_block_flag is 0, there is no more information to be sent, so the encoding device can terminate the encoding process of the current subblock. Conversely, if the value of coded_sub_block_flag is 1, the encoding device can 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 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.

[0195] 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 the reverse scanning order. The encoding device may encode a 1-bit syntax element sig_coeff_flag for each transform coefficient according to the 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, and thus 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.

[0196] The level value remaining after encoding sig_coeff_flag can be derived as shown in the following equation: That is, the syntax element remAbsLevel indicating the level value to be encoded can be derived from the following equation.

[0197] [Formula 1]

[0198] remAbsLevel=|coeff|-1

[0199] Herein, coeff means the actual transform coefficient value.

[0200] In addition, abs_level_gt1_flag may indicate whether the 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 at 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.

[0201] [Formula 2]

[0202] remAbsLevel=remAbsLevel-1

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

[0204] [Formula 3]

[0205] par_level_flag=|coeff|&1

[0206] Herein, par_level_flag[n] may indicate the parity of the transform coefficient level (value) at the scanning position (n).

[0207] The transform coefficient level value remAbsLevel to be encoded after performing par_level_flag encoding may be updated as shown in the following equation.

[0208] [Formula 4]

[0209] remAbsLevel=remAbsLevel>>1

[0210] abs_level_gt3_flag may indicate whether the remAbsLevel' corresponding to the scanning position (n) is greater than 3. Coding of abs_remainder may be performed only when rem_abs_gt3_flag is equal to 1. The relationship between the actual transform coefficient value coeff and each syntax element may be expressed as follows.

[0211] [Formula 5]

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

[0213] In addition, the following table indicates examples related to the above-mentioned Formula 5.

[0214] [Table 4]

[0215]

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

[0217] 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 can be parsed, and the residual coefficient can be derived based on the syntax elements. In this case, the syntax elements can be parsed sequentially, and the parsing order can be changed. In addition, abs_level_gtx_flag can represent abs_level_gt1_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and / or abs_level_gt9_flag. For example, abs_level_gtx_flag[n][j] can be a flag indicating whether the absolute value or level (value) of the transform coefficient at 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.

[0218] In addition, CABAC provides high performance, but has the disadvantage of poor throughput performance. This is caused by CABAC's conventional coding engine. Conventional coding (i.e., coding performed by CABAC's conventional coding engine) exhibits a high degree of data dependence because it uses probability states and ranges 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 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 Table 3 above, 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 block, the sum of the bins of sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag or sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag may be limited to 32 (or, for example, 28), and if the corresponding block is a 2×2 block, the sum of the bins of sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag 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 can be limited for a block (CB or TB) including the encoding target CG. In other words, the number of context-coded bins can be limited in units of blocks (CB or TB).For example, when the size of the current block is 16x16, 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.

[0219] In this case, if all the context-encoded bins with the limited number are used when encoding the context elements, the encoding apparatus can binarize the remaining coefficients by the method of binarizing the coefficients as described below, instead of using context encoding, and can perform bypass encoding. In other words, for example, if the number of context-encoded bins for 4x4 CG encoding is 32 (or, for example, 28), or if the number of context-encoded bins for 2x2 CG encoding is 8 (or, for example, 7), sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag encoded with context-encoded bins can no longer be encoded, and can be directly encoded as dec_abs_level. Alternatively, for example, when the number of context-encoded bins for 4x4 block encoding is 1.75 times the number of pixels of the entire block, i.e., when it is limited to 28, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag encoded as context-encoded bins can no longer be encoded, and can be directly encoded as dec_abs_level, as shown in Table 5 below.

[0220] [Table 5]

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

[0222] The value |coeff| can be derived based on dec_abs_level. In this case, the transform coefficient value, i.e., |coeff|, can be derived as shown in Equation below.

[0223] [Equation 6]

[0224] |coeff| = dec_abs_level

[0225] In addition, coeff_sign_flag can indicate the sign of the transform coefficient level at the corresponding scan position n. That is, coeff_sign_flag can indicate the sign of the transform coefficient at the corresponding scan position n.

[0226] Figure 11 An example of transform coefficients in a 4x4 block is shown.

[0227] Figure 11The 4×4 block represents an example of quantized coefficients. Figure 11 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 11 A 4×4 block can represent a luma block or a chroma block.

[0228] Furthermore, as described above, when the input signal is not a binary value but a syntax element, the encoding device may convert the input signal into a binary value by binarizing the value of the input signal. Furthermore, the decoding device may decode the syntax element to derive the binarized value (e.g., binarized bin) of the syntax element, and may debinarize the binarized value to derive the value of the syntax element. The binarization process may 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) binarization process, a fixed-length (FL) binarization process, or the like. Furthermore, the debinarization process may refer to 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.

[0229] For example, the TR binarization process can be performed as follows.

[0230] 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 TR binarization for symbolVal which is a value corresponding to the bin string.

[0231] Specifically, for example, if there is a suffix bin string for a syntax element, the TR bin string for the syntax element may be a concatenation of the prefix bin string and the suffix bin string. If there is no suffix bin string, the TR bin string for the syntax element may be the prefix bin string. For example, the prefix bin string may be derived as follows.

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

[0233] [Formula 7]

[0234] prefixVal=symbolVal>>cRiceParam

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

[0236] For example, if prefixVal is less than cMax>>cRiceParam, the prefix bin string may be a bit string indexed by binIdx with a length of prefixVal 1. That is, if prefixVal is less than cMax>>cRiceParam, the prefix bin string may be a bit string with a number of bits indicated by binIdx equal to prefixVal+1. Bins with a binIdx less than prefixVal may be set to 1. Additionally, bins with the same binIdx as prefixVal may be set to 0.

[0237] For example, the bin string derived by performing unary binarization on prefixVal may be as shown in the following table.

[0238] [Table 6]

[0239]

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

[0241] In addition, if cMax is greater than symbolVal and if cRiceParam is greater than 0, a bin suffix bin string of the TR bin string may exist. For example, the suffix bin string may be derived as follows.

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

[0243] [Formula 8]

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

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

[0246] It can be based on the value cMax is (1 < <cRiceParam)-1的suffixVal的FL二进制化处理来推导TR bin串的后缀(即,后缀bin串)的后缀。

[0247] Furthermore, if the value of the input parameter (ie, cRiceParam) is 0, the TR binarization may be an exact truncated unary binarization and may always use the same value cMax as the possible maximum value of the syntax element to be decoded.

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

[0249] For example, the 0th-order Exponential Golomb (EG0) binarization process can be performed as follows.

[0250] 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. This process may be represented as shown in the following table.

[0251] [Table 7]

[0252]

[0253] Additionally, the variable codeNum can be derived as follows.

[0254] [Formula 9]

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

[0256] Herein, the value returned from read_bits(leadingZeroBits) (ie, the value indicated by read_bits(leadingZeroBits)) may be interpreted as the binary representation of an unsigned integer with the most significant bit recorded first.

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

[0258] [Table 8]

[0259] Bit string format Range of codeNum 1 0 <![CDATA[0 1 x0]]> 1..2 <![CDATA[0 0 1 x1 x0]]> 3..6 <![CDATA[0 0 0 1 x2 x1 x0]]> 7..14 <![CDATA[0 0 0 0 1 x3 x2 x1 x0]]> 15..30 <![CDATA[0 0 0 0 0 1 x4 x3 x2 x1 x0]]> 31..62 … …

[0260] The "prefix" bits may be bits parsed for calculating leadingZeroBits as described above, and may 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 may represent the prefix bit string. The "suffix" bits may be bits parsed when calculating codeNum, and may be indicated by xi in Table 8 above. That is, the bit string indicated by xi in Table 8 above may represent the suffix bit string. Here, i may be a value from 0 to LeadingZeroBits-1. In addition, each xi may be equal to 0 or 1.

[0261] The bit string assigned to codeNum may be as shown in the following table.

[0262] [Table 9]

[0263] 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 … …

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

[0265] In addition, for example, the EGk binarization process can be performed as follows.

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

[0267] The bit string of the EGk binarization process for symbolVal can be derived as follows.

[0268] [Table 10]

[0269]

[0270] 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). In this article, X can be 0 or 1.

[0271] In addition, for example, the limited EGk binarization process can be performed as follows.

[0272] The input to the finite EGk binarization process may be a request for finite EGk binarization, a rice parameter ricParam, a variable representing the binary logarithm of the maximum value, and a variable representing the maximum prefix extension length, maxPreExtLen. Furthermore, the output of the finite EGk binarization process may be a finite EGk binarization for symbolVal, which is a value corresponding to an empty string.

[0273] The bit string for the finite EGk binarization process of symbolVal can be derived as follows.

[0274] [Table 11]

[0275]

[0276] In addition, for example, the FL binarization process can be performed as follows.

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

[0278] FL binarization can be configured by using a bit string with a fixed length, the number of bits of which has symbolVal. In this article, the fixed-length bit string can be an unsigned integer bit string. That is, the bit string for symbolVal, which is the symbol value, can be derived through FL binarization, and the bit length (i.e., the number of bits) of the bit string can be a fixed length.

[0279] For example, the fixed length can be derived as shown in the following equation.

[0280] [Equation 10]

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

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

[0283] Furthermore, for example, the binarization process for the syntax element abs_remainder in the residual information may be performed as follows.

[0284] The input to the binarization process of 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.

[0285] An output of the binarization process for abs_remainder may be a binarization of abs_remainder (ie, a binarized bin string of abs_remainder). A usable bit string for abs_remainder may be derived through the binarization process.

[0286] The Rice parameter cRiceParam for abs_remainder[n] can be derived by using a Rice parameter derivation process performed by inputting the color component cIdx and 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. A detailed description of the Rice parameter derivation process will be described later.

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

[0288] [Equation 11]

[0289] cMax=6<<cRiceParam

[0290] In addition, the binarization for abs_remainder (ie, the bin string for abs_remainder) can 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 can be the prefix bin string.

[0291] For example, the prefix bin string may be derived as follows.

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

[0293] [Equation 12]

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

[0295] The prefix of the bin string of abs_remainder[n] (ie, the prefix bin string) can be derived through the TR binarization process on prefixVal, where cMax and cRiceParam are used as inputs.

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

[0297] The Rice parameter derivation process for dec_abs_level[n] can be as follows.

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

[0299] For example, the variable locSumAbs may be derived similarly 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 the top left luma position (x0, y0).

[0300] [Table 12]

[0301]

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

[0303] [Table 13]

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

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

[0306] Alternatively, for example, the Rice parameter cRiceParam can be determined based on whether transform skipping is applied to the current block. That is, if transform is not 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.

[0307] In addition, the suffix value suffixVal of abs_remainder can be derived as shown in the following formula.

[0308] [Equation 13]

[0309] suffixVal=abs_remainder[n]cMax

[0310] 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, log2TransformRange is set to 15, and maxPreExtLen is set to 11.

[0311] Furthermore, for example, the binarization process for the syntax element dec_abs_level in the residual information can be performed as follows.

[0312] Inputs 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.

[0313] An output of the binarization process for dec_abs_level may be a binarization of dec_abs_level (ie, a binarized bin string of dec_abs_level). An available bin string of dec_abs_level may be derived through the binarization process.

[0314] The Rice parameter cRiceParam of dec_abs_level[n] can be derived by performing a Rice parameter derivation process using the color component cIdx, 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. Hereinafter, the Rice parameter derivation process will be described in detail.

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

[0316] [Equation 14]

[0317] cMax=6<<cRiceParam

[0318] Furthermore, the binarization for dec_abs_level[n] (i.e., 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. Alternatively, the bin string for dec_abs_level[n] may be the prefix bin string if there is no suffix bin string.

[0319] For example, the prefix bin string may be derived as follows.

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

[0321] [Equation 15]

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

[0323] The prefix of the bin string of dec_abs_level[n] (ie, prefix bin string) may be derived through a TR binarization process on prefixVal, with cMax and cRiceParam being used as inputs.

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

[0325] The Rice parameter derivation process for dec_abs_level[n] can be as follows.

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

[0327] For example, the variable locSumAbs may be derived similarly 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 the top left luma position (x0, y0).

[0328] [Table 14]

[0329]

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

[0331] [Table 15]

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

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

[0334] [Equation 16]

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

[0336] In addition, the suffix value suffixVal of dec_abs_level[n] can be derived as shown in the following equation.

[0337] [Equation 17]

[0338] suffixVal=dec_abs_level[n]-cMax

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

[0340] Furthermore, RRC and TSRC may have the following differences.

[0341] -For example, the Rice parameter of the syntax element abs_remainder[] in the TSRC may be derived as 1. The Rice parameter cRiceParam of the syntax element abs_remainder[] in the RRC may be derived based on lastAbsRemainder and lastRiceParam as described above, but the Rice parameter cRiceParam of the syntax element abs_remainder[] in the TSRC may be derived as 1. That is, for example, when transform skipping is applied to the current block (e.g., the current TB), the Rice parameter cRiceParam of the abs_remainder[] of the TSRC for the current block may be derived as 1.

[0342] -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 indicating whether the coefficient level is greater than a first threshold value (e.g., 1), the second coefficient level flag may be a flag indicating whether the coefficient level is greater than a second threshold value (e.g., 3), the third coefficient level flag may be a flag indicating whether the coefficient level is greater than a third threshold value (e.g., 5), the fourth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fourth threshold value (e.g., 7), and the fifth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fifth threshold value (e.g., 9). As described above, in TSRC, compared to 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], and abs_level_gtx_flag[n][4] may also be included.

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

[0344] - In addition, for example, when bins for context coding of the current block are exhausted, in the RRC, it can be coded as a syntax element dec_abs_level, but in the TSRC, it can be coded as a syntax element abs_remainder.

[0345] - In addition, for example, the order of parsing the transform coefficients of the RRC can be based on the last non-zero coefficient to allow parsing in the right-down-left-up direction, but in the case of the TSRC, it can be parsed in the left-up-right-down direction in the allowed order, and the position of the last non-zero coefficient can be omitted.

[0346] - In addition, for example, in the RRC, a dependent quantization (DQ) or a sign data hiding method (SDH) can be applied, but in the TSRC, the dependent quantization and the sign data hiding method can not be used.

[0347] In addition, a sign data hiding (SDH) method can be proposed with respect to residual coding. The sign data hiding method can be as follows.

[0348] When deriving a transform coefficient, the sign of the transform coefficient can 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 the coeff_sign_flag for the first significant transform coefficient in a sub-block / coefficient group (CG) to improve coding efficiency. Here, the value of the coeff_sign_flag for 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. Furthermore, a significant transform coefficient may refer to 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 the coeff_sign_flag for the first significant transform coefficient may be derived as 1, whereas when the sum of the absolute levels of the significant transform coefficients is an odd number, the value of the coeff_sign_flag for 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 sign 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 sign 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 sign 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 sign of the first significant transform coefficient may be derived as a negative value.

[0349] For example, SDH in the residual syntax may be represented as shown in the following table.

[0350] [Table 16]

[0351]

[0352] Referring to Table 16, the variable signHiddenFlag may indicate whether SDH is applied. The variable signHiddenFlag may also 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_hidden_used_flag, 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 significant transform coefficient searched for in the corresponding subblock / coefficient group according to the scan order, and firstSigScanPosSb may indicate the position of the first significant transform coefficient searched for in the corresponding subblock / coefficient group according to the scan order. Typically, lastSigScanPosSb may be located in a relatively high frequency component region compared to firstSigScanPosSb. Therefore, when lastSigScanPosSb-firstSigScanPosSb is greater than a predetermined threshold, the signHidden value may be derived as 1 (i.e., SDH is applied), and otherwise the signHidden value may be derived as 0 (i.e., SDH is not applied). Here, for example, referring to Table 35, the threshold may be set to 3.

[0353] In addition, referring to Table 16, even if the value of signHiddenFlag is 0 (i.e., !signHiddenFlag), if the current coefficient is not the first significant coefficient in the (sub)block according to the scan order (i.e., n!=firstSigScanPosSb), then coeff_sign_flag[n] of the current coefficient can be explicitly signaled.

[0354] In addition, referring to Table 16, if the value of signHiddenFlag is 1 and the current coefficient is the first significant coefficient in the (sub) block according to the scan order (i.e., n=first_sigscanpossb), the explicit signaling of coeff_sign_flag[n] of the current coefficient can be omitted. In this case, the value of coeff_sign_flag[n] of the current coefficient (i.e., the first significant coefficient) can be derived as follows. For example, the value of coeff_sign_flag[n] of the first significant coefficient can be derived based on the coeff_sign_flag[n] value of the significant coefficient in the corresponding (sub) block. For example, when the sum of the coeff_sign_flag[n] values ​​of the significant coefficients is an even number, the coeff_sign_flag[n] of the first significant coefficient can be derived as 1, and when the sum of the coeff_sign_flag[n] values ​​of the remaining significant coefficients is an odd number, the coeff_sign_flag[n] of the first significant coefficient can be derived as 0. Alternatively, when the sum of the coeff_sign_flag[n] values ​​of the significant coefficients is an even number, the coeff_sign_flag[n] of the first significant coefficient may be derived as 0, and when the sum of the coeff_sign_flag[n] values ​​of the significant coefficients is an odd number, the coeff_sign_flag[n] of the first significant coefficient may be derived as 1.

[0355] In addition, if the above-mentioned symbol data hiding is activated in the high-level syntax (VPS, SPS, PPS, slice header syntax, etc.) or the low-level syntax (slice data syntax, coding unit syntax, transform unit syntax, etc.), and if sh_ts_residual_coding_disabled_flag is 1, the symbol data hiding processing of RRC can be used for lossless coding. Therefore, due to incorrect settings in the encoding device, lossless coding may become impossible. Alternatively, if lossy coding other than lossless coding is applied (i.e., an irreversible coding method), and the residual signal to which transform skipping has been applied is encoded using RRC while BDPCM is applied, despite the fact that the intervals where the residual value becomes 0 appear more frequently than usual due to the difference between the residuals, BDPCM may also suffer from coding loss due to the execution of SDH according to SDH application conditions. Specifically, for example, if valid transform coefficients (non-zero residual data) exist at positions 0 and 15 in the CG, respectively, and the transform coefficient values ​​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 that the sign data of the first valid transform coefficient of the CG (i.e., the encoding of the sign flag) can be omitted. Therefore, in this case, in order to omit the sign data, the parity of only two residual data of the CG can be adjusted in the quantization step, so that more coding losses may occur compared to the case where SDH is not applied. This situation may also occur in blocks to which BDPCM is not applied, but due to the characteristics of BDPCM, the level is reduced by the difference with the adjacent residuals, so unfavorable situations may occur more frequently when SDH is applied.

[0356] Therefore, in this document, in order to prevent unexpected coding losses or failures caused by using SDH and residual coding together (i.e., encoding the residual samples of the transform skipped blocks in the current slice using RRC) when sh_ts_residual_coding_disabled_flag=1, an implementation method for setting the dependency / constraint between the above two techniques is provided.

[0357] Furthermore, as described above, the residual data encoding method may include regular residual coding (RRC) and transform skip residual coding (TSRC).

[0358] As shown in Table 1, the residual data encoding method for the current block among the above two methods can be determined based on the values ​​of transform_skip_flag and sh_ts_residual_coding_disabled_flag. Here, the syntax element sh_ts_residual_coding_disabled_flag can indicate whether TSRC is enabled. Therefore, even when transform_skip_flag indicates that the transform is skipped, if sh_ts_residual_coding_disabled_flag indicates that TSRC is not enabled, a syntax element according to RRC for transform-skipped blocks can be signaled. That is, when the value of transform_skip_flag is 0 or the value of sh_ts_residual_coding_disabled_flag is 1, RRC can be used, and otherwise TSRC can be used.

[0359] This document proposes a method in which sh_ts_residual_coding_disabled_flag depends on pic_sign_data_hiding_enabled_flag as an implementation. For example, the syntax elements proposed in this implementation may be as shown in the following table.

[0360] [Table 17]

[0361]

[0362] Here, for example, pic_sign_data_hiding_enabled_flag may be a flag for whether symbol data hiding is enabled. For example, pic_sign_data_hiding_enabled_flag may indicate 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 a block of a picture of a sequence or a picture header structure (i.e., picture_header_structure()). For example, pic_sign_data_hiding_enabled_flag may indicate whether a symbol data hiding use flag indicating whether symbol data hiding is used for the current slice may exist. For example, a pic_sign_data_hiding_enabled_flag having a value of 1 may indicate that symbol data hiding is enabled, while a pic_sign_data_hiding_enabled_flag having a value of 0 may indicate that symbol data hiding is not enabled. For example, a pic_sign_data_hiding_enabled_flag having a value of 1 may indicate that a symbol data hiding use flag may exist, while a pic_sign_data_hiding_enabled_flag having a value of 0 may indicate that a symbol data hiding use flag does not exist.

[0363] According to Table 17 above, sh_ts_residual_coding_disabled_flag may be signaled only when symbol data hiding is not enabled. In addition, when symbol data hiding is enabled, sh_ts_residual_coding_disabled_flag may not be signaled, and the value of sh_ts_residual_coding_disabled_flag may be inferred to be 0 (residual samples of the transform skipped blocks in the current slice are encoded using TSRC syntax) or 1 (residual samples of the transform skipped blocks in the current slice are encoded using RRC syntax).

[0364] Here, for example, pic_sign_data_hiding_enabled_flag can be signaled as a picture header syntax or a slice header syntax. For example, when pic_sign_data_hiding_enabled_flag is signaled as a syntax other than the picture header syntax, it can be referred to as another name. For example, when signaled in a slice header, pic_sign_data_hiding_enabled_flag can be expressed as sh_sign_data_hiding_enabled_flag. In addition, sh_ts_residual_coding_disabled_flag can be signaled as a slice header syntax, or can be signaled in a high level syntax (HLS) (e.g., SPS syntax / VPS syntax / DPS syntax, etc.) other than the slice header syntax or a low level (CU / TU). When the residual coding method is determined by whether SDH is enabled, it can be interpreted to conform to the present embodiment regardless of the up / down relationship of the signaled syntax or the position on the syntax.

[0365] In addition, according to the conventional image / video encoding, in a high level syntax (SPS syntax / VPS syntax / DPS syntax / picture header syntax / slice header syntax, etc.) or a low level (CU / TU), SDH is enabled, and when sh_ts_residual_coding_disabled_flag is 1, the SDH in the above-described RRC can be used for lossless encoding, and thus due to an incorrect setting in an encoding apparatus, lossless encoding can become impossible. Therefore, in the present document, in order to prevent an unintended encoding loss or a failure caused by using SDH and residual coding together when sh_ts_residual_coding_disabled_flag = 1 (i.e., residual samples of a transform skip block in a current slice are encoded with RRC), an embodiment in which SDH is not used when encoding a level of a transform coefficient when the value of transform_skip_flag is 1 is provided. The residual coding syntax according to the proposed embodiment can be as shown in the following table.

[0366] [Table 18]

[0367]

[0368]

[0369]

[0370]

[0371]

[0372] Referring to Table 18, the variable signHidden indicating whether SDH is applied can be derived based on the value of transform_skip_flag. For example, when the value of transform_skip_flag is 1, the value of signHidden can be derived as 0. That is, for example, when the value of transform_skip_flag is 1, SDH may not be applied when deriving the sign of the transform coefficient of the current block.

[0373] In addition, in this document, in order to prevent unexpected coding loss or failure caused by using SDH and residual coding together when sh_ts_residual_coding_disabled_flag=1 (i.e., using RRC to encode the residual samples of the transform skip block in the current slice), an embodiment is provided in which SDH is not used when encoding the transform coefficient level when the value of BdpcmFlag is 1. The residual coding syntax according to the proposed embodiment can be shown in the following table.

[0374] [Table 19]

[0375]

[0376]

[0377]

[0378]

[0379]

[0380] Referring to Table 19 above, the variable signHidden indicating whether SDH is applied can be derived based on the value of the variable BdpcmFlag indicating whether BDPCM is applied. For example, when the value of BdpcmFlag is 1, the value of signHidden can be derived as 0. That is, for example, when the value of BdpcmFlag is 1 (when BDPCM is applied to the current block), SDH may not be applied when deriving the sign of the transform coefficient of the current block.

[0381] Referring to Table 19, when BdpcmFlag is 1, if lossy coding is applied, SDH of TSRC is allowed, but if BDPCM is applied, SDH may not be used.

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

[0383] For example, as described above, since sh_ts_residual_coding_disabled_flag is a syntax element that defines whether TSRC is disabled, it may not be necessary to signal it when transform skip blocks are not used. That is, it may be meaningful to signal sh_ts_residual_coding_disabled_flag only when the syntax element for whether to use transform skip blocks indicates that transform skip blocks are used.

[0384] Therefore, this document proposes an implementation in which sh_ts_residual_coding_disabled_flag is signaled only when sps_transform_skip_enabled_flag is 1. The syntax according to this implementation is shown in the following table.

[0385] [Table 20]

[0386]

[0387] Referring to Table 20, when sps_transform_skip_enabled_flag is 1, sh_ts_residual_coding_disabled_flag may be signaled, and when 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 skipping is enabled. For example, when 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 when 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, when sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag can be inferred to be 0. In addition, the above-mentioned sps_transform_skip_enabled_flag can be signaled in the SPS, or can be signaled in high-level syntax (VPS, PPS, picture header syntax, slice header syntax, etc.) or low-level syntax (slice data syntax, coding unit syntax, transform unit syntax, etc.) other than the SPS. In addition, it can be signaled before sh_ts_residual_coding_disabled_flag.

[0388] In addition, this document proposes an embodiment that is combined with the above embodiment of signaling sh_ts_residual_coding_disabled_flag. For example, an embodiment of signaling sh_ts_residual_coding_disabled_flag as shown in the following table can be proposed.

[0389] [Table 21]

[0390]

[0391] Referring to Table 21, when sps_transform_skip_enabled_flag is 1 and pic_sign_data_hiding_enabled_flag is 0, sh_ts_residual_coding_disabled_flag may be signaled, whereas otherwise sh_ts_residual_coding_disabled_flag may not be signaled. Furthermore, when sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be inferred to be 0.

[0392] Alternatively, for example, an embodiment of signaling sh_ts_residual_coding_disabled_flag as shown in the following table may be proposed.

[0393] [Table 22]

[0394]

[0395] Referring to Table 22, when pic_sign_data_hiding_enabled_flag is 0 or sps_transform_skip_enabled_flag is 1, sh_ts_residual_coding_disabled_flag may be signaled, whereas otherwise sh_ts_residual_coding_disabled_flag may not be signaled. Furthermore, when sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be inferred to be 0.

[0396] In addition, for example, according to this embodiment, a method of signaling the syntax elements ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag in the same high-level syntax or low-level syntax may be proposed. For example, referring to Table 22 above, both ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag may be 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. In addition, ph_dep_quant_enabled_flag may be a flag indicating whether dependent quantization is enabled. For example, ph_dep_quant_enabled_flag may indicate whether dependent quantization is enabled. That is, for example, ph_dep_quant_enabled_flag may indicate whether dependent quantization is enabled for a block of a picture in a sequence. For example, ph_dep_quant_enabled_flag may indicate whether a dependent quantization usage flag indicating whether dependent quantization is used for the current slice may exist. For example, a ph_dep_quant_enabled_flag value of 1 may indicate that dependent quantization is enabled, while a ph_dep_quant_enabled_flag value of 0 may indicate that dependent quantization is not enabled. In addition, for example, ph_dep_quant_enabled_flag may be referred to as sps_dep_quant_enabled_flag or sh_dep_quant_enabled_flag depending on the signaling syntax.

[0397] Alternatively, for example, an embodiment of signaling sh_ts_residual_coding_disabled_flag as shown in the following table may be proposed.

[0398] [Table 23]

[0399]

[0400] Referring to Table 23, when pic_sign_data_hiding_enabled_flag is 0 and sps_transform_skip_enabled_flag is 1, sh_ts_residual_coding_disabled_flag may be signaled, whereas otherwise, sh_ts_residual_coding_disabled_flag may not be signaled. Furthermore, when sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be inferred to be 0. Furthermore, for example, referring to Table 23 above, both ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag may be 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.

[0401] In addition, this document proposes an implementation in which the above-mentioned syntax elements ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag and / or sh_ts_residual_coding_disabled_flag are signaled in the same high-level syntax (VPS, SPS, PPS, picture header, slice header, etc.) or low-level syntax (slice data, coding unit, transform unit, etc.).

[0402] For example, as shown in the following table, an implementation may be proposed in which both pic_sign_data_hiding_enabled_flag and sh_ts_residual_coding_disabled_flag are signaled in the picture header syntax.

[0403] [Table 24]

[0404]

[0405] In this case, sh_ts_residual_coding_disabled_flag may be referred to as ph_ts_residual_coding_disabled_flag.

[0406] According to this embodiment, the syntax element (i.e., sh_ts_residual_coding_disabled_flag) indicating whether residual coding of transform skip blocks (i.e., TSRC) is enabled may be signaled only when the value of the syntax element (i.e., pic_sign_data_hiding_enabled_flag) indicating whether SDH is enabled in HLS is 0. For example, referring to Table 24, pic_sign_data_hiding_enabled_flag may be signaled in the picture header syntax, and when the value of pic_sign_data_hiding_enabled_flag is 0, ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax. In addition, for example, when the value of pic_sign_data_hiding_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may not be signaled. When sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be inferred to be 0. Furthermore, when the value of sps_sign_data_hiding_enabled_flag is 1, pic_sign_data_hiding_enabled_flag may be signaled in the picture header syntax.

[0407] The above implementation according to Table 24 is merely an example, and the two syntax elements can be signaled using high-level syntax (VPS, SPS, PPS, slice header, etc.) or low-level syntax (slice data, coding unit, transform unit, etc.) other than the picture header.

[0408] Alternatively, for example, as shown in the following table, an implementation scheme may be provided in which a syntax element indicating whether SDH is enabled is signaled only when the value of the syntax element indicating whether residual coding of transform skipped blocks (i.e., TSRC) is enabled is 0 (i.e., when TSRC is enabled).

[0409] [Table 25]

[0410]

[0411] Referring to Table 25, when the value of ph_ts_residual_coding_disabled_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, pic_sign_data_hiding_enabled_flag may not be signaled. In addition, for example, when pic_sign_data_hiding_enabled_flag is not signaled, pic_sign_data_hiding_enabled_flag may be inferred to be 0 in the decoding device.

[0412] The above implementation according to Table 25 is merely an example, and the two syntax elements can be signaled using high-level syntax (VPS, SPS, PPS, slice header, etc.) or low-level syntax (slice data, coding unit, transform unit, etc.) other than the picture header.

[0413] Alternatively, for example, a method for limiting pic_sign_data_hiding_enabled_flag and / or ph_dep_quant_enabled_flag based on ph_ts_residual_coding_disabled_flag may be proposed.

[0414] For example, as shown in the following table, an embodiment may be provided in which pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag are signaled only when the value of ph_ts_residual_coding_disabled_flag is 0.

[0415] [Table 26]

[0416]

[0417] Referring to Table 26, pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag can be signaled in the picture header syntax when the value of ph_ts_residual_coding_disabled_flag is 0. Further, for example, pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag can not be signaled when the value of ph_ts_residual_coding_disabled_flag is 1. Further, for example, pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag can be inferred to be 0 in a decoding device when pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag are not signaled.

[0418] Further, for example, referring to Table 26 above, ph_ts_residual_coding_disabled_flag, pic_sign_data_hiding_enabled_flag, and ph_dep_quant_enabled_flag can all be signaled in the picture header syntax.

[0419] In addition, embodiments in connection with signaling sh_ts_residual_coding_disabled_flag described above can be proposed in combination with the embodiments described above. For example, embodiments of signaling sh_ts_residual_coding_disabled_flag as shown in the following table can be proposed.

[0420] [Table 27]

[0421]

[0422] Referring to Table 27, when pic_sign_data_hiding_enabled_flag is 0 or sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may be signaled, whereas otherwise ph_ts_residual_coding_disabled_flag may not be signaled. Furthermore, 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. Furthermore, when the value of sps_sign_data_hiding_enabled_flag is 1, pic_sign_data_hiding_enabled_flag may be signaled in the picture header syntax.

[0423] Alternatively, for example, an embodiment of signaling sh_ts_residual_coding_disabled_flag as shown in the following table may be proposed.

[0424] [Table 28]

[0425]

[0426] Referring to Table 28, when pic_sign_data_hiding_enabled_flag is 0 and sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may be signaled, whereas otherwise ph_ts_residual_coding_disabled_flag may not be signaled. Furthermore, 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. Furthermore, when the value of sps_sign_data_hiding_enabled_flag is 1, pic_sign_data_hiding_enabled_flag may be signaled in the picture header syntax.

[0427] Alternatively, for example, an embodiment of signaling sh_ts_residual_coding_disabled_flag as shown in the following table may be proposed.

[0428] [Table 29]

[0429]

[0430] Referring to Table 29, ph ts residual coding disabled flag can be signaled when sps transform skip enabled flag is 1, and can not be signaled otherwise. Further, referring to Table 29, pic sign data hiding enabled flag can be signaled when ph ts residual coding disabled flag is 0, and can not be signaled otherwise. Further, when ph ts residual coding disabled flag is not signaled, ph ts residual coding disabled flag can be inferred to be 0 in a decoding device. Further, when pic sign data hiding enabled flag is not signaled, pic sign data hiding enabled flag can be inferred to be 0 in a decoding device.

[0431] Alternatively, for example, an implementation of signaling sh ts residual coding disabled flag as shown in the following table can be proposed.

[0432] [Table 30]

[0433]

[0434] Referring to Table 30, when sps_transform_skip_enabled_flag is 1, ph ts residual coding disabled flag can be signaled, and otherwise ph ts residual coding disabled flag can not be signaled. In addition, referring to Table 30, when ph ts residual coding disabled flag is 0, pic sign data hiding enabled flag and ph dep quant enabled flag can be signaled, and otherwise pic sign data hiding enabled flag and ph dep quant enabled flag can not be signaled. Further, when ph ts residual coding disabled flag is not signaled, in the decoding device, ph ts residual coding disabled flag can be inferred to be 0. Further, when pic sign data hiding enabled flag and ph dep quant enabled flag are not signaled, in the decoding device, pic sign data hiding enabled flag and ph dep quant enabled flag can be inferred to be 0.

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

[0436] Figure 12 An image encoding method performed by an encoding device according to the present disclosure is briefly illustrated. Figure 12 The method disclosed in the present document can be performed by Figure 2 The encoding device disclosed in the present document is performed. Specifically, for example, Figure 9 S900 of the present document can be performed by a predictor of the encoding device, Figure 9 S910 of the present document can be performed by a residual processor of the encoding device, and Figure 9S920 to S960 of the encoding device may be performed by an entropy encoder. In addition, although not shown, 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.

[0437] The encoding apparatus generates a reconstructed picture of the current slice ( S1200 ). The encoding apparatus may derive prediction samples and residual samples of a current block of the current slice, and may generate reconstructed samples / reconstructed pictures of the current block based on the prediction samples and the residual samples.

[0438] Specifically, for example, the encoding device may derive prediction samples for the current block by performing prediction on the current block in the current slice. For example, the encoding device may derive prediction samples for the current block by performing intra-frame prediction or inter-frame prediction on the current block. For example, the encoding device may determine whether to perform inter-frame prediction or intra-frame prediction on the current block, may determine a specific inter-frame prediction mode or a specific intra-frame prediction mode based on the RD cost, and may derive prediction samples for the current block based on the determined prediction mode.

[0439] For example, the encoding device may derive an inter-frame prediction mode and motion information for the current block and generate prediction samples for the current block. Here, the inter-frame prediction mode determination process, motion information derivation process, and prediction sample generation process may be performed simultaneously, and any one process may be performed earlier than the other. For example, the inter-frame prediction unit of the encoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit may determine the prediction mode for the current block, the motion information derivation unit may derive motion information for the current block, and the prediction sample derivation unit may derive prediction samples for the current block. For example, the inter-frame prediction unit of the encoding device may search for blocks similar to the current block in a predetermined area (search area) of a reference picture through motion estimation and derive a reference block whose difference with the current block is minimal or equal to or less than a predetermined standard. Based on this, a reference picture index indicating the reference picture in which the reference block is located may be derived, and a motion vector may be derived based on the positional difference between the reference block and the current block. The encoding device may determine a mode to be applied to the current block from among various prediction modes. The encoding device may compare the RD costs of the various prediction modes and determine the optimal prediction mode for the current block.

[0440] For example, the encoding device may configure a motion information candidate list for the current block and derive a reference block whose difference with the current block is the smallest or equal to or less than a predetermined standard among the reference blocks indicated by the motion information candidates included in the motion information candidate list. In this case, a motion information candidate associated with the derived reference block may be selected, and the motion information of the current block may be derived based on the motion information of the selected motion information candidate.

[0441] Further, for example, the encoding device can derive the residual samples of the current block based on the prediction samples. For example, the encoding device can derive the residual samples of the current block by subtracting the prediction samples from the original samples of the current block.

[0442] Then, for example, the encoding device can generate the reconstructed samples and the reconstructed picture of the current block based on the residual samples and the prediction samples of the current block. For example, the encoding device can generate the reconstructed samples by adding the prediction samples and the residual samples.

[0443] The encoding device encodes the picture information of the current slice (S1210). The encoding device can generate and encode the picture information of the current slice.

[0444] For example, the encoding device can encode a sign data hiding enabled flag for whether sign data hiding is enabled for the current slice. The encoding device can encode a sign data hiding enabled flag for whether sign data hiding is enabled for the current slice. The picture information can include the sign data hiding enabled flag. For example, the encoding device can determine whether sign data hiding is enabled for blocks of pictures in a sequence, and can encode the sign data hiding enabled flag for whether sign data hiding is enabled. For example, the sign data hiding enabled flag can be a flag for whether sign data hiding is enabled. For example, the sign data hiding enabled flag can indicate whether sign data hiding is enabled. That is, for example, the sign data hiding enabled flag can indicate whether sign data hiding is enabled for blocks of pictures in a sequence. For example, the sign data hiding enabled flag can indicate whether a sign data hiding usage flag indicating whether sign data hiding is used for the current slice can be present. For example, the sign data hiding enabled flag having a value of 1 can indicate that sign data hiding is enabled, and the sign data hiding enabled flag having a value of 0 can indicate that sign data hiding is not enabled. For example, the sign data hiding enabled flag having a value of 1 can indicate that the sign data hiding usage flag can be present, and the sign data hiding enabled flag having a value of 0 can indicate that the sign data hiding usage flag is not present. Further, for example, the sign data hiding enabled flag can be signaled in a sequence parameter set (SPS) syntax. Alternatively, for example, the sign data hiding enabled flag can be signaled in a picture header syntax or a slice header syntax. A syntax element of the sign data hiding enabled flag can be the above-described sps_sign_data_hiding_enabled_flag. Alternatively, a syntax element of the sign data hiding enabled flag can be the above-described sh_sign_data_hiding_enabled_flag.

[0445] Then, for example, the encoding device may encode a transform skip residual coding (TSRC) enable flag for enabling transform skip residual coding (TSRC) for the transform skip block in the current slice based on the symbol data hiding enable flag. The image information may include the TSRC enable flag.

[0446] 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 value of the symbol data hiding enable flag being 0. That is, for example, when the value of the symbol data hiding enable flag is 0 (i.e., when the symbol data hiding enable flag indicates that symbol data hiding is not enabled), 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., when the symbol data hiding enable flag indicates that symbol data hiding is not enabled), the TSRC enable flag may be signaled. Furthermore, 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.

[0447] Here, for example, the TSRC enable flag may be a flag indicating whether TSRC is enabled. That is, for example, the TSRC enable flag may be a flag indicating whether TSRC is enabled for a block in a slice. In other words, for example, the TSRC enable flag may be a flag indicating whether TSRC is enabled for a transform skip block in a slice. For example, a TSRC enable flag having a value of 1 may indicate that TSRC is not enabled, while a TSRC enable flag having a value of 0 may indicate that TSRC is enabled. Furthermore, 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. The TSRC enable flag may be referred to as a TSRC disable flag.

[0448] Furthermore, for example, the encoding device can determine whether dependent quantization is enabled for blocks of pictures in a sequence and can encode a dependent quantization enabled flag for whether dependent quantization is enabled. The picture information can include the dependent quantization enabled flag. For example, the dependent quantization enabled flag can be a flag for whether dependent quantization is enabled. For example, the dependent quantization enabled flag can indicate whether dependent quantization is enabled. That is, for example, the dependent quantization enabled flag can indicate whether dependent quantization is enabled for blocks of pictures in a sequence. For example, the dependent quantization enabled flag can indicate whether there can be a dependent quantization usage flag that indicates whether dependent quantization is used for a current slice. For example, a dependent quantization enabled flag with a value of 1 can indicate that dependent quantization is enabled and a dependent quantization enabled flag with a value of 0 can indicate that dependent quantization is not enabled. Furthermore, for example, the dependent quantization enabled flag can be signaled in a SPS syntax, a slice header syntax, and the like. A syntax element of the dependent quantization enabled flag can be the aforementioned sps_dep_quant_enabled_flag.

[0449] Furthermore, for example, the encoding device can encode a transform skip enabled flag for whether transform skip is enabled for a current slice. The picture information can include the transform skip enabled flag. For example, the encoding device can determine whether transform skip is enabled for blocks of pictures in a sequence and can encode a transform skip enabled flag for whether transform skip is enabled. For example, the transform skip enabled flag can be a flag for whether transform skip is enabled. For example, the transform skip enabled flag can indicate whether transform skip is enabled. That is, for example, the transform skip enabled flag can indicate whether transform skip is enabled for blocks of pictures in a sequence. For example, the transform skip enabled flag can indicate whether there can be a transform skip flag. For example, a transform skip enabled flag with a value of 1 can indicate that transform skip is enabled and a transform skip enabled flag with a value of 0 can indicate that transform skip is not enabled. That is, for example, a transform skip enabled flag with a value of 1 can indicate that a transform skip flag can exist and a transform skip enabled flag with a value of 0 can indicate that a transform skip flag does not exist. Furthermore, for example, the transform skip enabled flag can be signaled in a sequence parameter set (SPS) syntax. A syntax element of the transform skip enabled flag can be the aforementioned sps_transform_skip_enabled_flag.

[0450] Additionally, for example, the TSRC enable flag can be encoded based on the sign data hiding enable flag and / or the transform skip enable flag. For example, the TSRC enable flag can be encoded based on the sign data hiding enable flag having a value of 0 and the transform skip enable flag having a value of 1. That is, for example, the TSRC enable flag can be encoded (or signaled) when the value of the sign data hiding enable flag is 0 (i.e., the sign data hiding enable flag indicates that sign data hiding is not enabled) and the value of the transform skip enable flag is 1 (i.e., when the transform skip enable flag indicates that transform skip is enabled). Additionally, for example, the TSRC enable flag can not be encoded when the value of the transform skip enable flag is 0, and the value of the TSRC enable flag can be derived to be 0. That is, for example, the TSRC enable flag can not be signaled when the value of the transform skip enable flag is 0, and the value of the TSRC enable flag can be derived to be 0.

[0451] Additionally, for example, the encoding device can encode prediction information for a current block in a current slice. The image information can include the prediction information for the current block. For example, the prediction information can include prediction mode information as information related to a prediction process.

[0452] Additionally, for example, the encoding device can encode residual information for a current block in a current slice. For example, the encoding device can encode the residual information for the current block based on the TSRC enable flag. The encoding device can encode the residual information for the current block based on the TSRC enable flag.

[0453] For example, the encoding device can determine a residual coding syntax for the current block based on the TSRC enable flag. For example, the encoding device can determine the residual coding syntax for the current block to be 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 can indicate a syntax according to RRC, and the TSRC syntax can indicate a syntax according to TSRC.

[0454] For example, based on the TSRC enable flag having a value of 1, the residual coding syntax for the current block may be determined to be a conventional residual coding (RRC) syntax. In this case, for example, a transform skip flag for whether the current block is transform-skipped may be encoded, and the value of the transform skip flag may be 1. For example, the image information may include a transform skip flag for the current block. The transform skip flag may indicate whether the current block is transform-skipped. 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, when the value of the transform skip flag is 1, the transform skip flag may indicate that a transform is not applied to the current block (that is, the transform is skipped), and if the value of the transform skip flag is 0, the transform skip flag may indicate that a transform is applied to the current block. For example, if the current block is a transform-skipped block, the value of the transform skip flag for the current block may be 1.

[0455] In addition, for example, based on a transform skip residual coding (TSRC) enable flag having a value of 0, the residual coding syntax for the current block may be determined to be TSRC syntax. In addition, for example, a transform skip flag indicating whether the current block is transform skipped may be encoded, and the residual coding syntax for the current block may be determined to be TSRC syntax based on a transform skip flag having a value of 1 and a transform skip residual coding (TSRC) enable flag having a value of 0. In addition, for example, a transform skip flag indicating whether the current block is transform skipped may be encoded, and the residual coding syntax for the current block may be determined to be regular residual coding (RRC) syntax based on a transform skip flag having a value of 0 and a TSRC enable flag having a value of 0.

[0456] Then, for example, the encoding device may encode the residual information of the determined residual coding syntax for the current block. The encoding device may encode the residual information of the determined residual coding syntax for the residual samples of the current block. For example, the residual information of the conventional residual coding (RRC) syntax for the current block may be encoded based on a TSRC enable flag having a value of 1, and the residual information of the TSRC syntax for the current block may be encoded based on a TSRC enable flag having a value of 0. The image information may include the residual information.

[0457] Specifically, for example, the encoding device may derive transform coefficients for the current block based on 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 based on coding efficiency. For example, the encoding device may determine that no transform is applied to the current block. Furthermore, a block to which a transform is not applied may be referred to as a transform-skipped block.

[0458] When the transform is not applied to the current block, that is, when the transform is not applied to the residual samples, the encoding device may derive the derived residual samples as the transform coefficients of the current block. In addition, when the transform is applied to the current block, that is, when the transform is applied to the residual samples, the encoding device may perform a transform on the residual samples to derive the transform coefficients of the current block. 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 up to 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 referred to as residual coefficients.

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

[0460] For example, the residual information of the RRC syntax may include syntax elements for the transform coefficients of the current block. Here, the transform coefficients may be referred to as residual coefficients.

[0461] 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, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, abs_remainder, dec_abs_level, and / or coeff_sign_flag.

[0462] 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 significant coefficient.

[0463] In addition, for example, the syntax element may include a coded subblock flag indicating whether a subblock 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 indicating whether a coefficient level of the transform coefficient is greater than a first threshold, a parity level flag indicating parity of the coefficient level, and / or a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold. Here, the coded subblock 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.

[0464] In addition, for example, the syntax element may include coefficient value related information related to the value of the transform coefficient of the current block. The coefficient value related information may be abs_remainder and / or dec_abs_level.

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

[0466] In addition, for example, when symbol data hiding is applied to the current block, the sign flag of the first significant 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 sign flag indicating the sign of the first significant 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 significant transform coefficient of the current CG of the current block and the position of the last significant transform coefficient. For example, when the value of the symbol data hiding enable flag is 1 and the value obtained by subtracting the first significant transform coefficient position from the last significant transform coefficient position is greater than 3 (i.e., when the value of the symbol data hiding enable flag is 1 and the number of significant transform coefficients in the current CG is greater than 3), symbol data hiding can be applied to the current CG of the current block.

[0467] In addition, for example, when 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 for the current block. For example, the residual information of the TSRC syntax may include the syntax elements shown in Table 3 above.

[0468] For example, the residual information of the TSRC syntax may include syntax elements for the transform coefficients of the current block. Here, the transform coefficients may also be referred to as residual coefficients.

[0469] 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, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, and / or abs_remainder.

[0470] For example, a context coding syntax element for a 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 indicating whether the coefficient level of the transform coefficient is greater than a first threshold; and / or a parity level flag indicating the parity of the coefficient level of the transform coefficient. Furthermore, for example, the context coding syntax element may include: a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold; a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third threshold; a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth threshold; and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the significant coefficient flag may be sig_coeff_flag; the sign flag may be coeff_sign_flag; the first coefficient level flag may be abs_level_gt1_flag; and the parity level flag may be par_level_flag. Additionally, the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag; the third coefficient level flag 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.

[0471] In addition, for example, the bypass coding syntax element for the transform coefficient may include coefficient level information of the value (or coefficient level) of the transform coefficient 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.

[0472] Furthermore, for example, the encoding device may generate a bitstream including a symbol data hiding enable flag, a TSRC enable flag, prediction information, and / or residual information. That is, for example, the encoding device may output image information including the symbol data hiding enable flag, the TSRC enable flag, prediction information, and / or residual information as a bitstream. The bitstream may include the symbol data hiding enable flag, the TSRC enable flag, prediction information, and / or residual information. Furthermore, the bitstream may also include a quantization-dependent enable flag and / or a transform skip enable flag.

[0473] In addition, the bit stream can be sent to the decoding device via a network or a (digital) storage medium. Here, the network may include a broadcast network, a communication network, etc., and the digital storage medium may include various storage media such as a universal serial bus (USB), secure digital (SD), compact disc (CD), digital video disc (DVD), Blu-ray, hard disk drive (HDD), solid state drive (SSD), etc.

[0474] Figure 13 An encoding device for performing an image encoding method according to the present disclosure is briefly illustrated. Figure 12 The method disclosed in Figure 13 Specifically, for example, Figure 13 The residual processor of the encoding device can perform Figure 12 S1200 in the, and Figure 13 The entropy encoder of the encoding device can perform Figure 12 In S1210 . In addition, although not shown, the process of generating the reconstructed samples and the reconstructed picture of the current block based on the residual samples and the prediction samples of the current block in the current slice may be performed by an adder of the encoding device.

[0475] Figure 14 An image decoding method performed by a decoding device according to the present disclosure is briefly illustrated. Figure 14 The method disclosed in Figure 3 Specifically, for example, Figure 14 S1400 may be performed by an entropy decoder of a decoding device, Figure 14 S1410 may be performed by a residual processor of a decoding device. In addition, although not shown, 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 based on the prediction information may be performed by a predictor of the decoding device.

[0476] The decoding device obtains image information (S1400). The decoding device can obtain image information through a bit stream.

[0477] For example, the decoding device can obtain a sign data hiding enabled flag for whether sign data hiding is enabled for a current slice. The decoding device can obtain picture information including the sign data hiding enabled flag through a bitstream. The picture information can include the sign data hiding enabled flag. For example, the sign data hiding enabled flag can be a flag of whether sign data hiding is enabled. For example, the sign data hiding enabled flag can indicate whether sign data hiding is enabled. That is, for example, the sign data hiding enabled flag can indicate whether sign data hiding is enabled for a block of a picture in a sequence. For example, the sign data hiding enabled flag can indicate whether a sign data hiding usage flag indicating whether sign data hiding is used for a current slice can be present. For example, the sign data hiding enabled flag with a value of 1 can indicate that sign data hiding is enabled, and the sign data hiding enabled flag with a value of 0 can indicate that sign data hiding is not enabled. For example, the sign data hiding enabled flag with a value of 1 can indicate that the sign data hiding usage flag can be present, and the sign data hiding enabled flag with a value of 0 can indicate that the sign data hiding usage flag is not present. Further, for example, the sign data hiding enabled flag can be signaled in a sequence parameter set (SPS) syntax. Alternatively, for example, the sign data hiding enabled flag can be signaled in a picture header syntax or a slice header syntax. A syntax element of the sign data hiding enabled flag can be the above-described sps_sign_data_hiding_enabled_flag. Alternatively, a syntax element of the sign data hiding enabled flag can be the above-described sh_sign_data_hiding_enabled_flag.

[0478] Then, for example, the decoding device can obtain a transform skip residual coding (TSRC) enabled flag for whether TSRC is enabled for a transform skip block in a current slice. The picture information can include the TSRC enabled flag.

[0479] For example, the decoding device may obtain the TSRC enable flag based on the symbol data hiding enable flag. For example, the TSRC enable flag may be obtained 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., when the symbol data hiding enable flag indicates that symbol data hiding is not enabled), the TSRC enable flag may be obtained. In other words, for example, when the value of the symbol data hiding enable flag is 0 (i.e., when the symbol data hiding enable flag indicates that symbol data hiding is not enabled), the TSRC enable flag may be signaled. Furthermore, for example, when the value of the symbol data hiding 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 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.

[0480] Here, for example, the TSRC enable flag may be a flag for whether TSRC is enabled. That is, for example, the TSRC enable flag may be a flag indicating whether TSRC is enabled for a block in a slice. In other words, for example, the TSRC enable flag may be a flag indicating whether TSRC is enabled for a transform skip block in a slice. Here, the block may be a coding block (CB) or a transform block (TB). For example, a TSRC enable flag with a value of 1 may indicate that TSRC is not enabled, and a TSRC enable flag with 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. The TSRC enable flag may be referred to as a TSRC disable flag.

[0481] In addition, for example, the decoding device can obtain a dependent quantization enable flag. The decoding device can obtain image information including the dependent quantization enable flag through the bitstream. The image information may include the dependent quantization enable flag. For example, the dependent quantization enable flag may be a flag for whether dependent quantization is enabled. 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 usage flag indicating whether dependent quantization is used for the current slice. For example, a dependent quantization enable flag with a value of 1 may indicate that dependent quantization is enabled, and a dependent quantization enable flag with 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, a slice header syntax, or the like. The syntax element of the dependent quantization enable flag may be the above-mentioned sps_dep_quant_enabled_flag.

[0482] Furthermore, for example, the decoding device may obtain a transform skip enable flag. The decoding device may obtain image information including the transform skip enable flag from a bitstream. The image information may include the transform skip enable flag. For example, the transform skip enable flag may be a flag indicating whether transform skipping is enabled. For example, the transform skip enable flag may indicate whether transform skipping is enabled. That is, for example, the transform skip enable flag may indicate whether transform skipping 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 be present. For example, a transform skip enable flag with a value of 1 may indicate that transform skipping is enabled, and a transform skip enable flag with a value of 0 may indicate that transform skipping is not enabled. That is, for example, a transform skip enable flag with a value of 1 may indicate that a transform skip flag may be present, and a transform skip enable flag with a value of 0 may indicate that a transform skip flag is not present. Furthermore, for example, the transform skip enable flag may be signaled in the sequence parameter set (SPS) syntax. The syntax element for the transform skip enable flag may be the aforementioned sps_transform_skip_enabled_flag.

[0483] Furthermore, for example, the TSRC enable flag may be obtained based on the symbol data hiding enable flag and / or the 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 and a transform skip enable flag having a value of 1. That is, for example, when the symbol data hiding enable flag has a value of 0 (i.e., the symbol data hiding enable flag indicates that symbol data hiding is not enabled) and the transform skip enable flag has a value of 1 (i.e., when the transform skip enable flag indicates that transform skipping is enabled), the TSRC enable flag may be obtained (or signaled). Furthermore, for example, when the transform skip enable flag has a value of 0, the TSRC enable flag may not be obtained, and the value of the TSRC enable flag may be derived as 0. That is, for example, when the transform skip enable flag has a value of 0, the TSRC enable flag may not be signaled, and the value of the TSRC enable flag may be derived as 0.

[0484] In addition, for example, the decoding device may obtain residual coding information for the current block in the current slice based on the TSRC enable flag. The decoding device may obtain residual information for the current block in the current slice based on the TSRC enable flag. Here, the current block may be a coding block (CB) or a transform block (TB).

[0485] For example, the decoding device may determine the residual coding syntax for the current block in the current slice based on the TSRC enable flag. For example, the decoding device may determine the residual coding syntax for the current block to be one of regular residual coding (RRC) syntax and transform skipped residual coding (TSRC) syntax based on the TSRC enable flag. The RRC syntax may indicate syntax according to RRC, and the TSRC syntax may indicate syntax according to TSRC. In addition, for example, the current block may be a transform skipped block in the current slice. Here, the transform skipped block may mean a block to which a transform is not applied.

[0486] For example, the residual coding syntax for the current block in the current slice may be determined as a conventional residual coding (RRC) syntax based on a TSRC enable flag having a value of 1. In this case, for example, a transform skip flag for determining whether the current block is transform-skipped 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 for a transform-skipped block. The transform skip flag may indicate whether the current block is transform-skipped. That is, the transform skip flag may indicate whether a transform is applied to the transform coefficients of the current block. The syntax element representing the transform skip flag may be the above-mentioned transform_skip_flag. For example, when the value of the transform skip flag is 1, the transform skip flag may indicate that a transform is not applied to the current block (i.e., a transform is skipped), and when the value of the transform skip flag is 0, the transform skip flag may indicate that a transform is applied to the current block. For example, the value of the transform skip flag for the current block may be 1.

[0487] Furthermore, for example, the residual coding syntax for the current block may be determined as transform-skipped residual coding (TSRC) syntax based on a TSRC enable flag having a value of 0. Furthermore, for example, a transform skip flag may be obtained to determine whether the current block is transform-skipped, and the residual coding syntax for the current block may be determined as TSRC syntax based on a transform skip flag having a value of 1 and a transform-skipped residual coding (TSRC) enable flag having a value of 0. Furthermore, for example, a transform skip flag may be obtained to determine whether the current block is transform-skipped, and the residual coding syntax for the current block may be determined as regular residual coding (RRC) syntax based on a transform skip flag having a value of 0 and a TSRC enable flag having a value of 0.

[0488] Then, for example, the decoding device may obtain residual information of the determined residual coding syntax 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.

[0489] For example, when the residual coding syntax for the current block is determined to be 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 shown in Table 2 above.

[0490] For example, the residual information of the RRC syntax may include syntax elements for the transform coefficients of the current block. Here, the transform coefficients may be referred to as residual coefficients.

[0491] 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, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, abs_remainder, dec_abs_level_flag, and / or coeff_sign_flag.

[0492] 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 significant coefficient.

[0493] In addition, for example, the syntax element may include a coded subblock flag indicating whether a current subblock 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 indicating whether a coefficient level of the transform coefficient is greater than a first threshold, a parity level flag indicating parity of the coefficient level, and / or a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold. Here, the coded subblock 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.

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

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

[0496] In addition, for example, when symbol data hiding is applied to the current block, the sign flag of the first significant 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 sign flag indicating the sign of the first significant transform coefficient. In addition, for example, whether symbol data hiding is applied to the current block may be derived based on a symbol data hiding enable flag, and / or a position of the first significant transform coefficient and a position of the last significant transform coefficient of the current CG. For example, when the value of the symbol data hiding enable flag is 1 and a value obtained by subtracting the first significant transform coefficient position from the last significant transform coefficient position is greater than 3 (i.e., when the value of the symbol data hiding enable flag is 1 and the number of significant transform coefficients in the current CG is greater than 3), symbol data hiding may be applied to the current CG of the current block.

[0497] In addition, for example, when the residual coding syntax for the current block is determined to be TSRC syntax, the decoding device can obtain residual information of the TSRC syntax for the current block. For example, the residual information of the TSRC syntax can include the syntax elements shown in Table 3 above.

[0498] For example, the residual information of the TSRC syntax may include syntax elements for the transform coefficients of the current block. Here, the transform coefficients may be referred to as residual coefficients.

[0499] 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, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, and / or abs_remainder.

[0500] For example, a context-coded syntax element for a 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 indicating whether the coefficient level of the transform coefficient is greater than a first threshold; and / or a parity level flag indicating the parity of the coefficient level of the transform coefficient. Furthermore, for example, the context-coded syntax element may include a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold; a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third threshold; a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth threshold; and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the significant coefficient flag may be sig_coeff_flag; the sign flag may be coeff_sign_flag; the first coefficient level flag may be abs_level_gt1_flag; and the parity level flag may be par_level_flag. Furthermore, 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.

[0501] In addition, for example, the bypass coding syntax element of the transform coefficient may include coefficient level information of the value (or coefficient level) of the transform coefficient 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.

[0502] The decoding apparatus generates a reconstructed picture based on the image information (S1410). The decoding apparatus may generate a reconstructed sample / reconstructed picture of a current block of a current slice based on the image information.

[0503] For example, the decoding device may derive residual samples of the current block based on the residual coding information. For example, the decoding device may derive transform coefficients of the current block based on the residual coding information, and may derive residual samples of the current block based on the transform coefficients.

[0504] For example, the decoding device may derive the transform coefficients of the current block based on the syntax elements of the residual coding information. Thereafter, the decoding device may derive the residual samples of the current block based on the transform coefficients. For example, when it is deduced based on the transform skip flag that the transform is not applied to the current block, that is, when the value of the transform skip flag is 1, the decoding device may derive the transform coefficients as the residual samples of the current block. Alternatively, for example, when derived based on the transform skip flag without applying the transform to the current block, that is, when the value of the transform skip flag is 1, the decoding device may dequantize the transform coefficients to derive the residual samples of the current block. Alternatively, for example, when derived while applying the transform to the current block in the current slice based on the transform skip flag, that is, when the value of the transform skip flag for the current block is 0, the decoding device may inverse transform the transform coefficients to derive the residual samples of the current block. Alternatively, for example, when derived while applying a transform to the current block based on a transform skip flag, that is, when the value of the transform skip flag is 0, the decoding device may dequantize the transform coefficients and inversely transform the dequantized transform coefficients to derive residual samples of the current block.

[0505] In addition, for example, when sign data hiding is applied to the current block, the sign of the first significant transform coefficient of the current CG in the current block can be derived based on the sum of the absolute values ​​of the significant transform coefficients in the current CG. For example, when the sum of the absolute values ​​of the significant transform coefficients is an even number, the sign of the first significant transform coefficient can be derived as a positive value, and when the sum of the absolute values ​​of the significant transform coefficients is an odd number, the sign of the first significant transform coefficient can be derived as a negative value.

[0506] Then, for example, the decoding device may generate a reconstructed picture based on the residual samples. Furthermore, for example, the decoding device may obtain prediction information for the current block and derive prediction samples for the current block based on the prediction information. For example, the decoding device may derive prediction samples for the current block based on an inter-prediction mode or an intra-prediction mode determined based on the prediction information. Then, for example, the decoding device may generate reconstructed samples and / or a reconstructed picture for the current block based on the prediction samples and the residual samples. For example, the decoding device may generate the reconstructed samples by adding the prediction samples and the residual samples.

[0507] Thereafter, as described above, an in-loop filtering process such as an ALF process, SAO and / or deblocking filtering may be applied to the reconstructed picture as needed in order to improve the subjective / objective video quality.

[0508] Figure 15 A decoding device for performing the image decoding method according to the present disclosure is briefly illustrated. Figure 14 The method disclosed in Figure 15 Specifically, for example, Figure 15The entropy decoder of the decoding device can perform Figure 14 S1400, and Figure 15 The residual processor of the decoding device can perform Figure 14 In addition, although not shown, the process of receiving the prediction information of the current block may be performed by Figure 15 The entropy decoder of the decoding device is executed, and the process of deriving the prediction sample of the current block based on the prediction information can be performed by Figure 15 The predictor of the decoding device is executed.

[0509] According to this document, as described above, the efficiency of residual coding can be improved.

[0510] In addition, according to this document, the TSRC enable flag can be signaled based on the symbol data hiding enable flag, and by this, the coding efficiency can be improved by preventing symbol data hiding from being used for transform skip blocks in which TSRC is not enabled, and the overall residual coding efficiency can be improved by reducing the amount of bits to be encoded.

[0511] In addition, according to this document, the TSRC enable flag can be signaled based on the transform skip enable flag and the symbol data hiding enable flag, and through this, the coding efficiency can be improved by preventing symbol data hiding for transform skip blocks that do not enable TSRC, and the overall residual coding efficiency can be improved by reducing the amount of bits to be encoded.

[0512] In the above embodiments, method is described based on the flow chart with a series of steps or square frames. The present disclosure is not limited to the order of the above steps or square frames. Some steps or square frames can be performed in an order different from the above-mentioned other steps or square frames 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 may also include other steps, or may delete one or more steps in the flow chart without affecting the scope of the present disclosure.

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

[0514] In addition, the decoding device and encoding device to which the present disclosure is applied may be included in the following devices: multimedia broadcast transmission / reception 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 to which the present disclosure is applied may 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-accessible televisions, home theater systems, smartphones, tablet computers, digital video recorders (DVRs), and the like.

[0515] 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 (for example, 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 through a wired / wireless communication network.

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

[0517] Figure 16 A structural diagram of a content streaming system to which the present disclosure is applied is illustrated.

[0518] A 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.

[0519] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, or camcorder into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, when the multimedia input device such as a smartphone, camera, or camcorder directly generates the bitstream, the encoding server can be omitted.

[0520] A bitstream may be generated by an encoding method or a bitstream generating method to which an embodiment of the present disclosure is applied, and a streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0521] The streaming server transmits multimedia data to user devices via a network server based on user requests, and the network server serves as an intermediary for notifying users of services. When a user requests a desired service from the network server, the network server delivers the request to the streaming server, which then transmits the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control commands and responses between devices within the content streaming system.

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

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

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

Claims

1. An image decoding method performed by a decoding device, the image decoding method comprising the following steps: Obtain image information; as well as generating a reconstructed picture based on the image information, The step of obtaining the image information includes: Get the symbol data hiding enable flag for whether to enable symbol data hiding; Get the TSRC disable flag for whether to enable transform skip residual coding TSRC for the transform skip block in the current slice, The TSRC disable flag is obtained based on the symbol data hiding enable flag.

2. A method for encoding an image performed by an encoding device, the method comprising the following steps: Generate a reconstructed image for the current slice; as well as Encoding image information for the current slice, The step of encoding the image information includes: encoding a symbol data hiding enable flag indicating whether symbol data hiding is enabled; and A TSRC disable flag indicating whether transform skip residual coding (TSRC) is used for a transform skip block in the current slice is encoded based on the symbol data hiding enable flag.

3. A method for transmitting data for image information, the method comprising the following steps: Generate a reconstructed image for the current slice; Encoding image information for the current slice; generating a bit stream including the image information; as well as sending said data comprising said bitstream, The step of encoding the image information includes: encoding a symbol data hiding enable flag indicating whether symbol data hiding is enabled; and A TSRC disable flag indicating whether transform skip residual coding (TSRC) is used for a transform skip block in the current slice is encoded based on the symbol data hiding enable flag.

Citation Information

Patent Citations

  • Intra DC prediction for lossless coding in video coding

    US20140286412A1