Image encoding / decoding method, bit stream transmission method, and recording medium

By extracting and processing the level value information of the transform coefficients in the video decoding method, the problem of low encoding efficiency of high-resolution videos is solved, and higher compression efficiency and coding performance are achieved.

CN119996697APending Publication Date: 2025-05-13LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510128607.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-09-20
Filing Date
2020-08-31
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art is difficult to effectively compress and transmit high-resolution, high-quality video/images, especially in scenarios where efficient encoding is required, such as virtual reality, artificial reality and hologram applications.

Method used

By extracting the level value information of the transform coefficients from the bitstream in the video decoding method, and selecting an appropriate Rice parameter lookup table based on the information, the Rice parameter, cell string and the final transform coefficient level value are derived.

Benefits of technology

Improves the compression efficiency of video/image, especially in residual coding and transform coefficient level coding, which can provide higher performance in low QP (quantized parameter) environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996697A_ABST
    Figure CN119996697A_ABST
Patent Text Reader

Abstract

The invention relates to an image encoding / decoding method, a bitstream transmission method, and a recording medium. A video decoding method performed by a decoding device according to the present document may comprise the steps of: obtaining information indicating a level value of a transform coefficient in a current block from a bitstream; selecting one Rice parameter lookup table for information indicating a level value of the transform coefficient from among a plurality of Rice parameter lookup tables; deriving a Rice parameter for information indicating a level value of the transform coefficient based on the selected Rice parameter lookup table; deriving a cell string for information indicating a level value of the transform coefficient based on a Rice parameter; and deriving a level value of the transform coefficient based on the cell string.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the original invention patent application with application number 202080073492.0 (international application number: PCT / KR2020 / 011627, application date: August 31, 2020, invention name: Method and device for encoding transform coefficients in video / image coding systems). Technical Field

[0002] The present technology relates to a method and apparatus for encoding transform coefficients when encoding / decoding a video / image. Background Art

[0003] Recently, there is an increasing demand for high-resolution, high-quality images / videos such as 4K, 8K or higher ultra-high definition (UHD) images / videos in various fields. As the image / video resolution or quality becomes higher, relatively more information or bits are transmitted compared to conventional image / video data. Therefore, if the image / video data is transmitted via a medium such as an existing wired / wireless broadband line or is stored in a traditional storage medium, the cost of transmission and storage is easily increased.

[0004] In addition, there is growing interest and demand for virtual reality (VR) and artificial reality (AR) content and immersive media such as holograms; and there is also growing broadcasting of images / videos that exhibit image / video characteristics different from actual images / videos (e.g., game images / videos).

[0005] Therefore, highly efficient image / video compression technology is required to effectively compress and transmit, store, or play high-resolution, high-quality images / videos showing various characteristics as described above. Summary of the invention

[0006] Technical issues

[0007] The technical subject of this document is to provide a method and device for enhancing video / image encoding efficiency.

[0008] Another technical subject of this document is to provide a method and device for improving residual coding efficiency.

[0009] Another technical subject of this document is to provide a method and apparatus for improving encoding performance of level encoding for transform coefficients in residual encoding.

[0010] Technical Solution

[0011] According to an implementation manner of the present document, a video decoding method performed by a decoding device may include the following steps: obtaining information representing the level value of a transform coefficient in a current block from a bitstream; selecting any one of a plurality of Rice parameter lookup tables for the information representing the level value of the transform coefficient; deriving Rice parameters for the information representing the level value of the transform coefficient based on the selected Rice parameter lookup table; deriving a symbol string for the information representing the level value of the transform coefficient based on the Rice parameters; and deriving the level value of the transform coefficient based on the symbol string.

[0012] According to another embodiment of the present document, a video decoding method performed by a decoding device may include the following steps: obtaining information representing the level value of a transform coefficient in a current block from a bitstream; determining an index value of a Rice parameter lookup table for information representing the level value of the transform coefficient; deriving Rice parameters for information representing the level value of the transform coefficient according to the Rice parameter lookup table based on the index value; deriving a symbol string for information representing the level value of the transform coefficient based on the Rice parameters; and deriving the level value of the transform coefficient based on the symbol string.

[0013] Beneficial Effects

[0014] According to the implementation of this document, the overall video / image compression efficiency can be improved.

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

[0016] According to the implementation of this document, the encoding performance of level encoding of transform coefficients in residual encoding can be improved.

[0017] According to an embodiment of the present document, in the case where low-level values ​​and high-level values ​​of transform coefficients are mixed, higher performance can be provided in a lossless or high bit rate environment (low QP) with relatively high-level values. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 An example of a video / image encoding system to which embodiments of this document are applicable is schematically illustrated.

[0019] Figure 2 is a diagram schematically illustrating a configuration of a video / image encoding device to which an embodiment of this document is applicable.

[0020] Figure 3 is a diagram schematically illustrating a configuration of a video / image decoding device to which an embodiment of this document is applicable.

[0021] Figure 4 Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements is exemplarily illustrated.

[0022] Figure 5 Transform coefficients in a 4×4 block are exemplarily illustrated.

[0023] Figure 6 and Figure 7 An example of an entropy encoding method and related components according to an embodiment of this document is schematically illustrated.

[0024] Figure 8 An example of an entropy encoding method according to another embodiment of this document is schematically illustrated.

[0025] Fig. 9 and Fig.10 An example of an entropy decoding method and related components according to an embodiment of this document is schematically illustrated.

[0026] Fig.11 An example of an entropy decoding method according to another embodiment of this document is schematically illustrated.

[0027] Fig.12 A video / image encoding method according to an embodiment of this document is illustrated.

[0028] Fig.13 A video / image decoding method according to an embodiment of this document is illustrated.

[0029] Fig.14 An example of a content streaming system to which the embodiments disclosed in this document are applicable is illustrated. DETAILED DESCRIPTION

[0030] The disclosure of this document can be modified in various forms, and its specific embodiments will be described and illustrated in the accompanying drawings. The terms used in this document are only used to describe specific embodiments and are not intended to limit the methods disclosed in this document. Singular expressions include "at least one" expressions as long as it is clearly interpreted differently. Terms such as "including" and "having" are intended to indicate the presence of features, quantities, steps, operations, elements, components, or combinations thereof used in the document, and therefore it should be understood that the possibility of the presence or addition of one or more different features, quantities, steps, operations, elements, components, or combinations thereof is not excluded.

[0031] In addition, each configuration of the drawings described in this document is an independent illustration for explaining the functions of features that are different from each other, and does not mean that each configuration is implemented by different hardware or different software. For example, two or more configurations can be combined to form a configuration, and a configuration can also be divided into multiple configurations. Without departing from the gist of the disclosed method of this document, embodiments of combined and / or separated configurations are included within the scope of the disclosure of this document.

[0032] Hereinafter, the embodiments of the present document will be described in detail with reference to the accompanying drawings. In addition, in all drawings, the same reference numerals may be used to indicate the same elements, and the same description of the same elements will be omitted.

[0033] Figure 1 An example of a video / image encoding system to which embodiments of this document may be applied is illustrated.

[0034] Reference Figure 1 The video / image coding system may include a first device (source device) and a second device (receiving device). The source device may send the coded video / image information or data in the form of a file or stream to the receiving device via a digital storage medium or a network.

[0035] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display, and the display may be configured as a separate device or an external component.

[0036] The video source may acquire the video / image by a process of capturing, synthesizing or generating the video / image. The video source may include a video / image capture device and / or a video / image generation device. For example, the video / image capture device may include one or more cameras, a video / image archive including previously captured videos / images, etc. For example, the video / image generation device may include a computer, a tablet computer, and a smart phone, and may generate the video / image (electronically). For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capture process may be replaced by a process of generating relevant data.

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

[0038] The transmitter may transmit the encoded image / image information or data output in the form of a bit stream to a receiver of a receiving device in the form of a file or stream via a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include an element for generating a media file in a predetermined file format, and may include an element for transmission via a broadcast / communication network. The receiver may receive / extract a bit stream and transmit the received bit stream to a decoding device.

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

[0040] The renderer may render the decoded video / image. The rendered video / image may be displayed through a display.

[0041] This document relates to video / image coding. For example, the methods / implementations disclosed in this document may be applied to methods disclosed in the Versatile Video Coding (VVC) standard. In addition, the methods / implementations disclosed in this document may be applied to methods disclosed in the Basic Video Coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd generation Audio Video Coding standard (AVS2), or the next generation video / image coding standard (e.g., H.267, H.268, etc.).

[0042] Various embodiments related to video / image encoding are presented in this document, and unless otherwise specified, the above embodiments may also be performed in combination with each other.

[0043] In this document, video may refer to a series of images over time. A picture generally refers to a unit representing an image at a specific time frame, and a slice / tile refers to a unit that constitutes a part of a picture in terms of coding. A slice / tile may include one or more coding tree units (CTUs). A picture may consist of one or more slices / tiles. A picture may consist of one or more tile groups. A tile group may include one or more tiles. A tile may represent a rectangular area of ​​a CTU row within a tile in a picture. A tile may be divided into a plurality of tiles, each of which may consist of one or more CTU rows within a tile. Tiles that are not divided into a plurality of tiles may also be referred to as tiles. Tile scanning may represent a specific ordering of CTUs of a partitioned picture, wherein CTUs are continuously ordered in a CTU raster scan within a tile, tiles within a tile are continuously ordered in a raster scan of tiles of a tile, and tiles in a picture are continuously ordered in a raster scan of tiles of a tile. A tile is a rectangular area of ​​a CTU within a specific tile column and a specific tile row in a picture. A tile column is a rectangular area of ​​a CTU having a height equal to the height of the picture and a width specified by a syntax element in the picture parameter set. A tile row is a rectangular area of ​​a CTU having a height specified by a syntax element in the picture parameter set and a width equal to the width of the picture. Tile scanning is a specific sequential ordering of the CTUs that partition a picture, where the CTUs are ordered continuously in a CTU raster scan in tiles and the tiles in a picture are ordered continuously in a raster scan of the tiles of the picture. A slice includes an integer number of tiles of a picture that can be contained only in a single NAL unit. A slice can consist of multiple complete tiles, or only a sequence of continuous complete tiles of a tile. In this document, tile groups and slices can be used instead of each other. For example, in this document, a tile group / tile group header can be referred to as a slice / slice header.

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

[0045] A unit may represent a basic unit of image processing. A unit may include at least one of a specific area of ​​a picture and information related to the area. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as a block or an area. In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients. Alternatively, a sample may mean a pixel value in a spatial domain, and when such a pixel value is transformed into a frequency domain, it may mean a transform coefficient in a frequency domain.

[0046] In this document, the terms " / " and "," should be interpreted as indicating "and / or". For example, the expression "A / B" may mean "A and / or B". Furthermore, "A, B" may mean "A and / or B". Furthermore, "A / B / C" may mean "at least one of A, B, and / or C". Furthermore, "A / B / C" may mean "at least one of A, B, and / or C".

[0047] Furthermore, in this document, the term "or" should be interpreted as indicating "and / or". For example, the expression "A or B" may include 1) only A, 2) only B, and / or 3) both A and B. In other words, the term "or" in this document should be interpreted as indicating "additionally or alternatively".

[0048] In addition, brackets used in this document may mean "for example". Specifically, in the case of expressing "prediction (intra-frame prediction)", it may indicate that "intra-frame prediction" is proposed as an example of "prediction". In other words, the term "prediction" in this document is not limited to "intra-frame prediction", and "intra-frame prediction" is proposed as an example of "prediction". In addition, even in the case of expressing "prediction (ie, intra-frame prediction)", it may indicate that "intra-frame prediction" is proposed as an example of "prediction".

[0049] In this document, technical features explained separately in one drawing may be implemented separately or simultaneously.

[0050] Figure 2 is a diagram schematically illustrating a configuration of a video / image encoding device to which an embodiment of the present document can be applied. Hereinafter, a device referred to as a video encoding device may include an image encoding device.

[0051] Reference Figure 2 , the encoding device 200 includes an image segmenter 210, a predictor 220, a residual processor 230 and an entropy encoder 240, an adder 250, a filter 260 and a memory 270. The predictor 220 may include an inter-frame predictor 221 and an intra-frame predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234 and an inverse transformer 235. The residual processor 230 may also include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. According to an embodiment, the image segmenter 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250 and the filter 260 may be configured by at least one hardware component (e.g., an encoder chipset or processor). In addition, the memory 270 may include a decoded picture buffer (DPB), or may be configured by a digital storage medium. The hardware component may also include the memory 270 as an internal / external component.

[0052] The image divider 210 may divide the input image (or picture or frame) input to the encoding device 200 into one or more processing units. For example, the processing unit may be referred to as a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units with a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, a quadtree structure may be applied first, and a binary tree structure and / or a ternary structure may be applied later. Alternatively, a binary tree structure may be applied first. The encoding process according to this document may be performed based on the final coding unit that is no longer divided. In this case, the maximum coding unit may be used as the final coding unit based on coding efficiency, etc. according to image characteristics, or if necessary, the coding unit may be recursively divided into coding units with a deeper depth and a coding unit with an optimal size may be used as the final coding unit. Here, the encoding process may include a process of prediction, transformation, and reconstruction (to be described later). As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be split or partitioned from the above-mentioned final coding unit. The prediction unit may be a unit for sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.

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

