Residual coding method and device for the same

The method improves residual coding efficiency by binarizing residual information using a Rice parameter with a maximum value of 3, addressing the need for efficient image/video compression in high-resolution and immersive media.

JP2025133860APending Publication Date: 2025-09-11LG ELECTRONICS INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025112757
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-09-24
Filing Date
2025-07-03
Publication Date
2025-09-11

AI Technical Summary

Technical Problem

The increasing demand for high-resolution and high-quality images/videos, along with immersive media, necessitates a highly efficient image/video compression technique to reduce transmission and storage costs.

Method used

A method and apparatus for improving residual coding efficiency by performing a binarization process on residual information based on a Rice parameter, with a maximum value of 3, and initializing Rice parameters for sub-blocks in current blocks.

Benefits of technology

Enhances overall image/video compression efficiency by optimizing residual coding through binarization and parameter setting, thereby improving coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025133860000001_ABST
    Figure 2025133860000001_ABST
Patent Text Reader

Abstract

To provide an image decoding method performed by a decoding device.SOLUTION: A method includes the steps of: deriving a prediction sample to a current block based on prediction mode information; deriving a conversion coefficient to the current block based on residual information; deriving a residual sample to the current block based on the conversion coefficient; and generating a restored sample based on the prediction sample and residual sample to the current block. The residual information comprises: a parity level flag for the parity of a conversion coefficient level to the quantized conversion coefficient; and a first conversion coefficient level flag regarding whether the conversion coefficient level is larger than a first reference value. Decoding of the first conversion coefficient level flag is performed prior to decoding of the parity level flag and decoding of the parity level flag is performed based on the state where the value of the first conversion coefficient level flag is 1.SELECTED DRAWING: Figure 14
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to an image coding technology, and more particularly to a residual coding method and apparatus in an image coding system. [Background technology]

[0002] Recently, 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, which increases transmission costs and storage costs when transmitting image data using existing media such as wired / wireless broadband lines or storing image / video data using existing storage media.

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

[0004] Therefore, a highly efficient image / video compression technique is required to effectively compress and transmit, store, or 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 the present invention is to provide a method and apparatus for improving image coding efficiency.

[0006] Another technical object of the present invention is to provide a method and apparatus for improving the efficiency of residual coding.

[0007] It is still another technical object of the present invention to provide a method and apparatus for improving residual coding efficiency by performing a binarization process on residual information based on a Rice parameter.

[0008] It is still another technical object of the present invention to provide a method and apparatus for performing residual coding by setting the maximum value of the Rice parameter to 3.

[0009] Another technical object of the present invention is to provide a method and apparatus for performing an initialization process to derive at least one Rice parameter for a sub-block included in a current block. [Means for solving the problem]

[0010] According to an embodiment of the present invention, there is provided an image decoding method performed by a decoding device, the method including: receiving a bitstream including residual information, deriving quantized transform coefficients for a current block based on the residual information included in the bitstream, deriving transform coefficients from the quantized transform coefficients based on an inverse quantization process, deriving residual samples for the current block by applying an inverse transform to the derived transform coefficients, and generating a reconstructed picture based on the residual samples for the current block, wherein the residual information includes transform coefficient level information, and deriving the quantized transform coefficients includes performing a binarization process on the transform coefficient level information based on a Rice parameter, deriving values ​​of the transform coefficient level information based on a result of the binarization process, and deriving the quantized transform coefficients based on the values ​​of the transform coefficient level information, wherein a maximum value of the Rice parameter is 3.

[0011] According to another embodiment of the present invention, there is provided a decoding device for performing image decoding, the decoding device including: an entropy decoding unit configured to receive a bitstream including residual information and derive quantized transform coefficients for a current block based on the residual information included in the bitstream; an inverse quantization unit configured to derive transform coefficients from the quantized transform coefficients based on an inverse quantization process; an inverse transform unit configured to derive residual samples for the current block by applying an inverse transform to the derived transform coefficients; and an adder configured to generate a reconstructed picture based on the residual samples for the current block, wherein the residual information includes transform coefficient level information, the entropy decoding unit performs a binarization process on the transform coefficient level information based on a Rice parameter, derives values ​​of the transform coefficient level information based on a result of the binarization process, and derives the quantized transform coefficients based on the values ​​of the transform coefficient level information, wherein a maximum value of the Rice parameter is 3.

[0012] According to another embodiment of the present invention, there is provided an image encoding method performed by an encoding device, the method including: deriving residual samples for a current block, deriving transform coefficients by transforming the residual samples for the current block, deriving quantized transform coefficients from the transform coefficients based on a quantization process, and encoding residual information including information on the quantized transform coefficients, wherein the residual information includes transform coefficient level information, and encoding the residual information includes: deriving binarized values ​​of the transform coefficient level information by performing a binarization process on the transform coefficient level information based on a Rice parameter, and encoding the binarized values ​​of the transform coefficient level information, wherein a maximum value of the Rice parameter is 3.

[0013] According to another embodiment of the present invention, there is provided an encoding device for performing image encoding, the encoding device including: a subtraction unit that derives residual samples for a current block; a transformation unit that derives transform coefficients by transforming the residual samples for the current block; a quantization unit that derives quantized transform coefficients from the transform coefficients based on a quantization process; and an entropy encoding unit that encodes residual information including information on the quantized transform coefficients, wherein the residual information includes coefficient transform level information, the entropy encoding unit derives binarized values ​​of the transform coefficient level information by performing a binarization process on the transform coefficient level information based on a Rice parameter and encodes the binarized values ​​of the transform coefficient level information, wherein a maximum value of the Rice parameter is 3. [Effects of the Invention]

[0014] The present invention can improve the overall image / video compression efficiency.

[0015] According to the present invention, the efficiency of residual coding can be improved.

[0016] According to the present invention, residual information is binarized based on the Rice parameter, thereby improving residual coding efficiency.

[0017] According to the present invention, the maximum value of the Rice parameter is set to 3, thereby enabling efficient residual coding.

[0018] According to the present invention, an initialization process can be performed to derive at least one Rice parameter for a sub-block included in a current block. [Brief explanation of the drawings]

[0019] [Figure 1] 1 shows a schematic diagram of an example of a video / image coding system to which the present invention can be applied; [Figure 2] 1 is a diagram illustrating an outline of the configuration of a video / image encoding device to which the present invention can be applied. [Figure 3] 1 is a diagram illustrating an outline of the configuration of a video / image decoding device to which the present invention can be applied. [Figure 4] 10A and 10B are diagrams illustrating an example of deriving a Rice parameter for a current transform coefficient based on neighboring reference transform coefficients according to an embodiment; [Figure 5A] 10A and 10B are diagrams illustrating another example of deriving Rice parameters for a current transform coefficient based on surrounding reference transform coefficients according to some embodiments. [Figure 5B] 10A and 10B are diagrams illustrating another example of deriving Rice parameters for a current transform coefficient based on surrounding reference transform coefficients according to some embodiments. [Figure 5C] 10A and 10B are diagrams illustrating another example of deriving Rice parameters for a current transform coefficient based on surrounding reference transform coefficients according to some embodiments. [Figure 6A] 10A and 10B are diagrams illustrating yet another example of deriving Rice parameters for a current transform coefficient based on neighboring reference transform coefficients according to some embodiments; [Figure 6B] 10A and 10B are diagrams illustrating yet another example of deriving Rice parameters for a current transform coefficient based on neighboring reference transform coefficients according to some embodiments; [Figure 6C] 10A and 10B are diagrams illustrating yet another example of deriving Rice parameters for a current transform coefficient based on neighboring reference transform coefficients according to some embodiments; [Figure 7] FIG. 10 illustrates a process for deriving quantized coefficients for a 2×2 block according to an embodiment. [Figure 8A] 1 illustrates a configuration and operation method of an entropy encoding unit according to an embodiment. [Figure 8B] 1 illustrates a configuration and operation method of an entropy encoding unit according to an embodiment. [Figure 9A]1 illustrates the configuration and operation method of an entropy decoding unit according to an embodiment. [Figure 9B] 1 illustrates the configuration and operation method of an entropy decoding unit according to an embodiment. [Figure 10] 1 is a flowchart illustrating an entropy encoding method of an encoding device according to an embodiment. [Figure 11] 1 is a flowchart illustrating an entropy decoding method of a decoding device according to an embodiment. [Figure 12] 10 is a flowchart illustrating an operation of an encoding device according to an embodiment. [Figure 13] FIG. 1 is a block diagram showing a configuration of an encoding device according to an embodiment. [Figure 14] 10 is a flowchart illustrating an operation of a decoding device according to an embodiment. [Figure 15] 1 is a block diagram showing a configuration of a decoding device according to an embodiment; [Figure 16] 1 illustrates an example of a content streaming system to which the invention disclosed in this document can be applied. DETAILED DESCRIPTION OF THE INVENTION

[0020] According to an embodiment of the present invention, there is provided an image decoding method performed by a decoding device, the method including: receiving a bitstream including residual information, deriving quantized transform coefficients for a current block based on the residual information included in the bitstream, deriving transform coefficients for the current block from the quantized transform coefficients based on an inverse quantization process, deriving residual samples for the current block by applying an inverse transform to the derived transform coefficients, and generating a reconstructed picture based on the residual samples for the current block, wherein the residual information includes transform coefficient level information, and deriving the quantized transform coefficients includes performing a binarization process on the transform coefficient level information based on a Rice parameter, deriving values ​​of the transform coefficient level information based on a result of the binarization process, and deriving the quantized transform coefficients based on the values ​​of the transform coefficient level information, wherein a maximum value of the Rice parameter is 3.

[0021] Because the present invention can be modified in various ways and can have various embodiments, specific embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit the present invention to the specific embodiment. Common terms used in this specification are used merely to describe specific embodiments and are not intended to limit the technical concept of the present invention. A singular expression includes a plural expression unless the context clearly dictates otherwise. In this specification, terms such as "comprise" or "have" specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0022] Meanwhile, each component in the drawings described in the present invention is shown 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 the present invention as long as they do not deviate from the essence of the present invention.

[0023] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. In the following, the same reference numerals will be used to refer to the same components in the drawings, and duplicated descriptions of the same components will be omitted.

[0024] FIG. 1 shows a schematic diagram of an example video / image coding system to which the present invention can be applied.

[0025] 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 transmits encoded video / image information or data to the receiving device in the form of a file or streaming data via a digital storage medium or a network.

[0026] The source device includes a video source, an encoding device, and a sending unit. The receiving device includes a receiving unit, a decoding device, and a renderer. The encoding device may be called a video / image encoding device, and the decoding device may be called a video / image decoding device. The sending unit may be included in the encoding device. The receiving unit may be included in the decoding device. The renderer may include a display unit, which may be a separate device or an external component.

