Method and apparatus for coding transform coefficient in video / image coding system

By employing Rice parameter look-up tables for transform coefficients, the method improves video/image compression efficiency and residual coding performance, addressing the need for efficient coding in high-resolution and immersive media formats.

JP2026015493APending Publication Date: 2026-01-29LG ELECTRONICS INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025194302
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-09-20
Filing Date
2025-11-13
Publication Date
2026-01-29

AI Technical Summary

Technical Problem

The increasing demand for high-resolution and high-quality images/videos, particularly in immersive media formats like VR and AR, necessitates highly efficient image/video compression technologies to reduce transmission and storage costs while maintaining coding performance.

Method used

A method and apparatus that utilize Rice parameter look-up tables for deriving Rice parameters and bin strings to improve the coding efficiency of transform coefficients in residual coding, particularly in environments with low QP (Quantization Parameter) values.

Benefits of technology

Enhances overall video/image compression efficiency, improves residual coding performance, and provides higher performance in lossless or high bit rate environments with mixed level values of transform coefficients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026015493000001_ABST
    Figure 2026015493000001_ABST
Patent Text Reader

Abstract

The present invention relates to a video decoding method performed by a decoding device.SOLUTION: A video decoding method performed by a decoding apparatus according to the present disclosure includes obtaining information indicating a level value of a transform coefficient in a current block from a bitstream, selecting one rice parameter lookup table from among a plurality of rice parameter lookup tables based on the information indicating the level value of the transform coefficient, deriving a rice parameter for the information indicating the level value of the transform coefficient based on the selected rice parameter lookup table, deriving a bin string for the information indicating the level value of the transform coefficient based on the rice parameter, and deriving the level value of the transform coefficient based on the bin string.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present technology relates to a method and apparatus for coding transform coefficients in encoding / decoding video / images. [Background technology]

[0002] In recent years, demand for high-resolution, high-quality images / videos, such as 4K or 8K or higher UHD (Ultra High Definition) images / videos, has been increasing in various fields. As the resolution and quality of image / video data increases, the amount of information or bits to be transmitted increases relatively compared to existing image / video data. Therefore, when transmitting image data using existing media such as wired or wireless broadband lines or storing image / video data using existing storage media, transmission costs and storage costs increase.

[0003] In addition, interest in and demand for immersive media such as VR (Virtual Reality), AR (Artificial Reality) content, and holograms have been increasing in recent years, and the broadcast of images / videos with different image characteristics from real images, such as game images, has been increasing.

[0004] Therefore, there is a need for highly efficient image / video compression technology to effectively compress and transmit, store, and play back high-resolution, high-quality image / video information having the above-mentioned various characteristics. Summary of the Invention [Problem to be solved by the invention]

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

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

[0007] Another technical problem of this document is to provide a method and apparatus capable of improving the coding performance of level coding for transform coefficients in residual coding. [Means for solving the problem]

[0008] According to one embodiment of this document, a video decoding method performed by a decoding device includes the steps of: obtaining information indicating level values ​​of transform coefficients in a current block from a bitstream; selecting one of a plurality of Rice parameter look-up tables for the information indicating the level values ​​of the transform coefficients; deriving Rice parameters for the information indicating the level values ​​of the transform coefficients based on the selected Rice parameter look-up table; deriving a bin string for the information indicating the level values ​​of the transform coefficients based on the Rice parameters; and deriving the level values ​​of the transform coefficients based on the bin string.

[0009] According to another embodiment of this document, a video decoding method performed by a decoding device includes the steps of obtaining information indicating level values ​​of transform coefficients in a current block from a bitstream, determining an index value of a Rice parameter lookup table for the information indicating the level values ​​of the transform coefficients, deriving a Rice parameter for the information indicating the level values ​​of the transform coefficients from the Rice parameter lookup table based on the index value, deriving a bin string for the information indicating the level values ​​of the transform coefficients based on the Rice parameter, and deriving the level values ​​of the transform coefficients based on the bin string. [Effects of the Invention]

[0010] According to one embodiment of this document, the overall video / image compression efficiency can be improved.

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

[0012] According to one embodiment of this document, residual coding can improve the coding performance of level coding for transform coefficients.

[0013] According to one embodiment of this document, when the level values ​​of the transform coefficients are a mixture of low and high level values, higher performance can be provided in lossless or high bit rate environments (low QP) with relatively high level values. [Brief explanation of the drawings]

[0014] [Figure 1] 1 illustrates schematically an example of a video / image coding system to which embodiments of the present document can be applied. [Figure 2] 1 is a diagram illustrating the configuration of a video / image encoding device to which the embodiments of this document can be applied. [Figure 3] 1 is a diagram illustrating the configuration of a video / image decoding device to which an embodiment of the present document can be applied. [Figure 4] Illustrates an example of Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements. [Figure 5] Transform coefficients in a 4x4 block are shown as an example. [Figure 6] 1 illustrates an example of an entropy encoding method and associated components according to an embodiment of the present document. [Figure 7] 1 illustrates an example of an entropy encoding method and associated components according to an embodiment of the present document. [Figure 8] 10 illustrates a schematic diagram of an example of an entropy encoding method according to another embodiment of the present document. [Figure 9] 1 illustrates an example of an entropy decoding method and related components according to an embodiment of the present document. [Figure 10] 1 illustrates an example of an entropy decoding method and related components according to an embodiment of the present document. [Figure 11] 10 illustrates a schematic diagram of an example of an entropy decoding method according to another embodiment of the present document. [Figure 12] 1 illustrates a video / image encoding method according to an embodiment of the present document. [Figure 13] 1 illustrates a video / image decoding method according to an embodiment of the present document. [Figure 14] 1 illustrates an example of a content streaming system to which the embodiments disclosed herein can be applied. DETAILED DESCRIPTION OF THE INVENTION

[0015] Because the disclosure of this document can be modified in various ways and can have various embodiments, specific embodiments will be illustrated in the drawings and described in detail. The terms used in this document are used merely to describe specific embodiments and are not intended to limit the technical ideas of this document. The singular expressions "a," "an," "an," "the," and the like include the expression "at least one" unless the context clearly dictates otherwise. In this document, the terms "comprise," "have," and the like are intended to specify the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, and should be understood not to preclude the presence or possibility of addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0016] Meanwhile, each component in the drawings described in this document is illustrated independently for the convenience of describing different characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components may be combined to form a single component, or a single component may be divided into multiple components. Embodiments in which each component is integrated and / or separated are also included within the scope of this document as long as they do not deviate from the essence of the method disclosed herein.

[0017] Hereinafter, the embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used to refer to the same components in the drawings, and redundant description of the same components will be omitted.

[0018] FIG. 1 illustrates schematically an example of a video / image coding system in which embodiments of the present document can be applied.

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

[0020] The source device may include a video source, an encoding device, and a transmitting unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / video encoding device, and the decoding device may be referred to as a video / video 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 unit, which may be a separate device or an external component.

[0021] A video source can acquire video / images through a video / image capture, synthesis, or generation process. A video source can include a video / image capture device and / or a video / image generation device. A video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, a virtual video / image can be generated via a computer, etc., in which case the video / image capture process can be replaced with a process in which related data is generated.

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

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

[0024] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transform, and prediction, which correspond to the operations of the encoding device.

[0025] The renderer can render the decoded video / image, and the rendered video / image can be displayed via a display unit.

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

[0027] Various embodiments relating to video / image coding are presented in this document, and unless otherwise stated, the embodiments may be performed in combination with each other.

[0028] In this document, video can refer to a collection of a series of images over time. A picture generally refers to a unit that shows an image at a specific time, and a slice / tile is a unit that constitutes part of a picture in coding. A slice / tile contains one or more coding tree units (CTUs). A picture consists of one or more slices / tiles. A picture consists of one or more tile groups. A tile group contains one or more tiles. A brick may represent a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each of which consists of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick.A brick scan refers to a specific sequential ordering of CTUs partitioning a picture, in which the CTUs are ordered consecutively in a CTU raster scan within a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set.The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the height of the picture. A tile scan indicates a specific sequential ordering of CTUs partitioning a picture, in which the CTUs are ordered consecutively in a CTU raster scan in a tile, whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A slice includes an integer number of bricks of a picture that may be exclusively contained in a single NAL unit. A slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile. In this document, the terms tile group and slice may be used interchangeably.For example, in this document, a tile group / tile group header may be referred to as a slice / slice header.

[0029] A pixel or a pel may refer to the smallest unit constituting one picture (or image). A "sample" may also be used as a term corresponding to a pixel. A sample may generally refer to a pixel or a pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. Alternatively, a sample may refer to a pixel value in the spatial domain, or may refer to a transform coefficient in the frequency domain when such a pixel value is transformed into the frequency domain.

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

[0031] In this document, " / " and "," should be interpreted to indicate "and / or." For example, "A / B" is interpreted as "A and / or B," and "A, B" is interpreted as "A and / or B." Additionally, "A / B / C" means "at least one of A, B, and / or C." Also, "A, B, C" means "at least one of A, B, and / or C." (In this document, the term " / " and "," should be interpreted to indicate "and / or." For instance, the expression "A / B" may mean "A and / or B." Further, "A, B" may mean "A and / or B." Further, "A / B / C" may mean "at least one of A, B, and / or C." Also, "A / B / C" may mean "at least one of A, B, and / or C.")

[0032] Additionally, in this document, "or" should be interpreted as "and / or." For example, "A or B" may mean 1) only "A," 2) only "B," or 3) "A and B." Further, in the document, the term "or" should be interpreted to indicate "and / or." For instance, the expression "A or B" may comprise 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 to indicate "additionally or alternatively."

[0033] Furthermore, parentheses used in this document may mean "for example." Specifically, when "prediction (intra prediction)" is used, it means that "intra prediction" is proposed as an example of "prediction." In other words, "prediction" in this document is not limited to "intra prediction," and "intra prediction" is proposed as an example of "prediction." Furthermore, when "prediction (i.e., intra prediction)" is used, it means that "intra prediction" is proposed as an example of "prediction."

[0034] In this document, technical features individually described in one drawing may be embodied individually or simultaneously.

[0035] 2 is a diagram illustrating a schematic configuration of a video / image encoding device to which an embodiment of this document can be applied. Hereinafter, the term "video encoding device" includes a "image encoding device."

[0036] As shown in FIG. 2, the encoding apparatus 200 may include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter predictor 221 and an intra 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 further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image dividing unit 210, the predicting unit 220, the residual processing unit 230, the entropy encoding unit 240, the adding unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chipset or a processor) depending on the embodiment. Also, the memory 270 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.

[0037] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) using a quad-tree, binary-tree, ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into multiple coding units of deeper depths based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the ternary structure may be applied. Alternatively, the binary tree structure may be applied first. The coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. In this case, the largest coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as needed, and a coding unit of an optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will 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 each be divided or partitioned from the final coding unit.The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

[0038] The term "unit" may be used interchangeably with terms such as "block" or "area." In general, an MxN block can refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample generally refers to a pixel or pixel value, and can refer to only a pixel / pixel value of a luma component or only a pixel / pixel value of a chroma component. A sample can also be used as a term corresponding to one pixel or pel of a picture (or image).