[0054] The encoding device 200 may subtract a prediction signal (prediction block, prediction sample array) output from the inter predictor 221 or the intra predictor 222 from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is sent to the transformer 232. In this case, as shown, the unit that subtracts the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) in the encoding device 200 may be referred to as a subtractor 231. The predictor may perform prediction on a processing target block (hereinafter referred to as a current block) and generate a prediction block including prediction samples of the current block. The predictor may determine whether intra prediction or inter prediction is applied in units of the current block or CU. As described later in the description of each prediction mode, the predictor may generate various types of information (e.g., prediction mode information) about prediction and send the generated information to the entropy encoder 240. The information about the prediction may be encoded by the entropy encoder 240 and output in the form of a bitstream.

[0055] The intra-frame predictor 222 may predict the current block with reference to samples in the current picture. Depending on the prediction mode, the referenced samples may be located near the current block or may be spaced apart. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. For example, the non-directional mode may include a DC mode and a plane mode. For example, depending on the level of detail of the prediction direction, the directional mode may include 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the settings. The intra-frame predictor 222 may use the prediction mode applied to the neighboring blocks to determine the prediction mode applied to the current block.

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

[0057] The predictor 220 may generate a prediction signal based on various prediction methods described later. For example, the predictor 220 may apply intra prediction or inter prediction to predict a block, and may apply intra prediction and inter prediction at the same time. This may be referred to as combined inter and intra prediction (CIIP). In addition, the predictor may be based on an intra block copy (IBC) prediction mode or based on a palette mode for predicting blocks. The IBC prediction mode or the palette mode may be used for image / video encoding of content such as games, such as screen content coding (SCC). IBC basically performs prediction in the current picture, but it may be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, the sample values ​​in the picture may be signaled based on information about the palette table and the palette index.

[0058] The prediction signal generated by the predictor (including the inter-frame predictor 221 and / or the intra-frame predictor 222) may be used to generate a reconstructed signal or to generate a residual signal.

[0059] The transformer 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, when the relationship information between pixels is illustrated as a graph, GBT means a transform obtained from a graph. CNT means a transform obtained based on a prediction signal generated by using all previously reconstructed pixels. In addition, the transform process may also be applied to square pixel blocks of the same size, or may also be applied to variable-sized blocks that are not square.

[0060] The quantizer 233 quantizes the transform coefficients and transmits the quantized transform coefficients to the entropy encoder 240, and the entropy encoder 240 encodes the quantized signal (information about the quantized transform coefficients) and outputs the encoded signal as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the quantized transform coefficients having a block form in a one-dimensional vector form based on a coefficient scanning order, and also generate information about the quantized transform coefficients based on the quantized transform coefficients in a one-dimensional vector form.

[0061] The entropy encoder 240 may perform various encoding methods such as, for example, exponential Golomb, context adaptive variable length coding (CAVLC), and context adaptive binary arithmetic coding (CABAC). The entropy encoder 240 may also encode information necessary for video / image reconstruction (e.g., values ​​of syntax elements, etc.) in addition to quantized transform coefficients, together or separately. The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of a network abstraction layer (NAL) in the form of a bitstream. The video / image information may also include information about 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). In addition, the video / image information may also include general constraint information. In this document, information and / or syntax elements signaled / sent from an encoding device to a decoding device may be included in the video / image information. The video / image information may be encoded by the aforementioned encoding process and thus included in the bitstream. The bitstream may be transmitted over a network or may be stored in a digital storage medium. Here, the network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) for transmitting a signal output from the entropy encoder 240 and / or a storage unit (not shown) for storing the signal may be configured as an internal / external element of the encoding device 200, or the transmitting unit may also be included in the entropy encoder 240.

[0062] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, dequantization and inverse transform can be applied to the quantized transform coefficients by the dequantizer 234 and the inverse transformer 235 to reconstruct the residual signal (residual block or residual sample). The adder 250 can add the reconstructed residual signal to the prediction signal output from the inter-frame predictor 221 or the intra-frame predictor 222 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). When there is no residual for the processing target block, such as when the skip mode is applied, the prediction block can be used as a reconstructed block. The adder 250 can be referred to as a restorer or a recovery block generator. The generated reconstructed signal can be used for intra-frame prediction of the next processing target block in the current picture, and can also be used for inter-frame prediction of the next picture after filtering, as described below.

[0063] Additionally, luma mapping and chroma scaling (LMCS) may also be applied during the picture encoding and / or reconstruction process.

[0064] The filter 260 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 270 (specifically, the DPB of the memory 270). For example, various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various types of information related to filtering and transmit the generated information to the entropy encoder 240, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bitstream.

[0065] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter predictor 221. When inter prediction is applied by the encoding apparatus, prediction mismatch between the encoding apparatus 200 and the decoding apparatus may be avoided and encoding efficiency may be improved.

[0066] The DPB of the memory 270 may store the modified reconstructed picture for use as a reference picture in the inter-frame predictor 221. The memory 270 may store the motion information of the block from which the motion information in the current picture is derived (or encoded) and / or the motion information of the block in the reconstructed picture. The stored motion information may be transmitted to the inter-frame predictor 221 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 270 may store the reconstructed samples of the reconstructed block in the current picture and may transmit the reconstructed samples to the intra-frame predictor 222.

[0067] Figure 3is a diagram for schematically explaining a configuration of a video / image decoding device to which an embodiment of the present document can be applied.

[0068] Reference Figure 3 , the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter-frame predictor 332 and an intra-frame predictor 331. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. According to an embodiment, the entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured by a hardware component (e.g., a decoder chipset or a processor). In addition, the memory 360 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware component may also include a memory 360 as an internal / external component.

[0069] When a bit stream including video / image information is input, the decoding device 300 can reconstruct the bit stream corresponding to the bit stream in the video / image format. Figure 2 The image corresponding to the processing of the video / image information in the encoding device. For example, the decoding device 300 may derive the unit / block based on the block partition related information obtained from the bit stream. The decoding device 300 may perform decoding using the processing unit applied in the encoding device. Therefore, for example, the processing unit of decoding may be a coding unit, and the coding unit may be split from the coding tree unit or the maximum coding unit according to a quadtree structure, a binary tree structure and / or a ternary tree structure. One or more transform units may be derived from the coding unit. The reconstructed image signal decoded and output by the decoding device 300 may be reproduced by a reproduction device.

[0070] The decoding device 300 may receive the bit stream from Figure 2The received signal can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The decoding device may also decode the picture based on information about the parameter set and / or the general constraint information. The signaled / received information and / or syntax elements described later in this document may be decoded by a decoding process and obtained from the bitstream. For example, the entropy decoder 310 may decode the information within the bitstream based on a coding method such as exponential Golomb coding, context adaptive variable length coding (CAVLC), or context adaptive binary arithmetic coding (CABAC), and output syntax elements required for image reconstruction and quantized values ​​of transform coefficients for the residual. More specifically, the CABAC entropy decoding method may receive a cell corresponding to each syntax element in a bitstream, determine a context model by using information of a decoding target syntax element, decoding information of a decoding target block, or information of a symbol / cell decoded in a previous stage, and perform arithmetic decoding on the cell by predicting the probability of occurrence of the cell according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model by using the information of the decoded symbol / cell for the context model of the next symbol / cell after determining the context model. Information related to prediction among the information decoded by the entropy decoder 310 may be provided to the predictor (inter-frame predictor 332 and intra-frame predictor 331), and the residual value (i.e., quantized transform coefficient and related parameter information) that has been entropy decoded at the entropy decoder 310 may be input to the residual processor 320.

[0071] The residual processor 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, information about filtering among the information decoded by the entropy decoder 310 may be provided to the filter 350. In addition, a receiver (not shown) for receiving a signal output from the encoding device may also be configured as an internal / external element of the decoding device 300, or the receiver may be a component of the entropy decoder 310. In addition, the decoding device according to this document may be referred to as a video / image / picture decoding device, and the decoding device may be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 310, and the sample decoder may include at least one of the following: a dequantizer 321, an inverse transformer 322, an adder 340, a filter 350, a memory 360, an inter-frame predictor 332, and an intra-frame predictor 331.

[0072] The dequantizer 321 may dequantize the quantized transform coefficient and output the transform coefficient. The dequantizer 321 may rearrange the quantized transform coefficient in a two-dimensional block form. In this case, the rearrangement may be performed based on a coefficient scanning order performed in the encoding device. The dequantizer 321 may perform dequantization on the quantized transform coefficient using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficient.

[0073] The inverse transformer 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0074] The predictor 330 may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block and determine a specific intra / inter prediction mode based on information on prediction output from the entropy decoder 310.

[0075] The predictor 330 may generate a prediction signal based on various prediction methods described below. For example, the predictor may apply intra prediction or inter prediction for predicting a block, and may apply intra prediction and inter prediction at the same time. This may be referred to as combined inter and intra prediction (CIIP). In addition, the predictor may predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode may be used for image / video encoding of content such as games, such as screen content coding (SCC). IBC may basically perform predictions in the current picture, but may be performed similarly to inter predictions so that reference blocks are derived within the current picture. That is, IBC may use at least one inter prediction technique described in this document. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, information about the palette table and the palette index may be included in the video / image information and signaled.

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

[0077] The inter-frame predictor 332 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the adjacent blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include information about the inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter-frame prediction, the adjacent blocks may include spatial adjacent blocks present in the current picture and temporal adjacent blocks present in the reference picture. For example, the inter-frame predictor 332 may construct a motion information candidate list based on the adjacent blocks and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and information about the prediction may include information indicating the inter-frame prediction mode for the current block.

[0078] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 332 and / or the intra-frame predictor 331). If there is no residual for the processing target block, such as when the skip mode is applied, the prediction block can be used as a reconstructed block.

[0079] The adder 340 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, and as described later, may also be output through filtering or may also be used for inter prediction of the next picture.

[0080] In addition, luminance mapping and chrominance scaling (LMCS) can also be applied to the picture decoding process.

[0081] The filter 350 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 360, specifically, in the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

[0082] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter-frame predictor 332. The memory 360 can store the motion information of the block from which the motion information in the current picture is derived (decoded) and / or the motion information of the block in the reconstructed picture. The stored motion information can be transmitted to the inter-frame predictor 260 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 360 can store the reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra-frame predictor 331.

[0083] In this document, the embodiments described in the filter 260 , the inter predictor 221 , and the intra predictor 222 of the encoding apparatus 200 may be equally applied or correspond to the filter 350 , the inter predictor 332 , and the intra predictor 331 .

[0084] The video / image encoding method according to the present document can be performed based on the following partition structure. Specifically, the prediction, residual processing ((inverse) transform and (de)quantization), syntax element encoding and filtering processes described later can be performed based on the CU (and / or TU and PU) and CTU derived based on the partition structure. The block partition process can be performed by the image segmenter 210 of the above-mentioned encoding device, and the partition related information can be processed by the entropy encoder 240 (encoding) and can be transmitted to the decoding device in the form of a bitstream. The entropy decoder 310 of the decoding device can derive the block partition structure of the current picture based on the partition related information obtained from the bitstream, and based on this, a series of processes for image decoding (e.g., prediction, residual processing, block / picture reconstruction, in-loop filtering, etc.) can be performed. The CU size and the TU size can be equal to each other, or multiple TUs can exist in the CU area. In addition, the CU size can generally represent the luminance component (sample) coding block (CB) size. The TU size can generally represent the luminance component (sample) transform block (TB) size. The chroma component (sample) CB or TB size can be derived based on the luminance component (sample) CB or TB size according to the component ratio according to the chroma format of the picture / image (chroma format, for example, 4:4:4, 4:2:2, 4:2:0, etc.). The TU size can be derived based on maxTbSize. For example, if the CU size is larger than maxTbSize, multiple TUs (TBs) of maxTbSize can be derived from the CU, and transformation / inverse transformation can be performed in units of TU (TB). In addition, for example, in the case of applying intra-frame prediction, the intra-frame prediction mode / type can be derived in units of CU (or CB), and the neighboring reference sample derivation and prediction sample generation process can be performed in units of TU (or TB). In this case, one or more TUs (or TBs) may exist in one CU (or CB) area, and in this case, multiple TUs (or TBs) may share the same intra-frame prediction mode / type.

[0085] In addition, in the video / image coding according to the present document, the image processing unit may also have a hierarchical structure. A picture may be divided into one or more tiles, tiles, slices and / or tile groups. A slice may include one or more tiles. A tile may include one or more CTU rows within a tile. A slice may include an integer number of tiles of a picture. A tile group may include one or more tiles. A tile may include one or more CTUs. A CTU may be divided into one or more CUs. A tile represents a rectangular area of ​​a CTU within a specific tile column and a specific tile row in a picture. According to the tile raster scan in the picture, a tile group may include an integer number of tiles. A slice header may carry information / parameters that may be applied to a corresponding slice (a block in a slice). In the case where the encoding / decoding device has a multi-core processor, encoding / decoding processing for tiles, slices, tiles and / or tile groups may be processed in parallel. In this document, slices or tile groups may be used interchangeably. That is, a tile group header may be referred to as a slice header. Here, the slice may have one of slice types including intra (I) slices, predicted (P) slices, and bi-predicted (B) slices. When predicting a block in an I slice, inter prediction may not be used, and only intra prediction may be used. Of course, even in this case, signaling may be performed by encoding the original sample values ​​without prediction. With respect to blocks in a P slice, intra prediction or inter prediction may be used, and in the case of using inter prediction, only uni-prediction may be used. In addition, with respect to blocks in a B slice, intra prediction or inter prediction may be used, and in the case of using inter prediction, bi-prediction may be used to the maximum extent.

