Method for decoding image for residual coding and device therefor

The image decoding method and apparatus address the challenge of efficiently coding high-resolution images by simplifying residual data coding and improving residual coefficient derivation, resulting in enhanced coding efficiency and reduced complexity.

JP2025092556AActive Publication Date: 2025-06-19LG ELECTRONICS INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2025051791
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-08-31
Filing Date
2025-03-26
Publication Date
2025-06-19
Estimated Expiration
2040-08-26

AI Technical Summary

Technical Problem

The increasing demand for high-resolution and high-quality images has led to a need for more efficient image coding technologies to reduce transmission and storage costs.

Method used

An image decoding method and apparatus that improves coding efficiency by acquiring image information, deriving prediction and residual coefficients, and reconstructing image blocks without performing level mapping in the image coding system.

Benefits of technology

The proposed solution enhances residual coding efficiency and reduces coding complexity by deriving residual coefficients through simplified residual data coding, thereby improving overall image coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025092556000001_ABST
    Figure 2025092556000001_ABST
Patent Text Reader

Abstract

To provide a method for decoding an image executed by a decoder.SOLUTION: The method for decoding an image executed by a decoder in the present document includes the steps of: acquiring prediction mode information and image information including residual information by a bit stream; deriving a prediction mode of a current block on the basis of the prediction mode information; deriving a prediction sample on the basis of the prediction mode; deriving the current residual coefficient on the basis of a residual syntax element of the current residual coefficient in the curent block; deriving a residual sample on the basis of the current residual coefficient; and deriving a restoration sample of the current block on the basis of the prediction sample and the residual sample.SELECTED DRAWING: Figure 14
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 an image decoding method and apparatus for coding simplified residual data without performing level mapping in an image coding system.

Background Art

[0002] Recently, the demand for high-resolution and high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images has been increasing in various fields. As the image data becomes higher in resolution and quality, the amount of information or bits to be transmitted relatively increases compared to existing image data. Therefore, when transmitting image data using a medium such as an existing wired or wireless broadband line, or storing image data using an existing recording medium, the transmission cost and storage cost increase.

[0003] Accordingly, in order to effectively transmit, store, and reproduce information of high-resolution and high-quality images, a highly efficient image compression technology is required.

Summary of the Invention

Problems to be Solved by the Invention

[0004] The technical problem of this document is to provide a method and apparatus for increasing image coding efficiency.

[0005] Another technical problem of this document is to provide a method and apparatus for increasing the efficiency of residual coding.

Means for Solving the Problems

[0006] According to one embodiment of the present document, an image decoding method executed by a decoding device is provided. The method includes: acquiring image information including prediction mode information and residual information via a bitstream; deriving a prediction mode of a current block based on the prediction mode information; deriving a prediction sample based on the prediction mode; deriving the current residual coefficient based on a residual syntax element or the like for the current residual coefficient in the current block; deriving a residual sample based on the current residual coefficient; and deriving a restored sample of the current block based on the prediction sample and the residual sample.

[0007] According to another embodiment of the present document, a decoding device that executes image decoding is provided. The decoding device includes: an entropy decoding unit that acquires image information including prediction mode information and residual information via a bitstream; a prediction unit that derives a prediction mode of a current block based on the prediction mode information and derives a prediction sample based on the prediction mode; a residual processing unit that derives the current residual coefficient based on a residual syntax element or the like for the current residual coefficient in the current block and derives a residual sample based on the current residual coefficient; and an addition unit that derives a restored sample of the current block based on the prediction sample and the residual sample.

[0008] According to another embodiment of the present document, a video encoding method executed by an encoding device is provided. The method includes steps of deriving prediction samples of a current block based on inter prediction or intra prediction, deriving residual samples of the current block based on the prediction samples, deriving current residual coefficients based on the residual samples, and encoding image information including prediction mode information representing a prediction mode of the current block and residual syntax elements for the current residual coefficients.

[0009] According to another embodiment of the present document, a video encoding device is provided. The encoding device includes a prediction unit that derives prediction samples of a current block based on inter prediction or intra prediction, a residual processing unit that derives residual samples of the current block based on the prediction samples and derives current residual coefficients based on the residual samples, and an entropy encoding unit that encodes image information including prediction mode information representing a prediction mode of the current block and residual syntax elements for the current residual coefficients.

Advantages of the Invention

[0010] According to the present document, the efficiency of residual coding can be improved.

[0011] According to the present document, residual coefficients to which simplified residual data coding is applied can be derived without performing level mapping, reducing coding complexity and improving overall residual coding efficiency.

Brief Description of the Drawings

[0012]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Embodiments for Carrying Out the Invention

[0013] This document can be modified in various ways and can have various embodiments. Specific embodiments are illustrated in the drawings and will be described in detail. However, this is not intended to limit this document to specific embodiments. The terms commonly used in this specification are merely used to describe specific embodiments and are not used with the intention of limiting the technical idea of this document. Singular expressions include plural expressions unless the context clearly indicates otherwise. Terms such as "including" or "having" in this specification are intended to specify the existence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and it should be understood that the existence or possibility of addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof is not precluded in advance.

[0014] On the other hand, each configuration in the drawings described in this document is independently illustrated for the convenience of explaining different characteristic functions, and it does not mean that each configuration is realized by separate hardware or separate software. For example, among the configurations, two or more configurations can be combined to form one configuration, and one configuration can also be divided into multiple configurations. Embodiments in which each configuration is integrated and / or separated are included in the scope of rights of this document as long as they do not deviate from the essence of this document.

[0015] Hereinafter, with reference to the accompanying drawings, preferred embodiments of this document will be described in more detail. Hereinafter, the same reference numerals are used for the same components in the drawings, and overlapping descriptions of the same components can be omitted.

[0016] Figure 1 schematically shows an example of a video / image coding system to which an embodiment of this document can be applied.

[0017] As shown in Figure 1, the video / image coding system can include a first device (source device) and a second device (receiver device). The source device can transmit encoded video / image information or data to the receiver device via a digital recording medium or a network in file or streaming form.

[0018] The source device can include a video source, an encoding device, and a transmission unit. The receiver device can include a reception unit, a decoding device, and a renderer. 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. A transmitter can be included in the encoding device. A receiver can be included in the decoding device. The renderer can include a display unit, and the display unit can also be composed of a separate device or an external component.

[0019] The video source can obtain video / images through processes such as video / image capture, synthesis, or generation. The video source can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. The video / image generation device can include, for example, a computer, a tablet, and a smartphone, etc., and can (electronically) generate video / images. For example, virtual video / images can be generated via a computer, etc., in which case the video / image capture process can be replaced during the process of generating related data.

[0020] The encoding device can encode input video / images. The encoding device can execute a series of procedures such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.

[0021] The transmitting unit can transmit the encoded video / image information or data output in the form of a bitstream to the receiving unit of the receiving device via a digital recording medium or a network in file or streaming form. The digital recording medium can include various recording media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit can include elements for generating a media file via a predetermined file format and can include elements for transmission via a broadcast / communication network. The receiving unit can receive / extract the bitstream and transmit it to the decoding device.

[0022] The decoding device can decode video / images by executing a series of procedures such as inverse quantization, inverse transformation, prediction, etc. corresponding to the operation of the encoding device.

[0023] The renderer can render the decoded video / images. The rendered video / images can be displayed via the display unit.

[0024] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to the methods disclosed in the VVC (versatile video coding) standard, EVC (essential video coding) standard, AV1 (AOMedia Video 1) standard, AVS2 (2nd generation of audio video coding standard), or next-generation video / image coding standards (e.g., H.267 or H.268, etc.).

[0025] In this document, various embodiments related to video / image coding are presented, and unless otherwise noted, the embodiments can also be implemented in combination with each other.

[0026] In this document, video may mean a collection of a series of images over time. Picture generally means a unit indicating one image in a specific time period, and subpicture / slice / tile is a unit that constitutes a part of a picture in coding. A subpicture / slice / tile may include one or more CTUs (coding tree units). One picture may be composed of one or more subpictures / slices / titles. One picture may be composed of a group of one or more tiles. One tile group may include one or more tiles. A brick represents a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each of which consisting of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may be also referred to as a brick.A brick scan indicates a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. Also, a subpicture represents a rectangular region of one or more slices within a picture. That is, a subpicture contains one or more slices that collectively cover a rectangular region of a picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture.The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set. The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the width of the picture. A tile scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture.A slice includes an integer number of bricks of a picture that maybe exclusively contained in a single NAL unit. A slice may consists of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile. In this document, tile group and slice may be used interchangeably. For example, in this document, tile group / tile group header may be called slice / slice header.

[0027] A pixel or pel can mean the smallest unit that makes up a picture (or image). Also, the term "sample" can be used as the term corresponding to a pixel. A sample can generally indicate a pixel or a pixel value, and can also indicate only the pixel / pixel value of the luma component, or only the pixel / pixel value of the chroma component.

[0028] A unit can indicate the basic unit of image processing. A unit can include at least one of a specific area of a picture and information related to that area. One unit can include one luma block and two chroma (e.g., cb, cr) blocks. A unit can, in some cases, be used interchangeably with terms such as block or area. In general, an M×N block can include a set (or array) of samples (or sample array) consisting of M columns and N rows, or a set (or array) of transform coefficients.

[0029] 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, in this specification, "A, B, or C" may mean "only A", "only B", "only C", or "any combination of A, B, and C".

[0030] The slashes ( / ) and commas used in this specification may mean "and / or". For example, "A / B" may mean "A and / or B". Thus, "A / B" may mean "only A", "only B", or "both A and B". For example, "A, B, C" may mean "A, B, or C".

[0031] In this specification, "at least one of A and B" may mean "only A", "only B", or "both A and B". Also, in this specification, expressions such as "at least one of A or B" and "at least one of A and / or B" may be interpreted in the same way as "at least one of A and B".

[0032] Also, in this specification, "at least one of A, B and C" may mean "only A", "only B", "only C" or "any combination of A, B and C". Also, "at least one of A, B or C" and "at least one of A, B and / or C" may mean "at least one of A, B and C".

[0033] Also, the parentheses used in this specification may mean "for example". Specifically, when it is displayed as "prediction (intra prediction)", "intra prediction" may be proposed as an example of "prediction". In other words, the "prediction" in this specification is not limited to "intra prediction", and "intra prediction" may be proposed as an example of "prediction". Also, when it is displayed as "prediction (that is, intra prediction)", "intra prediction" may be proposed as an example of "prediction".

[0034] The technical features described individually in one drawing in this specification may be realized individually or simultaneously.

[0035] The following drawings are created to explain a specific example of this specification. Since the names of the specific devices and the names of the specific signals / messages / fields described in the drawings are presented exemplarily, the technical features of this specification are not limited to the specific names used in the following drawings.

[0036] FIG. 2 is a diagram schematically explaining the configuration of a video / image encoding device to which the embodiment of this document can be applied. Hereinafter, the video encoding device can include an image encoding device.

[0037] As shown in FIG. 2, the encoding apparatus 200 can be configured to include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 can include an inter-predictor 221 and an intra-predictor 222. The residual processor 230 can include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 can further include a subtractor 231. The adder 250 can be called a reconstructor or a reconstructed block generator. The above-described image partitioner 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filter 260 can be configured by one or more hardware components (e.g., an encoder chipset or a processor) according to an embodiment. Also, the memory 270 can include a DPB (decoded picture buffer) and can also be configured by a digital recording medium. The hardware component can further include the memory 270 as an internal / external component.

[0038] The image segmentation unit 210 can divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. As an example, the processing unit can be called a coding unit (CU). In this case, the coding unit can be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) by a QTBTTT (Quad-tree binary-tree ternary-tree) structure. For example, one coding unit can be divided into a plurality of coding units with a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure can be applied first, and the binary-tree structure and / or the ternary structure can be applied later. Or the binary-tree structure can also be applied first. The coding procedure according to this document can be executed based on the final coding unit that cannot be further divided. In this case, based on the coding efficiency according to the image characteristics, etc., the largest coding unit can be immediately used as the final coding unit, or, if necessary, the coding unit can be recursively divided into coding units with a deeper depth, and the coding unit with the optimal size can be used as the final coding unit. Here, the coding procedure can include procedures such as prediction, transformation, and restoration described later. As another example, the processing unit can further include a prediction unit (PU: Prediction Unit) or a transform unit (TU: Transform Unit). In this case, the prediction unit and the transform unit can each be divided or partitioned from the aforementioned final coding unit.The prediction unit is a unit of sample prediction, and the conversion unit is a unit for deriving a conversion coefficient and / or a unit for deriving a residual signal from the conversion coefficient.

[0039] A unit can, in some cases, be used interchangeably with terms such as a block or an area. In general, an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luma component, or only the pixel / pixel value of the chroma component. A sample can be used as a term corresponding to a pixel or a pel for one picture (or image).

[0040] The encoding device 200 can subtract a prediction signal (predicted block, predicted sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, the unit that subtracts the prediction signal (predicted block, predicted sample array) from the input image signal (original block, original sample array) in the encoder 200 can be called the subtraction unit 231. The prediction unit can perform prediction on a block to be processed (hereinafter referred to as the current block) and generate a predicted block including predicted samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit can generate various pieces of information related to prediction, such as prediction mode information, and transmit them to the entropy encoding unit 240 as described later in the description of each prediction mode. The information related to prediction can be encoded by the entropy encoding unit 240 and output in the form of a bit stream.

[0041] The intra prediction unit 222 can predict the current block by referring to samples within the current picture. The samples to be referred can be located in the neighborhood of the current block according to the prediction mode, or can also be located remotely. In intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes can include, for example, the DC mode and the Planar Mode. The directional modes can include, for example, 33 directional prediction modes or 65 directional prediction modes according to the degree of fineness of the prediction direction. However, this is only an example, and more or fewer directional prediction modes can be used according to the setting. The intra prediction unit 222 can also determine the prediction mode to be applied to the current block by using the prediction mode applied to the adjacent blocks.

[0042] The inter prediction unit 221 can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between adjacent 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 adjacent 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 may be the same or different. The temporal neighboring block can be called by names such as a collocated reference block and a collocated CU (colCU), and the reference picture including the temporal neighboring block can also be called a collocated picture (colPic). For example, the inter prediction unit 221 can configure a motion information candidate list based on adjacent blocks and generate information indicating which candidates are used to derive the motion vector and / or reference picture index of the current block. Inter prediction can be performed based on various prediction modes. For example, in the case of the skip mode and the merge mode, the inter prediction unit 221 can use the motion information of adjacent blocks as the motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of the motion information prediction (motion vector prediction, MVP) mode, the motion vector of an adjacent block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0043] The prediction unit 220 can generate a prediction signal based on various prediction methods described later. For example, for the prediction of one block, the prediction unit can not only apply intra prediction or inter prediction, but also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP). Also, the prediction unit can be based on the intra block copy (IBC) prediction mode or the palette mode for the prediction of the block. The IBC prediction mode or the palette mode can be used for content image / video coding such as games, for example, like SCC (screen content coding). IBC basically performs prediction within the current picture, but can be executed similarly to inter prediction in terms of deriving a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, the sample values in the picture can be signaled based on the information regarding the palette table and the palette index.