[0027] A video source acquires video / images, such as through a video / image capture, synthesis, or generation process. A video source may include a video / image capture device and / or a video / image generation device. A video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device may include, for example, a computer, a tablet, a smartphone, etc., which (electronically) generate video / images. For example, a virtual video / image may be generated by a computer, in which case a process for generating associated data may replace the video / image capture process.

[0028] An encoding device encodes input video / images. The encoding device performs a series of steps such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video / image information) is output in the form of a bitstream.

[0029] The transmitter transmits 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. Digital storage media include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include elements for generating a media file in a predetermined file format and elements for transmission via a broadcast / communication network. The receiver receives / extracts the bitstream and transmits it to a decoding device.

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

[0031] The renderer renders the decoded video / image, which is then displayed via the display unit.

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

[0033] In this document, various embodiments relating to video / image coding are presented, and unless otherwise stated, said embodiments may also be performed in combination with each other.

[0034] In this document, video may refer to a collection of a series of images over time. A picture generally refers to a unit that shows one image at a specific time, and a slice / tile is a unit that constitutes part of a picture in coding. A slice / tile may include 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 consisting 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 may indicate a specific sequential ordering of CTUs partitioning a picture, where the CTUs may be ordered consecutively in a CTU raster scan within a brick, the bricks within a tile may be ordered consecutively in a raster scan of the bricks of the tile, and the tiles within a picture may be 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 also be referred to as a slice / slice header.

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

[0036] A unit refers to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information about that region. One unit includes 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 a general case, an MxN block includes a set (or array) of samples or transform coefficients consisting of M columns and N rows.

[0037] In this document, " / " and "," are interpreted as "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 "any one of A, B, and / or C." Also, "A, B, C" means "any one of A, B, and / or C." JPEG2025133860000002.jpg20159

[0038] Additionally, in this document, "or" is interpreted as "and / or." For example, "A or B" can mean 1) only "A," 2) only "B," or 3) "A and B." In other words, "or" in this document can mean "additionally or alternatively." JPEG2025133860000003.jpg23150

[0039] 2 is a diagram illustrating the outline of the configuration of a video / image encoding device to which the present invention can be applied. Hereinafter, the term "video encoding device" may include an image encoding device.

[0040] As shown in FIG. 2, the encoding device 200 includes 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 includes an inter predictor 221 and an intra predictor 222. The residual processor 230 includes a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 further includes 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 as 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 as a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.

[0041] 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 are recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to 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 tree structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the ternary tree structure may be applied later. Alternatively, the binary tree structure may be applied first. The coding procedure according to the present invention may be performed based on the final coding unit that is not further divided. In this case, the largest coding unit may be immediately 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 greater depth as necessary, and the coding unit of the optimal size may be used as the final coding unit. Here, the coding procedure includes 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 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.

[0042] The term "unit" may be used interchangeably with terms such as "block" or "area." In a general case, an MxN block refers 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 may refer to only a pixel / pixel value of the luma component or only a pixel / pixel value of the chroma component. A sample may also be used as a term corresponding to one pixel or pel of a picture (or image).

[0043] The encoding device 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 image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, a unit in the encoding device 200 that subtracts the prediction signal (predicted block, prediction sample array) from the input image signal (original block, original sample array) is called the subtraction unit 231. The prediction unit predicts a block to be processed (hereinafter, referred to as a current block) and generates a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is to be applied for each current block or CU. The prediction unit generates various information related to prediction, such as prediction mode information, and transmits the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction information is encoded in the entropy encoding unit 240 and output in the form of a bitstream.

[0044] The intra prediction unit 222 predicts 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, depending on the prediction mode. In intra prediction, prediction modes include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes include, for example, DC mode and planar mode. The directional modes 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.

[0045] The inter prediction unit 221 derives a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. Here, 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 an inter prediction direction (e.g., L0 prediction, L1 prediction, or Bi prediction). 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. 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 (colCU), 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 forms a motion information candidate list based on neighboring blocks and generates information indicating which candidate is used to derive a motion vector and / or a reference picture index for the current block. Inter prediction can be performed based on various prediction modes. For example, in skip mode and merge mode, the inter predictor 221 can use motion information of neighboring blocks as motion information for the current block. In skip mode, unlike merge mode, a residual signal may not be transmitted. In motion vector prediction (MVP) mode, the motion vector of the current block can be indicated by using the motion vector of a neighboring block as a motion vector predictor and signaling a motion vector difference.

[0046] The prediction unit 220 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 prediction of a block, or may simultaneously apply intra prediction and inter prediction. This is called combined inter and intra prediction (CIIP). The prediction unit may also use intra block copy (IBC) prediction mode or palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but can be performed similarly to inter prediction in that a reference block is derived within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. Palette mode can be seen as 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 palette index.

[0047] The prediction signal generated by the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) is used to generate a reconstructed signal or a residual signal. The transform unit 232 generates 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 Karhunen-Loeve transform (KLT), 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 prediction signal generated using all previously reconstructed pixels. The transform process may be applied to square pixel blocks of the same size or non-square variable-size blocks.

[0048] The quantization unit 233 quantizes the transform coefficients and transmits them 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 may generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit 240 may 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 may encode information required for video / image restoration (e.g., values ​​of syntax elements) together with or separately from the quantized transform coefficients. Encoded information (e.g., encoded video / image information) is transmitted or stored in the form of a bitstream in network abstraction layer (NAL) units. The video / image 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), and a video parameter set (VPS). The video / image information may also include general constraint information. In this document, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / image information. The video / image information may be 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 includes a broadcasting network and / or a communication network, and the digital storage medium includes various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) for storing the signal may be configured as an internal / external element of the encoding device 200, or the transmitter may be included in the entropy encoding unit 240.

[0049] The quantized transform coefficients output from the quantizer 233 are used to generate a prediction signal. For example, a residual signal (residual block or residual sample) can be reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantizer 234 and the inverse transformer 235. The adder 155 generates a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter predictor 221 or the intra predictor 222. When there is no residual for the current block, such as when skip mode is applied, a predicted block can 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 may be used for intra prediction of the next block to be processed in the current picture, or may be used for inter prediction of the next picture after filtering, as described below.

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

[0051] 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, adaptive loop filter, and 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 filtering information is encoded in the entropy encoding unit 240 and output in a bitstream format.

[0052] 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 device to avoid prediction mismatch between the encoding device 100 and the decoding device when inter prediction is applied, and also improves coding efficiency.

[0053] The DPB of the memory 270 stores the modified reconstructed picture to be used as a reference picture in the inter predictor 221. The memory 270 stores 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 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 270 stores reconstructed samples of reconstructed blocks in the current picture and transmits them to the intra predictor 222.

[0054] FIG. 3 is a diagram illustrating the outline of the configuration of a video / image decoding device to which the present invention can be applied.

[0055] As shown in FIG. 3, the decoding device 300 includes an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 includes an inter-predictor 331 and an intra-predictor 332. The residual processor 320 includes a dequantizer 321 and an inverse transformer 322. Depending on the embodiment, the entropy decoder 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.

[0056] When a bitstream containing video / image information is input, the decoding device 300 reconstructs an image corresponding to the process by which the video / image information was processed in the encoding device of FIG. 3. For example, the decoding device 300 derives units / blocks based on block division-related information obtained from the bitstream. The decoding device 300 performs decoding using the processing units applied in the encoding device. Accordingly, the processing unit for decoding is, for example, a coding unit, and the coding unit may be divided into a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units may be derived from the coding unit. The reconstructed image signal decoded and output by the decoding device 300 is then reproduced by a playback device.

[0057] The decoding device 300 receives a signal output from the encoding device of FIG. 3 in the form of a bitstream, and the received signal is decoded by an entropy decoding unit 310. For example, the entropy decoding unit 310 parses the bitstream to derive information (e.g., video / image information) necessary for image reconstruction (or picture reconstruction). The video / image 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 / image information may also include general constraint information. The decoding device may decode pictures further based on the information on the parameter sets and / or the general constraint information. Signaling / received information and / or syntax elements, which will be described later in this document, can be obtained from the bitstream by being decoded by the decoding procedure. For example, the entropy decoding unit 310 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. 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 decoded information on neighboring and current blocks or information on symbols / bins decoded in previous stages, predicts the occurrence probability of the bins according to the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to each syntax element. Here, the CABAC entropy decoding method determines a context model and then updates the context model using information on the decoded symbols / bins for the context model of the next symbol / bin.Among the information decoded by the entropy decoding unit 310, information related to prediction 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, are input to a residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, among the information decoded by the entropy decoding unit 310, information related to filtering is provided to a filtering unit 350. Meanwhile, 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, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, 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 may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.

[0058] The inverse quantization unit 321 inverse quantizes the quantized transform coefficients and outputs the transform coefficients. The inverse quantization unit 321 rearranges the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding device. The inverse quantization unit 321 inverse quantizes the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.

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

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

[0061] The prediction unit 320 generates 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 image / video coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but can be performed similarly to inter prediction in that a reference block is derived within the current picture. That is, IBC can use at least one of the inter prediction techniques described in this document. The palette mode can be seen as an example of intra coding or intra prediction. When the palette mode is applied, information regarding a palette table and a palette index may be included in the video / image information and signaled.

[0062] The intra prediction unit 331 predicts the current block by referring to samples in the current picture. The referenced samples are located in the neighborhood of the current block or far away from it depending on the prediction mode. In intra prediction, prediction modes can include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 can also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.

[0063] The inter prediction unit 332 derives a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. Here, 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 the inter prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 332 constructs a motion information candidate list based on the neighboring blocks and derives 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.

[0064] The adder 340 generates 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 the skip mode is applied, the predicted block can be used as the reconstructed block.

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

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

[0067] 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 transmit the modified reconstructed picture to the memory 360, 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.

[0068] 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 stores 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 260 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 360 stores reconstructed samples of blocks reconstructed in the current picture and transmits them to the intra predictor 331.

[0069] In this specification, the embodiments described for the filtering unit 260, inter prediction unit 221 and intra prediction unit 222 of the encoding device 100 can be applied similarly or correspondingly to the filtering unit 350, inter prediction unit 332 and intra prediction unit 331 of the decoding device 300, respectively.

[0070] As described above, prediction is performed to improve compression efficiency during video coding. Accordingly, a predicted block including predicted samples for a current block, which is a block to be coded, can be generated. Here, the predicted block includes predicted samples in the spatial domain (or pixel domain). The predicted block is derived in the same way in an encoding device and a decoding device. The encoding device signals information (residual information) regarding the residual between the original block and the predicted block to the decoding device, rather than the original sample values ​​of the original block, thereby improving image coding efficiency. The decoding device derives a residual block including residual samples based on the residual information, combines the residual block with the predicted block to generate a reconstructed block including reconstructed samples, and generates a reconstructed picture including the reconstructed block.