[0086] The encoder may determine the patch / patch group, tile, slice, and maximum and minimum coding unit sizes taking into account coding efficiency or parallel processing or according to characteristics of the video image (e.g., resolution), and information about them or information used to derive them may be included in the bitstream.

[0087] The decoder can obtain information indicating whether the tiles / tile groups, tiles and slices of the current picture and the CTU in the tiles have been partitioned into multiple coding units. By obtaining (sending) such information only under certain conditions, efficiency can be improved.

[0088] The slice header (slice header syntax) may include information / parameters that can be commonly applied to slices. APS (APS syntax) or PPS (PPS syntax) may include information / parameters that can be commonly applied to one or more pictures. SPS (SPS syntax) may include information / parameters that can be commonly applied to one or more sequences. VPS (VPS syntax) may include information / parameters that can be commonly applied to multiple layers. DPS (DPS syntax) may include information / parameters that can be commonly applied to the entire video. DPS may include information / parameters related to the concatenation of a coded video sequence (CVS).

[0089] Herein, the upper layer syntax may include at least one of APS syntax, PPS syntax, SPS syntax, VPS syntax, DPS syntax, and slice header syntax.

[0090] In addition, for example, information on partitioning and configuration of tiles / tile groups / tiles / slices may be configured by the encoding end through a higher layer syntax and can be transmitted to the decoding device in the form of a bitstream.

[0091] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When quantization / dequantization is omitted, the quantized transform coefficient may be referred to as a transform coefficient. When transform / inverse transform is omitted, the transform coefficient may be referred to as a coefficient or a residual coefficient, or may still be referred to as a transform coefficient for consistency of expression.

[0092] In this document, the quantized transform coefficient and the transform coefficient may be referred to as a transform coefficient and a scaled transform coefficient, respectively. In this case, the residual information may include information about the transform coefficient, and the information about the transform coefficient may be signaled by a residual coding syntax. The transform coefficient may be derived based on the residual information (or information about the transform coefficient), and the scaled transform coefficient may be derived by inverse transforming (scaling) the transform coefficient. The residual sample may be derived based on the inverse transform of the scaled transform coefficient. This may also be applied / expressed in other parts of this document.

[0093] As described above, the encoding device may perform various encoding methods such as exponential Golomb, context adaptive variable length coding (CAVLC), and context adaptive binary arithmetic coding (CABAC). In addition, the decoding device may decode information in the bit stream based on an encoding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values ​​of syntax elements required for image reconstruction and the quantized values ​​of the transform coefficients associated with the residual. For example, the above encoding method may be performed as described below.

[0094] Figure 4 Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements is exemplarily illustrated.

[0095] The encoding process of CABAC may include a process of transforming the input signal into a binary value by binarization when the input signal is not a binary value but a syntax element. If the input signal is already a binary value (i.e., if the value of the input signal is a binary value), the input signal may be bypassed without binarization. Here, each binary number 0 or 1 constituting a binary value may be referred to as an information element. For example, when the binary string after binarization is 110, each of 1, 1, and 0 is referred to as an information element. An information element for a syntax element may indicate the value of the syntax element.

[0096] The binarized cells of the syntax elements may be input to a conventional coding engine or a bypass coding engine. The conventional coding engine may assign a context model reflecting a probability value to the corresponding cell, and may encode the corresponding cell based on the assigned context model. The conventional coding engine may update the context model for the corresponding cell after encoding the corresponding cell. The cell encoded as described above may be referred to as a context-encoded cell.

[0097] In addition, when the binarized cell of the syntax element is input to the bypass coding engine, it can be encoded as follows. For example, the bypass coding engine of the encoding device omits the process of estimating the probability of the input cell and the process of updating the probability model applied to the cell after encoding. In the case of applying bypass coding, the encoding device can encode the input cell by applying a uniform probability distribution instead of assigning a context model, and by this, the encoding speed can be increased. These encoded cells can be referred to as bypass cells.

[0098] Entropy decoding performs the same processing as the entropy encoding described above in reverse order. For example, in the case of decoding a syntax element based on a context model, the decoding device may receive a cell corresponding to the syntax element through a bitstream. In addition, the decoding device may determine the context model using the syntax element, the decoding information of the decoding target block or the adjacent block, or the information of the symbol / cell decoded in the previous step, and may derive the value of the syntax element by performing arithmetic decoding of the cell by predicting the probability of occurrence of the received cell according to the determined context model. Thereafter, the context model of the next decoded cell may be updated using the determined context model.

[0099] In addition, for example, in the case where a syntax element is bypass-decoded, the decoding device may receive a cell corresponding to the syntax element through a bitstream, and may decode the input cell by applying a uniform probability distribution. In this case, the process of deriving a context model of the syntax element and the process of updating the context model applied to the cell after decoding may be omitted.

[0100] The residual samples can be derived as quantized transform coefficients through transformation and quantization processing. The quantized transform coefficients can be referred to as transform coefficients. In this case, the transform coefficients in the block can be signaled in the form of residual information. The residual information may include residual coding syntax. That is, the encoding device can configure and encode the residual coding syntax based on the residual information to output the residual coding syntax in the form of a bitstream, and the decoding device can derive the residual (quantized) transform coefficients by decoding the residual coding syntax obtained from the bitstream. As described below, the residual coding syntax may include syntax elements indicating whether the transform has been applied to the corresponding block, the position of the last valid transform coefficient in the block, whether the valid transform coefficient exists in the sub-block, and the size / sign of the valid transform coefficient.

[0101] For example, the (quantized) transform coefficients may be encoded and / or decoded based on syntax elements (e.g., 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_gtX_flag, abs_remainder, coeff_sign_flag, and dec_abs_level). This may be referred to as residual (data) encoding or (transform) coefficient encoding. The syntax elements associated with encoding / decoding of residual data may be as shown in Table 1 or Table 2 below.

[0102] [Table 1]

[0103]

[0104]

[0105]

[0106]

[0107] [Table 2]

[0108]

[0109]

[0110]

[0111]

[0112]

[0113] In Table 1 and Table 2, transform_skip_flag indicates whether the transform for the associated block is omitted. transform_skip_flag can be a syntax element of a transform skip flag. The associated block can be a coding block (CB) or a transform block (TB). With respect to the transform (and quantization) and residual coding process, CB and TB can be used interchangeably. For example, residual samples can be derived with respect to the CB, and (quantized) transform coefficients can be derived by transforming and quantizing the residual samples. Through the residual coding process, information (e.g., syntax elements) that effectively represent the position, size, sign, etc. of the (quantized) transform coefficient can be generated and signaled. The quantized transform coefficient can be referred to as the transform coefficient. Generally, if the CB is not larger than the maximum TB, the size of the CB can be equal to the size of the TB, and in this case, the transformed (and quantized) and re-encoded target block can be referred to as a CB or a TB. In addition, if the CB is larger than the maximum TB, the transformed (and quantized) and re-encoded target block can be referred to as a TB. Hereinafter, although it is explained that syntax elements related to residual coding are signaled in units of transform blocks (TBs), this is merely exemplary, and as described above, TBs may be used interchangeably with CBs.

[0114] The syntax for residual encoding according to the transform skip flag may be the same as that in Table 3 or Table 4.

[0115] [Table 3]

[0116]

[0117]

[0118] [Table 4]

[0119]

[0120]

[0121]

[0122] According to the present embodiment, residual coding may be branched according to the value of the transform skip flag transform_skip_flag. That is, different syntax elements may be used for residual coding based on the value of the transform skip flag (based on whether the transform is skipped). The residual coding used when the transform skip is not applied (i.e., when the transform is applied) may be referred to as conventional residual coding (RRC), and the residual coding used when the transform skip is applied (i.e., when the transform is not applied) may be referred to as transform skip residual coding (TSRC). In addition, conventional residual coding may also be referred to as general residual coding. In addition, conventional residual coding may be referred to as a conventional residual coding syntax structure, and transform skip residual coding may be referred to as a transform skip residual coding syntax structure. Tables 1 and 2 may represent residual coding syntax elements when the value of transform_skip_flag is 0 (i.e., when the transform is applied), and Tables 3 and 4 may represent residual coding syntax elements when the value of transform_skip_flag is 1 (i.e., when the transform is not applied).

[0123] Specifically, as an example, a transform skip flag indicating whether to skip the transform of the transform block may be parsed, and it may be determined whether the transform skip flag is 1. If the value of the transform skip flag is 0, the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gtx_flag, par_level_flag, abs_remainder, dec_abs_level, and / or coeff_sign_flag for the residual coefficient of the transform block as illustrated in Table 1 or Table 2 may be parsed, and the residual coefficient may be derived based on the syntax elements. In this case, the syntax elements may be parsed sequentially, and the parsing order may be changed. In addition, abs_level_gtx_flag may represent abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n][0] may be an example of the first transform coefficient level flag abs_level_gt1_flag, and abs_level_gtx_flag[n][1] may be an example of the second transform coefficient level flag abs_level_gt3_flag.

[0124] In an embodiment, the encoding device may encode the (x, y) position information of the last non-zero transform coefficient in the transform block based on the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. More specifically, last_sig_coeff_x_prefix represents the prefix of the column position of the last significant coefficient in the scanning order within the transform block, 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, 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 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 may represent a non-zero coefficient. In addition, the scanning order may be a right diagonal scanning order. Alternatively, the scanning order may be a horizontal scanning order or a vertical scanning order.The scanning order may be determined based on whether intra / inter prediction is applied to a target block (CB or CB including TB) and / or a specific intra / inter prediction mode.

[0125] Thereafter, the encoding apparatus may divide the transform block into 4×4 sub-blocks, and then use a 1-bit syntax element coded_sub_block_flag to indicate whether there is a non-zero coefficient in the current sub-block for each 4×4 sub-block.

[0126] If the value of coded_sub_block_flag is 0, no information is sent, and thus the encoding device may terminate the encoding process of the current subblock. Conversely, if the value of coded_sub_block_flag is 1, the encoding device may continue to perform the encoding process on sig_coeff_flag. Since the subblock including the last non-zero coefficient does not need to be encoded for coded_sub_block_flag and the subblock including the DC information of the transform block has a high probability of including a non-zero coefficient, coded_sub_block_flag may not be encoded and its value may be assumed to be 1.

[0127] If the value of coded_sub_block_flag is 1 and it is therefore determined that there is a non-zero coefficient in the current sub-block, the encoding device may encode a sig_coeff_flag having a binary value according to the reverse scanning order. The encoding device may encode a 1-bit syntax element sig_coeff_flag for each transform coefficient according to the scanning order. If the value of the transform coefficient at the current scanning position is not 0, the value of sig_coeff_flag may be 1. Here, in the case where the sub-block includes the last non-zero coefficient, it is not necessary to encode sig_coeff_flag for the last non-zero coefficient, so the encoding process for the sub-block may be omitted. Level information encoding may be performed only when sig_coeff_flag is 1, and four syntax elements may be used in the level information encoding process. More specifically, each sig_coeff_flag[xC][yC] may indicate whether the level (value) of the corresponding transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero. In an embodiment, sig_coeff_flag may correspond to an example of a syntax element of a significant coefficient flag indicating whether a quantized transform coefficient is a non-zero significant coefficient.

[0128] The remaining level value after encoding of sig_coeff_flag may be derived as in the following equation. That is, the syntax element remAbsLevel indicating the level value to be encoded may be derived as in the following equation.

[0129] [Formula 1]

[0130] remAbsLevel[n]=|coeff[n]|-1

[0131] Here, coeff[n] means the real transform coefficient value.

[0132] In addition, abs_level_gtx_flag[n][0] may indicate whether remAbsLevel[n] at the corresponding scanning position n is greater than 1. For example, if the value of abs_level_gtx_flag[n][0] is 0, the absolute value of the transform coefficient at the corresponding position may be 1. In addition, if the value of abs_level_gtx_flag[n][0] is 1, remAbsLevel[n] indicating the level value to be encoded thereafter may be updated as in the following formula.

[0133] [Formula 2]

[0134] remAbsLevel[n]=remAbsLevel[n]-1

[0135] In addition, the value of the least significant coefficient (LSB) of remAbsLevel[n] described in Equation 2 may be encoded by par_level_flag as in Equation 3 below.

[0136] [Formula 3]

[0137] par_level_flag[n]=remAbsLevel[n]&1

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

[0139] After par_level_flag[n] is encoded, the transform coefficient level value remAbsLevel[n] to be encoded can be updated as shown in the following formula.

[0140] [Formula 4]

[0141] remAbsLevel[n]=remAbsLevel[n]>>1

[0142] abs_level_gtx_flag[n][1] may indicate whether the remAbsLevel at the corresponding scan position n is greater than 3. Encoding of abs_remainder[n] may be performed only when abs_level_gtx_flag[n][1] is 1. The relationship between the real transform coefficient value coeff and each syntax element may be as in the following formula.

[0143] [Formula 5]

[0144]

[0145] In addition, the following Table 5 shows examples related to the above-mentioned Formula 5.

[0146] [Table 5]