[0039] The encoding apparatus 200 subtracts a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input video signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, a unit in the encoder 200 that subtracts the prediction signal (predicted block, prediction sample array) from the input video signal (original block, original sample array) is called a subtraction unit 231. The prediction unit 220 may perform prediction on a current block (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit 220 determines whether intra prediction or inter prediction is to be applied for the current block or CU. The prediction unit 220 may generate various information related to prediction, such as prediction mode information, as will be described later in the description of each prediction mode, and transmit the information to the entropy encoding unit 240. The prediction information can be encoded in the entropy encoding unit 240 and output in the form of a bitstream.

[0040] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located adjacent to or distant from the current block depending on the prediction mode. Prediction modes in intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, DC mode and planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the granularity of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the settings. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.

[0041] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted in inter 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 further include information on an inter prediction direction (such as L0 prediction, L1 prediction, or Bi prediction). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks 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 called a collocated reference block, a collocated CU (col CU), or the like, and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter predictor 221 may construct a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to derive a motion vector and / or a reference picture index for the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode or a merge mode, the inter predictor 221 may use motion information of neighboring blocks as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0042] The prediction unit 220 generates a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit 200 can apply intra prediction or inter prediction for predicting a block, or can simultaneously apply intra prediction and inter prediction. This is called combined inter and intra prediction (CIIP). The prediction unit can also use intra block copy (IBC) prediction mode or palette mode for predicting a block. The IBC prediction mode or palette mode can be used for content image / video coding, such as games, as in screen content coding (SCC). IBC basically performs prediction within a current picture, but is similar to inter prediction in that it derives a reference block within the current picture. That is, IBC can use at least one of the inter prediction techniques described in this document. Palette mode can be considered an example of intra coding or intra prediction. When palette mode is applied, sample values ​​within a picture can be signaled based on information about a palette table and a palette index.

[0043] The prediction signal generated via the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) can be used to generate a reconstructed signal or a residual signal.

[0044] The transform unit 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 conditionally non-linear transform (CNT). Here, GBT refers to a transform obtained from a graph representing inter-pixel relationship information. CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to pixel blocks having the same square size or to non-square blocks of variable size.

[0045] The quantization unit 233 quantizes the transform coefficients and transmits the quantized signal to the entropy encoding unit 240. The entropy encoding unit 240 encodes the quantized signal (information about the quantized transform coefficients) and outputs it as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantization unit 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.

[0046] The entropy encoding unit 240 can perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy encoding unit 240 can encode information required for video / image restoration (e.g., values ​​of syntax elements) together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / video information) can be transmitted or stored in the form of a bitstream in network abstraction layer (NAL) units. The video / video information can further include information on 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). The video / video information can also include general constraint information. In this document, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device are included in video / image information. The video / image information is encoded through the encoding procedure described above and included in the bitstream. The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting 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, and SSD. A transmitter (not shown) for transmitting and / or a storage unit (not shown) for storing the signal output from the entropy encoding unit 240 may be configured as an internal / external element of the encoding device 200, or the transmitter may be included in the entropy encoding unit 240.

[0047] The quantized transform coefficients output from the quantization unit 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) is reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantization unit 234 and the inverse transform unit 235. The adder 250 adds the reconstructed residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). When there is no residual for the current block, such as when skip mode is applied, a predicted block may be used as the reconstructed block. The adder 250 may also be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal is used for intra prediction of the next block to be processed in the current picture, and may also be used for inter prediction of the next picture after filtering, as described below.

[0048] Meanwhile, luma mapping with chroma scaling (LMCS) can be applied in the picture encoding and / or reconstruction process.

[0049] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture and store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, and a bilateral filter. The filtering unit 260 generates various information related to filtering and transmits it to the entropy encoding unit 240, as will be described later in the description of each filtering method. The entropy encoding unit 240 encodes the filtering information and outputs it in the form of a bitstream.

[0050] The modified reconstructed picture sent to the memory 270 can be used as a reference picture in the inter prediction unit 221. This allows the encoding apparatus to avoid prediction mismatch between the encoding apparatus 100 and the decoding apparatus when inter prediction is applied, and also improves coding efficiency.

[0051] The DPB of the memory 270 may store a modified reconstructed picture to be used as a reference picture in the inter predictor 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter predictor 221 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 222.

[0052] FIG. 3 is a diagram illustrating the configuration of a video / image decoding device to which the embodiments of this document can be applied.

[0053] As shown in FIG. 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 predictor 331 and an intra predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. Depending on the embodiment, the entropy decoding unit 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be implemented as a single hardware component (e.g., a decoder chipset or processor). The memory 360 may include a decoded picture buffer (DPB) or may be implemented as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.

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

[0055] The decoding apparatus 300 receives a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal is decoded by the entropy decoding unit 310. For example, the entropy decoding unit 310 may parse the bitstream to derive information (e.g., video / video information) necessary for image restoration (or picture restoration). The video / video information may further include information on 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). The video / video information may also include general constraint information. The decoding apparatus may decode pictures based on the information on the parameter sets and / or the general constraint information. Signaled / received information and / or syntax elements, which will be described later in this document, may be decoded through the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 decodes information in a bitstream based on a coding method such as exponential-Golomb coding, context-adaptive variable length coding (CAVLC), or context-adaptive arithmetic coding (CABAC), and outputs values ​​of syntax elements required for image restoration and quantized values ​​of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using information on the syntax element to be decoded and decoding information on neighboring and current blocks or information on symbols / bins decoded in previous steps, predicts the occurrence probability of bins according to the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values ​​of each syntax element.In this case, the CABAC entropy decoding method may update the context model using information on the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Prediction information from the information decoded by the entropy decoding unit 310 is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values ​​entropy decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the residual processing unit 320.

[0056] The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). Information related to filtering among the information decoded by the entropy decoding unit 310 is provided to the filtering unit 350. A receiving unit (not shown) for receiving a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, and the receiving unit may be a component of the entropy decoding unit 310. The decoding device according to this document may be referred to as a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder includes the entropy decoding unit 310, and the sample decoder includes at least one of the inverse quantization unit 321, the inverse transform unit 322, the adder 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.

[0057] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding apparatus. The inverse quantization unit 321 may inverse quantize the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.

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

[0059] The prediction unit 330 performs prediction on a current block and generates a predicted block including prediction samples for the current block. The prediction unit 330 may determine whether intra prediction or inter prediction is applied to the current block based on information about the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.

[0060] The prediction unit 330 may generate a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for predicting a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as combined inter and intra prediction (CIIP). The prediction unit may also use an intra block copy (IBC) prediction mode or a palette mode for predicting a block. The IBC prediction mode or palette mode can be used for content video / movie coding, such as games, as in screen content coding (SCC). IBC basically performs prediction within a current picture, but can be similar to inter prediction in that it derives a reference block within 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, information regarding a palette table and a palette index is included in the video / picture information and signaled.

[0061] The intra prediction unit 331 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away from the current block depending on the prediction mode. Prediction modes in intra prediction include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.

[0062] The inter prediction unit 332 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted in inter 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 includes a motion vector and a reference picture index. The motion information may further include information on the inter prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 332 may construct a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on received candidate selection information. Inter prediction may be performed based on various prediction modes, and the prediction information may include information indicating the inter prediction mode for the current block.

[0063] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a predicted signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as a reconstructed block.

[0064] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in the current picture, may be output after filtering as described below, or may be used for inter prediction of a next picture.

[0065] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during picture decoding.

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

[0067] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter predictor 332. The memory 360 can store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information is transmitted to the inter predictor 221 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 360 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 331.

[0068] In this document, the embodiments described for the filtering unit 260, inter prediction unit 221, and intra prediction unit 222 of the encoding device 200 can also be applied identically or correspondingly to the filtering unit 350, inter prediction unit 332, and intra prediction unit 331 of the decoding device 300, respectively.

[0069] The video / picture coding method according to this document may be performed based on the following partitioning structure. Specifically, procedures such as prediction, residual processing (e.g., inverse transform, inverse quantization), syntax element coding, and filtering, which will be described later, may be performed based on the CTUs and CUs (and / or TUs and PUs) derived based on the partitioning structure. The block partitioning procedure is performed by the image partitioning unit 210 of the encoding device described above, and partition-related information may be encoded by the entropy encoding unit 240 and transmitted to the decoding device in the form of a bitstream. The entropy decoding unit 310 of the decoding device may derive a block partitioning structure for the current picture based on the partitioning-related information obtained from the bitstream, and perform a series of procedures for video decoding (e.g., prediction, residual processing, block / picture reconstruction, in-loop filtering, etc.) based on the block partitioning structure. The CU size and the TU size may be the same, or multiple TUs may exist within a CU region. Meanwhile, the CU size may generally refer to the luma component (sample) CB (coding block) size. The TU size may generally refer to the size of a luma component (sample) TB (transform block). The chroma component (sample) CB or TB size may be derived based on the luma component (sample) CB or TB size according to a component ratio according to the color format of a picture / image (chroma format, for example, 4:4:4, 4:2:2, 4:2:0, etc.). The TU size may be derived based on maxTbSize. For example, if the CU size is larger than maxTbSize, a plurality of TUs (TBs) of the maxTbSize may be derived from the CU, and transform / inverse transform may be performed in units of the TUs (TBs). Also, for example, if intra prediction is applied, the intra prediction mode / type may be derived in units of the CU (or CB), and procedures for deriving neighboring reference samples and generating predicted samples may be performed in units of TUs (or TBs).In this case, one or more TUs (or TBs) can exist within one CU (or CB) region, and in this case, the multiple TUs (or TBs) can share the same intra prediction mode / type.

[0070] Furthermore, in video / image coding according to this document, video processing units may have a hierarchical structure. A picture may be divided into one or more tiles, bricks, slices, and / or tile groups. A slice may include one or more bricks. A brick may include one or more CTU rows within the tile. A slice may include an integer number of bricks in the picture. A tile group may include one or more tiles. A tile may include one or more CTUs. The CTUs may be divided into one or more CUs. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. A tile group may include an integer number of tiles according to tile raster scanning within a picture. A slice header may carry information / parameters that can be applied to the corresponding slice (block within the slice). If the encoding / decoding device has a multi-core processor, the encoding / decoding procedures for the tiles, slices, bricks, and / or tile groups can be processed in parallel. In this document, the terms slice and tile group can be used interchangeably. That is, a tile group header can be referred to as a slice header. Here, a slice can have one of slice types including an intra (I) slice, a predictive (P) slice, and a bi-predictive (B) slice. For blocks in an I slice, inter prediction can be used for prediction, and only intra prediction can be used. Of course, even in this case, original sample values ​​can be coded and signaled without prediction. For blocks in a P slice, intra prediction or inter prediction can be used, and if inter prediction is used, only uni prediction can be used.Meanwhile, for blocks in a B slice, intra prediction or inter prediction can be used, and if inter prediction is used, up to bi-prediction can be used.

[0071] The encoder determines the tile / tile group, brick, slice, maximum and minimum coding unit sizes based on the characteristics of the video image (e.g., resolution) or taking into account coding efficiency or parallel processing, and information regarding this or information that can guide this can be included in the bitstream.

[0072] The decoder can obtain information indicating whether the tile / tile group, brick, slice, or CTU within the current picture is divided into multiple coding units, etc. Efficiency can be improved by allowing such information to be obtained (transmitted) only under certain conditions.

[0073] The slice header (slice header syntax) can include information / parameters commonly applicable to the slices. The APS (APS syntax) or PPS (PPS syntax) can include information / parameters commonly applicable to one or more pictures. The SPS (SPS syntax) can include information / parameters commonly applicable to one or more sequences. The VPS (VPS syntax) can include information / parameters commonly applicable to multiple layers. The DPS (DPS syntax) can include information / parameters commonly applicable to video in general. The DPS can include information / parameters related to concatenation of a coded video sequence (CVS).

[0074] In this document, the higher level syntax may include at least one of the APS syntax, PPS syntax, SPS syntax, VPS syntax, DPS syntax, and slice header syntax.

[0075] Also, for example, information regarding the division and configuration of the tiles / tile groups / bricks / slice can be configured at the encoding end through the higher level syntax and transmitted to the decoding device in the form of a bitstream.

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

