Residual Coding Method and Apparatus Thereof

The method optimizes residual coding by using a Rice parameter with a maximum value of 3 and initializing sub-blocks, addressing the need for efficient compression of high-resolution images/videos, including VR and AR content, to reduce transmission and storage costs.

JP7708941B2Active Publication Date: 2025-07-15LG ELECTRONICS INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2024131050
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-09-24
Filing Date
2024-08-07
Publication Date
2025-07-15
Estimated Expiration
2039-08-30

AI Technical Summary

Technical Problem

The increasing demand for high-resolution and high-quality images/videos, including immersive media like VR and AR content, necessitates a highly efficient image/video compression technology to reduce transmission and storage costs while maintaining quality.

Method used

A method and apparatus for enhancing image coding efficiency by performing a binary process on residual information based on a Rice parameter with a maximum value of 3, and initializing Rice parameters for sub-blocks within a current block during residual coding.

Benefits of technology

Improves overall compression efficiency of images/videos and enhances residual coding efficiency through optimized binary processing of residual information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007708941000032
    Figure 0007708941000032
  • Figure 0007708941000033
    Figure 0007708941000033
  • Figure 0007708941000034
    Figure 0007708941000034
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 image coding technology, and more particularly, to a residual coding method and apparatus in an image coding system.

Background Art

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

[0003] Also, recently, the interest and demand for immersive media such as VR (Virtual Reality), AR (Artificial Reality) content, and holograms have been increasing, and the broadcasting of images / videos having image characteristics different from real images, such as game images, has been increasing.

[0004] Therefore, a highly efficient image / video compression technology is required to effectively compress, transmit, store, or reproduce the information of high-resolution and high-quality images / videos having various characteristics as described above.

Summary of the Invention

Problems to be Solved by the Invention

[0005] A technical problem of the present invention is to provide a method and apparatus for enhancing image coding efficiency.

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

[0007] Another technical problem of the present invention is to provide a method and an apparatus for enhancing the residual coding efficiency by performing a binary process on residual information based on a Rice parameter.

[0008] Another technical problem of the present invention is to provide a method and an apparatus for performing residual coding by setting the maximum value of the Rice parameter to 3.

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

Means for Solving the Problems

[0010] According to an embodiment of the present invention, an image decoding method performed by a decoding apparatus is provided. The method includes 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, applying an inverse transform to the derived transform coefficients to derive residual samples for the current block, and generating a restored picture based on the residual samples for the current block. The residual information includes transform coefficient level information. The step of deriving the quantized transform coefficients includes 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. The maximum value of the rice parameter is 3.

[0011] According to another embodiment of the present invention, a decoding apparatus for performing image decoding is provided. The decoding apparatus includes an entropy decoding unit that receives a bitstream including residual information and derives quantized transform coefficients for a current block based on the residual information included in the bitstream, an inverse quantization unit that derives transform coefficients from the quantized transform coefficients based on an inverse quantization process, an inverse transform unit that applies an inverse transform to the derived transform coefficients to derive residual samples for the current block, and an addition unit that generates a restored picture based on the residual samples for the current block. 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 a value of the transform coefficient level information based on a result of the binarization process, derives the quantized transform coefficients based on the value of the transform coefficient level information, and is characterized in that a maximum value of the Rice parameter is 3.

[0012] According to still another embodiment of the present invention, an image encoding method performed by an encoding apparatus is provided. The method includes steps of deriving residual samples for a current block, converting the residual samples for the current block to derive transform coefficients, deriving quantized transform coefficients from the transform coefficients based on a quantization process, and encoding residual information including information regarding the quantized transform coefficients. The residual information includes transform coefficient level information. The step of encoding the residual information includes steps of performing a binarization process on the transform coefficient level information based on a Rice parameter to derive a binarization value of the transform coefficient level information and encoding the binarization value of the transform coefficient level information, and is characterized in that a maximum value of the Rice parameter is 3.

[0013] According to another embodiment of the present invention, an encoding device for performing image encoding is provided. The encoding device includes a subtraction unit that derives a residual sample for a current block, a conversion unit that converts the residual sample for the current block to derive conversion coefficients, a quantization unit that derives quantized conversion coefficients from the conversion coefficients based on a quantization process, and an entropy encoding unit that encodes residual information including information regarding the quantized conversion coefficients. The residual information includes coefficient conversion level information, and the entropy encoding unit performs a binary process on the conversion coefficient level information based on a Rice parameter to derive a binary value of the conversion coefficient level information, encodes the binary value of the conversion coefficient level information, and is characterized in that a maximum value of the Rice parameter is 3.

Advantages of the Invention

[0014] According to the present invention, the overall compression efficiency of images / videos can be improved.

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

[0016] According to the present invention, a binary process can be performed on residual information based on a Rice parameter to improve the residual coding efficiency.

[0017] According to the present invention, the maximum value of the Rice parameter is set to 3, and residual coding can be efficiently performed.

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

Brief Description of the Drawings

[0019]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5A

Figure 5B

Figure 5C

Figure 6A

Figure 6B

Figure 6C

Figure 7

Figure 8A

Figure 8B

Figure 9A

Figure 9B

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Mode for Carrying Out the Invention

[0020] According to an embodiment of the present invention, an image decoding method performed by a decoding device is provided. The method includes 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, applying an inverse transform to the derived transform coefficients to derive residual samples for the current block, and generating a restored picture based on the residual samples for the current block. The residual information includes transform coefficient level information. The step of deriving the quantized transform coefficients includes 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. The maximum value of the rice parameter is 3.

[0021] Since the present invention can be variously modified 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 specific embodiments. The terms commonly used in this specification are used only for explaining specific embodiments and are not intended to limit the technical idea of the present invention. Singular expressions include plural expressions unless the context clearly gives a different meaning. In this specification, terms such as "including" or "having" specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should not be understood as precluding the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

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

[0023] Hereinafter, with reference to the accompanying drawings, preferred embodiments of the present invention will be described in more detail. Hereinafter, the same reference numerals are used for the same components in the drawings, and duplicate descriptions of the same components are omitted.

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

[0025] As shown in FIG. 1, the video / image coding system includes a first device (source device) and a second device (receiver device). The source device transmits encoded video / image information or data in the form of a file or a stream to the receiver device via a digital storage medium or a network.

[0026] The source device includes a video source, an encoding device, and a transmission unit. The receiver device includes a reception unit, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmission unit may be included in the encoding device. The reception unit may be included in the decoding device. The renderer may include a display unit, and the display unit may be composed of a separate device or an external component.

[0027] The video source acquires video / images through processes such as video / image capture, synthesis, or generation. The video source may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. The video / image generation device includes, for example, computers, tablets, and smartphones, etc., and (electronically) generates video / images. For example, virtual video / images are generated by a computer or the like, and in this case, the process of generating related data may replace the video / image capture process.

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

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

[0030] The decoding device decodes the video / image by performing a series of procedures such as inverse quantization, inverse transformation, prediction, etc. corresponding to the operations of the encoding device.

[0031] The renderer renders the decoded video / image. The rendered video / image is 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 the methods disclosed in the VVC (versatile video coding) standard, EVC (essential video coding) standard, AV1 (AOMedia Video 1) standard, AVS2 (2nd generation of audio video coding standard) or next-generation video / image coding standards (such as H.267 or H.268, etc.).

[0033] In this document, various embodiments related to video / image coding are presented, and unless otherwise mentioned, the embodiments can also be combined with each other.

[0034] In this document, video may mean a set of a series of images over time. Picture generally means a unit indicating one image in a specific time period, and slice / tile is a unit that constitutes a part of a picture in coding. A slice / tile may include one or more CTUs (coding tree units). One picture is composed of one or more slices / tiles. One picture is composed of one or more tile groups. One tile group includes one or more tiles. A brick represents a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each of which consisting of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may be also referred to as a brick.A brick scan may show a specific sequential ordering of CTUs partitioning a picture, where the CTUs may be ordered consecutively in a CTU raster scan within a brick, bricks within a tile may be ordered consecutively in a raster scan of the bricks of the tile, and tiles in 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 width specified by syntax elements in the picture parameter set and a height equal to the height of the picture. A tile scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A slice includes an integer number of bricks of a picture that may be exclusively contained in a single NAL unit. A slice may consists of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile. In this document, tile groups and slices may be used interchangeably.For example, in this document, a tile group / tile group header may be referred to as a slice / slice header.