[0147] |coeff[n]| sig_coeff_flag[n] abs_level_gtX_flag[n][0] par_level_flag[n] abs_level_gtX_flag[n][1] abs_remainder[n] 0 0 1 1 0 2 1 1 0 0 3 1 1 1 0 4 1 1 0 1 0 5 1 1 1 1 0 6 1 1 0 1 1 7 1 1 1 1 1 8 1 1 0 1 2 9 1 1 1 1 2 10 1 1 0 1 3 11 1 1 1 1 3 ... ... ... ...

[0148] Here, |coeff[n]| represents a transform coefficient level (value), and may be indicated as AbsLevel for the transform coefficient. In addition, the sign of each coefficient may be encoded using coeff_sign_flag which is a one-bit symbol.

[0149] In addition, as another example, if the value of the transform skip flag is 1, the syntax elements sb_coded_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag, par_level_flag, and / or abs_remainder of the residual coefficient of the transform block as shown in Table 3 or Table 4 may be parsed, and the residual coefficient may be derived based on the syntax elements. In this case, the syntax elements may be parsed sequentially, or the parsing order may be changed. In addition, abs_level_gtx_flag may represent abs_level_gt1_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and / or abs_level_gt9_flag. For example, abs_level_gtx_flag[n][j] may be a flag indicating whether the absolute value or level (value) of the transform coefficient at the scan position n is greater than (j<<1)+1. In some cases, (j<<1)+1 may be replaced by a predetermined threshold (eg, a first threshold or a second threshold).

[0150] In addition, CABAC provides high performance, but has the disadvantage of poor throughput performance. This is caused by the conventional coding engine of CABAC, and since conventional coding (encoded by the conventional coding engine of CABAC) uses the probability state and range updated by the encoding of the previous symbol, it may show high data dependency and may take a lot of time to read the probability interval and determine the current state. The throughput problem of CABAC can be solved by limiting the number of context-coded symbols. For example, as in Table 5 above, the sum of symbols used to represent sig_coeff_flag[n], abs_level_gtx_flag[n][0], par_level_flag[n] and abs_level_gtx_flag[n][1] can be limited to 1.75 per pixel in the transform block according to the size of the transform block. In this case, if all the limited number of context-coded symbols are used to encode the context element, the encoding device can perform bypass coding by binarizing the remaining coefficients through the binarization method described later without using context coding. In other words, if the number of encoded context-coded symbols becomes TU width * TU height * 1.75 in a TU, sig_coeff_flag[n], abs_level_gtx_flag[n][0], par_level_flag[n] and abs_level_gtx_flag[n][1] encoded as context-coded symbols may no longer be encoded, and the value of |coeff[n]| may be directly encoded as dec_abs_level[n] as shown in Table 6 below.

[0151] [Table 6]

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

[0153] In this case, the sign of each coefficient may be encoded using coeff_sign_flag[n] which is a one-bit symbol.

[0154] Figure 5 Transform coefficients in a 4×4 block are exemplarily illustrated.

[0155] Figure 5 The 4×4 block represents an example of quantized coefficients. Figure 5 The block illustrated in may be a 4×4 transform block, or may be a 4×4 sub-block of an 8×8, 16×16, 32×32, or 64%4 transform block. Figure 5A 4×4 block may represent a luma block or a chroma block. However, this is merely exemplary, and in the present embodiment, transforms of larger block sizes (up to 64%4 size) are possible, and this may be useful for high-resolution video (e.g., 1080p and 4K sequences). High-frequency transform coefficients may be zeroed relative to a transform block whose size (width or height or both width and height) is 64, and only low-frequency coefficients may be retained. For example, in the case of an M×N transform block with a block width of M and a block height of N, when M is 64, only the 32 left columns of transform coefficients may be retained. In addition, when N is 64, only the 32 top rows of transform coefficients may be retained.

[0156] In the case where the transform skip mode is used for a block with a larger size, the entire block can be used without zeroing any values. Since the configurable maximum transform size in the SPS is supported, the encoding device can adaptively select a transform size with a length of up to 16, 32, or 64 as necessary for a specific implementation. Specifically, the binarization of the coefficient position encoding that is not the last 0 can be encoded based on the reduced TU size, and the selection of the context model for the coefficient position encoding that is not the last 0 can be determined by the original TU size.

[0157] exist Figure 5 In , as an example, the encoding result of the coefficients of diagonal reverse scanning is illustrated. Figure 5 In , n (0 to 15) specifies the scanning position of the coefficient according to the reverse diagonal scanning. If n is 15, it means that the coefficient in the lower right corner is scanned first in the 4×4 block, and if n is 0, it means that the coefficient in the upper left corner is scanned last.

[0158] In addition, as described above, if the input signal is not a binary value but a syntax element, the encoding device can transform the input signal into a binary value by binarizing the value of the input signal. In addition, the decoding device can derive the binarized value of the syntax element (i.e., the binarized cell) by decoding the syntax element, and can derive the value of the syntax element by inverse binarizing the binarized value. The binarization process can be performed as a truncated Rice (TR) binarization process, a k-order exponential Columbus (EGk) binarization process, a limited k-order exponential Columbus (limited EGk), or a fixed length (FL) binarization process. In addition, the inverse binarization process can be performed based on the TR binarization process, the EGk binarization process, the limited EGk binarization process, or the FL binarization process, and can represent the process of deriving the value of the syntax element.

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

[0160] The input of the TR binarization process may be a request for TR binarization for a syntax element and cMax and cRiceParam. Furthermore, the output of the TR binarization process may be a TR binarization for a value symbolVal corresponding to a string of cells.

[0161] As an example, if the suffix cell string for the syntax element exists, the TR cell string for the syntax element may be a concatenation of the prefix cell string and the suffix cell string, and if the suffix cell string does not exist, the TR cell string for the syntax element may be the prefix cell string. For example, the prefix cell string may be derived as follows.

[0162] The prefix value of symbolVal can be derived as follows.

[0163] [Formula 6]

[0164] prefixVal=symbolVal>>cRiceParam

[0165] Here, prefixVal may represent the prefix value of symbolVal. The prefix of a TR cell string (ie, a prefix cell string) may be derived as follows.

[0166] For example, if prefixVal is less than cMax>>cRiceParam, the prefix cell string may be a bit string of length prefixVal+1 indexed by cell Idx. That is, if prefixVal is less than cMax>>cRiceParam, the prefix cell string may be a bit string of prefixVal+1 having the number of bits indicated by cell Idx. The cell for cell Idx less than prefixVal may be 1. In addition, the cell for cell Idx equal to prefixVal may be 0.

[0167] For example, the symbol string derived as a result of the unary binarization of prefixVal may be as shown in Table 7 below.

[0168] [Table 7]

[0169]

[0170] In addition, if prefixVal is not less than cMax>>cRiceParam, the prefix octet string can be a bit string with a length of cMax>>cRiceParam and all octets are 1.

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

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

[0173] [Equation 7]

[0174] suffixVal = symbolVal - ((prefixVal) << cRiceParam) Here, suffixVal can represent the suffix value of symbolVal.

[0175] The suffix of the TR cell string (i.e., the suffix cell string) can be derived based on the FL binarization of suffixVal whose cMax value is 1 << cRiceParam) - 1.

[0176] For the input parameter cRiceParam = 0, the TR binarization is exactly the truncated unary binarization, and it is always called with a cMax value equal to the maximum possible value of the syntax element to be decoded.

[0177] In addition, the EGk binarization process can be performed as follows.

[0178] The input to the EGk binarization process can be a request for EGk binarization. In addition, the output of the EGk binarization process can be the EGk binarization for the value symbolVal corresponding to the cell string.

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

[0180] [Table 8]

[0181]

[0182] Referring to Table 8, the binary value X can be added to the end of the binary string by each call to put(X). Here, X can be 0 or 1.

[0183] In addition, the finite EGk binarization process can be performed as follows.

[0184] The input to the finite EGk binarization process can be a request for finite EGk binarization and the Rice parameter riceParam. In addition, the output of the finite EGk binarization process can be the finite EGk binarization for the value symbolVal corresponding to the corresponding cell string.

[0185] The cell string for the finite EGk binarization process for symbolVal can be derived as follows.

[0186] [Table 9]

[0187]

[0188] Referring to Table 9, a binary value X can be added at the end of the binary string by calling put(X) each time. Here, X can be 0 or 1.

[0189] The variables log2TransformRange and maxPrefixExtensionLength can be derived as follows.

[0190] [Formula 8]

[0191] log2TransformRange=15

[0192] maxPrefixExtensionLength=26-log2TransformRange

[0193] Furthermore, the FL binarization process can be performed as follows.

[0194] The input of the FL binarization process may be a request for FL binarization and cMax for a syntax element. Furthermore, the output of the FL binarization process may be a FL binarization for a value symbolVal corresponding to a string of cells.

[0195] FL binarization can be configured using a fixed-length bit number symbol string having a symbol value symbolVal. Here, the fixed length can be derived as follows.

[0196] [Formula 9]

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

[0198] That is, the symbol string for the symbol value symbolVal can be derived by FL binarization, and the symbol length (ie, the number of bits) of the symbol string can be a fixed length.

[0199] The index of the cell used for FL binarization may be a method for using values ​​increasing in order from the most significant bit to the least significant bit. For example, the cell index associated with the most significant bit may be cell Idx=0.

[0200] Furthermore, binarization processing on the syntax element abs_remainder[n] among the residual information may be performed as follows.

[0201] The input of the binarization process for abs_remainder[n] may be a request for binarization of the syntax element abs_remainder[n], the color component cIdx, and the luma position (x0, y0) representing the upper left sample of the current luma transform block based on the upper left luma sample of the picture, the current coefficient scan position (xC, yC), the binary logarithm of the transform block width longTbWidth, and the binary logarithm of the transform block height log2TbHeight. The output of the binarization process for abs_remainder may be the binarization of abs_remainder (i.e., the binarized cell string of abs_remainder). Through the binarization process, an available cell string for abs_remainder may be derived.

[0202] The Rice parameter cRiceParam for abs_remainder[n] can be derived by a Rice parameter derivation process, which is performed by the input of the color component cIdx and the brightness position (x0, y0), the current coefficient scanning position (xC, yC), log2TbWidth as the binary logarithm of the width of the transform block, and log2TbHeight as the binary logarithm of the height of the transform block. The Rice parameter derivation process will be described in detail later.

[0203] The cMax for abs_remainder[n] currently being encoded can be derived based on the Rice parameter cRiceParam. For example, cMax can be derived as follows.

[0204] [Formula 10]

[0205] cMax=6<<cRiceParam

[0206] In addition, when there is a suffix cell string, the binarization for the syntax element abs_remainder[n] (that is, the cell string for abs_remainder[n]) can be a concatenation of the prefix cell string and the suffix cell string. When there is no suffix cell string, the cell string for abs_remainder[n] can be the prefix cell string.

[0207] For example, the prefix octet string for abs_remainder[n] may be derived as follows.

[0208] The prefix value prefixVal of abs_remainder[n] can be derived as follows.

[0209] [Formula 11]

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

[0211] The prefix symbol string of abs_remainder[n] can be derived by TR binarization processing on prefixVal using cMax and cRiceParam as input.

[0212] If the prefix octet string is equal to a bit string whose all bits are 1 and whose bit length is 6, then the suffix octet string of abs_remainder[n] may exist and may be derived as follows.

[0213] The suffix value suffixVal of abs_remainder[n] can be derived as follows.

[0214] [Formula 12]

[0215] suffixVal=abs_remainder[n]-cMax

[0216] The suffix symbol string of abs_remainder[n] can be derived through a finite EGk binarization process for binarization of suffixVal using cRiceParam+1 and cRiceParam as input.

[0217] The Rice parameters for abs_remainder[n] can be derived by the following process.

[0218] The input of the Rice parameter derivation process can be the base level baseLevel, the color component 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 luma position (x0, y0) can represent the upper left sample of the current luma transform block based on the upper left luma sample of the picture. The output of the Rice parameter derivation process can be the Rice parameter cRiceParam.

[0219] For example, the variable locSumAbs may be derived based on the arrangement AbsLevel[x][y] for a given color component cIdx and a transform block with an upper left luma position (x0, y0) by the pseudo code disclosed in the following table.

[0220] [Table 10]

[0221]

[0222] In the case where baseLevel is 0 in Table 10, the variable s can be configured as Max(0, QState-1), and the Rice parameter cRiceParam and the variable ZeroPos[n] can be derived based on the variables locSumAbs, trafoSkip and s as shown in Table 11. If baseLevel is greater than 0, the Rice parameter cRiceParam can be derived based on the variables locSumAbs and trafoSkip as shown in Table 11.

[0223] [Table 11]

[0224] trafoSkip s locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 1 cRiceParam 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 ZeroPos[n] 0 0 0 0 0 1 2 2 2 2 2 2 4 4 4 4 1 ZeroPos[n] 1 1 1 1 2 3 4 4 4 6 6 6 8 8 8 8 2 ZeroPos[n] 1 1 2 2 2 3 4 4 4 6 6 6 8 8 8 8 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 1 cRiceParam 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 0 ZeroPos[n] 4 4 4 4 4 4 4 8 8 8 8 8 16 16 16 16 1 ZeroPos[n] 4 4 12 12 12 12 12 12 12 12 16 16 16 16 16 16 2 ZeroPos[n] 8 8 12 12 12 12 12 12 12 16 16 16 16 16 16 16

[0225] Furthermore, the binarization process for the syntax element dec_abs_level among the residual information may be performed as follows.