[0044] The prediction signal generated via the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) can be used to generate a restored signal or can be used to generate a residual signal. The conversion unit 232 can generate transform coefficients by applying a conversion technique to the residual signal. For example, the conversion technique can include at least one of DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen-Loeve Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Here, GBT means the conversion obtained from this graph when the relationship information between pixels is represented by a graph. CNT means the conversion obtained based on generating a prediction signal using all previously reconstructed pixels. Also, the conversion process can be applied to a pixel block having the same size of a square, and can also be applied to a non-square, variable-size block.

[0045] The quantization unit 233 quantizes the transform coefficients and transmits them to the entropy encoding unit 240. The entropy encoding unit 240 can encode the quantized signal (information regarding the quantized transform coefficients) and output it as a bitstream. The information regarding the quantized transform coefficients can be referred to as residual information. The quantization unit 233 can reorder the quantized transform coefficients in block form into a one-dimensional vector form based on the coefficient scan order, and can also generate the information regarding the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit 240 can execute various encoding methods such as, for example, exponential Golomb, CAVLC (context-adaptive variable length coding), CABAC (context-adaptive binary arithmetic coding), etc. The entropy encoding unit 240 can encode, together or separately, in addition to the quantized transform coefficients, information necessary for video / image restoration (e.g., values of syntax elements, etc.). 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) units. The video / image information can further include information regarding various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). Also, the video / image information can further include general constraint information. In this document, the information and / or syntax elements transmitted / signaled from the encoding device to the decoding device can be included in the video / image information. The video / image information can be encoded through the above-described encoding procedure and included in the bitstream.The bitstream can be transmitted via a network or stored in a digital recording medium. Here, the network can include a broadcast network and / or a communication network, etc., and the digital recording medium can include various recording media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The signal output from the entropy encoding unit 240 can be configured such that a transmitting unit (not shown) for transmission and / or a storing unit (not shown) for storage are internal / external elements of the encoding device 200, or the transmitting unit can also be included in the entropy encoding unit 240.

[0046] The quantized transform coefficients output from the quantization unit 233 can be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) can be restored by applying inverse quantization and inverse transformation to the quantized transform coefficients via the inverse quantization unit 234 and the inverse transformation unit 235. The addition unit 250 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the restored residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the block to be processed, as in the case where the skip mode is applied, the predicted block can be used as the reconstructed block. The addition unit 250 can be called a restoration unit or a reconstructed block generation unit. The generated reconstructed signal can be used for intra prediction of the next block to be processed within the current picture, and as will be described later, can also be used for inter prediction of the next picture after passing through filtering.

[0047] On the other hand, LMCS (luma mapping with chroma scaling) can also be applied during the picture encoding and / or restoration process.

[0048] The filtering unit 260 can apply filtering to the restored signal to improve the subjective / objective image quality. For example, the filtering unit 260 can apply various filtering methods to the restored picture to generate a modified restored picture, and store the modified restored picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit 260 can generate various information related to filtering and transmit it to the entropy encoding unit 240 as will be described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoding unit 240 and output in the form of a bitstream.

[0049] The modified restored picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 221. When inter prediction is applied through this, the encoding device can avoid prediction mismatches between the encoding device 200 and the decoding device 300, and can also improve the encoding efficiency.

[0050] The memory 270 DPB can store the modified restored picture for use as a reference picture in the inter prediction unit 221. The memory 270 can store the motion information of the blocks for which the motion information in the current picture has been derived (or encoded) and / or the motion information of the blocks in the already restored picture. The stored motion information can be transmitted to the inter prediction unit 221 for utilization as the motion information of spatially adjacent blocks or temporally adjacent blocks. The memory 270 can store the restored samples of the restored blocks in the current picture and transmit them to the intra prediction unit 222.

[0051] FIG. 3 is a diagram schematically illustrating the configuration of a video / image decoding apparatus to which an embodiment of this document can be applied.

[0052] As shown in FIG. 3, the decoding apparatus 300 can be configured to include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 can include an inter-predictor 331 and an intra-predictor 332. The residual processor 320 can include a dequantizer 321 and an inverse transformer 322. The entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 described above can be configured by one hardware component (for example, a decoder chipset or a processor) according to an embodiment. Also, the memory 360 can include a DPB (decoded picture buffer) and can also be configured by a digital recording medium. The hardware component can further include the memory 360 as an internal / external component.

[0053] When a bitstream including video / image information is input, the decoding device 300 can restore an image corresponding to the process in which the video / image information was processed by the encoding device in FIG. 2. For example, the decoding device 300 can derive units / blocks based on the block division related information obtained from the bitstream. The decoding device 300 can perform decoding using the processing units applied in the encoding device. Therefore, the processing unit for decoding is, for example, a coding unit, and the coding unit can be divided according to a quad tree structure, a binary tree structure, and / or a ternary tree structure from a coding tree unit or a maximum coding unit. One or more transform units can be derived from the coding unit. Then, the restored image signal decoded and output via the decoding device 300 can be reproduced via a reproducing device.

[0054] The decoding device 300 can receive the signal output from the encoding device in FIG. 2 in the form of a bitstream, and the received signal can be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 can parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information can further include information regarding various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). Also, the video / image information can further include general constraint information. The decoding device can further decode a picture based on the information regarding the parameter set and / or the general constraint information. The signaling / received information and / or syntax elements described later in this document can be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 can decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements necessary for image restoration, quantized values of transform coefficients regarding residuals, etc. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using the syntax element information to be decoded, the surrounding and decoded information of the block to be decoded, or the information of symbols / bins decoded in the previous step, predicts the occurrence probability of a bin based on the determined context model, and executes arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. At this time, the CABAC entropy decoding method can update the context model using the information of the symbol / bin decoded for the context model of the next symbol / bin after determining the context model.Of the information decoded by the entropy decoding unit 310, the information related to prediction is provided to the prediction unit (inter prediction unit 332 and intra prediction unit 331), and the residual value for which entropy decoding is executed by the entropy decoding unit 310, that is, the quantized transform coefficient and related parameter information can be input to the residual processing unit 320. The residual processing unit 320 can derive a residual signal (residual block, residual sample, residual sample array). Also, of the information decoded by the entropy decoding unit 310, the information related to filtering can be provided to the filtering unit 350. On the other hand, a receiving unit (not shown) that receives a signal output from the encoding device can be further configured as an internal / external element of the decoding device 300, or the receiving unit is a component of the entropy decoding unit 310. On the other hand, the decoding device according to this document can be called a video / image / picture decoding device, and the decoding device can also be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder can include the entropy decoding unit 310, and the sample decoder can include at least one of the inverse quantization unit 321, inverse transform unit 322, addition unit 340, filtering unit 350, memory 360, inter prediction unit 332, and intra prediction unit 331.

[0055] In the inverse quantization unit 321, the quantized transform coefficient can be inverse quantized to output a transform coefficient. The inverse quantization unit 321 can reorder the quantized transform coefficients in a two-dimensional block form. In this case, the reordering can be executed based on the coefficient scan order executed by the encoding device. The inverse quantization unit 321 can execute inverse quantization on the quantized transform coefficient using a quantization parameter (for example, quantization step size information) to obtain a transform coefficient.

[0056] In the inverse transformation unit 322, the transformation coefficients are inversely transformed to obtain a residual signal (residual block, residual sample array).

[0057] The prediction unit can perform a prediction on the current block and generate a predicted block including predicted samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied to the current block based on the information regarding the prediction output from the entropy decoding unit 310, and can determine a specific intra / inter prediction mode.

[0058] The prediction unit 320 can generate a prediction signal based on various prediction methods described later. For example, the prediction unit can not only apply intra prediction or inter prediction for the prediction of one block, but also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP). Also, the prediction unit can be based on the intra block copy (IBC) prediction mode or the palette mode for the prediction of a block. The IBC prediction mode or the palette mode can be used for content image / video coding such as games, for example, like SCC (screen content coding). IBC basically performs prediction within the current picture, but can be executed similarly to inter prediction in terms of deriving a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, information regarding the palette table and the palette index can be included in and signaled in the video / image information.

[0059] The intra prediction unit 331 can predict the current block by referring to samples within the current picture. The samples to be referred can be located in the neighborhood of the current block or at a distance therefrom, depending on the prediction mode. In intra prediction, the prediction mode can include a plurality of non - directional modes and a plurality of directional modes. The intra prediction unit 331 can also determine the prediction mode to be applied to the current block by using the prediction mode applied to an adjacent block.

[0060] The inter prediction unit 332 can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted from the inter prediction mode, the motion information can be predicted in units of blocks, sub - blocks, or samples based on the correlation of the motion information between an adjacent block 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 adjacent blocks can include spatial neighboring blocks existing within the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter prediction unit 332 can construct a motion information candidate list based on adjacent blocks and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter prediction can be executed based on various prediction modes, and the information regarding the prediction can include information indicating the mode of inter prediction for the current block.

[0061] The adder 340 can generate a restored signal (restored picture, restored block, restored sample array) by adding the acquired residual signal to the predicted signal (predicted block, predicted sample array) output from the prediction unit (including the inter-prediction unit 332 and / or the intra-prediction unit 331). When there is no residual for the block to be processed, as in the case where the skip mode is applied, the predicted block can be used as the restored block.

[0062] The adder 340 can be referred to as a restoration unit or a restored block generation unit. The generated restored signal can be used for intra-prediction of the next block to be processed in the current picture, can be output after filtering as described later, or can also be used for inter-prediction of the next picture.

[0063] On the other hand, LMCS (luma mapping with chroma scaling) can also be applied during the picture decoding process.

[0064] The filtering unit 350 can apply filtering to the restored signal to improve the subjective / objective image quality. For example, the filtering unit 350 can apply various filtering methods to the restored picture to generate a modified restored picture, and can transmit the modified restored picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

[0065] The (corrected) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter prediction unit 332. The memory 360 can store the motion information of the blocks for which the motion information in the current picture has been derived (or decoded) and / or the motion information of the blocks in the already reconstructed picture. The stored motion information can be transmitted to the inter prediction unit 260 for utilization as the motion information of spatially adjacent blocks or temporally adjacent blocks. The memory 360 can store the reconstructed samples of the reconstructed blocks in the current picture and can transmit them to the intra prediction unit 331.

[0066] In this specification, the embodiments described in the filtering unit 260, the inter prediction unit 221, and the intra prediction unit 222 of the encoding apparatus 200 can be applied in the same or corresponding manner to the filtering unit 350, the inter prediction unit 332, and the intra prediction unit 331 of the decoding apparatus 300, respectively.

[0067] In this document, at least one of quantization / inverse quantization and / or transform / inverse transform can be omitted. When the quantization / inverse quantization is omitted, the quantized transform coefficients can be called transform coefficients. When the transform / inverse transform is omitted, the transform coefficients can be called coefficients or residual coefficients, or can still be called transform coefficients for the sake of consistency of expression.

[0068] In this document, the quantized transform coefficients and the transform coefficients can be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, the residual information can include information regarding the transform coefficients (etc.), and the information regarding the transform coefficients (etc.) can be signaled via a residual coding syntax. The transform coefficients can be derived based on the residual information (or the information regarding the transform coefficients (etc.)), and the scaled transform coefficients can be derived via an inverse transform (scaling) with respect to the transform coefficients. Residual samples can be derived based on an inverse transform (transformation) with respect to the scaled transform coefficients. This can be similarly applied / expressed in other parts of this document.

[0069] As described above, in performing video coding, prediction is performed to increase the compression efficiency. Through this, a predicted block including prediction samples for a current block, which is a block to be coded, can be generated. Here, the predicted block includes prediction samples in the spatial domain (or pixel domain). The predicted block is derived identically in an encoding device and a decoding device, and the encoding device can increase the image coding efficiency by signaling information regarding a residual (residual information) between the original block, which is not the original sample value of the original block itself, and the predicted block to the decoding device. The decoding device can derive a residual block including residual samples based on the residual information, and can generate a restored block including restored samples by combining the residual block and the predicted block, and can generate a restored picture including the restored block.

[0070] The residual information can be generated through conversion and quantization procedures. For example, an encoding device can derive a residual block between the original block and the predicted block, perform a conversion procedure on the residual samples (residual sample array) included in the residual block to derive conversion coefficients, perform a quantization procedure on the conversion coefficients to derive quantized conversion coefficients, and signal the related residual information (via a bitstream) to a decoding device. Here, the residual information can include information such as the value information, position information, conversion technique, conversion kernel, quantization parameter, etc. of the quantized conversion coefficients. The decoding device can perform an inverse quantization / inverse conversion procedure based on the residual information to derive residual samples (or a residual block). The decoding device can generate a restored picture based on the predicted block and the residual block. The encoding device can further inverse quantize / inverse convert the quantized conversion coefficients to derive a residual block for reference for inter prediction of subsequent pictures, and generate a restored picture based on this.

[0071] Intra prediction can represent a prediction that generates prediction samples for a current block based on reference samples within a picture (hereinafter, the current picture) to which the current block belongs. When intra prediction is applied to the current block, peripheral reference samples to be used for intra prediction of the current block can be derived. The peripheral reference samples of the current block can include a total of 2×nH samples adjacent to the left boundary of the current block of size nW×nH and adjacent to the bottom-left, samples adjacent to the top boundary of the current block and a total of 2×nW samples adjacent to the top-right, and 1 sample adjacent to the top-left of the current block. Alternatively, the peripheral reference samples of the current block can also include a plurality of columns of upper peripheral samples and a plurality of rows of left peripheral samples. Further, the peripheral reference samples of the current block can include a total of nH samples adjacent to the right boundary of the current block of size nW×nH, a total of nW samples adjacent to the bottom boundary of the current block, and 1 sample adjacent to the bottom-right of the current block.

[0072] However, some of the peripheral reference samples of the current block may not have been decoded yet or may not be available. In this case, the decoder can substitute unavailable samples with available samples to form peripheral reference samples to be used for prediction. Alternatively, peripheral reference samples to be used for prediction can be formed through interpolation of available samples.

[0073] When a peripheral reference sample is derived, (i) a predicted sample can be derived based on the average or interpolation of neighboring reference samples of the current block, and (ii) the predicted sample can also be derived based on reference samples that exist in a specific (predicted) direction with respect to the predicted sample among the neighboring reference samples of the current block. In the case of (i), it can be called a non-directional mode or a non-angular mode, and in the case of (ii), it can be called a directional mode or an angular mode.