[0071] The residual information is generated through a transform and quantization procedure. For example, an encoding device may derive a residual block between the original block and the predicted block, perform a transform procedure on residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and signal related residual information (via a bitstream) to a decoding device. Here, the residual information includes information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. The decoding device performs an inverse quantization / inverse transform procedure based on the residual information to derive residual samples (or residual blocks). The decoding device generates a reconstructed picture based on the predicted block and the residual block. The encoding device also derives a residual block by inverse quantizing / inverse transforming the quantized transform coefficients for reference for inter-prediction of a subsequent picture, and generates a reconstructed picture based on the residual block.

[0072] In one embodiment, the (quantized) transform coefficients may be coded and / or decoded based on syntax elements such as transform_skip_flag, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, coded_sub_block_flag, sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, abs_remainder, coeff_sign_flag, mts_idx, etc. Table 1 below shows syntax elements related to residual data coding.

[0073] [Table 1-1]

[0074] [Table 1-2]

[0075] [Table 1-3]

[0076] The transform_skip_flag indicates whether transform is skipped for an associated block. The associated block may be a coding block (CB) or a transform block (TB). The terms CB and TB may be used interchangeably with respect to the transform (and quantization) and residual coding procedures. For example, as described above, residual samples are derived for the CB, and (quantized) transform coefficients are derived by transforming and quantizing the residual samples. Information (e.g., syntax elements) efficiently indicating the position, size, sign, etc. of the (quantized) transform coefficients may be generated and signaled through the residual coding procedure. Quantized transform coefficients may also 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 either a CB or a TB. On the other hand, if the CB is larger than the maximum TB, the target block to be transformed (and quantized) and residual 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 TBs can be mixed with coding blocks (CBs).

[0077] In one embodiment, the (x, y) position information of the last non-zero transform coefficient in a transform block may be coded based on syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_coeff_y_suffix. More specifically, 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, 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, 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 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 coefficients may indicate the non-zero coefficients. The scan order may be a diagonal scan order from top right to bottom left. 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.

[0078] Next, after dividing the transform block into 4x4 sub-blocks, a 1-bit syntax element coded_sub_block_flag can be used for each 4x4 sub-block to indicate whether there are any non-zero coefficients in the current sub-block.

[0079] If coded_sub_block_flag is 0, there is no further information to transmit, so the encoding process for the current sub-block can be terminated. Conversely, if coded_sub_block_flag is 1, the encoding process for sig_coeff_flag can continue. Since the last sub-block containing a non-zero coefficient does not require coding for coded_sub_block_flag, and since sub-blocks containing DC information of transform blocks are likely to contain non-zero coefficients, coded_sub_block_flag can be assumed to be 1 without being coded.

[0080] If coded_sub_block_flag is set to 1, indicating that a non-zero coefficient exists in the current sub-block, sig_coeff_flag, which has a binary value, can be coded in reverse order according to the scanned sequence. A 1-bit syntax element sig_coeff_flag can be coded for each coefficient according to the scanned sequence. If the value of a transform coefficient at the current scanned position is non-zero, the value of sig_coeff_flag can be set to 1. For a sub-block containing the last non-zero coefficient, sig_coeff_flag does not need to be coded for the last non-zero coefficient, so the coding process for the sub-block may be omitted. Level information coding can be performed only when sig_coeff_flag is set to 1, and four syntax elements can be used in the level information coding process. More specifically, each sig_coeff_flag[xC][yC] can indicate whether the level (value) of a corresponding transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero.

[0081] The remaining level value after encoding for sig_coeff_flag is expressed as follows: That is, the syntax element remAbsLevel indicating the level value to be encoded is expressed as follows: Here, coeff means the actual transform coefficient value.

[0082] [Formula 1] remAbsLevel = |coeff| - 1

[0083] The least significant coefficient (LSB) value of remAbsLevel described in Equation 1 can be coded using par_level_flag as shown in Equation 2 below. Here, par_level_flag[n] can indicate the parity of the transform coefficient level (value) at scanning position n. After coding par_level_flag, the transform coefficient level value remAbsLevel to be coded can be updated as shown in Equation 3 below.

[0084] [Formula 2] par_level_flag = remAbsLevel_1

[0085] [Formula 3] remAbsLevel' = remAbsLevel >> 1

[0086] rem_abs_gt1_flag can indicate whether remAbsLevel' at the corresponding scanning position (n) is greater than 1, and rem_abs_gt2_flag can indicate whether remAbsLevel' at the corresponding scanning position (n) is greater than 2. Encoding for abs_remainder can be performed only if rem_abs_gt2_flag is 1. The relationship between the actual transform coefficient value coeff and each syntax element can be summarized as shown in Equation 4 below, and Table 2 below shows an example related to Equation 4. In addition, the sign of each coefficient can be encoded using coeff_sign_flag, which is a 1-bit symbol. |coeff| indicates the transform coefficient level (value) and is represented as AbsLevel for the transform coefficient.

[0087] [Formula 4] | coeff | = sig_coeff_flag + par_level_flag + 2 * (rem_abs_gt1_flag + rem_abs_gt2_flag + abs_remainder)

[0088] [Table 2]

[0089] Meanwhile, in another embodiment, rem_abs_gt2_flag may be called rem_abs_gt3_flag, and in other embodiments, rem_abs_gt1_flag and rem_abs_gt2_flag may appear based on abs_level_gtx_flag[n][j]. abs_level_gtx_flag[n][j] may be a flag indicating whether the absolute value of the transform coefficient level (or the value obtained by shifting the transform coefficient level by 1 to the right) at scanning position n is greater than (j<<1)+1. The rem_abs_gt1_flag may perform the same and / or similar function as abs_level_gtx_flag[n][0], and the rem_abs_gt2_flag may perform the same and / or similar function as abs_level_gtx_flag[n][1]. The (j<<1)+1 may be replaced with a predetermined reference value such as a first reference value or a second reference value, depending on the case.

[0090] The binarization method for each syntax element is shown in Table 3. In Table 3, TR stands for Truncated Rice binarization method, and FL stands for Fixed-Length binarization method. A detailed explanation of each binarization method will be given later.

[0091] [Table 3]

[0092] In one embodiment, the truncated Rice binarization process, the parsing process for the 0th-order Exp-Golomb binarization process, the kth-order Exp-Golomb binarization process, the fixed-length binarization process, the binarization process for abs_remainder, and the Rice parameter derivation process can be realized, for example, by the following English spec:

[0093] 1. Truncated rice binarization process

[0094] The inputs to this process are the requirement for truncated rice (TR) binarization, cMax and cRiceParam.

[0095] The output of this process is a TR binarization that associates each symbolVal value with a corresponding bin string.

[0096] The TR bin string is the concatenation of the prefix bin string and, if present, the suffix bin string.

[0097] For the derivation of the prefix bin string, the following applies:

[0098] - The prefix value for symbolVal, prefixVal is derived as follows:

[0099] prefixVal = symbolVal >> cRiceParam(1)

[0100] The prefix of the -TR bin string is instantiated as follows:

[0101] - If prefixVal is less than cMax >> cRiceParam, the prefix bin string is a bit string of length prefixVal+1 indexed by binIdx. Bins for binIdx less than prefixVal are equal to 1. Bins with binIdx equal to prefixVal are equal to 0. Table 4 shows the bin string for unary binarization of prefixVal.

[0102] Otherwise, the bin string is a bit string of length cMax>>cRiceParam with all bins equal to 1.

[0103] [Table 4]

[0104] When cMax is greater than symbolVal and cRiceParam is greater than 0, a suffix of the TR bin string appears, which is derived as follows:

[0105] - The suffix value suffixVal is derived as follows:

[0106] suffixVal = symbolVal - ((prefixVal) << cRiceParam)(2)

[0107] - The suffix of the TR bin string is specified by calling the fixed - length (FL) binary evolution process specified in 4 sections for suffixVal where the cMax value is equal to (1<<cRiceParam)-1.

[0108] NOTE: For the input parameter cRiceParam = 0, the TR evolution is exactly truncated monadic evolution, which is always called with a cMax value equal to the maximum possible value of the decoded syntax element.

[0109] 2.0 - level Exp - Golomb binary evolution process parsing process

[0110] The syntax element coded by ue(v) is coded in Exp - Golomb. The parsing process for such a syntax element starts by reading the bits from the current position in the bit stream up to the first non - zero bit and counting the number of preceding bits that are zero. This process is specified as follows:

[0111] leadingZeroBits = -1

[0112] for( b = 0;!b; leadingZeroBits++ )(3)

[0113] b = read_bits(1)

[0114] The variable codeNum is assigned as follows:

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

[0116] Here, the value returned by read_bits(leadingZeroBits) is interpreted as a binary representation of an unsigned integer with the most significant bit recorded first.

[0117] Table 5 shows the structure of Exp-Golomb codes by separating the bit string into "prefix" and "suffix." "Prefix" bits are the bits parsed as specified above for the calculation of leadingZeroBits, and are the bits represented as 0 or 1 in the bit string sequence of Table 5. "Suffix" bits are the bits parsed in the calculation of codeNum, and are the bits denoted as xi in Table 5, where i ranges from 0 to leadingZeroBits-1. Each xi is equal to 0 or 1.

[0118] [Table 5]

[0119] Table 6 explicitly assigns bit strings to codeNum values, i.e., the Exp-Golomb bitstream and codeNum are expressed in explicit form and used as ue(v).

[0120] [Table 6]

[0121] The values ​​of the syntax elements are derived by the descriptor as follows:

[0122] If a syntax element is coded with ue(v), the value of the syntax element is equal to codeNum.

[0123] 3.k-order Exp-Golomb binary evolution process

[0124] The input to this process is a request for k-th order Exp-Golomb (EGk) binarization.

[0125] The output of this process is an EGk binarization that associates each symbolVal value with a corresponding bin string.

[0126] The bin string of the EGk binarization process for each symbolVal value is specified as follows, where each call to the put(X) function, where X is either 0 or 1, appends the binary value X to the end of the bin string:

[0127] absV = Abs( symbolVal )

[0128] stopLoop = 0

[0129] do

[0130] if( absV >= ( 1 << k ) ) {

[0131] put( 1 )

[0132] absV = absV - ( 1 << k )

[0133] k++

[0134] } else {

[0135] put( 0 )(5)

[0136] while( k- - )

[0137] put( ( absV >> k ) & 1 )

[0138] stopLoop = 1

[0139] }

[0140] while( !stopLoop )