[0035] A pixel or pel means the smallest unit that constitutes one picture (or image). Also, the term "sample" may be used as a term corresponding to a pixel. A sample can generally indicate a pixel or a pixel value, can indicate only the pixel / pixel value of the luma component, or can indicate only the pixel / pixel value of the chroma component.

[0036] A unit indicates a basic unit of image processing. A unit may include at least one of a specific region of a picture and information regarding the region. One unit includes one luma block and two chroma (e.g., cb, cr) blocks. A unit may be used interchangeably with terms such as "block" or "area" in some cases. In a general case, an M×N block includes a set (or array) of samples (or sample array) 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" also means "any one of A, B, and / or C". JPEG0007708941000001.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". JPEG0007708941000002.jpg23150

[0039] FIG. 2 is a diagram for explaining the schematic configuration of a video / image encoding apparatus to which the present invention can be applied. Hereinafter, the video encoding apparatus may include an image encoding apparatus.

[0040] As shown in FIG. 2, the encoding apparatus 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 called a reconstructor or a reconstructed block generator. The above-described image partitioner 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filter 260 may be configured by one or more hardware components (for example, an encoder chipset or a processor) according to an embodiment. Also, the memory 270 may include a DPB (decoded picture buffer) and may be configured by a digital storage medium. The hardware component may further include the memory 270 as an internal / external component.

[0041] The image segmentation unit 210 can divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. As an example, the processing unit may be referred to as a coding unit (CU). In this case, the coding unit is recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a QTBTTT (Quad-tree binary-tree ternary-tree) structure. For example, one coding unit can be divided into a plurality of coding units with a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. In this case, for example, the quad-tree structure may be applied first, and the binary-tree structure and / or the ternary-tree structure may be applied later. Or the binary-tree structure may be applied first. The coding procedure according to the present invention can be performed based on the final coding unit that is no longer divided. In this case, based on the coding efficiency according to the image characteristics, etc., the largest coding unit can be immediately used as the final coding unit, or, if necessary, the coding unit can be recursively divided into coding units with a deeper depth, and the coding unit with the optimal size can be used as the final coding unit. Here, the coding procedure 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: Prediction Unit) or a transform unit (TU: Transform Unit). In this case, the prediction unit and the transform unit can be divided or partitioned from the aforementioned final coding unit respectively. 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 unit may, in some cases, be used interchangeably with terms such as "block" or "area". In general, an M×N block represents a set of samples or transform coefficients consisting of M columns and N rows. Samples generally represent pixels or pixel values, and may represent only the pixel / pixel values of the luma component, or only the pixel / pixel values of the chroma component. A sample may be used as a term corresponding to a pixel or pel of one picture (or image).

[0043] The encoding device 200 subtracts the prediction signal (predicted block, predicted sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, the unit that subtracts the prediction signal (predicted block, predicted sample array) from the input image signal (original block, original sample array) within the encoding device 200 is called the subtraction unit 231. The prediction unit performs prediction on the block to be processed (hereinafter referred to as the current block) and generates a predicted block including predicted samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit generates various information related to prediction, such as prediction mode information, and transmits it to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The information related to prediction 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 within the current picture. The samples to be referred to may be located in the neighborhood of the current block or away from it according to the prediction mode. In intra prediction, the prediction mode includes a plurality of non-directional modes and a plurality of directional modes. The non-directional modes include, for example, the DC mode and the Planar mode. The directional modes include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the degree of fineness of the prediction direction. However, this is an example, and more or fewer directional prediction modes may be used according to the settings. The intra prediction unit 222 can also determine the prediction mode to be applied to the current block by using the prediction mode applied to the neighboring blocks.

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

[0046] The prediction unit 220 can generate a prediction signal based on various prediction methods described later. For example, the prediction unit can apply not only intra prediction or inter prediction for the prediction of one block, but also can apply intra prediction and inter prediction simultaneously. This is called CIIP (combined inter and intra prediction). Also, the prediction unit can be based on the intra block copy (IBC) prediction mode for the prediction of a block, or can be based on the palette mode. The IBC prediction mode or the palette mode can be used for content image / video coding such as games, for example, like SCC (screen content coding). IBC basically performs prediction within the current picture, but can be performed in the same way as inter prediction in terms of deriving a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, the sample values within the picture can be signaled based on information regarding the palette table and the 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 restored signal or is used to generate a residual signal. The conversion unit 232 applies a conversion technique to the residual signal to generate transform coefficients. For example, the conversion technique includes at least one of DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen-Loeve Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Here, GBT means a conversion obtained from this graph when representing the relationship information between pixels by a graph. CNT means a conversion obtained based on generating a prediction signal using all previously reconstructed pixels. Also, the conversion process may be applied to a pixel block having the same size of a square or may be applied to a block of a variable size that is not square.

[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 regarding the quantized transform coefficients) and outputs it as a bitstream. The information regarding the quantized transform coefficients may be referred to as residual information. The quantization unit 233 can reorder the quantized transform coefficients in block form into a one-dimensional vector based on the coefficient scan order, and can also generate the information regarding the quantized transform coefficients based on the quantized transform coefficients in the form of the one-dimensional vector. The entropy encoding unit 240 can perform various encoding methods such as, for example, exponential Golomb, CAVLC (context-adaptive variable length coding), CABAC (context-adaptive binary arithmetic coding). The entropy encoding unit 240 can encode, together or separately, information necessary for video / image restoration (such as values of syntax elements) in addition to the quantized transform coefficients. The encoded information (such as encoded video / image information) is transmitted or stored in units of NAL (network abstraction layer) units in the form of a bitstream. The video / image information may further include information regarding 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). Also, the video / image information may further include general constraint information. In this document, the information and / or syntax elements transmitted / signaled from the encoding device to the decoding device may be included in the video / image information. The video / image information can 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 broadcast network and / or a communication network, etc., and the digital storage medium includes various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The signal output from the entropy encoding unit 240 may be configured as an internal / external element of the encoding device 200 by a transmission unit (not shown) for transmission and / or a storage unit (not shown) for storage, or the transmission unit may be included in the entropy encoding unit 240.

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

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

[0051] The filtering unit 260 can apply filtering to the restored signal to improve subjective / objective image quality. For example, the filtering unit 260 applies various filtering methods to the restored picture to generate a modified restored picture, and stores the modified restored 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, bilateral filter, and the like. The filtering unit 260 generates various information related to filtering as described later in the description of each filtering method and transmits it to the entropy encoding unit 240. The information related to filtering is encoded in the entropy encoding unit 240 and output in the form of a bit stream.

[0052] The modified restored picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 221. The encoding device can thereby avoid prediction mismatches between the encoding device 100 and the decoding device when inter prediction is applied, and can also improve the encoding efficiency.

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

[0054] FIG. 3 is a diagram for explaining an 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 apparatus 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 321. The entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 described above may be configured by one hardware component (for example, a decoder chipset or a processor) according to an embodiment. Further, the memory 360 may include a DPB (decoded picture buffer) and may be configured by a digital storage medium. The hardware component may further include the memory 360 as an internal / external component.

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