[0074] Also, among the peripheral reference samples, the predicted sample can be generated by interpolation between a first peripheral sample located in the prediction direction of the intra prediction mode of the current block and a second peripheral sample located in the direction opposite to the prediction direction, with respect to the predicted sample of the current block. In the case described above, it can be called Linear interpolation intra prediction (LIP). Also, a chroma predicted sample can be generated based on luma samples using a linear model (LM). In this case, it can be called the LM mode or the CCLM (chroma component LM) mode.

[0075] Also, a temporary predicted sample of the current block can be derived based on the filtered peripheral reference samples, and the predicted sample of the current block can be derived by weighted sum of at least one reference sample derived by the intra prediction mode among the existing peripheral reference samples, that is, the peripheral reference samples that have not been filtered, and the temporary predicted sample. In the case described above, it can be called PDPC (Position dependent intra prediction).

[0076] Also, among the peripheral multiple-reference sample lines of the current block, the reference sample line with the highest prediction accuracy is selected, and a prediction sample is derived using the reference sample located in the prediction direction on this line. At this time, intra prediction coding can be performed by a method of instructing (signaling) the used reference sample line to the decoding device. In the case described above, it can be called multi-reference line intra prediction or MRL-based intra prediction.

[0077] Also, the current block is divided into vertical or horizontal sub-partitions and intra prediction is performed based on the same intra prediction mode, but peripheral reference samples can be derived and used in units of the sub-partitions. That is, in this case, although the intra prediction mode for the current block is similarly applied to the sub-partitions, by deriving and using peripheral reference samples in units of the sub-partitions, the intra prediction performance can be improved in some cases. Such a prediction method can be called ISP (intra sub-partitions)-based intra prediction.

[0078] The intra prediction methods described above can be called intra prediction types, distinguished from the intra prediction modes. The intra prediction type can be called by various terms such as intra prediction techniques or additional intra prediction modes. For example, the intra prediction type (or additional intra prediction mode, etc.) can include at least one of LIP, PDPC, MRL, and ISP described above. The general intra prediction method excluding specific intra prediction types such as LIP, PDPC, MRL, and ISP can be called the normal intra prediction type. The normal intra prediction type can be generally applied when the above specific intra prediction types are not applicable, and prediction can be performed based on the intra prediction mode described above. On the other hand, post-processing filtering can also be performed on the prediction samples derived as needed.

[0079] Specifically, the intra prediction procedure can include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and an intra prediction mode / type-based predicted sample derivation step. Also, if necessary, a post-filtering step for the derived predicted samples can be performed.

[0080] When intra prediction is applied, the intra prediction mode applied to the current block is determined using the intra prediction modes of the surrounding blocks. For example, the decoding device can select any one of the MPM (most probable mode) candidates in the MPM list derived based on the intra prediction modes of the surrounding blocks (e.g., left and / or upper surrounding blocks) of the current block and additional candidate modes according to the received MPM index, or can select any one of the remaining intra prediction modes not included in the MPM candidates (and the planner mode) based on the information of the remaining intra prediction modes. The MPM list is configured to include or not include the planner mode as a candidate. For example, when the MPM list includes the planner mode as a candidate, the MPM list can have six candidates, and when the MPM list does not include the planner mode as a candidate, the MPM list can have five candidates. When the MPM list does not include the planner mode as a candidate, a not planner flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not the planner mode can be signaled. For example, the MPM flag can be signaled first, and the MPM index and the not planner flag can be signaled when the value of the MPM flag is 1. Also, the MPM index can be signaled when the value of the not planner flag is 1. Here, the reason for configuring the MPM list not to include the planner mode as a candidate is to first signal a flag (not planar flag) to confirm whether it is the planner mode earlier because the planner mode is always considered as an MPM rather than not being an MPM.

[0081] For example, whether the intra prediction mode currently applied to a block is within the MPM candidates (and the planner mode) or within the remaining modes is indicated based on the MPM flag (e.g., intra_luma_mpm_flag). A value of 1 for the MPM flag indicates that the intra prediction mode for the current block is within the MPM candidates (and the planner mode), and a value of 0 for the MPM flag indicates that the intra prediction mode for the current block is not within the MPM candidates (and the planner mode). A value of 0 for the not planner flag (e.g., intra_luma_not_planar_flag) indicates that the intra prediction mode for the current block is the planner mode, and a value of 1 for the not planner flag indicates that the intra prediction mode for the current block is not the planner mode. The MPM index can be signaled in the form of the mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information can be signaled in the form of the rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information can index and point to one of the remaining intra prediction modes not included in the MPM candidates (and the planner mode) among the overall intra prediction modes in ascending order of the prediction mode numbers. The intra prediction mode can be the intra prediction mode for the luma component (samples). Hereinafter, the information on the intra prediction mode includes at least one of the MPM flag (e.g., intra_luma_mpm_flag), the not planar flag (e.g., intra_luma_not_planar_flag), the MPM index (e.g., mpm_idx or intra_luma_mpm_idx), and the remaining intra prediction mode information (rem_intra_luma_pred_mode or intra_luma_mpm_remainder). In this document, the MPM list may be referred to by various terms such as the MPM candidate list, candModeList, etc.When MIP is currently applied to a block, a separate mpm flag (e.g., intra_mip_mpm_flag), mpm index (e.g., intra_mip_mpm_idx), and remaining intra prediction mode information (e.g., intra_mip_remainder) for MIP can be signaled, and the not planar flag is not signaled.

[0082] In other words, generally when block partitioning is performed on a video, the current block to be coded and neighboring blocks will have similar video characteristics. Therefore, the current block and neighboring blocks are likely to have the same or similar intra prediction modes. Thus, the encoder can utilize the intra prediction mode of neighboring blocks to encode the intra prediction mode of the current block.

[0083] For example, the encoder / decoder can construct a MPM (most probable modes) list for the current block. The MPM list may also be referred to as a MPM candidate list. Here, MPM means a mode that is used to improve coding efficiency by considering the similarity between the current block and neighboring blocks during intra prediction mode coding. As described above, the MPM list may be constructed to include the planar mode or may be constructed excluding the planar mode. For example, when the MPM list includes the planar mode, the number of candidates in the MPM list can be six. And when the MPM list does not include the planar mode, the number of candidates in the MPM list can be five.

[0084] The encoder / decoder can construct a MPM list including five or six MPMs.

[0085] Three types of modes, namely Default intra modes, Neighbour intra modes, and Derved intra modes, are considered to construct the MPM list.

[0086] For the Neighbour intra modes, two neighbouring blocks, namely the left neighbouring block and the upper neighbouring block, are considered.

[0087] As described above, when the MPM list is configured not to include the planner mode, the planar mode is excluded from the list and the number of candidates for the MPM list is set to five.

[0088] Also, among the intra prediction modes, the non-directional mode (or non-angle mode) includes the average-based DC mode of the neighboring reference samples of the current block or the interpolation-based planar mode.

[0089] On the other hand, when inter prediction is applied, the prediction unit of the encoding device / decoding device can derive a predicted sample by performing inter prediction in units of blocks. Inter prediction can represent a prediction derived in a manner that is dependent on data elements (e.g., sample values or motion information) of picture(s) other than the current picture (Inter prediction can be a prediction derived in a manner that is dependent on data elements(ex.sample values or motion information) of picture(s) other than the current picture). When inter prediction is applied to the current block, a predicted block (predicted sample array) for the current block can be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture pointed to by a reference picture index. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information of the current block can be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between the neighboring block 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 type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When inter prediction is applied, the neighboring block can include a spatial neighboring block existing in the current picture and a temporal neighboring block 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 called by names such as a collocated reference block and a collocated CU (colCU), and the reference picture including the temporal neighboring block can also be called a collocated picture (colPic).For example, a motion information candidate list can be configured based on neighboring blocks of a current block, and in order to derive a motion vector and / or a reference picture index of the current block, flag or index information indicating which candidate is selected (used) can be signaled. Inter prediction can be performed based on various prediction modes. For example, in the case of the skip mode and the merge mode, the motion information of the current block can be the same as the motion information of the selected neighboring block. In the case of the skip mode, unlike the merge mode, a residual signal can be not transmitted. In the case of the motion vector prediction (MVP) mode, the motion vector of the selected neighboring block is used as a motion vector predictor, and a motion vector difference can be signaled. In this case, the motion vector of the current block can be derived by using the sum of the motion vector predictor and the motion vector difference.

[0090] The motion information can include L0 motion information and / or L1 motion information depending on the inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). The motion vector in the L0 direction can be called the L0 motion vector or MVL0, and the motion vector in the L1 direction can be called the L1 motion vector or MVL1. The prediction based on the L0 motion vector can be called L0 prediction, the prediction based on the L1 motion vector can be called L1 prediction, and the prediction based on both the L0 motion vector and the L1 motion vector can be called bi (Bi) prediction. Here, the L0 motion vector can represent a motion vector associated with the reference picture list L0 (L0), and the L1 motion vector can represent a motion vector associated with the reference picture list L1 (L1). The reference picture list L0 can include previous pictures as reference pictures in terms of output order from the current picture, and the reference picture list L1 can include subsequent pictures. The previous picture can be called a forward (reference) picture, and the subsequent picture can be called a backward (reference) picture. The reference picture list L0 can further include subsequent pictures as reference pictures in terms of output order from the current picture. In this case, the previous picture can be indexed first within the reference picture list L0, and the subsequent picture can be indexed next. The reference picture list L1 can further include previous pictures as reference pictures in terms of output order from the current picture. In this case, the subsequent picture can be indexed first within the reference picture list 1, and the previous picture can be indexed next. Here, the output order can correspond to the POC (picture order count) order (order).

[0091] The video / image encoding procedure based on inter prediction can generally include, for example, the following.

[0092] FIG. 4 shows an example of a video / image encoding method based on inter prediction.

[0093] The encoding device performs inter prediction on the current block (S400). The encoding device can derive the inter prediction mode and motion information of the current block and generate a predicted sample of the current block. Here, the inter prediction mode determination, motion information derivation, and predicted sample generation procedures can be performed simultaneously, or any one of the procedures can be performed prior to the other procedures. For example, the inter prediction unit of the encoding device can include a prediction mode determination unit, a motion information derivation unit, and a predicted sample derivation unit. The prediction mode determination unit determines the prediction mode for the current block, the motion information derivation unit derives the motion information of the current block, and the predicted sample derivation unit can derive the predicted sample of the current block. For example, the inter prediction unit of the encoding device searches for a block similar to the current block within a certain area (search area) of the reference picture through motion estimation, and can derive a reference block whose difference from the current block is the minimum or below a certain criterion. Based on this, a reference picture index indicating the reference picture where the reference block is located can be derived, and a motion vector can be derived based on the positional difference between the reference block and the current block. The encoding device can determine the mode applied to the current block among various prediction modes. The encoding device can compare the RD costs for the various prediction modes and determine the optimal prediction mode for the current block.

[0094] For example, when the skip mode or merge mode is applied to the current block, the encoding device constructs a merge candidate list to be described later, and can derive the current block and a reference block whose difference from the current block is the minimum or below a certain criterion among the reference blocks pointed to by the merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block can be selected, and merge index information indicating the selected merge candidate can be generated and signaled to the decoding device. The motion information of the current block can be derived using the motion information of the selected merge candidate.

[0095] As another example, when the (A)MVP mode is applied to the current block, the encoding device configures an (A)MVP candidate list described below, and among the mvp (motion vector predictor) candidates included in the (A)MVP candidate list, the motion vector of the selected mvp candidate can be used as the mvp of the current block. In this case, for example, the motion vector indicating the reference block derived by the above-described motion estimation can be used as the motion vector of the current block, and among the mvp candidates, the mvp candidate having the motion vector with the smallest difference from the motion vector of the current block can be the selected mvp candidate. An MVD (motion vector difference), which is the difference obtained by subtracting the mvp from the motion vector of the current block, can be derived. In this case, information regarding the MVD can be signaled to the decoding device. Also, when the (A)MVP mode is applied, the value of the reference picture index can be configured with reference picture index information and can be separately signaled to the decoding device.

[0096] The encoding device can derive a residual sample based on the prediction sample (S410). The encoding device can derive the residual sample by comparing the original sample of the current block with the prediction sample.

[0097] The encoding device encodes image information including prediction information and residual information (S420). The encoding device can output the encoded image information in the form of a bitstream. The prediction information can include prediction mode information (e.g., skip flag, merge flag, or mode index, etc.) and information related to motion information as information related to the prediction procedure. The information related to the motion information can include candidate selection information (e.g., merge index, mvp flag, or mvp index) which is information for deriving a motion vector. Also, the information related to the motion information can include information related to the above-mentioned MVD and / or reference picture index information. Also, the information related to the motion information can include information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. The residual information is information related to the residual samples. The residual information can include information related to the quantized transform coefficients for the residual samples.

[0098] The output bitstream can be stored in a (digital) recording medium and transmitted to the decoding device, or can also be transmitted to the decoding device via a network.

[0099] On the other hand, 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 in the encoding device as that performed in the decoding device, and through this, the coding efficiency can be improved. Therefore, the encoding device can store the reconstructed picture (or reconstructed samples, reconstructed blocks) in the memory and utilize it as a reference picture for inter prediction. As described above, further in-loop filtering procedures and the like can be applied to the reconstructed picture.

[0100] The video / image decoding procedure based on inter prediction can generally include, for example, the following.

[0101] FIG. 5 shows an example of a video / image decoding method based on an inter prediction foundation.

[0102] As shown in FIG. 5, the decoding device can perform operations corresponding to the operations performed by the encoding device. The decoding device can perform prediction on the current block based on the received prediction information and derive a prediction sample.

[0103] Specifically, the decoding device can determine a prediction mode for the current block based on the received prediction information (S500). The decoding device can determine which inter prediction mode is applied to the current block based on the prediction mode information in the prediction information.

[0104] For example, based on the merge flag, it can be determined whether the merge mode is applied to the current block or whether (A) the MVP mode is determined. Alternatively, based on the mode index, one of various inter prediction mode candidates can be selected. The inter prediction mode candidates can include a skip mode, a merge mode, and / or (A) an MVP mode, or can include various inter prediction modes described later.

[0105] The decoding device derives motion information of the current block based on the determined inter prediction mode (S510). For example, when the skip mode or the merge mode is applied to the current block, the decoding device can construct a merge candidate list described later and select one merge candidate from the merge candidates included in the merge candidate list. The selection can be performed based on the above-described selection information (merge index). The motion information of the current block can be derived using the motion information of the selected merge candidate. The motion information of the selected merge candidate can be used as the motion information of the current block.