[0141] NOTE: The specification for the kth order Exp-Golomb (EGk) code uses the opposite meaning of 1 and 0 for the unary part of the 0th order Exp-Golomb code specified in Section 2.

[0142] 4. Fixed-length binarization process

[0143] The inputs to this process are fixed length (FL) binarization and a request for cMax.

[0144] The output of this process is an FL binarization that associates each symbolVal with a corresponding bin string.

[0145] FL binarization is constructed using an unsigned integer bin string of fixedLength bits of the symbol value symbolVal, where fixedLength=Ceil(Log2(cMax×1)). The bin indexing for FL binarization may be as the value of binIdx increases from the most significant bit associated with binIdx=0 to the least significant bit.

[0146] 5. Binary coding process for abs_remainder

[0147] The inputs to this process are the syntax element abs_remainder[n], the color component cIdx, the luma position (x0, y0) specifying the top-left sample of the current luma transform block relative to the top-left luma sample of the picture, the current coefficient scan position (xC, yC), and the binarization requirements for the binary logarithm of the transform block width log2TbWidth and the binary logarithm of the transform block height log2TbHeight.

[0148] The output of this process is the binarization of the syntax elements.

[0149] The Rice parameters cRiceParam are derived by invoking the Rice parameter derivation process specified in Section 6 with the color component index cIdx, luma position (x0, y0), and current coefficient scan position hm of the transform block height log2TbHeight as input.

[0150] The variable cMax is derived from cRiceParam as follows:

[0151] cMax = ( cRiceParam = = 1 ? 6 : 7 ) << cRiceParam (6)

[0152] The binarization of the syntax element abs_remainder[n] is the concatenation of the prefix bin string and (if present) the suffix bin string.

[0153] For the derivation of the prefix bin string, the following applies:

[0154] The prefix value prefixVal of -abs_remainder[n] is derived as follows:

[0155] prefixVal = Min( cMax, abs_remainder[ n ] )(7)

[0156] The prefix bin string is defined by invoking the TR binarization process defined in Section 1 on prefixVal with the variables cMax and cRiceParam as input.

[0157] -When the prefix bin string is a bit string of length 4 with all bits set to 1, there exists a suffix bin string, which is derived as follows:

[0158] - The suffix value, suffixVal, of abs_remainder[n] is derived as follows:

[0159] suffixVal = abs_remainder[ n ] - cMax(8)

[0160] The suffix bin string is specified by invoking the k-th order EGk binarization process specified in Section 3 for the binarization of suffixVal with Exp-Golomb order k being cRiceParam+1.

[0161] 6. Rice parameter derivation process

[0162] The inputs to this process are the color component cIdx, the luma position (x0, y0) which specifies the top left sample of the current transform block relative to the top left sample of the current picture, the current coefficient scan position (xC, yC), the binary logarithm of the transform block width log2TbWidth, and the binary logarithm of the transform block height log2TbHeight.

[0163] The output of this process is the rice parameter cRiceParam.

[0164] Given the syntax element sig_coeff_flag[x][y] and the AbsLevel[x][C] array for a transform block with component index cIdx and top-left luma position (x0, y0), the variable locSumAbs is derived as specified by the following pseudocode:

[0165] locSumAbs = 0

[0166] if( xC < (1 << log2TbWidth) - 1 ) {

[0167] locSumAbs += AbsLevel[ xC + 1 ][ yC ] - sig_coeff_flag[ xC + 1 ][ yC ]

[0168] if( xC < (1 << log2TbWidth) - 2 )

[0169] locSumAbs += AbsLevel[ xC + 2 ][ yC ] - sig_coeff_flag[ xC + 2 ][ yC ]

[0170] if( yC < (1 << log2TbHeight) - 1 )

[0171] locSumAbs += AbsLevel[ xC + 1 ][ yC + 1 ] - sig_coeff_flag[ xC + 1 ][ yC + 1 ](9)

[0172] }

[0173] if( yC < (1 << log2TbHeight) - 1 ) {

[0174] locSumAbs += AbsLevel[ xC ][ yC + 1 ] - sig_coeff_flag[ xC ][ yC + 1 ]

[0175] if( yC < (1 << log2TbHeight) - 2 )

[0176] locSumAbsPass1 += AbsLevelPass1 [ xC ][ yC + 2 ] - sig_coeff_flag[ xC ][ yC + 2 ]

[0177] }

[0178] The rice parameter cRiceParm is derived as follows:

[0179] - if locSumAbs is less than 12, cRiceParm is set to 0;

[0180] Otherwise, if locSumAbs is less than 25, cRiceParm is set to 1;

[0181] - Otherwise (locSumAbs is greater than or equal to 25), cRiceParam is set to 2.

[0182] FIG. 4 is a diagram illustrating an example of deriving Rice parameters for a current transform coefficient based on neighboring reference transform coefficients according to an embodiment.

[0183] As described in Section 6 of the English specification for Figure 3, the Rice parameter for the transform coefficient at the current scan position can be determined based on the level sum of the five already-encoded transform coefficients (shown in light shading in Figure 4) surrounding the current transform coefficient (shown in dark shading in Figure 4) and the value of sig_coeff_flag. In this case, it may be necessary to check each time whether the position of the reference transform coefficient crosses the boundary of the transform block. That is, five boundary check processes are required each time one transform coefficient level is coded. More specifically, since the abs_remainder syntax element requires five times as many boundary check processes as the number of transform coefficients to be coded, the computational complexity increases when there are many transform coefficients with large level values.

[0184] Since the computational complexity increases in proportion to the size of the reference transform coefficients used in the Rice parameter derivation process, the following embodiment proposes a method using less than five reference transform coefficients. Figures 5A to 5C illustrate cases where four, three, and two reference transform coefficients are used, and show various reference transform coefficient usage patterns corresponding to each case. Figures 6A to 6C illustrate various reference transform coefficient usage patterns when one reference transform coefficient is used. Since the purpose of the embodiments of Figures 5A to 6C is to reduce computational complexity by reducing the number of reference transform coefficients, they include all cases where fewer than five reference transform coefficients are used, and are not limited to the above-described embodiments.

[0185] 5A to 5C are diagrams illustrating another example of deriving Rice parameters for a current transform coefficient based on neighboring reference transform coefficients according to some embodiments.

[0186] 5A is a diagram illustrating a process of deriving Rice parameters based on four neighboring reference transform coefficients (shown in light shading in FIG. 5A) for a current transform coefficient. A temporary summation coefficient may be derived during the Rice parameter deriving process. The temporary summation coefficient (e.g., locSumAbs) is initially set to 0, and the value of the temporary summation coefficient (e.g., locSumAbs) is updated as each neighboring reference transform coefficient is detected.

[0187] The process of updating the value of the temporary summation coefficient (eg, locSumAbs) based on the four surrounding reference transform coefficients shown in FIG. 5A is, for example, as shown in Table 7 below.

[0188] [Table 7]

[0189] 5B is a diagram illustrating a process of deriving Rice parameters based on three neighboring reference transform coefficients (shown in light shading in FIG. 5B) for a current transform coefficient. The process of updating the value of a temporary summation coefficient (e.g., locSumAbs) based on the three neighboring reference transform coefficients shown in FIG. 5B is, for example, as shown in Table 8 below.

[0190] [Table 8]

[0191] 5C is a diagram illustrating a process of deriving Rice parameters based on two neighboring reference transform coefficients (shown in light shading in FIG. 5C) for a current transform coefficient. The process of updating the value of a temporary summation coefficient (e.g., locSumAbs) based on the two neighboring reference transform coefficients shown in FIG. 5C is, for example, as shown in Table 9 below.

[0192] [Table 9]

[0193] 6A to 6C are diagrams illustrating another example of deriving Rice parameters for a current transform coefficient based on neighboring reference transform coefficients according to some embodiments.

[0194] 6A to 6C are diagrams illustrating a process of deriving a Rice parameter based on one neighboring reference transform coefficient (shown in light shading in FIGS. 6A to 6C) for a current transform coefficient. FIG. 6A is a diagram illustrating a process of using a neighboring reference transform coefficient located to the right of the current transform coefficient, FIG. 6B is a diagram illustrating a process of using a neighboring reference transform coefficient located diagonally below and to the right of the current transform coefficient, and FIG. 6C is a diagram illustrating a process of using a neighboring reference transform coefficient located below the current transform coefficient.

[0195] The process of updating the value of the temporary summation coefficient (eg, locSumAbs) based on the right-side neighboring reference transform coefficient shown in FIG. 6A is, for example, as shown in Table 10 below.

[0196] [Table 10]

[0197] The process of updating the value of the temporary summation coefficient (eg, locSumAbs) based on the neighboring reference transform coefficients of the diagonal line at the bottom right of FIG. 6B is, for example, as shown in Table 11 below.

[0198] [Table 11]

[0199] The process of updating the values ​​of the temporary summation coefficients (eg, locSumAbs) based on the lower peripheral reference transform coefficients shown in FIG. 6C is, for example, as shown in Table 12 below.

[0200] [Table 12]

[0201] In one embodiment, the Rice parameter for the transform coefficient of the next scan position can be determined based on the locSumAbs value, as disclosed in Section 3 of the English specification in Figure 3. For example, the Rice parameter can be determined based on Equation 5 below.

[0202]

number

[0203] Alternatively, for example, the Rice parameter can be determined based on the following Equation 6.

[0204]

number

[0205] In one embodiment, th1 and th2 in Equation 6 may be smaller than 12 and 25 in Equation 5, respectively, but the embodiment is not limited thereto.

[0206] In one embodiment, when the position of the referenced surrounding reference transform coefficient exceeds the boundary of the transform block, a method of predicting the Rice parameter using the transform coefficient value of the referenceable position, a method of maintaining the previous Rice parameter value as it is without updating it if a previous Rice parameter exists, or a method of replacing it with a specific initial value if a specific initial value exists can be used.

[0207] Furthermore, the method for determining the scan order is not limited to the diagonal scan method, and if the coefficient scan method is changed, the pattern may be changed.

[0208] FIG. 7 illustrates a process for deriving quantized coefficients for a 2×2 block according to an embodiment.

[0209] In one embodiment, Figure 7 shows an example of quantized coefficients in a 2x2 sub-block during coding of a chrominance block. The coding results for the reverse diagonal scanned coefficients in Figure 7 are shown in Table 13 below. In Table 13, scan_pos indicates the position of the coefficient according to the reverse diagonal scan. The coefficient scanned first in the 2x2 block, i.e., the bottom right corner, has a scan_pos value of 3, and the coefficient scanned last, i.e., the top left corner, has a scan_pos value of 0.

[0210] [Table 13]