[0226] The input for the binarization process of dec_abs_level may be a request for binarization of the syntax element dec_abs_level[n], the color component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the width of the transform block log2TbWidth, and the binary logarithm of the height of the transform block log2TbHeight. The luma position (x0, y0) may represent the upper left sample of the current luma transform block based on the upper left luma sample of the picture.

[0227] The output of the binarization process for dec_abs_level may be the binarization of dec_abs_level (ie, the binarized cell string of dec_abs_level). Through the binarization process, an available cell string for dec_abs_level may be derived.

[0228] The Rice parameter cRiceParam for dec_abs_level[n] can be derived by a Rice parameter derivation process, which is performed by input of the color component cIdx and the brightness position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth as the binary logarithm of the width of the transform block, and log2TbHeight as the binary logarithm of the height of the transform block. The Rice parameter derivation process will be described in detail later.

[0229] In addition, for example, cMax for dec_abs_level[n] can be derived based on the Rice parameter cRiceParam. cMax can be derived as in Equation 10.

[0230] In addition, when there is a suffix cell string, the binarization for dec_abs_level[n] (ie, the cell string for dec_abs_level[n]) can be a concatenation of the prefix cell string and the suffix cell string. In addition, when there is no suffix cell string, the cell string for dec_abs_level[n] can be the prefix cell string.

[0231] For example, the prefix cell string can be derived as follows.

[0232] The prefix value prefixVal of dec_abs_level[n] can be derived as follows.

[0233] [Formula 13]

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

[0235] The prefix symbol string of dec_abs_level[n] can be derived by TR binarization processing on prefixVal using cMax and cRiceParam as input.

[0236] If the prefix symbol string is equal to a bit string whose all bits are 1 and the bit length is 6, then the suffix symbol string of dec_abs_level[n] can exist, and this can be derived as follows.

[0237] The suffix value suffixVal of dec_abs_level[n] can be derived as in the following equation.

[0238] [Formula 14]

[0239] suffixVal=dec_abs_level[n]-cMax

[0240] The suffix symbol string of dec_abs_level[n] can be derived through a finite EGk binarization process used for binarization of suffixVal, and the Exp-Golomb degree k of suffixVal is configured as cRiceParam+1.

[0241] The Rice parameters for dec_abs_level[n] can be derived using the pseudocode in Table 10.

[0242] Furthermore, the normal residual coding (RRC) and the transform skip residual coding (TSRC) as described above may have the following differences.

[0243] For example, the Rice parameter cRiceParam of the syntax element abs_remainder[] in the conventional residual coding may be derived as described above, but the Rice parameter cRiceParam of the syntax element abs_remainder[] in the transform skip residual coding may be derived as 1. That is, for example, in the case where transform skip is applied to the current block (e.g., the current TB), the Rice parameter cRiceParam for abs_remainder[] for the transform skip residual coding of the current block may be derived as 1.

[0244] In addition, referring to Tables 1 to 4, although abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1] can be signaled in normal residual coding, 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 in transform skip residual coding. Here, abs_level_gtx_flag[n][0] may be represented as abs_level_gtl_flag or a first coefficient level flag, abs_level_gtx_flag[n][1] may be represented as abs_level_gt3_flag or a second coefficient level flag, abs_level_gtx_flag[n][2] may be represented as abs_level_gt5_flag or a third coefficient level flag, abs_level_gtx_flag[n][3] may be represented as abs_level_gt7_flag or a fourth coefficient level flag, and abs_level_gtx_flag[n][4] may be represented as abs_level_gt9_flag or a fifth coefficient level flag. Specifically, the first coefficient level flag may be a flag indicating whether the coefficient level is greater than a first threshold value (for example, 1), the second coefficient level flag may be a flag indicating whether the coefficient level is greater than a second threshold value (for example, 3), the third coefficient level flag may be a flag indicating whether the coefficient level is greater than a third threshold value (for example, 5), the fourth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fourth threshold value (for example, 7), and the fifth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fifth threshold value (for example, 9).

[0245] As described above, compared with conventional residual coding, transform skip residual coding may further include abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and abs_level_gtx_flag[n][4] in addition to abs_level_gtx_flag[n][0] and abs_level_gtx_flag[n][1].

[0246] Furthermore, for example, in normal residual coding, the syntax element coeff_sign_flag may be bypass coded, whereas in transform skip residual coding, the syntax element coeff_sign_flag may be bypass coded or context coded.

[0247] The following description has been prepared to explain specific examples of this document. In the following, the names of specific devices or the names of specific signals / information are exemplarily presented, but the technical features of this specification are not limited to the specific names used in the following explanation.

[0248] Hereinafter, a method is disclosed for efficiently deriving binarized Rice parameters of information used to represent level values ​​(or absolute values) of transform coefficients in level coding (e.g., the syntax element dec_abs_level representing the level value of the transform coefficient and the syntax element abs_remainder representing the residual level value of the transform coefficient).

[0249] The Rice parameter is a variable for binarizing the level value of the transform coefficient, and if the residual data encoding for the transform block (conventional residual encoding) is applied to the current block, the Rice parameter lookup table in Table 12 below is used, and if the residual data encoding for the transform skip block (transform skip residual encoding) is applied to the current block, the Rice parameter lookup table in Table 13 below is used. Here, the Rice parameter lookup table may be referred to as a table about Rice parameters or a table for determining Rice parameters. Alternatively, the Rice parameter lookup table may be referred to as a table about Rice parameter candidates.

[0250] [Table 12]

[0251] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3

[0252] [Table 13]

[0253] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2

[0254] In Table 12 and Table 13, locSumAbs is a value derived based on the sum of level values ​​of neighboring transform coefficients of the current transform coefficient, and for example, it can be derived by the pseudo code of Table 10.

[0255] When binarizing the level value, the encoding device and the decoding device generate codewords that are beneficial to the binarization of smaller level values ​​by assigning short codewords to smaller level values ​​as the value of the Rice parameter cRiceParam becomes smaller, and generate codewords that are beneficial to the binarization of larger level values ​​by assigning short codewords to larger level values ​​as the value of the Rice parameter becomes larger.

[0256] However, depending on the characteristics of the image and / or the presence / absence or type of syntax encoded before the level value of the transform coefficient, the level values ​​generated on average or the level values ​​frequently generated by level encoding are different from each other. In addition, in the case of lossless (or near-lossless) encoding or in a high bit rate environment encoded with a low quantization parameter, level values ​​with different characteristics can be mixed. In this case, in order to derive Rice parameters, it may be more efficient to use multiple Rice parameter lookup tables rather than one Rice parameter lookup table.

[0257] Therefore, according to an embodiment, two or more Rice parameter lookup tables can be used for the case where residual data encoding for a transform block (conventional residual encoding) is applied to the current block and the case where residual data encoding for a transform skip block (transform skip residual encoding) is applied to the current block, respectively. In addition, two or more Rice parameter lookup tables can be used regardless of whether conventional residual encoding or transform skip residual encoding is applied to the current block.

[0258] In this case, as an example, the encoding device may derive the Rice parameter by selecting at least one of a plurality of Rice parameter lookup tables based on the configuration (presence / absence or type of the syntax element) of the syntax element encoded before the level value of the transform coefficient (e.g., dec_abs_level or abs_remainder). Alternatively, the encoding device may derive the Rice parameter by selecting at least one of a plurality of Rice parameter lookup tables based on whether the number of context-coded octets encoded / decoded in the residual data encoding exceeds the maximum number of available context-coded octets configured by the context-coded octet constraint algorithm.

[0259] Here, multiple Rice parameter lookup tables may have different Rice parameter minimum values ​​or different Rice parameter maximum values, and may have different update positions of Rice parameter values. In addition, the syntax element encoded before the syntax element representing the level value of the transform coefficient may include at least one of sig_coeff_flag, abs_level_gtx_flag, par_level_flag, or coeff_sign_flag. In addition, the maximum number of available context-coded cells configured by the context-coded cell constraint algorithm may correspond to the rem cell sPass1 of Table 1 or Table 2 in the case of residual coding for the transform block, and may correspond to MaxCcbs of Table 3 in the case of residual coding for the transform skip block.

[0260] As an example, in the presence of two Rice parameter lookup tables, the first Rice parameter lookup table "A" may have mA as the minimum value of the Rice parameter, and may have nA as the maximum value of the Rice parameter. The second Rice parameter lookup table "B" may have mB as the minimum value of the Rice parameter, and may have nB as the maximum value of the Rice parameter. In order to improve the performance of level coding, mB may be configured to a value greater than mA, and nB may be configured to a value greater than nA. For example, the first Rice parameter lookup table may be configured as shown in Table 14 below, and the second Rice parameter lookup table may be configured as shown in Table 15 below.

[0261] [Table 14]

[0262] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2

[0263] [Table 15]

[0264] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3

[0265] In Table 14, the minimum and maximum values ​​of the Rice parameter are 0 and 2, respectively, and in Table 15, the minimum and maximum values ​​of the Rice parameter are 1 and 3, respectively. That is, the Rice parameter lookup table of Table 15 has a minimum value and a maximum value that are greater than the minimum value and the maximum value of the Rice parameter lookup table of Table 14. In addition, when the locSumAbs value is 12 and 24, the Rice parameter value in Table 14 is updated, and when the locSumAbs value is 7 and 18, the Rice parameter value in Table 15 is updated. That is, the Rice parameter lookup table of Table 14 and the Rice parameter lookup table of Table 15 have different update positions of the Rice parameter values.

[0266] Therefore, compared with the Rice parameter lookup table of Table 14, the Rice parameter lookup table of Table 15 can be used when relatively large level values ​​appear frequently or when the average value of the coefficients or level values ​​of the lower block being encoded is large.

[0267] The Rice parameter lookup tables of Tables 14 and 15 are merely examples of various Rice parameter lookup tables that can be used according to the present embodiment, and when the present embodiment is applied, the Rice parameter lookup tables are not limited thereto, and tables with different Rice parameter minimum values, maximum values, and update positions can be used.

[0268] In addition, the encoding device may signal a syntax element (or flag) for sending information about a Rice parameter lookup table for a current transform coefficient among multiple Rice parameter lookup tables. The syntax element may be signaled in units of coefficient groups (CGs), or may be signaled in units of transform blocks or transform skip (coding) blocks. As an example, in the case of using two Rice parameter lookup tables, if the syntax element value is 0, the first Rice parameter lookup table may be represented, and if the syntax element value is 1, the second Rice parameter lookup table may be represented. The syntax element may be binarized by one of various methods such as fixed-length binarization and truncated unary binarization.

[0269] If a syntax element (or flag) representing information about a Rice parameter lookup table is obtained from the bitstream, the decoding device can select a Rice parameter lookup table represented by the syntax element from among multiple Rice parameter lookup tables, and can derive the Rice parameter for the current transform coefficient based on this.

[0270] In addition, the decoding device can infer or derive a Rice parameter lookup table for level encoding of the current transform coefficient (or coefficient group, transform block or coding block) from among multiple Rice parameter lookup tables by using already given information (for example, the configuration of the syntax element encoded before the syntax element representing the level value of the current transform coefficient (for example, dec_abs_level or abs_remainder) (the presence / absence or type of the syntax element), whether the number of encoded / decoded context-coded elements in the residual data encoding exceeds the maximum number of available context-coded elements configured in the context-coded element constraint algorithm, whether lossless or near-lossless encoding is performed, or quantization of coefficient information). In this case, the syntax element or flag representing information about the Rice parameter lookup table for the current transform coefficient may not be signaled.

[0271] As an example, whether the number of coded / decoded context-coded octets in the residual data encoding exceeds the maximum number of available context-coded octets configured in the context-coded octet constraint algorithm (rem octets sPass1 or MaxCcbs) can be used to select the Rice parameter lookup table. In this case, if the number of coded / decoded context-coded octets in the residual data encoding exceeds the maximum number of available context-coded octets, a simplified grammar configuration different from the existing grammar configuration being used in the residual encoding can be used.

[0272] For example, in the residual data encoding for the transform block, (i) if the number of coded / decoded context coded elements does not exceed the rem element sPass1, sig_coeff_flag, abs_level_gtx_flag[0], par_level_flag, and abs_level_gtx_flag[1] are encoded before abs_remainder representing the residual level value of the transform coefficient. However, (ii) if the number of coded / decoded context coded elements exceeds the rem element sPass1, there is no coded / decoded syntax element before the encoding of the syntax element dec_abs_level of the level value of the transform coefficient. Therefore, in the case of (ii), since there is no coded / decoded syntax element before the encoding of the level value, the average level value is larger than in the case of (i). Therefore, in case (i), a Rice parameter lookup table that generates codewords that are favorable to smaller level values ​​as in Table 14 can be allocated, while in case (ii), a Rice parameter lookup table that generates codewords that are favorable to larger level values ​​as in Table 15 can be allocated. As described above, in the case of determining the Rice parameter lookup table using the rem symbol sPass1 value of given information, there is no need to encode / decode additional flags or syntax elements for knowing the table information.

[0273] As another example, if the number of coded / decoded context-coded octets in the residual data encoding for the transform skip mode exceeds MaxCcbs, the existing syntax configuration can be simplified. Some of the syntax elements sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[0], par_level_flag, abs_level_gtx_flag[1], abs_level_gtx_flag[2], abs_level_gtx_flag[3], and abs_level_gtx_flag[4] that are encoded / decoded in the existing transform skip residual data encoding may be omitted or may not be encoded / decoded for encoding performance or complexity reduction effects. Even in this case, since the average level value varies in the same manner according to the existing syntax configuration and the simplified syntax configuration, it can provide better encoding performance to determine the Rice parameter lookup table using MaxCcbs information and / or coefficient position information. As described above, by using MaxCcbs and coefficient position information as known information, no additional flags or syntax for obtaining the table information need to be encoded / decoded when determining the Rice parameter lookup table.