[0106] As another example, when the (A)MVP mode is applied to the current block, the decoding device configures an (A)MVP candidate list described below, and among the mvp (motion vector predictor) candidates included in the (A)MVP candidate list, the motion vector of the selected mvp candidate can be used as the mvp of the current block. The selection can be performed based on the selection information (mvp flag or mvp index) described above. In this case, the MVD of the current block can be derived based on the information regarding the MVD, and the motion vector of the current block can be derived based on the mvp of the current block and the MVD. Also, the reference picture index of the current block can be derived based on the reference picture index information. The picture pointed to by the reference picture index within the reference picture list regarding the current block can be derived as the reference picture to be referred to for the inter prediction of the current block.

[0107] On the other hand, as will be described later, the motion information of the current block can be derived without configuring a candidate list, and in this case, the motion information of the current block can be derived by the procedure disclosed in the prediction mode described later. In this case, the candidate list configuration as described above can be omitted.

[0108] The decoding device can generate a prediction sample for the current block based on the motion information of the current block (S520). In this case, the reference picture is derived based on the reference picture index of the current block, and the prediction sample of the current block can be derived using the sample of the reference block pointed to by the motion vector of the current block on the reference picture. In this case, as will be described later, in some cases, a prediction sample filtering procedure can be further performed on all or part of the prediction samples of the current block.

[0109] For example, the inter prediction unit of the decoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit determines the prediction mode for the current block based on the received prediction mode information. The motion information derivation unit derives the motion information (such as motion vectors and / or reference picture indexes, etc.) of the current block based on the information related to the received motion information. The prediction sample derivation unit can derive the prediction sample of the current block.

[0110] The decoding device generates a residual sample for the current block based on the received residual information (S530). The decoding device can generate a restored sample for the current block based on the prediction sample and the residual sample, and generate a restored picture based on this (S540). As described above, an in-loop filtering procedure or the like can be further applied to the restored picture.

[0111] FIG. 6 exemplarily shows the inter prediction procedure.

[0112] Referring to FIG. 6, as described above, the inter prediction procedure may include an inter prediction mode determination step, a motion information derivation step according to the determined prediction mode, and a prediction execution (prediction sample generation) step based on the derived motion information. The inter prediction procedure can be performed by the encoding device and the decoding device as described above. In this document, the coding device can include the encoding device and / or the decoding device.

[0113] As shown in FIG. 6, the coding device determines an inter prediction mode for the current block (S600). For the prediction of the current block in the picture, various inter prediction modes can be used. For example, various modes such as a merge mode, a skip mode, an MVP (motion vector prediction) mode, an Affine mode, a sub-block merge mode, an MMVD (merge with MVD) mode, etc. can be used. A DMVR (Decoder side motion vector refinement) mode, an AMVR (adaptive motion vector resolution) mode, Bi-prediction with CU-level weight (BCW), Bi-directional optical flow (BDOF), etc. can be used additionally or alternatively as accompanying modes. The Affine mode can also be called an affine motion prediction mode. The MVP mode can also be called an AMVP (advanced motion vector prediction) mode. In this document, some motion information candidates derived by some modes and / or some modes can also be included as one of the motion information related candidates of other modes. For example, an HMVP candidate can be added as a merge candidate of the merge / skip mode, or can be added as an mvp candidate of the MVP mode. When the HMVP candidate is used as a motion information candidate of the merge mode or the skip mode, the HMVP candidate can be called an HMVP merge candidate.

[0114] Prediction mode information indicating the inter prediction mode of the current block can be signaled from an encoding device to a decoding device. The prediction mode information can be included in a 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 also be indicated via hierarchical signaling of flag information. In this case, the prediction mode information can include one or more flags. For example, a skip flag is signaled to indicate whether the skip mode can be applied. When the skip mode is not applied, a merge flag is signaled to indicate whether the merge mode can be applied. When the merge mode is not applied, it can be indicated that the MVP mode is applied, or a flag for additional classification can be further signaled. The affine mode can be signaled as an independent mode, or can also be signaled as a mode subordinate to a merge mode or an MVP mode, etc. For example, the affine mode can include an affine merge mode and an affine MVP mode.

[0115] The coding device derives motion information for the current block (S610). The motion information derivation can be derived based on the inter prediction mode.

[0116] The coding 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 procedure. For example, the encoding device can search for a highly correlated similar reference block within a determined search range in the reference picture in units of fractional pixels using the original block in the original picture for the current block, and derive motion information through this. The similarity of the blocks can be derived based on the difference in sample values on a phase basis. For example, the similarity of the blocks can be calculated based on the 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 with the smallest SAD within the search area. The derived motion information can be signaled to the decoding device in various ways based on the inter prediction mode.

[0117] The coding device performs inter prediction based on the motion information for the current block (S620). The coding device can derive prediction samples (etc.) for the current block based on the motion information. The current block including the prediction samples can be called a predicted block.

[0118] On the other hand, as described above, the encoding device can execute various encoding methods such as exponential Golomb, CAVLC (context - adaptive variable length coding), CABAC (context - adaptive binary arithmetic coding), etc. Also, the decoding device can decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements necessary for image restoration, quantized values of transform coefficients regarding residuals, etc.

[0119] For example, the coding method described above can be performed as described in the content to be described later.

[0120] FIG. 7 exemplarily shows context - adaptive binary arithmetic coding (CABAC) for encoding a syntax element. For example, in the encoding process of CABAC, when the input signal is a syntax element that is not a binary value, the encoder can binarize the value of the input signal to convert the input signal into a binary value. Also, when the input signal is already a binary value (i.e., when the value of the input signal is a binary value), no binarization is performed and it can be bypassed. Here, each binary number 0 or 1 that constitutes a binary value can be referred to as a bin. For example, if the binary string after binarization is 110, each of 1, 1, and 0 is referred to as one bin. The bin (etc.) for one syntax element can represent the value of the syntax element.

[0121] Thereafter, the binarized bins etc. of the syntax element can be input as a regular coding engine or a bypass coding engine. The regular coding engine of the encoder can assign a context model that reflects a probability value to the bin, and can encode the bin based on the assigned context model. The regular coding engine of the encoder can update the context model for the bin after encoding each bin. The bins encoded as described above can be represented as context - coded bins.

[0122] On the other hand, when the binary bins of the syntax element, etc. are input to the bypass encoding engine, they can be coded as follows. For example, the bypass encoding engine of the encoding device omits the procedure of estimating the probability for the input bin and the procedure of updating the probability model applied to the bin after encoding. When bypass encoding is applied, the encoding device can apply a uniform probability distribution instead of assigning a context model to encode the input bin, thereby improving the encoding speed. The bin encoded as described above can be represented as a bypass bin.

[0123] Entropy decoding can be represented as a process of performing the same process as the above-described entropy encoding in reverse order.

[0124] For example, when the syntax element is decoded based on the context model, the decoding device can receive the bin corresponding to the syntax element via the bitstream, and use the decoding information of the decoding target block or the peripheral block or the information of the symbol / bin decoded in the previous step and the syntax element to determine the context model, predict the occurrence probability of the received bin according to the determined context model, and perform arithmetic decoding of the bin to derive the value of the syntax element. Thereafter, the context model of the bin to be decoded next can be updated in the determined context model.

[0125] Also, for example, when a syntax element is bypass decoded, the decoding device can receive a bin corresponding to the syntax element via a bitstream and apply a uniform probability distribution to decode the input bin. In this case, the procedure for deriving the context model of the syntax element and the procedure for updating the context model applied to the bin after decoding can be omitted.

[0126] As described above, residual samples and the like can be derived into quantized transform coefficients and the like through the conversion and quantization processes. The quantized transform coefficients and the like can also be called transform coefficients and the like. In this case, the transform coefficients and the like within the block can be signaled in the form of residual information. The residual information can include a residual coding syntax. That is, the encoding device can construct a residual coding syntax as residual information, encode this, and output it in the form of a bitstream. The decoding device can decode the residual coding syntax from the bitstream to derive residual (quantized) transform coefficients and the like. The residual coding syntax can include syntax elements such as whether a transform has been applied to the block, where the position of the last valid transform coefficient within the block is, whether there are valid transform coefficients within the sub-block, and what the magnitude / symbol of the valid transform coefficient is, as will be described later.

[0127] For example, the (quantized) transform coefficients (i.e., the residual information) can be encoded and / or decoded based on syntax elements such as transform_skip_flag, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, coded_sub_block_flag, sig_coeff_flag, par_level_flag, abs_level_gt1_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, dec_abs_level, mts_idx, etc. Syntax elements related to residual data encoding / decoding can be represented as shown in the following tables.

[0128]

Table 1-1

[0129]

Table 1-2

[0130]

Table 1-3

[0131]

Table 1-4

[0132] The transform_skip_flag indicates whether transformation is skipped for an associated block. The transform_skip_flag can be a syntax element of the transform skip flag. The associated block can be a CB (coding block) or a TB (Transform block). For the transformation (and quantization) and residual coding procedures, the CB and TB can be used interchangeably. For example, as described above, residual samples etc. are derived for a CB, and (quantized) transform coefficients etc. can be derived through transformation and quantization of the residual samples etc., and information (such as syntax elements etc.) that efficiently represents the position, magnitude, sign, etc. of the (quantized) transform coefficients etc. can be generated and signaled through the residual coding procedure. The quantized transform coefficients etc. can be simply called transform coefficients etc. 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 coded can be called a CB or a TB. On the other hand, when the CB is larger than the maximum TB, the target block to be transformed (and quantized) and residually coded can be called a TB. Hereinafter, it will be described that syntax elements etc. related to residual coding are signaled in units of the transform block TB, but this is an example, and as described above, the TB can be used interchangeably with the coding block CB.

[0133] On the other hand, syntax elements etc. signaled after the transform skip flag is signaled can be the same as the syntax elements etc. disclosed in Table 2 described later, and specific descriptions of the syntax elements etc. are as described later.

[0134]

Table 2-1

[0135]

Table 2-2

[0136]

Table 2-3

[0137]

Table 3-1

[0138]

Table 3-2

[0139]

Table 3-3

[0140]

Table 3-4

[0141]

Table 3-5

[0142]

Table 3-6

[0143]

Table 4-1

[0144]

Table 4-2

[0145]

Table 4-3

[0146] According to this embodiment, as shown in Table 2, residual coding can be branched according to the value of the syntax element transform_skip_flag of the conversion skip flag. That is, different syntax elements can be used for residual coding based on the value of the conversion skip flag (based on whether conversion can be skipped). The residual coding used when conversion skip is not applied (i.e., when conversion is applied) can be called regular residual coding (RRC), and the residual coding when conversion skip is applied (i.e., when conversion is not applied) can be called transform skip residual coding (TSRC). Also, the regular residual coding can also be called general residual coding. Also, the regular residual coding can be called the regular residual coding syntax structure, and the transform skip residual coding can be called the transform skip residual coding syntax structure. Table 3 can represent the syntax elements of residual coding when the value of transform_skip_flag is 0, that is, when conversion is applied, and Table 4 can represent the syntax elements of residual coding when the value of transform_skip_flag is 1, that is, when conversion is not applied.

[0147] Specifically, for example, a conversion skip flag that indicates whether conversion of a conversion block can be skipped can be parsed, and it can be determined whether the conversion skip flag is 1. When the value of the conversion skip flag is 0, as shown in Table 3, 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_gtx_flag, par_level_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level for the residual coefficients of the conversion block can be parsed, and the residual coefficients can be derived based on the syntax elements. In this case, the syntax elements can also be parsed sequentially, and the parsing procedure can also be changed. Also, the abs_level_gtx_flag can indicate abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n][0] can be an example indication of the first conversion coefficient level flag (abs_level_gt1_flag), and the abs_level_gtx_flag[n][1] can be an example indication of the second conversion coefficient level flag (abs_level_gt3_flag).

[0148] Referring to Table 3 above, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level can be encoded / decoded. On the other hand, the sb_coded_flag can also be indicated as the coded_sub_block_flag.

[0149] In one embodiment, the encoding device can encode the (x, y) position information of the last non-zero transform coefficient in the transform block based on the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. More specifically, the last_sig_coeff_x_prefix represents the prefix of the column position of the last significant coefficient in the scanning order within the transform block, the last_sig_coeff_y_prefix represents the prefix of the row position of the last significant coefficient in the scanning order within the transform block, the last_sig_coeff_x_suffix represents the suffix of the column position of the last significant coefficient in the scanning order within the transform block, and the last_sig_coeff_y_suffix represents the suffix of the row position of the last significant coefficient in the scanning order within the transform block. Here, the significant coefficient can represent the non-zero coefficient. Also, the scanning order can be the upper-right diagonal scanning order. Alternatively, the scanning order can be the horizontal scanning order or the vertical scanning order. The scanning order can be determined based on whether intra / inter prediction is applied to the target block (CB or CB including TB) and / or the specific intra / inter prediction mode.

[0150] Next, after the encoding device divides the conversion block into 4×4 sub-blocks or the like, for each 4×4 sub-block, it can use a 1-bit syntax element coded_sub_block_flag to indicate whether there are non-zero coefficients in the current sub-block.

[0151] If the value of coded_sub_block_flag is 0, since there is no more information to be transmitted, the encoding device can terminate the encoding process for the current sub-block. Conversely, if the value of coded_sub_block_flag is 1, the encoding device can continue the encoding process for sig_coeff_flag. The sub-block containing the last non-zero coefficient does not require encoding for coded_sub_block_flag, and the sub-block containing the DC information of the conversion block is likely to contain non-zero coefficients. Therefore, coded_sub_block_flag can be assumed to have a value of 1 without being encoded.

[0152] If the value of coded_sub_block_flag is 1 and it is determined that there are non-zero coefficients in the current sub-block, the encoding device can encode sig_coeff_flag having binary values according to the reverse scan order. The encoding device can encode 1-bit syntax element sig_coeff_flag for each transform coefficient according to the scan order. If the value of the transform coefficient at the current scan position is not 0, the value of sig_coeff_flag can be 1. Here, in the case of the sub-block including the last non-zero coefficient, since sig_coeff_flag does not need to be encoded for the last non-zero coefficient, the encoding process for the sub-block can be omitted. Level information encoding can be performed only when sig_coeff_flag is 1, and four syntax elements or the like can be used in the level information encoding process. More specifically, each sig_coeff_flag[xC][yC] can represent whether the level (value) of the transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero. In one embodiment, the sig_coeff_flag can correspond to an example of the syntax element of the valid coefficient flag indicating whether the quantized transform coefficient is a valid coefficient that is not 0.

[0153] The remaining level values after encoding for sig_coeff_flag can be derived as follows. That is, the syntax element remAbsLevel representing the level value to be encoded can be derived as follows.

[0154]

Equation

[0155] Here, coeff means the actual transform coefficient value.