[0211] In one embodiment, the number of syntax elements rem_abs_gt2_flag may be limited during the encoding process for 2x2 sub-blocks of a chrominance block. As shown in Table 1, the main syntax elements for 2x2 sub-blocks include sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, abs_remainder, and coeff_sign_flag. Among these, sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag contain information about context coding bins that are encoded using a regular coding engine, and abs_remainder and coeff_sign_flag contain information about bypass bins that are encoded using a bypass coding engine. Context coding bins exhibit high data dependency because they use probability states and ranges updated while processing previous bins. That is, since the context coding bins can only encode / decode the next bin after the current bin has been fully encoded / decoded, parallel processing may be difficult. Also, it may take a lot of time to read the probability interval and determine the current state. Therefore, in one embodiment, a method is proposed to improve the CABAC processing amount by reducing the number of context coding bins and increasing the number of bypass bins.

[0212] In one embodiment, coefficient level information is coded in reverse scan order. That is, the coefficients are scanned from the bottom right of the unit block to the top left, and then coded. Generally, coefficient levels scanned first in the reverse scan order tend to have smaller values. For such coefficients, the length of the binarized bins used to indicate the coefficient levels can be reduced by using sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag. Each syntax element can be efficiently coded using arithmetic coding according to a previously coded context based on a defined context.

[0213] However, for some coefficient levels with large values, i.e., coefficient levels located at the upper left corner of a unit block, using sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag may not be useful for improving compression performance, and may also reduce coding efficiency.

[0214] In one embodiment, the number of context coding bins can be reduced by quickly switching syntax elements (sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag) that are coded in context coding bins to abs_remainder syntax elements that are coded based on the bypass coding engine, i.e., coded in bypass bins.

[0215] In one embodiment, the number of coefficients coded by rem_abs_gt2_flag may be limited. The maximum number of rem_abs_gt2_flag that can be coded in a 2x2 block may be 4. That is, rem_abs_gt2_flag may be coded for all coefficients whose absolute value is greater than 2. In one example, rem_abs_gt2_flag may be coded only for the first N coefficients (i.e., coefficients whose rem_abs_gt1_flag is 1) having an absolute value greater than 2 in the scanning order. N may be selected by the encoder or may be set to any value between 0 and 4. When the encoder limits the context coding bins for luma or chroma 4x4 sub-blocks in a similar manner to this embodiment, N may be calculated based on the limit value used at that time. To calculate N, use the context coding bin limit value (N) for luma or chroma 4x4 sub-blocks as shown in Equation 7. 4×4) can be used as is, or since the number of 2×2 subblock pixels is 4, N can be calculated using Equation 8. Here, a and b are constants and are not limited to specific values.

[0216] [Formula 7] N = N 4x4

[0217] [Formula 8] N = {N 4×4 >> (4 - a)} + b

[0218] Similarly, N can be calculated using the horizontal and / or vertical size values ​​of the sub-blocks. Since the sub-blocks are square, the horizontal and vertical size values ​​are the same. Since the horizontal or vertical size value of a 2x2 sub-block is 2, N can be calculated using Equation 9 below.

[0219] [Formula 9] N = {N 4×4 >> (a - 2)} + b

[0220] Table 14 below shows an example of application when N is 1. Since the coding for rem_abs_gt2_flag can be reduced by the amount indicated by X in a 2x2 block, the number of context coding bins can be reduced. The abs_remainder values ​​of coefficients for scan positions where coding for rem_abs_gt2_flag is not performed are changed compared to Table 13.

[0221] [Table 14]

[0222] In one embodiment, the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag can be limited in 2x2 sub-block coding of chrominance blocks. When the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag is limited to K, K has a value between 0 and 12. In one example, when the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag does not exceed K and is not coded, rem_abs_gt2_flag may also not be coded.

[0223] K can be selected by the encoder and can be set to any value between 0 and 12. If the encoder limits the context coding bins for the luma or chroma 4x4 sub-blocks, K can be calculated based on the limit value used at this time. As a method of calculating K, the limit value (K) for the context coding bins for the luma or chroma 4x4 sub-blocks is calculated as shown in Equation 10 below. 4×4 ) can be used as is, or since the number of 2×2 subblock pixels is 4, K can be calculated using Equation 11. Here, a and b are constants and are not limited to specific values.

[0224] [Formula 10] K = K 4x4

[0225] [Formula 11] K = {K 4x4 >> (4 - a)} + b

[0226] Similarly, K can be calculated using the horizontal / vertical size values ​​of the sub-block. Since the sub-block has a square shape, the horizontal size value and the vertical size value are the same. Since the horizontal or vertical size value of a 2x2 sub-block is 2, K can be calculated using Equation 12.

[0227] [Formula 12] K = {K 4×4>> (a - 2)} + b

[0228] Table 15 below shows the case where K is limited to 6.

[0229] [Table 15]

[0230] In one embodiment, in 2x2 sub-block coding of chrominance blocks, the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag and the number of rem_abs_gt2_flag may be limited separately. That is, the method of limiting the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag and the method of limiting the number of rem_abs_gt2_flag may be combined. When the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag is limited to K and the number of rem_abs_gt2_flag is limited to N, K may have a value from 0 to 12, and N may have a value from 0 to 4.

[0231] K and N can be determined by the encoder or calculated based on the contents described in relation to Equations 7 to 12.

[0232] Table 16 below shows an example where K is limited to 6 and N is limited to 1.

[0233] [Table 16]

[0234] In one embodiment, a method of changing the encoding order of par_level_flag and rem_abs_gt1_flag may be used. For example, instead of encoding par_level_flag and rem_abs_gt1_flag in that order, a method of encoding rem_abs_gt1_flag and par_level_flag is proposed. In one example, such a change in the encoding order is applied when encoding a 2x2 sub-block of a chrominance block. By changing the order of par_level_flag and rem_abs_gt1_flag, rem_abs_gt1_flag is encoded after sig_coeff_flag, and par_level_flag is encoded only when rem_abs_gt1_flag is 1. Therefore, the relationship between coeff, which is an actual transform coefficient value, and each syntax element is changed as shown in Equation 13 below.

[0235] [Formula 13] | coeff | = sig_coeff_flag + rem_abs_gt1_flag + par_level_flag + 2 * (rem_abs_gt2_flag + abs_remainder)

[0236] Comparing Table 17 below with Table 2, when |coeff| is 1, par_level_flag is not coded, so the embodiment according to Table 16 has advantages in terms of processing amount and coding. Of course, when |coeff| is 2, rem_abs_gt2_flag needs to be coded unlike Table 2, and when |coeff| is 4, abs_remainder needs to be coded unlike Table 2. However, since |coeff| is generally 1 more often than |coeff| is 2 or 4, the method according to Table 17 exhibits higher processing amount and coding performance than the method according to Table 2. In one example, the result of coding the 4x4 sub-blocks as shown in FIG. 7 is as shown in Table 18 below.

[0237] [Table 17]

[0238] [Table 18]

[0239] In one embodiment, a method is provided for limiting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag, even though the encoding order of par_level_flag and rem_abs_gt1_flag is changed. That is, when encoding is performed in the order of sig_coeff_flag, rem_abs_gt1_flag, par_level_flag, rem_abs_gt2_flag, abs_remainder, and coeff_sign_flag, a method is provided for limiting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag. When the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag is limited to K, K has a value between 0 and 12. K can be selected by the encoder or can be set to any value between 0 and 12. Also, it can be calculated based on the method described above in relation to Equations 10 to 12.

[0240] In one embodiment, when sig_coeff_flag, rem_abs_gt1_flag and par_level_flag are not further coded, rem_abs_gt2_flag may also not be coded. Table 19 below shows an example where K is 6.

[0241] [Table 19]

[0242] In one embodiment, the syntax elements sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag can be coded within one for loop in the syntax. Although the sum of the three syntax elements (sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag) does not exceed K, coding can be stopped at the same scan position even if the sum does not exactly match K. Table 19 below shows an example where K is 8. When coding is performed up to scan position 2, the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag is 6. Although this value does not exceed K, the coding device (or encoder) may not know whether the number of context coding bins generated at scan_pos=1 is 1, 2, or 3 because it does not know the coefficient level value of the next scan position 1 (scan_pos=1). In this case, the encoding device can only encode up to scan_pos=2 and then terminate encoding. Therefore, although the K value is different, the encoding results shown in Table 19 and Table 20 below may be the same.

[0243] [Table 20]

[0244] In one embodiment, the coding order of par_level_flag and rem_abs_gt1_flag is changed, but a method for limiting the number of rem_abs_gt2_flag is provided. That is, when coding is performed in the order of sig_coeff_flag, rem_abs_gt1_flag, par_level_flag, rem_abs_gt2_flag, abs_remainder, and coeff_sign_flag, a method for limiting the sum of coefficients coded by rem_abs_gt2_flag is provided. In one example, the number of rem_abs_gt2_flag coded within a 2x2 block may be four. That is, rem_abs_gt2_flag is coded for all coefficients whose absolute value is greater than 2. In another example, rem_abs_gt2_flag may be coded only for the first N coefficients having an absolute value greater than 2 according to the scan order (i.e., coefficients whose rem_abs_gt1_flag is 1). N can be selected by the encoder, can be set to any value between 0 and 4, or can be calculated based on the method described above in relation to Equations 7 to 9.

[0245] Table 21 shows an example when N is 1. Since the coding for rem_abs_gt2_flag can be reduced by the number of Xs in a 4x4 block, the number of context coding bins can be reduced. Compared to Table 18, the abs_remainder value of the coefficient for the scan position where coding for rem_abs_gt2_flag is not performed is changed as shown in Table 21 below.

[0246] [Table 21]

[0247] In one embodiment, the encoding order of par_level_flag and rem_abs_gt1_flag is changed, but a method is provided in which the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag and the number of rem_abs_gt2_flag are limited. That is, when encoding is performed in the order of sig_coeff_flag, rem_abs_gt1_flag, par_level_flag, rem_abs_gt2_flag, abs_remainder, and coeff_sign_flag, the method of limiting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag can be combined with the method of limiting the number of rem_abs_gt2_flag. When the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag is limited to K and the number of rem_abs_gt2_flag is limited to N, K has a value from 0 to 12 and N has a value from 0 to 4. K and N can be selected by the encoder, and K can be set to any value from 0 to 12 and N can be set to any value from 0 to 4. Alternatively, they can be calculated based on the contents described with respect to Equations 7 to 12.

[0248] Table 22 shows an example where K is 6 and N is 1.

[0249] [Table 22]