[0274] As another example, lossless or near lossless coding can be used to determine the Rice parameter lookup table without encoding / decoding additional flags or syntax. Lossless or near lossless coding can be performed in units of pictures, slices, CU blocks, or TU blocks, and the level value of the residual data is generally larger than that of lossy coding. Therefore, the decoding device can use whether the current picture, slice, CU block, or TU block has been losslessly or nearly losslessly encoded when determining the Rice parameter lookup table, and in this case, encoding / decoding of additional flags or syntax is also unnecessary. For example, in the case where lossless or near lossless coding is not performed, the decoding device can use a Rice parameter lookup table with a relatively small minimum / maximum value of the Rice parameter as in Table 14 to derive the Rice parameter, and in the case where lossless or near lossless coding is performed, the decoding device can use a Rice parameter lookup table with a relatively large minimum / maximum value of the Rice parameter as in Table 15 to derive the Rice parameter.

[0275] As another embodiment, in the case of using block unit variable quantization, the quantization coefficient information can be used to select the Rice parameter lookup table. Generally, larger level values ​​frequently occur in the case of low quantization coefficients, while smaller level values ​​frequently occur in the case of high quantization coefficients. In addition, the average level value is the same as those. Therefore, as an example, if the value of the quantization coefficient is equal to or greater than the threshold value, the decoding device can use a Rice parameter lookup table with a relatively small minimum / maximum value of the Rice parameter as in Table 14 to derive the Rice parameter, and if the value of the quantization coefficient is less than the threshold value, the decoding device can use a Rice parameter lookup table with a relatively large minimum / maximum value of the Rice parameter as in Table 15 to derive the Rice parameter.

[0276] In addition, as another embodiment, a method in which one of the Rice parameter lookup tables is used for level coding, but the same effect as using multiple Rice parameter lookup tables can be obtained. As an example, the encoding device and the decoding device can determine the index of the Rice parameter lookup table based on whether a specific condition is met. Here, it can be based on the configuration of the syntax element encoded before the syntax element representing the level value of the transform coefficient (the presence / absence or type of the syntax element), whether the number of the coded / decoded context-coded octets in the residual data coding exceeds the maximum number of octets of the available context coding configured in the octet constraint algorithm of the context coding, whether lossless or near-lossless coding is applied, or whether the sum locSumAbs of the level values ​​of the neighboring coefficients of the current transform coefficient is greater than a threshold or table size (the maximum value of locSumAbs of the Rice parameter lookup table) to determine whether a specific condition is met. The above-mentioned specific conditions can even be applied to the implementation of using multiple Rice parameter lookup tables. That is, whether the above-mentioned specific conditions are met can be used to select any one of the multiple Rice parameter lookup tables to facilitate the derivation of the Rice parameters of the transform coefficients.

[0277] In an implementation method of using a Rice parameter lookup table to derive the Rice parameter of the transformation coefficient, as an example, when certain conditions are met, the value of the Rice parameter can be determined as follows.

[0278] [Formula 15]

[0279] Rice parameter=RiceParamTable[index]

[0280] [Formula 16]

[0281] Rice parameter=RiceParamTable[index+shift]+offset

[0282] Here, RiceParamTable means Rice parameter lookup table. In addition, index represents the index value of the Rice parameter lookup table. As an example, the index value can be determined based on locSumAbs derived from the pseudo code of Table 10. Alternatively, the index value can be determined based on the index selection method configured in the standard.

[0283] Referring to Formula 15 and Formula 16, if a specific condition is not met, the encoding device and the decoding device can read the Rice parameter corresponding to the index value from the Rice parameter lookup table of the default configuration, and its value can be derived. If the specific condition is met, the shift and / or offset can be used. Here, the shift and / or offset can be 0, a positive number, or a negative number. If the shift is a positive number, a Rice parameter value larger than the Rice parameter selected by the index can be derived from the Rice parameter lookup table. If the shift is a negative number, a Rice parameter value smaller than the Rice parameter selected by the index can be derived from the Rice parameter lookup table.

[0284] For example, in this embodiment, the Rice parameter lookup table in Table 16 below can be used.

[0285] [Table 16]

[0286] index 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 index 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3

[0287] Referring to Table 16, if a specific condition is not met and the index is 3, 0 is derived as the Rice parameter value. If a specific condition is met, the index is 3 and the shift is 1 (offset is 0), although the index is 3, 1 is derived as the Rice parameter value.

[0288] Furthermore, if the offset is a positive number, a Ricean parameter value larger than the maximum Ricean parameter value of the Ricean parameter lookup table can be derived.

[0289] For example, if the index is 31 and certain conditions are met when using the Rice parameter lookup table of Table 16, 3 is derived as the Rice parameter value. If certain conditions are met and the offset is 2 (shift is 0), although the index is 31, 5 is derived as the Rice parameter value. That is, when using an offset, a Rice parameter value greater than the maximum Rice parameter value defined in the Rice parameter lookup table can be derived. Therefore, through the Rice parameter lookup table of Table 16, only the zeroth Rice parameter to the third Rice parameter can be derived, but when using an offset, the available range of the Rice parameter can be increased to the zeroth Rice parameter to the fifth Rice parameter.

[0290] By the above-mentioned maximum Rice parameter extension, binarization to high level values ​​can be effectively performed. Therefore, in this embodiment, the advantages of encoding can be adopted not only in general coding environments but also in high bit rate environments (where low quantization parameters are used), and in near lossless or lossless environments. In addition, according to this embodiment, there is no need for the transmission of additional Rice parameter lookup tables and / or additional syntax.

[0291] Figure 6 and Figure 7 An example of an entropy encoding method and related components according to an embodiment of this document is schematically illustrated.

[0292] Figure 6 The Rice parameter derivation method disclosed in can be obtained by Figure 2 and Figure 7 The encoding device 200 disclosed in is executed. Specifically, for example, Figure 6 S600 to S620 may be performed by the Rice parameter deriver 241 of the entropy encoder 240 . Figure 6 S630 may be performed by the binarizer 242 of the entropy encoder 240, and Figure 6 S640 may be performed by the entropy encoding processor 243 of the entropy encoder 240 .

[0293] Figure 6 The entropy encoding method disclosed in may include the above-mentioned implementations in this document.

[0294] Reference Figure 6 and Figure 7, the entropy encoder 240 performs a residual encoding process on the (quantized) transform coefficients. Here, the transform coefficients may be used interchangeably with the residual coefficients. The entropy encoder 240 may perform residual encoding of the (quantized) transform coefficients in the current block (current CB or current TB) according to the scanning order. For example, as indicated in Tables 1 to 4, the entropy encoder 240 may generate and encode various syntax elements for residual information. As an example, the Rice parameter deriver 241 of the entropy encoder 240 may generate (or derive) information representing the level value of the current transform coefficient (quantized transform coefficient or current (quantized) residual coefficient) in the current block (S600). Here, the information representing the level value of the current transform coefficient may include at least one of abs_remainder[n] or dec_abs_level[n]. The value of abs_remainder[n] may be derived based on the values ​​of sig_coeff_flag[xC][yC], abs_level_gtx_flag[n][0], par_level_flag[n], and abs_level_gtx_flag[n][1]. The value of dec_abs_level[n] may be derived as the level value of the transform coefficient. When the number of predetermined context-coded elements in the corresponding block (CU or TU) reaches a predetermined threshold according to the scanning order, the encoding device may encode the level value of the subsequent transform coefficient based on dec_abs_level[n].

[0295] The Rice parameter deriver 241 of the entropy encoder 240 can configure multiple Rice parameter lookup tables, and can select one of the tables for information representing the level value of the transform coefficient (S610). For example, the Rice parameter deriver 241 of the entropy encoder 240 can select a Rice parameter lookup table for level encoding of the current transform coefficient (or coefficient group, transform block or coding block) from multiple Rice parameter lookup tables by using given information (e.g., the configuration of the syntax element encoded before the syntax element representing the level value of the current transform coefficient (the presence / absence or type of the syntax element), whether the number of encoded / decoded context-coded octets in the residual data encoding exceeds the maximum number of available context-coded octets configured in the octet constraint algorithm of the context coding, whether lossless or near-lossless encoding is performed, or quantized coefficient information). The selection information about the corresponding Rice parameter lookup table can be implicitly or explicitly signaled. For example, the selection information can correspond to a syntax element for sending information representing the Rice parameter lookup table selected by the encoding device.

[0296] The Rice parameter deriver 241 of the entropy encoder 240 can derive the Rice parameter (S620) for the information (abs_remainder[n] or dec_abs_level[n]) representing the level value of the current transform coefficient based on the selected Rice parameter lookup table and the neighboring (or reference) transform coefficient of the current transform coefficient. Specifically, the Rice parameter deriver 241 of the entropy encoder 240 can derive the Rice parameter for the current scanning position (coefficient) by using the Rice parameter lookup table selected based on the above locSumAbs. locSumAbs can be derived based on AbsLevel and / or sig_coeff_flag of the neighboring transform coefficient. It is obvious to those skilled in the art that with respect to sig_coeff_flag, par_level_flag and abs_level_gtx_flag that are binarized at a fixed length without using Rice parameters, the process of deriving Rice parameters can be omitted. Regarding sig_coeff_flag, par_level_flag, and abs_level_gtx_flag, another type of binarization other than the binarization based on Rice parameters may be performed.

[0297] The binarizer 242 of the entropy encoder 240 may derive a cell string for information (abs_remainder[n] or dec_abs_level[n]) representing a level value of a transform coefficient by performing binarization based on the derived Rice parameter (S630). The length of the cell string may be adaptively determined by the derived Rice parameter.

[0298] The entropy coding processor 243 of the entropy encoder 240 can perform entropy coding (S640) based on a cell string for information (abs_remainder[n] or dec_abs_level[n]) representing the level value of the transform coefficient. The entropy coding processor 243 of the entropy encoder 240 can perform context-based entropy coding of the cell string based on context adaptive arithmetic coding (CABAC) entropy coding technology, and its output can be included in the bitstream. In this case, the encoding device can perform entropy coding by deriving context information via the cell of the cell string, and the context information can be updated by the cell. As described above, in addition to the residual information including information about abs_remainder[n] or dec_abs_level[n], the bitstream can also include various types of information (e.g., prediction information) for image / video decoding. The bitstream can also include selection information about the Rice parameter table. The bitstream can be transmitted to the decoding device via a (digital) storage medium or a network.

[0299] Figure 8An example of an entropy encoding method according to another embodiment of this document is schematically illustrated.

[0300] Figure 8 The Rice parameter derivation method disclosed in can be obtained by Figure 2 and Figure 7 The encoding device 200 disclosed in is executed. Specifically, for example, Figure 8 S800 to S820 may be performed by the Rice parameter deriver 241 of the entropy encoder 240 . Figure 8 S830 may be performed by the binarizer 242 of the entropy encoder 240, and Figure 8 S840 may be performed by the entropy encoding processor 243 of the entropy encoder 240 .

[0301] Figure 8 The entropy encoding method disclosed in may include the above-mentioned implementations in this document.

[0302] Reference Figure 7 and Figure 8 , the entropy encoder 240 performs a residual encoding process on the (quantized) transform coefficients. Here, the transform coefficients may be used interchangeably with the residual coefficients. The entropy encoder 240 may perform residual encoding of the (quantized) transform coefficients in the current block (current CB or current TB) according to the scanning order. For example, as indicated in Tables 1 to 4, the entropy encoder 240 may generate and encode various syntax elements for residual information. As an example, the Rice parameter deriver 241 of the entropy encoder 240 may generate (or derive) information representing the level value of the current transform coefficient (quantized transform coefficient or current (quantized) residual coefficient) in the current block (S800). Here, the information representing the level value of the current transform coefficient may include at least one of abs_remainder[n] or dec_abs_level[n]. The value of abs_remainder[n] may be derived based on the values ​​of sig_coeff_flag[xC][yC], abs_level_gtx_flag[n][0], par_level_flag[n], and abs_level_gtx_flag[n][1]. The value of dec_abs_level[n] may be derived as the level value of the transform coefficient. When the number of coded elements of a predetermined context in a corresponding block (CU or TU) reaches a predetermined threshold according to a scanning order, the encoding device may encode the level value of a subsequent transform coefficient based on dec_abs_level[n].

[0303] The Rice parameter deriver 241 of the entropy encoder 240 may determine an index value of a Rice lookup table of information representing a level value of a transform coefficient (S810). For example, the Rice parameter deriver 241 of the entropy encoder 240 may determine an index value of a Rice parameter lookup table based on the configuration of a syntax element encoded before a syntax element representing a level value of a current transform coefficient (presence / non-presence or type of a syntax element), whether the number of encoded / decoded context-coded cells in residual data encoding exceeds the maximum number of available context-coded cells configured in a cell constraint algorithm for context coding, whether lossless or near-lossless encoding is performed, whether the sum of the level values ​​of the quantized coefficient information (value) or the neighboring coefficients of the current transform coefficient is greater than a threshold value (or the size of a Rice parameter lookup table), or the corresponding index value may be changed by adding a shift to the index value.