[0156] Also, the abs_level_gt1_flag can indicate whether the remAbsLevel at the scanning position (n) is greater than 1. For example, when the value of abs_level_gt1_flag is 0, the absolute value of the conversion coefficient at that position can be 1. Also, when the value of the abs_level_gt1_flag is 1, the remAbsLevel representing the level value to be encoded later can be updated as follows in the following formula.

[0157] [Number]

[0158] Also, the least significant coefficient (LSB) value of the remAbsLevel described in the above formula 2 can be encoded as follows in formula 3 below via the par_level_flag.

[0159] [Number]

[0160] Here, par_level_flag[n] can represent the parity of the conversion coefficient level (value) at the scanning position n.

[0161] After the par_leve_flag encoding, the conversion coefficient level value remAbsLevel to be encoded can be updated as follows in the following formula.

[0162] [Number]

[0163] The abs_level_gt3_flag can indicate whether the remAbsLevel at the scanning position (n) is greater than 3. Encoding for the abs_remainder can be performed only when the abs_level_gt3_flag is 1. The relationship between the actual conversion coefficient value coeff and each syntax element can be as follows in the following formula.

[0164]

Number

[0165] Also, the following table represents an exemplification related to the above-mentioned formula 5.

[0166]

Table 5

[0167] Here, |coeff| represents the conversion coefficient level (value) and can also be displayed as the AbsLevel for the conversion coefficient. Also, the sign of each coefficient can be encoded using the coeff_sign_flag which is a 1-bit symbol.

[0168] Also, for example, when the value of the conversion skip flag is 1, as shown in Table 4, syntax elements such as sb_coded_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag, par_level_flag, and / or abs_remainder for the residual coefficients of the conversion block can be parsed, and the residual coefficients can be derived based on the syntax elements. In this case, the syntax elements can be parsed sequentially, and the parsing procedure can also be changed. Also, the abs_level_gtx_flag can indicate 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 conversion coefficient at the scanning position n is greater than (j << 1) + 1. The (j << 1) + 1 can also be replaced by a predetermined critical value such as a first critical value or a second critical value depending on the case.

[0169] On the one hand, CABAC provides high performance, but has the disadvantage that its throughput performance is not good. This is due to the normalization encoding engine of CABAC. Normalization encoding (i.e., encoding through the normalization encoding engine of CABAC) shows high data dependence because it uses the probability state and range updated through the encoding of previous bins, and it takes a lot of time to read the probability interval and determine the current state. The throughput problem of CABAC can be solved by restricting the number of context-coded bins. For example, as in Table 1 or Table 3 described above, the sum of the bins used to represent sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag can be restricted to the number based on the size of the block. Also, for example, as in Table 4 described above, the sum of the bins used to represent sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and abs_level_gt9_flag can be restricted to the number based on the size of the block.As an example, when the block is a 4×4 size block, the sum of bins etc. for the sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag or sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag can be limited to 32 (or, for example, 28). When the block is a 2×2 size block, the sum of bins etc. for the sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag can be limited to 8 (or, for example, 7). The limited number of the bins etc. can be indicated by remBinsPass1 or RemCcbs. Or, as an example, for a higher CABAC throughput, the number of context coded bins can be limited for a block (CB or TB) including the coding 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 16×16, regardless of the current CG, the number of context coded bins for the current block can be limited to 1.75 times the number of pixels of the current block, that is, 448.

[0170] In this case, if the encoding device uses all the context coding bins with a limited number for encoding context elements, the remaining coefficients can be binary-coded through the binary-coding method for the aforementioned coefficients without using context coding, and bypass coding can be executed. In other words, for example, when the number of context coded bins coded for 4×4 CG is 32 (or, for example, 28), or when the number of context coded bins coded for 2×2 CG is 8 (or, for example, 7), the sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag that are to be coded in more context coding bins may not be coded and can be immediately coded in dec_abs_level. Or, for example, when the number of context coded bins coded for a 4×4 block is limited to 1.75 times the number of pixels in the entire block, i.e., 28, the sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag that are to be coded in more context coding bins may not be coded and, as shown in Table 6 described later, can be immediately coded in dec_abs_level.

[0171]

Table 6

[0172] The |coeff| value can be derived based on dec_abs_level. In this case, the conversion coefficient value |coeff| can be derived as follows in the following mathematical formula.

[0173]

Equation

[0174] Also, the coeff_sign_flag can represent the sign of the conversion coefficient level at the scanning position (n). That is, the coeff_sign_flag can represent the sign of the conversion coefficient at the scanning position (n).

[0175] FIG. 8 is a diagram illustrating an example of conversion coefficients within a 4×4 block.

[0176] The 4×4 block in FIG. 8 shows an example of quantized coefficients and the like. The block shown in FIG. 8 can be a 4×4 conversion block or a 4×4 sub-block of an 8×8, 16×16, 32×32, or 64×64 conversion block. The 4×4 block in FIG. 8 can represent a luma block or a chroma block.

[0177] On the other hand, as described above, when the input signal is a syntax element that is not binary, the encoding device can binarize the value of the input signal to convert the input signal into a binary value. Also, the decoding device can decode the syntax element to derive the binarized value of the syntax element (i.e., the binarized bin), and can inverse-binarize the binarized value to derive the value of the syntax element. The binarization process can be performed by a Truncated Rice (TR) binarization process, a k-th order Exp-Golomb (EGk) binarization process, a Limited k-th order Exp-Golomb (Limited EGk), or a Fixed-length (FL) binarization process, etc., which will be described later. Also, the inverse-binarization process can be performed based on the TR binarization process, the EGk binarization process, or the FL binarization process to represent the process of deriving the value of the syntax element.

[0178] For example, the TR binary evolution process can be performed as follows.

[0179] The input of the TR binary evolution process can be the requirements for TR binary evolution and cMax and cRiceParam for the syntax element. Also, the output of the TR binary evolution process can be the TR binary evolution for the value symbolVal corresponding to the bin string.

[0180] Specifically, as an example, when there is a suffix bin string for the syntax element, the TR bin string for the syntax element can be the concatenation of the prefix bin string and the suffix bin string, and when the suffix bin string does not exist, the TR bin string for the syntax element can be the prefix bin string. For example, the prefix bin string can be derived as described later.

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

[0182]

Equation

[0183] Here, prefixVal can represent the prefix value of the symbolVal. The prefix of the TR bin string of the syntax element (i.e., the prefix bin string) can be derived as described later.

[0184] For example, when the prefixVal is smaller than cMax >> cRiceParam, the prefix bin string can be a bit string of length prefixVal + 1 indexed by binIdx. That is, when the prefixVal is smaller than cMax >> cRiceParam, the prefix bin string can be a bit string of prefixVal + 1 bits pointed to by binIdx. The bins for binIdx smaller than prefixVal can be the same as 1. Also, the bin for binIdx equal to prefixVal can be the same as 0.

[0185] For example, the bin string derived by the unary binarization for the prefixVal can be as shown in the following table.

[0186] [Table 7]

[0187] On the other hand, when the prefixVal is not smaller than cMax >> cRiceParam, the prefix bin string can be a bit string with a length of cMax >> cRiceParam and all bins being 1.

[0188] Also, when cMax is larger than symbolVal and cRiceParam is larger than 0, a suffix bin string of the TR bin string may exist. For example, the suffix bin string can be derived as described later.

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

[0190] [Equation]

[0191] Here, suffixVal can represent the suffix value of the symbolVal.

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

[0193] On the other hand, if the value of the input parameter cRiceParam is 0, the TR binary evolution can be exactly truncated unary binarization, and the same cMax value as the possible maximum value of the syntax element that is always decoded can be used.

[0194] Also, for example, the EGk binary evolution process can be performed as follows. The syntax element coded by ue(v) can be an Exp-Golomb coded syntax element.

[0195] As an example, the 0-th order Exp-Golomb (EG0) binary evolution process can be performed as follows.

[0196] The parsing process for the syntax element can start from the current position of the bit stream, read the bits including the first non-zero bit, and begin by counting the number of leading bits such as 0. The process can be represented as in the following table.

[0197]

Table 8

[0198] Also, the variable codeNum can be derived as in the following formula.

[0199]

Number

[0200] Here, the value returned by read_bits(leadingZeroBits), that is, the value represented by read_bits(leadingZeroBits), can be interpreted as the binary representation of an unsigned integer for the most significant bit recorded first.

[0201] The structure of the Exp-Golomb code that separates the bit string into "prefix" bits and "suffix" bits can be represented as in the following table.

[0202]

Table 9

[0203] The "prefix" bits can be the bits parsed as described above for the leadingZeroBits calculation and can be represented as 0 or 1 of the bit string in Table 9. That is, the bit string disclosed as 0 or 1 in Table 9 above can represent the prefix bit string. The "suffix" bits can be the bits parsed in the calculation of codeNum and can be represented as xi in Table 9 above. That is, the bit string disclosed as xi in Table 9 above can represent the suffix bit string. Here, i can be a value in the range from 0 to LeadingZeroBits - 1. Also, each xi can be the same as 0 or 1.

[0204] The bit string assigned to the [[ID=]],

[0205] [Table 10]

[0206] When the descriptor of the syntax element is ue(v), that is, when the syntax element is coded with ue(v), the value of the syntax element can be the same as [[ID=]].

[0207] Also, for example, the [[ID=]] EGk binary evolution process can be performed as follows.

[0208] The input of the [[ID=]] EGk binary evolution process can be a request for [[ID=]] EGk binary evolution. Also, the output of the [[ID=]] EGk binary evolution process can be [[ID=]] EGk binary evolution for the value symbolVal corresponding to the bit string.

[0209] The bit string of the [[ID=]] EGk binary evolution process for symbolVal can be derived as follows.

[0210] [Table 11]

[0211] Referring to Table 11 above, the binary value X can be appended to the end of the bit string via each call of put(x). Here, x can be 0 or 1.

[0212] Also, for example, the Limited [[ID=]] EGk binary evolution process can be performed as follows.

[0213] The input of the Limited EGk binary evolution process can be the requirements for Limited EGk binary evolution, the rice parameter riceParam, the variable log2TransformRange representing the binary logarithm of the maximum value, and the variable maxPreExtLen representing the maximum prefix extension length. Also, the output of the Limited EGk binary evolution process can be the Limited EGk binary evolution for the value symbolVal corresponding to the bit string.

[0214] The bit string of the Limited EGk binary evolution process for symbolVal can be derived as follows.

[0215] [Table 12]

[0216] Also, for example, the FL binary evolution process can be performed as follows.

[0217] The input of the FL binary evolution process can be the requirements for FL binary evolution and cMax for the syntax element. Also, the output of the FL binary evolution process can be the FL binary evolution for the value symbolVal corresponding to the bit string.

[0218] FL binary evolution can be configured using a bit string having a number of bits equal to the fixed length of the symbol value symbolVal. Here, the fixed-length bits can be an unsigned integer bitstring. That is, a bit string for the symbol value symbolVal can be derived by FL binary evolution, and the bit length (i.e., the number of bits) of the bit string can be of a fixed length.

[0219] For example, the fixed length can be derived as in the following mathematical formula.

[0220]

Number

[0221] Indexing of bins and the like for FL binary evolution can be in a manner that uses values increasing in order from the most significant bit to the least significant bit. For example, the bin index associated with the most significant bit can be binIdx = 0.

[0222] On the other hand, for example, among the residual information, the binary evolution process for the syntax element abs_remainder can be performed as follows.

[0223] The input to the binary evolution process for the abs_remainder can be the requirement for the binary evolution of the syntax element abs_remainder[n], the hue component cIdx, and the luma position (x0, y0). The luma position (x0, y0) can refer to the top-left sample of the current luma transform block based on the top-left luma sample of the picture.

[0224] The output of the binary evolution process for the abs_remainder can be the binary evolution of the abs_remainder (i.e., the binary string of the abs_remainder after binary evolution). Available bin strings and the like for the abs_remainder can be derived by the binary evolution process.

[0225] The Rice parameter cRiceParam for the abs_remainder[n] can be derived through a Rice parameter derivation process that takes as input the hue component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm log2TbWidth of the width of the transform block, and the binary logarithm log2TbHeight of the height of the transform block. A specific description of the Rice parameter derivation process will be given later.

[0226] Also, for example, cMax for the currently coded abs_remainder[n] can be derived based on the Rice parameter cRiceParam. The cMax can be derived as follows in the following formula.

[0227]

Equation

[0228] On the other hand, the binary conversion of the abs_remainder, i.e., the bin string for the abs_remainder, can be the concatenation of a prefix bin string and a suffix bin string if the suffix bin string exists. Also, if the suffix bin string does not exist, the bin string for the abs_remainder can be the prefix bin string.

[0229] For example, the prefix bin string can be derived as described later.

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

[0231]

Equation

[0232] The prefix of the bin string of the abs_remainder[n] (i.e., the prefix bin string) can be derived by a TR binary process for the prefixVal using the cMax and the cRiceParam as inputs.

[0233] If the prefix bin string is the same as a bit string in which all bits are 1 and the bit length is 6, the suffix bin string of the bin string of the abs_remainder[n] may exist and can be derived as described later.

[0234] The Rice parameter derivation process for the abs_remainder[n] may be as follows.

[0235] The inputs of the Rice parameter derivation process may be the hue component index cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm log2TbWidth of the width of the transform block, and the binary logarithm log2TbHeight of the height of the transform block. The luma position (x0, y0) can refer to the upper left sample of the current luma transform block with reference to the upper left luma sample of the picture. Also, the output of the Rice parameter derivation process may be the Rice parameter cRiceParam.

[0236] For example, based on a given component index cIdx and an array AbsLevel[x][y] for a transform block having the upper left luma position (x0, y0), a variable locSumAbs can be derived as in the pseudo code disclosed in the following table.

[0237] [Table 13]

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

[0239] [Table 14]

[0240] Also, for example, in the process of deriving the Rice parameter for abs_remainder[n], baseLevel can be set to 4.

[0241]

[0242] Or, for example, the Rice parameter cRiceParam can be determined based on whether the current block can be transformed and skipped. That is, when no transformation is applied to the current TB including the current CG, in other words, when a transform skip is applied to the current TB including the current CG, the Rice parameter cRiceParam can be derived as 1.

[0243] [Equation]

[0244] The suffix string of the bin string of the abs_remainder can be derived by the Limited EGk binary evolution process for the suffixVal where k is set to cRiceParam + 1, riceParam is set to cRiceParam, log2TransformRange is set to 15, and maxPreExtLen is set to 11.

[0245] ​On one hand, for example, among the residual information, the binary process for the syntax element dec_abs_level can be performed as follows.

[0246] The input of the binary process for the dec_abs_level can be the requirement for the binary of the syntax element dec_abs_level[n], the hue component (colour component) cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the width of the transform block, i.e., log2TbWidth, and the binary logarithm of the height of the transform block, i.e., log2TbHeight. The luma position (x0, y0) can refer to the upper left sample of the current luma transform block based on the upper left luma sample of the picture.