[0057] The decoding device 300 receives the signal output from the encoding device in FIG. 3 in the form of a bitstream, and the received signal is decoded by the entropy decoding unit 310. For example, the entropy decoding unit 310 parses the bitstream to derive information (e.g., video / image information) necessary for image restoration (or, picture restoration). The video / image information may further include information regarding various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). Also, the video / image information may further include general constraint information. The decoding device can decode a picture based on the information regarding the parameter set and / or the general constraint information. The signaling / received information and / or syntax elements described later in this document can be decoded by the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 can decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the value of the syntax element necessary for image restoration and the quantized value of the conversion coefficient regarding the residual. More specifically, the CABAC entropy decoding method receives the bin corresponding to each syntax element in the bitstream, determines a context model using the syntax element information to be decoded, the information of the surrounding and decoded blocks, or the information of the symbol / bin decoded in the previous stage, predicts the occurrence probability of the bin according to the determined context model, and performs arithmetic decoding of the bin to generate the symbol corresponding to each syntax element. Here, after determining the context model, the CABAC entropy decoding method updates the context model using the information of the symbol / bin decoded for the context model of the next symbol / bin.Among the information decoded by the entropy decoding unit 310, the information related to prediction is provided to the prediction unit (inter prediction unit 332 and intra prediction unit 331), and the residual value obtained by performing entropy decoding in the entropy decoding unit 310, that is, the quantized transform coefficient and related parameter information, is input to the residual processing unit 320. The residual processing unit 320 can derive a residual signal (residual block, residual sample, residual sample array). Also, the information related to filtering among the information decoded by the entropy decoding unit 310 is provided to the filtering unit 350. On the other hand, a receiving unit (not shown) that receives 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. On the other hand, the decoding device according to this document may be referred to as a video / image / picture decoding device, and the decoding device may be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, inverse transform unit 322, addition unit 340, filtering unit 350, memory 360, inter prediction unit 332, and intra prediction unit 331.

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

[0059] In the inverse conversion unit 322, the conversion coefficients are inversely converted 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 to be applied to the current block based on the information regarding the prediction 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 described later. For example, the prediction unit can apply not only intra prediction or inter prediction for predicting one block, but also can apply intra prediction and inter prediction simultaneously. This may be referred to as CIIP (combined inter and intra prediction). Further, the prediction unit can be based on the intra block copy (IBC) prediction mode for predicting a block, or can be based on the palette mode. The IBC prediction mode or the palette mode can be used for content image / video coding such as games, for example, like SCC (screen content coding). IBC basically performs prediction within the current picture, but can be performed in the same way as inter prediction in terms of deriving a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, information regarding the palette table and the palette index can be included in and signaled in the video / image information.

[0062] The intra prediction unit 331 predicts the current block by referring to samples within the current picture. The samples to be referred to are located either adjacent to or away from the current block according to the prediction mode. In intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 can also determine the prediction mode to be applied to the current block by using the prediction mode applied to the neighboring blocks.