[0250] According to one embodiment, a method for simplifying the step of determining the Rice parameter used to define the Golomb code for abs_remainder when the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag is limited in 2x2 or 4x4 sub-block coding of a chrominance block is provided. In one embodiment, referring again to FIG. 4, the Rice parameter for a transform coefficient at a current scan position can be determined based on the level sum of five already-coded transform coefficients (shown in light shading in FIG. 4) surrounding the current transform coefficient (shown in dark shading in FIG. 4) and information about sig_coeff_flag. Table 22 below shows pseudo code related to FIG. 4. Referring to Table 23 below, it can be seen that the pseudo code requires a check each time to see if the position of a reference transform coefficient crosses a transform block boundary. That is, five boundary check processes are required each time one transform coefficient level is coded. Even when encoding the abs_remainder syntax element, a boundary check process for transform coefficients corresponding to five times the number of objects that need to be encoded is required, so if there are many transform coefficients with large level values, the computational complexity increases.

[0251] [Table 23]

[0252] In one embodiment, in a method of deriving cRiceParam, which indicates a rice parameter, if locSumAbs is less than 12, the value of cRiceParam may be 0; if locSumAbs is less than 25, the value of cRiceParam may be 1; and if the value of locSumAbs is 25 or greater, the value of cRiceParam may be 2.

[0253] In one embodiment, when limiting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag, abs_remainder is determined differently in the following three cases: In the method of limiting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag, different coding processes are applied to sub-blocks according to the following (i), (ii), and (iii). (i) indicates the case where sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag are all present, (ii) indicates the case where only sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag are present, and (iii) indicates the case where sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag are not present.

[0254] In the case of (i), the relationship between the actual transform coefficient value coeff and abs_remainder is as shown in Equation 4, in the case of (ii), as shown in Equation 14, and in the case of (iii), as shown in Equation 15.

[0255] [Formula 14] | coeff | = sig_coeff_flag + par_level_flag + 2 * (rem_abs_gt1_flag + abs_remainder)

[0256] [Formula 15] |coeff|=abs_remainder

[0257] Since the computational complexity increases in proportion to the size of the reference transform coefficients used in the process of deriving the Rice parameter, in one embodiment, the Rice parameter can be derived based on the previous level value in a 4x4 or 2x2 sub-block scan order only for chrominance block coding. Here, the Rice parameter is initialized to 0 only at the start of a sub-block, and is not initialized in steps (i), (ii), and (iii) where abs_remainder within the sub-block is coded. In sub-block coding, the Rice parameter is incremented by 1 when the previous level value is greater than th1, th2, or th3. In the present invention, th1 and th2 are not limited to specific values. In one embodiment, th1 is set to 1, 2, or 3, th2 is set to 4, 5, or 6, and th3 is set to 10, 11, or 12.

[0258] In one embodiment, in 2x2 or 4x4 sub-block coding of chrominance blocks, a method is provided for simplifying the Rice parameter determination step used to define the Golomb code for rem_remainder when the coding order of par_level_flag and rem_abs_gt1_flag is changed but the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag and par_level_flag is limited.

[0259] When changing the encoding order of par_level_flag and rem_abs_gt1_flag, if the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag is restricted, abs_remainder can be determined differently in the following three cases: According to the method of restricting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag, the following (i), (ii), and (iii) are checked in relation to one sub-block. (i) is the case where sig_coeff_flag, rem_abs_gt1_flag, par_level_flag, and rem_abs_gt2_flag all exist, (ii) is the case where only sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag exist, and (iii) is the case where sig_coeff_flag, rem_abs_gt1_flag, par_level_flag, and rem_abs_gt2_flag do not exist.

[0260] In the case of (i), the relationship between the actual transform coefficient value coeff and abs_remainder is as shown in Equation 13, in the case of (ii), as shown in Equation 16, and in the case of (iii), as shown in Equation 15.

[0261] [Formula 16] | coeff | = sig_coeff_flag + rem_abs_gt1_flag + par_level_flag + (2 * abs_remainder)

[0262] Since the computational complexity increases in proportion to the size of the reference transform coefficients used in the process of deriving the Rice parameter, one embodiment provides a method for deriving the Rice parameter using the previous level value in a 4x4 or 2x2 sub-block scan order, limited to chrominance block coding. The Rice parameter is initialized to 0 only at the start of a sub-block, and is not initialized in steps (i), (ii), and (iii) of coding abs_remainder within the sub-block. In sub-block coding, the Rice parameter is incremented by 1 when the previous level value is greater than th1, th2, or th3. In the present invention, th1 and th2 are not limited to specific values. In one embodiment, th1 is determined to be 1, 2, or 3, th2 is determined to be 4, 5, or 6, and th3 is determined to be 10, 11, or 12.

[0263] 8A and 8B are diagrams illustrating the configuration and operation of an entropy encoding unit according to an embodiment.

[0264] According to an embodiment, a 0th order Rice code to a maximum 2nd order Rice code may be used, and the degree of the Rice code may be expressed as a Rice code. Increasing the degree of the Rice code, i.e., the value of the maximum Rice parameter, is advantageous because fewer bits can be allocated when a large input value is input. Table 24 below illustrates codeword lengths from a 0th order Rice code to a 3rd order Rice code. It can be seen that when an input value is greater than 11, binarizing with a 3rd order Rice code results in a shorter codeword length than with a 2nd order Rice code. Therefore, in one embodiment, a method for increasing the maximum allowable Rice code degree, i.e., the value of the maximum Rice parameter, in transform coefficient level coding is provided.

[0265] [Table 24]

[0266] As the maximum Rice parameter increases, Equation 6, which classifies the Rice parameters based on locSumAbs, can be modified as shown in Equation 17. Equation 17 shows an example in which up to the third order Rice code is used.

[0267]

number

[0268] 8A and 8B, the encoding device (entropy encoding unit) 240 may perform a residual coding procedure on the (quantized) transform coefficients. As described above, the encoding device may perform residual coding on the (quantized) transform coefficients in the current block (current CB or current TB) in accordance with the scan order. The encoding device generates and encodes various syntax elements related to residual information, for example, as shown in Table 1.

[0269] Specifically, the encoding apparatus derives a value for abs_remainder by coding sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, etc., and derives a Rice parameter for abs_remainder (S800). The Rice parameter is derived based on the surrounding reference transform coefficients, as described above. More specifically, the Rice parameter for (the transform coefficients of) the current scanning position may be derived based on the locSumAbs, which may be derived based on the AbsLevel and / or sig_coeff_flag of the surrounding reference transform coefficients. The positions and number of the surrounding reference transform coefficients include those described above with reference to FIGS. 4 to 6C. The Rice parameter derivation procedure is performed by the Rice parameter derivation unit 242 in the entropy encoding unit 240.

[0270] The encoding apparatus binarizes the value of abs_remainder based on the derived Rice parameter (S810). The binarization procedure may be performed as described in Section 5 (Binarization Process for abs_remainder) of the English Specification included in the description of FIG. 3. The encoding apparatus may derive a bin string for the abs_remainder through the binarization procedure. The binarization procedure may be performed by the binarization unit 244 in the entropy encoding unit 240. According to the present invention, the length of the bin string for the value of abs_remainder may be adaptively determined based on the Rice parameter as described above. For example, as shown in Table 23, the length of the value to be coded may be adaptively determined based on the Rice parameter. According to the present invention, the Rice parameter for the value of abs_remainder of a current transform coefficient may be derived based on neighboring reference transform coefficients, thereby adaptively allocating a shorter bin string to the value of abs_remainder of the current transform coefficient than when a fixed Rice parameter is used.

[0271] It is obvious to those skilled in the art that the Rice parameter derivation procedure can be omitted for sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, etc., which are binarized based on FL without using Rice parameters. For sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, etc., binarization according to Section 4 (Fixed-length binarization process) of the English specification included in the description of FIG. 3 can be performed instead of binarization based on Rice parameters.

[0272] The encoding device performs entropy encoding based on the bin string for the abs_remainder (S820). The encoding device can entropy encode the bin string based on the context using an entropy coding technique such as CABAC (context-adaptive arithmetic coding) or CAVLC (context-adaptive variable length coding), and the output can be included in a bitstream. The entropy encoding procedure is performed by the entropy encoding processor 244 in the entropy encoding unit 240. The bitstream can include various information for image / video decoding, such as prediction information, in addition to residual information including information about abs_remainder, as described above. The bitstream is transmitted to a decoding device via a (digital) storage medium or a network.

[0273] 9A and 9B are diagrams illustrating the configuration and operation of an entropy decoding unit according to one embodiment.

[0274] 9A and 9B, a decoding device (entropy decoding unit) decodes encoded residual information to derive (quantized) transform coefficients. As described above, the decoding device decodes encoded residual information for a current block (current CB or current TB) to derive (quantized) transform coefficients. For example, the decoding device decodes various syntax elements related to residual information, such as those shown in Table 1, and derives the (quantized) transform coefficients based on the values ​​of the associated syntax elements.

[0275] Specifically, the decoding apparatus derives Rice parameters for abs_remainder (S900). The Rice parameter derivation may be performed based on the surrounding reference transform coefficients, as described above. Specifically, the Rice parameters for (the transform coefficients of) the current scanning position may be derived based on the locSumAbs, which may be derived based on the AbsLevel and / or sig_coeff_flag of the surrounding reference transform coefficients. The positions and number of the surrounding reference transform coefficients include those described above with reference to FIGS. 4 to 6C. The Rice parameter derivation procedure is performed by the Rice parameter derivation unit 312 in the entropy decoding unit 310.

[0276] The decoding apparatus binarizes the abs_remainder based on the derived Rice parameter (S910). The binarization procedure is the same as that described in Section 5 (Binarization Process for abs_remainder) of the English Specification included in the description of FIG. 3. The decoding apparatus derives usable bin strings for usable values ​​of abs_remainder through the binarization procedure. The binarization procedure is performed by the binarization unit 314 in the entropy decoding unit 310. According to the present invention, the length of the bin string for the abs_remainder value can be adaptively determined based on the Rice parameter as described above. For example, as shown in Table 23, the length of the value to be coded can be adaptively determined based on the Rice parameter. According to the present invention, the Rice parameter for the abs_remainder value of the current transform coefficient can be derived based on neighboring reference transform coefficients, thereby adaptively allocating a shorter bin string to the abs_remainder value of the current transform coefficient than when a fixed Rice parameter is used.

[0277] The decoding device performs entropy decoding on the abs_remainder (S920). The decoding device sequentially parses and decodes each bin for the abs_remainder and compares the derived bin string with the available bin string. If the derived bin string is the same as one of the available bin strings, the value corresponding to the bin string can be derived as the value of the abs_remainder. If not, the next bit in the bitstream can be further parsed and decoded, and then the comparison procedure can be performed. This process allows specific information (specific syntax elements) to be signaled using variable-length bits without using start or end bits for the information in the bitstream. This allows the decoding device to allocate relatively fewer bits to low values, thereby improving overall coding efficiency.