[0247] The output of the binary process for the dec_abs_level can be the binary of the dec_abs_level (i.e., the binary bit string of the dec_abs_level). Available bit strings, etc., for the dec_abs_level can be derived by the binary process.

[0248] The Rice parameter cRiceParam for the dec_abs_level[n] can be derived through a Rice parameter derivation process that takes the hue component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the width of the transform block, i.e., log2TbWidth, and the binary logarithm of the height of the transform block, i.e., log2TbHeight as inputs. A specific description of the Rice parameter derivation process will be given later.

[0249] Also, for example, cMax for the dec_abs_level[n] can be derived based on the Rice parameter cRiceParam. cMax can be derived as follows according to the following formula.

[0250] [Number]

[0251] On the one hand, the binary evolution for the dec_abs_level[n], that is, the bin string for the dec_abs_level[n] can be the concatenation of a prefix bin string and a suffix bin string if the suffix bin string exists. Also, if the suffix bin string does not exist, the bin string for the dec_abs_level[n] can be the prefix bin string.

[0252] For example, the prefix bin string can be derived as described later.

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

[0254] [Number]

[0255] The prefix of the bin string of the dec_abs_level[n] (i.e., the prefix bin string) can be derived by the TR binary evolution process for the prefixVal that uses the cMax and the cRiceParam as inputs.

[0256] If the prefix bin string is the same as the bit string with all bits being 1 and a bit length of 6, the suffix bin string of the bin string of the dec_abs_level[n] may exist and can be derived as described later.

[0257] The process of deriving the Rice parameter for the said dec_abs_level[n] can be as follows.

[0258] The input of the process of deriving the Rice parameter can be the hue component index (colour component index) cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the width of the transform block, log2TbWidth, and the binary logarithm of the height of the transform block, log2TbHeight. The said luma position (x0, y0) can refer to the upper left sample of the current luma transform block based on the upper left luma sample of the picture. Also, the output of the process of deriving the Rice parameter can be the said Rice parameter cRiceParam.

[0259] For example, based on a given component index cIdx and the array AbsLevel[x][y] for a transform block having the said upper left luma position (x0, y0), the variable locSumAbs can be derived as in the pseudo code disclosed in the following table.

[0260] [Table 15]

[0261] After that, based on the given variable locSumAbs, the said Rice parameter cRiceParam can be derived as in the following table.

[0262] [Table 16]

[0263] Also, for example, in the process of deriving the Rice parameter for dec_abs_level[n], baseLevel can be set to 0, and the said ZeroPos[n] can be derived as in the following mathematical formula.

[0264] [Number]

[0265] Also, the suffix value suffixVal of the dec_abs_level[n] can be derived as in the following mathematical formula.

[0266] [Number]

[0267] The suffix bit string of the bin string of the dec_abs_level[n] can be derived through the Limited EGk evolution process for the suffixVal where k is set to cRiceParam + 1, truncSuffixLen is set to 15, and maxPreExtLen is set to 11.

[0268] On the other hand, the aforementioned RRC and TSRC may have the following differences.

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

[0270] - Also, for example, referring to Tables 3 and 4, in RRC, abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1] can be signaled, while in TSRC, abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and abs_level_gtx_flag[n][4] can be signaled. Here, the abs_level_gtx_flag[n][0] can be denoted as abs_level_gt1_flag or the first coefficient level flag, the abs_level_gtx_flag[n][1] can be denoted as abs_level_gt3_flag or the second coefficient level flag, the abs_level_gtx_flag[n][2] can be denoted as abs_level_gt5_flag or the third coefficient level flag, the abs_level_gtx_flag[n][3] can be denoted as abs_level_gt7_flag or the fourth coefficient level flag, and the abs_level_gtx_flag[n][4] can be denoted as abs_level_gt9_flag or the fifth coefficient level flag. Specifically, the first coefficient level flag can be a flag indicating whether the coefficient level is greater than a first critical value (e.g., 1), the second coefficient level flag can be a flag indicating whether the coefficient level is greater than a second critical value (e.g., 3), the third coefficient level flag can be a flag indicating whether the coefficient level is greater than a third critical value (e.g., 5), the fourth coefficient level flag can be a flag indicating whether the coefficient level is greater than a fourth critical value (e.g., 7), and the fifth coefficient level flag can be a flag indicating whether the coefficient level is greater than a fifth critical value (e.g., 9).As described above, TSRC can further include abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and abs_level_gtx_flag[n][4] together with abs_level_gtx_flag[n][0] and abs_level_gtx_flag[n][1] compared to RRC.

[0271] - Also, for example, in RRC, the syntax element coeff_sign_flag can be bypass-coded, while in TSRC, the syntax element coeff_sign_flag can be bypass-coded or context-coded.

[0272] On the one hand, this document proposes a method of applying a level mapping technique to a simplified residual data coding structure for a transform skip block. Here, the transform skip block can represent a block to which no transform is applied. Also, the level mapping technique means a technique in which, when BDPCM (block based quantized residual domain differential pulse-code modulation) is not applied to the current block (e.g., CU), the absolute coefficient level, i.e., absCoeffLevel, is mapped to a modified level coded by a method based on the (quantized) left residual sample and the upper residual sample of the current residual sample (i.e., the current residual coefficient). Under specific conditions such as lossless coding or near-lossless coding, a simplified residual data coding structure can be used for an entire coding block or transform block, or for some subblocks / coefficient groups (CG). Or, in the proposed method, the number of context coded bins, etc., used for residual (data) coding within one TU (Transform Unit, TU) can be limited to a specific threshold, and when all the context coded bins used for the residual coding of the TU are exhausted (i.e., when the number of context coded bins for the residual coding of the TU becomes the same as the specific threshold), the simplified residual data coding structure can be used.

[0273] FIG. 9 shows an example of simplified residual data coding for one CG, transform block, or coding block. Syntax elements such as sig_coeff_flag, coeff_sign_flag, and abs_remainder can be coded with the simplified residual coding. Syntax elements for the residual coefficients within the CG, transform block, or coding block can be coded in order from top to bottom as shown in FIG. 12. That is, syntax elements for the residual coefficients within the CG, transform block, or coding block can be coded in the order of sig_coeff_flag, coeff_sign_flag, and abs_remainder.

[0274] The sig_coeff_flag can represent a syntax element for the valid coefficient flag. The sig_coeff_flag can indicate whether the residual coefficient of the current block (CG, transform block, or coding block) is a non-zero residual coefficient. For example, the sig_coeff_flag can have a value of 0 when the value of the residual coefficient at that position is 0, and a value of 1 when it is not 0. Also, the coeff_sign_flag can represent a syntax element for the sign flag of the residual coefficient. The sig_coeff_flag can indicate the sign of the residual coefficient. For example, the coeff_sign_flag can mean the sign value of the residual coefficient at that position. There can be various ways to apply the coeff_sign_flag. For example, when the residual coefficient at that position is 0, that is, when the value of the sig_coeff_flag for the residual coefficient is 0, the coeff_sign_flag may not be coded. For a non-zero residual coefficient, when the residual coefficient is negative, the coeff_sign_flag can have a value of 1 (or 0), and when the residual coefficient is positive, the coeff_sign_flag can have a value of 0 (or 1). Or, regardless of the value of the sig_coeff_flag of the residual coefficient, when the residual coefficient is negative, the coeff_sign_flag can have a value of 1 (or 0), and when the residual coefficient is positive or 0, the coeff_sign_flag can have a value of 0 (or 1). Or, when the residual coefficient is positive, the coeff_sign_flag can have a value of 1 (or 0), and when the residual coefficient is negative or 0, the coeff_sign_flag can have a value of 0 (or 1). Also, the abs_remainder can represent a syntax element for the residual level value information or coefficient value related information.For example, the abs_remainder can mean the residual level value. For example, when the value of sig_coeff_flag for the residual coefficient is 0, the abs_remainder for the residual coefficient may not be coded. When the value of sig_coeff_flag for the residual coefficient is 1, the abs_remainder can have a value obtained by subtracting 1 from the absolute value of the residual coefficient (absolute value - 1).

[0275] On the other hand, when regular residual coding is executed and certain conditions are met, it can be converted to the simplified residual data coding shown in FIG. 12. For example, the certain conditions can be when the residual information of the coding block is lossless or near-lossless coded, and / or when all the context coding bins used in the case where the TU-level context coding bin constraint algorithm is applied are exhausted, etc.

[0276] FIG. 10 shows another example of simplified residual data coding for one CG, transform block, or coding block. Syntax elements such as dec_abs_level and coeff_sign_flag can be coded with the simplified residual coding. The syntax elements for the residual coefficients within the CG, the transform block, or the coding block can be coded in the order from top to bottom as shown in FIG. 10. That is, the syntax elements for the residual coefficients within the CG, the transform block, or the coding block can be coded in the order of dec_abs_level and coeff_sign_flag.

[0277] As shown in FIG. 10, the dec_abs_level can represent a syntax element for coefficient value related information, and the coeff_sign_flag can represent a syntax element for the sign flag of the residual coefficient. For example, according to the structure shown in FIG. 10, when the residual coefficient is 0, the value of dec_abs_level can be 0, and when the residual coefficient is not 0, the value of dec_abs_level can be the absolute value of the residual coefficient. Also, for example, the coeff_sign_flag can mean the sign value of the residual coefficient at that position. There can be various ways to apply the coeff_sign_flag. For example, when the residual coefficient at that position is 0, the coeff_sign_flag may not be coded. For a non-zero residual coefficient, when the residual coefficient is negative, the coeff_sign_flag can have a value of 1 (or 0), and when the residual coefficient is positive, the coeff_sign_flag can have a value of 0 (or 1). Or, regardless of the dec_abs_level of the residual coefficient, it can always be coded. When the residual coefficient is negative, the coeff_sign_flag can have a value of 1 (or 0), and when the residual coefficient is positive or 0, the coeff_sign_flag can have a value of 0 (or 1). Or, when the residual coefficient is positive, the coeff_sign_flag can have a value of 1 (or 0), and when the residual coefficient is negative or 0, the coeff_sign_flag can have a value of 0 (or 1).

[0278] On the other hand, when specific conditions are met even when regular residual coding is executed, it can be converted to the simplified residual data coding shown in FIG. 13. For example, the specific conditions can be when the residual information of the coding block is lossless or near-lossless coded, and / or when all the context coding bins that can be used when the TU-level context coding bin constraint algorithm is applied are exhausted.

[0279] FIG. 11 shows another example of simplified residual data coding for one CG, transform block, or coding block. Syntax elements such as coeff_sign_flag and dec_abs_level can be coded with the simplified residual coding. The syntax elements for the residual coefficients within the CG, the transform block, or the coding block can be coded in the order from top to bottom as shown in FIG. 11. That is, the syntax elements for the residual coefficients within the CG, the transform block, or the coding block can be coded in the order of coeff_sign_flag and dec_abs_level.

[0280] As shown in FIG. 11, the coeff_sign_flag can represent a syntax element for the sign flag of the residual coefficient, and the dec_abs_level can represent a syntax element for coefficient value related information. For example, when the residual coefficient at the position to be coded is negative, the coeff_sign_flag can have a value of 1 (or 0), and when the residual coefficient is positive or 0, the coeff_sign_flag can have a value of 0 (or 1). Or, for example, when the residual coefficient is positive, the coeff_sign_flag can have a value of 1 (or 0), and when the residual coefficient is negative or 0, the coeff_sign_flag can have a value of 0 (or 1).

[0281] On the other hand, when the regular residual coding is executed and a specific condition is satisfied, it can be converted to the simplified residual data coding shown in FIG. 14. For example, the specific condition can be used when the residual information of the coding block is lossless or near-lossless coded, and / or when all the context coding bins used in the case where the TU level context coding bin constraint algorithm is applied are exhausted, etc.

[0282] On the one hand, as described above, a level mapping technique for the conversion skip mode can be used. For example, in the level mapping technique, the value of abs_level_gtx_flag[0] can be used as a value indicating whether level mapping is possible. That is, whether level mapping is possible can be determined based on the value of abs_level_gtx_flag[0]. Therefore, in a simplified residual data coding structure in which abs_level_gtx_flag[0] is not coded, decoding for the residual coefficients to which level mapping is applied cannot be accurately performed. Therefore, this document proposes a solution that does not use level mapping for coding blocks, conversion blocks, coefficient groups, and / or residual coefficients to which simplified residual data coding is applied so that the simplified residual data coding structure of FIG. 12, FIG. 13, or FIG. 14 and level mapping can be used together. According to an embodiment of this document, the simplified residual data coding structure and level mapping can be combined without problems in the residual coding for the conversion skip block.

[0283] For example, within one coding block, the residual data coding method for the conversion skip block shown in Table 4 and the simplified residual data coding method described above can be mixed. When the residual data coding for the conversion skip block is applied, the level mapping technique shown in Table 4 above can be applied as it is. When the simplified residual data coding is applied, the level mapping technique can be applied.

[0284] Tables 17 and 18 described later exemplarily show the syntax to which the embodiments proposed in this document are applied.

[0285]

Table 17

[0286]

Table 18

[0287] The above Table 17 can represent a syntax structure that prevents level mapping from being executed when the context coding bin constraint algorithm is applied and all the context coding bins that can be used (where MaxCcbs represents the number of context coding bins that can be used) are exhausted and converted into a simplified residual data coding structure. Also, the above Table 18 can represent a syntax structure to which the method proposed in this document is applied when a simplified residual data coding structure is used for the lossless coding block. Here, for example, the transquant_bypass_flag shown in Table 18 can be a syntax element indicating whether lossless coding is possible. The transquant_bypass_flag can be signaled at the CU or TU or picture level.

[0288] On the one hand, the aforementioned Table 17 and Table 18 are merely examples to which the embodiments proposed in this document are applied, and are not limited thereto. In this document, as one embodiment, when a simplified residual data coding structure is executed, in order to encode / decode the level-mapped residual coefficients, it is proposed not to execute the part that corrects the encoded / decoded levels. That is, for example, when all the context coding bins for the current block are used, the residual coefficients of the current block are not derived through level mapping, and a scheme derived by a simplified residual data coding structure can be proposed. The simplified residual data coding structure can be as described above. For example, when all the context coding bins for the current block are used, the residual coefficients can be derived based on the value of the information representing the absolute value and the sign information. Also, for example, the aforementioned Table 4 can represent an example to which the embodiments proposed in this document are applied.

[0289] FIG. 12 schematically shows an image encoding method by an encoding apparatus according to this document. The method disclosed in FIG. 12 can be executed by the encoding apparatus disclosed in FIG. 2. Specifically, for example, S1200 in FIG. 12 can be executed by the prediction unit of the encoding apparatus, S1210 to S1220 in FIG. 12 can be executed by the residual processing unit of the encoding apparatus, and S1230 can be executed by the entropy encoding unit of the encoding apparatus. Also, although not shown, the process of generating the restored sample and the restored picture for the current block based on the residual sample and the predicted sample for the current block can be executed by the addition unit of the encoding apparatus.