[0077] In this document, quantized transform coefficients and transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, residual information may include information about the transform coefficient(s), and the information about the transform coefficient(s) may be signaled via residual coding syntax. Transform coefficients may be derived based on the residual information (or information about the transform coefficient(s), and scaled transform coefficients may be derived through an inverse transform (scaling) of the transform coefficients. Residual samples may be derived based on an inverse transform (transform) of the scaled transform coefficients. This may be similarly applied / expressed in other parts of this document.

[0078] As described above, the encoding apparatus may perform various encoding methods, such as Exponential Golomb coding, Context-Adaptive Variable Length Coding (CAVLC), Context-Adaptive Binary Arithmetic Coding (CABAC), etc. Also, the decoding apparatus may decode information in a bitstream based on a coding method, such as Exponential Golomb coding, CAVLC, or CABAC, and output values ​​of syntax elements required for image restoration and quantized values ​​of transform coefficients related to residuals. For example, the above-described coding methods may be performed as described below.

[0079] FIG. 4 exemplarily illustrates Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements.

[0080] The CABAC encoding process may include a process of converting an input signal into a binary value through binarization if the input signal is a syntax element that is not a binary value. If the input signal is already a binary value (i.e., the value of the input signal is a binary value), the input signal may be bypassed without being binarized. Here, each binary digit 0 or 1 constituting the binary value may be referred to as a bin. For example, if the binary string after binarization is 110, each of 1, 1, and 0 is referred to as a bin. The bin(s) for one syntax element may indicate the value of the syntax element.

[0081] The binarized bins of the syntax elements can be input to a regular coding engine or a bypass coding engine. The regular coding engine can assign a context model reflecting a probability value to the corresponding bin and code the corresponding bin based on the assigned context model. The regular coding engine can update the context model for the corresponding bin after performing coding for each bin. As described above, the coded bins can be called context-coded bins.

[0082] Meanwhile, when the binarized bin of the syntax element is input to a bypass encoding engine, it can be coded as follows. For example, the bypass encoding engine of the encoding device omits the steps of estimating the probability for the input bin and updating the probability model applied to the bin after encoding. When bypass encoding is applied, the encoding device can encode the input bin by applying a uniform probability distribution instead of assigning a context model, thereby improving the encoding speed. As described above, the bin to be encoded can be called a bypass bin.

[0083] Entropy decoding performs the same process as the entropy encoding described above in reverse order. For example, when a syntax element is decoded based on a context model, a decoding device may receive a bin corresponding to the syntax element through a bitstream. Then, a context model may be determined using the syntax element and decoding information of the block to be decoded or a neighboring block, or information on a symbol / bin decoded in a previous step. The value of the syntax element may be derived by predicting the occurrence probability of the received bin based on the determined context model and performing arithmetic decoding of the bin. Then, the context model of the bin to be decoded next may be updated using the determined context model.

[0084] For example, when a syntax element is bypass decoded, a decoding device may receive a bin corresponding to the syntax element through a bitstream and decode the input bin by applying a uniform probability distribution. In this case, the steps of deriving a context model for the syntax element and updating the context model applied to the bin after decoding may be omitted.

[0085] Residual samples may be derived as quantized transform coefficients through a transform and quantization process. Quantized transform coefficients may also be referred to as transform coefficients. In this case, transform coefficients within a block may be signaled in the form of residual information. The residual information may include a residual coding syntax. That is, an encoding device may construct a residual coding syntax based on the residual information, encode the generated residual coding syntax, and output it in the form of a bitstream. A decoding device may decode the residual coding syntax obtained from the bitstream to derive residual (quantized) transform coefficients. The residual coding syntax may include syntax elements indicating whether a transform has been applied to the corresponding block, the location of the last significant transform coefficient within the block, whether significant transform coefficients exist within a sub-block, and the magnitude / sign of the significant transform coefficients, as described below.

[0086] For example, (quantized) transform coefficients may be encoded and / or decoded based on syntax elements such as 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) coding or (transform) coefficient coding. Syntax elements related to encoding / decoding of residual data may be shown in Table 1 or Table 2 below.

[0087] [Table 1-1]

[0088] Table 1-2

[0089] Table 1-3

[0090] Table 1-4

[0091] Table 1-5

[0092] Table 1-6

[0093] Table 1-7

[0094] Table 2-1

[0095] Table 2-2

[0096] Table 2-3

[0097] Table 2-4

[0098] Table 2-5

[0099] Table 2-6

[0100] Table 2-7

[0101] Table 2-8

[0102] In Tables 1 and 2, transform_skip_flag indicates whether transform is skipped for an associated block. The transform_skip_flag is a syntax element for a transform skip flag. The associated block is a coding block (CB) or a transform block (TB). CB and TB may be used interchangeably in the transform (and quantization) and residual coding procedures. For example, residual samples may be derived for the CB, and (quantized) transform coefficients may be derived through transform and quantization of the residual samples. Information (e.g., syntax elements) efficiently indicating the position, magnitude, sign, etc. of the (quantized) transform coefficients may be generated and signaled through the residual coding procedure. Quantized transform coefficients may be simply referred to as transform coefficients. Generally, if the CB is not larger than the maximum TB, the size of the CB is the same as the size of the TB. In this case, the target block to be transformed (and quantized) and residual coded may be referred to as a CB or a TB. On the other hand, if CB is greater than the maximum TB, the target block to be transformed (and quantized) and residually coded may be referred to as a TB. Hereinafter, it will be described that syntax elements related to residual coding are signaled in units of transform blocks (TBs), but this is merely an example, and as mentioned above, the TB may be used interchangeably with the CB.

[0103] The syntax for residual coding according to the transform omission flag is shown in Table 3 or Table 4.

[0104] [Table 3-1]

[0105] [Table 3-2]

[0106] Table 3-3

[0107] Table 3-4

[0108] Table 4-1

[0109] Table 4-2

[0110] Table 4-3

[0111] Table 4-4

[0112] Table 4-5

[0113] According to this embodiment, residual coding may be branched depending on the value of the transform skip flag, transform_skip_flag. That is, different syntax elements may be used for residual coding depending on the value of the transform skip flag (depending on whether transform skipping is possible). Residual coding used when transform skipping is not applied (i.e., when a transform is applied) may be referred to as regular residual coding (RRC), and residual coding used when transform skipping is not applied (i.e., when a transform is not applied) may be referred to as transform skip residual coding (TSRC). The regular residual coding may also be referred to as general residual coding. The regular residual coding may also be referred to as a regular residual coding syntax structure, and the transform skipped residual coding may also be referred to as a transform skipped residual coding syntax structure. Tables 1 and 2 may show the syntax elements of residual coding when the value of transform_skip_flag is 0, i.e., when a transform is applied, and Tables 3 and 4 may show the syntax elements of residual coding when the value of transform_skip_flag is 1, i.e., when a transform is not applied.

[0114] Specifically, for example, a transform skip flag indicating whether a transform of a transform block is skipped may be parsed, and it may be determined whether the transform skip flag is 1. If the value of the transform skip flag is 0, 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 residual coefficients of the transform block may be parsed, as shown in Table 1 or Table 2, and the residual coefficients 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. Furthermore, the abs_level_gtx_flag can indicate abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n][0] is an example of the first transform coefficient level flag (abs_level_gt1_flag), and abs_level_gtx_flag[n][1] is an example of the second transform coefficient level flag (abs_level_gt3_flag).

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

[0116] Next, the encoding device divides the transform block into 4x4 sub-blocks, and then can indicate whether there are any non-zero coefficients in the current sub-block using a 1-bit syntax element coded_sub_block_flag for each 4x4 sub-block.

[0117] If the value of coded_sub_block_flag is 0, there is no more information to transmit, and the encoding apparatus can terminate the encoding process for the current sub-block. On the other hand, if the value of coded_sub_block_flag is 1, the encoding apparatus can continue to perform the encoding process for sig_coeff_flag. Since the sub-block containing the last non-zero coefficient does not need to be coded for coded_sub_block_flag, and since the sub-block containing DC information of the transform block is likely to contain non-zero coefficients, coded_sub_block_flag can be assumed to be 1 without being coded.

[0118] If the value of coded_sub_block_flag is 1 and it is determined that a non-zero coefficient exists in the current sub-block, the encoding apparatus may encode sig_coeff_flag having a binary value in the reverse scanned order. The encoding apparatus may encode a 1-bit syntax element sig_coeff_flag for each transform coefficient in the scan order. If the value of the transform coefficient at the current scan position is non-zero, the value of sig_coeff_flag may be 1. Here, in the case of a sub-block including the last non-zero coefficient, sig_coeff_flag does not need to be encoded for the last non-zero coefficient, so the encoding process for the sub-block may be omitted. Level information encoding may be performed only if 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 a corresponding transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero. In one embodiment, the sig_coeff_flag may correspond to an example of a syntax element of a significance coefficient flag indicating whether a quantized transform coefficient is a significance coefficient that is not zero.

[0119] The remaining level value after encoding for sig_coeff_flag can be derived as follows: That is, the syntax element remAbsLevel indicating the level value to be encoded can be derived as follows:

[0120]

number

[0121] Here, coeff[n] denotes the actual transform coefficient value.

[0122] Furthermore, abs_level_gtx_flag[n][0] may indicate whether remAbsLevel[n] at a 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 is 1. Furthermore, if the value of abs_level_gtx_flag[n][0] is 1, the remAbsLevel[n] indicating the level value to be coded thereafter may be updated as follows:

[0123]

number

[0124] In addition, the least significant coefficient (LSB) value of remAbsLevel[n] described in Equation 2 above can be encoded via par_level_flag as shown in Equation 3 below.

[0125]

number

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

[0127] The transform coefficient level value remAbsLevel[n] to be encoded after encoding par_level_flag[n] can be updated as follows:

[0128]

number

[0129] abs_level_gtx_flag[n][1] indicates whether the remAbsLevel at the corresponding scanning position (n) is greater than 3. Encoding for abs_remainder[n] can be performed only if abs_level_gtx_flag[n][1] is 1. The relationship between the actual transform coefficient value coeff and each syntax element is as follows:

[0130]

number

[0131] Also, the following Table 5 shows examples related to the above-mentioned Equation 5.

[0132] [Table 5]

[0133] Here, |coeff[n]| indicates the level (value) of a transform coefficient and may be expressed as AbsLevel for the transform coefficient. Also, the sign of each coefficient may be encoded using coeff_sign_flag, which is a 1-bit symbol.

[0134] As another example, if the value of the transform skip flag is 1, syntax elements sb_coded_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag, par_level_flag, and / or abs_remainder for residual coefficients of a transform block may be parsed, and the residual coefficients may be derived based on the syntax elements, as shown in Table 3 or Table 4. In this case, the syntax elements may be parsed sequentially, or the parsing order may be changed. Also, the abs_level_gtx_flag may indicate abs_level_gt1_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and / or abs_level_gt9_flag. For example, abs_level_gtx_flag[n][j] is a flag indicating whether the absolute value or level (value) of the transform coefficient at scanning position n is greater than (j<<1)+1, where (j<<1)+1 may be replaced with a predetermined threshold such as a first threshold or a second threshold, depending on the case.

[0135] On the other hand, CABAC provides high performance but has the drawback of poor throughput. This is due to the regular encoding engine of CABAC. Regular encoding (i.e., encoding via the regular encoding engine of CABAC) uses probability states and ranges updated through previous bin encoding, resulting in high data dependency and the need to read probability intervals and determine the current state. The throughput issue of CABAC can be resolved by limiting the number of context-coded bins. For example, as shown in Table 5 above, the sum of bins used to represent sig_coeff_flag[n], abs_level_gtx_flag[n][0], par_level_flag[n], and abs_level_gtx_flag[n][1] may be limited to 1.75 per pixel in a transform block depending on the size of the transform block. In this case, once the encoding device has used all of the limited number of context-coded bins to encode the context elements, it can perform bypass coding by binarizing the remaining coefficients using a binarization method described below without using context coding. That is, if the number of coded context coding bins in a TU is TU width * TU height * 1.75, sig_coeff_flag[n], abs_level_gtx_flag[n][0], par_level_flag[n], abs_level_gtx_flag[n][1] coded to the context coding bins further cannot be coded, and the |coeff[n]| value can be immediately coded to dec_abs_level[n] as shown in Table 6 below.