[0278] The decoding device can entropy decode each bin in the bin string from the bitstream based on the context using an entropy coding technique such as CABAC or CAVLC. The entropy decoding procedure is performed by the entropy decoding processor 316 in the entropy decoding unit 310. The bitstream includes various information for image / video decoding, such as prediction information, in addition to residual information including information about abs_remainder, as described above.

[0279] It is obvious to those skilled in the art that the Rice parameter derivation procedure can be omitted for sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, etc., which are binarized based on FL without using Rice parameters. For sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, etc., binarization according to clause 4 (Fixed-length binarization process) of the English specification included in the description of FIG. 3, which is not binarized based on Rice parameters, can be performed.

[0280] The bitstream includes various information for image / video decoding, such as prediction information, as well as residual information including information about abs_remainder, as described above. As described above, the bitstream can be transmitted to a decoding device via a (digital) storage medium or a network.

[0281] The decoding device derives residual samples for the current block by performing inverse quantization and / or inverse transform procedures based on the (quantized) transform coefficients. As described above, reconstructed samples are generated based on the residual samples and prediction samples derived by inter / intra prediction, and a reconstructed picture including the reconstructed samples is generated.

[0282] FIG. 10 is a flowchart illustrating an entropy encoding method of an encoding device according to an embodiment.

[0283] S810 to S820 described above in FIG. 8A may be included in S1040 in FIG.

[0284] S1000 is performed by the inter prediction unit 221 or the intra prediction unit 222 of the encoding device, and S1010, S1020, S1030, and S1040 are performed by the subtraction unit 231, transformation unit 232, quantization unit 233, and entropy encoding unit 240 of the encoding device, respectively.

[0285] According to an embodiment, an encoding apparatus derives prediction samples by predicting a current block (S1000). The encoding apparatus determines whether to perform inter prediction or intra prediction on the current block, and determines a specific inter prediction mode or a specific intra prediction mode based on an RD cost. Depending on the determined mode, the encoding apparatus derives prediction samples for the current block.

[0286] According to an embodiment, an encoding apparatus derives residual samples by comparing original samples and the predicted samples for the current block (S1010).

[0287] According to an embodiment, the encoding apparatus derives transform coefficients by a transform procedure on the residual samples (S1020), and quantizes the derived transform coefficients to derive quantized transform coefficients (S1030).

[0288] An encoding apparatus according to an embodiment encodes image information including prediction information and residual information, and outputs the encoded image information in the form of a bitstream (S1040). The prediction information is information related to the prediction procedure, such as prediction mode information, information related to motion information (e.g., when inter-prediction is applied), etc. The residual information is information related to the quantized transform coefficients, such as the information disclosed in Table 1 above.

[0289] The output bitstream is transmitted to a decoding device via a storage medium or a network.

[0290] FIG. 11 is a flowchart illustrating an entropy decoding method of a decoding device according to an embodiment.

[0291] S910 to S920 described above in FIG. 9 may be included in S1110 in FIG.

[0292] S1100 is performed by the inter prediction unit 260 or intra prediction unit 265 of the decoding device. The procedure of decoding prediction information included in the bitstream in S1100 and deriving values ​​of related syntax elements is performed by the entropy decoding unit 310 of the encoding device. S1110, S1120, S1130, and S1140 are performed by the entropy decoding unit 210, inverse quantization unit 220, inverse transform unit 230, and adder 235 of the decoding device, respectively.

[0293] A decoding device according to an embodiment may perform operations corresponding to those performed by the encoding device. The decoding device performs inter prediction or intra prediction on a current block based on received prediction information, and derives prediction samples (S1100).

[0294] According to an embodiment, a decoding apparatus derives quantized transform coefficients for the current block based on received residual information (S1110).

[0295] A decoding apparatus according to an embodiment dequantizes the quantized transform coefficients to derive transform coefficients (S1120).

[0296] According to an embodiment, the decoding apparatus derives residual samples by performing an inverse transform procedure on the transform coefficients (S1130).

[0297] According to an embodiment, 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, an in-loop filtering procedure can be further applied to the reconstructed picture, as described above.

[0298] FIG. 12 is a flowchart showing the operation of the encoding device according to one embodiment, and FIG. 13 is a block diagram showing the configuration of the encoding device according to one embodiment.

[0299] The encoding apparatus according to Figures 12 and 13 can perform operations corresponding to those of the decoding apparatus according to Figures 14 and 15. Therefore, the operations of the decoding apparatus described later in Figures 14 and 15 can be similarly applied to the encoding apparatus according to Figures 12 and 13.

[0300] The steps disclosed in Fig. 12 are performed by the encoding device 200 disclosed in Fig. 2. More specifically, S1200 is performed by the subtraction unit 231 disclosed in Fig. 2, S1210 is performed by the conversion unit 232 disclosed in Fig. 2, S1220 is performed by the quantization unit 233 disclosed in Fig. 2, and S1230 is performed by the entropy encoding unit 240 disclosed in Fig. 2. In addition, the operations of S1200 to S1230 are based on part of the content described above in Figs. 4 to 11. Therefore, the description of specific content that overlaps with the content described above in Figs. 2 and 4 to 11 will be omitted or simplified.

[0301] 13, an encoding device according to an embodiment includes a subtraction unit 231, a transformation unit 232, a quantization unit 233, and an entropy encoding unit 240. However, in some cases, not all of the components illustrated in FIG. 13 may be essential components of the encoding device, and the encoding device may be realized with more or fewer components than those illustrated in FIG.

[0302] In an encoding device according to one embodiment, the subtraction unit 231, the transformation unit 232, the quantization unit 233, and the entropy encoding unit 240 may each be implemented by a separate chip, or at least two or more components may be implemented by a single chip.

[0303] An encoding apparatus according to an embodiment derives residual samples for a current block (S1200). More specifically, a subtraction unit 231 of the encoding apparatus derives residual samples for the current block.

[0304] According to an embodiment, the encoding apparatus derives transform coefficients by transforming residual samples for a current block (S1210). More specifically, the transform unit 232 of the encoding apparatus transforms residual samples for a current block to derive transform coefficients.

[0305] According to an embodiment, the encoding apparatus derives quantized transform coefficients from the transform coefficients based on the quantization process (S1220). More specifically, the quantization unit 233 of the encoding apparatus derives the quantized transform coefficients from the transform coefficients based on the quantization process.

[0306] According to an embodiment, the encoding apparatus encodes residual information including information about the quantized transform coefficients (S1230). More specifically, the entropy encoding unit 240 of the encoding apparatus encodes the residual information including information about the quantized transform coefficients.

[0307] In one embodiment, the residual information includes transform coefficient level information, and encoding the residual information includes performing a binarization process on the transform coefficient level information based on a Rice parameter to derive a binarized value of the transform coefficient level information, and encoding the binarized value of the transform coefficient level information. In one example, the Rice parameter is denoted as cRiceParam.

[0308] In one embodiment, the maximum value of the rice parameter may be 3. In one example, the maximum value of cRiceParam may be 3.

[0309] In one embodiment, an initialization process is performed to derive at least one Rice parameter for a current sub-block included in the current block.

[0310] In one embodiment, a Rice parameter for a current transform coefficient in the current sub-block is derived based on a previous Rice parameter for a transform coefficient in a previous order of the current transform coefficient, and if the current transform coefficient is the first transform coefficient of the current sub-block, the value of the previous Rice parameter for the previous transform coefficient may be 0. In one example, the previous Rice parameter is denoted as lastRiceParam. In one example, the size of the current sub-block may be 2x2 or 4x4.

[0311] In one embodiment, the Rice parameter for the current transform coefficient is derived based on neighboring reference transform coefficients of the current transform coefficient, and the number of the neighboring reference transform coefficients may be four or less.

[0312] In one embodiment, a temporary summation coefficient is derived based on the neighboring reference transform coefficients, and if the value of the temporary summation coefficient is smaller than a first critical value, the value of the Rice parameter is determined to be 0, if the value of the temporary summation coefficient is equal to or larger than the first critical value but smaller than a second critical value, the value of the Rice parameter is determined to be 1, if the value of the temporary summation coefficient is equal to or larger than the second critical value but smaller than a third critical value, the value of the Rice parameter is determined to be 2, and if the value of the temporary summation coefficient is equal to or larger than the third critical value, the value of the Rice parameter is determined to be 3. In one example, the temporary summation coefficient may be denoted as locSumAbs.

[0313] In one embodiment, the first critical value may be 1, 2, or 3, the second critical value may be 4, 5, or 6, and the third critical value may be 10, 11, or 12. In one example, the first critical value is denoted as th1, the second critical value is denoted as th2, and the third critical value is denoted as th3.

[0314] 12 and 13, the encoding apparatus derives residual samples for a current block (S1200), derives transform coefficients by transforming the residual samples for the current block (S1210), derives quantized transform coefficients from the transform coefficients based on a quantization process (S1220), and encodes residual information including information on the quantized transform coefficients (S1230), wherein the residual information includes transform coefficient level information, and the step of encoding the residual information includes the steps of deriving a binarized value of the transform coefficient level information by performing a binarization process on the transform coefficient level information based on a Rice parameter, and encoding the binarized value of the transform coefficient level information, wherein the maximum value of the Rice parameter is 3. That is, by setting the maximum value of the Rice parameter to 3, residual coding can be performed efficiently.

[0315] FIG. 14 is a flowchart showing the operation of the decoding device according to one embodiment, and FIG. 15 is a block diagram showing the configuration of the decoding device according to one embodiment.

[0316] The steps disclosed in Fig. 14 are performed by the decoding device 300 disclosed in Fig. 3. More specifically, steps S1400 to S1410 are performed by the entropy decoding unit 310 disclosed in Fig. 3, step S1420 is performed by the inverse quantization unit 321 disclosed in Fig. 3, step S1430 is performed by the inverse transform unit 322, and step S1440 is performed by the addition unit 340. In addition, the operations of steps S1400 to S1440 are based on part of the content described above with reference to Figs. 4 to 11. Therefore, the description of specific content that overlaps with the content described above with reference to Figs. 3 to 11 will be omitted or simplified.

[0317] 15, a decoding device according to one embodiment includes an entropy decoding unit 310, an inverse quantization unit 321, an inverse transform unit 322, and an addition unit 340. However, in some cases, not all of the components shown in FIG. 15 may be essential components of the decoding device, and the decoding device may be realized with more or fewer components than those shown in FIG.

[0318] In one embodiment of the decoding device, the entropy decoding unit 310, the inverse quantization unit 321, the inverse transform unit 322, and the addition unit 340 may each be implemented by a separate chip, or at least two or more components may be implemented by one chip.