[0290] The encoding device derives predicted samples of the current block based on inter prediction or intra prediction (S1200). The encoding device can derive predicted samples and the like of the current block based on the prediction mode. In this case, various prediction methods disclosed in this document, such as inter prediction or intra prediction, can be applied.

[0291] For example, the encoding device can determine whether to perform inter prediction or intra prediction on the current block, and can determine a specific inter prediction mode or a specific intra prediction mode based on the RD cost. According to the determined mode, the encoding device can derive predicted samples for the current block.

[0292] The encoding device derives residual samples of the current block based on the predicted samples (S1210). For example, the encoding device can derive the residual samples by subtracting the predicted samples from the original samples for the current block.

[0293] The encoding device derives current residual coefficients based on the residual samples (S1220). For example, the encoding device can derive the current residual coefficients of the current block based on the residual samples. For example, the encoding device can determine whether transformation is to be applied to the current block. That is, the encoding device can determine whether transformation is to be applied to the residual samples of the current block. The encoding device can determine whether to apply transformation to the current block in consideration of coding efficiency. For example, the encoding device can determine that transformation is not to be applied to the current block. A block to which transformation is not applied can be referred to as a transformation skip block. That is, for example, the current block can be a transformation skip block.

[0294] When no transformation is applied to the current block, that is, when no transformation is applied to the residual samples, the encoding device can derive the derived residual samples as the current residual coefficients. Also, when a transformation is applied to the current block, that is, when a transformation is applied to the residual samples, the encoding device can execute the transformation on the residual samples to derive the current residual coefficients. The current residual coefficients can be included in the current sub-block of the current block. The current sub-block can be referred to as the current CG (coefficient group). Also, the size of the current sub-block of the current block can be 4×4 size or 2×2 size. That is, the current sub-block of the current block can include a maximum of 16 non-zero residual coefficients or a maximum of 4 non-zero residual coefficients.

[0295] Here, the current block can be a coding block (CB) or a transform block (TB). Also, the residual coefficient can also be denoted as the transform coefficient.

[0296] On the one hand, for example, the current residual coefficient can be derived without performing level mapping. For example, among the residual coefficients of the current block, the number of context-coded residual syntax elements, etc. for the residual coefficients before the current residual coefficient may be the same as the number of context coded bins, etc. of the current block, and the residual syntax element for the current residual coefficient can include the absolute level information for the current residual coefficient and the sign flag of the residual coefficient, and the current residual coefficient can be derived without performing level mapping. Here, deriving the current residual coefficient only with the absolute level information and the sign flag can be referred to as simplified residual data coding. That is, the residual coefficient can be derived based on simplified residual data coding. Also, for example, the context coded bins, etc. for the current block can be entirely used as bins, etc. of the context-coded residual syntax elements, etc. for the residual coefficients before the current residual coefficient among the residual coefficients of the current block, and the residual syntax element, etc. for the current residual coefficient can include the coefficient level information for the current residual coefficient and the sign flag of the residual coefficient, and the current residual coefficient can be derived without performing level mapping.For example, when all of the context coded bins for the current block with respect to the residual syntax elements such as the previous residual coefficient of the current residual coefficient in the scanning order are used, the residual syntax elements for the current residual coefficient can include coefficient level information for the current residual coefficient and a sign flag of the residual coefficient, and the current residual coefficient can be derived without performing level mapping. Also, for example, the residual coefficient and the like before the current residual coefficient can be derived by performing the level mapping.

[0297] On the other hand, for example, the level mapping can indicate a scheme shown in Table 19 described later.

[0298]

Table 19

[0299] Here, X0 can represent the left absolute coefficient level of the current residual coefficient (i.e., the coefficient level of the left residual sample (left residual coefficient)), and X1 can represent the upper absolute coefficient level (i.e., the coefficient level of the upper residual sample (upper residual coefficient)). Also, absCoeff can represent the absolute level coefficient of the current residual coefficient, and absCoeffMod can represent the level mapped through the above process.

[0300] For example, the level mapping can mean a process of deriving the minimum value among the absolute level of the left residual coefficient of the residual coefficient and the absolute level of the upper residual coefficient of the residual coefficient, comparing the minimum value with the absolute level of the residual coefficient, and correcting the absolute level of the residual coefficient based on the minimum value.

[0301] The encoding device encodes (S1230) image information including prediction mode information representing the prediction mode of the current block and residual syntax elements for the current residual coefficients. The encoding device can encode image information including prediction mode information representing the prediction mode of the current block and residual syntax elements for the current residual coefficients. For example, the encoding device can generate and encode prediction-related information for the current block. The prediction-related information can include the prediction mode information. Further, the encoding device can encode residual information including residual syntax elements for the current residual coefficients of the current block. The image information can include the residual information. For example, the encoding device can encode image information including the residual information and output it in the form of a bitstream. The bitstream can be transmitted to a decoding device via a network or a recording medium.

[0302] Also, for example, among the residual coefficients of the current block, the number of context-coded residual syntax elements, etc., for the residual coefficients before the current residual coefficient can be the same as the number of maximum context-coded bins, etc. (context coded bins) of the current block. That is, for example, the context-coded bins (context coded bins) for the current block can all be used as bins, etc., for the context-coded residual syntax elements, etc., for the residual coefficients before the current residual coefficient among the residual coefficients of the current block. In other words, for example, for the residual syntax elements, etc., for the previous residual coefficients, etc., of the current residual coefficient in the scanning order, the number of maximum context-coded bins, etc. (context coded bins) for the current block can all be used. On the other hand, for example, the number of maximum context-coded bins, etc. (context coded bins) of the current block can be derived based on the width and height of the current block.

[0303] For example, among the residual coefficients of the current block, the number of context-coded residual syntax elements, etc. for the residual coefficients before the current residual coefficient may be the same as the number of context coded bins, etc. of the current block, and the residual syntax elements, etc. for the current residual coefficient can include the absolute level information for the current residual coefficient and the sign flag of the residual coefficient. For example, the context coded bins, etc. for the current block can all be used as the bins, etc. of the context-coded residual syntax elements, etc. for the residual coefficients before the current residual coefficient among the residual coefficients of the current block, and the residual syntax elements, etc. for the current residual coefficient can include the coefficient level information for the current residual coefficient and the sign flag of the residual coefficient. For example, when the number of context coded bins, etc. of the current block is all used for the residual syntax elements, etc. for the residual coefficients before the current residual coefficient in the scanning order, the residual syntax elements, etc. for the current residual coefficient can include the coefficient level information for the current residual coefficient and the sign flag of the residual coefficient. The residual syntax elements, etc. for the current residual coefficient can be encoded on a bypass basis. That is, the residual syntax elements, etc. for the current residual coefficient can be encoded based on a uniform probability distribution. For example, the coefficient level information can represent the absolute value of the coefficient level of the current residual coefficient. Also, the sign flag can represent the sign of the current residual coefficient.For example, when the value of the sign flag is 0, the sign flag can indicate that the coefficient level of the current residual coefficient is a positive value, and when the value of the sign flag is 1, the sign flag can indicate that the coefficient level of the current residual coefficient is a negative value. The coefficient level information can be the aforementioned abs_remainder, and the sign flag can be the aforementioned coeff_sign_flag.

[0304] Also, for example, the residual information can include a transform skip flag for the current block with respect to the current block. The transform skip flag can indicate whether transformation can be applied to the current block. That is, the transform skip flag can indicate whether transformation has been applied to the residual coefficients of the current block. The syntax element representing the transform skip flag can be the aforementioned transform_skip_flag. For example, when the value of the transform skip flag is 0, the transform skip flag can indicate that transformation is not applied to the current block, and when the value of the transform skip flag is 1, the transform skip flag can indicate that transformation has been applied to the current block. For example, when the current block is a transform skip block, the value of the transform skip flag for the current block can be 1.

[0305] Further, for example, the encoding device can generate residual information of the current block based on the residual sample of the current block or the like. For example, the image information can include residual information for the current block. For example, the residual information can include a residual syntax element or the like for a residual coefficient before the current residual coefficient in the scanning order. For example, the residual syntax element or the like can include syntax elements such as coded_sub_block_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, abs_remainder, and / or coeff_sign_flag.

[0306] For example, the context-coded residual syntax element etc. can include a valid coefficient flag indicating whether the residual coefficient is a non-zero residual coefficient, a parity level flag for the parity of the coefficient level for the residual coefficient, a sign flag representing the sign for the residual coefficient, a first coefficient level flag indicating whether the coefficient level is greater than a first critical value, and / or a second coefficient level flag indicating whether the coefficient level of the residual coefficient is greater than a second critical value. Also, for example, the context-coded residual syntax element etc. can include a third coefficient level flag indicating whether the coefficient level is greater than a third critical value, a fourth coefficient level flag indicating whether the coefficient level of the residual coefficient is greater than a fourth critical value, and / or a fifth coefficient level flag indicating whether the coefficient level of the residual coefficient is greater than a fifth critical value. Here, the valid coefficient flag can be sig_coeff_flag, the parity level flag can be par_level_flag, the sign flag can be ceff_sign_flag, the first coefficient level flag can be abs_level_gt1_flag, and the second coefficient level flag can be abs_level_gt3_flag or abs_level_gtx_flag. Also, the third coefficient level flag can be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag can be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag can be abs_level_gt9_flag or abs_level_gtx_flag.

[0307] Also, for example, the residual information can include a syntax element coded on a bypass basis for the residual coefficient of the current block. The syntax element coded by bypass coding can include coefficient level information for the value of the current residual coefficient. The coefficient level information can be abs_remainder and / or dec_abs_level. Also, the syntax element coded by bypass coding can include the sign flag.

[0308] Also, for example, the encoding device can generate prediction-related information for the current block with respect to the current block. The image information can include prediction-related information for the current block. The prediction-related information can include prediction mode information applied to the current block. The decoding device can perform inter prediction or intra prediction for the current block based on the prediction-related information received via the bitstream, and can derive a prediction sample of the current block.

[0309] On the other hand, the bitstream can be transmitted to the decoding device via a network or a (digital) recording medium. Here, the network can include a broadcast network and / or a communication network, etc., and the digital recording medium can include various recording media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.

[0310] FIG. 13 schematically shows an encoding apparatus that executes the image encoding method according to this document. The method disclosed in FIG. 12 can be executed by the encoding apparatus disclosed in FIG. 13. Specifically, for example, the prediction unit of the encoding apparatus in FIG. 13 can execute S1200 in FIG. 12, the residual processing unit of the encoding apparatus in FIG. 13 can execute S1210 to S1220 in FIG. 12, and the entropy encoding unit of the encoding apparatus in FIG. 13 can execute S1230 in FIG. 12. Also, although not shown, the process of generating a restored sample and a restored picture for the current block based on the residual sample and the prediction sample for the current block can be executed by the addition unit of the encoding apparatus.

[0311] FIG. 14 schematically shows an image decoding method by a decoding apparatus according to this document. The method disclosed in FIG. 14 can be executed by the decoding apparatus disclosed in FIG. 3. Specifically, for example, S1400 in FIG. 14 can be executed by the entropy decoding unit of the decoding apparatus, S1410 to S1420 can be executed by the prediction unit of the decoding apparatus, S1430 to S1440 can be executed by the residual processing unit of the decoding apparatus, and S1450 can be executed by the addition unit of the decoding apparatus.

[0312] The decoding apparatus acquires image information including prediction mode information and residual information via a bit stream (S1400). The decoding apparatus can acquire image information including prediction mode information and residual information for the current block via the bit stream. For example, the image information can include prediction mode information for the current block. For example, the image information can include prediction-related information for the current block, and the prediction-related information can include the prediction mode information. The prediction mode information can indicate whether inter prediction is applied to the current block or intra prediction is not applied.

[0313] Also, for example, the residual information can include, for example, a residual syntax element for a current residual coefficient within a current block. Also, for example, the residual information can include, for example, a residual syntax element for a residual coefficient within the current block. Here, the current block can be a coding block (CB) or a transform block (TB). Also, a residual coefficient can also be referred to as a transform coefficient.

[0314] Also, for example, the current block can be a transform skip block.

[0315] Also, for example, among the residual coefficients of the current block, the number of context-coded residual syntax elements, etc. for the residual coefficients before the current residual coefficient may be the same as the number of context coded bins, etc. of the current block, and the residual syntax elements, etc. for the current residual coefficient may include absolute level information for the current residual coefficient and a sign flag of the residual coefficient. The number of context coded bins, etc. of the current block can be derived based on the width and height of the current block. For example, the context coded bins, etc. for the current block can be all used as bins, etc. of the context-coded residual syntax elements, etc. for the residual coefficients before the current residual coefficient among the residual coefficients of the current block, and the residual syntax elements, etc. for the current residual coefficient may include coefficient level information for the current residual coefficient and a sign flag of the residual coefficient. For example, when the number of context coded bins, etc. of the current block is all used for the residual syntax elements, etc. for the residual coefficients before the current residual coefficient in the scanning order, the residual syntax elements, etc. for the current residual coefficient may include coefficient level information for the current residual coefficient and a sign flag of the residual coefficient. The residual syntax elements, etc. for the current residual coefficient can be decoded on a bypass basis. That is, the residual syntax elements, etc. for the current residual coefficient can be decoded based on a uniform probability distribution. For example, the coefficient level information can represent the absolute value of the coefficient level of the current residual coefficient. Also, the sign flag can represent the sign of the current residual coefficient.For example, when the value of the sign flag is 0, the sign flag can indicate that the coefficient level of the current residual coefficient is a positive value, and when the value of the sign flag is 1, the sign flag can indicate that the coefficient level of the current residual coefficient is a negative value. The coefficient level information can be the aforementioned abs_remainder, and the sign flag can be the aforementioned coeff_sign_flag.

[0316] Also, for example, the residual information can include a transform skip flag for the current block with respect to the current block. The transform skip flag can indicate whether transformation can be applied to the current block. That is, the transform skip flag can indicate whether transformation has been applied to the residual coefficients, etc. of the current block. The syntax element representing the transform skip flag can be the aforementioned transform_skip_flag. For example, when the value of the transform skip flag is 0, the transform skip flag can indicate that transformation is not applied to the current block, and when the value of the transform skip flag is 1, the transform skip flag can indicate that transformation has been applied to the current block. For example, when the current block is a transform skip block, the value of the transform skip flag for the current block can be 1.

[0317] Also, for example, the image information can include residual information for the current block. For example, the residual information can include residual syntax elements for residual coefficients before the current residual coefficient in the scanning order and the like. For example, the residual syntax elements and the like can include syntax elements such as coded_sub_block_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, abs_remainder, and / or coeff_sign_flag.