[0136] [Table 6]

[0137] In this case, the sign of each coefficient can be coded using a 1-bit symbol, coeff_sign_flag[n].

[0138] FIG. 5 shows an exemplary diagram of transform coefficients in a 4×4 block.

[0139] The 4x4 block in Figure 5 shows an example of quantized coefficients. The block shown in Figure 5 is a 4x4 transform block, or a 4x4 sub-block of an 8x8, 16x16, 32x32, or 64x64 transform block. The 4x4 block in Figure 5 may represent a luma block or a chroma block. However, this is merely an example, and large block sizes (up to 64x64) are possible in this embodiment, which is primarily useful for high-resolution video (e.g., 1080p and 4K sequences). High-frequency transform coefficients may be zeroed for transform blocks with a size (width or height, or both width and height) of 64, and only low-frequency coefficients may be retained. For example, for an MxN transform block, where M is the block width and N is the block height, only the left 32 columns of transform coefficients may be retained when M is 64. Alternatively, only the top 32 rows of transform coefficients may be retained when N is 64.

[0140] When the transform skipping mode is used for a large-sized block, the entire block can be used without zeroing for any value. Since the SPS supports a configurable maximum transform size, the encoding device can adaptively select a transform size of up to 16, 32, or 64 lengths depending on the needs of a specific implementation. Specifically, the binarization of the last non-zero coefficient position coding is coded based on the reduced TU size, and the context model selection for the last non-zero coefficient position coding can be determined originally by the TU size.

[0141] Figure 5 shows an example of an encoding result for coefficients scanned in reverse diagonal line. In Figure 5, n (0 to 15) indicates the position of a coefficient scanned in reverse diagonal line. When n is 15, it indicates the coefficient in the lower right corner, which is scanned first in a 4x4 block, and when n is 0, it indicates the coefficient in the upper left corner, which is scanned last.

[0142] Meanwhile, as described above, when an input signal is a syntax element that is not a binary value, the encoding device can convert the input signal into a binary value by binarizing the value of the input signal. Furthermore, the decoding device can decode the syntax element to derive a binarized value (i.e., a binarized bin) of the syntax element, and can debinarize the binarized value to derive the value of the syntax element. The binarization process can be performed using a truncated rice (TR) binarization process, a k-th order Exp-Golomb (EGk) binarization process, a limited k-th order Exp-Golomb (Limited EGk), a fixed-length (FL) binarization process, or the like, which will be described later. In addition, the inverse binarization process may refer to a process that is performed based on the TR binarization process, the EGk binarization process, the Limetid EGK binarization process, or the FL binarization process to derive the value of the syntax element.

[0143] For example, the TR binarization process can be performed as follows:

[0144] The input of the TR binarization process is the TR binarization request and the syntax elements cMax and cRiceParam, and the output of the TR binarization process is the TR binarization of the value symbolVal corresponding to the bin string.

[0145] For example, if a suffix bin string exists for a syntax element, the TR bin string for the syntax element is the concatenation of a prefix bin string and a suffix bin string, and if the suffix bin string does not exist, the TR bin string for the syntax element is the prefix bin string. For example, the prefix bin string can be derived as follows:

[0146] The prefix value of the symbolVal can be derived as follows:

[0147]

number

[0148] Here, prefixVal may represent a prefix value of symbolVal. The prefix of the TR bin string (i.e., prefix bin string) may be derived as follows:

[0149] For example, if prefixVal is smaller than cMax>>cRiceParam, the prefix bin string is a bit string of length prefixVal+1 indexed by binIdx. That is, if prefixVal is smaller than cMax>>cRiceParam, the prefix bin string is a bit string of prefixVal+1 bits indicated by binIdx. The bin for binIdx smaller than prefixVal is 1. The bin for binIdx equal to prefixVal is 0.

[0150] For example, the bin string derived by unary binarization of prefixVal is as shown in Table 7 below.

[0151] [Table 7]

[0152] On the other hand, if the prefixVal is not less than cMax>>cRiceParam, the prefix bin string is a bit string whose length is cMax>>cRiceParam and whose bins are all 1's.

[0153] Also, a suffix bin string of the TR bin string can exist if cMax is greater than symbolVal and cRiceParam is greater than 0. For example, the prefix bin string can be derived as follows:

[0154] The suffix value of the symbolVal for the syntax element can be derived as follows:

[0155]

number

[0156] Here, suffixVal can indicate the suffix value of the symbolVal.

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

[0158] When the value of the input parameter cRiceParam is 0, the TR binarization is exactly a truncated unary binarization and it is always invoked with a cMax value equal to the largest possible value of the syntax element being decoded. (For the input parameter cRiceParam=0,the TR binarization is exactly a truncated unary binarization and it is always invoked with a cMax value equal to the largest possible value of the syntax element being decoded.)

[0159] On the other hand, the EGk binary process can be executed as follows.

[0160] The input of the EGk binary process is a request for EGk binarization. Also, the output of the EGk binary process is the EGk binarization for the value symbolVal corresponding to the bin string.

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

[0162] [Table 8]

[0163] Referring to Table 8, a binary value X can be added to the end of the bin string via each call of put(X), where X is either 0 or 1.

[0164] Also, the Limited EGk binarization process can be performed as follows.

[0165] The input of the Limited EGk binarization process is the request for Limited EGk binarization and the Rice parameter riceParam, and the output of the Limited EGk binarization process is the Limited EGk binarization for the value symbolVal associated with the corresponding bin string.

[0166] The bin string of the Limited EGk binarization process for symbolVal can be derived as follows:

[0167] [Table 9]

[0168] Referring to Table 9, a binary value X can be added to the end of the bin string via each call of put(X), where X is either 0 or 1.

[0169] The variables log2TransformRange and maxPrefixExtensionLength can be derived as follows:

[0170]

number

[0171] The FL binarization process can also be performed as follows:

[0172] The input of the FL binarization process is the request for FL binarization and cMax for the syntax element, and the output of the FL binarization process is the FL binarization for the value symbolVal corresponding to the bin string.

[0173] The FL binarization can be performed using a bin string having a fixed length of the number of bits of the symbol value symbolVal, where the fixed length can be derived as follows:

[0174]

number

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

[0176] The bin indexing for FL binarization is a scheme using values ​​that increase in order from the most significant bit to the least significant bit, for example, the bin index associated with the most significant bit is binIdx=0.

[0177] Meanwhile, the binarization process for the syntax element abs_remainder[n] of the residual information can be performed as follows.

[0178] The inputs of the binarization process for the abs_remainder[n] are a binarization request for the syntax element abs_remainder[n], a color component index cIdx, a luma position (x0, y0) indicating the upper-left sample of the current luma transform block relative to the upper-left luma sample of the picture, a current coefficient scan position (xC, yC), a binary logarithm of the transform block width longTbWidth, and a binary logarithm of the transform block height log2TbHeight. The output of the binarization process for the abs_remainder is the binarization of the abs_remainder (i.e., a binarized bin string of the abs_remainder). An available bin string for the abs_remainder can be derived through the binarization process.

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

[0180] cMax for the currently coded abs_remainder[n] can be derived based on the Rice parameter cRiceParam. For example, cMax can be derived as follows:

[0181]

number

[0182] Meanwhile, the binarization for the syntax element abs_remainder[n], i.e., the bin string for the abs_remainder[n] is the concatenation of the prefix bin string and the suffix bin string if the suffix bin string exists. If the suffix bin string does not exist, the bin string for the abs_remainder[n] is the prefix bin string.

[0183] For example, the prefix bin string for abs_remainder[n] can be derived as follows:

[0184] The prefix value prefixVal of the abs_remainder[n] can be derived as follows:

[0185]

number

[0186] The prefix bin string of the abs_remainder[n] can be derived via a TR binarization process on the prefixVal using cMax and the cRiceParam as inputs.

[0187] If the prefix bin string is the same as a bit string with all bits set to 1 and a bit length of 6, then there can be a suffix bin string for abs_remainder[n], which can be derived as follows:

[0188] The suffix value suffixVal of the abs_remainder[n] can be derived as follows:

[0189]

number

[0190] The suffix bin string of the abs_remainder[n] can be derived via a Limited EGk binarization process for the binarization of the suffixVal using cRiceParam+1 and cRiceParam as inputs.

[0191] The Rice parameter for abs_remainder[n] can be derived by the following process.

[0192] The inputs of the Rice parameter derivation process are a base level (baseLevel), a color component index (cIdx), a luma position (x0, y0), a current coefficient scan position (xC, yC), a binary logarithm of the width of the transform block (log2TbWidth), and a binary logarithm of the height of the transform block (log2TbHeight). The luma position (x0, y0) may indicate the top-left sample of the current luma transform block relative to the top-left luma sample of the picture. The output of the Rice parameter derivation process is the Rice parameter cRiceParam.

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

[0194] [Table 10]

[0195] In Table 10, if baseLevel is 0, the variable s is set to 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 below. 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.

[0196] [Table 11]

[0197] Meanwhile, the binarization process for the syntax element dec_abs_level of the residual information can be performed as follows.

[0198] Inputs to the binarization process for the dec_abs_level include a binarization request for the syntax element dec_abs_level[n], a color component index cIdx, a luma position (x0, y0), a current coefficient scan position (xC, yC), a binary logarithm of the transform block width log2TbWidth, and a binary logarithm of the transform block height log2TbHeight. The luma position (x0, y0) may indicate the top-left sample of the current luma transform block relative to the top-left luma sample of the picture.

[0199] The output of the binarization process for the dec_abs_level is the binarization of the dec_abs_level (i.e., the binarized bin string of the dec_abs_level). Through the binarization process, an available bin string for the dec_abs_level can be derived.

[0200] The Rice parameter cRiceParam for the dec_abs_level[n] can be derived through a Rice parameter derivation process that is performed using the hue component index cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth, which is the binary logarithm of the width of the transform block, and log2TbHeight, which is the binary logarithm of the height of the transform block. A detailed description of the Rice parameter derivation process will be given later.

[0201] Also, for example, cMax for the dec_abs_level[n] can be derived based on the Rice parameter cRiceParam. The cMax can be derived as shown in Equation 10.

[0202] Meanwhile, the binarization for the dec_abs_level[n], i.e., the bin string for the dec_abs_level[n], is the concatenation of the prefix bin string and the suffix bin string if a suffix bin string exists, and if the suffix bin string does not exist, the bin string for the dec_abs_level[n] is the prefix bin string.

[0203] For example, the prefix bin string can be derived as follows:

[0204] The prefix value prefixVal of the dec_abs_level[n] can be derived as follows:

[0205]

number

[0206] The dec_abs_level[n] prefix bin string can be derived via a TR binarization process on the prefixVal using cMax and cRiceParam as inputs.

[0207] If the prefix bin string is the same as a bit string with all bits set to 1 and a bit length of 6, then there can be a suffix bin string of the dec_abs_level[n], which can be derived as follows:

[0208] The suffix value suffixVal of the dec_abs_level[n] can be derived as follows:

[0209]

number

[0210] The suffix bin string of dec_abs_level[n] can be derived via a Limited EGk binarization process for the binarization of suffixVal, where the exp-Golomb order k is set to cRiceParam+1.

[0211] The Rice parameters for dec_abs_level[n] can be derived by the pseudo code in Table 10.

[0212] Meanwhile, the above-described Regular Residual Coding (RRC) and Transform Skip Residual Coding (TSRC) may have the following differences.

