The method of decoding and encoding images, and the storage medium readable by a non-transferable computer.
Patent Information
- Application Number
- VN1202607356
- Authority / Receiving Office
- VN · VN
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-08-31
- Filing Date
- 2020-08-31
- Publication Date
- 2026-10-15
AI Technical Summary
The increasing demand for high-resolution, high-quality video data leads to a significant increase in the amount of information to be transmitted and stored, necessitating highly efficient video compression technologies to manage storage and transmission costs effectively.
A video coding method and device that employs a simplified residual data coding structure, prioritizing syntax elements for coding and using a coding order that reduces coding complexity and improves overall residual coding efficiency, even when the maximum context code bins are exhausted.
This approach enhances video coding efficiency by reducing the complexity of syntax elements and improving residual coding efficiency, thereby optimizing storage and transmission of high-resolution video data.
Smart Images

Figure VN1202607356_0
Abstract
Description
Image decoding method and device using simplified residual data coding in an image coding system
[0001] This document relates to a video coding technology, and more specifically, to a video decoding method and device for coding residual data according to TSRC of a current block in a video coding system, in which, when all available context coded bins for the current block are used, subsequent residual data is coded using a simplified residual data coding structure.
[0002] Demand for high-resolution, high-quality video, such as HD (High Definition) and UHD (Ultra High Definition), is growing across various fields. As video data becomes higher in resolution and quality, the amount of information or bits transmitted increases relative to conventional video data. Therefore, transmitting video data using existing media, such as wired or wireless broadband lines, or storing it using existing storage media, increases transmission and storage costs.
[0003] Accordingly, high-efficiency image compression technology is required to effectively transmit, store, and reproduce high-resolution, high-quality image information.
[0004] The technical task of this document is to provide a method and device for improving video coding efficiency.
[0005] Another technical challenge of this document is to provide a method and device for improving the efficiency of residual coding.
[0006] According to one embodiment of the present document, a video decoding method performed by a decoding device is provided. The method is characterized by including the steps of: obtaining residual information of a current block; deriving residual samples of the current block based on the residual information; and generating a restored picture based on the residual samples.
[0007] According to another embodiment of the present document, a decoding device for performing image decoding is provided. The decoding device is characterized by including an entropy decoding unit for obtaining residual information of a current block, a residual processing unit for deriving residual samples of the current block based on the residual information, and an adding unit for generating a restored picture based on the residual samples.
[0008] According to another embodiment of the present document, a video encoding method performed by an encoding device is provided. The method is characterized by including the steps of deriving residual samples for a current block, generating residual information for the residual samples, and encoding image information including the residual information.
[0009] According to another embodiment of the present document, a video encoding device is provided. The encoding device is characterized by including a residual processing unit that derives residual samples for a current block, and an entropy encoding unit that generates residual information for the residual samples and encodes image information including the residual information.
[0010] According to another embodiment of the present document, a computer-readable digital storage medium is provided, which stores a bitstream including image information that causes an image decoding method to be performed. In the computer-readable digital storage medium, the image decoding method is characterized by including the steps of: obtaining residual information of a current block; deriving residual samples of the current block based on the residual information; and generating a restored picture based on the residual samples.
[0011] According to this document, the efficiency of residual coding can be improved.
[0012] According to this document, when the maximum number of context coded bins for the current block in TSRC is exhausted, syntax elements according to a simplified residual data coding structure can be signaled, thereby reducing the coding complexity of syntax elements to be bypass coded and improving the overall residual coding efficiency.
[0013] According to this document, a syntax element-priority order can be used as the coding order of syntax elements to be bypass-coded, thereby further improving the coding efficiency of syntax elements to be bypass-coded and improving the overall residual coding efficiency.
[0014] Figure 1 schematically illustrates an example of a video / image coding system to which embodiments of the present document can be applied.
[0015] FIG. 2 is a drawing schematically illustrating the configuration of a video / image encoding device to which embodiments of this document can be applied.
[0016] FIG. 3 is a drawing schematically illustrating the configuration of a video / image decoding device to which embodiments of this document can be applied.
[0017] Figure 4 shows an example of an inter prediction based video / image encoding method.
[0018] Figure 5 shows an example of an inter prediction based video / image decoding method.
[0019] Figure 6 illustrates an example of an inter prediction procedure.
[0020] Figure 7 illustrates an example of context-adaptive binary arithmetic coding (CABAC) for encoding a syntax element.
[0021] Figure 8 is a diagram showing an example of transform coefficients within a 4x4 block.
[0022] Figure 9 shows an example of how syntax elements are coded in TSRC.
[0023] Figure 10 shows another example of how syntax elements are coded in TSRC.
[0024] Figure 11 shows another example of how syntax elements are coded in TSRC.
[0025] Figure 12 shows an example of coding syntax elements that are bypass coded in TSRC using a coding order that prioritizes syntax elements instead of a coding order that prioritizes coefficient positions.
[0026] Figure 13 shows an example of coding syntax elements that are bypass coded in TSRC using a coding order that prioritizes syntax elements instead of a coding order that prioritizes coefficient positions.
[0027] Figure 14 shows an example of how syntax elements are coded in a simplified residual data coding structure.
[0028] Figure 15 shows an example of coding syntax elements that are bypass coded in a simplified residual data coding structure using a coding order that prioritizes syntax elements instead of a coding order that prioritizes coefficient positions.
[0029] Figures 16a and 16b illustrate embodiments in which syntax elements are coded in a simplified residual data coding structure.
[0030] Figures 17a and 17b illustrate an example of coding syntax elements that are bypass coded in a simplified residual data coding structure using a coding order that prioritizes syntax elements instead of a coding order that prioritizes coefficient positions.
[0031] Figure 18 illustrates embodiments in which syntax elements are coded in a simplified residual data coding structure.
[0032] Figure 19 shows an example of coding syntax elements that are bypass coded in a simplified residual data coding structure using a coding order that prioritizes syntax elements instead of a coding order that prioritizes coefficient positions.
[0033] Figure 20 schematically illustrates a method for encoding an image using an encoding device according to this document.
[0034] Fig. 21 schematically illustrates an encoding device that performs an image encoding method according to this document.
[0035] Figure 22 schematically illustrates a method of decoding an image by a decoding device according to this document.
[0036] Fig. 23 schematically illustrates a decoding device that performs an image decoding method according to this document.
[0037] Figure 24 illustrates an exemplary structure of a content streaming system to which embodiments of this document are applied.
[0038] This document may have various modifications and embodiments, and thus specific embodiments are illustrated and described in detail in the drawings. However, this is not intended to limit the embodiments of this document to specific embodiments. The terminology used herein is only used to describe specific embodiments and is not intended to limit the technical idea of this document. The singular expression includes plural expressions unless the context clearly indicates otherwise. It should be understood that the terms "comprises" or "has" in this specification specify the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not exclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0039] Meanwhile, each component in the drawings described in this document is depicted independently for the convenience of explaining their distinct features. This does not imply that each component is implemented using separate hardware or software. For example, two or more components may be combined to form a single component, or a single component may be divided into multiple components. Embodiments in which each component is integrated and / or separated are also included within the scope of this document, as long as they do not deviate from the essence of this document.
[0040] Hereinafter, with reference to the attached drawings, preferred embodiments of the present document will be described in more detail. Hereinafter, identical components in the drawings will be designated by the same reference numerals, and redundant descriptions of identical components may be omitted.
[0041] Figure 1 schematically illustrates an example of a video / image coding system to which embodiments of the present document can be applied.
[0042] Referring to FIG. 1, a video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device via a digital storage medium or a network in the form of a file or streaming.
[0043] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be referred to as a video / video encoding device, and the decoding device may be referred to as a video / video decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, and the display unit may be configured as a separate device or an external component.
[0044] A video source may obtain video / images through a process of capturing, synthesizing, or generating video / images. The video source may include a video / image capture device and / or a video / image generation device. A video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device may include, for example, a computer, a tablet, a smartphone, etc., and may (electronically) generate video / images. For example, a virtual video / image may be generated through a computer, etc., in which case the video / image capture process may be replaced by a process of generating related data.
[0045] An encoding device can encode input video / images. The encoding device can perform a series of procedures, such as prediction, transformation, and quantization, to improve compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0046] The transmission unit can transmit encoded video / image information or data output in the form of a bitstream to the receiving unit of a receiving device via a digital storage medium or network in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit can include an element for generating a media file via a predetermined file format and an element for transmission via a broadcasting / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.
[0047] The decoding device can decode the video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding device.
[0048] The renderer can render decoded video / images. The rendered video / images can be displayed through the display unit.
[0049] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the VVC (versatile video coding) standard, the EVC (essential video coding) standard, the AV1 (AOMedia Video 1) standard, the AVS2 (2nd generation of audio video coding standard), or the next generation video / image coding standard (e.g., H.267 or H.268).
[0050] This document presents various embodiments of video / image coding, and unless otherwise stated, the embodiments may be performed in combination with each other.
[0051] In this document, a video may refer to a set of images over time. A picture generally refers to a unit representing one image at a specific time point, and a subpicture / slice / tile is a unit that constitutes part of a picture in coding. A subpicture / slice / tile may include one or more CTUs (coding tree units). A picture may be composed of one or more subpictures / slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles. A brick may represent a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each of which consisting of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick.A brick scan may represent a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in a CTU raster scan in a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. Additionally, a subpicture may represent a rectangular region of one or more slices within a picture. That is, a subpicture may contain one or more slices that collectively cover a rectangular region of a picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture.The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set. The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the width of the picture. A tile scan may represent a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in a CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture.A slice includes an integer number of bricks of a picture that may be exclusively contained in a single NAL unit. A slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile. In this document, tile group and slice may be used interchangeably. For example, tile group / tile group header may be referred to as slice / slice header in this document.
[0052] A pixel or pel can refer to the smallest unit that constitutes a picture (or image). Additionally, the term "sample" can be used as a counterpart to a pixel. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luma component, or only the pixel / pixel value of the chroma component.
[0053] A unit may represent a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. In some cases, the term "unit" may be used interchangeably with terms such as "block" or "area." In general, an MxN block may include a set (or array) of samples (or sample array) or transform coefficients consisting of M columns and N rows.
[0054] As used herein, "A or B" can mean "only A," "only B," or "both A and B." In other words, as used herein, "A or B" can be interpreted as "A and / or B." For example, as used herein, "A, B or C" can mean "only A," "only B," "only C," or "any combination of A, B and C."
[0055] As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Accordingly, "A / B" can mean "only A," "only B," or "both A and B." For example, "A, B, C" can mean "A, B, or C."
[0056] In this specification, "at least one of A and B" may mean "only A", "only B" or "both A and B". Additionally, in this specification, the expressions "at least one of A or B" or "at least one of A and / or B" may be interpreted identically to "at least one of A and B".
[0057] Additionally, in this specification, “at least one of A, B and C” can mean “only A,” “only B,” “only C,” or “any combination of A, B and C.” Additionally, “at least one of A, B or C” or “at least one of A, B and / or C” can mean “at least one of A, B and C.”
[0058] Additionally, parentheses used herein may mean "for example." Specifically, when "prediction (intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra-prediction," and "intra-prediction" may be suggested as an example of "prediction." Furthermore, even when "prediction (i.e., intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction."
[0059] Technical features individually described in a single drawing in this specification may be implemented individually or simultaneously.
[0060] The following drawings are intended to illustrate specific examples of the present specification. The names of specific devices and the names of specific signals, messages, and fields depicted in the drawings are provided for illustrative purposes only, and the technical features of this specification are not limited to the specific names used in the drawings.
[0061] Figure 2 is a drawing schematically illustrating the configuration of a video / image encoding device to which embodiments of this document may be applied. The term "video encoding device" hereinafter may include an image encoding device.
[0062] Referring to FIG. 2, the encoding device (200) may be configured to include an image partitioner (210), a prediction unit (predictor) 220, a residual processor (residual processor) 230, an entropy encoder (entropy encoder) 240, an adder (adder) 250, a filter (filter) 260, and a memory (memory) 270. The prediction unit (220) may include an inter prediction unit (221) and an intra prediction unit (222). The residual processor (230) may include a transformer (transformer) 232, a quantizer (quantizer) 233, a dequantizer (dequantizer) 234, and an inverse transformer (inverse transformer) 235. The residual processing unit (230) may further include a subtractor (231). The addition unit (250) may be called a reconstructor or a recontructed block generator. The image segmentation unit (210), the prediction unit (220), the residual processing unit (230), the entropy encoding unit (240), the addition unit (250), and the filtering unit (260) described above may be configured by one or more hardware components (e.g., an encoder chipset or a processor) according to an embodiment. In addition, the memory (270) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory (270) as an internal / external component.
[0063] The image segmentation unit (210) can segment an input image (or picture, frame) input to the encoding device (200) into one or more processing units. For example, the processing unit may be called a coding unit (CU). In this case, the coding unit may be recursively segmented 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 may be segmented into a plurality of coding units of deeper depth based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and the binary tree structure and / or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied first. The coding procedure according to the present document may be performed based on the final coding unit that is no longer segmented. In this case, based on coding efficiency according to image characteristics, etc., the maximum coding unit can be used as the final coding unit, or, if necessary, the coding unit can be recursively divided into coding units of lower depths, and the coding unit of the optimal size can be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration described below. As another example, the processing unit may further include a prediction unit (PU) or a transformation unit (TU). In this case, the prediction unit and the transformation unit may each be divided or partitioned from the final coding unit described above.The above prediction unit may be a unit of sample prediction, and the above transformation unit may be a unit for deriving a transformation coefficient and / or a unit for deriving a residual signal from a transformation coefficient.
[0064] The term "unit" may be used interchangeably with terms such as "block" or "area" depending on the case. In general, an MxN block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component, or only the pixel / pixel value of the chroma component. A sample can be used as a term corresponding to a pixel or pel in a picture (or image).
[0065] The encoding device (200) can generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (predicted block, prediction sample array) output from an inter prediction unit (221) or an intra prediction unit (222) from an input video signal (original block, original sample array), and the generated residual signal is transmitted to a conversion unit (232). In this case, as illustrated, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input video signal (original block, original sample array) within the encoder (200) may be called a subtraction unit (231). The prediction unit can perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied on a current block or CU basis. The prediction unit can generate various information regarding prediction, such as prediction mode information, as described later in the description of each prediction mode, and transmit the information to the entropy encoding unit (240). The information regarding prediction can be encoded in the entropy encoding unit (240) and output in the form of a bitstream.
[0066] The intra prediction unit (222) can predict the current block by referring to samples within the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from it depending on the prediction mode. In intra prediction, the prediction modes may include multiple non-directional modes and multiple directional modes. The non-directional modes may include, for example, a DC mode and a planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the degree of detail in the prediction direction. However, this is merely an example, and a greater or lesser number of directional prediction modes may be used depending on the settings. The intra prediction unit (222) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0067] The inter prediction unit (221) can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include information on the inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring block can include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The above temporal neighboring blocks may be called collocated reference blocks, collocated CUs (colCUs), etc., and the reference pictures including the temporal neighboring blocks may be called collocated pictures (colPic). For example, the inter prediction unit (221) may construct a motion information candidate list based on the neighboring blocks, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit (221) may use the motion information of the neighboring blocks as the motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted.In the motion vector prediction (MVP) mode, the motion vector of the surrounding blocks is used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.
[0068] The prediction unit (220) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP). In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. Palette mode can be viewed as an example of intra coding or intra prediction. When palette mode is applied, sample values within a picture can be signaled based on information about the palette table and palette index.
[0069] The prediction signal generated through the above prediction unit (including the inter prediction unit (221) and / or the intra prediction unit (222)) can be used to generate a restored signal or a residual signal. The transform unit (232) can apply a transform technique to the residual signal to generate transform coefficients. For example, the transform technique can include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loeve Transform (KLT), a Graph-Based Transform (GBT), or a Conditionally Non-linear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. CNT refers to a transform obtained based on a prediction signal generated by using all previously reconstructed pixels. Additionally, the transformation process can be applied to blocks of pixels of equal size, either square or variable size, non-square.
[0070] The quantization unit (233) quantizes the transform coefficients and transmits them to the entropy encoding unit (240), and the entropy encoding unit (240) can encode the quantized signal (information about the quantized transform coefficients) and output it as a bitstream. The information about the quantized transform coefficients may be called residual information. The quantization unit (233) can rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and can also generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit (240) can perform various encoding methods, such as, for example, exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoding unit (240) may encode, together or separately, information necessary for video / image restoration (e.g., values of syntax elements, etc.) in addition to the quantized transform coefficients. The encoded information (e.g., encoded video / image information) may be transmitted or stored in the form of a bitstream in units of NAL (network abstraction layer) units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. In this document, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / image information. The video / image information may be encoded through the above-described encoding procedure and included in the bitstream.The above bitstream may be transmitted through a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, 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 transmitting unit (not shown) and / or a storing unit (not shown), or the transmitting unit may be included in the entropy encoding unit (240).
[0071] The quantized transform coefficients output from the quantization unit (233) can be used to generate a prediction signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients through the inverse quantization unit (234) and the inverse transform unit (235), a residual signal (residual block or residual samples) can be reconstructed. The addition unit (250) can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed 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, such as when skip mode is applied, the predicted block can be used as a reconstructed block. The addition unit (250) may be called a reconstructor or a reconstructed block generation unit. The generated restoration signal can be used for intra prediction of the next processing target block within the current picture, and can also be used for inter prediction of the next picture after filtering as described below.
[0072] Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture encoding and / or restoration process.
[0073] The filtering unit (260) can improve subjective / objective picture quality by applying filtering to the restoration signal. For example, the filtering unit (260) can apply various filtering methods to the restoration picture to generate a modified restoration picture, and store the modified restoration picture in the memory (270), specifically, in the DPB of the memory (270). The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit (260) can generate various information regarding filtering and transmit the information to the entropy encoding unit (240), as described later in the description of each filtering method. The information regarding filtering may be encoded by the entropy encoding unit (240) and output in the form of a bitstream.
[0074] The modified restored picture transmitted to the memory (270) can be used as a reference picture in the inter prediction unit (221). Through this, when inter prediction is applied, the encoding device can avoid prediction mismatch in the encoding device (200) and the decoding device (300), and can also improve encoding efficiency.
[0075] The memory (270) DPB can store the modified restored picture to be used as a reference picture in the inter prediction unit (221). The memory (270) can store motion information of a block from which motion information is derived (or encoded) within the current picture and / or motion information of blocks within a picture that has already been restored. The stored motion information can be transferred to the inter prediction unit (221) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (270) can store restored samples of restored blocks within the current picture and transfer them to the intra prediction unit (222).
[0076] FIG. 3 is a drawing schematically illustrating the configuration of a video / image decoding device to which embodiments of this document can be applied.
[0077] Referring to FIG. 3, the decoding device (300) may be configured to include an entropy decoder (310), a residual processor (320), a predictor (330), an adder (340), a filter (350), and a memory (360). The predictor (330) may include an inter-prediction unit (331) and an intra-prediction unit (332). The residual processor (320) may include a dequantizer (321) and an inverse transformer (322). The entropy decoding unit (310), residual processing unit (320), prediction unit (330), addition unit (340), and filtering unit (350) described above may be configured by a single hardware component (e.g., decoder chipset or processor) depending on the embodiment. In addition, the memory (360) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory (360) as an internal / external component.
[0078] When a bitstream including video / image information is input, the decoding device (300) can restore the image corresponding to the process in which the video / image information is processed in the encoding device of FIG. 2. For example, the decoding device (300) can derive units / blocks based on block division-related information obtained from the bitstream. The decoding device (300) can perform decoding using a processing unit applied in the encoding device. Therefore, the processing unit of decoding may be, for example, a coding unit, and the coding unit may be divided from a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units may be derived from the coding unit. Then, the restored image signal decoded and output through the decoding device (300) can be reproduced through a reproduction device.
[0079] The decoding device (300) can receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal can be decoded through the entropy decoding unit (310). For example, the entropy decoding unit (310) can parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding device can decode the picture further based on the information on 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 and obtained from the bitstream through the decoding procedure. For example, the entropy decoding unit (310) can decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of syntax elements required for image restoration and the quantized values of transform coefficients for residuals. More specifically, the CABAC entropy decoding method receives a bin corresponding to each syntax element in the bitstream, determines a context model using information of a syntax element to be decoded and decoding information of surrounding and decoding target blocks or information of symbols / bins decoded in the previous step, and predicts the occurrence probability of a bin according to the determined context model to perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element.At this time, the CABAC entropy decoding method can update the context model using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information regarding prediction among the information decoded by the entropy decoding unit (310) is provided to the prediction unit (inter prediction unit (332) and intra prediction unit (331)), and residual values on which entropy decoding is performed by the entropy decoding unit (310), i.e., quantized transform coefficients and related parameter information, can be input to the residual processing unit (320). The residual processing unit (320) can derive a residual signal (residual block, residual samples, residual sample array). In addition, information regarding filtering among the information decoded by the entropy decoding unit (310) can be provided to the filtering unit (350). Meanwhile, a receiving unit (not shown) that receives a signal output from an 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 an entropy decoding unit (310). Meanwhile, the decoding device according to the present document may be called a video / video / picture decoding device, and the decoding device may be divided into an information decoder (video / video / picture information decoder) and a sample decoder (video / video / picture sample decoder). The information decoder may include the entropy decoding unit (310), and the sample decoder may include at least one of the inverse quantization unit (321), the inverse transformation unit (322), the addition unit (340), the filtering unit (350), the memory (360), the inter prediction unit (332), and the intra prediction unit (331).
[0080] The inverse quantization unit (321) can inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit (321) can rearrange the quantized transform coefficients into a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scanning order performed in the encoding device. The inverse quantization unit (321) can perform inverse quantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain transform coefficients.
[0081] In the inverse transform unit (322), the transform coefficients are inversely transformed to obtain a residual signal (residual block, residual sample array).
[0082] The prediction unit can perform a prediction on the current block and generate a predicted block containing prediction samples for the current block. Based on the information regarding the prediction output from the entropy decoding unit (310), the prediction unit can determine whether intra-prediction or inter-prediction is applied to the current block, and can determine a specific intra / inter-prediction mode.
[0083] The prediction unit (320) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP). In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. Palette mode can be viewed as an example of intra coding or intra prediction. When palette mode is applied, information about the palette table and palette index may be signaled and included in the video / image information.
[0084] The intra prediction unit (331) can predict the current block by referring to samples within the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from it, depending on the prediction mode. In intra prediction, the prediction modes may include multiple non-directional modes and multiple directional modes. The intra prediction unit (331) can also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0085] The inter prediction unit (332) can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted 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 can include a motion vector and a reference picture index. The motion information can further include information on the inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter prediction unit (332) can construct a motion information candidate list based on the neighboring blocks, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter prediction can be performed based on various prediction modes, and the information about the prediction can include information indicating the mode of inter prediction for the current block.
[0086] The addition unit (340) can generate a restoration signal (restored picture, restoration block, restoration sample array) by adding the acquired residual signal to the prediction signal (predicted block, prediction sample array) output from the prediction unit (including the inter-prediction unit (332) and / or intra-prediction unit (331)). When there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as the restoration block.
[0087] The addition unit (340) may be referred to as a restoration unit or restoration block generation unit. The generated restoration signal may be used for intra prediction of the next processing target block within the current picture, may be output after filtering as described below, or may be used for inter prediction of the next picture.
[0088] Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture decoding process.
[0089] The filtering unit (350) can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit (350) can apply various filtering methods to the restored picture to generate a modified restored picture, and transmit the modified restored picture to the memory (360), specifically, to the DPB of the memory (360). The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0090] 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) can store motion information of a block from which motion information is derived (or decoded) within the current picture and / or motion information of blocks within a picture that has already been reconstructed. The stored motion information can be transferred to the inter prediction unit (260) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (360) can store reconstructed samples of reconstructed blocks within the current picture and transfer them to the intra prediction unit (331).
[0091] 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 (200) can be applied to the filtering unit (350), the inter prediction unit (332), and the intra prediction unit (331) of the decoding device (300) in the same or corresponding manner, respectively.
[0092] In this document, at least one of quantization / dequantization and / or transformation / inverse transformation may be omitted. If the quantization / dequantization is omitted, the quantized transform coefficient may be called a transform coefficient. If the transformation / inverse transformation is omitted, the transform coefficient may be called a coefficient or a residual coefficient, or may still be called a transform coefficient for the sake of consistency of expression.
[0093] In this document, the quantized transform coefficients and transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, the residual information may include information about the transform coefficient(s), and the information about the transform coefficient(s) may be signaled via residual coding syntax. Transform coefficients may be derived based on the residual information (or information about the transform coefficient(s)), and scaled transform coefficients may be derived through inverse transformation (scaling) of the transform coefficients. Residual samples may be derived based on inverse transformation (transformation) of the scaled transform coefficients. This may be similarly applied / expressed in other parts of this document.
[0094] As described above, prediction is performed to increase compression efficiency when performing video coding. Through this, a predicted block including prediction samples for a current block, which is a coding target block, can be generated. Here, the predicted block includes prediction samples in a spatial domain (or pixel domain). The predicted block is derived identically from an encoding device and a decoding device, and the encoding device can increase video coding efficiency by signaling information (residual information) about the residual between the original block and the predicted block, rather than the original sample value of the original block itself, to a decoding device. The decoding device can derive a residual block including residual samples based on the residual information, and generate a reconstructed block including reconstructed samples by combining the residual block and the predicted block, and can generate a reconstructed picture including the reconstructed blocks.
[0095] The residual information may be generated through a transformation and quantization procedure. For example, the encoding device may derive a residual block between the original block and the predicted block, perform a transformation procedure on residual samples (a residual sample array) included in the residual block to derive transform coefficients, and perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, thereby signaling the related residual information to a decoding device (via a bitstream). Here, the residual information may include information such as value information, position information, a transformation technique, a transformation kernel, and quantization parameters of the quantized transform coefficients. The decoding device may perform an inverse quantization / inverse transformation procedure based on the residual information to derive residual samples (or residual blocks). The decoding device may generate a reconstructed picture based on the predicted block and the residual block. The encoding device can also inversely quantize / inversely transform the quantized transform coefficients to derive a residual block for reference in inter prediction of a subsequent picture, and generate a restored picture based on the residual block.
[0096] Intra prediction may refer to a prediction that generates prediction samples for a current block based on reference samples within a picture to which the current block belongs (hereinafter, referred to as the current picture). When intra prediction is applied to a current block, peripheral reference samples to be used for intra prediction of the current block may be derived. The peripheral reference samples of the current block may include a total of 2 x nH samples adjacent to a left boundary and a bottom-left neighboring sample of a current block of a size nW x nH, a total of 2 x nW samples adjacent to a top boundary and a top-right neighboring sample of the current block, and one sample adjacent to the top-left neighboring sample of the current block. Alternatively, the peripheral reference samples of the current block may include upper peripheral samples of multiple columns and left peripheral samples of multiple rows. Additionally, the surrounding reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nWxnH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.
[0097] However, some of the surrounding reference samples of the current block may not yet be decoded or available. In this case, the decoder can construct the surrounding reference samples to be used for prediction by substituting the unavailable samples with available samples. Alternatively, the decoder can construct the surrounding reference samples to be used for prediction by interpolating the available samples.
[0098] When neighboring reference samples are derived, (i) a prediction sample can be derived based on an average or interpolation of neighboring reference samples of the current block, and (ii) the prediction sample can be derived based on a reference sample existing in a specific (prediction) direction with respect to the prediction sample among the neighboring reference samples of the current block. The case of (i) can be called a non-directional mode or a non-angular mode, and the case of (ii) can be called a directional mode or an angular mode.
[0099] In addition, the prediction sample may be generated through interpolation between a first surrounding sample located in the prediction direction of the intra prediction mode of the current block and a second surrounding sample located in the opposite direction of the prediction direction based on the prediction sample of the current block among the surrounding reference samples. The above-described case may be called linear interpolation intra prediction (LIP). In addition, chroma prediction samples may be generated based on luma samples using a linear model (LM). This case may be called LM mode or CCLM (chroma component LM) mode.
[0100] In addition, a temporary prediction sample of the current block may be derived based on filtered peripheral reference samples, and a prediction sample of the current block may be derived by weighting at least one reference sample derived according to the intra prediction mode among the existing peripheral reference samples, i.e., unfiltered peripheral reference samples, with the temporary prediction sample. The above-described case may be referred to as PDPC (Position dependent intra prediction).
[0101] In addition, intra prediction encoding can be performed by selecting a reference sample line with the highest prediction accuracy among the surrounding multiple reference sample lines of the current block, deriving a prediction sample using the reference sample located in the prediction direction in the corresponding line, and then instructing (signaling) the used reference sample line to a decoding device. The above-described case may be called multi-reference line intra prediction or MRL-based intra prediction.
[0102] In addition, the current block can be divided into vertical or horizontal subpartitions, and intra prediction can be performed based on the same intra prediction mode, while peripheral reference samples can be derived and utilized for each subpartition. That is, in this case, the intra prediction mode for the current block is applied equally to the subpartitions, and peripheral reference samples can be derived and utilized for each subpartition, thereby improving intra prediction performance in some cases. This prediction method can be called intra subpartitions (ISP)-based intra prediction.
[0103] The intra prediction methods described above may be referred to as intra prediction types, distinguished from intra prediction modes. The intra prediction types may be referred to by various terms, such as intra prediction techniques or additional intra prediction modes. For example, the intra prediction types (or additional intra prediction modes, etc.) may include at least one of the above-described LIP, PDPC, MRL, and ISP. A general intra prediction method excluding specific intra prediction types such as the above-described LIP, PDPC, MRL, and ISP may be referred to as a normal intra prediction type. The normal intra prediction type may be generally applied when the above-described specific intra prediction types are not applied, and prediction may be performed based on the above-described intra prediction modes. Meanwhile, post-processing filtering may be performed on the derived prediction samples, if necessary.
[0104] Specifically, the intra prediction procedure may include an intra prediction mode / type determination step, a surrounding reference sample derivation step, and an intra prediction mode / type-based prediction sample derivation step. Additionally, a post-processing filtering step may be performed on the derived prediction samples, if necessary.
[0105] When intra prediction is applied, the intra prediction mode applied to the current block can be determined using the intra prediction mode of the surrounding blocks. For example, the decoding device can select one of the MPM candidates in the MPM (most probable mode) list derived based on the intra prediction modes of the surrounding blocks of the current block (e.g., left and / or upper surrounding blocks) and additional candidate modes based on the received MPM index, or can select one of the remaining intra prediction modes not included in the MPM candidates (and planar modes) based on the remaining intra prediction mode information. The MPM list can be configured to include or not include a planar mode as a candidate. For example, when the MPM list includes a planar mode as a candidate, the MPM list can have six candidates, and when the MPM list does not include a planar mode as a candidate, the MPM list can have five candidates. If the above MPM list does not include a planar mode as a candidate, a not planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not a planar mode may be signaled. For example, the MPM flag may be signaled first, and then the MPM index and the not planar flag may be signaled if the value of the MPM flag is 1. In addition, the MPM index may be signaled if the value of the not planar flag is 1. Here, the reason why the above MPM list is configured not to include a planar mode as a candidate is not to mean that the planar mode is not an MPM, but rather to first check whether it is a planar mode by signaling a flag (not planar flag) since the planar mode is always considered as an MPM.
[0106] For example, whether the intra prediction mode applied to the current block is among the MPM candidates (and planar mode) or among the remaining mode can be indicated based on the MPM flag (e.g., intra_luma_mpm_flag). A value of 1 of the MPM flag can indicate that the intra prediction mode for the current block is among the MPM candidates (and planar mode), and a value of 0 of the MPM flag can indicate that the intra prediction mode for the current block is not among the MPM candidates (and planar mode). A value of 0 of the not planar flag (e.g., intra_luma_not_planar_flag) can indicate that the intra prediction mode for the current block is the planar mode, and a value of 1 of the not planar flag can indicate that the intra prediction mode for the current block is not the planar mode. The above MPM index may be signaled in the form of a mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information may be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information may point to one of the remaining intra prediction modes that are not included in the MPM candidates (and planar modes) among all intra prediction modes by indexing them in the order of prediction mode numbers. The intra prediction mode may be an intra prediction mode for a luma component (sample). Hereinafter, the intra prediction mode information may include the MPM flag (ex. intra_luma_mpm_flag), the not planar flag (ex. intra_luma_not_planar_flag), the MPM index (ex.mpm_idx or intra_luma_mpm_idx), and the remaining intra prediction mode information (rem_intra_luma_pred_mode or intra_luma_mpm_remainder). In this document, the MPM list may be called by various terms such as MPM candidate list, candModeList, etc. When MIP is applied to the current block, a separate mpm flag for MIP (e.g. intra_mip_mpm_flag), mpm index (e.g. intra_mip_mpm_idx), and remaining intra prediction mode information (e.g. intra_mip_mpm_remainder) may be signaled, and the not planar flag is not signaled.
[0107] In other words, when an image is typically segmented into blocks, the current block to be coded and the neighboring blocks tend to have similar image characteristics. Therefore, the current block and neighboring blocks are likely to have identical or similar intra-prediction modes. Therefore, the encoder can utilize the intra-prediction modes of the neighboring blocks to encode the intra-prediction mode of the current block.
[0108] For example, the encoder / decoder can construct a list of most probable modes (MPMs) for the current block. The MPM list may also be referred to as an MPM candidate list. Here, the MPM may refer to a mode used to improve coding efficiency by considering the similarity between the current block and surrounding blocks during intra prediction mode coding. As described above, the MPM list may be constructed including a planar mode, or may be constructed excluding a planar mode. For example, if the MPM list includes a planar mode, the number of candidates in the MPM list may be six. And, if the MPM list does not include a planar mode, the number of candidates in the MPM list may be five.
[0109] An encoder / decoder can construct an MPM list containing 5 or 6 MPMs.
[0110] To construct the MPM list, three types of modes can be considered: default intra modes, neighbor intra modes, and derived intra modes.
[0111] For the above peripheral intra modes, two peripheral blocks can be considered, namely, the left peripheral block and the upper peripheral block.
[0112] As described above, if the MPM list is configured not to include the planar mode, the planar mode is excluded from the list, and the number of MPM list candidates can be set to 5.
[0113] Additionally, among the intra prediction modes, the non-directional mode (or non-angular mode) may include a DC mode based on the average of neighboring reference samples of the current block or a planar mode based on interpolation.
[0114] Meanwhile, when inter prediction is applied, the prediction unit of the encoding device / decoding device can perform inter prediction on a block-by-block basis to derive prediction samples. Inter prediction can be a prediction derived in a manner that is dependent on data elements (e.g., sample values or motion information) of picture(s) other than the current picture. When inter prediction is applied to the current block, a predicted block (prediction sample array) for the current block can be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture pointed to by a reference picture index. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information of the current block can be predicted on a block, sub-block, or sample basis 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 may further include information on the inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). When inter prediction is applied, the neighboring blocks may include spatial neighboring blocks existing within 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 blocks may be the same or different.The temporal neighboring blocks may be called collocated reference blocks, collocated CUs (colCUs), etc., and a reference picture including the temporal neighboring blocks may be called a collocated picture (colPic). For example, a motion information candidate list may be constructed based on neighboring blocks of the current block, and flag or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the motion information of the current block may be the same as the motion information of the selected neighboring block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the selected neighboring block is used as a motion vector predictor, and the motion vector difference may be signaled. In this case, the motion vector of the current block can be derived using the sum of the motion vector predictor and the motion vector difference.
[0115] The above motion information may include L0 motion information and / or L1 motion information depending on the inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). A motion vector in the L0 direction may be called an L0 motion vector or MVL0, and a motion vector in the L1 direction may be called an L1 motion vector or MVL1. Prediction based on an L0 motion vector may be called an L0 prediction, prediction based on an L1 motion vector may be called an L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be called a bi-prediction (Bi). Here, an L0 motion vector may represent a motion vector associated with a reference picture list L0 (L0), and an L1 motion vector may represent a motion vector associated with a reference picture list L1 (L1). The reference picture list L0 may include pictures preceding the current picture in output order as reference pictures, and the reference picture list L1 may include pictures succeeding the current picture in output order. The preceding pictures may be called forward (reference) pictures, and the succeeding pictures may be called backward (reference) pictures. The reference picture list L0 may further include pictures succeeding the current picture in output order as reference pictures. In this case, the preceding pictures may be indexed first and the succeeding pictures may be indexed next within the reference picture list L0. The reference picture list L1 may further include pictures preceding the current picture in output order as reference pictures. In this case, the succeeding pictures may be indexed first and the succeeding pictures may be indexed next within the reference picture list 1. Here, the output order may correspond to a POC (picture order count) order.
[0116] A video / image encoding procedure based on inter prediction may roughly include, for example:
[0117] Figure 4 shows an example of an inter prediction based video / image encoding method.
[0118] The encoding device performs inter prediction on the current block (S400). The encoding device can derive the inter prediction mode and motion information of the current block, and generate prediction samples of the current block. Here, the inter prediction mode determination, motion information derivation, and prediction sample generation procedures may be performed simultaneously, or one procedure may be performed before the other. For example, the inter prediction unit of the encoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit, and the prediction mode determination unit may determine the prediction mode for the current block, the motion information derivation unit may derive motion information of the current block, and the prediction sample derivation unit may derive prediction samples of the current block. For example, the inter prediction unit of the encoding device may search for a block similar to the current block within a certain area (search area) of reference pictures through motion estimation, and derive a reference block whose difference from the current block is minimal or below a certain standard. Based on this, a reference picture index indicating a reference picture where the reference block is located can be derived, and a motion vector can be derived based on the positional difference between the reference block and the current block. The encoding device can determine a mode to be applied to the current block among various prediction modes. The encoding device can compare RD costs for the various prediction modes and determine an optimal prediction mode for the current block.
[0119] For example, when the skip mode or merge mode is applied to the current block, the encoding device may configure a merge candidate list described below, and derive a reference block among the reference blocks indicated by the merge candidates included in the merge candidate list, the difference between the current block and the current block being at least or below a certain standard. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and signaled to a decoding device. Motion information of the current block may be derived using motion information of the selected merge candidate.
[0120] As another example, when the (A)MVP mode is applied to the current block, the encoding device may configure an (A)MVP candidate list described below, and use the motion vector of an mvp candidate selected from among mvp (motion vector predictor) candidates included in the (A)MVP candidate list as the mvp of the current block. In this case, for example, a motion vector indicating a reference block derived by the above-described motion estimation may be used as the motion vector of the current block, and an mvp candidate having a motion vector with the smallest difference from the motion vector of the current block among the mvp candidates may become the selected mvp candidate. A motion vector difference (MVD), which is a difference obtained by subtracting the mvp from the motion vector of the current block, may be derived. In this case, information about the MVD may be signaled to the decoding device. In addition, when the (A)MVP mode is applied, the value of the reference picture index may be configured as reference picture index information and signaled separately to the decoding device.
[0121] The encoding device can derive residual samples based on the above predicted samples (S410). The encoding device can derive the residual samples by comparing the original samples of the current block with the predicted samples.
[0122] An encoding device encodes image information including prediction information and residual information (S420). The encoding device can output the encoded image information in the form of a bitstream. The prediction information may include information related to the prediction procedure, such as prediction mode information (e.g., skip flag, merge flag, or mode index) and information about motion information. The information about the motion information may include candidate selection information (e.g., merge index, mvp flag, or mvp index), which is information for deriving a motion vector. In addition, the information about the motion information may include information about the above-described MVD and / or reference picture index information. In addition, the information about the motion information may include information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. The residual information is information about the residual samples. The residual information may include information about quantized transform coefficients for the residual samples.
[0123] The output bitstream can be stored on a (digital) storage medium and transmitted to a decoding device, or can be transmitted to a decoding device via a network.
[0124] Meanwhile, as described above, the encoding device can generate a reconstructed picture (including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples. This is to derive the same prediction result as that performed by the decoding device from the encoding device, thereby improving coding efficiency. Accordingly, the encoding device can store the reconstructed picture (or reconstructed samples, reconstructed blocks) in memory and use it as a reference picture for inter prediction. As described above, an in-loop filtering procedure, etc. can be further applied to the reconstructed picture.
[0125] A video / image decoding procedure based on inter prediction may roughly include, for example:
[0126] Figure 5 shows an example of an inter prediction based video / image decoding method.
[0127] Referring to FIG. 5, the decoding device can perform an operation corresponding to the operation performed by the encoding device. The decoding device can perform a prediction on the current block based on the received prediction information and derive prediction samples.
[0128] Specifically, the decoding device can determine a prediction mode for the current block based on the received prediction information (S500). The decoding device can determine which inter-prediction mode is applied to the current block based on the prediction mode information within the prediction information.
[0129] For example, based on the merge flag, it can be determined whether the merge mode or the (A)MVP mode is applied to the current block. Alternatively, one of various inter prediction mode candidates can be selected based on the mode index. The inter prediction mode candidates can include skip mode, merge mode, and / or (A)MVP mode, or can include various inter prediction modes described below.
[0130] The decoding device derives motion information of the current block based on the determined inter prediction mode (S510). For example, when skip mode or merge mode is applied to the current block, the decoding device may configure a merge candidate list described below and select one of the merge candidates included in the merge candidate list. The selection may be performed based on the above-described selection information (merge index). Motion information of the current block may be derived using motion information of the selected merge candidate. Motion information of the selected merge candidate may be used as motion information of the current block.
[0131] As another example, when the (A)MVP mode is applied to the current block, the decoding device may construct an (A)MVP candidate list described below, and use the motion vector of an MVP candidate selected from among the MVP (motion vector predictor) candidates included in the (A)MVP candidate list as the MVP of the current block. The selection may be performed based on the selection information (mvp flag or mvp index) described above. In this case, the MVD of the current block may be derived based on the information about the MVD, and the motion vector of the current block may be derived based on the MVP of the current block and the MVD. In addition, the reference picture index of the current block may be derived based on the reference picture index information. A picture indicated by the reference picture index within the reference picture list for the current block may be derived as a reference picture referenced for inter prediction of the current block.
[0132] Meanwhile, as described below, motion information of the current block can be derived without constructing a candidate list, in which case the motion information of the current block can be derived according to the procedure initiated in the prediction mode described below. In this case, constructing a candidate list as described above can be omitted.
[0133] The decoding device may generate prediction samples for the current block based on motion information of the current block (S520). In this case, the reference picture may be derived based on the reference picture index of the current block, and prediction samples of the current block may be derived using samples of a reference block pointed to by the motion vector of the current block on the reference picture. In this case, as described below, a prediction sample filtering procedure may be further performed on all or part of the prediction samples of the current block, depending on the case.
[0134] For example, the inter prediction unit of the decoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit, and the prediction mode for the current block may be determined based on prediction mode information received from the prediction mode determination unit, the motion information derivation unit may derive motion information (such as a motion vector and / or a reference picture index) of the current block based on information about the received motion information, and the prediction sample derivation unit may derive prediction samples of the current block.
[0135] The decoding device generates residual samples for the current block based on the received residual information (S530). The decoding device generates reconstructed samples for the current block based on the predicted samples and the residual samples, and can generate a reconstructed picture based on these (S540). As described above, an in-loop filtering procedure, etc., may be further applied to the reconstructed picture.
[0136] Figure 6 illustrates an example of an inter prediction procedure.
[0137] Referring to FIG. 6, the inter prediction procedure as described above may include an inter prediction mode determination step, a motion information derivation step according to the determined prediction mode, and a prediction performance (prediction sample generation) step based on the derived motion information. The inter prediction procedure may be performed in an encoding device and a decoding device as described above. In this document, a coding device may include an encoding device and / or a decoding device.
[0138] Referring to FIG. 6, the coding device determines an inter prediction mode for a current block (S600). Various inter prediction modes may be used to predict the current block within a picture. For example, various modes may be used, such as merge mode, skip mode, MVP (motion vector prediction) mode, affine mode, sub-block merge mode, and MMVD (merge with MVD) mode. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bi-prediction with CU-level weight (BCW), and bi-directional optical flow (BDOF) may be used as additional or alternative modes. Affine mode may be referred to as affine motion prediction mode. MVP mode may be referred to as advanced motion vector prediction (AMVP) mode. In this document, motion information candidates derived by some modes and / or some modes may be included as one of the motion information-related candidates of other modes. For example, an HMVP candidate may be added as a merge candidate of the merge / skip mode, or may be added as an MVP candidate of the MVP mode. When the HMVP candidate is used as a motion information candidate of the merge mode or skip mode, the HMVP candidate may be called an HMVP merge candidate.
[0139] Prediction mode information indicating the inter prediction mode of the current block may be signaled from the encoding device to the decoding device. The prediction mode information may be included in the bitstream and received by the decoding device. The prediction mode information may include index information indicating one of a plurality of candidate modes. Alternatively, the inter prediction mode may be indicated through hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, a skip flag may be signaled to indicate whether skip mode is applied, a merge flag may be signaled to indicate whether merge mode is applied if skip mode is not applied, and if merge mode is not applied, MVP mode may be indicated to be applied, or a flag for additional distinction may be further signaled. The affine mode may be signaled as an independent mode, or as a mode dependent on the merge mode or the MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.
[0140] The coding device derives motion information for the current block (S610). The motion information may be derived based on the inter prediction mode.
[0141] A coding device can perform inter prediction using motion information of the current block. The encoding device can derive optimal motion information for the current block through a motion estimation procedure. For example, the encoding device can search for similar reference blocks with high correlation within a predetermined search range within the reference picture using the original block within the original picture for the current block, in fractional pixel units, and thereby derive motion information. The similarity between blocks can be derived based on the difference in phase-based sample values. For example, the similarity between blocks can be calculated based on the SAD between the current block (or a template of the current block) and the reference block (or a template of the reference block). In this case, motion information can be derived based on the reference block with the smallest SAD within the search range. The derived motion information can be signaled to the decoding device in various ways based on the inter prediction mode.
[0142] The coding device performs inter prediction based on motion information for the current block (S620). The coding device can derive prediction sample(s) for the current block based on the motion information. The current block including the prediction samples may be referred to as a predicted block.
[0143] Meanwhile, as described above, the encoding device can perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. In addition, the decoding device can decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients for residuals.
[0144] For example, the coding methods described above can be performed as described below.
[0145] Fig. 7 illustrates context-adaptive binary arithmetic coding (CABAC) for encoding syntax elements. For example, in the CABAC encoding process, if the input signal is a syntax element rather than a binary value, the encoding device can convert the input signal into a binary value by binarizing the value of the input signal. In addition, if the input signal is already a binary value (i.e., if the value of the input signal is a binary value), binarization may not be performed and may be bypassed. Here, each binary digit 0 or 1 that constitutes the binary value may be referred to as a bin. For example, if the binary string after binarization is 110, each of 1, 1, and 0 is referred to as one bin. The bin(s) for one syntax element may represent the value of the syntax element.
[0146] Thereafter, the binarized bins of the syntax element can be input to a regular encoding engine or a bypass encoding engine. The regular encoding engine of the encoding device can assign a context model that reflects a probability value for the bin and encode the bin based on the assigned context model. The regular encoding engine of the encoding device can update the context model for the bin after performing encoding for each bin. The bin encoded as described above can be expressed as a context-coded bin.
[0147] Meanwhile, when the binarized bins of the syntax element are input to the bypass encoding engine, they can be coded as follows. For example, the bypass encoding engine of the encoding device omits the procedure of estimating the probability for the input bin and the procedure of updating the probability model applied to the bin after encoding. When bypass encoding is applied, the encoding device can encode the input bin by applying a uniform probability distribution instead of assigning a context model, thereby improving the encoding speed. The bins encoded as described above can be expressed as bypass bins.
[0148] Entropy decoding can be described as a process that performs the same process as the entropy encoding described above in reverse order.
[0149] For example, when a syntax element is decoded based on a context model, a decoding device can receive a bin corresponding to the syntax element through a bitstream, determine a context model using the syntax element and decoding information of a block to be decoded or a surrounding block or information of a symbol / bin decoded in a previous step, and predict an occurrence probability of the received bin according to the determined context model to perform arithmetic decoding of the bin to derive the value of the syntax element. Thereafter, a context model of a bin to be decoded next can be updated with the determined context model.
[0150] Additionally, for example, when a syntax element is bypass-decoded, the decoding device can receive a bin corresponding to the syntax element through the bitstream and decode the input bin by applying a uniform probability distribution. In this case, the decoding device can omit the procedure of deriving a context model of the syntax element and the procedure of updating the context model applied to the bin after decoding.
[0151] As described above, residual samples can be derived as quantized transform coefficients through a transform and quantization process. The quantized transform coefficients may also be referred to as transform coefficients. In this case, the transform coefficients within a block can be signaled in the form of residual information. The residual information may include residual coding syntax. That is, an encoding device can construct a residual coding syntax using residual information, encode it, and output it in the form of a bitstream, and a decoding device can decode the residual coding syntax from the bitstream to derive residual (quantized) transform coefficients. The residual coding syntax may include syntax elements that indicate, as described below, whether a transform has been applied to a corresponding block, the location of the last valid transform coefficient within the block, whether a valid transform coefficient exists within a subblock, the size / sign of the valid transform coefficient, etc.
[0152] For example, the (quantized) transform coefficients (i.e., the residual information) can be encoded and / or decoded based on syntax elements such as transform_skip_flag, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, coded_sub_block_flag, sig_coeff_flag, par_level_flag, abs_level_gt1_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, dec_abs_level, mts_idx, etc. Syntax elements related to residual data encoding / decoding can be represented as shown in the following table.
[0153]
[0154]
[0155]
[0156]
[0157] transform_skip_flag indicates whether transform is skipped in an associated block. The transform_skip_flag may be a syntax element of a transform skip flag. The associated block may be a coding block (CB) or a transform block (TB). With respect to transform (and quantization) and residual coding procedures, CB and TB may be used interchangeably. For example, as described above, residual samples may be derived for CB, and (quantized) transform coefficients may be derived through transform and quantization of the residual samples, and information (e.g., syntax elements) that efficiently represent the positions, magnitudes, signs, etc. of the (quantized) transform coefficients may be generated and signaled through the residual coding procedure. The quantized transform coefficients may be simply referred to as transform coefficients. In general, if the CB is not larger than the maximum TB, the size of the CB can be the same as the size of the TB, in which case the target block to be transformed (and quantized) and residually coded can be called CB or TB. On the other hand, if the CB is larger than the maximum TB, the target block to be transformed (and quantized) and residually coded can be called TB. Hereinafter, the syntax elements related to residual coding are described as being signaled in units of transform blocks (TBs), but this is only an example, and as described above, the TBs can be used interchangeably with coding blocks (CBs).
[0158] Meanwhile, the syntax elements signaled after the conversion skip flag is signaled may be identical to the syntax elements disclosed in Table 2 described below, and a specific description of the syntax elements is as described below.
[0159]
[0160]
[0161]
[0162]
[0163]
[0164]
[0165]
[0166]
[0167]
[0168]
[0169]
[0170]
[0171] According to the present embodiment, residual coding can be branched depending on the value of the syntax element transform_skip_flag of the transform skip flag as shown in Table 2. That is, different syntax elements can be used for residual coding based on the value of the transform skip flag (based on whether or not transform is skipped). The residual coding used when transform skip is not applied (i.e., when transform is applied) can be called regular residual coding (RRC), and the residual coding when transform skip is not applied (i.e., when transform is not applied) can be called transform skip residual coding (TSRC). In addition, the regular residual coding may also be called general residual coding. In addition, the above regular residual coding may be called a regular residual coding syntax structure, and the above transform skip residual coding may be called a transform skip residual coding syntax structure. Table 3 may represent syntax elements of residual coding when the value of transform_skip_flag is 0, i.e., when transform is applied, and Table 4 may represent syntax elements of residual coding when the value of transform_skip_flag is 1, i.e., when transform is not applied.
[0172] Specifically, for example, a transform skip flag indicating whether to skip the transform of a transform block may be parsed, and it may be determined whether the transform skip flag is 1. When the value of the transform skip flag is 0, syntax elements for residual coefficients of the transform block last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gtx_flag, par_level_flag, abs_remainder, coeff_sign_flag and / or dec_abs_level may be parsed, as shown in Table 3, and the residual coefficients may be derived based on the syntax elements. In this case, the syntax elements may be parsed sequentially, or the parsing order may be changed. Additionally, the abs_level_gtx_flag may represent abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n][0] may be an example of a first transform coefficient level flag (abs_level_gt1_flag), and the abs_level_gtx_flag[n][1] may be an example of a second transform coefficient level flag (abs_level_gt3_flag).
[0173] Referring to Table 3 described above, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level can be encoded / decoded. Meanwhile, the sb_coded_flag can also be expressed as coded_sub_block_flag.
[0174] In one embodiment, the encoding device can encode (x, y) position information of the last non-zero transform coefficient within a transform block based on the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. More specifically, the last_sig_coeff_x_prefix represents a prefix of a column position of a last significant coefficient in a scanning order within a transform block, the last_sig_coeff_y_prefix represents a prefix of a row position of a last significant coefficient in the scanning order within the transform block, the last_sig_coeff_x_suffix represents a suffix of a column position of a last significant coefficient in the scanning order within the transform block, and the last_sig_coeff_y_suffix represents a suffix of a row position of a last significant coefficient in the scanning order within the transform block. Here, the effective coefficient may represent the non-zero coefficient. In addition, the scan order may be an upward-facing diagonal scan order. Alternatively, the scan order may be a horizontal scan order or a vertical scan order.The above scan order may be determined based on whether intra / inter prediction is applied to the target block (CB, or CB including TB) and / or a specific intra / inter prediction mode.
[0175] Next, the encoding device divides the above transform block into 4x4 sub-blocks, and then uses a 1-bit syntax element coded_sub_block_flag for each 4x4 sub-block to indicate whether a non-zero coefficient exists in the current sub-block.
[0176] If the value of coded_sub_block_flag is 0, there is no more information to transmit, so the encoding device can end the encoding process for the current sub-block. Conversely, if the value of coded_sub_block_flag is 1, the encoding device can continue the encoding process for sig_coeff_flag. The sub-block containing the last non-zero coefficient does not need to encode 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 is not encoded and its value can be assumed to be 1.
[0177] If the value of coded_sub_block_flag is 1 and it is determined that a non-zero coefficient exists in the current sub-block, the encoding device can encode sig_coeff_flag having a binary value according to the reverse scanned order. The encoding device can encode a 1-bit syntax element sig_coeff_flag for each transform coefficient according to the scan order. If the value of the transform coefficient at the current scan position is not 0, the value of sig_coeff_flag can be 1. Here, in the case of a sub-block including the last non-zero coefficient, since sig_coeff_flag does not need to be encoded for the last non-zero coefficient, the encoding process for the sub-block can be omitted. Level information encoding can be performed only when sig_coeff_flag is 1, and four syntax elements can be used in the level information encoding process. More specifically, each sig_coeff_flag[xC][yC] may indicate whether the level (value) of the corresponding transform coefficient at each transform coefficient position (xC, yC) within the current TB is non-zero. In one embodiment, the sig_coeff_flag may correspond to an example of a syntax element of a significant coefficient flag indicating whether the quantized transform coefficient is a significant coefficient that is non-zero.
[0178] The remaining level value after encoding for sig_coeff_flag can be derived as shown in the mathematical formula below. That is, the syntax element remAbsLevel, which indicates the level value to be encoded, can be derived as shown in the mathematical formula below.
[0179]
[0180] Here, coeff refers to the actual transformation coefficient value.
[0181] Additionally, abs_level_gt1_flag can indicate whether remAbsLevel at the corresponding scanning position (n) is greater than 1. For example, if the value of abs_level_gt1_flag is 0, the absolute value of the transform coefficient at the corresponding position can be 1. Additionally, if the value of abs_level_gt1_flag is 1, the remAbsLevel indicating the level value to be encoded thereafter can be updated as in the following mathematical formula.
[0182]
[0183] Additionally, the least significant coefficient (LSB) value of remAbsLevel described in the above-described mathematical expression 2 can be encoded as in the mathematical expression 3 below through par_level_flag.
[0184]
[0185] Here, par_level_flag[n] can indicate the parity of the transform coefficient level (value) at scanning position n.
[0186] After par_leve_flag encoding, the transform coefficient level value remAbsLevel to be encoded can be updated as follows:
[0187]
[0188] abs_level_gt3_flag can indicate whether remAbsLevel at the corresponding scanning position (n) is greater than 3. Encoding for abs_remainder can be performed only when abs_level_gt3_flag is 1. The relationship between the actual transform coefficient value, coeff, and each syntax element can be as follows:
[0189]
[0190] Additionally, the following table shows examples related to the above mathematical expression 5.
[0191]
[0192] Here, | coeff | represents the transform coefficient level (value), which can also be denoted as AbsLevel for the transform coefficient. Additionally, the sign of each coefficient can be encoded using the 1-bit symbol coeff_sign_flag.
[0193] In addition, for example, when the value of the transform skip flag is 1, syntax elements sb_coded_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag, par_level_flag and / or abs_remainder for the residual coefficient of the transform block may be parsed as shown in Table 4, and the residual coefficient may be derived based on the syntax elements. In this case, the syntax elements may be parsed sequentially, or the parsing order may be changed. In addition, the abs_level_gtx_flag may represent abs_level_gt1_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag and / or abs_level_gt9_flag. For example, abs_level_gtx_flag[n][j] may be a flag indicating whether the absolute value or level (value) of the conversion coefficient at scanning position n is greater than (j<<1)+1. The (j<<1)+1 may be replaced with a predetermined threshold, such as a first threshold or a second threshold, as the case may be.
[0194] On the other hand, CABAC has the disadvantage of poor throughput performance although it provides high performance. This is due to CABAC's regular encoding engine. Regular encoding (i.e. encoding through CABAC's regular encoding engine) shows high data dependency because it uses the probability state and range updated through encoding of the previous bin, and it may take a lot of time to read the probability interval and determine the current state. CABAC's throughput issue can be solved by limiting the number of context-coded bins. For example, as shown in Table 1 or Table 3 above, the sum of the bins used to express sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag can be limited to a number according to the size of the corresponding block. Additionally, for example, as in Table 4 described above, the sum of bins used to express sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag abs_level_gt5_flag, abs_level_gt7_flag, and abs_level_gt9_flag may be limited to a number according to the size of the corresponding block.For example, if the block is a 4x4 sized block, the sum of the bins for sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag or sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag may be limited to 32 (or, for example, 28), and if the block is a 2x2 sized block, the sum of the bins for sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag may be limited to 8 (or, for example, 7). The limited number of bins may be represented by remBinsPass1 or RemCcbs. Alternatively, for example, for higher CABAC throughput, the number of context coded bins may be limited for a block (CB or TB) containing the CG to be coded. In other words, the number of context coded bins may be limited on a block (CB or TB) basis. For example, if the size of the current block is 16x16, the number of context coded bins for the current block may be limited to 1.75 times the number of pixels of the current block, i.e., 448, regardless of the current CG.
[0195] In this case, if the encoding device uses all of the limited number of context coded bins to encode the context elements, the remaining coefficients can be binarized using the binarization method for the coefficients described below without using context coding, and bypass coding can be performed. In other words, for example, when the number of context coded bins coded for a 4x4 CG becomes 32 (or, for example, 28), or the number of context coded bins coded for a 2x2 CG becomes 8 (or, for example, 7), sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, which are coded as context coded bins, may not be coded any longer, and may be coded directly as dec_abs_level. Alternatively, for example, if the number of context coded bins for a 4x4 block is limited to 1.75 times the number of pixels in the entire block, i.e., 28, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, which are no longer coded as context coded bins, may not be coded and may be coded directly as dec_abs_level as shown in Table 6 below.
[0196]
[0197] The |coeff| value can be derived based on dec_abs_level. In this case, the transformation coefficient value |coeff| can be derived as follows:
[0198]
[0199] Additionally, the coeff_sign_flag may indicate the sign of the transform coefficient level at the corresponding scanning position (n). That is, the coeff_sign_flag may indicate the sign of the transform coefficient at the corresponding scanning position (n).
[0200] Figure 8 is a diagram showing an example of transform coefficients within a 4x4 block.
[0201] The 4x4 block in Fig. 8 represents an example of quantized coefficients. The block illustrated in Fig. 8 may be a 4x4 transform block, or a 4x4 sub-block of an 8x8, 16x16, 32x32, or 64x64 transform block. The 4x4 block in Fig. 8 may represent a luma block or a chroma block.
[0202] Meanwhile, as described above, if the input signal is a syntax element rather than a binary value, the encoding device can convert the input signal into a binary value by binarizing the value of the input signal. In addition, the decoding device can decode the syntax element to derive a binarized value (i.e., a binarized bin) of the syntax element, and can de-binarize the binarized value to derive the value of the syntax element. The binarization process can be performed by a truncated Rice (TR) binarization process, a k-th order Exp-Golomb (k-th order Exp-Golomb, EGk) binarization process, a k-th Limited Exp-Golomb (Limited k-th order Exp-Golomb, Limited EGk), or a fixed-length (FL) binarization process, which will be described later. Additionally, the reverse binarization process may be performed based on the TR binarization process, the EGk binarization process, or the FL binarization process to represent a process of deriving the value of the syntax element.
[0203] For example, the above TR binarization process can be performed as follows.
[0204] The input of the above TR binarization process may be a request for TR binarization and cMax and cRiceParam for syntax elements. In addition, the output of the above TR binarization process may be a TR binarization for a value symbolVal corresponding to an empty string.
[0205] Specifically, for example, if a suffix empty string exists for a syntax element, the TR empty string for the syntax element may be a concatenation of the prefix empty string and the suffix empty string, and if the suffix empty string does not exist, the TR empty string for the syntax element may be the prefix empty string. For example, the prefix empty string may be derived as described below.
[0206] The prefix value of the symbolVal for the above syntax element can be derived as follows:
[0207]
[0208] Here, prefixVal can represent a prefix value of the symbolVal. The prefix of the TR empty string of the syntax element (i.e., the prefix empty string) can be derived as described below.
[0209] For example, if the prefixVal is less than cMax >> cRiceParam, the prefix bin string may be a bit string of length prefixVal + 1 indexed by binIdx. That is, if the prefixVal is less than cMax >> cRiceParam, the prefix bin string may be a bit string of prefixVal + 1 bits pointed to by binIdx. A bin for a binIdx less than prefixVal may be equal to 1. Additionally, a bin for a binIdx equal to prefixVal may be equal to 0.
[0210] For example, the empty string derived from unary binarization for the above prefixVal may be as shown in the following table.
[0211]
[0212] Meanwhile, if the above prefixVal is not less than cMax >> cRiceParam, the above prefix bin string may be a bit string whose length is cMax >> cRiceParam and all bins are 1.
[0213] Additionally, if cMax is greater than symbolVal and cRiceParam is greater than 0, a suffix empty string of the TR empty string may exist. For example, the suffix empty string can be derived as described below.
[0214] The suffix value of the symbolVal for the above syntax element can be derived as follows:
[0215]
[0216] Here, suffixVal can represent the suffix value of the symbolVal.
[0217] The suffix of the TR bin string (i.e., the suffix bin string) can be derived based on the FL binarization process for suffixVal with cMax value of (1 << cRiceParam)-1.
[0218] Meanwhile, if the value of the input parameter cRiceParam is 0, the TR binarization can be exactly a truncated unary binarization, and the cMax value, which is always equal to the maximum possible value of the syntax element being decoded, can be used.
[0219] Additionally, for example, the EGk binarization process can be performed as follows: a syntax element coded as ue(v) can be an Exp-Golomb coded syntax element.
[0220] As an example, the 0th order Exp-Golomb (EG0) binarization process can be performed as follows.
[0221] The parsing process for the above syntax element can begin by reading the bits starting from the current position in the bitstream, including the first non-zero bit, and counting the number of leading bits equal to 0. The above process can be represented as shown in the following table.
[0222]
[0223] Additionally, the variable codeNum can be derived as follows:
[0224]
[0225] Here, the value returned by read_bits(leadingZeroBits), i.e., the value indicated by read_bits(leadingZeroBits), can be interpreted as a binary representation of an unsigned integer for the most significant bit written first.
[0226] The structure of the Exp-Golomb code, which divides a bit string into "prefix" bits and "suffix" bits, can be represented as shown in the following table.
[0227]
[0228] The "prefix" bit may be a bit parsed as described above for the calculation of leadingZeroBits, and may be represented as 0 or 1 in the bit string in Table 9. That is, a bit string starting with 0 or 1 in Table 9 described above may represent a prefix bit string. The "suffix" bit may be a bit parsed in the calculation of codeNum, and may be represented as xi in Table 9 described above. That is, a bit string starting with xi in Table 9 described above may represent a suffix bit string. Here, i may be a value in the range of 0 to LeadingZeroBits-1. In addition, each xi may be equal to 0 or 1.
[0229] The bit string assigned to the above codeNum can be as shown in the following table.
[0230]
[0231] If the descriptor of the syntax element is ue(v), i.e., if the syntax element is coded as ue(v), the value of the syntax element may be equal to codeNum.
[0232] Additionally, for example, the EGk binarization process can be performed as follows.
[0233] The input of the above EGk binarization process may be a request for EGk binarization. Additionally, the output of the above EGk binarization process may be an EGk binarization for a value symbolVal corresponding to an empty string.
[0234] The bit string of the EGk binarization process for symbolVal can be derived as follows.
[0235]
[0236] Referring to Table 11 above, each call to put(X) can add a binary value X to the end of an empty string, where X can be 0 or 1.
[0237] Additionally, for example, the Limited EGk binarization process can be performed as follows.
[0238] The input of the Limited EGk binarization process may be a request for Limited EGk binarization and a rice parameter riceParam, a variable log2TransformRange representing the binary logarithm of the maximum value, and a variable maxPreExtLen representing the maximum prefix extension length. In addition, the output of the Limited EGk binarization process may be a Limited EGk binarization for a value symbolVal corresponding to an empty string.
[0239] The bit string of the Limited EGk binarization process for symbolVal can be derived as follows.
[0240]
[0241] Additionally, for example, the FL binarization process can be performed as follows.
[0242] The input of the above FL binarization process may be a request for FL binarization and cMax for the syntax element. In addition, the output of the above FL binarization process may be an FL binarization for a value symbolVal corresponding to an empty string.
[0243] FL binarization can be constructed using a bit string having a fixed length of bits of the symbol value symbolVal. Here, the fixed length bits can be an unsigned integer bit string. That is, a bit string for the symbol value symbolVal can be derived through FL binarization, and the bit length (i.e., the number of bits) of the bit string can be a fixed length.
[0244] For example, the fixed length can be derived as follows:
[0245]
[0246] The indexing of bins for FL binarization can be done using values that increase from the most significant bit to the least significant bit. For example, the bin index associated with the most significant bit may be binIdx = 0.
[0247] Meanwhile, for example, the binarization process for the syntax element abs_remainder among the residual information can be performed as follows.
[0248] The input of the binarization process for the above abs_remainder may be a request for binarization of the syntax element abs_remainder[n], a color component cIdx, and a luma location (x0, y0). The luma location (x0, y0) may point to the upper left sample of the current luma transform block based on the upper left luma sample of the picture.
[0249] The output of the binarization process for the above abs_remainder may be a binarization of the above abs_remainder (i.e., a binarized empty string of the above abs_remainder). Through the binarization process, available empty strings for the above abs_remainder may be derived.
[0250] The Rice parameter cRiceParam for the above abs_remainder[n] can be derived through a Rice parameter derivation process performed using the color component cIdx and luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth, which is the binary logarithm of the width of the transform block, and log2TbHeight, which is the binary logarithm of the height of the transform block, as input. A specific description of the Rice parameter derivation process will be described later.
[0251] Additionally, for example, cMax for the currently coded abs_remainder[n] can be derived based on the Rice parameter cRiceParam. The cMax can be derived as follows:
[0252]
[0253] Meanwhile, the binarization for the abs_remainder, i.e., the empty string for the abs_remainder, may be a concatenation of a prefix empty string and a suffix empty string if a suffix empty string exists. Furthermore, if the suffix empty string does not exist, the empty string for the abs_remainder may be the prefix empty string.
[0254] For example, the above prefix empty string can be derived as described below.
[0255] The prefix value prefixVal of the above abs_remainder[n] can be derived as follows:
[0256]
[0257] The prefix of the empty string of the above abs_remainder[n] (i.e., the prefix empty string) can be derived through a TR binarization process for the above prefixVal using the above cMax and the above cRiceParam as inputs.
[0258] If the above prefix empty string is identical to a bit string in which all bits are 1 and the bit length is 6, then a suffix empty string of the above empty string of abs_remainder[n] may exist and can be derived as described below.
[0259] The process of deriving the Rice parameter for the above abs_remainder[n] can be as follows.
[0260] The inputs of the above Rice parameter derivation process may be a color component index cIdx, a luma position (x0, y0), a current coefficient scan position (xC, yC), a binary logarithm of the width of a transform block log2TbWidth, and a binary logarithm of the height of a transform block log2TbHeight. The luma position (x0, y0) may indicate an upper left sample of a current luma transform block based on an upper left luma sample of a picture. In addition, the output of the above Rice parameter derivation process may be the Rice parameter cRiceParam.
[0261] For example, based on the array AbsLevel[x][y] for the transform block with the given component index cIdx and the upper left luma location (x0, y0), the variable locSumAbs can be derived as shown in the pseudo code in the following table.
[0262]
[0263] Afterwards, based on the given variable locSumAbs, the rice parameter cRiceParam can be derived as shown in the following table.
[0264]
[0265] Additionally, for example, in the process of deriving the Rice parameters for abs_remainder[n], baseLevel can be set to 4.
[0266] Alternatively, for example, the Rice parameter cRiceParam may be determined based on whether the transformation of the current block is skipped. That is, if no transformation is applied to the current TB containing the current CG, i.e., if a transform skip is applied to the current TB containing the current CG, the Rice parameter cRiceParam may be derived as 1.
[0267] In addition, the suffix value suffixVal of the above abs_remainder can be derived as in the following mathematical formula.
[0268]
[0269] The suffix empty string of the above abs_remainder can be derived through a Limited EGk binarization process for the above suffixVal in which k is set to cRiceParam+1, riceParam is set to cRiceParam, log2TransformRange is set to 15, and maxPreExtLen is set to 11.
[0270] Meanwhile, for example, the binarization process for the syntax element dec_abs_level among the residual information can be performed as follows.
[0271] The input of the binarization process for the above dec_abs_level may be a request for binarization of the syntax element dec_abs_level[n], a color component cIdx, a luma position (x0, y0), a current coefficient scan position (xC, yC), a binary logarithm of the width of the transform block log2TbWidth, and a binary logarithm of the height of the transform block log2TbHeight. The luma position (x0, y0) may point to the upper left sample of the current luma transform block based on the upper left luma sample of the picture.
[0272] The output of the binarization process for the above dec_abs_level may be a binarization of the above dec_abs_level (i.e., a binarized empty string of the above dec_abs_level). Through the binarization process, available empty strings for the above dec_abs_level may be derived.
[0273] The Rice parameter cRiceParam for the above dec_abs_level[n] can be derived through a Rice parameter derivation process performed using the color component cIdx and luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth, which is the binary logarithm of the width of the transform block, and log2TbHeight, which is the binary logarithm of the height of the transform block, as input. A specific description of the Rice parameter derivation process will be described later.
[0274] Additionally, for example, cMax for the dec_abs_level[n] can be derived based on the Rice parameter cRiceParam. The cMax can be derived as follows:
[0275]
[0276] Meanwhile, the binarization for the dec_abs_level[n], i.e., the empty string for the dec_abs_level[n], may be a concatenation of a prefix empty string and a suffix empty string if a suffix empty string exists. Furthermore, if the suffix empty string does not exist, the empty string for the dec_abs_level[n] may be the prefix empty string.
[0277] For example, the above prefix empty string can be derived as described below.
[0278] The prefix value prefixVal of the above dec_abs_level[n] can be derived as follows:
[0279]
[0280] The prefix of the empty string of the above dec_abs_level[n] (i.e., the prefix empty string) can be derived through a TR binarization process for the above prefixVal using the above cMax and the above cRiceParam as inputs.
[0281] If the above prefix empty string is identical to a bit string in which all bits are 1 and the bit length is 6, then a suffix empty string of the above empty string of dec_abs_level[n] may exist and be derived as described below.
[0282] The process of deriving the Rice parameter for the above dec_abs_level[n] can be as follows.
[0283] The inputs of the above Rice parameter derivation process may be a color component index cIdx, a luma position (x0, y0), a current coefficient scan position (xC, yC), a binary logarithm of the width of a transform block log2TbWidth, and a binary logarithm of the height of a transform block log2TbHeight. The luma position (x0, y0) may indicate an upper left sample of a current luma transform block based on an upper left luma sample of a picture. In addition, the output of the above Rice parameter derivation process may be the Rice parameter cRiceParam.
[0284] For example, based on the array AbsLevel[x][y] for the transform block with the given component index cIdx and the upper left luma location (x0, y0), the variable locSumAbs can be derived as shown in the pseudo code in the following table.
[0285]
[0286] Afterwards, based on the given variable locSumAbs, the rice parameter cRiceParam can be derived as shown in the following table.
[0287]
[0288] Additionally, for example, in the process of deriving the Rice parameter for dec_abs_level[n], baseLevel can be set to 0, and the ZeroPos[n] can be derived as follows.
[0289]
[0290] In addition, the suffix value suffixVal of the above dec_abs_level[n] can be derived as in the following mathematical formula.
[0291]
[0292] The suffix empty string of the above dec_abs_level[n] can be derived through a Limited EGk binarization process for the above suffixVal where k is set to cRiceParam+1, truncSuffixLen is set to 15, and maxPreExtLen is set to 11.
[0293] Meanwhile, the above-described RRC and TSRC may have the following differences.
[0294] - For example, in TSRC, the Rice parameter for the syntax element abs_remainder[] can be derived as 1. The Rice parameter cRiceParam of the syntax element abs_remainder[] in RRC can be derived based on the lastAbsRemainder and the lastRiceParam as described above, but the Rice parameter cRiceParam of the syntax element abs_remainder[] in TSRC can be derived as 1. That is, for example, when transform skip is applied to the current block (e.g., the current TB), the Rice parameter cRiceParam for abs_remainder[] of TSRC for the current block can be derived as 1.
[0295] - Also, for example, referring to Table 3 and Table 4, in RRC, abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1] may be signaled, but in TSRC, abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3] and abs_level_gtx_flag[n][4] may be signaled. Here, the abs_level_gtx_flag[n][0] may be represented as abs_level_gt1_flag or a first coefficient level flag, the abs_level_gtx_flag[n][1] may be represented as abs_level_gt3_flag or a second coefficient level flag, the abs_level_gtx_flag[n][2] may be represented as abs_level_gt5_flag or a third coefficient level flag, the abs_level_gtx_flag[n][3] may be represented as abs_level_gt7_flag or a fourth coefficient level flag, and the abs_level_gtx_flag[n][4] may be represented as abs_level_gt9_flag or a fifth coefficient level flag. Specifically, the first coefficient level flag may be a flag indicating whether the coefficient level is greater than a first threshold (e.g., 1), the second coefficient level flag may be a flag indicating whether the coefficient level is greater than a second threshold (e.g., 3), the third coefficient level flag may be a flag indicating whether the coefficient level is greater than a third threshold (e.g., 5), the fourth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fourth threshold (e.g., 7), and the fifth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fifth threshold (e.g., 9).As described above, TSRC may further include abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and abs_level_gtx_flag[n][4] in addition to abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1] compared to RRC.
[0296] - Also, for example, in RRC, the syntax element coeff_sign_flag can be bypass coded, but in TSRC, the syntax element coeff_sign_flag can be bypass coded or context coded.
[0297] Meanwhile, this document proposes a method of coding by grouping by syntax elements the bins to be bypass-coded when syntax elements are bypass-coded in residual data coding of blocks to which transformation skip is applied, i.e., transformation skip blocks.
[0298] As a proposed embodiment, the number of context coded bins that can be used for residual coding for transform skip within a TU, i.e., the above-described TSRC (Transform Skip Residual Coding), can be limited to a specific threshold, and when all context coded bins that can be used for the TU are exhausted and syntax elements for the TU are subsequently coded as bypass bins, a method is proposed to use a coding order that prioritizes syntax elements instead of a coding order that prioritizes coefficient positions.
[0299] Specifically, for example, the existing TSRC includes coding of syntax elements sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag, abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], abs_level_gtx_flag[n][4] and / or abs_remainder. The above-described syntax elements can be coded in the same order as illustrated in the drawings described below.
[0300] Figure 9 shows an example of how syntax elements are coded in TSRC.
[0301] Meanwhile, in this document, a layer may mean a group / unit in which syntax elements are sequentially coded in one iteration, and may also be described with the above-described meaning in the contents of other embodiments below. In addition, sig illustrated in FIG. 9 may represent sig_coeff_flag, sign may represent coeff_sign_flag, gt0 may represent abs_level_gtx_flag[n][0], par may represent par_level_flag, gt1 may represent abs_level_gtx_flag[n][1], gt2 may represent abs_level_gtx_flag[n][2], gt3 may represent abs_level_gtx_flag[n][3], gt4 may represent abs_level_gtx_flag[n][4], and rem may represent abs_remainder.
[0302] For example, according to the present embodiment illustrated in FIG. 9, in the case of TSRC, the positions of coefficients within one layer can be coded in a priority order. That is, for example, referring to FIG. 9, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag for a specific coefficient (e.g., Coeff0) in the first layer can be coded, and sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag for the next coefficient (e.g., Coeff1) can be coded. Afterwards, for example, in the second layer, abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], abs_level_gtx_flag[n][4] for a specific coefficient (e.g., Coeff0) can be coded, and then abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], abs_level_gtx_flag[n][4] for the next coefficient (e.g., Coeff1) can be coded. Then, finally, in the third layer, all coefficients within the sub-block (e.g., Coeff0 to Coeff n -1 abs_remainder can be coded for )
[0303] Meanwhile, in the TSRC of the VVC standard, as described above, the maximum number of context coded bins available for residual data coding is restricted to a specific threshold value (e.g., RemCcbs or MaxCcbs shown in Table 4), and the specific threshold value can be derived based on the number of samples included in the transform block or the width and / or height of the transform block. For example, the specific threshold value can be derived as in the following mathematical equation.
[0304]
[0305] Here, c can mean any real number. In this document, c is not limited to a specific value. For example, c can have an integer value such as 2, or a decimal value such as 1.5, 1.75, or 1.25. In addition, for example, a threshold value for restricting the maximum number of available context coded bins can be derived based on whether the transform block is a chroma block, in addition to the number of samples included in the transform block or the width and / or height of the transform block. In addition, the threshold value (RemCcbs) is initialized in units of transform blocks, and the threshold value can be decreased by the number of context coded bins used for coding the syntax element for residual data coding.
[0306] Meanwhile, in TSRC, syntax elements sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag, abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], abs_level_gtx_flag[n][4] and / or abs_remainder may be context coded or bypass coded.
[0307] For example, ctxInc for the syntax elements described above can be assigned as shown in the following table.
[0308]
[0309] As shown in Table 17, when coding the syntax elements sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag, abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3] or abs_level_gtx_flag[n][4], if the threshold (MaxCcbs or RemCcbs) is greater than 0, the syntax element can be coded as a context-coded bin, and if the threshold is less than or equal to 0, the syntax element can be coded as a bypass bin using a uniform probability distribution.
[0310] Fig. 10 illustrates another example of how syntax elements in TSRC are coded. For example, Fig. 10 can exemplarily illustrate a case where, in the coding of any sub-block / coefficient group within a transform block, the coeff_sign_flag for Coeff0 is coded as a context-coded bin, and then the threshold becomes 0. In this case, referring to Fig. 10, syntax elements coded after the coeff_sign_flag for Coeff0, including abs_level_gtx_flag[n][0] for Coeff0, can be coded as bypass bins since the remaining threshold is 0, i.e., there are no remaining context-coded bins available, and the coding order of the embodiment illustrated in Fig. 9 described above can be maintained in the embodiment illustrated in Fig. 10 as well.
[0311] Fig. 11 shows another example of how syntax elements in TSRC are coded. In addition, for example, Fig. 11 can exemplarily show a case where, in the coding of any sub-block / coefficient group within a transform block, after abs_level_gtx_flag[n][2] for Coeff0 is coded as a context coded bin, the threshold becomes 0. In this case, referring to Fig. 11, syntax elements coded after abs_level_gtx_flag[n][2] for Coeff0, including abs_level_gtx_flag[n][3] for Coeff0, can be coded as bypass bins since the remaining threshold is 0, i.e., there are no remaining context coded bins available, and the coding order of the embodiment illustrated in Fig. 9 described above can be maintained in the embodiment illustrated in Fig. 11 as well.
[0312] As described above, when all available remaining context coded bins for a block are used up in the TSRC coding process for the block, subsequent syntax elements can be bypass coded. However, in the existing TSRC, when all available remaining context coded bins are exhausted and syntax elements are coded into bypass bins, they can be coded in a coding order that prioritizes coefficient positions as described above. Therefore, this document proposes an embodiment of coding syntax elements to be bypass coded using a coding order that prioritizes syntax elements instead of the existing coding order that prioritizes coefficient positions. Through this, the advantage of a bypass coding engine with high throughput can be maximized, and the efficiency of coding residual data of an image can be improved.
[0313] Specifically, for example, the entropy encoding unit / entropy decoding unit may include a binarization unit, a regular coding engine, and a bypass coding engine. For example, the binarization unit may input the value of a syntax element. The binarization unit may convert the value of the syntax element into a bin string and output it. Here, the bin string may mean a binary sequence or binary code composed of one or more bins. The bin may mean the value (0 or 1) of each digit constituting the binary sequence (or binary code) when the value of the symbol and / or syntax element is expressed as a binary sequence (or binary code) through binarization.
[0314] Afterwards, the binarized signal (bin string) can be input to a regular coding engine or a bypass coding engine. The regular coding engine can assign a context reflecting a probability value to each bin and code the bin based on the assigned context. After performing coding for each bin, the regular coding engine can update the probability and / or context for the bin. Bins coded using the regular coding engine can be referred to as context-coded bins.
[0315] Additionally, the bypass coding engine can bypass the process of estimating probabilities for input bins and the process of updating the probabilities applied to the bins after coding. In bypass mode, throughput can be improved by simply coding the input bins without assigning contexts to them. For example, in bypass mode, the coding process can be performed by applying a uniform probability distribution (0.5). Bins coded using the bypass coding engine can be referred to as bypass-coded bins or bypass bins.
[0316] In general, bypass mode has better throughput performance than context-coded bins. Coding a single context-coded bin may require 1 or more processing cycles. However, for the bypass coding engine, coding n bypass-coded bins requires only one cycle, where n may be greater than 1. To improve the throughput of entropy coding, it may be beneficial to change the coding order (i.e., group) so that bypass-coded bins are coded consecutively. In particular, when grouping bypass-coded bins, grouping them by syntax element may be beneficial in terms of throughput and hardware complexity.
[0317] Fig. 12 shows an example of coding syntax elements that are bypass-coded in TSRC using a coding order that prioritizes syntax elements instead of a coding order that prioritizes coefficient positions. For example, Fig. 12 can exemplarily show a case where, in the coding of any sub-block / coefficient group within a transform block, the threshold value becomes 0 after coeff_sign_flag for Coeff0 is coded as a context-coded bin. In this case, referring to Fig. 12, syntax elements coded after the coeff_sign_flag for Coeff0, including abs_level_gtx_flag[n][0] for Coeff0, can be coded as bypass bins because the residual threshold value is 0, i.e., there are no available residual context-coded bins. For example, referring to Fig. 12, in the first layer, Coeff0 The remaining syntax elements (abs_level_gtx_flag[n][0], par_level_flag) other than the context-coded syntax elements can be bypass-coded according to the existing coding order, but after that, the coefficients Coeff1 Inland Coeff n -1 Syntax elements for can be coded in syntax element order, i.e., after the coefficients Coeff1 Inland Coeff n -1 The sig_coeff_flags for can be bypass coded consecutively, and then the coefficients Coeff1 Inland Coeff n -1 The coeff_sign_flags for can be bypass coded consecutively, and then the coefficients Coeff1 Inland Coeff n -1abs_level_gtx_flag[n][0] can be bypass coded consecutively, and then the coefficients Coeff1 Inland Coeff n -1 The par_level_flags for can be bypass-coded sequentially. Also, for example, referring to Fig. 12, the coding order that prioritizes the proposed syntax elements can be maintained for the coding of syntax elements in layers after the first layer.
[0318] Fig. 13 shows an example of coding syntax elements that are bypass-coded in TSRC using a coding order that prioritizes syntax elements instead of a coding order that prioritizes coefficient positions. For example, Fig. 13 can exemplarily show a case where, in the coding of any sub-block / coefficient group within a transform block, abs_level_gtx_flag[n][2] for Coeff0 is coded as a context-coded bin, and then the threshold becomes 0. In this case, referring to Fig. 13, syntax elements coded after abs_level_gtx_flag[n][2] for Coeff0, including abs_level_gtx_flag[n][3] for Coeff0, can be coded as bypass bins because the residual threshold is 0, i.e., there are no remaining context-coded bins available. For example, referring to Fig. 13, in the second layer, Coeff0 The remaining syntax elements other than the context-coded syntax elements (abs_level_gtx_flag[n][3], abs_level_gtx_flag[n][4]) can be bypass-coded according to the existing coding order, but after that, the coefficients Coeff1 Inland Coeff n -1 Syntax elements for can be coded in syntax element order, i.e., after the coefficients Coeff1 Inland Coeff n -1 abs_level_gtx_flag[n][1] can be bypass coded consecutively, and then the coefficients Coeff1 Inland Coeff n -1 abs_level_gtx_flag[n][2] can be bypass coded consecutively, and then the coefficients Coeff1 Inland Coeff n -1 abs_level_gtx_flag[n][3] can be bypass coded consecutively, and then the coefficients Coeff1 Inland Coeff n -1 The abs_level_gtx_flag[n][4] for can be bypass coded consecutively. Also, for example, referring to Fig. 13, the coding order that prioritizes the proposed syntax elements can be maintained for the coding of syntax elements in layers after the second layer.
[0319] Furthermore, this paper proposes a method of coding by grouping bypass-coded bins by syntax element when syntax elements are bypass-coded in a simplified residual data coding structure. The simplified residual data coding structure can be used for a single coding block or transform block under certain conditions that provide advantages in terms of coding performance, such as lossless coding or near-lossless coding. In this case, a syntax element-prioritized coding order can be used instead of the existing coefficient position-prioritized coding order using the method proposed in this paper.
[0320] In addition, this document proposes, as an embodiment of the present invention, a method of using a syntax element-prioritized coding order instead of a coefficient position-prioritized coding order when all context coded bins that can be used for residual coding within a TU are exhausted and syntax elements for the TU are subsequently coded into bypass bins, in which the number of context coded bins that can be used for residual coding within a TU is limited to a specific threshold. Meanwhile, the existing simplified residual data coding structure may be the same as the drawing described below and the contents of the drawing.
[0321] Fig. 14 shows an example of how syntax elements are coded in a simplified residual data coding structure. Referring to Fig. 14, the existing simplified residual data coding may include coding of syntax elements sig_coeff_flag, coeff_sign_flag, and abs_remainder. Fig. 14 may show a syntax element coding order of a simplified residual data coding structure having a coding order that prioritizes the existing coefficient position for one subblock / coefficient group / transform block / coding block.
[0322] For example, referring to FIG. 14, in the first layer, sig_coeff_flag and coeff_sign_flag may be coded for a specific coefficient, sig_coeff_flag and coeff_sign_flag may be coded for the coefficient following the specific coefficient, and coding of sig_coeff_flag and coeff_sign_flag may be performed up to the coefficient at the last coefficient position in the scan order. Afterwards, in the second layer, coding of abs_remainder for all coefficients in the sub-block may be performed in the scan order. Here, if the value of the coefficient at the corresponding position is 0, the value of sig_coeff_flag may be 0, and if the value of the coefficient at the corresponding position is not 0, the value of sig_coeff_flag may be 1. In addition, coeff_sign_flag may indicate the sign of the coefficient at the corresponding position. For example, if the coefficient at that position is 0, that is, if the sig_coeff_flag for the coefficient is 0, the coeff_sign_flag for the coefficient may not be coded, and if the coefficient is not 0 and the coefficient is negative, the value of coeff_sign_flag for the coefficient may be 1 (or 0), and if the coefficient is not 0 and the coefficient is positive, the value of coeff_sign_flag for the coefficient may be 0 (or 1). Alternatively, regardless of the sig_coeff_flag for the coefficient, if the coefficient is negative, the value of coeff_sign_flag for the coefficient may be 1 (or 0), and if the coefficient is positive or 0, the value of coeff_sign_flag for the coefficient may be 0 (or 1).Alternatively, if the coefficient is positive, regardless of sig_coeff_flag for the coefficient, the value of coeff_sign_flag for the coefficient may be 1 (or 0), and if the coefficient is negative or 0, the value of coeff_sign_flag for the coefficient may be 0 (or 1).
[0323] Meanwhile, this paper proposes a method of coding by grouping by syntax element in a simplified residual data coding structure to obtain advantages in CABAC throughput and hardware complexity.
[0324] Figure 15 shows an example of coding syntax elements that are bypass-coded in a simplified residual data coding structure using a coding order that prioritizes syntax elements instead of a coding order that prioritizes coefficient positions. For example, according to the present embodiment, as shown in Figure 15, in the first layer, the last coefficient in the scan order is Coeff in sig_coeff_flag of Coeff0. n -1 It can be bypass coded consecutively up to sig_coeff_flag of Coeff0, and then from coeff_sign_flag of Coeff0 to the last coefficient in the scan order, Coeff n -1 can be bypass-coded consecutively up to coeff_sign_flag. After that, Coeff0's abs_remainder is the last coefficient in the scan order, Coeff n -1 It can be bypass coded continuously up to abs_remainder.
[0325] Meanwhile, the simplified residual data coding structure may have a syntax structure different from that of the above-described Figure 14. For example, the simplified residual data coding structure may be coded as shown in the drawing described below.
[0326] Figures 16a and 16b illustrate embodiments in which syntax elements are coded in a simplified residual data coding structure. Referring to Figures 16a and 16b, the simplified residual data coding may include coding of syntax elements dec_abs_level and coeff_sign_flag. Figures 16a and 16b may illustrate a syntax element coding order of a simplified residual data coding structure having a coding order that prioritizes existing coefficient positions for one subblock / coefficient group / transform block / coding block. For example, referring to FIG. 16a, dec_abs_level and coeff_sign_flag for a specific coefficient can be coded in one layer, dec_abs_level and coeff_sign_flag for the coefficient following the specific coefficient can be coded, and coding of dec_abs_level and coeff_sign_flag for the coefficient at the last coefficient position in the scan order can be performed. In addition, referring to FIG. 16b, for example, coeff_sign_flag and dec_abs_level for a specific coefficient can be coded in one layer, coeff_sign_flag and dec_abs_level for the coefficient following the specific coefficient can be coded, and coding of coeff_sign_flag and dec_abs_level for the coefficient at the last coefficient position in the scan order can be performed.
[0327] Here, if the coefficient at the corresponding position is 0, the value of dec_abs_level for the coefficient may be 0, and if the coefficient is not 0, the value of dec_abs_level for the coefficient may be the absolute value of the coefficient. In addition, coeff_sign_flag may indicate the sign of the coefficient at the corresponding position. For example, if the coefficient at the corresponding position is 0, that is, if the value of dec_abs_level for the coefficient is 0, coeff_sign_flag for the coefficient may not be coded, and if the coefficient is not 0 and the coefficient is negative, the value of coeff_sign_flag for the coefficient may be 1 (or 0), and if the coefficient is not 0 and the coefficient is positive, the value of coeff_sign_flag for the coefficient may be 0 (or 1). Alternatively, regardless of the dec_abs_level for the coefficient, if the coefficient is negative, the value of coeff_sign_flag for the coefficient may be 1 (or 0), and if the coefficient is positive or 0, the value of coeff_sign_flag for the coefficient may be 0 (or 1). Alternatively, regardless of the dec_abs_level for the coefficient, if the coefficient is positive, the value of coeff_sign_flag for the coefficient may be 1 (or 0), and if the coefficient is negative or 0, the value of coeff_sign_flag for the coefficient may be 0 (or 1).
[0328] Meanwhile, the simplified residual data coding structure described above may be used when certain conditions are satisfied in the above-described RRC or TSRC. For example, residual data may be coded using the simplified residual data coding structure when the current block is lossless coded or near-lossless coded, or when all available context-coded bins for the current block are exhausted.
[0329] For example, this document proposes a method of coding the syntax elements of coefficients for the current block using the simplified residual data coding structure when all available context coded bins for the current block in the TSRC for the current block are exhausted.
[0330] Specifically, for example, syntax elements according to TSRC can be parsed for a current block. In this case, a maximum number of context coded bins available for the current block can be derived, and if the maximum number of context coded bins for the current block are all used for coding syntax elements for transform coefficients preceding the current transform coefficient in the scanning order, syntax elements for the current transform coefficient and a subsequent transform coefficient of the current transform coefficient in the scanning order can be coded with the simplified residual data coding structure. Accordingly, syntax elements for the current transform coefficient and a subsequent transform coefficient of the current transform coefficient in the scanning order can include coefficient level information for the transform coefficient and a sign flag. A decoding device can derive the transform coefficient based on syntax elements for the transform coefficient coded with the simplified residual data coding structure. For example, the coefficient level information may indicate the absolute value of the coefficient level of the transform coefficient. Additionally, the sign flag may indicate the sign of the current transform coefficient. The decoding device may derive the coefficient level of the transform coefficient based on the coefficient level information, and may derive the sign of the transform coefficient based on the sign flag.
[0331] Meanwhile, this document proposes a method of coding by grouping syntax elements to be bypass-coded by syntax element in the simplified residual data coding structure illustrated in FIG. 16 described above to generate advantages in CABAC throughput and hardware complexity.
[0332] Figures 17a and 17b illustrate an example of coding syntax elements that are bypass-coded in a simplified residual data coding structure using a coding order that prioritizes syntax elements instead of a coding order that prioritizes coefficient positions. For example, according to the present embodiment, as illustrated in Figure 17a, in one layer, the last coefficient in the scan order at dec_abs_level of Coeff0 is Coeff n -1 It can be bypass coded continuously up to dec_abs_level of Coeff0, and then Coeff0, which is the last coefficient in the scan order, is Coeff_sign_flag. n -1 can be bypass-coded consecutively up to the coeff_sign_flag of Coeff0. Or, for example, according to the present embodiment, as shown in Fig. 17b, in one layer, the last coefficient in the scan order is Coeff n-1 It can be bypass coded consecutively up to coeff_sign_flag of Coeff0, and then Coeff0, which is the last coefficient in the scan order, is dec_abs_level of Coeff n -1 Bypass coding can be performed continuously up to the dec_abs_level. Through this embodiment, bypass coded bins can be grouped by syntax element and coded continuously, which can increase the processing capacity of entropy coding and reduce hardware complexity.
[0333] Meanwhile, the simplified residual data coding structure may have a different syntax structure from that of FIG. 14 and FIG. 16A to FIG. 16B described above. For example, the simplified residual data coding structure may be coded as shown in the drawings described below.
[0334] Fig. 18 illustrates embodiments in which syntax elements are coded in a simplified residual data coding structure. Referring to Fig. 18, the simplified residual data coding may include coding of syntax elements sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag, and abs_remainder. Fig. 18 may illustrate a syntax element coding order of a simplified residual data coding structure having a coding order that prioritizes existing coefficient positions for one subblock / coefficient group / transform block / coding block. For example, referring to FIG. 18, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag for a specific coefficient may be coded in the first layer, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag for the coefficient following the specific coefficient may be coded, and coding of sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag for the coefficient at the last coefficient position in the scan order may be performed. Thereafter, coding of abs_remainder for all coefficients in the sub-block in the second layer may be performed in the scan order.
[0335] This paper proposes a method of coding syntax elements by grouping them by syntax element in the simplified residual data coding structure illustrated in FIG. 18 described above to obtain advantages in CABAC throughput and hardware complexity.
[0336] Figure 19 illustrates an example of coding syntax elements that are bypass-coded in a simplified residual data coding structure using a coding order that prioritizes syntax elements instead of a coding order that prioritizes coefficient positions. For example, according to the present embodiment, as illustrated in Figure 19, in the first layer, the last coefficient in the scan order is Coeff in sig_coeff_flag of Coeff0. n -1 It can be bypass coded consecutively up to sig_coeff_flag of Coeff0, and then from coeff_sign_flag of Coeff0 to the last coefficient in the scan order, Coeff n -1 It can be bypass coded consecutively up to coeff_sign_flag of Coeff0, and then Coeff0, which is the last coefficient in the scan order, is abs_level_gtx_flag[n][0]. n -1 It can be bypass coded consecutively up to abs_level_gtx_flag[n][0], and then Coeff0's par_level_flag is the last coefficient in the scan order, Coeff n -1 can be bypass-coded continuously up to par_level_flag. After that, in the abs_remainder of Coeff0 in the second layer, the last coefficient in the scan order is Coeff n -1Bypass coding can be performed continuously up to the abs_remainder. Through this embodiment, bypass coded bins can be grouped by syntax element and coded continuously, which can increase the processing capacity of entropy coding and reduce hardware complexity.
[0337] Fig. 20 schematically illustrates a video encoding method by an encoding device according to the present document. The method disclosed in Fig. 20 can be performed by the encoding device disclosed in Fig. 2. Specifically, for example, S2000 of Fig. 20 can be performed by a residual processing unit of the encoding device, and S2010 to S2020 can be performed by an entropy encoding unit of the encoding device. In addition, although not illustrated, a process of deriving a prediction sample can be performed by a prediction unit of the encoding device, a process of deriving a residual sample for the current block based on an original sample and a prediction sample for the current block can be performed by a subtraction unit of the encoding device, and a process of generating a reconstructed sample and a reconstructed picture for the current block based on the residual sample and the prediction sample for the current block can be performed by an addition unit of the encoding device.
[0338] An encoding device derives residual samples for a current block (S2000). For example, the encoding device can determine whether to perform inter prediction or intra prediction on the current block, and can determine a specific inter prediction mode or a specific intra prediction mode based on RD cost. Depending on the determined mode, the encoding device can derive prediction samples for the current block, and can derive residual samples for the current block by subtracting the original samples for the current block and the prediction samples.
[0339] The encoding device generates residual information for the residual samples (S2010).
[0340] For example, the encoding device can derive transform coefficients for the current block based on the residual samples. For example, the encoding device can determine whether a transform is applied to the current block. That is, the encoding device can determine whether a transform is applied to the residual samples of the current block. The encoding device can determine whether a transform is applied to the current block by considering coding efficiency. For example, the encoding device can determine that a transform is not applied to the current block. The block to which the transform is not applied can be represented as a transform skip block. That is, for example, the current block can be a transform skip block.
[0341] If no transformation is applied to the current block, that is, if no transformation is applied to the residual samples, the encoding device can derive the derived residual samples as the transformation coefficients. In addition, if a transformation is applied to the current block, that is, if a transformation is applied to the residual samples, the encoding device can perform a transformation on the residual samples to derive the transformation coefficients. The current block may include a plurality of sub-blocks or coefficient groups (CGs). In addition, the size of the sub-block of the current block may be a 4x4 size or a 2x2 size. That is, the sub-block of the current block may include at most 16 non-zero transformation coefficients or at most 4 non-zero transformation coefficients.
[0342] Here, the current block may be a coding block (CB) or a transform block (TB). Additionally, the transform coefficient may also be expressed as a residual coefficient.
[0343] Thereafter, for example, the encoding device can generate and encode syntax elements of TSRC (Transform Skip Residual Coding) for the transform coefficients of the current block.
[0344] For example, the encoding device can generate and encode syntax elements for the first transform coefficient to the n-th transform coefficient of the current block. The residual information of the current block can include syntax elements for the first transform coefficient to the n-th transform coefficient of the current block.
[0345] For example, the residual information may include syntax elements for the first transform coefficient to the n-th transform coefficient of the current block. Here, for example, the syntax elements may be syntax elements according to the first residual data coding structure of TSRC (Transform Skip Residual Coding). The syntax elements according to the first residual data coding structure may include context-coded syntax elements and / or bypass-coded syntax elements for the transform coefficients. The syntax elements according to the first residual data coding structure may include syntax elements such as sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, abs_remainder, and / or coeff_sign_flag.
[0346] For example, the context coded syntax elements for the transform coefficients may include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a sign flag indicating a sign of the transform coefficient, a first coefficient level flag indicating whether a coefficient level of the transform coefficient is greater than a first threshold, and / or a parity level flag indicating parity of a coefficient level of the transform coefficient. Further, for example, the context coded syntax elements may include a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold, a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third threshold, a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the valid coefficient flag may be sig_coeff_flag, the sign flag may be ceff_sign_flag, the first coefficient level flag may be abs_level_gt1_flag, and the parity level flag may be par_level_flag. In addition, the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag may be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag may be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag may be abs_level_gt9_flag or abs_level_gtx_flag.
[0347] Additionally, for example, the bypass-coded syntax elements for the transform coefficients may include coefficient level information for the values (or coefficient levels) of the transform coefficients and / or a sign flag indicating a sign for the transform coefficients. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.
[0348] Also, for example, the number of context coded syntax elements for the first transform coefficient to the n-th transform coefficient may be equal to the maximum number of context coded bins of the current block. That is, for example, the context coded bins for the current block may all be used as bins of context coded syntax elements for the first transform coefficient to the n-th transform coefficient among the transform coefficients of the current block. For example, the maximum number of context coded bins of the current block may be derived based on the width and height of the current block. For example, the maximum number of context coded bins of the current block may be derived as a value obtained by multiplying a specific value by the number of samples of the current block. Here, the number of samples may be derived as a value obtained by multiplying the width and height of the current block. Additionally, the specific value may have an integer value such as 2, or may have a decimal value such as 1.5, 1.75, or 1.25.
[0349] Meanwhile, for example, syntax elements according to the first residual data coding structure may be coded in a coding order according to coefficient positions. The coding order according to the coefficient positions may be a scanning order of the transform coefficients. For example, the scanning order may be a raster scan order. For example, the raster scan order may indicate an order of sequentially scanning downwards from the top row and scanning from left to right in each row. For example, syntax elements according to the first residual data coding structure may be coded in the order of syntax elements for the first transform coefficient to syntax elements for the n-th transform coefficient. Additionally, for example, if the current block includes a plurality of sub-blocks or coefficient groups (CG), the plurality of sub-blocks or coefficient groups can be coded according to the scanning order, and syntax elements for transform coefficients within each sub-block or coefficient group can be coded according to the scanning order.
[0350] Meanwhile, for example, the residual information may include a transform skip flag for the current block. The transform skip flag may indicate whether a transform is applied to the current block. That is, the transform skip flag may indicate whether a transform is applied to the transform coefficients of the current block. A syntax element indicating the transform skip flag may be the above-described transform_skip_flag. For example, when the value of the transform skip flag is 0, the transform skip flag may indicate that a transform is not applied to the current block, and when the value of the transform skip flag is 1, the transform skip flag may indicate that a transform is applied to the current block. For example, when the current block is a transform skip block, the value of the transform skip flag for the current block may be 1.
[0351] Additionally, for example, the encoding device can generate and encode syntax elements for the n+1th transform coefficient to the last transform coefficient of the current block.
[0352] For example, the residual information may include syntax elements for the n+1th transform coefficient to the last transform coefficient of the current block. Here, for example, the syntax elements may be syntax elements according to the second residual data coding structure of TSRC (Transform Skip Residual Coding). The syntax elements according to the second residual data coding structure may also be expressed as syntax elements according to a simplified residual data coding structure. For example, if the context coded bins for the current block are all used as bins of context coded syntax elements for the first transform coefficient to the n-th transform coefficient among the transform coefficients of the current block, that is, if, for example, the number of context coded syntax elements for the first transform coefficient to the n-th transform coefficient is equal to or greater than the maximum number of context coded bins of the current block, the encoding device can generate and encode syntax elements for the n+1-th transform coefficient to the last transform coefficient of the current block, which are syntax elements according to the second residual data coding structure of the TSRC.
[0353] For example, the syntax elements according to the second residual data coding structure may include bypass-coded syntax elements for the transform coefficients. For example, the syntax elements according to the second residual data coding structure may include coefficient level information and a sign flag for the transform coefficients. For example, the syntax elements according to the second residual data coding structure may include coefficient level information for the absolute value of the coefficient level of the transform coefficients and a sign flag for the sign of the transform coefficients. The syntax elements for the transform coefficients may be coded based on a bypass basis. That is, the residual syntax elements for the transform coefficients may be coded based on a uniform probability distribution. For example, the coefficient level information may indicate the absolute value of the coefficient level of the transform coefficients. In addition, the sign flag may indicate the sign of the transform coefficients. For example, when the value of the sign flag is 0, the sign flag may indicate that the coefficient level of the transform coefficient is a positive value, and when the value of the sign flag is 1, the sign flag may indicate that the coefficient level of the transform coefficient is a negative value. The coefficient level information may be the abs_remainder described above, and the sign flag may be the coeff_sign_flag described above.
[0354] Meanwhile, for example, syntax elements according to the second residual data coding structure may be coded in a coding order according to coefficient positions. The coding order that prioritizes the coefficient positions may be a scanning order of the transform coefficients. For example, the scanning order may be a raster scan order. For example, the raster scan order may indicate an order of sequentially scanning downwards from the top row and scanning from left to right in each row. For example, syntax elements according to the second residual data coding structure may be coded in the order of syntax elements for the (n+1)th transform coefficient to syntax elements for the last transform coefficient. Additionally, for example, if the current block includes a plurality of sub-blocks or coefficient groups (CG), the plurality of sub-blocks or coefficient groups can be coded according to the scanning order, and syntax elements for transform coefficients within each sub-block or coefficient group can be coded according to the scanning order.
[0355] Alternatively, for example, syntax elements according to the second residual data coding structure may be coded in a coding order according to the syntax element. That is, for example, syntax elements according to the second residual data coding structure may be coded in a coding order that prioritizes the syntax element. For example, coefficient level information for the n+1-th transform coefficient to the last transform coefficient may be coded, and then sign flags for the n+1-th transform coefficient to the last transform coefficient may be coded. Specifically, for example, the coefficient level information for the n+1-th transform coefficient may be coded in the order of coefficient level information for the last transform coefficient, and then the coding may be coded in the order of the sine flag for the n+1-th transform coefficient to the sine flag for the last transform coefficient.
[0356] The encoding device encodes image information including the residual information (S2020). The encoding device can encode image information including the residual information. For example, the residual information can include syntax elements according to the first residual data coding structure and syntax elements according to the second residual data coding structure.
[0357] For example, the encoding device can encode image information including the syntax elements according to the first residual data coding structure and the syntax elements according to the second residual data coding structure. For example, the image information can include residual information of the current block. For example, the encoding device can encode image information including the residual information and output it in the form of a bitstream. The bitstream can be transmitted to a decoding device via a network or a storage medium.
[0358] Additionally, for example, the encoding device can generate and encode prediction information for the current block. The image information can include prediction information for the current block. The prediction information can include information about an inter-prediction mode or an intra-prediction mode performed on the current block. The decoding device can perform inter-prediction or intra-prediction on the current block based on the prediction information received through the bitstream and derive prediction samples of the current block.
[0359] Meanwhile, the bitstream may be transmitted to a decoding device via a network or (digital) storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.
[0360] Fig. 21 schematically illustrates an encoding device that performs a video encoding method according to the present document. The method disclosed in Fig. 20 can be performed by the encoding device disclosed in Fig. 21. Specifically, for example, the residual processing unit of the encoding device of Fig. 21 can perform S2000 of Fig. 20, and the entropy encoding unit of the encoding device of Fig. 21 can perform S2010 to S2020 of Fig. 20. In addition, although not illustrated, the process of deriving a prediction sample can be performed by the prediction unit of the encoding device, the process of deriving a residual sample for the current block based on the original sample and the prediction sample for the current block can be performed by the subtraction unit of the encoding device, and the process of generating a reconstructed sample and a reconstructed picture for the current block based on the residual sample and the prediction sample for the current block can be performed by the addition unit of the encoding device.
[0361] Fig. 22 schematically illustrates a video decoding method by a decoding device according to the present document. The method disclosed in Fig. 22 can be performed by the decoding device disclosed in Fig. 3. Specifically, for example, S2200 of Fig. 22 can be performed by an entropy decoding unit of the decoding device, S2210 of Fig. 22 can be performed by a residual processing unit of the decoding device, and S2220 of Fig. 22 can be performed by an adding unit of the decoding device. In addition, although not illustrated, a process of receiving prediction information for a current block can be performed by an entropy decoding unit of the decoding device, and a process of deriving a prediction sample of the current block can be performed by a prediction unit of the decoding device.
[0362] The decoding device obtains residual information of the current block (S2200). The decoding device can obtain image information including residual information for the current block through a bitstream.
[0363] The residual information may include syntax elements for the transform coefficients of the current block. Here, the current block may be a coding block (CB) or a transform block (TB). In addition, the transform coefficient may also be expressed as a residual coefficient. In addition, for example, the current block may be a transform skip block.
[0364] For example, the decoding device can obtain syntax elements for the first transform coefficient to the n-th transform coefficient of the current block. For example, the residual information can include syntax elements for the first transform coefficient to the n-th transform coefficient of the current block. Here, for example, the syntax elements can be syntax elements according to the first residual data coding structure of TSRC (Transform Skip Residual Coding). The syntax elements according to the first residual data coding structure can include context-coded syntax elements and / or bypass-coded syntax elements for the transform coefficients. The syntax elements according to the first residual data coding structure may include syntax elements such as sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, abs_remainder and / or coeff_sign_flag.
[0365] For example, the context coded syntax elements for the transform coefficients may include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a sign flag indicating a sign of the transform coefficient, a first coefficient level flag indicating whether a coefficient level of the transform coefficient is greater than a first threshold, and / or a parity level flag indicating parity of a coefficient level of the transform coefficient. Further, for example, the context coded syntax elements may include a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold, a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third threshold, a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the valid coefficient flag may be sig_coeff_flag, the sign flag may be ceff_sign_flag, the first coefficient level flag may be abs_level_gt1_flag, and the parity level flag may be par_level_flag. In addition, the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag may be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag may be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag may be abs_level_gt9_flag or abs_level_gtx_flag.
[0366] Additionally, for example, the bypass-coded syntax elements for the transform coefficients may include coefficient level information for the values (or coefficient levels) of the transform coefficients and / or a sign flag indicating a sign for the transform coefficients. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.
[0367] Also, for example, the number of context coded syntax elements for the first transform coefficient to the n-th transform coefficient may be equal to the maximum number of context coded bins of the current block. That is, for example, the context coded bins for the current block may all be used as bins of context coded syntax elements for the first transform coefficient to the n-th transform coefficient among the transform coefficients of the current block. For example, the maximum number of context coded bins of the current block may be derived based on the width and height of the current block. For example, the maximum number of context coded bins of the current block may be derived as a value obtained by multiplying a specific value by the number of samples of the current block. Here, the number of samples may be derived as a value obtained by multiplying the width and height of the current block. Additionally, the specific value may have an integer value such as 2, or may have a decimal value such as 1.5, 1.75, or 1.25.
[0368] Meanwhile, for example, syntax elements according to the first residual data coding structure may be coded in a coding order according to coefficient positions. The coding order according to the coefficient positions may be a scanning order of the transform coefficients. For example, the scanning order may be a raster scan order. For example, the raster scan order may indicate an order of sequentially scanning downwards from the top row and scanning from left to right in each row. For example, syntax elements according to the first residual data coding structure may be coded in the order of syntax elements for the first transform coefficient to syntax elements for the n-th transform coefficient. Additionally, for example, if the current block includes a plurality of sub-blocks or coefficient groups (CG), the plurality of sub-blocks or coefficient groups can be coded according to the scanning order, and syntax elements for transform coefficients within each sub-block or coefficient group can be coded according to the scanning order.
[0369] Additionally, for example, the residual information may include a transform skip flag for the current block. The transform skip flag may indicate whether a transform is applied to the current block. That is, the transform skip flag may indicate whether a transform is applied to transform coefficients of the current block. A syntax element indicating the transform skip flag may be the above-described transform_skip_flag. For example, when the value of the transform skip flag is 0, the transform skip flag may indicate that a transform is not applied to the current block, and when the value of the transform skip flag is 1, the transform skip flag may indicate that a transform is applied to the current block. For example, when the current block is a transform skip block, the value of the transform skip flag for the current block may be 1.
[0370] In addition, for example, the decoding device can obtain syntax elements for the n+1-th transform coefficient to the last transform coefficient of the current block. For example, the residual information can include syntax elements for the n+1-th transform coefficient to the last transform coefficient of the current block. Here, for example, the syntax elements can be syntax elements according to the second residual data coding structure of TSRC (Transform Skip Residual Coding). The syntax elements according to the second residual data coding structure can also be expressed as syntax elements according to a simplified residual data coding structure. For example, if the context coded bins for the current block are all used as bins of context coded syntax elements for the first transform coefficient to the n-th transform coefficient among the transform coefficients of the current block, that is, if, for example, the number of context coded syntax elements for the first transform coefficient to the n-th transform coefficient is equal to or greater than the maximum number of context coded bins of the current block, the decoding device can obtain syntax elements for the n+1-th transform coefficient to the last transform coefficient of the current block, which are syntax elements according to the second residual data coding structure of the TSRC.
[0371] For example, the syntax elements according to the second residual data coding structure may include bypass-coded syntax elements for the transform coefficients. For example, the syntax elements according to the second residual data coding structure may include coefficient level information and a sign flag for the transform coefficients. For example, the syntax elements according to the second residual data coding structure may include coefficient level information for the absolute value of the coefficient level of the transform coefficients and a sign flag for the sign of the transform coefficients. The syntax elements for the transform coefficients may be decoded based on a bypass basis. That is, the residual syntax elements for the transform coefficients may be decoded based on a uniform probability distribution. For example, the coefficient level information may indicate the absolute value of the coefficient level of the transform coefficients. In addition, the sign flag may indicate the sign of the transform coefficients. For example, when the value of the sign flag is 0, the sign flag may indicate that the coefficient level of the transform coefficient is a positive value, and when the value of the sign flag is 1, the sign flag may indicate that the coefficient level of the transform coefficient is a negative value. The coefficient level information may be the abs_remainder described above, and the sign flag may be the coeff_sign_flag described above.
[0372] Meanwhile, for example, syntax elements according to the second residual data coding structure may be coded in a coding order according to coefficient positions. The coding order that prioritizes the coefficient positions may be a scanning order of the transform coefficients. For example, the scanning order may be a raster scan order. For example, the raster scan order may indicate an order of sequentially scanning downwards from the top row and scanning from left to right in each row. For example, syntax elements according to the second residual data coding structure may be coded in the order of syntax elements for the (n+1)th transform coefficient to syntax elements for the last transform coefficient. Additionally, for example, if the current block includes a plurality of sub-blocks or coefficient groups (CG), the plurality of sub-blocks or coefficient groups can be coded according to the scanning order, and syntax elements for transform coefficients within each sub-block or coefficient group can be coded according to the scanning order.
[0373] Alternatively, for example, syntax elements according to the second residual data coding structure may be coded in a coding order according to the syntax element. That is, for example, syntax elements according to the second residual data coding structure may be coded in a coding order that prioritizes the syntax element. For example, coefficient level information for the n+1-th transform coefficient to the last transform coefficient may be coded, and then sign flags for the n+1-th transform coefficient to the last transform coefficient may be coded. Specifically, for example, the coefficient level information for the n+1-th transform coefficient may be coded in the order of coefficient level information for the last transform coefficient, and then the coding may be coded in the order of the sine flag for the n+1-th transform coefficient to the sine flag for the last transform coefficient.
[0374] The decoding device derives residual samples of the current block based on the residual information (S2210). The decoding device can derive residual samples of the current block based on the residual information.
[0375] For example, the decoding device can derive transform coefficients of the current block based on the syntax elements according to the first residual data coding structure and the syntax elements according to the second residual data coding structure.
[0376] For example, the decoding device can derive the first transform coefficient to the n-th transform coefficient based on the syntax elements according to the first residual data coding structure.
[0377] In addition, for example, the decoding device can derive the n+1th transform coefficient to the last transform coefficient based on the syntax elements according to the second residual data coding structure. For example, the coefficient level for the corresponding transform coefficient can be derived as a value indicated by coefficient level information for the corresponding transform coefficient, and the sign of the corresponding transform coefficient can be derived as a sign indicated by the sign flag. In this case, for example, the corresponding transform coefficient can be derived without performing level mapping.
[0378] Thereafter, for example, the decoding device can derive residual samples of the current block based on the transform coefficients. For example, if it is determined that no transform is applied to the current block based on the transform skip flag, that is, if the value of the transform skip flag is 1, the decoding device can derive the transform coefficients as the residual samples of the current block. Or, for example, if it is determined that no transform is applied to the current block based on the transform skip flag, that is, if the value of the transform skip flag is 1, the decoding device can inversely quantize the transform coefficients to derive the residual samples of the current block. Or, for example, if it is determined that a transform is applied to the current block based on the transform skip flag, that is, if the value of the transform skip flag is 0, the decoding device can inversely transform the transform coefficients to derive the residual samples of the current block. Alternatively, for example, if it is determined that a transformation has been applied to the current block based on the transformation skip flag, i.e., if the value of the transformation skip flag is 0, the decoding device can dequantize the transformation coefficients and inversely transform the dequantized transformation coefficients to derive the residual samples of the current block.
[0379] The decoding device generates a reconstructed picture based on the residual samples (S2220). For example, the decoding device may generate reconstructed samples and / or a reconstructed picture of the current block based on the residual samples. For example, the decoding device may perform an inter-prediction mode or an intra-prediction mode for the current block based on prediction information received through a bitstream to derive prediction samples, and may generate the reconstructed samples by adding the prediction samples and the residual samples.
[0380] As described above, in-loop filtering procedures such as deblocking filtering, SAO and / or ALF procedures may be applied to the restored picture to improve subjective / objective image quality as needed.
[0381] Fig. 23 schematically illustrates a decoding device that performs an image decoding method according to the present document. The method disclosed in Fig. 22 can be performed by the decoding device disclosed in Fig. 23. Specifically, for example, the entropy decoding unit of the decoding device of Fig. 23 can perform S2200 of Fig. 22, the residual processing unit of the decoding device of Fig. 23 can perform S2210 of Fig. 22, and the adding unit of the decoding device of Fig. 23 can perform S2220 of Fig. 22. In addition, although not illustrated, the process of receiving prediction information for the current block can be performed by the entropy decoding unit of the decoding device of Fig. 23, and the process of deriving a prediction sample of the current block can be performed by the prediction unit of the decoding device of Fig. 23.
[0382] According to the above-mentioned document, the efficiency of residual coding can be improved.
[0383] Additionally, according to this document, when the maximum number of context coded bins for the current block in TSRC is exhausted, syntax elements according to a simplified residual data coding structure can be signaled, thereby reducing the coding complexity of syntax elements to be bypass coded and improving the overall residual coding efficiency.
[0384] In addition, according to this document, a syntax element-priority order can be used as the coding order of syntax elements to be bypass-coded, thereby further improving the coding efficiency of syntax elements to be bypass-coded and improving the overall residual coding efficiency.
[0385] While the methods described in the above-described embodiments are described based on a flowchart as a series of steps or blocks, this document is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps described above. Furthermore, those skilled in the art will appreciate that the steps depicted in the flowchart are not exclusive, and that other steps may be included, or one or more steps in the flowchart may be deleted, without affecting the scope of this document.
[0386] The embodiments described in this document may be implemented and performed on a processor, microprocessor, controller, or chip. For example, the functional units depicted in each drawing may be implemented and performed on a computer, processor, microprocessor, controller, or chip. In this case, information for implementation (e.g., information on instructions) or algorithms may be stored on a digital storage medium.
[0387] In addition, the decoding device and encoding device to which the embodiments of the present document are applied may be included in a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT video (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a video phone video device, a transportation terminal (e.g., a vehicle terminal, an airplane terminal, a ship terminal, etc.), and a medical video device, and may be used to process a video signal or a data signal. For example, the OTT video (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), etc.
[0388] In addition, the processing method to which the embodiments of the present document are applied can be produced in the form of a computer-executable program and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the present document can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which 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 disk, and an optical data storage device. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated by an encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0389] Additionally, the embodiments of the present document can be implemented as a computer program product by program code, and the program code can be executed on a computer by the embodiments of the present document. The program code can be stored on a computer-readable carrier.
[0390] Figure 24 illustrates an exemplary structure of a content streaming system to which embodiments of this document are applied.
[0391] A content streaming system to which the embodiments of this document are applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0392] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data, generates a bitstream, and transmits it to the streaming server. Alternatively, if multimedia input devices such as smartphones, cameras, and camcorders directly generate bitstreams, the encoding server may be omitted.
[0393] The above bitstream can be generated by an encoding method or a bitstream generation method to which the embodiments of the present document are applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0394] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server transmits the multimedia data to the user. At this time, the content streaming system may include a separate control server, in which case the control server controls commands / responses between each device within the content streaming system.
[0395] The streaming server can receive content from a media repository and / or an encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.
[0396] Examples of the user devices may include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, head mounted displays (HMDs)), digital TVs, desktop computers, digital signage, etc. Each server in the content streaming system may be operated as a distributed server, in which case data received from each server may be distributedly processed.
[0397] The claims set forth in this specification may be combined in various ways. For example, the technical features of the method claims of this specification may be combined and implemented as a device, and the technical features of the device claims of this specification may be combined and implemented as a method. Furthermore, the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a device, and the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a method.
Claims
1. In a video decoding method performed by a decoding device, Step of obtaining residual information of the current block; A step of deriving residual samples of the current block based on the residual information; and A step of generating a restored picture based on the above residual samples is included, The step of obtaining the above residual information is: A step of obtaining syntax elements for the first to nth transform coefficients of the current block; and Comprising a step of obtaining syntax elements for the n+1th transform coefficient to the last transform coefficient of the current block, The number of context coded syntax elements for the first transform coefficient to the nth transform coefficient is equal to the maximum number of context coded bins of the current block, The syntax elements for the first transform coefficient to the nth transform coefficient are syntax elements according to the first residual data coding structure of TSRC (Transform Skip Residual Coding), The syntax elements for the above n+1th transform coefficient to the above last transform coefficient are syntax elements according to the second residual data coding structure of the TSRC, An image decoding method, characterized in that the syntax elements according to the second residual data coding structure include coefficient level information for the absolute value of the coefficient level of the transform coefficient and a sign flag for the sign of the transform coefficient.
2. In paragraph 1, The above current block is a transform skip block, A transformation skip flag is acquired, which indicates whether transformation is applied to the current block. An image decoding method, characterized in that the value of the transformation skip flag for the current block is 1.
3. In paragraph 1, The step of deriving the above residual samples is, A step of deriving transform coefficients of the current block based on the syntax elements according to the first residual data coding structure and the syntax elements according to the second residual data coding structure; and An image decoding method, characterized by comprising a step of deriving the residual samples based on the above transformation coefficients.
4. In paragraph 1, An image decoding method, characterized in that the context coded syntax elements among the syntax elements according to the first residual data coding structure include a valid coefficient flag for whether a transform coefficient is a non-zero transform coefficient, a sign flag for the sign of the transform coefficient, a first coefficient level flag for whether a coefficient level of the transform coefficient is greater than a first threshold, and a parity level flag for the parity of the coefficient level of the transform coefficient.
5. In paragraph 1, An image decoding method, characterized in that the maximum number of context coded bins of the current block is derived based on the width and height of the current block.
6. In paragraph 1, An image decoding method, characterized in that the n+1th transform coefficient to the last transform coefficient are derived based on the syntax elements according to the second residual data coding structure.
7. In paragraph 6, An image decoding method, characterized in that the coefficient level of the above transform coefficient is derived as a value indicated by coefficient level information for the above transform coefficient, and the sign of the above transform coefficient is derived as a sign indicated by the sign flag.
8. In paragraph 1, A video decoding method, characterized in that the context coded bins for the current block are all used as bins of the context coded syntax elements for the first transform coefficient to the n-th transform coefficient.
9. In a video encoding method performed by an encoding device, A step of deriving residual samples for the current block; A step of generating residual information for the above residual samples; and Comprising a step of encoding image information including the above residual information, The step of generating the above residual information is: A step of deriving transformation coefficients for the current block based on the residual samples; A step of generating syntax elements for the first to nth transform coefficients of the current block; and Comprising a step of generating syntax elements for the n+1th transform coefficient to the last transform coefficient of the current block, The number of context coded syntax elements for the first transform coefficient to the nth transform coefficient is equal to the maximum number of context coded bins of the current block, The syntax elements for the first transform coefficient to the nth transform coefficient are syntax elements according to the first residual data coding structure of TSRC (Transform Skip Residual Coding), The syntax elements for the above n+1th transform coefficient to the above last transform coefficient are syntax elements according to the second residual data coding structure of the TSRC, An image encoding method, characterized in that the syntax elements according to the second residual data coding structure include coefficient level information for the absolute value of the coefficient level of the transform coefficient and a sign flag for the sign of the transform coefficient.
10. In paragraph 9, An image encoding method, characterized in that the maximum number of context coded bins of the current block is derived based on the width and height of the current block.
11. In paragraph 9, The above current block is a transform skip block, The above image information includes a transformation skip flag indicating whether transformation is applied to the current block, A video encoding method, characterized in that the value of the transformation skip flag for the current block is 1.
12. In paragraph 9, A video encoding method, characterized in that the context coded bins for the current block are all used as bins of the context coded syntax elements for the first transform coefficient to the nth transform coefficient.
13. In paragraph 9, A video encoding method, characterized in that the context coded syntax elements among the syntax elements according to the first residual data coding structure include a valid coefficient flag for whether a transform coefficient is a non-zero transform coefficient, a sign flag for the sign of the transform coefficient, a first coefficient level flag for whether a coefficient level of the transform coefficient is greater than a first threshold, and a parity level flag for the parity of the coefficient level of the transform coefficient.
14. A computer-readable digital storage medium storing a bitstream including image information that causes a decoding device to perform an image decoding method, wherein the image decoding method comprises: Step of obtaining residual information of the current block; A step of deriving residual samples of the current block based on the residual information; and A step of generating a restored picture based on the above residual samples is included, The step of obtaining the above residual information is: A step of obtaining syntax elements for the first to nth transform coefficients of the current block; and Comprising a step of obtaining syntax elements for the n+1th transform coefficient to the last transform coefficient of the current block, The number of context coded syntax elements for the first transform coefficient to the nth transform coefficient is equal to the maximum number of context coded bins of the current block, The syntax elements for the first transform coefficient to the nth transform coefficient are syntax elements according to the first residual data coding structure of TSRC (Transform Skip Residual Coding), The syntax elements for the above n+1th transform coefficient to the above last transform coefficient are syntax elements according to the second residual data coding structure of the TSRC, A computer-readable digital storage medium, characterized in that the syntax elements according to the second residual data coding structure include coefficient level information for the absolute value of the coefficient level of the transform coefficient and a sign flag for the sign of the transform coefficient.
15. In paragraph 13, A computer-readable digital storage medium, characterized in that the maximum number of context coded bins of the current block is derived based on the width and height of the current block.