[0318] For example, the context-coded residual syntax element or the like may include a valid coefficient flag indicating whether the residual coefficient is a non-zero residual coefficient, a parity level flag for the parity of the coefficient level for the residual coefficient, a sign flag representing the sign for the residual coefficient, a first coefficient level flag indicating whether the coefficient level is greater than a first critical value, and / or a second coefficient level flag indicating whether the coefficient level of the residual coefficient is greater than a second critical value. Also, for example, the context-coded residual syntax element or the like may include a third coefficient level flag indicating whether the coefficient level is greater than a third critical value, a fourth coefficient level flag indicating whether the coefficient level of the residual coefficient is greater than a fourth critical value, and / or a fifth coefficient level flag indicating whether the coefficient level of the residual coefficient is greater than a fifth critical value. Here, the valid coefficient flag may be sig_coeff_flag, the parity level flag may be par_level_flag, the sign flag may be ceff_sign_flag, the first coefficient level flag may be abs_level_gt1_flag, and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag. Also, 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.

[0319] Also, for example, the residual information can include a syntax element coded on a bypass basis for the residual coefficient of the current block. The syntax element coded by bypass coding can include coefficient level information for the value of the current residual coefficient. The coefficient level information can be abs_remainder and / or dec_abs_level. Also, the syntax element coded by bypass coding can include the sign flag.

[0320] The decoding device derives the prediction mode of the current block based on the prediction mode information (S1410). The decoding device can determine whether inter prediction is applied to the current block or intra prediction is not applied based on the prediction mode information, and can execute prediction based on this.

[0321] The decoding device derives a prediction sample based on the prediction mode (S1420).

[0322] For example, the decoding device can derive the prediction mode applied to the current block based on the prediction mode information, and can derive the prediction sample of the current block based on the prediction mode. For example, when inter prediction is applied to the current block, the decoding device can derive the motion information of the current block based on the prediction-related information included in the image information, and can derive the prediction sample of the current block based on the motion information. Also, for example, when intra prediction is applied to the current block, the decoding device can derive a reference sample based on the surrounding samples of the current block, and can derive the prediction sample of the current block based on the reference sample and the intra prediction mode of the current block. The reference sample etc. can include the upper reference sample etc. and the left reference sample etc. of the current block. For example, when the size of the current block is N×N and the x component of the top-left sample position of the current block is 0 and the y component is 0, the left reference sample etc. can be p[-1][0] to p[-1][2N-1], and the upper reference sample etc. can be p[0][-1] to p[2N-1][-1].

[0323] The decoding device derives the current residual coefficient based on a residual syntax element or the like for the current residual coefficient in the current block (S1430). The decoding device can derive the current residual coefficient based on the residual syntax element or the like. The residual syntax element or the like can include coefficient level information for the current residual coefficient and a sign flag of the residual coefficient.

[0324] For example, the absolute level of the current residual coefficient can be derived as the value represented by the coefficient level information for the current residual coefficient, and the sign of the current residual coefficient can be derived as the sign represented by the sign flag.

[0325] On the one hand, for example, the current residual coefficient can be derived without performing level mapping. For example, among the residual coefficients of the current block, the number of context-coded residual syntax elements, etc. for the residual coefficients before the current residual coefficient can be the same as the number of context coded bins, etc. of the current block, and the residual syntax elements, etc. for the current residual coefficient can include absolute level information for the current residual coefficient and the sign flag of the residual coefficient, and the current residual coefficient can be derived without performing level mapping. Here, deriving the current residual coefficient only from the absolute level information and the sign flag can be referred to as simplified residual data coding. That is, the residual coefficient can be derived based on simplified residual data coding. Also, for example, the context coded bins, etc. for the current block can be entirely used as bins, etc. of the context-coded residual syntax elements, etc. for the residual coefficients before the current residual coefficient among the residual coefficients of the current block, and the residual syntax elements, etc. for the current residual coefficient can include coefficient level information for the current residual coefficient and the sign flag of the residual coefficient, and the current residual coefficient can be derived without performing level mapping.For example, when all of the number of context coded bins, etc. for the current block with respect to the residual syntax element, etc. of the current residual coefficient with respect to the previous residual coefficient in the scanning order are used, the residual syntax element, etc. for the current residual coefficient can include coefficient level information for the current residual coefficient and a sign flag of the residual coefficient, and the current residual coefficient can be derived without performing level mapping. Also, for example, the residual coefficient, etc. before the current residual coefficient can be derived by performing the level mapping.

[0326] On the other hand, for example, the level mapping can indicate the scheme shown in Table 19 above. For example, the level mapping can mean a process of deriving the minimum value among the absolute level of the left residual coefficient of the residual coefficient and the absolute level of the upper residual coefficient of the residual coefficient, comparing the minimum value with the absolute level of the residual coefficient, and correcting the absolute level of the residual coefficient based on the minimum value.

[0327] The decoding device derives a residual sample based on the current residual coefficient (S1440). The decoding device can derive the residual sample of the current block based on the current residual coefficient. That is, the decoding device can derive the residual sample of the current block based on the current residual coefficient. As an example, when it is derived that no transformation is applied to the current block based on the transform skip flag, that is, when the value of the transform skip flag is 1, the decoding device can derive the current residual coefficient as the residual sample of the current block. Or, for example, when it is derived that no transformation is applied to the current block based on the transform skip flag, that is, when the value of the transform skip flag is 1, the decoding device can inverse-quantize the current residual coefficient to derive the residual sample of the current block. Or, for example, when it is derived that transformation is applied to the current block based on the transform skip flag, that is, when the value of the transform skip flag is 0, the decoding device can inverse-transform the current residual coefficient to derive the residual sample of the current block. Or, for example, when it is derived that transformation is applied to the current block based on the transform skip flag, that is, when the value of the transform skip flag is 0, the decoding device can inverse-quantize the current residual coefficient and inverse-transform the inverse-quantized coefficient to derive the residual sample of the current block.

[0328] The decoding device derives a restored sample of the current block based on the prediction sample and the residual sample (S1450).

[0329] For example, the decoding device can derive a restored sample of the current block based on the prediction sample and the residual sample. For example, the decoding device can generate the restored sample through addition of the prediction sample and the residual sample.

[0330] Thereafter, if necessary, in order to improve subjective / objective image quality, intra-loop filtering procedures such as deblocking filtering, SAO, and / or ALF procedures can be applied to the restored picture as described above.

[0331] FIG. 15 schematically shows a decoding device that executes the image decoding method according to this document. The method disclosed in FIG. 14 can be executed by the decoding device disclosed in FIG. 15. Specifically, for example, the entropy decoding unit of the decoding device in FIG. 15 can execute S1400 in FIG. 14, the prediction unit of the decoding device in FIG. 15 can execute S1410 to S1420 in FIG. 14, the residual processing unit of the decoding device in FIG. 15 can execute S1430 to S1440 in FIG. 14, and the addition unit of the decoding device in FIG. 15 can execute S1450 in FIG. 14.

[0332] As described above with respect to this document, the efficiency of residual coding can be increased.

[0333] Also, according to this document, a residual coefficient to which simplified residual data coding is applied can be derived without performing level mapping, reducing coding complexity and improving overall residual coding efficiency.

[0334] Also, regarding this document, the residual coefficients to which the simplified residual data coding is applied may have a low correlation with the peripheral residual coefficients. Therefore, the efficiency of the level mapping executed based on the peripheral residual coefficients is low, and no level mapping is executed for the residual coefficients to which the simplified residual data coding is applied, thereby reducing the coding complexity and improving the overall residual coding efficiency.

[0335] In the above-described embodiments, the method is described based on a flowchart in a series of steps or blocks. However, this document is not limited to the order of the steps, and a certain step can occur in a different order or simultaneously with steps different from the above. Also, those skilled in the art can understand that the steps shown in the flowchart are not exclusive, other steps are included, or one or more steps of the flowchart can be deleted without affecting the scope of this document.

[0336] The embodiments described in this document can be realized and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in each drawing can be realized and executed on a computer, processor, microprocessor, controller, or chip. In this case, the information for realization (e.g., information on instructions) or algorithms can be stored in a digital recording medium.

[0337] In addition, the decoding device and encoding device to which the embodiments of this document are applied can be included in a multimedia broadcast transmission / reception device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conferencing device, a real-time communication device such as video communication, a mobile streaming device, a recording medium, a camcorder, an on-demand video (VoD) service providing device, an OTT video (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, an image phone video device, a transportation means terminal (e.g., a vehicle terminal, an airplane terminal, a ship terminal, etc.), and a medical video device, etc., and can be used to process video signals or data signals. For example, as an OTT video (Over the top video) device, it can be equipped with a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recoder), etc.

[0338] In addition, the processing method to which the embodiments of this document are applied can be produced in the form of a program executed by a computer and can be stored in a computer-readable recording medium. Multimedia data having the data structure according to this document can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which data that can be read by a computer is stored. The computer-readable recording medium can include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium includes a medium realized in the form of a carrier wave (e.g., transmission via the Internet). Also, the bitstream generated by the encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0339] In addition, the embodiments of this document can be implemented by a computer program product with program code, and the program code can be executed by a computer according to the embodiments of this document. The program code can be stored on a computer-readable carrier.

[0340] FIG. 16 exemplarily shows a structural diagram of a content streaming system to which the embodiments of this document are applied.

[0341] The content streaming system to which the embodiments of this document are applied can generally include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.

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

[0343] The bitstream can be generated by an encoding method or a bitstream generation method to which the embodiments of this document are applied, and the streaming server can temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0344] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server serves as a medium to inform the user of what services are available. When the user requests a desired service from the web server, the web server transmits this to the streaming server, and the streaming server transmits multimedia data to the user. At this time, the content streaming system can include another control server, and in this case, the control server plays a role in controlling commands / responses between each device within the content streaming system.

[0345] The streaming server can receive content from a media repository and / or an encoding server. For example, when it comes to receiving content from the encoding server, the content can be received in real time. In this case, in order to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.

[0346] Examples of the user device include a mobile phone, smartphone, laptop computer, digital broadcast terminal, PDA (personal digital assistants), PMP (portable multimedia player), navigation device, slate PC, tablet PC, ultrabook, wearable device (e.g., smartwatch, smart glass, HMD (head mounted display)), digital TV, desktop computer, digital signage, etc. Each server within the content streaming system can be operated as a distributed server, and in this case, the data received by each server can be processed distributively.

[0347] The claims described in this specification can be combined in various ways. For example, the technical features of the method claims in this specification can be combined and implemented as an apparatus, and the technical features of the apparatus claims in this specification can be combined and implemented as a method. Also, the technical features of the method claims in this specification and the technical features of the apparatus claims can be combined and implemented as an apparatus, and the technical features of the method claims in this specification and the technical features of the apparatus claims can be combined and implemented as a method.

Claims

1. 1. An image decoding method performed by a decoding device, comprising: obtaining image information including prediction mode information and residual information through a bitstream; deriving a prediction mode of a current block based on the prediction mode information; deriving a prediction sample based on the prediction mode; deriving the current residual coefficient based on a residual syntax element for a current residual coefficient in the current block; deriving a residual sample based on the current residual coefficient; deriving a reconstructed sample of the current block based on the predicted sample and the residual sample; the residual information includes the residual syntax element for the current residual coefficient; the number of context coded residual syntax elements for residual coefficients preceding the current residual coefficient among the residual coefficients of the current block is equal to the maximum number of context coded bins of the current block; the residual syntax element for the current residual coefficient includes coefficient level information for the current residual coefficient and a sign flag for the current residual coefficient; an absolute level of the current residual coefficient is derived as a value indicated by coefficient level information for the current residual coefficient, and a sign of the current residual coefficient is derived as a sign indicated by the sign flag; The current residual coefficient is derived without performing level mapping, an absolute value level of the residual coefficient preceding the current residual coefficient is derived based on a plurality of significant coefficient flags indicating whether each of the residual coefficients is a non-zero residual coefficient; The absolute levels of the residual coefficients before the current residual coefficient are modified by performing the level mapping.

2. 2. The image decoding method of claim 1, wherein context coded bins for the current block are all used as bins of the context coded residual syntax elements for the residual coefficients preceding the current residual coefficient.

3. 1. An image encoding method performed by an encoding device, comprising: deriving a prediction sample for the current block based on inter prediction or intra prediction; deriving a residual sample of the current block based on the predicted sample; deriving current residual coefficients based on the residual samples; encoding image information including prediction mode information indicating a prediction mode of the current block and a residual syntax element for the current residual coefficient; the number of context coded residual syntax elements for residual coefficients preceding the current residual coefficient among the residual coefficients of the current block is equal to the maximum number of context coded bins of the current block; the residual syntax element for the current residual coefficient includes coefficient level information for the current residual coefficient and a sign flag for the current residual coefficient; the coefficient level information represents an absolute value of a coefficient level of the current residual coefficient, and the sign flag of the current residual coefficient represents a sign of the current residual coefficient; The current residual coefficient is encoded without performing level mapping, the absolute value levels of the residual coefficients before the current residual coefficient are modified by performing the level mapping; The modified absolute value levels of the residual coefficients preceding the current residual coefficient are encoded based on a plurality of significant coefficient flags indicating whether each of the residual coefficients is a non-zero residual coefficient.

4. 4. The image encoding method of claim 3, wherein context coded bins for the current block are all used as bins of the context coded residual syntax elements for the residual coefficients preceding the current residual coefficient.

5. 1. A method of transmitting data for an image, comprising: deriving a prediction sample for the current block based on inter prediction or intra prediction; deriving a residual sample of the current block based on the predicted sample; deriving current residual coefficients based on the residual samples; encoding image information including prediction mode information indicating a prediction mode of the current block and residual syntax elements for the current residual coefficients to generate a bitstream; transmitting the data including the bitstream; the number of context coded residual syntax elements for residual coefficients preceding the current residual coefficient among the residual coefficients of the current block is equal to the maximum number of context coded bins of the current block; the residual syntax element for the current residual coefficient includes coefficient level information for the current residual coefficient and a sign flag for the current residual coefficient; the coefficient level information represents an absolute value of a coefficient level of the current residual coefficient, and the sign flag of the current residual coefficient represents a sign of the current residual coefficient; The current residual coefficient is encoded without performing level mapping, the absolute value levels of the residual coefficients before the current residual coefficient are modified by performing the level mapping; The method of claim 1, wherein the modified absolute value levels of the residual coefficients preceding the current residual coefficient are encoded based on a plurality of significant coefficient flags indicating whether each of the residual coefficients is a non-zero residual coefficient.

Citation Information

Patent Citations

  • Image decoding method and apparatus for residual coding

    JP7453337B2

  • Image decoding method and apparatus for residual coding

    JP7657997B2