[0213] For example, the Rice parameter cRiceParam of the syntax element abs_remainder[] in regular residual coding can be derived as described above, but the Rice parameter cRiceParam of the syntax element abs_remainder[] in transform skipped residual coding can be derived to 1. That is, for example, if transform skip is applied to a current block (e.g., current TB), the Rice parameter cRiceParam for abs_remainder[] in transform skipped residual coding for the current block can be derived to 1.

[0214] Also, referring to Tables 1 to 4, in regular residual coding, abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1] can be signaled, while in transform-less 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. Here, the abs_level_gtx_flag[n][0] can be indicated as abs_level_gt1_flag or the first coefficient level flag, the abs_level_gtx_flag[n][1] can be indicated as abs_level_gt3_flag or the second coefficient level flag, the abs_level_gtx_flag[n][2] can be indicated as abs_level_gt5_flag or the third coefficient level flag, the abs_level_gtx_flag[n][3] can be indicated as abs_level_gt7_flag or the fourth coefficient level flag, and the abs_level_gtx_flag[n][4] can be indicated as abs_level_gt9_flag or the fifth coefficient level flag. Specifically, the first coefficient level flag is a flag indicating whether the coefficient level is greater than a first threshold (e.g., 1), the second coefficient level flag is a flag indicating whether the coefficient level is greater than a second threshold (e.g., 3), the third coefficient level flag is a flag indicating whether the coefficient level is greater than a third threshold (e.g., 5), the fourth coefficient level flag is a flag indicating whether the coefficient level is greater than a fourth threshold (e.g., 7), and the fifth coefficient level flag is a flag indicating whether the coefficient level is greater than a fifth threshold (e.g., 9).

[0215] As described above, transform-omitted residual coding can 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], compared to regular residual coding.

[0216] Also, for example, in regular residual coding, the syntax element coeff_sign_flag can be bypass coded, but in transform-omitted residual coding, the syntax element coeff_sign_flag can be bypass coded or context coded.

[0217] The following description is made to explain a specific example of this document. The names of specific devices and specific signals / information are presented for illustrative purposes only, and the technical features of this specification are not limited to the names used in the following description.

[0218] The following describes a method for efficiently deriving Rice parameters for binarization of information indicating the level value (or absolute value) of a transform coefficient in level coding (e.g., syntax element dec_abs_level indicating the level value of a transform coefficient, syntax element abs_remainder indicating the residual level value of a transform coefficient, etc.).

[0219] The Rice parameters are variables used to binarize the level values ​​of the transform coefficients, and when residual data coding for a transform block (regular residual coding) is applied to the current block, a Rice parameter look-up table such as that shown in Table 12 below is used, and when residual data coding for a transform-omitted block (transform-omitted residual coding) is applied to the current block, a Rice parameter look-up table such as that shown in Table 13 below is used. Here, the Rice parameter look-up table may be called a table related to Rice parameters or a table used to determine Rice parameters, or may be called a table related to Rice parameter candidates.

[0220] [Table 12]

[0221] [Table 13]

[0222] In Tables 12 and 13, locSumAbs is a value derived based on the sum of the level values ​​(l) of the surrounding transform coefficients (l) of the current transform coefficient, and can be derived, for example, by the pseudocode in Table 10.

[0223] In the step of binarizing the level values, the smaller the value of the Rice parameter cRiceParam, the shorter the codewords assigned to the smaller level values ​​to generate codewords that are advantageous for binarizing the smaller level values, and the larger the value of the Rice parameter, the shorter the codewords assigned to the larger level values ​​to generate codewords that are advantageous for binarizing the larger level values.

[0224] However, depending on the characteristics of the image and / or the presence / absence / type of syntax coded prior to the level values ​​of the transform coefficients, the level values ​​that are generated on average or frequently generated by level coding may differ. Also, in a high bit-rate environment where lossless (or near lossless) coding or coding is performed with a low quantization parameter, level values ​​with different characteristics may be mixed. In such a case, it is more efficient to use multiple Rice parameter lookup tables rather than one Rice parameter lookup table to derive Rice parameters.

[0225] Therefore, according to one embodiment, two or more Rice parameter lookup tables may be used when residual data coding for a transform block (regular residual coding) is applied to the current block and when residual data coding for a transform-omitted block (transform-omitted residual coding) is applied to the current block, respectively. Alternatively, two or more Rice parameter lookup tables may be used regardless of whether regular residual coding or transform-omitted residual coding is applied to the current block.

[0226] In this case, for example, the encoding apparatus may derive the Rice parameters by selecting at least one table from a plurality of Rice parameter lookup tables based on the configuration (presence or absence, type, etc.) of syntax elements coded prior to syntax elements (e.g., dec_abs_level, abs_remainder, etc.) indicating level values ​​of transform coefficients. Alternatively, the encoding apparatus may derive the Rice parameters by selecting at least one table from a plurality of Rice parameter lookup tables based on whether the number of context coded bins coded / decoded in residual data coding exceeds the maximum number of available context coded bins set by a context coding bin constraint algorithm.

[0227] Here, the plurality of Rice parameter lookup tables may have different minimum and maximum Rice parameter values, and update positions of the Rice parameter values ​​may differ from one another. Furthermore, the syntax element coded preceding the syntax element indicating 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. The maximum number of available context coding bins set by the context coding bin constraint algorithm may correspond to remBinsPass1 in Table 1 or 2 in the case of residual coding for a transform block, and may correspond to MaxCcbs in Table 3 in the case of residual coding for a transform-omitted block.

[0228] As an example, if there are two Rice parameter lookup tables, the first Rice parameter lookup table "A" may have m as the minimum value of the Rice parameter. A and n as the maximum value of the Rice parameter AThe second Rice parameter lookup table "B" may have m as the minimum value of the Rice parameter. B and n as the maximum value of the Rice parameter B In order to improve the performance of level coding, B is m A can be set to a larger value, n B is n A 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.

[0229] [Table 14]

[0230] [Table 15]

[0231] In Table 14, the minimum and maximum values ​​of the rice parameters are 0 and 2, respectively, and in Table 15, the minimum and maximum values ​​of the rice parameters are 1 and 3, respectively. That is, the rice parameter lookup table of Table 15 has larger minimum and maximum values ​​than the rice parameter lookup table of Table 14. Also, in Table 14, the rice parameter values ​​are updated when the locSumAbs values ​​are 12 and 24, and in Table 15, the rice parameter values ​​are updated when the locSumAbs values ​​are 7 and 18. That is, the rice parameter lookup tables of Table 14 and Table 15 have different update positions for the rice parameter values.

[0232] Therefore, the Rice parameter lookup table of Table 15 may have advantages over the Rice parameter lookup table of Table 14 when relatively large level values ​​occur frequently or when the average level values ​​or coefficients of the lower block being coded are large.

[0233] The Rice parameter lookup tables of Tables 14 and 15 are merely examples of various Rice parameter lookup tables that can be used in this embodiment, and when applying this embodiment, the Rice parameter lookup tables are not limited to these, and tables having different Rice parameter minimum values, maximum values, and update positions can be used.

[0234] Meanwhile, the encoding apparatus may signal a syntax element (or flag) for transmitting information about a Rice parameter lookup table to be used for a current transform coefficient among a plurality of Rice parameter lookup tables. The syntax element may be signaled in units of coefficient groups (CGs), or in units of transform blocks or transform truncated (coding) blocks. For example, when two Rice parameter lookup tables are used, a value of 0 in the syntax element may indicate the first Rice parameter lookup table, and a value of 1 in the syntax element may indicate the second Rice parameter lookup table. The syntax element may be binarized using one of various methods, such as fixed length binarization or truncated unary binarization.

[0235] When a syntax element (or flag) indicating information about a Rice parameter lookup table is obtained from a bitstream, the decoding device can select the Rice parameter lookup table indicated by the syntax element from among multiple Rice parameter lookup tables, and derive Rice parameters for the current transform coefficient based on the selected Rice parameter lookup table.

[0236] Alternatively, the decoding apparatus may infer or derive the Rice parameter lookup table to be used for level coding 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 such as the configuration (presence or absence, type, etc.) of syntax elements coded preceding the syntax element indicating the level value of the current transform coefficient (e.g., dec_abs_level, abs_remainder, etc.), whether the number of context coding bins coded / decoded in residual data coding exceeds the maximum number of available context coding bins set in the context coding bin constraint algorithm, whether lossless or near lossless coding is performed, quantization coefficient information, etc. In this case, a syntax element or flag indicating information about the Rice parameter lookup table used for the current transform coefficient is not signaled.

[0237] For example, whether the number of context coding bins coded / decoded in residual data coding exceeds the maximum available number of context coding bins (remBinsPass1 or MaxCcbs) set in the context coding bin constraint algorithm may be used to select a Rice parameter lookup table. In this case, if the number of context coding bins coded / decoded in residual data coding exceeds the maximum available number of context coding bins, a simplified syntax structure different from the syntax structure used in existing residual coding may be used.

[0238] For example, in residual data coding for a transform block, (i) if the number of coded / decoded context coding bins does not exceed remBinsPass1, sig_coeff_flag, abs_level_gtx_flag[0], par_level_flag, and abs_level_gtx_flag[1] are coded prior to abs_remainder, which indicates the residual level value of the transform coefficient. However, (ii) if the number of coded / decoded context coding bins exceeds remBinsPass1, there is no syntax element coded / decoded prior to coding of the syntax element (dec_abs_level) for the level value of the transform coefficient. Therefore, in case (ii), there is no syntax element coded / decoded prior to level value coding, resulting in a larger average level value than in case (i). Therefore, in the case of (i), a Rice parameter lookup table that generates code words favorable to small level values ​​can be assigned as shown in Table 14, and in the case of (ii), a Rice parameter lookup table that generates code words favorable to large level values ​​can be assigned as shown in Table 15. In this way, when the remBinsPass1 value, which is already given information, is used to determine the Rice parameter lookup table, there is an advantage that it is not necessary to encode / decode additional flags or syntax elements to know the table information.

[0239] As another example, if the number of context coding bins coded / decoded in residual data coding for the transform-less mode exceeds MaxCcbs, the configuration of the existing syntax can be simplified. Some syntax elements among 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], which are coded / decoded in the existing transform-less residual data coding, are omitted and not coded / decoded for the purpose of reducing coding performance or complexity. In this case, too, since the average level value differs depending on the existing syntax configuration and the simplified syntax configuration, determining the Rice parameter look-up table using MaxCcbs information and / or coefficient position information can provide better coding performance. In this way, using the already given information MaxCcbs and coefficient position information to determine the Rice parameter lookup table has the advantage that no additional flags or syntax coding / decoding is required to know the table information.

[0240] As another example, the Rice parameter lookup table can be determined without encoding / decoding additional flags or syntax depending on whether lossless or near-lossless encoding is performed. Lossless or near-lossless encoding can be performed in units of pictures, slices, CU blocks, or TU blocks, and generally has a larger level value of residual data than lossy encoding. Therefore, the decoding device can use whether the current picture, slice, CU block, or TU block is losslessly or near-losslessly encoded to determine the Rice parameter lookup table, and in this case, encoding / decoding additional flags or syntax is also unnecessary. For example, if lossless or near-lossless encoding is not performed, the decoding device can derive the Rice parameters using a Rice parameter lookup table having relatively small minimum / maximum values ​​of the Rice parameter as shown in Table 14. If lossless or near-lossless encoding is performed, the decoding device can derive the Rice parameters using a Rice parameter lookup table having relatively large minimum / maximum values ​​of the Rice parameter as shown in Table 15.