[0063] The inter prediction unit 332 derives a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. Here, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information can further include information on the inter prediction direction (such as L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing within the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter prediction unit 332 constructs a motion information candidate list based on the neighboring blocks, and derives the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter prediction can be performed based on various prediction modes, and the information regarding the prediction can include information indicating the mode of inter prediction for the current block.

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

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

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

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

[0068] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter prediction unit 332. The memory 360 stores the motion information of the blocks for which the motion information in the current picture has been derived (or decoded) and / or the motion information of the blocks in the already reconstructed picture. The stored motion information is transmitted to the inter prediction unit 260 for utilization as the motion information of spatial neighboring blocks or the motion information of temporal neighboring blocks. The memory 360 stores the reconstructed samples of the blocks reconstructed in the current picture and transmits them to the intra prediction unit 331.

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

[0070] As described above, in performing video coding, prediction is performed to improve the compression efficiency. Thereby, a predicted block including prediction samples for the current block, which is the block to be coded, can be generated. Here, the predicted block includes prediction samples in the spatial domain (or pixel domain). The predicted block is derived in the same manner in the encoding device and the decoding device, and the encoding device can improve the image coding efficiency by signaling to the decoding device information (residual information) regarding the residual between the original block and the predicted block instead of the original sample value of the original block itself. The decoding device can derive a residual block including residual samples based on the residual information, and combine the residual block and the predicted block to generate a reconstructed block including reconstructed samples, and can generate a reconstructed picture including the reconstructed block.

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

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

[0073]

Table 1-1

[0074]

Table 1-2

[0075]

Table 1-3

[0076] The transform_skip_flag indicates whether the transformation is skipped for the associated block. The associated block can be a CB (coding block) or a TB (Transform block). For the transformation (and quantization) and the residual coding procedure, the CB and the TB may be used interchangeably. For example, as described above, residual samples are derived for the CB, and the (quantized) transform coefficients can be derived by the transformation and quantization of the residual samples. Information (e.g., syntax elements) that efficiently indicates the position, size, sign, etc. of the (quantized) transform coefficients can be generated and signaled by the residual coding procedure. The quantized transform coefficients may be simply referred to as transform coefficients. Generally, when 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 block to be transformed (and quantized) and residually coded may be referred to as a CB or a TB. On the other hand, when the CB is larger than the maximum TB, the block to be transformed (and quantized) and residually coded may be referred to as a TB. Hereinafter, it will be described that the syntax elements related to the residual coding are signaled in units of transform blocks (TBs), but this is an example, and as described above, the TB can be used interchangeably with the coding block (CB).

[0077] In one embodiment, the (x, y) position information of the last non-zero transform coefficient in the transform block can be encoded based on the 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 cofficient in the scanning order within the transform block. Here, the significant coefficient can indicate the non-zero coefficient. The scanning order can be a top-right diagonal scanning order. Alternatively, the scanning order can be a horizontal scanning order or a vertical scanning order. The scanning order can be determined based on whether intra / inter prediction is applied to the target block (CB, or CB including TB) and / or the specific intra / inter prediction mode.

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

[0079] If the value of coded_sub_block_flag is 0, since there is no more information to transmit, the encoding process for the current sub-block can be terminated. Conversely, if the value of coded_sub_block_flag is 1, the encoding process for sig_coeff_flag can be continued. The sub-block containing the last non-zero coefficient does not require encoding for coded_sub_block_flag, and the sub-block containing the DC information of the transform block is likely to contain non-zero coefficients, so coded_sub_block_flag can be assumed to have a value of 1 without being encoded.

[0080] If, because the value of coded_sub_block_flag is 1, it is determined that there are non-zero coefficients in the current sub-block, conversely, sig_coeff_flag having a binary value can be encoded according to the scanned order. For each coefficient according to the scan order, a 1-bit syntax element sig_coeff_flag can be encoded. If the value of the transform coefficient at the current scan position is non-zero, the value of sig_coeff_flag can be 1. Here, for the sub-block containing the last non-zero coefficient, since it is not necessary to encode sig_coeff_flag for the last non-zero coefficient, the encoding process for the said sub-block may be omitted. Level information encoding can be executed only when sig_coeff_flag is 1, and four syntax elements can be used in the process of level information encoding. More specifically, each sig_coeff_flag[xC][yC] can indicate whether the level (value) of the 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 as shown in the following Equation 1. That is, the syntax element remAbsLevel indicating the level value to be encoded is as shown in the following Equation 1. Here, coeff means the actual conversion coefficient value.

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

[0083] The least significant coefficient (LSB) value of remAbsLevel described in Equation 1 can be encoded as shown in the following Equation 2 by par_level_flag. Here, par_level_flag[n] can indicate the parity of the conversion coefficient level (value) at the scanning position n. After encoding par_leve_flag, the conversion coefficient level value remAbsLevel to be encoded can be updated as shown in the following Equation 3.

[0084] [Equation 2] par_level_flag = remAbsLevel_1

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

[0086] The rem_abs_gt1_flag can indicate whether remAbsLevel’ at the scanning position (n) is greater than 1, and the rem_abs_gt2_flag can indicate whether remAbsLevel’ at the scanning position (n) is greater than 2. Encoding for abs_remainder can be performed only when the rem_abs_gt2_flag is 1. When organizing the relationship between the actual conversion coefficient value coeff and each syntax element, for example, it is as shown in the following Equation 4, and Table 2 below shows an example related to Equation 4. Also, the sign of each coefficient can be encoded using the coeff_sign_flag which is a 1-bit symbol. |coeff| indicates the conversion coefficient level (value) and is displayed as AbsLevel for the conversion coefficient.

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

[0088] [Table 2]

[0089] On the other hand, in another embodiment, rem_abs_gt2_flag may be referred to as rem_abs_gt3_flag. In still another embodiment, rem_abs_gt1_flag and rem_abs_gt2_flag may also 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 conversion coefficient level (or a value obtained by shifting the conversion coefficient level one bit to the right) at the scanning position n is greater than (j << 1)+1. The rem_abs_gt1_flag can perform the same and / or similar functions as abs_level_gtx_flag[n][0], and the rem_abs_gt2_flag can perform the same and / or similar functions as abs_level_gtx_flag[n][1]. The (j << 1)+1 may be replaced by a predetermined reference value such as a first reference value, a second reference value, etc. in some cases.

[0090] The binary evolution method for each syntax element is as shown in Table 3 below. In Table 3, TR means the Truncated Rice binary evolution method, and FL means the Fixed-Length binary evolution method. A detailed description of each binary evolution method will be described later.

[0091]

Table 3

[0092] In one embodiment, the Truncated Rice binary evolution process, the parsing process for the 0th order Exp-Golomb binary evolution process, the kth order Exp-Golomb binary evolution process, the fixed-length binary evolution process, the binary evolution process for abs_remainder, the Rice parameter derivation process, etc. can be realized, for example, by the following English specification (spec).

[0093] 1. Truncated Rice binary evolution processing

[0094] The inputs to this process are the request for Truncated Rice (TR) binning, cMax, and cRiceParam.

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

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

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

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

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

[0100] - The prefix of the TR bin string is materialized 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. The bins for binIdx less than prefixVal are equal to 1. The bin for which binIdx is equal to prefixVal is 0. Table 4 shows the bin string for the unary binning of prefixVal.

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

[0103] [Table 4]

[0104] When cMax is greater than symbolVal and cRiceParam is greater than 0, the 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 monomial evolution, which is always called with a cMax value equal to the maximum possible value of the decoded syntax element.

[0109] 2.0th Parsing Process for Exp - Golomb Binary Evolution 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 from read_bits(leadingZeroBits) is interpreted as the binary representation of an unsigned integer with the most significant bit recorded first.

[0117] Table 5 shows the structure of the Exp-Golomb code by separating the bit string into a "prefix" and a "suffix". The "prefix" bits are the bits that are parsed as shown above for the calculation of leadingZeroBits, and are the bits represented by 0 or 1 in the bit string column of Table 5. The "suffix" bits are the bits that are 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 shows the assignment of bit strings to codeNum values. That is, the Exp-Golomb bit stream and codeNum are represented in an explicit form and used as ue(v).

[0120]

Table 6

[0121] By the descriptor, the value of the syntax element is derived as follows:

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

[0123] 3. k-th Exp-Golomb binary process

[0124] The input of this process is the requirement for k-th Exp-Golomb (EGk) binary.

[0125] The output of this process is the EGk binary that associates each symbolVal value with the corresponding bit string.

[0126] The bit string of the EGk binary process for each symbolVal value is specified as follows, where each call to the put(X) function with X being 0 or 1 appends the binary value X to the end of the bit 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 k-th Exp-Golomb (EGk) code uses 1 and 0 with opposite meanings for the single-term part of the 0-th Exp-Golomb code specified in Section 2.

[0142] 4. Process of fixed-length binary evolution

[0143] The input to this process is the requirements for fixed-length (FL) binary evolution and cMax.

[0144] The output of this process is the FL binary evolution that associates each symbolVal with the corresponding bin string.

[0145] The FL binary evolution is composed of an unsigned integer bin string of fixedLength bits of the symbol value symbolVal, where fixedLength = Ceil(Log2(cMax × 1)). The bin indexing for the FL binary evolution may be like the increase in the value of binIdx from the most significant bit associated with binIdx = 0 to the least significant bit.

[0146] 5. Binary evolution process for abs_remainder

[0147] The input to this process is the requirements for the binary evolution for the syntax element abs_remainder[n], the color component cIdx, the luma position (x0, y0) that specifies the upper-left sample of the current luma transform block with respect to the upper-left luma sample of the picture, the current coefficient scan position (xC, yC), the binary logarithm log2TbWidth of the transform block width, and the binary logarithm log2TbHeight of the transform block height.

[0148] The output of this process is the binary evolution of the syntax element.

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

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

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

[0152] The binary evolution of the syntax element abs_remainder[n] is the concatenation of the prefix bit string and (if it exists) the suffix bit string.

[0153] For the derivation of the prefix bit 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 bit string is specified by calling the TR binary evolution process specified in section 1 for prefixVal with the variables cMax and cRiceParam as inputs.

[0157] - When the prefix bit string is a 4-bit string of all 1s in length, a suffix bit string exists, and this 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 bit string is specified by calling the k-th order EGk binary evolution process specified in three sections for the binary evolution of suffixVal where the order k of Exp-Golomb is cRiceParam + 1.

[0161] 6. Rice Parameter Derivation Process

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

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

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

[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] Instead, if locSumAbs is less than 25, cRiceParm is set to be like 1;

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

[0182] FIG. 4 is a diagram for explaining an example of deriving a Rice parameter for a current conversion coefficient based on a peripheral reference conversion coefficient according to an embodiment.

[0183] As described in Section 6 of the English spec of FIG. 3, based on the level sum of the already encoded five peripheral conversion coefficients (the lightly shaded display in FIG. 4) for the current conversion coefficient (the darkly shaded display in FIG. 4) and the value of sig_coeff_flag, the Rice parameter for the conversion coefficient at the current scan position can be determined. In this case, it may be necessary to check each time whether the position of the reference conversion coefficient exceeds the boundary of the conversion block. That is, every time one conversion coefficient level is encoded, a five-time boundary check process is involved. More specifically, since a boundary check process reaching five times the conversion coefficient for which abs_remainder syntax element encoding is required is necessary, when there are many conversion coefficients having large level values, the computational complexity increases.

[0184] Since the computational complexity increases in proportion to the size of the reference conversion coefficients used in the Rice parameter derivation process, in the following embodiments, a method of using less than five reference conversion coefficients is proposed. FIGS. 5A to 5C show cases of using four, three, and two reference conversion coefficients, and show various usage patterns of the reference conversion coefficients corresponding to each case. FIGS. 6A to 6C show various usage patterns of the reference conversion coefficients when using one reference conversion coefficient. The purpose of the embodiments according to FIGS. 5A to 6C is to reduce the computational complexity by reducing the number of reference conversion coefficients, so it includes all cases of using less than five reference conversion coefficients and is not limited to the foregoing embodiments.

[0185] FIG. 5A to FIG. 5C are diagrams for explaining another example of deriving a Rice parameter for a current conversion coefficient based on a peripheral reference conversion coefficient according to some embodiments.

[0186] FIG. 5A is a diagram for explaining a process of deriving a Rice parameter based on four peripheral reference conversion coefficients (lightly shaded in FIG. 5A) for a current conversion coefficient. To derive the Rice parameter, an intermediate summation coefficient may be derived on the way. The intermediate summation coefficient is denoted as locSumAbs, for example. The value of the intermediate summation coefficient (e.g., locSumAbs) is initially 0, and the value of the intermediate summation coefficient (e.g., locSumAbs) is updated while detecting each peripheral reference conversion coefficient.

[0187] The process of updating the value of the intermediate summation coefficient (e.g., locSumAbs) based on the four peripheral reference conversion coefficients shown in FIG. 5A is, for example, as shown in Table 7 below.

[0188] [Table 7]

[0189] FIG. 5B is a diagram for explaining a process of deriving a Rice parameter based on three peripheral reference conversion coefficients (lightly shaded in FIG. 5B) for a current conversion coefficient. The process of updating the value of the intermediate summation coefficient (e.g., locSumAbs) based on the three peripheral reference conversion coefficients shown in FIG. 5B is, for example, as shown in Table 8 below.

[0190] [Table 8]

[0191] FIG. 5C is a diagram for explaining a process of deriving a Rice parameter based on two peripheral reference conversion coefficients (lightly shaded in FIG. 5C) for a current conversion coefficient. The process of updating the value of the intermediate summation coefficient (e.g., locSumAbs) based on the two peripheral reference conversion coefficients shown in FIG. 5C is, for example, as shown in Table 9 below.

[0192] [Table 9]

[0193] Figures 6A to 6C are diagrams for explaining another example of deriving the Rice parameter for the current conversion coefficient based on the peripheral reference conversion coefficient according to some other embodiments.

[0194] Figures 6A to 6C are diagrams for explaining the process of deriving the Rice parameter based on one peripheral reference conversion coefficient (the lightly shaded part in Figures 6A to 6C) for the current conversion coefficient. Figure 6A is a diagram for explaining the process of using the peripheral reference conversion coefficient located on the right side of the current conversion coefficient, Figure 6B is a diagram for explaining the process of using the peripheral reference conversion coefficient located on the diagonal line in the lower right of the current conversion coefficient, and Figure 6C is a diagram for explaining the process of using the peripheral reference conversion coefficient located below the current conversion coefficient.

[0195] The process of updating the value of the temporary summation coefficient (e.g., locSumAbs) based on the right-side peripheral reference conversion coefficient shown in Figure 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 (e.g., locSumAbs) based on the peripheral reference conversion coefficient on the diagonal line in the lower right shown in Figure 6B is, for example, as shown in Table 11 below.

[0198] [Table 11]

[0199] The process of updating the value of the temporary aggregation coefficient (e.g., locSumAbs) based on the lower peripheral reference conversion coefficient shown in FIG. 6C is, for example, as shown in Table 12 below.

[0200] [Table 12]

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

[0202] [Equation]

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

[0204] [Equation]

[0205] In one embodiment, th1 and th2 in Equation 6 can be values 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 peripheral reference conversion coefficient to be referenced exceeds the boundary of the conversion block, methods such as predicting the Rice parameter using the conversion coefficient value at the referable position, maintaining the previous Rice parameter value without updating it if there is a previous Rice parameter, and substituting a specific initial value if there is a specific initial value can be used.

[0207] Moreover, the method for determining the scanning order is not limited to the diagonal scan method. When the coefficient scan method is modified, the pattern may be deformed.

[0208] FIG. 7 is a diagram showing the process of deriving the quantized coefficients of a 2×2 block according to an embodiment.

[0209] In one embodiment, FIG. 7 shows an example of the quantized coefficients in a 2×2 sub-block in the process of encoding a color difference block. The encoding result for the coefficients scanned in the reverse diagonal of FIG. 7 is as shown in Table 13 below. In Table 13, scan_pos indicates the position of the coefficient by reverse diagonal scan. The coefficient scanned first in the 2×2 block, i.e., the coefficient at the lower right corner, is represented by a scan_pos value of 3, and the coefficient scanned last, i.e., the coefficient at the upper left corner, is represented by a scan_pos value of 0.

[0210] [Table 13]

[0211] In one embodiment, the number of syntax elements rem_abs_gt2_flag for a 2×2 sub-block of the chroma block may be restricted in the encoding process. As described above in Table 1, the main syntax elements in units of 2×2 sub-blocks include sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, abs_remainder, coeff_sign_flag, etc. Among these, sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag contain information regarding context-coded bins encoded using a regular coding engine, and abs_remainder and coeff_sign_flag contain information regarding bypass bins encoded using a bypass coding engine. Since context-coded bins use the probability state and range updated while processing previous bins, they exhibit high data dependency. That is, since context-coded bins can perform the encoding / decoding of the next bin after all the encoding / decoding of the current bin is completed, there may be difficulties in parallel processing. Also, a lot of time may be required to read the probability interval to determine the current state. Therefore, in one embodiment, a method is proposed to improve the CABAC processing amount by reducing the number of context-coded bins and increasing the number of bypass bins.

[0212] In one embodiment, the coefficient level information is encoded in reverse scan order. That is, it is encoded after being scanned from the coefficient at the lower right end to the upper left end direction of the unit block. Generally, the coefficient levels scanned first in the reverse scan order tend to have small values. For such coefficients, by using sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag, the length of the binary-coded bins when indicating the coefficient levels can be reduced, and each syntax element can be efficiently encoded by arithmetic coding according to the context previously encoded based on a defined context.

[0213] However, for coefficient levels with some large values, that is, the coefficient levels located at the upper left end of the unit block, using sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag may not be helpful for improving the compression performance. Using sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag may also reduce the coding efficiency.

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

[0215] In one embodiment, the number of coefficients encoded with rem_abs_gt2_flag can be limited. The maximum number of rem_abs_gt2_flag that can be encoded in a 2×2 block can be 4. That is, rem_abs_gt2_flag can be encoded for all coefficients whose absolute value is greater than 2. In an example, rem_abs_gt2_flag can be encoded only for the first N coefficients (that is, the coefficients for which rem_abs_gt1_flag is 1) having an absolute value greater than 2 according to the scan order. N can also be selected by the encoder and can be set to any value from 0 to 4. When the context coding bins for the luminance or chrominance 4×4 sub-blocks are limited by a method similar to this embodiment in the encoder, N can also be calculated based on the limit value used at this time. As a method for calculating N, the context coding bin limit value (N for the luminance or chrominance 4×4 sub-blocks as shown in Equation 7 4×4Either use it as it is, or since the number of 2×2 sub-block pixels is 4, N can be calculated by Equation 8. Here, a and b represent constants and are not limited to specific values.

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

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

[0218] Similarly, N can also be calculated using the values of the horizontal and / or vertical sizes of the sub-block. Since the sub-block is in a square form, the value of the horizontal size is the same as the value of the vertical size. Since the horizontal or vertical size value of a 2×2 sub-block is 2, N can be calculated by the following Equation 9.

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

[0220] The following Table 14 shows an application example when N is 1. Since the encoding for rem_abs_gt2_flag can be reduced by the amount indicated as X in the 2×2 block, the number of context encoding bits can be reduced thereby. The abs_remainder value of the coefficient for the scan positions where the encoding for rem_abs_gt2_flag is not performed is changed compared to Table 13.

[0221]

Table 14

[0222] In one embodiment, in the 2×2 sub-block encoding of the color difference block, the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag can be restricted. When restricting the sum of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag to K, K has a value from 0 to 12. In one example, when the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag is not encoded exceeding K, rem_abs_gt2_flag may not be encoded either.

[0223] K can be selected by the encoder and can also be set to any value from 0 to 12. When the context encoding bin for the luminance or color difference 4×4 sub-block is restricted for the encoder, K can also be calculated based on the restriction value used at this time. As a method for calculating K, the restriction value (K 4×4 ) of the context encoding bin for the luminance or color difference 4×4 sub-block is used as it is as in Equation 10 below, or since the number of 2×2 sub-block pixels is 4, K can be calculated by Equation 11. Here, a and b represent constants and are not limited to specific values.

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

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

[0226] Similarly, K can also be calculated using the horizontal / vertical size value of the sub-block. Since the sub-block is in a square form, the horizontal size value and the vertical size value are the same. Since the horizontal or vertical size value of the 2×2 sub-block is 2, K can be calculated by Equation 12.

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

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

[0229] [Table 15]

[0230] In one embodiment, in the 2×2 sub-block encoding of the color difference block, 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 can be respectively restricted. That is, the method of restricting the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag and the method of restricting the number of rem_abs_gt2_flag can also be combined. When the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag is restricted to K and the number of rem_abs_gt2_flag is restricted to N, K can have a value from 0 to 12 and N can have a value from 0 to 4.

[0231] K and N can also be determined by the encoder and can also be calculated based on the content described in relation to Formulas 7 to 12.

[0232] Table 16 below shows an example of the case where K is restricted to 6 and N is restricted 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 can be used. For example, a method is proposed in which rem_abs_gt1_flag and par_level_flag are encoded in that order instead of encoding par_level_flag and rem_abs_gt1_flag in that order. In one example, the change in the encoding order as described above is applied when encoding a 2×2 size sub-block of a color difference block. When the order of par_level_flag and rem_abs_gt1_flag is changed, 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 the actual conversion coefficient value coeff and each syntax element is changed as shown in Equation 13 below.

[0235] [Equation 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_leve_flag is not encoded, so the embodiment according to Table 16 has advantages in terms of processing amount and encoding. Of course, when |coeff| is 2, unlike Table 2, rem_abs_gt2_flag needs to be encoded, and when |coeff| is 4, unlike Table 2, abs_remainder needs to be encoded. Generally, since the case where |coeff| is 1 occurs more frequently than the case where |coeff| is 2 or 4, the method according to Table 17 shows higher processing amount and encoding performance than the method according to Table 2. In one example, the result of encoding a 4×4 sub-block as shown in FIG. 7 is as shown in Table 18 below.

[0237]

Table 17

[0238]

Table 18

[0239] In one embodiment, although the encoding order of par_level_flag and rem_abs_gt1_flag is changed, a method for restricting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag is provided. That is, when encoding in the order of sig_coeff_flag, rem_abs_gt1_flag, par_level_flag, rem_abs_gt2_flag, abs_remainder, coeff_sign_flag, a method for restricting the sum of the numbers of sig_coeff_flag, rem_bS_gt1_flag, and par_leve_flag is provided. When restricting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag to K, K has a value from 0 to 12. K can also be selected by an encoder and can be set to any value from 0 to 12. Further, it can be calculated based on the method described above in relation to Formulas 10 to 12.

[0240] In one embodiment, when sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag are not encoded any further, rem_abs_gt2_flag may not be encoded either. 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 encoded within one for loop in the syntax. Although the sum of the numbers of the three syntax elements (sig_coeff_flag, rem_abs_gt1_flag, par_level_flag) does not exceed K, the encoding can be terminated 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 encoding 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 it is a value not exceeding K, at this time, since the value of the coefficient level at the next scan position 1 (scan_pos = 1) is not known in the encoding device (or encoder), it may not be possible to recognize which value among 1 to 3 the number of context encoding bins generated at scan_pos = 1 has. At this time, the encoding device can perform encoding only up to scan_pos = 2 and terminate the encoding. Therefore, although the K values are different, the encoding results can be the same as those in Table 19 and Table 20 below.

[0243]

Table 20

[0244] In one embodiment, a method can be provided that changes the encoding order of par_level_flag and rem_abs_gt1_flag while restricting the number of rem_abs_gt2_flag. That is, when encoding in the order of sig_coeff_flag, rem_abs_gt1_flag, par_level_flag, rem_abs_gt2_flag, abs_remainder, coeff_sign_flag, a method is provided for restricting the sum of the coefficients encoded with rem_abs_gt2_flag. In one example, the number of rem_abs_gt2_flag encoded within a 2×2 block can be 4. That is, rem_abs_gt2_flag is encoded for all coefficients whose absolute value of the coefficient is greater than 2. In another example, rem_abs_gt2_flag can also be encoded only for the first N coefficients having an absolute value greater than 2 (i.e., coefficients for which rem_abs_gt1_flag is 1) according to the scan order. N can also be selected by the encoder and can be set to any value from 0 to 4. It can also 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 encoding for rem_abs_gt2_flag can be reduced by the number shown as X in the 4×4 block, the number of context encoding bins can thereby be reduced. The abs_remainder value of the coefficient for the scan positions where encoding for rem_abs_gt2_flag is not performed is changed as shown in Table 21 below as compared with Table 18.

[0246] [Table 21]

[0247] In one embodiment, although the encoding order of par_level_flag and rem_abs_gt1_flag is changed, a method is provided for respectively restricting 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. That is, when encoding in the order of sig_coeff_flag, rem_abs_gt1_flag, par_level_flag, rem_abs_gt2_flag, abs_remainder, coeff_sign_flag, a method for restricting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag and par_level_flag and a method for restricting the number of rem_abs_gt2_flag can be combined. When restricting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag and par_level_flag to K and the number of rem_abs_gt2_flag to N, K has a value from 0 to 12 and N has a value from 0 to 4. K and N can also be selected by an 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. Or it can also be calculated based on the content described with respect to Formulas 7 to 12.

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

[0249]

Table 22

[0250] In a case where the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag is restricted in 2×2 or 4×4 sub-block encoding of a color difference block according to an embodiment, a method for simplifying the step of determining the Rice parameter used to define the Golomb code for abs_remainder is provided. In one embodiment, referring to FIG. 4 again, based on the level sum of the five already encoded peripheral transform coefficients (lightly shaded in FIG. 4) of the current transform coefficient (darkly shaded in FIG. 4) and the information regarding sig_coeff_flag, the Rice parameter for the transform coefficient at the current scan position can be determined. Table 22 below shows the pseudo code related to FIG. 4. Referring to Table 23 below, it can be confirmed that it is necessary to check every time whether the position of the referenced transform coefficient exceeds the boundary of the transform block on the pseudo code. That is, every time one transform coefficient level is encoded, a boundary check process five times is required. Also in the encoding for the abs_remainder syntax element, since the transform coefficient boundary check process is required by an amount corresponding to five times the object to be encoded, when there are many transform coefficients having large level values, the computational complexity increases.

[0251]

Table 23

[0252] In a method for deriving cRiceParam indicating the Rice parameter according to an embodiment, if locSumAbs is less than 12, the value of cRiceParam is 0, if locSumAbs is less than 25, the value of cRiceParam is 1, and if the value of locSumAbs is 25 or more, the value of cRiceParam can be 2.

[0253] In one embodiment, when restricting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag, abs_remainder is determined to be different according to the following three cases. In the method of restricting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag, various 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 all exist, (ii) indicates the case where only sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag exist, and (iii) indicates the case where sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag do not all exist.

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

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

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

[0257] Since the computational complexity increases in proportion to the size of the reference conversion coefficient used in the process of deriving the Rice parameter, in one embodiment, the Rice parameter can be derived based on the immediately preceding level value in the scan order of 4×4 or 2×2 sub-blocks only for chrominance block coding. Here, the Rice parameter is initialized to 0 only at the start stage of the sub-block, and is not initialized at each of the stages (i), (ii), and (iii) for coding abs_remainder within the sub-block. In sub-block coding, the Rice parameter increases by 1 when the immediately preceding level value is greater than th1, th2, or th3. In the present invention, th1 and th2 are not limited to specific values, but 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.

[0258] In one embodiment, although the coding order of par_level_flag and rem_abs_gt1_flag is changed in the 2×2 or 4×4 sub-block coding of the chrominance block, a method is provided for simplifying the Rice parameter determination step used in the definition of the Golomb code for rem_remainder when limiting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag.

[0259] When changing the encoding order of par_level_flag and rem_abs_gt1_flag and restricting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag, abs_remainder can be determined to be different according to 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 for 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 all exist.

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

[0261] [Equation 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 conversion coefficient used in the process of deriving the Rice parameter, in one embodiment, it is possible to provide a method of deriving the Rice parameter using the immediately preceding level value in the scan order of 4×4 or 2×2 sub-blocks, limited to chrominance block coding. The Rice parameter is initialized to 0 only at the start stage of the sub-block, and is not initialized at each stage of (i), (ii), and (ii) for coding abs_remainder within the sub-block. In sub-block coding, the Rice parameter increases by 1 when the immediately preceding level value is greater than th1, th2, or th3. In the present invention, th1 and th2 are not limited to specific values, but 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] FIGS. 8A and 8B are diagrams showing the configuration and operation method of an entropy encoding unit according to an embodiment.

[0264] According to an embodiment, the Rice code from the 0th order to the maximum 2nd order Rice code can be used, and the order of the Rice code can be represented by the Rice code. Increasing the order of the Rice code, that is, the value of the maximum Rice parameter, has an advantage in that fewer bits can be allocated when a large input value is input. Table 24 below exemplifies the codeword lengths from the 0th order Rice code to the 3rd order Rice code, and it can be confirmed that when the input value is greater than 11, the resulting codeword length is shorter when binary-coded with the 3rd order Rice code than with the 2nd order Rice code. Therefore, in one embodiment, a method of increasing the order of the maximum allowable Rice code, that is, 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 that classifies Rice parameters based on locSumAbs can be modified as Equation 17 below. Equation 17 shows an example when using up to the third-order Rice code.

[0267]

Number

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

[0269] Specifically, the encoding device derives a value for abs_remainder while 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 current scanning position (of the transform coefficient) can be derived based on the aforementioned locSumAbs, and the locSumAbs can be derived based on the AbsLevel and / or sig_coeff_flag of the surrounding reference transform coefficients. The positions and numbers of the surrounding reference transform coefficients include the content described above in 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 device performs binary conversion on the value of the abs_remainder based on the derived Rice parameter (S810). The above-described content in Section 5 (Binarization process for abs_remainder) of the English specification included in the description of FIG. 3 can be applied to the binary conversion procedure. The encoding device can derive a bin string for the abs_remainder by the binary conversion procedure. The binary conversion procedure can be performed by a binary conversion unit 244 in the entropy encoding unit 240. According to the present invention, as described above, based on the Rice parameter, the length of the bin string for the value of the abs_remainder can be adaptively determined. For example, as shown in Table 23, the length of the value to be coded based on the Rice parameter can be adaptively determined. According to the present invention, a Rice parameter for the value of the abs_remainder of the current conversion coefficient can be derived based on the surrounding reference conversion coefficient, so that a relatively shorter bin string can be adaptively assigned than when using a fixed Rice parameter for the value of the abs_remainder of the current conversion coefficient.

[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. that are binary-converted based on FL without using the Rice parameter. For sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, etc., binary conversion can be performed not by binary conversion based on the Rice parameter but by the binary conversion according to Section 4 (Fixed-length binarization process) of the English specification included in the description regarding FIG. 3.

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

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

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

[0275] Specifically, the decoding device derives a Rice parameter for abs_remainder (S900). As described above, the Rice parameter derivation can be performed based on the peripheral reference conversion coefficients. Specifically, the Rice parameter for the current scanning position (conversion coefficient) can be derived based on the aforementioned locSumAbs, and the locSumAbs can be derived based on the AbsLevel and / or sig_coeff_flag of the peripheral reference conversion coefficients. The positions and numbers of the peripheral reference conversion coefficients include the content described above with reference to FIGS. 4 to 6C. The Rice parameter derivation procedure is performed by a Rice parameter derivation unit 312 within the entropy decoding unit 310.

[0276] The decoding device performs binarization on the abs_remainder based on the derived Rice parameter (S910). The content described above in Section 5 (Binarization process for abs_remainder) of the English specification included in the description of FIG. 3 is applicable to the binarization procedure. The decoding device derives an available bin string for the available values of the abs_remainder by the binarization procedure. The binarization procedure is performed by a binarization unit 314 within the entropy decoding unit 310. According to the present invention, as described above, based on the Rice parameter, the length of the bin string for the value of the abs_remainder can be adaptively determined. For example, as shown in Table 23, the length of the value to be coded based on the Rice parameter can be adaptively determined. According to the present invention, a Rice parameter for the value of the abs_remainder of the current conversion coefficient can be derived based on the peripheral reference conversion coefficients, so that a relatively shorter bin string is adaptively assigned to the value of the abs_remainder of the current conversion coefficient than when using a fixed Rice parameter.

[0277] The decoding device performs entropy decoding on the abs_remainder (S920). While sequentially parsing and decoding each bin for the abs_remainder, the decoding device compares the derived bin string with the available bin string. If the derived bin string is the same as any 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, after further parsing and decoding the next bit in the bitstream, the comparison procedure can be performed. Through such a process, variable-length bits can be used to signal the information without using start bits or end bits for specific information (specific syntax elements) in the bitstream. Thereby, the decoding device can allocate relatively fewer bits for lower values and improve the overall coding efficiency.

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

[0279] It is obvious to those skilled in the art that the above-described Rice parameter derivation procedure can be omitted for sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, etc. that 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 can be performed according to Section 4 (Fixed-length binarization process) of the English specification included in the description of FIG. 3, which is not binarization based on Rice parameters.

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

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

[0282] FIG. 10 is a flowchart showing 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 of FIG. 10.

[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, the conversion unit 232, the quantization unit 233, and the entropy encoding unit 240 of the encoding device, respectively.

[0285] The encoding device according to one embodiment derives a predicted sample by predicting the current block (S1000). The encoding device 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 the RD cost. According to the determined mode, the encoding device derives a predicted sample for the current block.

[0286] The encoding device according to one embodiment compares the original sample for the current block with the predicted sample to derive a residual sample (S1010).

[0287] The encoding device according to one embodiment derives a conversion coefficient by a conversion procedure for the residual sample (S1020), and quantizes the derived conversion coefficient to derive a quantized conversion coefficient (S1030).

[0288] The encoding device according to one embodiment encodes image information including prediction information and residual information, and outputs the encoded image information in the form of a bit - stream (S1040). The prediction information is information regarding the prediction procedure, including prediction mode information, information regarding motion information (for example, when inter - prediction is applied), and the like. The residual information is information regarding the quantized conversion coefficient, including, for example, the information disclosed in Table 1 above.

[0289] The output bit - stream is transmitted to the decoding device via a storage medium or a network.

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

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

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

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

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

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

[0296] A decoding apparatus according to an embodiment derives residual samples by an inverse transform procedure for the transform coefficients (S1130).

[0297] A decoding apparatus according to an embodiment generates a restored sample for the current block based on the prediction sample and the residual sample, and generates a restored picture based on this (S1340). Thereafter, as described above, an in-loop filtering procedure can be further applied to the restored picture.

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

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

[0300] Each step disclosed in FIG. 12 is performed by the encoding apparatus 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. Also, the operations by S1200 to S1230 are based on a part of the content described above in FIGS. 4 to 11. Therefore, specific content that overlaps with the content described above in FIGS. 2 and 4 to 11 will be omitted or simplified in the description.

[0301] As shown in FIG. 13, the encoding apparatus according to an embodiment includes a subtraction unit 231, a conversion 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 apparatus, and the encoding apparatus may be implemented by more or fewer components than those shown in FIG. 13.

[0302] In the encoding apparatus according to an embodiment, the subtraction unit 231, the conversion unit 232, the quantization unit 233, and the entropy encoding unit 240 may be realized by separate chips respectively, or at least two or more components may be realized by one chip.

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

[0304] An encoding device according to an embodiment converts a residual sample for a current block to derive conversion coefficients (S1210). More specifically, the conversion unit 232 of the encoding device converts a residual sample for the current block to derive conversion coefficients.

[0305] An encoding device according to an embodiment derives quantized conversion coefficients from the conversion coefficients based on a quantization process (S1220). More specifically, the quantization unit 233 of the encoding device derives quantized conversion coefficients from the conversion coefficients based on the quantization process.

[0306] An encoding device according to an embodiment encodes residual information including information on the quantized conversion coefficients (S1230). More specifically, the entropy encoding unit 240 of the encoding device encodes residual information including information on the quantized conversion coefficients.

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

[0308] In one embodiment, the maximum value of the Rice parameter can be 3. In an example, the maximum value of cRiceParam can be 3.

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

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

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

[0312] In one embodiment, a temporary summation coefficient is derived based on the surrounding reference transform coefficients. When 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. When the value of the temporary summation coefficient is equal to or greater than the first critical value and smaller than a second critical value, the value of the Rice parameter is determined to be 1. When the value of the temporary summation coefficient is equal to or greater than the second critical value and smaller than a third critical value, the value of the Rice parameter is determined to be 2. When 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 an example, the temporary summation coefficient can 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 an 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] According to the encoding device and the operation method of the encoding device in FIGS. 12 and 13, the encoding device derives a residual sample for a current block (S1200), converts the residual sample for the current block to derive conversion coefficients (S1210), derives quantized conversion coefficients from the conversion coefficients based on a quantization process (S1220), and encodes residual information including information on the quantized conversion coefficients (S1230). However, the residual information includes conversion coefficient level information, and the step of encoding the residual information includes a step of performing a binary process on the conversion coefficient level information based on a Rice parameter to derive a binary value of the conversion coefficient level information, and a step of encoding the binary value of the conversion coefficient level information. 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 efficiently performed.

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

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

[0317] As shown in FIG. 15, a decoding device according to an embodiment includes an entropy decoding unit 310, an inverse quantization unit 321, an inverse transformation 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 implemented with more or fewer components than those shown in FIG. 15.

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

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

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

[0321] A decoding device according to an embodiment derives transform coefficients from the quantized transform coefficients based on an inverse quantization process (S1420). More specifically, the inverse quantization unit 321 of the decoding device derives transform coefficients from the quantized transform coefficients based on an inverse quantization process.

[0322] A decoding device according to an embodiment applies an inverse transformation to the derived transform coefficients to derive residual samples for a current block (S1430). More specifically, the inverse transformation unit 322 of the decoding device applies an inverse transformation to the derived transform coefficients to derive residual samples for a current block.

[0323] The decoding device according to one embodiment generates a restored picture based on the residual samples for the current block (S1440). More specifically, the adder 340 of the decoding device generates a restored 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 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 can be 3. In one example, the maximum value of cRiceParam can 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, the 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. When the current transform coefficient is the first transform coefficient of the current sub-block, the value of the previous rice parameter for the transform coefficient in the previous order can be 0. In one example, the previous rice parameter is denoted as lastRiceParam. In one example, the size of the current sub-block can be 2×2 or 4×4.

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

[0329] In one embodiment, a temporary summation coefficient is derived based on the surrounding reference conversion coefficients. When the value of the temporary summation coefficient is less than a first critical value (for example, th1), the value of the Rice parameter is determined to be 0. When the value of the temporary summation coefficient is equal to or greater than the first critical value and less than a second critical value (for example, th2), the value of the Rice parameter is determined to be 1. When the value of the temporary summation coefficient is equal to or greater than the second critical value and less than a third critical value (for example, th3), the value of the Rice parameter is determined to be 2. When 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 an example, the temporary summation coefficient is denoted as locSumAbs.

[0330] In one embodiment, the first critical value can be 1, 2, or 3, the second critical value can be 4, 5, or 6, and the third critical value can be 10, 11, or 12. In an 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 operation method of the decoding device disclosed in FIGS. 14 and 15, the decoding device receives a bitstream including residual information (S1400), derives quantized transform coefficients for the 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), applies an inverse transform to the derived transform coefficients to derive residual samples for the current block (S1430), and generates a restored picture based on the residual samples for the current block (S1440). However, the residual information includes transform coefficient level information, and the step of deriving the quantized transform coefficients includes a step of performing a binary process on the transform coefficient level information based on a Rice parameter, a step of deriving a value of the transform coefficient level information based on the result of the binary process, and a step of 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, by setting the maximum value of the Rice parameter to 3, residual coding can be efficiently performed.

[0332] In the foregoing embodiments, the method is described based on a flowchart as a series of steps or blocks. However, the present invention is not limited to the order of the steps, and a certain step may occur in an order different from that of the steps described above or simultaneously. Also, 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 can be deleted without affecting the scope of the present invention.

[0333] The method according to the present invention described above 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 apparatus for performing image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc.

[0334] In the present invention, when an embodiment is realized by software, the foregoing method can be realized by modules (processes, functions, etc.) that perform the foregoing functions. The modules can be stored in a memory and performed by a processor. The memory is located inside or outside the processor and is connected to the processor by various well-known means. The processor includes an ASIC (application-specific integrated circuit), other chip sets, logic circuits, and / or data processing devices. The memory may include a ROM (read-only memory), a RAM (random access memory), a flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described in the present invention are realized and performed on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in each figure are realized and performed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information for realization (for example, information on instructions) or an algorithm can be stored in a digital storage medium.

[0335] In addition, the decoding device and encoding device to which the present invention is applied can be included in a multimedia broadcast transmission / reception device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, an on-demand video (VoD) service providing device, an OTT (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a VR (virtual reality) device, an AR (argumente reality) device, a picture phone video device, a transportation means terminal (e.g., a vehicle terminal including an autonomous driving vehicle, an airplane terminal, a ship terminal, etc.) and a medical video device, etc., and can be used for processing video signals and data signals. For example, as an OTT video (Over the top video) device, a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recoder), etc. are included.

[0336] In addition, the processing method to which the present invention is applied can be produced in the form of a program executed by a computer and can be stored in a computer-readable recording medium. Multimedia data having the data structure according to 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 in which computer-readable data is stored. The computer-readable recording medium can include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy (registered trademark) disk, and an optical data storage device. Further, the computer-readable recording medium includes a medium realized in the form of a carrier wave (for example, transmission via the Internet). Also, a bitstream generated by an encoding method can be stored in a computer-readable recording medium or transmitted via a wired / wireless communication network.

[0337] In addition, embodiments of the present invention are realized as a computer program product by program code, and the program code is executed on a computer according to embodiments of the present invention. The program code can 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 the content input from multimedia input devices such as smartphones, cameras, and video cameras into digital data to generate a bitstream, and plays the role of transmitting this to the streaming server. As another example, when multimedia input devices such as smartphones, cameras, and camcorders directly generate a bitstream, the encoding server may be omitted.

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

[0342] The streaming server transmits multimedia data to the user device based on a user request via a web server, and the web server plays the role of a medium for informing the user of what services are available. When the user requests a desired service from the web server, the web server transmits this to the streaming server, and the streaming server transmits multimedia data to the user. Here, the content streaming system may include a separate control server, and in this case, the control server plays the role of controlling commands / responses between each device in the content streaming system.

[0343] The streaming server receives content from a media storage 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, in order to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.

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

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

Claims

1. In an image decoding method performed by a decoding apparatus, a step of obtaining residual information from a bitstream; a step of deriving a quantized transform coefficient for a current block based on the residual information; a step of deriving a transform coefficient based on the quantized transform coefficient; a step of deriving a residual sample for the current block based on the transform coefficient; a step of generating a restored picture based on the residual sample for the current block, and the residual information includes a valid coefficient flag indicating whether a quantized transform coefficient is a valid coefficient other than 0, a parity level flag for parity of a transform coefficient level for the quantized transform coefficient, a first transform coefficient level flag regarding whether the transform coefficient level is greater than a first reference value, a second transform coefficient level flag regarding whether the transform coefficient level is greater than a second reference value, and reminder information of the transform coefficient level, wherein 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 step of deriving the quantized transform coefficient includes a step of deriving the quantized transform coefficient 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, and the quantized transform coefficient is derived based on calculation of (value of the valid coefficient flag + value of the first transform coefficient level flag + value of the parity level flag + (2 × value of the second transform coefficient level flag) + (2 × value of the reminder information)).

2. In an image encoding method performed by an encoding apparatus, a step of deriving a residual sample for a current block; a step of deriving a transform coefficient for the current block based on the residual sample; a step of deriving a quantized transform coefficient based on the transform coefficient; and a step of encoding residual information including information related to the quantized transform coefficient, and the residual information An effective coefficient flag indicating whether the quantized transform coefficient is a non-zero effective coefficient, and a parity level flag for the parity of the transform coefficient level with respect to the quantized transform coefficient, and a first transform coefficient level flag indicating whether the transform coefficient level is greater than a first reference value, and a second transform coefficient level flag indicating whether the transform coefficient level is greater than a second reference value, and remainder information of the transform coefficient level, and 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 includes encoding the parity level flag, and encoding the first transform coefficient level flag, and the encoding of the first transform coefficient level flag is performed before the encoding of the parity level flag, The result of the encoding for the quantized transform coefficient is derived based on the calculation of (the value of the effective coefficient flag + the value of the first transform coefficient level flag + the value of the parity level flag + (2 × the value of the second transform coefficient level flag) + (2 × the value of the remainder information)).

3. In a method for transmitting data related to an image, a step of obtaining a bitstream related to the image, where the bitstream includes a step of deriving residual samples for a current block, a step of deriving transform coefficients for the current block based on the residual samples, a step of deriving quantized transform coefficients based on the transform coefficients, and a step of encoding residual information including information related to the quantized transform coefficients, a step of transmitting the data including the bitstream, and the residual information includes an effective coefficient flag indicating whether the quantized transform coefficient is a non-zero effective coefficient, a parity level flag for the parity of the transform coefficient level with respect to the quantized transform coefficient, a first transform coefficient level flag indicating whether the transform coefficient level is greater than a first reference value, a second transform coefficient level flag indicating whether the transform coefficient level is greater than a second reference value, and remainder information of the transform coefficient level, and 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 includes encoding the parity level flag and 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, The result of the encoding 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 × the value of the second transform coefficient level flag) + (2 × 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