[0304] The Rice parameter deriver 241 of the entropy encoder 240 can derive the Rice parameter (S820) for the information (abs_remainder[n] or dec_abs_level[n]) representing the level value of the current transform coefficient from the Rice parameter lookup table based on the index value. For example, the Rice parameter deriver 241 of the entropy encoder 240 can derive the Rice parameter of the current scanning position (coefficient) based on the index value by using Formula 15 and / or Formula 16 as described above. In the case of using Formula 16, the value of the Rice parameter can be changed to a value obtained by adding the offset value to the index value. The index value can be derived based on the above-mentioned locSumAbs, or can be determined based on the index selection method configured in the standard. locSumAbs can be derived based on AbsLevel and / or sig_coeff_flag of the neighboring transform coefficient.

[0305] It is obvious to those skilled in the art that, with respect to sig_coeff_flag, par_level_flag, and abs_level_gtx_flag binarized at a fixed length without using Rice parameters, the process of deriving Rice parameters can be omitted. With respect to sig_coeff_flag, par_level_flag, and abs_level_gtx_flag, another type of binarization that is not based on Rice parameters can be performed.

[0306] The binarizer 242 of the entropy encoder 240 may derive a cell string for information (abs_remainder[n] or dec_abs_level[n]) representing a level value of a transform coefficient by performing binarization based on the derived Rice parameter (S830). The length of the cell string may be adaptively determined by the derived Rice parameter.

[0307] The entropy coding processor 243 of the entropy encoder 240 can perform entropy coding (S840) based on a cell string for information (abs_remainder[n] or dec_abs_level[n]) representing the level value of the transform coefficient. The entropy coding processor 243 of the entropy encoder 240 can perform context-based entropy coding of the cell string based on context adaptive arithmetic coding (CABAC) entropy coding technology, and its output can be included in the bitstream. In this case, the encoding device can perform entropy coding by deriving context information via the cell of the cell string, and the context information can be updated by the cell. As described above, in addition to the residual information including information about abs_remainder[n] or dec_abs_level[n], the bitstream can also include various types of information (e.g., prediction information) for image / video decoding. The bitstream can also include selection information about the Rice parameter table. The bitstream can be transmitted to the decoding device via a (digital) storage medium or a network.

[0308] Fig. 9 and Fig.10 An example of an entropy decoding method and related components according to an embodiment of this document is schematically illustrated.

[0309] Fig. 9 The Rice parameter derivation method disclosed in can be obtained by Figure 3 and Fig.10 Specifically, for example, Fig. 9 S900 to S920 may be performed by the Rice parameter deriver 311 of the entropy decoder 310. Fig. 9 S930 may be performed by the binarizer 312 of the entropy decoder 310, and Fig. 9 S940 may be performed by the entropy decoding processor 313 of the entropy decoder 310 .

[0310] Fig. 9 The entropy decoding method disclosed in may include the above-mentioned implementations in this document.

[0311] Reference Fig. 9 and Fig.10 , the entropy decoder can derive (quantized) transform coefficients by decoding the encoded residual information. Here, the transform coefficients can be used interchangeably with the residual coefficients. The decoding device can derive (quantized) transform coefficients by decoding the encoded residual information for the current block (current CB or current TB). For example, the decoding device can decode various syntax elements about the residual information as indicated in Tables 1 to 4, interpret the values ​​of the relevant syntax elements, and derive (quantized) transform coefficients based on this.

[0312] Specifically, the Rice parameter deriver 311 of the entropy decoder 310 can obtain information (abs_remainder[n] or dec_abs_level[n]) (S900) representing the level value of the current transform coefficient (quantized transform coefficient or current (quantized) residual coefficient) from the bitstream. In addition, a Rice parameter lookup table for information representing the level value can be selected from multiple Rice parameter lookup tables (S910).

[0313] For example, the Rice parameter deriver 311 of the entropy decoder 310 can configure multiple Rice parameter lookup tables, and can select one of the tables. To this end, selection information for selecting one of the tables can be explicitly signaled. The selection information can correspond to a syntax element for sending information representing the Rice parameter lookup table selected by the encoding device. In this case, the Rice parameter deriver 311 of the entropy decoder 310 can obtain a syntax element representing information about the Rice parameter lookup table from the bitstream, and based on this, any one of the multiple Rice parameter lookup tables can be selected.

[0314] In addition, the Rice parameter deriver 311 of the entropy decoder 310 can select a Rice parameter lookup table for level encoding of the current transform coefficient (or coefficient group, transform block or coding block) from multiple Rice parameter lookup tables based on at least one of the given information (for example, the configuration of the syntax element encoded before the syntax element representing the level value of the current transform coefficient (the presence / absence or type of the syntax element), information about the maximum number of available context encoding cells configured in the context encoding cell constraint algorithm, whether the current block is losslessly or nearly losslessly encoded, or quantization coefficient information of the current transform coefficient). Here, the syntax element encoded before the syntax element representing the level value of the current transform coefficient may include at least one of sig_coeff_flag, abs_level_gtx_flag, par_level_flag or coeff_sign_flag, and the Rice parameter lookup table can be selected based on whether at least one of them is decoded.

[0315] The Rice parameter deriver 311 of the entropy decoder 310 can derive the Rice parameter (S920) for the information (abs_remainder[n] or dec_abs_level[n]) representing the level value of the current transform coefficient based on the selected Rice parameter lookup table and the neighboring (or reference) transform coefficient of the current transform coefficient. Specifically, the Rice parameter deriver 311 of the entropy decoder 310 can derive the Rice parameter for the current scanning position (coefficient) by using the Rice parameter lookup table selected based on the above locSumAbs. locSumAbs can be derived based on AbsLevel and / or sig_coeff_flag of the adjacent transform coefficient. It is obvious to those skilled in the art that with respect to sig_coeff_flag, par_level_flag and abs_level_gtx_flag that are binarized with a fixed length without using Rice parameters, the process of deriving Rice parameters can be omitted. Regarding sig_coeff_flag, par_level_flag, and abs_level_gtx_flag, another type of binarization other than the binarization based on Rice parameters may be performed.

[0316] The binarizer 312 of the entropy decoder 310 can derive a cell string (S930) for information (abs_remainder[n] or dec_abs_level[n]) representing the level value of the transform coefficient by performing binarization based on the derived Rice parameter. As an example, the binarizer 312 of the entropy decoder 310 can derive an available cell string for available values ​​of abs_remainder[n] or dec_abs_level[n] through a binarization process. The length of the available cell string can be adaptively determined by the derived Rice parameter.

[0317] The entropy decoding processor 313 of the entropy decoder 310 can derive the level value of the transform coefficient by performing entropy decoding based on the cell string for the information (abs_remainder[n] or dec_abs_level[n]) representing the level value of the transform coefficient (S940). For example, the entropy decoding processor 313 of the entropy decoder 310 can compare the derived cell string with the available cell string while parsing and decoding the cells / bits of abs_remainder[n] or dec_abs_level[n] in sequence. If the derived cell string is equal to one of the available cell strings, the value corresponding to the corresponding cell string can be derived as the value of abs_remainder[n]. Otherwise, the next bit in the bitstream can also be parsed and decoded, and then the comparison process can be performed. Through the above processing, even if the start bit or end bit of specific information (specific syntax element) in the bitstream is not used, the corresponding information can be signaled using variable length bits. Through this, a relatively small number of bits can be allocated to a small value, and thus the overall coding efficiency can be improved.

[0318] The decoding device can perform context-based entropy decoding of the corresponding cells in the cell string from the bitstream based on the CABAC entropy coding technology. In this case, the decoding device can perform entropy coding by deriving context information via the cells of the cell string, and the context information can be updated by the cells. The entropy decoding process can be performed by the entropy decoding processor 313 in the entropy decoder 310. As described above, in addition to the residual information including information about abs_remainder[n] or dec_abs_level[n], the bitstream can also include various types of information (e.g., prediction information) for image / video decoding. The bitstream can also include selection information about the Rice parameter lookup table. As described above, the bitstream can be transmitted to the decoding device via a (digital) storage medium or a network.

[0319] The decoding device can derive (quantized) transform / residual coefficients based on entropy decoding, and based on this, can derive residual samples for the current block by performing dequantization and / or inverse transform processes as needed. Reconstructed samples can be generated based on prediction samples and residual samples derived by inter-frame prediction and / or intra-frame prediction, and a reconstructed block / picture including the reconstructed samples can be generated.

[0320] Fig.11 An example of an entropy decoding method according to another embodiment of this document is schematically illustrated.

[0321] Fig.11 The Rice parameter derivation method disclosed in can be obtained by Figure 3 and Fig.10Specifically, for example, Fig.11 S1100 to S1120 can be performed by the Rice parameter deriver 311 of the entropy decoder 310. Fig.11 S1130 may be performed by the binarizer 312 of the entropy decoder 310, and Fig.11 S1140 may be performed by the entropy decoding processor 313 of the entropy decoder 310 .

[0322] Fig.11 The entropy decoding method disclosed in may include the above-mentioned implementations in this document.

[0323] Reference Fig.10 and Fig.11 , the entropy decoder can derive (quantized) transform coefficients by decoding the encoded residual information. Here, the transform coefficients can be used interchangeably with the residual coefficients. The decoding device can derive (quantized) transform coefficients by decoding the encoded residual information for the current block (current CB or current TB). For example, the decoding device can decode various syntax elements about the residual information as indicated in Tables 1 to 4, interpret the values ​​of the relevant syntax elements, and derive (quantized) transform coefficients based on this.

[0324] Specifically, the Rice parameter deriver 311 of the entropy decoder 310 can obtain information (abs_remainder[n] or dec_abs_level[n]) representing the level value of the current transform coefficient (quantized transform coefficient or current (quantized) residual coefficient) from the bitstream (S1100). In addition, the index value of the Rice parameter lookup table for the information representing the level value can be determined (S1110). For example, the Rice parameter deriver 311 of the entropy decoder 310 can determine and / or change the index value of the Rice parameter lookup table based on the configuration of the syntax element encoded before the information representing the level value of the current transform coefficient (the presence / absence or type of the syntax element), the maximum number of available context-encoded cells configured in the cell constraint algorithm of the context encoding, whether lossless or near-lossless encoding is performed, the quantization coefficient information (value) for the transform coefficient, or at least one of the level values ​​of the neighboring coefficients of the current transform coefficient.

[0325] For example, the Rice parameter deriver 311 of the entropy decoder 310 may determine the index value based on whether at least one syntax element sig_coeff_flag, abs_level_gtx_flag, par_level_flag, or coeff_sign_flag is decoded from the bitstream, or the index value may be changed by adding a shift to the index value. Alternatively, the index value may be determined based on whether the sum of the level values ​​of the neighboring transform coefficients of the transform coefficient is equal to or greater than a threshold, or the index value may be changed by adding a shift to the index value.

[0326] The Rice parameter deriver 311 of the entropy decoder 310 can derive the Rice parameter (S1120) for the information (abs_remainder[n] or dec_abs_level[n]) representing the level value of the current transform coefficient according to the Rice parameter lookup table based on the index value. For example, the Rice parameter deriver 311 of the entropy decoder 310 can derive the Rice parameter for the current scanning position (coefficient) based on the index value by using Formula 15 and / or Formula 16 as described above. In the case of using Formula 16, the Rice parameter value can be changed to a value obtained by adding the offset value to the index value. The index value can be derived based on locSumAbs as described above, or can be determined based on an index selection method configured in the standard.

[0327] It is obvious to those skilled in the art that, with respect to sig_coeff_flag, par_level_flag, and abs_level_gtx_flag binarized at a fixed length without using Rice parameters, the process of deriving Rice parameters can be omitted. With respect to sig_coeff_flag, par_level_flag, and abs_level_gtx_flag, another type of binarization that is not based on Rice parameters can be performed.

[0328] The binarizer 312 of the entropy decoder 310 can derive a cell string (S1130) for information (abs_remainder[n] or dec_abs_level[n]) representing the level value of the transform coefficient by performing binarization based on the derived Rice parameter. As an example, the binarizer 312 of the entropy decoder 310 can derive an available cell string for available values ​​of abs_remainder[n] or dec_abs_level[n] through a binarization process. The length of the available cell string can be adaptively determined by the derived Rice parameter.

[0329] The entropy decoding processor 313 of the entropy decoder 310 can derive the level value of the transform coefficient by performing entropy decoding based on the cell string for the information (abs_remainder[n] or dec_abs_level[n]) representing the level value of the transform coefficient (S1140). For example, the entropy decoding processor 313 of the entropy decoder 310 can compare the derived cell string with the available cell string while sequentially parsing and decoding the cells / bits of abs_remainder[n] or dec_abs_level[n]. If the derived cell string is equal to one of the available cell strings, the value corresponding to the corresponding cell string can be derived as the value of abs_remainder[n]. Otherwise, the next bit in the bitstream can be further parsed and decoded, and then the comparison process can be performed. Through the above processing, variable length bits can be used to signal the corresponding information, even without using the start bit or end bit of specific information (specific syntax element) in the bitstream. Through this, a relatively small number of bits can be allocated to a small value, and thus the overall coding efficiency can be improved.