[0241] As another example, when block-based variable quantization is used, a Rice parameter lookup table may be selected using quantization coefficient information. Generally, large level values ​​occur frequently when a low quantization coefficient is used, and small level values ​​occur frequently when a high quantization coefficient is used. The same applies to average level values. Therefore, as an example, when the value of the quantization coefficient is equal to or greater than a threshold, the decoding apparatus may derive the Rice parameter using a Rice parameter lookup table having relatively small minimum / maximum values ​​of the Rice parameter as shown in Table 14, and when the value of the quantization coefficient is smaller than the threshold, the decoding apparatus may derive the Rice parameter using a Rice parameter lookup table having relatively large minimum / maximum values ​​of the Rice parameter as shown in Table 15.

[0242] Meanwhile, in another embodiment, a method can be used in which one Rice parameter lookup table is used for level coding to achieve the same effect as using multiple Rice parameter lookup tables. For example, the encoding and decoding devices can determine the index of the Rice parameter lookup table based on whether certain conditions are met. Here, whether the certain conditions are met can be determined based on the structure of the syntax (presence or absence, type, etc.) coded preceding the syntax element indicating the level value of the transform coefficient, whether the number of context coding bins coded / decoded in residual data coding exceeds the maximum number of usable context coding bins set in the context coding bin constraint algorithm, whether lossless or adjacent lossless coding is applied, whether the sum (locSumAbs) of the level values ​​(i.e., of the neighboring coefficients) of the current transform coefficient is greater than a threshold value or the table size (maximum value of locSumAbs in the Rice parameter lookup table), etc. The above-described certain conditions can also be applied to embodiments using multiple Rice parameter lookup tables. That is, whether the above-mentioned specific conditions are satisfied can be used to select one Rice parameter lookup table from among a number of Rice parameter lookup tables to derive Rice parameters for the transform coefficients.

[0243] In an embodiment using a single Rice parameter lookup table to derive Rice parameters for transform coefficients, the value of the Rice parameter can be determined, for example, as follows if the specified conditions are met:

[0244]

number

[0245]

number

[0246] Here, RiceParamTable refers to a rice parameter lookup table, and index indicates an index value of the rice parameter lookup table. For example, the index value may be determined based on locSumAbs derived by the pseudocode in Table 10. Alternatively, the index value may be determined based on an index selection method set in the standard.

[0247] Referring to Equations 15 and 16, if the specific condition is not met, the encoding and decoding devices can derive a Rice parameter value by reading a Rice parameter corresponding to an index value in a Rice parameter lookup table that is set as the default. If the specific condition is met, a shift and / or offset can be used. Here, the shift and / or offset can have 0, a positive value, or a negative value. If the shift is a positive number, a Rice parameter value greater than the Rice parameter selected by the index in the Rice parameter lookup table can be derived. If the shift is a negative number, a Rice parameter value less than the Rice parameter selected by the index in the Rice parameter lookup table can be derived.

[0248] For example, in this embodiment, a Rice parameter lookup table such as the following Table 16 can be used.

[0249] [Table 16]

[0250] Referring to Table 16, if the specific condition is not met and the index is 3, the Rice parameter value is 0. If the specific condition is met and the index is 3 and the shift is 1 (offset is 0), the Rice parameter value is 1 even though the index is 3.

[0251] On the other hand, if the offset is a positive number, a Rice parameter value greater than the maximum Rice parameter value of the Rice parameter lookup table can be derived.

[0252] For example, when the Rice parameter lookup table of Table 16 is used, if the index is 31 and the specific condition is met, a Rice parameter value of 3 is derived. If the specific condition is met and the offset is 2 (the shift is 0), a Rice parameter value of 5 is derived even though the index is 31. That is, when an offset is used, a Rice parameter value higher than the maximum Rice parameter value defined in the Rice parameter lookup table can be derived. Therefore, although only Rice parameters of order 0 to 3 can be derived using the Rice parameter lookup table of Table 16, the usable range of Rice parameters can be expanded to order 0 to 5 when an offset is used.

[0253] In this way, it is possible to efficiently binarize up to high level values ​​through the maximum Rice parameter extension. Therefore, this embodiment can have coding advantages not only in a general coding environment but also in a high bit rate environment (using a low quantization parameter), a near lossless environment, a lossless environment, etc. Furthermore, according to this embodiment, there is no need to transmit an additional Rice parameter lookup table and / or additional syntax.

[0254] 6 and 7 show a schematic diagram of an example entropy encoding method and associated components according to one embodiment of the present document.

[0255] The Rice parameter derivation method disclosed in Fig. 6 may be performed by the encoding apparatus 200 disclosed in Fig. 2 and Fig. 7. Specifically, for example, S600 to S620 of Fig. 6 may be performed by the Rice parameter derivation unit 241 of the entropy encoding unit 240. S630 of Fig. 6 may be performed by the binarization unit 242 of the entropy encoding unit 240, and S640 of Fig. 6 may be performed by the entropy encoding processing unit 243 of the entropy encoding unit 240.

[0256] The entropy encoding method disclosed in FIG. 6 may include the embodiments detailed in this document.

[0257] 6 and 7, the entropy encoding unit 240 performs a residual coding procedure on (quantized) transform coefficients. Here, the transform coefficients may be mixed with residual coefficients. The entropy encoding unit 240 may perform residual coding on (quantized) transform coefficients in a current block (current CB or current TB) according to a scan order. The entropy encoding unit 240 may generate and encode various syntax elements related to residual information, for example, as shown in Tables 1 to 4. For example, the Rice parameter derivation unit 241 of the entropy encoding unit 240 may generate (or derive) information indicating a level value of a current transform coefficient (quantized transform coefficient or current (quantized) residual coefficient) in the current block (S600). Here, the information indicating 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 values ​​of sig_coeff_flag[xC][yC], abs_level_gtx_flag[n][0], par_level_flag[n], abs_level_gtx_flag[n][1], etc. The value of dec_abs_level[n] may be derived as a level value of the transform coefficient. When the number of predetermined context coding bins in a corresponding block (CU or TU) according to the scanning order reaches a certain threshold, the encoding apparatus may code the level values ​​of subsequent transform coefficients based on dec_abs_level[n].

[0258] The Rice parameter derivation unit 241 of the entropy encoding unit 240 may configure a plurality of Rice parameter lookup tables and may select one of the tables based on information indicating the level value of the transform coefficient (S610). For example, the Rice parameter derivation unit 241 of the entropy encoding unit 240 may select a Rice parameter lookup table to be used for level coding of the current transform coefficient (or coefficient group, transform block, or coding block) from among a plurality of Rice parameter lookup tables by using pre-given information such as the configuration of syntax elements (presence or absence, type, etc.) coded preceding the syntax element indicating the level value of the current transform coefficient, whether the number of context coding bins coded / decoded in residual data coding exceeds the maximum number of available context coding bins set in the context coding bin constraint algorithm, whether lossless or near lossless coding is performed, quantization coefficient information, etc. The selection information for the corresponding Rice parameter lookup table may be signaled implicitly or explicitly. For example, the selection information may correspond to a syntax element for transmitting information indicating a Rice parameter lookup table selected by the encoding device.

[0259] The Rice parameter derivation unit 241 of the entropy encoding unit 240 may derive Rice parameters for information indicating the level value of the current transform coefficient (abs_remainder[n] or dec_abs_level[n]) based on the selected Rice parameter lookup table and neighboring (or reference) transform coefficients of the current transform coefficient (S620). Specifically, the Rice parameter derivation unit 241 of the entropy encoding unit 240 may derive Rice parameters for the (coefficient at) the current scanning position using the selected Rice parameter lookup table based on the locSumAbs. The locSumAbs may be derived based on AbsLevel and / or sig_coeff_flag of the neighboring transform coefficients. It will be apparent to those skilled in the art that the procedure for deriving the Rice parameters may be omitted for sig_coeff_flag, par_level_flag, abs_level_gtx_flag, etc., which are binarized to a fixed length without using Rice parameters. For the sig_coeff_flag, par_level_flag, abs_level_gtx_flag, etc., binarization other than Rice parameter-based binarization may be performed.

[0260] The binarization unit 242 of the entropy encoding unit 240 may perform binarization based on the derived Rice parameter to derive a bin string for information indicating the level value of the transform coefficient (abs_remainder[n] or dec_abs_level[n]) (S630). The length of the bin string may be adaptively determined depending on the derived Rice parameter.

[0261] The entropy encoding unit 243 of the entropy encoding unit 240 may perform entropy encoding based on a bin string for information indicating the level value of the transform coefficient (abs_remainder[n] or dec_abs_level[n]) (S640). The entropy encoding unit 243 of the entropy encoding unit 240 may perform context-based entropy encoding on the bin string using a context-adaptive arithmetic coding (CABAC) entropy coding technique, and the output may be included in a bitstream. In this case, the encoding apparatus may derive context information for each bin of the bin string, perform entropy coding, and update the context information for each bin. The bitstream may include various information for image / video decoding, such as prediction information, in addition to residual information including information on abs_remainder[n] or dec_abs_level[n], as described above. The bitstream may further include selection information for the Rice parameter table. The bitstream can be transmitted to a decoding device via a (digital) storage medium or a network.

[0262] FIG. 8 illustrates a schematic diagram of an example of an entropy encoding method according to another embodiment of the present document.

[0263] The Rice parameter derivation method disclosed in Fig. 8 may be performed by the encoding apparatus 200 disclosed in Fig. 2 and Fig. 7. Specifically, for example, S800 to S820 of Fig. 8 may be performed by the Rice parameter derivation unit 241 of the entropy encoding unit 240. S830 of Fig. 8 may be performed by the binarization unit 242 of the entropy encoding unit 240, and S840 of Fig. 8 may be performed by the entropy encoding processing unit 243 of the entropy encoding unit 240.

[0264] The entropy encoding method disclosed in FIG. 8 may include the embodiments detailed in this document.

[0265] 7 and 8, the entropy encoding unit 240 performs a residual coding procedure on (quantized) transform coefficients. Here, the transform coefficients may be mixed with residual coefficients. The entropy encoding unit 240 may perform residual coding on (quantized) transform coefficients in a current block (current CB or current TB) according to a scan order. The entropy encoding unit 240 may generate and encode various syntax elements related to residual information, for example, as shown in Tables 1 to 4. For example, the Rice parameter derivation unit 241 of the entropy encoding unit 240 may generate (or derive) information indicating a level value of a current transform coefficient (quantized transform coefficient or current (quantized) residual coefficient) in the current block (S800). Here, the information indicating 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 values ​​of sig_coeff_flag[xC][yC], abs_level_gtx_flag[n][0], par_level_flag[n], abs_level_gtx_flag[n][1], etc. The value of dec_abs_level[n] may be derived as a level value of the transform coefficient. When the number of predetermined context coding bins in a corresponding block (CU or TU) according to the scanning order reaches a certain threshold, the encoding apparatus may code the level values ​​of subsequent transform coefficients based on dec_abs_level[n].

[0266] The Rice parameter derivation unit 241 of the entropy encoding unit 240 may determine an index value of a Rice lookup table for information indicating the level value of the transform coefficient (S810). For example, the Rice parameter derivation unit 241 of the entropy encoding unit 240 may determine an index value of the Rice parameter lookup table or change the corresponding index value by adding a shift to the index value based on the configuration (presence and type of syntax elements, etc.) of syntax elements coded preceding the syntax element indicating the level value of the current transform coefficient, whether the number of context coding bins coded / decoded in residual data coding exceeds the maximum number of available context coding bins set in the context coding bin constraint algorithm, whether lossless or near lossless coding is performed, quantization coefficient information (value), or whether the sum of the level values ​​of neighboring coefficients of the current transform coefficient is greater than a threshold (or the size of the Rice parameter lookup table), etc.