[0319] A decoding device according to an embodiment receives a bitstream including residual information (S1400). More specifically, an entropy decoding unit 310 of the decoding device receives a bitstream including residual information.

[0320] According to an embodiment, a decoding device derives quantized transform coefficients for a current block based on residual information included in a bitstream (S1410). More specifically, an entropy decoding unit 310 of the decoding device derives quantized transform coefficients for the current block based on residual information included in the bitstream.

[0321] According to an embodiment, a decoding device derives transform coefficients from the quantized transform coefficients through an inverse quantization process (S1420). More specifically, an inverse quantization unit 321 of the decoding device derives transform coefficients from the quantized transform coefficients through an inverse quantization process.

[0322] According to an embodiment, the decoding device derives residual samples for the current block by applying an inverse transform to the derived transform coefficients (S1430). More specifically, the inverse transform unit 322 of the decoding device derives residual samples for the current block by applying an inverse transform to the derived transform coefficients.

[0323] According to an embodiment, the decoding apparatus generates a reconstructed picture based on the residual samples for the current block (S1440). More specifically, the adder 340 of the decoding apparatus generates the reconstructed picture based on the residual samples for the current block.

[0324] In one embodiment, the residual information includes transform coefficient level information, and the step of deriving the quantized transform coefficients includes the steps of performing a binarization process on the transform coefficient level information based on a Rice parameter, deriving a value of the transform coefficient level information based on a result of the binarization process, and deriving the quantized transform coefficients based on the value of the transform coefficient level information. In one example, the Rice parameter is denoted as cRiceParam.

[0325] In one embodiment, the maximum value of the rice parameter may be 3. In one example, the maximum value of cRiceParam may be 3.

[0326] In one embodiment, an initialization process is performed to derive at least one Rice parameter for a current sub-block included in the current block.

[0327] In one embodiment, a Rice parameter for a current transform coefficient in the current sub-block is derived based on a previous Rice parameter for a transform coefficient in a previous order of the current transform coefficient, and if the current transform coefficient is the first transform coefficient of the current sub-block, the value of the previous Rice parameter for the previous transform coefficient may be 0. In one example, the previous Rice parameter is denoted as lastRiceParam. In one example, the size of the current sub-block may be 2x2 or 4x4.

[0328] In one embodiment, the Rice parameter for the current transform coefficient is derived based on neighboring reference transform coefficients of the current transform coefficient, and the number of the neighboring reference transform coefficients may be four or less.

[0329] In one embodiment, a temporary summation coefficient is derived based on the neighboring reference transform coefficients, and if the value of the temporary summation coefficient is less than a first critical value (e.g., th1), the value of the Rice parameter is determined to be 0, if the value of the temporary summation coefficient is equal to or greater than the first critical value and less than a second critical value (e.g., th2), the value of the Rice parameter is determined to be 1, if the value of the temporary summation coefficient is equal to or greater than the second critical value and less than a third critical value (e.g., th3), the value of the Rice parameter is determined to be 2, and if the value of the temporary summation coefficient is equal to or greater than the third critical value, the value of the Rice parameter is determined to be 3. In one example, the temporary summation coefficient is denoted as locSumAbs.

[0330] In one embodiment, the first critical value may be 1, 2, or 3, the second critical value may be 4, 5, or 6, and the third critical value may be 10, 11, or 12. In one example, the first critical value is denoted as th1, the second critical value is denoted as th2, and the third critical value is denoted as th3.

[0331] According to the decoding device and the operating method of the decoding device disclosed in Figures 14 and 15, the decoding device receives a bitstream including residual information (S1400), derives quantized transform coefficients for a current block based on the residual information included in the bitstream (S1410), derives transform coefficients from the quantized transform coefficients based on an inverse quantization process (S1420), derives residual samples for the current block by applying an inverse transform to the derived transform coefficients (S1430), and generates a reconstructed picture based on the residual samples for the current block (S1440), wherein the residual information includes transform coefficient level information, and the step of deriving the quantized transform coefficients includes the steps of performing a binarization process on the transform coefficient level information based on a Rice parameter, deriving a value of the transform coefficient level information based on a result of the binarization process, and deriving the quantized transform coefficients based on the value of the transform coefficient level information, and the maximum value of the Rice parameter is 3. That is, the maximum value of the Rice parameter is set to 3, so that residual coding can be performed efficiently.

[0332] In the above-described embodiments, the method is described based on a flowchart as a series of steps or blocks, but the present invention is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps described above. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and other steps may be included, or one or more steps of the flowchart may be deleted without affecting the scope of the present invention.

[0333] The above-described method according to the present invention may be implemented in the form of software, and the encoding device and / or decoding device according to the present invention may be included in an image processing device such as a TV, a computer, a smartphone, a set-top box, or a display device.

[0334] When an embodiment of the present invention is implemented in software, the above-described method can be implemented with modules (processes, functions, etc.) that perform the above-described functions. The modules can be stored in memory and executed by a processor. The memory can be located inside or outside the processor and can be connected to the processor by various well-known means. The processor can include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory can 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 in the present invention can be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in the figures can 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 can be stored on a digital storage medium.

[0335] In addition, the decoding device and encoding device to which the present invention is 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 conversation 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 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 video signals and data signals. For example, over-the-top (OTT) video devices 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.

[0336] Furthermore, the processing method according to the present invention can 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 present invention can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices on 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 implemented in the form of carrier waves (e.g., transmission via the Internet). The bitstream generated by the encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0337] Furthermore, the embodiments of the present invention may be realized as a computer program product with program code, the program code being executed on a computer according to the embodiments of the present invention. The program code may be stored on a computer-readable carrier.

[0338] FIG. 16 shows an example of a content streaming system to which the invention disclosed in this document can be applied.

[0339] As shown in FIG. 16, the content streaming system to which the present invention is applied includes an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.

[0340] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, or video camera 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, or camcorder directly generates a bitstream, the encoding server may be omitted.

[0341] The bitstream is generated by an encoding method or a bitstream generating method to which the present invention is applied, and the stream server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0342] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server serves as a medium for informing 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. Here, the content streaming system may include a separate control server, which controls commands and responses between devices in the content streaming system.

[0343] The streaming server receives content from a media repository and / or an encoding server. For example, when receiving content 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.

[0344] Examples of the user device include a mobile phone, a smartphone, a laptop computer, a digital broadcasting terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), a navigation system, a slate PC, a tablet PC, an ultrabook, a wearable device (e.g., a smartwatch, smart glass, or a head mounted display (HMD)), a digital TV, a desktop computer, and a digital signage.

[0345] 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. An image decoding method performed by a decoding device, obtaining residual information from the bitstream; deriving quantized transform coefficients for a current block based on the residual information; deriving transform coefficients based on the quantized transform coefficients; deriving residual samples for the current block based on the transform coefficients; generating a reconstructed picture based on the residual samples for the current block; The residual information is a significant coefficient flag indicating whether the quantized transform coefficient is a significant coefficient other than zero; a parity level flag for the parity of transform coefficient levels for the quantized transform coefficients; a first transform coefficient level flag relating to whether the transform coefficient level is greater than a first reference value; a second transform coefficient level flag relating to whether the transform coefficient level is greater than a second reference value; and a remainder information of the transform coefficient level, the first reference value and the second reference value are predetermined specific values, the predetermined specific value for the first reference value is 1; the predetermined specific value for the second reference value is 3; deriving the quantized transform coefficients includes deriving the quantized transform coefficients based on decoding the parity level flag and decoding the first transform coefficient level flag; the decoding of the first transform coefficient level flag is performed before the decoding of the parity level flag; A method in which the quantized transform coefficients are derived based on the calculation of (the value of the significant coefficient flag + the value of the first transform coefficient level flag + the value of the parity level flag + (2 x the value of the second transform coefficient level flag) + (2 x the value of the remainder information)).

2. An image encoding method performed by an encoding device, deriving a residual sample for the current block; deriving transform coefficients for the current block based on the residual samples; deriving quantized transform coefficients based on the transform coefficients; encoding residual information including information related to the quantized transform coefficients; The residual information is a significant coefficient flag indicating whether the quantized transform coefficient is a significant coefficient other than zero; a parity level flag for the parity of transform coefficient levels for the quantized transform coefficients; a first transform coefficient level flag relating to whether the transform coefficient level is greater than a first reference value; a second transform coefficient level flag relating to whether the transform coefficient level is greater than a second reference value; and a remainder information of the transform coefficient level, the first reference value and the second reference value are predetermined specific values, the predetermined specific value for the first reference value is 1; the predetermined specific value for the second reference value is 3; The encoding of the residual information comprises: encoding the parity level flag; encoding the first transform coefficient level flag; the encoding of the first transform coefficient level flag is performed before the encoding of the parity level flag; A method in which the encoding result for the quantized transform coefficient is derived based on the calculation of (the value of the significant coefficient flag + the value of the first transform coefficient level flag + the value of the parity level flag + (2 x the value of the second transform coefficient level flag) + (2 x the value of the remainder information)).

3. In a method for transmitting data relating to an image, obtaining a bitstream relating to the image, the bitstream comprising: deriving a residual sample for the current block; deriving transform coefficients for the current block based on the residual samples; deriving quantized transform coefficients based on the transform coefficients; encoding residual information including information related to the quantized transform coefficients; transmitting the data including the bitstream; The residual information is a significant coefficient flag indicating whether the quantized transform coefficient is a significant coefficient other than zero; a parity level flag for the parity of transform coefficient levels for the quantized transform coefficients; a first transform coefficient level flag relating to whether the transform coefficient level is greater than a first reference value; a second transform coefficient level flag relating to whether the transform coefficient level is greater than a second reference value; and a remainder information of the transform coefficient level, the first reference value and the second reference value are predetermined specific values, the predetermined specific value for the first reference value is 1; the predetermined specific value for the second reference value is 3; The encoding of the residual information comprises: encoding the parity level flag; encoding the first transform coefficient level flag; the encoding of the first transform coefficient level flag is performed before the encoding of the parity level flag; A method in which the encoding result for the quantized transform coefficient is derived based on the calculation of (the value of the significant coefficient flag + the value of the first transform coefficient level flag + the value of the parity level flag + (2 x the value of the second transform coefficient level flag) + (2 x the value of the remainder information)).

Citation Information

Patent Citations

  • Throughput improvements for CABAC coefficient level coding

    JP2015507424A

  • Coefficient level coding in video coding

    US20170064336A1

  • Method of determining binary codewords for transform coefficients

    WO2013070970A2

  • Entropy coding of transform coefficients suitable for dependent scalar quantization

    WO2020007785A1

  • Image signal encoding / decoding method and apparatus therefor

    WO2020060328A1