[0330] The decoding device can perform context-based entropy decoding of the corresponding cells in the cell string from the bitstream based on the CABAC entropy coding technology. In this case, the decoding device can perform entropy coding by deriving context information via the cells of the cell string, and the context information can be updated by the cells. The entropy decoding process can be performed by the entropy decoding processor 313 in the entropy decoder 310. As described above, in addition to the residual information including information about abs_remainder[n] or dec_abs_level[n], the bitstream can also include various types of information (e.g., prediction information) for image / video decoding. The bitstream can also include selection information about the Rice parameter lookup table. As described above, the bitstream can be transmitted to the decoding device via a (digital) storage medium or a network.

[0331] The decoding device may derive (quantized) transform / residual coefficients based on entropy decoding, and, if necessary, may derive residual samples for the current block by performing a dequantization and / or inverse transform process based thereon. Reconstructed samples may be generated based on prediction samples and residual samples derived through inter-frame prediction and / or intra-frame prediction, and a reconstructed block / picture including the reconstructed samples may be generated.

[0332] Fig.12 A video / image encoding method according to an embodiment of this document is illustrated.

[0333] Fig.12 The video / image encoding method disclosed in Figure 2 Specifically, for example, Fig.12 S1200 of the encoding device may be performed by the predictor 220, and S1210 may be performed by the subtractor 231 of the encoding device. S1220 may be performed by the transformer 232 of the encoding device, S1230 may be performed by the quantizer 233 of the encoding device, and S1240 may be performed by the entropy encoder 240 of the encoding device. Figure 8 The above-mentioned S800 to S830 may be included in the process of S1240.

[0334] Reference Fig.12 , the encoding device may derive a prediction sample by prediction for the current block (S1200). The encoding device may determine whether to perform inter prediction or intra prediction with respect to the current block, and may determine a specific inter prediction mode or a specific intra prediction mode based on the RD cost. According to the determined mode, the encoding device may derive a prediction sample for the current block.

[0335] The encoding apparatus may derive residual samples by comparing original samples with predicted samples for the current block ( S1210 ).

[0336] The encoding apparatus may derive a transform coefficient through a transform process with respect to the residual sample ( S1220 ), and may derive a quantized transform coefficient through quantization of the derived transform coefficient ( S1230 ).

[0337] The encoding device may encode image information including prediction information and residual information, and may output the encoded image information in the form of a bitstream (S1240). The prediction information may include information about prediction mode information (for example, in the case of applying inter-frame prediction) and motion information as information related to the prediction process. The residual information is information about quantized transform coefficients, and may include, for example, the information disclosed in Tables 1 to 4 described above.

[0338] The output bitstream may be transmitted to a decoding device via a storage medium or a network.

[0339] Fig.13 A video / image decoding method according to an embodiment of this document is illustrated.

[0340] Fig.13 The video / image decoding method disclosed in Figure 3 Specifically, for example, Fig.13S1300 of the decoding device may be performed by the predictor 330 of the decoding device. The process of deriving the value of the relevant syntax element by decoding the prediction information included in the bitstream in S1300 may be performed by the entropy decoder 310 of the decoding device. S1310, S1320, S1330 and S1340 may be performed by the entropy decoder 310, the dequantizer 321, the inverse transformer 322 and the adder 340 of the decoding device, respectively. As described above, Fig.10 S1000 to S1030 described in the above may be included in the process of S1310.

[0341] The decoding device may perform an operation corresponding to the operation performed by the encoding device. The decoding device may perform inter prediction or intra prediction on the current block based on the received prediction information, and may derive a prediction sample (S1300).

[0342] The decoding apparatus may induce a quantized transform coefficient for the current block based on the received residual information ( S1310 ).

[0343] The decoding apparatus may derive a transform coefficient through dequantization of the quantized transform coefficient ( S1320 ).

[0344] The decoding apparatus may induce residual samples through an inverse transform process with respect to the transform coefficients ( S1330 ).

[0345] The decoding device may generate a reconstructed sample for the current block based on the prediction sample and the residual sample, and may generate a reconstructed picture based thereon (S1340). Thereafter, as described above, an in-loop filtering process may also be applied to the reconstructed picture.

[0346] Although the method has been described based on a flowchart that lists steps or blocks in sequence in the above-mentioned embodiments, the steps of the present disclosure are not limited to a specific order, and specific steps may be performed in different steps or in a different order or simultaneously relative to the above-mentioned steps. In addition, it will be understood by those of ordinary skill in the art that the steps in the flowchart are not exclusive, and another step may be included therein, or one or more steps in the flowchart may be deleted without affecting the scope of the present disclosure.

[0347] The above-mentioned method according to the present disclosure may be in the form of software, and the encoding device and / or decoding device according to the present disclosure may be included in a device for performing image processing (e.g., TV, computer, smart phone, set-top box, display device, etc.).

[0348] When the embodiments of the present disclosure are implemented by software, the above-mentioned methods can be implemented by modules (processing or functions) that perform the above-mentioned functions. The module can be stored in a memory and executed by a processor. The memory can be installed inside or outside the processor and can be connected to the processor via various well-known devices. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits and / or data processing devices. The memory may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium and / or other storage devices. In other words, according to the embodiments of the present disclosure, it can be implemented and executed on a processor, a microprocessor, a controller or a chip. For example, the functional units illustrated in the corresponding figures can be implemented and executed on a computer, a processor, a microprocessor, a controller or a chip. In this case, information about the implementation (e.g., information about instructions) or an algorithm can be stored in a digital storage medium.

[0349] In addition, the decoding device and the encoding device of the embodiment of the present disclosure can be included in a multimedia broadcast transceiver, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a portable camera, a video on demand (VoD) service provider, an over-the-top (OTT) video device, an Internet streaming service provider, a 3D video device, a virtual reality (VR) device, an augmented reality (AR) device, an image phone video device, a vehicle terminal (e.g., a vehicle (including an autonomous vehicle) terminal, an aircraft terminal or a ship terminal) and a medical video device; and can be used to process image signals or data. For example, an OTT video device may include a game console, a Blu-ray player, a networked TV, a home theater system, a smart phone, a tablet PC, and a digital video recorder (DVR).

[0350] In addition, the processing method of the embodiment of the present disclosure can be generated in the form of a program executed by a computer and can be stored in a computer-readable recording medium. The multimedia data with a data structure according to the embodiment of the present disclosure can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices storing computer-readable data. The computer-readable recording medium may 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. The computer-readable recording medium also includes a medium implemented in the form of a carrier wave (e.g., transmission on the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium, or can be transmitted through a wired or wireless communication network.

[0351] In addition, the embodiments of the present disclosure can be implemented as a computer program product based on a program code, and the program code can be executed on a computer according to the embodiments of this document. The program code can be stored on a computer readable carrier.

[0352] Fig.14 An example of a content streaming system to which an embodiment of the present disclosure can be applied is shown.

[0353] Reference Fig.14 A content streaming system to which the embodiments of the present disclosure are applied may generally include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

[0354] The encoding server is used to compress the content input from the multimedia input device such as a smart phone, a camera, a camcorder, etc. into digital data, generate a bit stream, and transmit it to the streaming server. As another example, in the case where the multimedia input device such as a smart phone, a camera, a camcorder, etc. directly generates a bit stream, the encoding server can be omitted.

[0355] The bitstream may be generated by the encoding method or the bitstream generating method to which the embodiment of the present disclosure is applied, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0356] The streaming server transmits multimedia data to the user device based on the user's request through the network server, which acts as a tool to inform the user of what services exist. When the user requests the service the user wants, the network server transfers the request to the streaming server, and the streaming server transmits the multimedia data to the user. In this regard, the content streaming system may include a separate control server, and in this case, the control server is used to control the commands / responses between the various devices in the content streaming system.

[0357] The streaming server may receive content from a media storage device and / or an encoding server. For example, in the case where the content is received from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a predetermined period of time to smoothly provide a streaming service.

[0358] For example, user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation, tablet PCs, tablet PCs, ultrabooks, wearable devices (e.g., watch-type terminals (smart watches), glasses-type terminals (smart glasses), head-mounted displays (HMDs)), digital TVs, desktop computers, digital signage, etc.

[0359] Each server in the content streaming system may be operated as a distributed server, and in this case, data received by each server may be processed in a distributed manner.

Claims

1. An image decoding method performed by a decoding device, the method comprising the following steps: receiving a bitstream comprising information related to level values ​​of transform coefficients in a current block; determining an index value to a Rice parameter lookup table for said information associated with said level value of said transform coefficient; Derivation of a Rice parameter for the information related to the level value of the transform coefficient based on the index value and the Rice parameter lookup table; Derivation of a symbol string for the information related to the level value of the transform coefficient based on the Rice parameter; as well as deriving the level value of the transform coefficient based on the string of cells, The step of deriving the Rice parameter comprises the following steps: deriving a modified index value based on the index value; deriving temporary Rice parameters by using the modified index value and the Rice parameter lookup table; and The Ricean parameters are derived by adding an offset to the temporary Ricean parameters, Wherein, based on the offset being positive and the modified index value being 31, the Rice parameter is derived to be a value greater than the maximum Rice parameter value defined in the Rice parameter lookup table.

2. The image decoding method according to claim 1, wherein: The step of deriving the modified index value includes deriving the modified index value based on whether a sum of level values ​​of neighboring transform coefficients of the transform coefficient is less than a threshold value.

3. The image decoding method according to claim 2, wherein: The step of deriving the modified index value comprises deriving the modified index value based on the index value and a shift value.

4. The image decoding method according to claim 1, wherein: The modified index value is derived by using a shift value based on a specific syntax element encoded before the information related to the level value of the transform coefficient, and the Rice parameter is derived by using the offset.

5. The image decoding method according to claim 4, wherein: The index value is derived based on a sum of level values ​​of neighboring transform coefficients of the transform coefficient.

6. The image decoding method according to claim 1, wherein: The information related to the level value of the transform coefficient includes a syntax element dec_abs_level indicating the level value of the transform coefficient or a syntax element abs_remainder indicating a residual level value of the transform coefficient.

7. An image encoding method performed by an encoding device, the method comprising the following steps: generating information related to level values ​​of transform coefficients in a current block; determining an index value to a Rice parameter lookup table for said information associated with said level value of said transform coefficient; Derived a Rice parameter for the information related to the level value of the transform coefficient based on the index value and the Rice parameter lookup table; Derivation of a symbol string for the information related to the level value of the transform coefficient based on the Rice parameter; as well as Encoding the cell string, The step of deriving the Rice parameter comprises the following steps: deriving a modified index value based on the index value; deriving temporary Rice parameters by using the modified index value and the Rice parameter lookup table; and The Ricean parameters are derived by adding an offset to the temporary Ricean parameters, Wherein, based on the offset being positive and the modified index value being 31, the Rice parameter is derived to be a value greater than the maximum Rice parameter value defined in the Rice parameter lookup table.

8. The image encoding method according to claim 7, wherein: The step of deriving the modified index value includes deriving the modified index value based on whether a sum of level values ​​of neighboring transform coefficients of the transform coefficient is less than a threshold value.

9. The image encoding method according to claim 8, wherein: The step of deriving the modified index value comprises deriving the modified index value based on the index value and a shift value.

10. The image encoding method according to claim 7, wherein: The modified index value is derived by using a shift value based on a specific syntax element encoded before the information related to the level value of the transform coefficient, and the Rice parameter is derived by using the offset.

11. The image encoding method according to claim 10, wherein: The index value is derived based on a sum of level values ​​of neighboring transform coefficients of the transform coefficient.

12. The image encoding method according to claim 7, wherein: The information related to the level value of the transform coefficient includes a syntax element dec_abs_level indicating the level value of the transform coefficient or a syntax element abs_remainder indicating a residual level value of the transform coefficient.

13. A method for transmitting a bit stream generated by an image encoding method, the image encoding method comprising the steps of: generating information related to level values ​​of transform coefficients in a current block; determining an index value to a Rice parameter lookup table for said information associated with said level value of said transform coefficient; Derived a Rice parameter for the information related to the level value of the transform coefficient based on the index value and the Rice parameter lookup table; Derivation of a symbol string for the information related to the level value of the transform coefficient based on the Rice parameter; as well as The bit stream is generated by encoding the cell string, The step of deriving the Rice parameter comprises the following steps: deriving a modified index value based on the index value; deriving temporary Rice parameters by using the modified index value and the Rice parameter lookup table; and The Ricean parameters are derived by adding an offset to the temporary Ricean parameters, Wherein, based on the offset being positive and the modified index value being 31, the Rice parameter is derived to be a value greater than the maximum Rice parameter value defined in the Rice parameter lookup table.

14. A non-transitory computer-readable recording medium storing a bit stream generated by an image encoding method, the image encoding method comprising the steps of: generating information related to level values ​​of transform coefficients in a current block; determining an index value to a Rice parameter lookup table for said information associated with said level value of said transform coefficient; Derived a Rice parameter for the information related to the level value of the transform coefficient based on the index value and the Rice parameter lookup table; Derivation of a symbol string for the information related to the level value of the transform coefficient based on the Rice parameter; as well as The bit stream is generated by encoding the cell string, The step of deriving the Rice parameter comprises the following steps: deriving a modified index value based on the index value; deriving temporary Rice parameters by using the modified index value and the Rice parameter lookup table; and The Ricean parameters are derived by adding an offset to the temporary Ricean parameters, Wherein, based on the offset being positive and the modified index value being 31, the Rice parameter is derived to be a value greater than the maximum Rice parameter value defined in the Rice parameter lookup table.