[0267] The Rice parameter derivation unit 241 of the entropy encoding unit 240 may derive a Rice parameter for information indicating a level value of the current transform coefficient (abs_remainder[n] or dec_abs_level[n]) from the Rice parameter lookup table based on the index value (S820). For example, the Rice parameter derivation unit 241 of the entropy encoding unit 240 may derive a Rice parameter for (a coefficient at) the current scanning position based on the index value using Equation 15 and / or Equation 16. When Equation 16 is used, the value of the Rice parameter may be changed by adding an offset value to the index value. The index value may be derived based on the locSumAbs or may be determined based on a default index selection method. The locSumAbs may be derived based on AbsLevel and / or sig_coeff_flag of the surrounding transform coefficients.

[0268] It will be apparent to those skilled in the art that the procedure for deriving the Rice parameters can be omitted for sig_coeff_flag, par_level_flag, abs_level_gtx_flag, etc., which are binarized to a fixed length without using the Rice parameters. For sig_coeff_flag, par_level_flag, abs_level_gtx_flag, etc., binarization using other methods other than Rice parameter-based binarization can be performed.

[0269] The binarization unit 242 of the entropy encoding unit 240 may perform binarization based on the derived Rice parameter to derive a bin string for information indicating the level value of the transform coefficient (abs_remainder[n] or dec_abs_level[n]) (S830). The length of the bin string may be adaptively determined depending on the derived Rice parameter.

[0270] The entropy encoding unit 243 of the entropy encoding unit 240 may perform entropy encoding based on a bin string for information indicating the level value of the transform coefficient (abs_remainder[n] or dec_abs_level[n]) (S840). The entropy encoding unit 243 of the entropy encoding unit 240 may perform context-based entropy encoding on the bin string using a context-adaptive arithmetic coding (CABAC) entropy coding technique, and the output may be included in a bitstream. In this case, the encoding apparatus may derive context information for each bin of the bin string, perform entropy coding, and update the context information for each bin. The bitstream may include various information for image / video decoding, such as prediction information, in addition to residual information including information on abs_remainder[n] or dec_abs_level[n], as described above. The bitstream may further include selection information for the Rice parameter table. The bitstream can be transmitted to a decoding device via a (digital) storage medium or a network.

[0271] 9 and 10 show a schematic diagram of an example of an entropy decoding method and associated components according to an embodiment of the present document.

[0272] The Rice parameter derivation method disclosed in Figure 9 may be performed by the decoding apparatus 300 disclosed in Figures 3 and 10. Specifically, for example, steps S900 to S920 of Figure 9 may be performed by the Rice parameter derivation unit 311 of the entropy decoding unit 310. Step S930 of Figure 9 may be performed by the binarization unit 312 of the entropy decoding unit 310, and step S940 of Figure 9 may be performed by the entropy decoding processing unit 313 of the entropy decoding unit 310.

[0273] The entropy decoding method disclosed in FIG. 9 may include the embodiments detailed in this document.

[0274] 9 and 10, the entropy decoding unit may decode encoded residual information to derive (quantized) transform coefficients. Here, the transform coefficients may be mixed with residual coefficients. The decoding device may decode encoded residual information for a current block (current CB or current TB) to derive (quantized) transform coefficients. The decoding device may decode various syntax elements related to residual information, for example, as shown in Tables 1 to 4, analyze the values ​​of the associated syntax elements, and derive the (quantized) transform coefficients based on the values.

[0275] Specifically, the Rice parameter derivation unit 311 of the entropy decoding unit 310 may acquire information (abs_remainder[n] or dec_abs_level[n]) indicating a level value of a current transform coefficient (a quantized transform coefficient or a current (quantized) residual coefficient) from a bitstream (S900), and may select a Rice parameter lookup table corresponding to the level value information from a plurality of Rice parameter lookup tables (S910).

[0276] For example, the Rice parameter derivation unit 311 of the entropy decoding unit 310 may configure a plurality of Rice parameter lookup tables and select one of the tables. To this end, selection information for selecting one of the tables may be explicitly signaled. The selection information may correspond to a syntax element for transmitting information indicating the Rice parameter lookup table selected by the encoding apparatus. In this case, the Rice parameter derivation unit 311 of the entropy decoding unit 310 may obtain a syntax element indicating information regarding the Rice parameter lookup table from the bitstream and select one of the plurality of Rice parameter lookup tables based on the obtained syntax element.

[0277] Alternatively, the Rice parameter derivation unit 311 of the entropy decoding unit 310 may select a Rice parameter lookup table to be used for level coding of a current transform coefficient (or a coefficient group, a transform block, or a coding block) from a plurality of Rice parameter lookup tables based on at least one of previously given information, such as the configuration of a syntax element coded preceding a syntax element indicating a level value of a current transform coefficient (presence or absence of a syntax element, type, etc.), information on the maximum number of available context coding bins set by a context coding bin constraint algorithm, whether the current block is lossless or near lossless coded, or quantization coefficient information for the current transform coefficient. Here, the syntax element coded preceding a syntax element indicating a 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 a Rice parameter lookup table may be selected based on whether at least one of these is decoded.

[0278] The Rice parameter derivation unit 311 of the entropy decoding unit 310 may derive Rice parameters for information indicating a level value of the current transform coefficient (abs_remainder[n] or dec_abs_level[n]) based on the selected Rice parameter lookup table and neighboring (or reference) transform coefficients of the current transform coefficient (S920). Specifically, the Rice parameter derivation unit 311 of the entropy decoding unit 310 may derive Rice parameters for the current scanning position (coefficient) using the selected Rice parameter lookup table based on the locSumAbs. The locSumAbs may be derived based on AbsLevel and / or sig_coeff_flag of the neighboring transform coefficients. It will be apparent to those skilled in the art that the procedure for deriving the Rice parameters may be omitted for sig_coeff_flag, par_level_flag, abs_level_gtx_flag, etc., which are binarized to a fixed length without using Rice parameters. For the sig_coeff_flag, par_level_flag, abs_level_gtx_flag, etc., binarization other than Rice parameter-based binarization may be performed.

[0279] The binarization unit 312 of the entropy decoding unit 310 may perform binarization based on the derived Rice parameter to derive a bin string for information indicating the level value of the transform coefficient (abs_remainder[n] or dec_abs_level[n]) (S930). For example, the binarization unit 312 of the entropy decoding unit 310 may derive an available bin string for the available value of abs_remainder[n] or dec_abs_level[n] through the binarization procedure. The length of the available bin string may be adaptively determined based on the derived Rice parameter.

[0280] The entropy decoding processor 313 of the entropy decoding unit 310 may derive a level value of the transform coefficient by performing entropy decoding based on a bin string for information indicating a level value of the transform coefficient (abs_remainder[n] or dec_abs_level[n]) (S940). For example, the entropy decoding processor 313 of the entropy decoding unit 310 may sequentially parse and decode each bin / bit for the abs_remainder[n] or dec_abs_level[n] and compare the derived bin string with the available bin string. If the derived bin string is the same as one of the available bin strings, a value corresponding to the corresponding bin string may be derived as the value of the abs_remainder[n]. If not, the comparison procedure may be performed after further parsing and decoding the next bit in the bitstream. Through this process, it is possible to signal specific information (specific syntax elements) using variable-length bits without using start or end bits for the specific information in the bitstream. This allows relatively fewer bits to be allocated to low values, improving overall coding efficiency.

[0281] The decoding device may perform context-based entropy decoding on each bin in the bin string from the bitstream based on the CABAC entropy coding technique. In this case, the decoding device may derive context information for each bin of the bin string, perform entropy coding, and update the context information for each bin. The entropy decoding procedure may be performed by the entropy decoding processor 313 in the entropy decoding unit 310. As described above, the bitstream may include various information for image / video decoding, such as prediction information in addition to residual information including information on abs_remainder[n] or dec_abs_level[n]. The bitstream may further include selection information for a Rice parameter lookup table. As described above, the bitstream may be transmitted to the decoding device via a (digital) storage medium or a network.

[0282] The decoding device can derive (quantized) transform / residual coefficients based on the entropy decoding, and can derive residual samples for the current block by performing inverse quantization and / or inverse transform procedures based on the transform / residual coefficients, if necessary. Reconstructed samples can be generated based on the residual samples and predicted samples derived through inter prediction and / or intra prediction, and a reconstructed block / picture including the reconstructed samples can be generated.

[0283] FIG. 11 illustrates a schematic diagram of an example of an entropy decoding method according to another embodiment of the present document.

[0284] The Rice parameter derivation method disclosed in Figure 11 may be performed by the decoding apparatus 300 disclosed in Figures 3 and 10. Specifically, for example, steps S1100 to S1120 of Figure 11 may be performed by the Rice parameter derivation unit 311 of the entropy decoding unit 310. Step S1130 of Figure 11 may be performed by the binarization unit 312 of the entropy decoding unit 310, and step S1140 of Figure 11 may be performed by the entropy decoding processing unit 313 of the entropy decoding unit 310.

[0285] The entropy decoding method disclosed in FIG. 11 may include the embodiments detailed in this document.

[0286] 10 and 11, the entropy decoding unit may decode encoded residual information to derive (quantized) transform coefficients. Here, the transform coefficients may be mixed with residual coefficients. The decoding device may decode encoded residual information for a current block (current CB or current TB) to derive (quantized) transform coefficients. The decoding device may decode various syntax elements related to residual information, for example, as shown in Tables 1 to 4, analyze the values ​​of the associated syntax elements, and derive the (quantized) transform coefficients based on the values.

[0287] Specifically, the Rice parameter derivation unit 311 of the entropy decoding unit 310 may acquire information (abs_remainder[n] or dec_abs_level[n]) indicating a level value of a current transform coefficient (a quantized transform coefficient or a current (quantized) residual coefficient) from a bitstream (S1100). Then, the Rice parameter derivation unit 311 of the entropy decoding unit 310 may determine an index value of a Rice parameter lookup table for the information indicating the level value (S1110). For example, the Rice parameter derivation unit 311 of the entropy decoding unit 310 may determine and / or change the index value of the Rice parameter lookup table based on at least one of the configuration of syntax elements (presence or type of syntax elements, etc.) coded prior to the information indicating the level value of the current transform coefficient, the maximum number of available context coding bins set in a context coding bin constraint algorithm, whether lossless or near lossless coding is performed, quantization coefficient information (value) for the transform coefficient, or level value(s) of neighboring coefficient(s) of the current transform coefficient.

[0288] For example, the Rice parameter derivation unit 311 of the entropy decoding unit 310 may determine the index value or change the index value by adding a shift to the index value based on whether at least one of syntax elements sig_coeff_flag, abs_level_gtx_flag, par_level_flag, and coeff_sign_flag is decoded from the bitstream, or may determine the index value or change the index value by adding a shift to the index value based on whether a sum of level values ​​of neighboring transform coefficients of the transform coefficient is equal to or greater than a threshold.

[0289] The Rice parameter derivation unit 311 of the entropy decoding unit 310 may derive a Rice parameter for information indicating a level value of the current transform coefficient (abs_remainder[n] or dec_abs_level[n]) from the Rice parameter lookup table based on the index value (S1120). For example, the Rice parameter derivation unit 311 of the entropy decoding unit 310 may derive a Rice parameter for (a coefficient at) the current scanning position based on the index value using Equation 15 and / or Equation 16. When Equation 16 is used, the value of the Rice parameter may be changed by adding an offset value to the index value. The index value may be derived based on the above-described locSumAbs or may be determined based on a default index selection method.

[0290] It will be apparent to those skilled in the art that the procedure for deriving the Rice parameters can be omitted for sig_coeff_flag, par_level_flag, abs_level_gtx_flag, etc., which are binarized to a fixed length without using the Rice parameters. For sig_coeff_flag, par_level_flag, abs_level_gtx_flag, etc., binarization using other methods other than Rice parameter-based binarization can be performed.

[0291] The binarization unit 312 of the entropy decoding unit 310 may perform binarization based on the derived Rice parameter to derive a bin string for information indicating the level value of the transform coefficient (abs_remainder[n] or dec_abs_level[n]) (S1130). For example, the binarization unit 312 of the entropy decoding unit 310 may derive an available bin string for the available value of abs_remainder[n] or dec_abs_level[n] through the binarization procedure. The length of the available bin string may be adaptively determined based on the derived Rice parameter.

[0292] The entropy decoding processor 313 of the entropy decoding unit 310 may derive a level value of the transform coefficient by performing entropy decoding based on a bin string for information indicating a level value of the transform coefficient (abs_remainder[n] or dec_abs_level[n]) (S940). For example, the entropy decoding processor 313 of the entropy decoding unit 310 may sequentially parse and decode each bin / bit for the abs_remainder[n] or dec_abs_level[n] and compare the derived bin string with the available bin string. If the derived bin string is the same as one of the available bin strings, a value corresponding to the corresponding bin string may be derived as the value of the abs_remainder[n]. If not, the comparison procedure may be performed after further parsing and decoding the next bit in the bitstream. Through this process, it is possible to signal specific information (specific syntax elements) using variable-length bits without using start or end bits for the specific information in the bitstream. This allows relatively fewer bits to be allocated to low values, improving overall coding efficiency.

[0293] The decoding device may perform context-based entropy decoding on each bin in the bin string from the bitstream based on the CABAC entropy coding technique. In this case, the decoding device may derive context information for each bin of the bin string, perform entropy coding, and update the context information for each bin. The entropy decoding procedure may be performed by the entropy decoding processor 313 in the entropy decoding unit 310. As described above, the bitstream may include various information for image / video decoding, such as prediction information in addition to residual information including information on abs_remainder[n] or dec_abs_level[n]. The bitstream may further include selection information for a Rice parameter lookup table. As described above, the bitstream may be transmitted to the decoding device via a (digital) storage medium or a network.

[0294] The decoding device can derive (quantized) transform / residual coefficients based on the entropy decoding, and can derive residual samples for the current block by performing inverse quantization and / or inverse transform procedures based on the transform / residual coefficients, if necessary. Reconstructed samples can be generated based on the residual samples and prediction samples derived through inter prediction and / or intra prediction, and a reconstructed block / picture including the reconstructed samples can be generated.

[0295] FIG. 12 illustrates a video / image encoding method according to an embodiment of the present document.

[0296] The video / image encoding method disclosed in Figure 12 may be performed by the encoding apparatus 200 disclosed in Figure 2. Specifically, for example, S1200 in Figure 12 may be performed by the prediction unit 220 of the encoding apparatus, and S1210 may be performed by the subtraction unit 231 of the encoding apparatus. S1220 may be performed by the transformation unit 232 of the encoding apparatus, S1230 may be performed by the quantization unit 233 of the encoding apparatus, and S1240 may be performed by the entropy encoding unit 240 of the encoding apparatus. S800 to S830 detailed in Figure 8 may be included in the S1240 procedure.

[0297] 12, an encoding apparatus may derive prediction samples through prediction for a current block (S1200). The encoding apparatus may determine whether to perform inter prediction or intra prediction for the current block, and may determine a specific inter prediction mode or a specific intra prediction mode based on an RD cost. Depending on the determined mode, the encoding apparatus may derive prediction samples for the current block.

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

[0299] The encoding apparatus derives transform coefficients through a transform procedure on the residual samples (S1220), and quantizes the derived transform coefficients to derive quantized transform coefficients (S1230).

[0300] The encoding apparatus may encode video information including prediction information and residual information and output the encoded video information in the form of a bitstream (S1240). The prediction information may include prediction mode information and information about motion information (e.g., when inter-prediction is applied) as information related to the prediction procedure. The residual information may include, for example, the information disclosed in Tables 1 to 4 above as information about the quantized transform coefficients.

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

[0302] FIG. 13 illustrates a video / image decoding method according to an embodiment of the present document.

[0303] The video / picture decoding method disclosed in Figure 13 may be performed by the decoding apparatus 300 disclosed in Figure 3. Specifically, for example, S1300 of Figure 13 may be performed by the prediction unit 330 of the decoding apparatus. In S1300, the procedure of decoding prediction information included in the bitstream and deriving values ​​of related syntax elements may be performed by the entropy decoding unit 310 of the decoding apparatus. S1310, S1320, S1330, and S1340 may be performed by the entropy decoding unit 310, the inverse quantization unit 321, the inverse transform unit 322, and the addition unit 340 of the decoding apparatus, respectively. S1000 to S1030 detailed in Figure 10 may be included in the S1310 procedure.

[0304] The decoding apparatus may perform operations corresponding to those performed by the encoding apparatus. The decoding apparatus may perform inter prediction or intra prediction on the current block based on the received prediction information to derive a prediction sample (S1300).

[0305] The decoding apparatus can derive quantized transform coefficients for the current block based on the received residual information (S1310).

[0306] The decoding apparatus can derive transform coefficients by dequantizing the quantized transform coefficients (S1320).

[0307] The decoding apparatus can derive residual samples through an inverse transform procedure on the transform coefficients (S1330).

[0308] The decoding apparatus generates reconstructed samples for the current block based on the predicted samples and the residual samples, and generates a reconstructed picture based on the reconstructed samples (S1340). Thereafter, as described above, an in-loop filtering procedure may be further applied to the reconstructed picture.

[0309] In the above-described embodiments, the methods are described based on flow charts as a series of steps or blocks, but the embodiments are not limited to the order of the steps, and certain steps may occur in a different order or simultaneously with other steps than those described. Furthermore, those skilled in the art will understand that the steps shown in the flow charts are not exclusive, and other steps may be included, or one or more steps in the flow charts may be deleted without affecting the scope of the embodiments herein.

[0310] The methods according to the embodiments of the present document described above can be implemented in software form, and the encoding device and / or decoding device according to the present document can be included in devices that perform video processing, such as TVs, computers, smartphones, set-top boxes, and display devices.

[0311] In this document, when an embodiment is implemented in software, the method described above may be implemented with modules (processes, functions, etc.) that perform the functions described above. The modules may be stored in memory and executed by a processor. The memory may be internal or external to the processor and may be coupled to the processor in various well-known ways. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include read-only memory (ROM), random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described herein may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in each drawing may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for implementation may be stored on a digital storage medium.

[0312] In addition, the decoding device and encoding device to which the embodiment(s) of this document are applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interaction device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top (OTT) video (over-the-top) device, an internet streaming service providing device, a three-dimensional (3D) video device, a virtual reality (VR) device, an augmented reality (AR) device, an image telephone video device, a vehicle terminal (e.g., a vehicle terminal (including an autonomous vehicle), an airplane terminal, a ship terminal, etc.), a medical video device, etc., and may be used to process a video signal or a data signal. For example, over-the-top (OTT) video (over-the-top) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.

[0313] In addition, a processing method to which the embodiment(s) of this document is applied may be produced in the form of a computer-executable program and stored in a computer-readable recording medium. Multimedia data having a data structure according to the embodiment(s) of this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored. Examples of the computer-readable recording medium include Blu-ray Discs (BDs), Universal Serial Buses (USBs), ROMs, PROMs, EPROMs, EEPROMs, RAMs, CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices. The computer-readable recording medium also includes media embodied in the form of carrier waves (e.g., transmission via the Internet). A bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0314] Furthermore, the embodiment(s) of this document may be embodied in a computer program product by program code, which may be executed by a computer in accordance with the embodiment(s) of this document, and which may be stored on a computer-readable carrier.

[0315] FIG. 14 illustrates an example of a content streaming system in which the embodiments disclosed herein can be applied.

[0316] Referring to FIG. 14, a content streaming system to which the embodiments of this document are applied may largely include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.

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

[0318] The bitstream may be generated by an encoding method or a bitstream generation method applied to the embodiments of this document, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0319] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, which then transmits the multimedia data to the user. In this case, the content streaming system may include a separate control server, which controls commands and responses between devices in the content streaming system.

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

[0321] Examples of the user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, head-mounted displays (HMDs)), digital TVs, desktop computers, and digital signs.

[0322] Each server in the content streaming system can be operated as a distributed server, in which case data received by each server can be processed in a distributed manner.

Claims

1. 1. A video decoding method performed by a decoding device, comprising: receiving a bitstream containing information related to level values ​​of transform coefficients in a current block; determining an index value in a Rice parameter lookup table for said information related to said level value of said transform coefficient; deriving a Rice parameter for the information related to the level value of the transform coefficient based on the Rice parameter lookup table and the index value; deriving a bin string for the information related to the level values ​​of the transform coefficients based on the Rice parameters; deriving the level values ​​of the transform coefficients based on the bin string; The step of deriving the Rice parameters comprises: deriving a modified index value based on the index value; deriving temporary Rice parameters by utilizing the modified index values ​​and the Rice parameter lookup table; deriving the Rice parameter by adding an offset to the temporary Rice parameter; and deriving the Rice parameter as a value greater than a maximum Rice parameter value defined in the Rice parameter lookup table based on the offset being positive and the modified index value being 31.

2. The video decoding method of claim 1 , wherein the step of deriving the modified index value includes the step of 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.

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

4. 4. The video decoding method of claim 3, wherein the modified index value is derived by using the shift value and the Rice parameter is derived by using the offset based on a specific syntax element coded prior to the information related to the level value of the transform coefficient.

5. The video decoding method of 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 video decoding method of 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_reminder indicating the remaining level value of the transform coefficient.

7. 1. A video encoding method performed by an encoding device, comprising: generating information related to the level values ​​of the transform coefficients in the current block; determining an index value in a Rice parameter lookup table for said information related to said level value of said transform coefficient; deriving 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; deriving a bin string for the information related to the level values ​​of the transform coefficients based on the Rice parameters; encoding the bin string; The step of deriving the Rice parameters comprises: deriving a modified index value based on the index value; deriving temporary Rice parameters by utilizing the modified index values ​​and the Rice parameter lookup table; deriving the Rice parameter by adding an offset to the temporary Rice parameter; and deriving the Rice parameter as a value greater than a maximum Rice parameter value defined in the Rice parameter lookup table based on the offset being positive and the modified index value being 31.

8. The video encoding method of claim 7 , wherein the step of deriving the modified index value includes the step of 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.

9. The video encoding method of 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. 10. The video encoding method of claim 9, wherein the modified index value is derived by using the shift value and the Rice parameter is derived by using the offset based on a specific syntax element coded prior to the information related to the level value of the transform coefficient.

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

12. 8. The video encoding method of 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_reminder indicating a remaining level value of the transform coefficient.

13. 1. A method for transmitting data for video, comprising: obtaining a bitstream for the video, the bitstream comprising: generating information related to the level values ​​of the transform coefficients in the current block; determining an index value in a Rice parameter lookup table for said information related to said level value of said transform coefficient; deriving 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; deriving a bin string for the information related to the level values ​​of the transform coefficients based on the Rice parameters; encoding the bin string; transmitting the data including the bitstream; The step of deriving the Rice parameters comprises: deriving a modified index value based on the index value; deriving temporary Rice parameters by utilizing the modified index values ​​and the Rice parameter lookup table; deriving the Rice parameter by adding an offset to the temporary Rice parameter; and based on the offset being positive and the modified index value being 31, the Rice parameter is derived as a value greater than a maximum Rice parameter value defined in the Rice parameter lookup table.

Citation Information

Patent Citations

  • High throughput coding for cabac in hevc

    WO2013108639A1

  • Method, apparatus and system for encoding and decoding a subset of transform units of encoded video data

    WO2013152401A1

  • Rice parameter initialization for coefficient level coding in video coding process

    WO2015006602A2

  • Coefficient level coding in video coding

    WO2017040828A1

  • Regular coded bin reduction for coefficient coding using threshold and rice parameter

    WO2020051324A1