Method and apparatus for encoding residual information in image encoding system

By deducing the number of context-encoded cells based on the last effective coefficient position of the current block in the image encoding system, the compression and transmission problems of high-resolution video/image data are solved, and the encoding efficiency and throughput are improved, suitable for VR and AR content. spread.

CN119096541APending Publication Date: 2024-12-06LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380036249.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-03-30
Filing Date
2023-01-03
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The prior art is difficult to effectively compress and transmit high-resolution, high-quality video/image data, especially in the propagation of virtual reality (VR) and artificial reality (AR) content, and the number of context-encoded cells is limited when CABAC encoding is encoded. The throughput of residual encoding is achieved.

Method used

The decoding device and the encoding device respectively deduce and generate residual information for the current block, and image decoding and encoding are performed based on the maximum number of context-coded cells of the transformation coefficient and syntax elements, characterized by the fact that the last effective coefficient position of the current block is performed based on the position of the last effective coefficient of the current block Derivation.

Benefits of technology

Improve image encoding efficiency, reduce transmission and storage costs, and enhance the encoding performance of high-resolution video/images, especially in the propagation of VR and AR content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119096541A_ABST
    Figure CN119096541A_ABST
Patent Text Reader

Abstract

According to the present disclosure, an image decoding method performed by a decoding device comprises the steps of: receiving a bitstream including residual information on a current block; deriving a maximum number of context coded cells related to the residual information; decoding a syntax element included in the residual information based on the maximum number of context coded cells; deriving a transform coefficient for the current block based on the decoded syntax element; deriving a residual sample for the current block based on the transform coefficient; and generating a reconstructed sample for the current block on the basis of the residual sample for the current block, in which the maximum number of context-coded cells is derived on the basis of the position of the last significant coefficient of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present document relates to image coding technology, and more particularly, to a method and apparatus for encoding residual information in an image coding system. Background Art

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

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

[0004] Therefore, efficient image compression technology is needed to effectively compress and transmit, store or play high-resolution, high-quality videos / images that exhibit various characteristics as described above.

[0005] In addition, there is a need for a technique for reducing the throughput of residual coding by limiting the number of context coding elements used when encoding is performed using CABAC. Summary of the invention

[0006] Technical Solution

[0007] According to an embodiment of the present document, there is provided an image decoding method performed by a decoding device. The method includes: receiving a bit stream including residual information for a current block, deriving a maximum number of context coding information elements related to the residual information, decoding a syntax element included in the residual information based on the maximum number of context coding information elements, deriving a transform coefficient for the current block based on the decoded syntax element, deriving a residual sample for the current block based on the transform coefficient, and generating a reconstructed sample for the current block based on the residual sample for the current block. The maximum number of context coding information elements is characterized in that it is derived based on the position of the last significant coefficient of the current block.

[0008] According to another embodiment of the present document, there is provided a coding method performed by a coding device. The method includes: deriving residual information for a current block, deriving a transform coefficient based on the residual sample for the current block, deriving the number of context coding information elements for a syntax element related to the transform coefficient, and encoding the residual information for the current block including the syntax element to generate a bitstream based on the maximum number of context coding information elements. The maximum number of context coding information elements is characterized in that it is derived based on the position of the last significant coefficient of the current block.

[0009] According to another embodiment of the present document, a computer-readable digital storage medium is provided. The digital storage medium stores a bitstream generated by a specific method, wherein the specific method includes: deriving residual information for a current block, deriving a transform coefficient based on the residual samples for the current block, deriving a number of context coding elements for a syntax element related to the transform coefficient, and encoding the residual information of the current block including the syntax element to generate a bitstream based on a maximum number of context coding elements. The maximum number of context coding elements is characterized in that the derivation is based on the position of the last significant coefficient of the current block.

[0010] According to another embodiment of the present document, a method for transmitting data of an image is provided. The transmitting method includes: generating a bitstream based on a process including deriving residual samples for a current block, deriving transform coefficients based on the residual samples for the current block, deriving the number of context coding information elements of syntax elements related to the transform coefficients, and encoding residual information for the current block including syntax elements to generate a bitstream based on a maximum number of context coding information elements, and transmitting data including the bitstream. The maximum number of context coding information elements is characterized in that it is derived based on the position of the last significant coefficient of the current block.

[0011] According to another embodiment of the present disclosure, a computer-readable digital recording medium is provided herein, which has encoded information or encoded video / image information stored therein, which allows a decoding device to perform the video / image decoding method disclosed in at least one embodiment of the present disclosure.

[0012] According to another embodiment of the present disclosure, a method and a device for sending a bit stream are provided herein, and the bit stream is generated according to the video / image encoding method disclosed in at least one embodiment of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 An example of a video / image encoding device to which the embodiments of the present disclosure are applicable is schematically illustrated.

[0014] Figure 2is a schematic diagram illustrating a configuration of a video / image encoding device to which an embodiment of the present disclosure can be applied.

[0015] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.

[0016] Figure 4 Schematically shows the layered structure for encoding video / images.

[0017] Figure 5 Context-Adaptive Binary Algorithm Coding (CABAC) for encoding syntax elements is exemplarily shown.

[0018] Figure 6 is a diagram illustrating an example of transform coefficients within a 4×4 block.

[0019] Figure 7 and Figure 8 The method proposed in this document for controlling the number of context coding elements is exemplarily represented.

[0020] Fig. 9 and Fig.10 An example of a video / image encoding method and related components according to an embodiment of the present disclosure is schematically illustrated.

[0021] Fig.11 and Fig.12 An example of a video / image decoding method and related components according to an embodiment of the present disclosure is schematically illustrated.

[0022] Fig.13 An example of a content streaming system to which the embodiments disclosed in the present disclosure can be applied is illustrated. DETAILED DESCRIPTION

[0023] The present disclosure can be modified in various forms, and its specific embodiments will be described and illustrated in the accompanying drawings. However, the embodiments are not intended to limit the present disclosure. The terms used in the following description are only used to describe specific embodiments and are not intended to limit the present disclosure. As long as it is clearly understood in different ways, the expression of the singular includes the expression of the plural. Terms such as "including" and "having" are intended to indicate the presence of features, quantities, steps, operations, elements, components, or combinations thereof used in the following description, so it should be understood that the possibility of the presence or addition of one or more different features, quantities, steps, operations, elements, components, or combinations thereof is not excluded.

[0024] In addition, the elements in the drawings described in the present disclosure are drawn independently for the convenience of explaining different specific functions, and do not mean that these elements are specifically implemented by independent hardware or independent software. For example, two or more elements in the elements can be combined to form a single element, or an element can be divided into multiple elements. The implementation of combining and / or dividing elements belongs to the present disclosure without departing from the concept of the present disclosure.

[0025] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. In addition, throughout the accompanying drawings, like reference numerals are used to indicate like elements, and the same description of the like elements will be omitted.

[0026] The present disclosure relates to video / image coding. For example, the methods / implementations disclosed in the present disclosure may be related to the Versatile Video Coding (VVC) standard (ITU-T Rec. H.266), the next generation video / image coding standard after VVC, or other video coding related standards (e.g., the High Efficiency Video Coding (HEVC) standard (ITU-T Rec. H.265), the Basic Video Coding (EVC) standard, the AVS2 standard, etc.).

[0027] The present disclosure relates to video / image coding. For example, the methods / implementations disclosed in the present disclosure may be applied to methods disclosed in the Versatile Video Coding (VVC) standard, the Essential Video Coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd generation Audio Video Coding standard (AVS2), or the next generation video / image coding standard (e.g., H.267, or H.268, etc.).

[0028] The present disclosure presents various embodiments of video / image encoding, and unless otherwise mentioned, the embodiments may be performed in combination with each other.

[0029] In the present disclosure, video may refer to a series of images over time. Generally, a picture refers to a unit representing an image in a specific time region, and a sub-picture / slice / tile is a unit that constitutes a part of a picture in coding. A sub-picture / slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more sub-pictures / slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles. A tile may represent a rectangular area of ​​a CTU row within a tile in a picture. A tile may be partitioned into a plurality of tiles, each tile consisting of one or more CTU rows within a tile. Tiles that are not partitioned into a plurality of tiles may also be referred to as tiles. Tile scanning is a specific sequential ordering of CTUs that partition a picture, wherein CTUs are continuously ordered in tiles by CTU raster scanning, tiles within tiles are continuously ordered by raster scanning of tiles of tiles, and tiles in a picture are continuously ordered by raster scanning of tiles of tiles of a picture. In addition, a sub-picture may represent a rectangular area of ​​one or more slices within a picture. That is, a sub-picture contains one or more slices that cover a rectangular area of ​​the picture together. A patch is a rectangular area of ​​a CTU within a specific patch column and a specific patch row in a picture. A patch column is a rectangular area of ​​a CTU whose height is equal to the height of the picture and whose width is specified by a syntax element in a picture parameter set. A patch row is a rectangular area of ​​a CTU whose height is specified by a syntax element in a picture parameter set and whose width is equal to the width of the picture. Patch scanning is a specific sequential ordering of CTUs that partition a picture, wherein CTUs may be continuously ordered in a patch by a CTU raster scan, and patches in a picture may be continuously ordered by a raster scan of patches of a picture. A slice includes an integer number of tiles of a picture that may be exclusively contained in a single NAL unit. A slice may consist of a plurality of complete tiles or only of a continuous sequence of complete tiles of a patch. In the present disclosure, patch groups and slices may be used interchangeably. For example, in this disclosure, a tile group / tile group header may be referred to as a slice / slice header.

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

[0031] A unit may represent a basic unit of image processing. A unit may include at least one of a specific area of ​​a picture and information related to the area. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as a block or an area. In general, an M×N block may include a set (or array) of samples (or sample arrays) or transform coefficients of M columns and N rows.

[0032] In this specification, "A or B" may mean "only A", "only B", or "A and B". In other words, in this specification, "A or B" may be interpreted as "A and / or B". For example, "A, B or C" herein means "only A", "only B", "only C", or "any one and any combination of A, B, and C".

[0033] A slash ( / ) or a comma used in this specification may mean "and / or". For example, "A / B" may mean "A and / or B". Thus, "A / B" may mean "only A", "only B", or "A and B". For example, "A,B,C" may mean "A, B, or C".

[0034] In the present specification, "at least one of A and B" may mean "only A", "only B", or "both A and B". In addition, in the present specification, the expression "at least one of A or B" or "at least one of A and / or B" may be interpreted as being the same as "at least one of A and B".

[0035] In addition, in the present specification, "at least one of A, B, and C" means "only A", "only B", "only C", or "any combination of A, B, and C". In addition, "at least one of A, B, or C" or "at least one of A, B and / or C" may mean "at least one of A, B, and C".

[0036] In addition, brackets used in this specification may refer to "for example". Specifically, when "prediction (intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction". In other words, "prediction" in this specification is not limited to "intra-frame prediction", and "intra-frame prediction" may be proposed as an example of "prediction". In addition, even when "prediction (i.e., intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction".

[0037] In this specification, technical features described separately in one figure may be implemented separately or may be implemented simultaneously.

[0038] The following figures are created to explain specific examples of this specification. Since the names of specific devices or the names of specific signals / messages / fields described in the figures are presented by way of example, the technical features of this specification are not limited to the specific names used in the following figures.

[0039] Figure 1 An example of a video / image encoding device to which the embodiments of the present disclosure are applicable is schematically illustrated.

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

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

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

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

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

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

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

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

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

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

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

[0051] In the subtractor 231, the prediction signal (prediction block, prediction sample or prediction sample array) output from the predictor 220 is subtracted from the input image signal (original block, original sample or original sample array) to generate a residual signal (residual block, residual sample or residual sample array) and the generated residual signal is sent to the transformer 232. The predictor 220 can perform prediction on the block to be processed (hereinafter referred to as the current block) and generate a prediction block including the prediction sample of the current block. The predictor 220 can determine whether to apply intra-frame prediction or inter-frame prediction in units of the current block or CU. As described later in the description of each prediction mode, the predictor can generate various information related to the prediction (such as prediction mode information) and send the generated information to the entropy encoder 240. The information about the prediction can be encoded in the entropy encoder 240 and output in the form of a bit stream.

[0052] The intra-frame predictor 222 can predict the current block by referring to the samples in the current picture. Depending on the prediction mode, the referenced sample can be located near the current block, or can be far away from the current block. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the setting. The intra-frame predictor 222 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

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

[0054] The predictor 220 can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra prediction or inter prediction to predict a block, but also apply both intra prediction and inter prediction at the same time. This can be called inter-frame intra-frame combined prediction (CIIP). In addition, the predictor can perform an intra-block copy (IBC) prediction mode. For example, IBC can be used for content image / video encoding of games, etc., such as screen content coding (SCC). IBC basically performs prediction in the current picture, but IBC can be performed similar to inter prediction because the reference block is derived in the current picture. That is, IBC can use at least one of the inter-frame prediction techniques described in the present disclosure.

[0055] The prediction signal generated by the inter-frame predictor 221 and / or the intra-frame predictor 222 can be used to generate a reconstruction signal or to generate a residual signal. The transformer 232 can generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include a discrete cosine transform (DCT), a discrete sine transform (DST), a graph-based transform (GBT), or a conditional nonlinear transform (CNT), etc. Here, GBT represents a transform obtained from a graph when the relationship information between pixels is represented by a graph. CNT refers to a transform generated based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process can be applied to square pixel blocks of the same size, or can be applied to non-square pixel blocks of different sizes.

[0056] The quantizer 233 may quantize the transform coefficients and send them to the entropy encoder 240, and the entropy encoder 240 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. Information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the block type quantized transform coefficients into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. Information about the transform coefficients may be generated. The entropy encoder 240 may 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 encoder 240 may encode information required for video / image reconstruction (e.g., values ​​of syntax elements, etc.) other than the quantized transform coefficients together or separately. Encoded information (e.g., encoded video / image information) may be transmitted or stored in units of NAL (network abstraction layer) units in the form of a bitstream. The video / image information may also include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. In the present disclosure, the information and / or syntax elements described later may be encoded and included in the bitstream by the above-mentioned encoding process. The bitstream may be sent through a network, or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for sending a signal output from the entropy encoder 240 and / or a storage unit (not shown) for storing the signal may be included as an internal / external element of the encoding device 200, alternatively, the transmitter may be included in the entropy encoder 240.

[0057] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients using a dequantizer 234 and an inverse transformer 235. The adder 250 adds the reconstructed residual signal to the prediction signal output from the predictor 220 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If the block to be processed has no residual (such as when a skip mode is applied), the prediction block can be used as a reconstructed block. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.

[0058] Furthermore, during picture encoding and / or reconstruction, luma mapping and chroma scaling (LMCS) may be applied.

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

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

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

[0062] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding device to which embodiments of this document can be applied.

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

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

[0065] The decoding device 300 may receive the bit stream from Figure 2The received signal can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The signaled / received information and / or syntax elements described later in this disclosure may be decoded by a decoding process and obtained from the bitstream. For example, the entropy decoder 310 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs the syntax elements required for image reconstruction and the quantized values ​​of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method may receive a cell corresponding to each syntax element in a bitstream, determine a context model using information of a decoding target syntax element, information of a decoding target block, or information of a symbol / cell decoded in a previous stage, and arithmetically decode the cell by predicting the probability of occurrence of the cell according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, after determining the context model, the CABAC entropy decoding method may update the context model by using the information of the decoded symbol / cell for the context model of the next symbol / cell. Information related to prediction among the information decoded by the entropy decoder 310 may be provided to the predictor 330, and information about the residual on which entropy decoding is performed in the entropy decoder 310 (that is, quantized transform coefficients and related parameter information) may be input to the dequantizer 321. In addition, information about filtering among the information decoded by the entropy decoder 310 may be provided to the filter 350. In addition, a receiver (not shown) for receiving a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiver may be a component of the entropy decoder 310. In addition, the decoding device according to the present disclosure may be referred to as a video / image / picture decoding device, and the decoding device may be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 310, and the sample decoder may include at least one of a dequantizer 321, an inverse transformer 322, a predictor 330, an adder 340, a filter 350, and a memory 360.

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

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

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

[0069] The predictor can generate a prediction signal based on the various prediction methods described below. For example, the predictor can not only apply intra prediction or inter prediction to predict a block, but also apply intra prediction and inter prediction at the same time. This can be called inter-frame intra-frame combined prediction (CIIP). In addition, the predictor can perform intra-frame block copying (IBC) to predict the block. IBC can be used for content image / video coding of games, etc., for example, screen content coding (SCC). IBC basically performs prediction in the current picture, but IBC can be performed similar to inter prediction because the reference block is derived in the current picture. That is, IBC can use at least one of the inter-frame prediction techniques described in the present disclosure.

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

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

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

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

[0074] In addition, luminance mapping and chrominance scaling (LMCS) may be applied in the picture decoding process.

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

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

[0077] In the present specification, the implementations described in the predictor 330, the dequantizer 321, the inverse transformer 322, and the filter 350 of the decoding device 300 may be respectively applied to or correspond to the predictor 220, the dequantizer 234, the inverse transformer 235, and the filter 260 of the encoding device 200.

[0078] As described above, when performing video encoding, prediction is performed to increase compression efficiency. Thus, a prediction block including prediction samples of a current block (block to be encoded) can be generated. Here, the prediction block includes prediction samples in a spatial domain (or pixel domain). The prediction block is derived from the encoding device and the decoding device in the same manner, and the encoding device can increase the image coding efficiency by notifying the decoding device with a signal of information (residual information) between the original block and the prediction block rather than the original sample value of the original block itself. The decoding device can derive a residual block containing residual samples based on the above residual information, combine the above residual block with the above prediction block to create a recovery block containing a recovery sample, and create a recovery picture containing the recovery block.

[0079] Residual information can be generated by transform and quantization processing. For example, the encoding device can derive a residual block between the original block and the prediction block, derive a transform coefficient by performing a transform process on the residual samples (residual sample array) included in the residual block, derive a quantized transform coefficient by performing a quantization process on the transform coefficient, and notify the decoding device of the relevant residual information (through a bitstream) with a signal. Here, the residual information may include information such as value information, position information, transform technology, transform kernel, quantization parameters of quantized transform coefficients, etc. The decoding device can perform dequantization / inverse transform processing based on the residual information and derive residual samples (or residual blocks). The decoding device can generate a reconstructed picture based on the prediction block and the residual block. The encoding device can also derive a residual block by dequantizing / inverse transforming the quantized transform coefficients for inter-frame prediction reference of the picture, and generate a reconstructed picture based on this.

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

[0081] In this document, 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 coefficients, and the information about the transform coefficients may be signaled by residual coding syntax. The transform coefficients may be derived based on the residual information (or information about the transform coefficients), and the scaled transform coefficients may be derived by inverse transform (scaling) of the transform coefficients. The residual samples may be derived based on inverse transform (transform) of the scaled transform coefficients. This may also be applied / expressed in other parts of this document.

[0082] The predictor of the encoding device / decoding device can derive prediction samples by performing inter-frame prediction block by block. Inter-frame prediction can be a prediction derived in a manner that depends on data elements (e.g., sample values ​​or motion information) of a picture other than the current picture. When inter-frame prediction is applied to the current block, the prediction block (prediction sample array) of the current block can be derived based on the reference block (reference sample array) specified by the motion vector in the reference picture indicated by the reference picture index. In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information of the current block can be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When inter-frame prediction is applied, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. A temporally neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc., and a reference picture including a temporally neighboring block may be referred to as a collocated picture (colPic). For example, a motion information candidate list may be constructed based on the neighboring blocks of the current block, and a flag or index information indicating which candidate is selected (used) to derive a motion vector and / or a reference picture index of the current block may be signaled. Inter-frame prediction may be performed based on various prediction modes. For example, in the case of a skip mode and a 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 the skip mode, unlike the merge mode, a residual signal may not be sent. In the case of a 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 may be derived using the sum of the motion vector predictor and the motion vector difference.

[0083] According to the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), the motion information may include L0 motion information and / or L1 motion information. The motion vector in the L0 direction may be referred to as the L0 motion vector or MVL0, and the motion vector in the L1 direction may be referred to as the L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as the L0 prediction, prediction based on the L1 motion vector may be referred to as the L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be referred to as the Bi prediction. Here, the L0 motion vector may indicate a motion vector related to the reference picture list L0 (L0), and the L1 motion vector may indicate a motion vector related to the reference picture list L1 (L1). The reference picture list L0 may include a picture before the current picture in the output order as a reference picture, and the reference picture list L1 may include a picture after the current picture in the output order. The previous picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. The reference picture list L0 may also include a picture after the current picture in the output order as a reference picture. In this case, a previous picture in the reference picture list L0 may be indexed first, and a subsequent picture may be indexed next. The reference picture list L1 may also include a picture preceding the current picture in the output order as a reference picture. In this case, a subsequent picture in the reference picture list 1 may be indexed first, and a previous picture may be indexed next. Here, the output order may correspond to a picture order count (POC) order.

[0084] Figure 4 The layer structure for encoding video / image is exemplarily illustrated.

[0085] Reference Figure 4 , the encoded video / image is divided into a video coding layer (VCL) that performs decoding processing of the video / image and handles the decoding processing, a lower system that sends and stores the encoded information, and a network abstraction layer (NAL) that exists between the VCL and the lower system and is used to perform a network adaptation function.

[0086] In the VCL, VCL data including compressed image data (slice data), or a parameter set including a picture parameter set (PPS), a sequence parameter set (SPS) or a video parameter set (VPS), or a supplemental enhancement information (SEI) message additionally required in the image decoding process can be generated.

[0087] In NAL, header information (NAL unit data) is added to the raw byte sequence payload (RSRP) generated in the VCL to generate a NAL unit. Here, RBSP refers to slice data, parameter sets, SEI messages, etc. generated in the VCL. The NAL unit header may include NAL unit type information specified according to the RSRP data included in the corresponding NAL unit.

[0088] As shown in the figure above, NAL units can be classified into VCL NAL units and non-VCL NAL units according to the RSRP generated in the VCL. A VCL NAL unit may refer to a NAL unit including information about the information (slice data), and a non-VCL NAL unit may refer to a NAL unit including information required to decode an image (parameter set or SEI message).

[0089] VCL NA units and non-VCL NAL units can be sent over the network while adding header information according to the data standard of the subsystem. For example, the NAL unit can be converted into a data format of a predetermined standard such as H.266 / VVC file format, real-time transport protocol (RTP), transport stream (TS), etc., and transmitted over various networks.

[0090] Furthermore, as described above, regarding the NAL unit, the NAL unit type may be specified according to the RBSP data structure included in the corresponding NAL unit, and information on the NAL unit type may be stored in the NAL unit header and signaled.

[0091] For example, NAL units can be classified into VCL NAL unit types and non-VCL NAL unit types according to whether the NAL unit includes information about the image (slice data). In addition, VCL NAL unit types can be classified according to the properties and types of the pictures included in the VCL NAL unit, and non-VCL NAL units can be classified according to the types of parameter sets.

[0092] The following are examples of NAL unit types specified according to the type of parameter sets included in a non-VCL NAL unit type.

[0093] - Adaptation Parameter Set (APS) NAL unit: NAL unit type including APS

[0094] - Video parameter set (VPS) NAL unit: includes the NAL unit type of the VPS

[0095] - Sequence Parameter Set (SPS) NAL unit: NAL unit type that includes SPS

[0096] - Picture parameter set (PPS) NAL unit: NAL unit type including PPS

[0097] - Decoding Capability Information (DCI) NAL unit: NAL unit type that includes DCI

[0098] - Picture header (PH) NAL unit: includes the NAL unit type of the PH

[0099] The above-mentioned NAL unit type has syntax information of the NAL unit type, and the syntax information can be stored in the NAL unit header and notified by a signal. For example, the syntax information can be nal_unit_type, and the NAL unit type can be specified by a nal_unit_type value.

[0100] In addition, as described above, a picture may include multiple slices, and a slice may include a slice header and slice data. In this case, a picture header may be further added to multiple slices (slice headers and slice data sets) in a picture. The picture header (picture header syntax) may include information / parameters commonly applicable to the picture. In this document, slices may be mixed or replaced with tile groups. In addition, in this document, slice headers may be mixed or replaced with type group headers.

[0101] The slice header (slice header syntax, slice header information) may include information / parameters that are commonly applicable to the slice. APS (APS syntax) or PPS (PPS syntax) may include information / parameters that are commonly applicable to one or more slices or pictures. SPS (SPS syntax) may include information / parameters that are commonly applicable to one or more sequences. VPS (VPS syntax) may include information / parameters that are commonly applicable to multiple layers. DCI (DCI syntax) may include information / parameters that are commonly applicable to the entire video. DCI may include information / parameters related to decoding capabilities. In this document, the high-level syntax (HLS) may include at least one of APS syntax, PPS syntax, SPS syntax, VPS syntax, DCI syntax, picture header syntax, or slice header syntax.

[0102] In this document, the image / video information encoded from the encoding device to the decoding device and notified in the form of a bitstream includes not only information related to intra-picture partitions, intra-frame / inter-frame prediction information, residual information, in-loop filtering information, etc., but also includes information included in the slice header, information included in the picture header, information included in the APS, information included in the PPS, information included in the SPS, information included in the VPS, and / or information included in the DCI. In addition, the image / video information may also include NAL unit header information.

[0103] Figure 5Exemplarily, a context-adaptive binary algorithm coding (CABAC) for encoding syntax elements is represented. For example, in the encoding process of CABAC, when the input signal is a syntax element rather than a binary value, the value of the input signal can be converted into a binary value by binarization. In addition, if the input signal is already a binary value (that is, 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 constituting a binary value may be referred to as a cell (bin). For example, if the binarized binary string is 110, each of 1, 1, and 0 is referred to as a cell. The cell of a syntax element may represent the value of the corresponding syntax element.

[0104] Subsequently, the binarized cells of the syntax elements may be input into a conventional coding engine or a bypass coding engine. The conventional coding engine may assign a context model reflecting the probability value of the corresponding cell, and encode the cell based on the assigned context model. In a conventional coding engine, after encoding each cell, the probability model of the corresponding cell may be updated. The cell encoded as described above may be referred to as a context coded cell.

[0105] In addition, if binarized cells of syntax elements are input into a bypass coding engine, they may be encoded as follows. For example, the bypass coding engine omits the process of estimating the probability of input cells and the process of updating the probability model applied to those cells after encoding. For example, instead of assigning a context model, it applies a uniform probability distribution to encode the input cells, thereby increasing the encoding speed. The cells encoded as described above may be referred to as bypass cells.

[0106] Entropy coding can determine whether to perform encoding through a conventional encoding engine or a bypass encoding engine, and can also switch the encoding path. In addition, entropy decoding performs the same process as the aforementioned entropy coding, but in reverse order.

[0107] For example, when decoding a syntax element based on a context model, the decoding device may receive a cell corresponding to the syntax element through a bitstream, and determine the context model using the syntax element, decoding information of a block to be decoded or a neighboring block, or information of a symbol / cell decoded at a previous stage. According to the determined context model, the probability of occurrence of the received cell may be predicted, and arithmetic decoding of the cell may be performed to derive the value of the syntax element. Subsequently, the determined context model may be used to update the context model for the next cell to be decoded.

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

[0109] As described above, residual samples can be derived as quantized transform coefficients through transformation and quantization processing. Quantized transform coefficients may also be referred to as transform coefficients. In this case, the transform coefficients within the block may be signaled in the form of residual information. The residual information may include residual coding syntax. That is, the encoding device may construct the residual coding syntax as residual information, encode it, and output it in the form of a bitstream. The decoding device may decode the residual coding syntax from the bitstream to derive the residual (quantized) transform coefficients. The residual coding syntax may include syntax elements indicating whether the transform has been applied to the block (the position of the last valid transform coefficient within the block), whether there are valid transform coefficients within the sub-block, and the magnitude / sign of the valid transform coefficient, as described later.

[0110] For example, the (quantized) transform coefficient (i.e., residual information) may be encoded and / or decoded based on syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, and dec_abs_level. This may be referred to as residual (data) encoding or (transform) coefficient encoding. The syntax elements associated with residual data encoding / decoding may be represented as shown in the following table:

[0111] [Table 1]

[0112]

[0113]

[0114]

[0115]

[0116] For example, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix are syntax elements for encoding the (x, y) position information of the last non-zero coefficient within the associated block. The associated block may be a coding block (CB) or a transform block (TB). In the context of the transform (and quantization) and residual coding process, CB and TB may be used interchangeably. For example, residual samples may be derived for CB, and (quantized) transform coefficients may be derived by transforming and quantizing the residual samples. Through the residual coding process, information (or syntax elements) that efficiently represent (quantized) transform coefficients (such as their position, magnitude, sign, etc.) may be generated and signaled. Quantized transform coefficients may also be referred to as transform coefficients. Typically, when the CB is not larger than the maximum TB, the size of the CB may be the same as the size of the TB. In this case, the transformed (and quantized) and residually coded block may be referred to as a CB or a TB. In addition, when the CB is larger than the maximum TB, the transformed (and quantized) and residual coded block can be referred to as a TB. In the following, the syntax elements related to residual coding are described as being signaled on a transform block (TB) basis; however, as mentioned above, this is an example and TB can be used interchangeably with coding block (CB).

[0117] Specifically, last_sig_coeff_x_prefix represents the prefix of the column position of the last significant coefficient in the scanning order within the transform block, and last_sig_coeff_y_prefix represents the prefix of the row position of the last significant coefficient in the scanning order within the transform block. Last_sig_coeff_x_suffix represents the suffix of the column position of the last significant coefficient in the scanning order within the transform block, and last_sig_coeff_y_suffix represents the suffix of the row position of the last significant coefficient in the scanning order within the transform block. Here, the significant coefficient may refer to a non-zero coefficient. In addition, the scanning order may be an upward diagonal scanning order. Alternatively, the scanning order may be a horizontal scanning order or a vertical scanning order. The scanning order may be determined based on whether intra / inter prediction is applied to the target block (including CB of CB or TB) and / or a specific intra / inter prediction mode.

[0118] Next, after the transform block is divided into 4×4 sub-blocks, a 1-bit syntax element sb_coded_flag may be used for each 4×4 sub-block to indicate whether there is a non-zero coefficient in the current sub-block. Sub-block may be used interchangeably with coefficient group (CG).

[0119] For example, if the value of sb_coded_flag is 0, there is no further information to be sent, and the encoding device can terminate the encoding process for the current sub-block. On the contrary, if the value of sb_coded_flag is 1, the encoding device continues the encoding process for sig_coeff_flag. The sub-block containing the last non-zero coefficient does not need to be encoded for sb_coded_flag, and since the sub-block containing the DC information of the transform block is more likely to include non-zero coefficients, sb_coded_flag is not encoded and its value can be assumed to be 1.

[0120] If the value of sb_coded_flag is 1, indicating that there is a non-zero coefficient in the current sub-block, the encoding device can encode the sig_coeff_flag with a binary value in the reverse scanning order. The encoding device can encode the 1-bit syntax element sig_coeff_flag[n] of each coefficient at the scanning position (n) according to the scanning order. If the coefficient at the current scanning position is not zero, the value of sig_coeff_flag[n] is set to 1. Here, for the sub-block containing the last non-zero coefficient, it is not necessary to encode sig_coeff_flag[n] for the last non-zero coefficient, so the encoding process can be omitted. Level information encoding is performed only when the value of sig_coeff_flag[n] is 1, and the level information encoding process can use four syntax elements. Specifically, each sig_coeff_flag[xC][yC] can indicate whether the level (value) of the transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero.

[0121] The remaining level value after encoding sig_coeff_flag[n] can be derived as shown in the following equation: That is, the level value remAbsLevel[n] to be encoded at the scanning position (n) can be derived as shown in the following equation.

[0122] [Formula 1]

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

[0124] Here, coeff[n] represents the actual transform coefficient value.

[0125] In addition, abs_level_gtx_flag[n][0] may indicate whether remAbsLevel[n] at the scan position (n) is greater than 1. For example, if the value of abs_level_gtx_flag[n][0] is 0, the absolute value of the coefficient at the position may be 1. In addition, if the value of abs_level_gtx_flag[n][0] is 1, remAbsLevel[n] indicating a level value to be encoded later may be derived as follows.

[0126] [Formula 2]

[0127] remAbsLevel[n]=remAbsLevel[n]-1

[0128] In addition, the least significant coefficient (LSB) value of remAbsLevel[n] described in the above formula 2 can be encoded by par_level_flag[n].

[0129] [Formula 3]

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

[0131] Here, par_level_flag[n] may indicate the parity of the transform coefficient level (value) at the scan position n. After encoding par_level_flag[n], the level value to be encoded remAbsLevel[n] may be updated as follows.

[0132] [Formula 4]

[0133] remAbsLevel{n]=remAbsLevel{n]>>1

[0134] In addition, abs_level_gtx_flag[n][1] may indicate whether remAbsLevel[n] at the corresponding scan position (n) is greater than 3. For example, encoding of abs_remainder[n] may be performed only when the value of abs_level_gtx_flag[n][1] is 1. The relationship between coeff, which is an actual transform coefficient value, and each syntax element may be as shown below.

[0135] [Formula 5]

[0136] |coeff[n]|=sig_coeff_flag[n]+abs_level_gtx_flag[n][0]+par_level_flag[n]+2*(abs_level_gtx_flag[n][1]+abs_remainder[n])

[0137] Here, |coeff[n]| represents the transform coefficient level (value), and can also be expressed as AbsLevel[n] for the transform coefficient.

[0138] In addition, the following table shows an example related to the above formula 5.

[0139] [Table 2]

[0140]

[0141] Finally, the sign of each coefficient may be encoded using a 1-bit symbol coeff_sign_flag[n]. In this case, coeff_sign_flag[n] may represent the sign of the transform coefficient level at the corresponding scanning position (n).

[0142] In addition, a method for improving the throughput performance of CABAC by limiting the number of context coding cells can be proposed. The throughput of CABAC may be reduced due to its conventional coding engine that shows high data dependency, because conventional coding uses probability states and ranges updated by the encoding of previous cells. This may result in considerable time consumption for reading probability intervals and determining the current state. Therefore, by limiting the number of context coding cells, the throughput performance of CABAC can be enhanced.

[0143] Therefore, depending on the size of the transform block, the total number of symbols used to represent sig_coeff_flag[n], abs_level_gtx_flag[n][0], par_level_flag[n], and abs_level_gtx_flag[n][1] in Table 1 can be limited to 1.75 per pixel within the transform block. For example, if all limited context coding symbols are used to encode context elements, bypass encoding can be performed on the remaining coefficients by binarizing the coefficients without using CABAC. In other words, when the number of encoded context coding symbols in a TB reaches TB width*TB height*1.75, sig_coeff_flag[n], abs_level_gtx_flag[n][0], par_level_flag[n], or abs_level_gtx_flag[n][1] encoded as context coding symbols will no longer be encoded, and the |coeff[n]| value can be directly encoded as dec_abs_level[n]. For example, the relationship between the dec_abs_level[n] value and the |coeff[n]| value can be expressed as follows.

[0144] [Formula 6]

[0145] |coeff[n]|=dec_abs_level[n]

[0146] In this case, the sign of each coefficient may also be encoded using a 1-bit symbol coeff_sign_flag[n].

[0147] In addition, the following table shows an example related to the above formula 6.

[0148] [Table 3]

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

[0150] Figure 6 is a diagram illustrating an example of transform coefficients within a 4×4 block.

[0151] Figure 6 The 4×4 block represents an example of quantized coefficients. Figure 6 The block shown in may be a 4×4 transform block, or it may be a 4×4 subblock of an 8×8, 16×16, or 32×32 transform block. Figure 6 The 4×4 blocks in can represent luminance blocks or chrominance blocks.

[0152] As an example, along the lines of Figure 6 The encoding results of the coefficients of the reverse diagonal scan can be shown in the following table.

[0153] [Table 4]

[0154] n 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 coefficient 0 0 0 0 1 -1 0 2 0 3 -2 -3 4 6 -7 10 sig_coeff_flag[n] 0 0 0 0 1 1 0 1 0 1 1 1 1 1 abs_level_gtX_flag[n][0] 0 0 1 1 1 1 1 1 par_level_flag[n] 0 1 0 1 0 0 abs_level_gtX_flag[n][1] 0 0 0 0 1 1 abs_remainder[n] 0 1 dec_abs_level[n] 7 10 coeff_sign_flag[n] 0 0 0 0 0 1 0 0 0 0 1 1 0 0 1 0

[0155] In the above Table 4, n represents the scanning position of the coefficient according to the reverse diagonal scanning. For example, when n is 15, it indicates the coefficient scanned first in the 4×4 block (ie, the lower right corner coefficient), and when n is 0, it indicates the last scanned coefficient (ie, the upper left corner coefficient).

[0156] In addition, in order to improve coding efficiency or according to the application, the transform process can be omitted. In this case, the syntax elements related to residual data encoding / decoding can be represented as shown in the following table:

[0157] [Table 5]

[0158]

[0159]

[0160] For example, the transform coefficients may be encoded using the sb_coded_flag, sig_coeff_flag, coeff_sign_flag (context / bypass coding), 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 abs_remainder syntax elements.

[0161] For example, after dividing a block in which the transform is omitted into 4×4 sub-blocks, a 1-bit syntax element sb_coded_flag can be used for each 4×4 sub-block to indicate whether there is a non-zero coefficient in the current sub-block. Sub-blocks can be used interchangeably with CG (coefficient group). For example, if the value of sb_coded_flag is 0, it indicates that there is no further information to be sent, so the encoding process for the current sub-block can be terminated. On the contrary, if the value of sb_coded_flag is 1, the encoding process for sig_coeff_flag can be continued. For the first sub-block scanned in the block where the transform is omitted (the upper left sub-block in the block) and the last sub-block scanned (the lower right sub-block in the block), sb_coded_flag encoding is unnecessary, so the value can be assumed to be 1.

[0162] If sb_coded_flag indicates that there are non-zero coefficients in the current sub-block, sig_coeff_flag with a binary value may be encoded according to the forward scan order. For each coefficient at the scan position (n) after the scan order, a 1-bit syntax element sig_coeff_flag[n] may be encoded. At this time, sig_coeff_flag[xC][yC] may indicate whether the level (value) of the corresponding coefficient at the coefficient position (xC, yC) is non-zero. If the value of the coefficient at the current scan position is not 0, the value of sig_coeff_flag[n] may be 1.

[0163] In addition, for example, only when the value of sig_coeff_flag is 1, the residual information may include a sign flag indicating the sign of the residual coefficient, a first coefficient level flag indicating whether the coefficient level is greater than a first threshold, a parity level flag for the parity of the coefficient level of the residual coefficient, and / or a second coefficient level flag indicating whether the coefficient level of the residual coefficient is greater than a second threshold, a third coefficient level flag indicating whether the coefficient level is greater than a third threshold, a fourth coefficient level flag indicating whether the coefficient level of the residual coefficient is greater than a fourth threshold, and a fifth coefficient level flag indicating whether the coefficient level of the residual coefficient is greater than a fifth threshold.

[0164] In addition, for example, the residual information may include a syntax element encoded based on a bypass of the residual coefficient for the current block. The bypass-encoded syntax element may include coefficient level information about the value of the current residual coefficient. The coefficient level information may be represented as a syntax element abs_remainder. In addition, the bypass-encoded syntax element may include a sign flag.

[0165] In addition, in order to solve the throughput problem of CABAC, an algorithm that limits the number of context coding elements in the residual coding for the block where the transform is omitted can be used. Here, the sum of context coding elements used to represent 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] can be limited to 1.75 per pixel in the transform block.

[0166] For example, if all context coding elements are used to encode the syntax elements, the remaining coefficients can be bypass-encoded by binarizing the coefficients without using CABAC. In other words, when the number of context coding elements encoded in a TUB reaches TU TB width * TU TB height * 1.75, 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], and abs_level_gtx_flag[n][4] can no longer be encoded using context coding elements, and abs_remainder can be encoded immediately. In this case, the sign of the coefficient can be bypass-encoded using the 1-bit symbol coeff_sign_flag.

[0167] The semantics of the syntax elements related to residual data encoding / decoding can be expressed as shown in the following table.

[0168] [Table 6]

[0169]

[0170]

[0171]

[0172] In this document, as described above, information (or syntax elements) may be encoded / decoded according to CABAC or the like, and a context model used in this case may be derived, for example, as follows. For ease of explanation, the method and / or process for deriving a context model is described in a format used in a standard document such as the HEVC or VVC standard, and the details presented are apparent to those skilled in the art.

[0173] For example, the following table illustrates an example of assigning a context index increment (ctxInc) to a syntax element of a context coding information element.

[0174] [Table 7]

[0175]

[0176] Additionally, the following table illustrates an example of a process for deriving context index increments for the last_sig_coeff_x_prefix and last_sig_coeff_y_prefix syntax elements in the standard document format.

[0177] [Table 8]

[0178]

[0179] Additionally, the following table illustrates an example of a process for deriving a context index increment for a tu_y_coded_flag syntax element in a standard document format.

[0180] [Table 9]

[0181]

[0182] Additionally, the following table illustrates an example of a process for deriving a context index increment for an sb_coded_flag syntax element in a standard document format.

[0183] [Table 10]

[0184]

[0185] Additionally, the following table illustrates an example of a process for deriving the locNumSig and locSumAbsPass1 variables in a standard document format.

[0186] [Table 11]

[0187]

[0188] Additionally, the following table illustrates an example of a process for deriving a context index increment for a sig_coeff_flag syntax element in a standard document format.

[0189] [Table 12]

[0190]

[0191] Additionally, the following table illustrates an example of a process for deriving context index increments for par_level_flag and abs_level_gtx_flag syntax elements in the standard document format.

[0192] [Table 13]

[0193]

[0194]

[0195] Additionally, the following table illustrates an example of a process for deriving a context index increment for a coeff_sign_flag syntax element in transform skip mode in the standard document format.

[0196] [Table 14]

[0197]

[0198] In addition, in order to perform efficient encoding by controlling the number of context coding elements, the following embodiments may be applied. Each embodiment may be applied alone or in combination.

[0199] As an embodiment, a method for controlling the number of context coding cells by using the position information of the last significant coefficient (i.e., the last non-zero coefficient) within the current transform block is proposed. In the current standard, a method for controlling the context coding cells based on the transform block size is used. More specifically, in the conventional method of controlling the context coding cells using the transform block size, the maximum number MaxCCB of context coding cells that can be used in the current transform block can be determined by the following formula. Here, TBWidth and TBHeight refer to the width and height of the transform block, respectively.

[0200] [Formula 7]

[0201] MaxCCB=TBWidth x TBHeight xc

[0202] For example, when high frequency zero output is applied, TBWidth and TBHeight may refer to the effective transform block width and height after zero output, respectively. In addition, c represents a real number representing the allowable range of the number of context codes per pixel, and, for example, a value of 1.75 may be used.

[0203] In this embodiment, the present specification proposes a method to check whether the position of the last significant coefficient in the transform block is less than a threshold, and if less than the threshold, the threshold is used to determine the maximum number of context coding elements. Here, the threshold may be referred to as a critical value.

[0204] Here, when comparing the position of the last significant coefficient with the threshold, various methods can be used. For example, the position of the last significant coefficient can be represented by an x-coordinate or a y-coordinate. In other words, the x-coordinate or the y-coordinate of the position of the last significant coefficient can be compared with the threshold. In addition, for example, it can be expressed as the sum of the x-coordinate and the y-coordinate of the position of the last significant coefficient. In other words, the sum of the x-coordinate and the y-coordinate of the position of the last significant coefficient can be compared with the threshold. In addition, the position of the last significant coefficient can also be represented using LastSigCoeffScanIdx. In other words, the position of the last significant coefficient LastSigCoeffScanIdx can be compared with the threshold.

[0205] For example, if the position of the last significant coefficient is less than ThPos, the maximum number of context coding elements MaxCCB that can be used in the current transform block can be determined using ThPos by the following formula: Here, c represents a real number representing the allowable range of the number of context coding per pixel, and for example, a value of 1.75 can be used.

[0206] [Formula 8]

[0207] MaxCCB=ThPos xc

[0208] At this time, in the proposed method, the MaxCCB value must always be an integer. However, since c is a real number, there is a case where the calculation result according to Formula 8 is not an integer. In this case, the calculation result rounded up or down to the nearest integer can be used as MaxCCB.

[0209] For example, although the present specification does not specifically limit the case where the position of the last significant coefficient is greater than or equal to ThPos, a context coding element control method using the current standard transform block size may also be used, as shown in Equation 7.

[0210] In addition, when LFNST is applied, there may be only N (e.g., 16 or 32) residual coefficients. If the number of residual coefficients after LFNST determined block by block is used as a threshold by the proposed method, the number of context coding elements of the transform block actually used can be reduced while maintaining the encoding performance as much as possible. In other words, compared with the conventional method of controlling the context coding element using the transform block size, the actual MaxCCB can be specified, thereby reducing the total number of context coding elements.

[0211] For example, when a conventional method of controlling context coding elements based on a transform block size of a 16x16 block is used, if c is 1.75, MaxCCB = TBWidth x TBHeight x 1.75 = 16x16x1.75 = 448, and if there are 16 non-zero coefficients in the current transform block, 28 context coding elements are assigned to each coefficient. However, when the proposed method is used, if ThPos is 16, the method of controlling context coding elements based on the position of the last significant coefficient in the transform block is applied to the 16x16 block. In this case, if c is 1.75, MaxCCB = ThPos x 1.75 = 16x1.75 = 28, and if there are 16 non-zero coefficients in the current transform block, exactly 1.75 context coding elements are assigned to each coefficient.

[0212] Therefore, by the proposed method, the number of context coding cells allowed within a transform block is limited, and if it exceeds MaxCCB, the syntax of the residual coefficients is encoded as bypass cells. Thus, the throughput of residual coding can be improved while maintaining the coding performance.

[0213] As an implementation, the present specification proposes a method to check whether the position of the last significant coefficient within a transform block is less than a threshold, and if so, determine the maximum number of context coding elements using the position of the last significant coefficient.

[0214] Here, when comparing the position of the last significant coefficient with the threshold, various methods can be used. For example, the position of the last significant coefficient can be represented by an x-coordinate or a y-coordinate. In other words, the x-coordinate or the y-coordinate of the position of the last significant coefficient can be compared with the threshold. In addition, for example, it can be expressed as the sum of the x-coordinate and the y-coordinate of the position of the last significant coefficient. In other words, the sum of the x-coordinate and the y-coordinate of the position of the last significant coefficient can be compared with the threshold. In addition, the position of the last significant coefficient can also be represented using LastSigCoeffScanIdx. In other words, the position of the last significant coefficient LastSigCoeffScanIdx can be compared with the threshold.

[0215] For example, if the position of the last significant coefficient is less than ThPos, the maximum number of context coding elements MaxCCB that can be used in the current transform block can be determined using the position of the last significant coefficient LastSigCoeffScanIdx by the following formula. Here, c represents a real number representing the allowable range of the number of context coding per pixel, for example, a value of 1.75 can be used.

[0216] [Formula 9]

[0217] MaxCCB=(LastSigCoeffScanldx+1)xc

[0218] At this time, in the proposed method, the MaxCCB value must always be an integer. However, since c is a real number, there is a case where the calculation result according to Formula 9 is not an integer. In this case, the calculation result rounded up or down to the nearest integer can be used as MaxCCB.

[0219] For example, although the present specification does not specifically limit the case where the position of the last significant coefficient is greater than or equal to ThPos, a context coding element control method using the current standard transform block size may also be used, as shown in Equation 7.

[0220] In addition, when LFNST is applied, there may be only N (e.g., 16 or 32) residual coefficients. If the number of residual coefficients after LFNST determined block by block is used as a threshold by the proposed method, the number of context coding elements of the transform block actually used can be reduced while maintaining the encoding performance as much as possible. In other words, compared with the conventional method of controlling the context coding element using the transform block size, the actual MaxCCB can be specified, thereby reducing the total number of context coding elements.

[0221] For example, when a conventional method of controlling context coding elements based on a transform block size of 16x16 blocks is used, if c is 1.75, MaxCCB = TBWidth x TBHeight x 1.75 = 16x16x1.75 = 448, and if there are 16 non-zero coefficients in the current transform block, 28 context coding elements are assigned to each coefficient. However, when the proposed method is used, if ThPos is 16 and the position index LastScanIdx of the last significant coefficient is 7 (which means it is the 8th pixel from (0,0), a method of controlling context coding elements based on the position of the last significant coefficient within the transform block is applied. In this case, if c is 1.75, MaxCCB=(LastScanIdx+1)x1.75=8x1.75=14, and if there are 8 non-zero coefficients in the current transform block, exactly 1.75 context coding elements are assigned to each coefficient. When implementation mode 1 is used, the difference from this implementation mode is that MaxCCB=ThPos x 1.75=16x1.75=28, which means that approximately 3.5 context coding elements are assigned to 8 coefficients.

[0222] Therefore, by the proposed method, the number of context coding cells allowed within a transform block is limited, and if it exceeds MaxCCB, the syntax of the residual coefficients is encoded as bypass cells. Thus, the throughput of residual coding can be improved while maintaining the coding performance.

[0223] Figure 7 and Figure 8 The method proposed in this document for controlling the number of context coding elements is exemplarily represented.

[0224] according to Figure 7 and Figure 8 , the number of context coding elements can be controlled using the position information of the last significant coefficient (ie, the last non-zero coefficient) within the current transform block.

[0225] For example, according to Figure 7, if the position of the last significant coefficient in the current transform block is less than the threshold, the maximum number of context coding cells (MaxCCB) that can be used in the current transform block can be derived based on the threshold. Specifically, the maximum number of context coding cells that can be used can be derived based on the threshold through the aforementioned formula 8. On the contrary, if the position of the last significant coefficient in the current transform block is greater than or equal to the threshold, the maximum number of context coding cells that can be used can be derived based on the transform block size through the aforementioned formula 7.

[0226] For example, according to Figure 8 , if the position of the last significant coefficient in the current transform block is less than the threshold, the maximum number of context coding elements (MaxCCB) that can be used in the current transform block can be derived based on the position of the last significant coefficient LastSigCoeffScanIdx. Specifically, the maximum number of context coding elements that can be used can be derived based on LastSigCoeffScanIdx through the aforementioned formula 9. On the contrary, if the position of the last significant coefficient in the current transform block is greater than or equal to the threshold, the maximum number of context coding elements that can be used can be derived based on the transform block size through the aforementioned formula 7.

[0227] Fig. 9 and Fig.10 An example of a video / image encoding method and related components according to an embodiment of the present disclosure is schematically illustrated.

[0228] Fig. 9 The method disclosed in can be Figure 2 or Fig.10 Specifically, for example, Fig. 9 S900 to S910 of the encoding device may be performed by the residual processing unit, and S920 to S930 may be performed by the entropy encoding unit (240) of the encoding device. Fig. 9 Although not shown in the figure, the prediction sample of the current block can be generated by the prediction unit (220) of the encoding device, and the process of generating the reconstructed sample of the current block based on the residual sample and the prediction sample of the current block can be performed by the adder unit of the encoding device. The process of encoding the prediction information of the current block can be performed by the entropy encoding unit of the encoding device. Fig. 9 The methods disclosed in may include the implementations described in this document.

[0229] Reference Fig. 9 , the encoding device derives the residual samples of the current block (S900). For example, the encoding device may derive the residual samples of the current block according to the aforementioned embodiments.

[0230] For example, the encoding device may determine whether to perform inter-frame prediction or intra-frame prediction on the current block, and may decide on a specific inter-frame prediction mode or a specific intra-frame prediction mode. Based on the determined mode, the encoding device may derive a prediction sample of the current block, and by subtracting the original sample of the current block from the prediction sample, it may generate a residual sample.

[0231] The encoding apparatus derives a transform coefficient based on the residual sample of the current block (S910). For example, according to the aforementioned embodiment, the encoding apparatus may derive a transform coefficient based on the residual sample of the current block.

[0232] For example, the encoding device may determine whether to apply a transform to the residual sample. If the transform is not applied to the residual sample, the encoding device may derive the generated residual sample as a transform coefficient. In addition, if the transform is applied to the residual sample, the encoding device performs a transform on the generated residual sample to derive the transform coefficient.

[0233] The encoding device derives the maximum number of context coding information elements for the syntax elements of the transform coefficients (S920). For example, according to the aforementioned embodiment, the encoding device may derive the maximum number of context coding information elements for the syntax elements of the transform coefficients.

[0234] For example, the maximum number of context coding elements may be derived based on the position of the last significant coefficient of the current block. In addition, for example, the maximum number of context coding elements may be derived based on whether the position of the last significant coefficient is less than a threshold.

[0235] For example, if the position of the last significant coefficient is less than a threshold value, the maximum number of context coding information elements may be derived based on the threshold value. In this case, the maximum number of context coding information elements for the syntax element may be derived based on the aforementioned formula 8. In other words, the maximum number of context coding information elements may be derived by multiplying the threshold value by c. At this time, in formula 8, c may be 1.75, but is not limited to this value, because c may be another real number.

[0236] In addition, if the position of the last significant coefficient is less than the threshold value, the maximum number of context coding information elements may be derived based on the position value of the last significant coefficient. In this case, the maximum number of context coding information elements for the syntax element may be derived based on the aforementioned formula 9. In other words, the maximum number of context coding information elements may be derived by multiplying the value of the position value of the last significant coefficient plus 1 by c. At this time, in formula 9, c may be 1.75, but is not limited to this value, and c may be another real number.

[0237] On the contrary, based on the position of the last significant coefficient being greater than or equal to the threshold, the maximum number of context coding elements may be derived based on the width of the transform block and the height of the transform block.

[0238] Here, when comparing the position of the last significant coefficient with the threshold, various methods can be used. For example, the position of the last significant coefficient can be represented by an x-coordinate or a y-coordinate. In other words, the x-coordinate or the y-coordinate of the position of the last significant coefficient can be compared with the threshold. In addition, for example, it can be expressed as the sum of the x-coordinate and the y-coordinate of the position of the last significant coefficient. In other words, the sum of the x-coordinate and the y-coordinate of the position of the last significant coefficient can be compared with the threshold. In addition, the position of the last significant coefficient can also be represented using LastSigCoeffScanIdx. In other words, the position of the last significant coefficient LastSigCoeffScanIdx can be compared with the threshold.

[0239] The encoding device generates a bitstream by encoding the residual information of the current block including the syntax element based on the maximum number of context coding cells (S930). For example, according to the aforementioned embodiment, the encoding device may generate a bitstream by encoding the residual information of the current block including the syntax element based on the maximum number of context coding cells.

[0240] For example, based on the maximum number of context coding information elements, it may encode a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a parity level flag for the parity of the transform coefficient level of the transform coefficient, a first transform coefficient level flag indicating whether the transform coefficient level is greater than a first threshold, and a second transform coefficient level flag indicating whether the transform coefficient level of the transform coefficient is greater than a second threshold. Here, the significant coefficient flag may be sig_coeff_flag, the parity level flag may be par_level_flag, the first transform coefficient level flag may be abs_level_gtx_flag[n][0], and the second transform coefficient level flag may be abs_level_gtx_flag[n][1].

[0241] In addition, for example, the residual information may include syntax elements such as 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 dec_abs_level.

[0242] Specifically, for example, the residual information may include information indicating a prefix of a column position of the last significant coefficient in a scanning order within a transform block, information indicating a prefix of a row position of the last significant coefficient in a scanning order within a transform block, information indicating a suffix of a column position of the last significant coefficient in a scanning order within a transform block, and information indicating a suffix of a row position of the last significant coefficient in a scanning order within a transform block. Syntax elements of the information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix.

[0243] In addition, for example, the residual information may include a context syntax element based on context encoding. For example, the context syntax element may include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a parity level flag for the parity of the transform coefficient level of the transform coefficient, a first transform coefficient level flag indicating whether the transform coefficient level is greater than a first threshold, and a second transform coefficient level flag indicating whether the transform coefficient level of the transform coefficient is greater than a second threshold. Here, the significant coefficient flag may be sig_coeff_flag, the parity level flag may be par_level_flag, the first transform coefficient level flag may be abs_level_gtx_flag[n][0], and the second transform coefficient level flag may be abs_level_gtx_flag[n][1].

[0244] In addition, for example, the bitstream may include position information indicating the position of the last significant coefficient of the current block.

[0245] In addition, the bitstream may include prediction information of the current block. The prediction information may include information on an inter prediction mode or an intra prediction mode performed on the current block.

[0246] Fig.11 and Fig.12 An example of a video / image decoding method and related components according to an embodiment of the present disclosure is schematically illustrated.

[0247] Fig.11 The method disclosed in can be Figure 3 or Fig.12 Specifically, for example, Fig.11 S1100 to S1120 of the decoding device may be performed by the entropy decoding unit (310), S1130 to S1140 may be performed by the residual processing unit (320) of the decoding device, and S1150 may be performed by the adder unit (340) of the decoding device. Fig.11Although not shown in FIG, the process of generating the prediction sample may be performed by the prediction unit of the decoding device, and the process of generating the reconstructed sample based on the prediction sample and the residual sample may be performed by the adder unit of the decoding device. Fig.11 The method disclosed in may include the implementation methods described above in this document.

[0248] Reference Fig.11 , the decoding device receives a bit stream including residual information of the current block (S1100). For example, according to the aforementioned embodiment, the decoding device may receive image information including residual information.

[0249] For example, the residual information may include syntax elements such as 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 dec_abs_level.

[0250] Specifically, for example, the residual information may include information indicating a prefix of a column position of the last significant coefficient in a scanning order within a transform block, information indicating a prefix of a row position of the last significant coefficient in a scanning order within a transform block, information indicating a suffix of a column position of the last significant coefficient in a scanning order within a transform block, and information indicating a suffix of a row position of the last significant coefficient in a scanning order within a transform block. Syntax elements of the information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix.

[0251] In addition, for example, the residual information may include a syntax element based on context encoding. For example, the syntax element may include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a parity level flag for the parity of the transform coefficient level of the transform coefficient, a first transform coefficient level flag indicating whether the transform coefficient level is greater than a first threshold, and a second transform coefficient level flag indicating whether the transform coefficient level of the transform coefficient is greater than a second threshold. Here, the significant coefficient flag may be sig_coeff_flag, the parity level flag may be par_level_flag, the first transform coefficient level flag may be abs_level_gtx_flag[n][0], and the second transform coefficient level flag may be abs_level_gtx_flag[n][1].

[0252] In addition, for example, the bitstream may include position information indicating the position of the last significant coefficient of the current block. At this time, the position of the last significant coefficient may be derived based on the position information.

[0253] In addition, the bitstream may include prediction information of the current block. The prediction information may include information about the inter prediction mode or intra prediction mode of the current block. The decoding device may perform inter prediction or intra prediction of the current block based on the prediction information received through the bitstream, and it may derive a prediction sample of the current block.

[0254] The decoding device derives a maximum number of context coding elements associated with the residual information (S1110). For example, according to the aforementioned embodiment, the decoding device may derive a maximum number of context coding elements associated with the residual information. For example, the maximum number of context coding elements may be derived based on the position of the last significant coefficient of the current block.

[0255] For example, the maximum number of context coding elements may be derived based on whether the position of the last significant coefficient is less than a threshold.

[0256] For example, if the position of the last significant coefficient is less than a threshold value, the maximum number of context coding elements may be derived based on the threshold value. In this case, the maximum number of context coding elements associated with the residual information may be derived based on the aforementioned formula 8. In other words, the maximum number of context coding elements may be derived by multiplying the threshold value by c. At this time, in formula 8, c may be 1.75, but is not limited to this value, because c may be another real number.

[0257] In addition, if the position of the last significant coefficient is less than the threshold value, the maximum number of context coding cells can be derived based on the position value of the last significant coefficient. In this case, the maximum number of context coding cells related to the residual information can be derived based on the aforementioned formula 9. In other words, the maximum number of context coding cells can be derived by multiplying the value of the position value of the last significant coefficient plus 1 by c. At this time, in formula 9, c can be 1.75, but is not limited to this value, and c can be another real number.

[0258] On the contrary, based on the position of the last significant coefficient being greater than or equal to the threshold, the maximum number of context coding elements may be derived based on the width of the transform block and the height of the transform block.

[0259] Here, when comparing the position of the last significant coefficient with the threshold, various methods can be used. For example, the position of the last significant coefficient can be represented by an x-coordinate or a y-coordinate. In other words, the x-coordinate or the y-coordinate of the position of the last significant coefficient can be compared with the threshold. In addition, for example, it can be expressed as the sum of the x-coordinate and the y-coordinate of the position of the last significant coefficient. In other words, the sum of the x-coordinate and the y-coordinate of the position of the last significant coefficient can be compared with the threshold. In addition, the position of the last significant coefficient can also be represented using LastSigCoeffScanIdx. In other words, the position of the last significant coefficient LastSigCoeffScanIdx can be compared with the threshold.

[0260] The decoding device decodes the syntax elements included in the residual information based on the maximum number of context coding elements (S1120).For example, according to the aforementioned embodiment, the decoding device may decode the syntax elements included in the residual information based on the maximum number of context coding elements.

[0261] For example, it can decode a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a parity level flag for the parity of the transform coefficient level of the transform coefficient, a first transform coefficient level flag indicating whether the transform coefficient level is greater than a first threshold, and a second transform coefficient level flag indicating whether the transform coefficient level of the transform coefficient is greater than a second threshold based on the maximum number of context coding symbols. Here, the significant coefficient flag may be sig_coeff_flag, the parity level flag may be par_level_flag, the first transform coefficient level flag may be abs_level_gtx_flag[n][0], and the second transform coefficient level flag may be abs_level_gtx_flag[n][1].

[0262] The decoding device derives the transform coefficient of the current block based on the decoded syntax element (S1130).For example, according to the aforementioned embodiment, the decoding device may derive the transform coefficient of the current block based on the decoded syntax element.

[0263] For example, the decoding device may determine the value of the transform coefficient based on the value of the decoded syntax element. In addition, for example, the residual information may include sign information indicating the sign of the transform coefficient. The decoding device may derive the sign of the transform coefficient based on the sign information. For example, the decoding device may derive the transform coefficient based on the value and sign of the transform coefficient.

[0264] The decoding apparatus derives residual samples of the current block based on the transform coefficient (S1140). For example, according to the aforementioned embodiment, the decoding apparatus may derive residual samples of the current block based on the transform coefficient.

[0265] The decoding device generates a reconstructed sample of the current block based on the residual sample of the current block (S1150).For example, according to the aforementioned embodiment, the decoding device may generate a reconstructed sample of the current block based on the residual sample of the current block.

[0266] For example, the decoding device may derive a prediction sample of the current block by performing an inter-frame prediction mode or an intra-frame prediction mode based on the prediction information received through the bitstream, and it may generate a reconstructed picture by adding the prediction sample and the residual sample. For example, the prediction information may include information indicating the intra-frame prediction mode of the current block. Alternatively, the prediction information may include motion-related information of the current block.

[0267] According to the aforementioned document, more efficient encoding can be performed by determining a context model based on the position of the last significant coefficient (the last non-zero transform coefficient). Specifically, if the position of the last significant coefficient is less than a threshold, the threshold can be used to determine the maximum number of context coding cells. In addition, if the position of the last significant coefficient is less than a threshold, the value representing the position of the last significant coefficient can be used to determine the maximum number of context coding cells. Therefore, compared with conventional techniques, the number of maximum context coding cells can be limited, thereby improving the throughput of residual coding or enhancing overall coding efficiency.

[0268] As mentioned previously, the decoding device may apply a loop filtering process (such as an SAO process) and / or a deblocking filter to the reconstructed picture to enhance the subjective / objective image quality as desired.

[0269] For example, the decoding device can decode the bitstream or the coded information to obtain image information including all or some of the above information (or syntax elements). In addition, the bitstream or the coded information can be stored in a computer-readable storage medium and can cause the above decoding method to be executed.

[0270] In the above-mentioned embodiment, the method is described based on a flow chart with a series of steps or boxes. The present disclosure is not limited to the order of the above steps or boxes. Some steps or boxes can be performed in an order different from the above-mentioned other steps or boxes or performed simultaneously. In addition, it will be understood by those skilled in the art that the steps shown in the above-mentioned flow chart are not exclusive, and further steps may be included, or one or more steps in the flow chart may be deleted without affecting the scope of the present disclosure.

[0271] The above-mentioned method according to the embodiment of the present document can be implemented in the form of software, and the encoding device and / or decoding device according to the present document can be included in, for example, a TV, a computer, a smart phone, a set-top box, a display device, etc. that performs the processing.

[0272] When the embodiments in this document are implemented as software, the above methods can be implemented as modules (processes, functions, etc.) that perform the above functions. The modules can be stored in a memory and executed by a processor. The memory can be inside or outside the processor and can be connected to the processor by various well-known means. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include a read-only memory (ROM), a random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described in this document can be implemented and executed on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in each figure can be implemented and executed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information (e.g., information about instructions) or algorithms for implementation can be stored in a digital storage medium.

[0273] In addition, the decoding device and encoding device of the present disclosure can be included in the following devices: multimedia broadcast sending / receiving devices, mobile communication terminals, home theater video devices, digital theater video devices, surveillance cameras, video chat devices, real-time communication devices such as video communication, mobile streaming devices, storage media, portable cameras, VOD service providing devices, over-the-top (OTT) video devices, Internet streaming service providing devices, three-dimensional (3D) video devices, virtual reality (VR) devices, augmented reality (AR) devices, teleconferencing video devices, transportation user devices (e.g., vehicle (including autonomous vehicle) user devices, aircraft user devices and ship user devices) and medical video devices; and the decoding device and encoding device of the present disclosure can be used to process video signals or data signals. For example, over-the-top (OTT) video devices can include game consoles, Blu-ray players, Internet access televisions, home theater systems, smart phones, tablet computers, digital video recorders (DVRs), etc.

[0274] In addition, the processing method of the embodiment of the present disclosure can be generated in the form of a program executed by a computer, and can be stored in a computer-readable recording medium. The multimedia data with a data structure according to the embodiment of the present disclosure can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a 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 (for example, via transmission over the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or transmitted via a wired / wireless communication network.

[0275] In addition, the embodiments of the present disclosure may be implemented using a computer program product according to a program code, and the program code may be executed in a computer through the embodiments of the present disclosure. The program code may be stored on a computer readable carrier.

[0276] Fig.13 An example of a content streaming system to which the embodiments disclosed in the present disclosure can be applied is illustrated.

[0277] Reference Fig.13 The content streaming system to which the embodiments of the present disclosure are applied may broadly include an encoding server, a streaming server, a network server, a media storage, a user device, and a multimedia input device.

[0278] The encoding server compresses the content input from a multimedia input device such as a smart phone, a camera, or a camcorder into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, when a multimedia input device such as a smart phone, a camera, or a camcorder directly generates a bitstream, the encoding server can be omitted.

[0279] A bitstream may be generated by the encoding method or the bitstream generating method to which the embodiments of the present disclosure are applied, and a streaming server may temporarily store the bitstream in a process of transmitting or receiving the bitstream.

[0280] The streaming server sends multimedia data to the user device through the network server based on the user request, and the network server is used as a medium to notify the user of the service. When the user requests the required service from the network server, the network server transmits the request to the streaming server, and the streaming server sends the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the command / response between the devices within the content streaming system.

[0281] The streaming server can receive content from a media storage and / or encoding server. For example, when receiving content from an encoding server, the content can be received in real time. In this case, in order to provide a stable streaming service, the streaming server can store the bitstream for a predetermined time.

[0282] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigators, touch screen PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, and head-mounted displays), digital TVs, desktop computers, and digital signage, etc.

[0283] Each server within the content streaming system may operate as a distributed server, in which case the data received from each server may be distributed.

[0284] The claims described in this disclosure can be combined in various ways. For example, the technical features of the method claims of this disclosure can be combined to be implemented as a device, and the technical features of the device claims of this disclosure can be combined to be implemented as a method. In addition, the technical features of the method claims of this disclosure and the technical features of the device claims can be combined to be implemented as a device, and the technical features of the method claims of this disclosure and the technical features of the device claims can be combined to be implemented as a method.

Claims

1. An image decoding method, the image decoding method being performed by a decoding device and comprising the following steps: receiving a bitstream including residual information for a current block; deriving a maximum number of context coding elements associated with the residual information; Decoding a syntax element included in the residual information based on the maximum number of context coding elements; deriving transform coefficients for the current block based on the decoded syntax elements; deriving residual samples for the current block based on the transform coefficients; as well as generating a reconstructed sample for the current block based on the residual sample for the current block, Wherein, the maximum number of context coding elements is derived based on the position of the last significant coefficient of the current block.

2. The image decoding method according to claim 1, wherein: The syntax element includes a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a parity level flag for the parity of the transform coefficient level of the transform coefficient, a first transform coefficient level flag for whether the transform coefficient level is greater than a first threshold, and a second transform coefficient level flag for whether the transform coefficient level is greater than a second threshold.

3. The image decoding method according to claim 2, wherein: The bitstream comprises position information representing the position of the last significant coefficient of the current block, Wherein, the position of the last significant coefficient is derived based on the position information.

4. The image decoding method according to claim 3, wherein: A certain number is derived based on whether the position of the last significant coefficient is less than a threshold.

5. The image decoding method according to claim 4, wherein: Based on the position of the last significant coefficient being less than the threshold, a maximum number of the context coding elements is derived based on the threshold.

6. The image decoding method according to claim 5, wherein: The maximum number of context coding cells is derived by the following formula: MaXCCB3-ThPosXC Wherein, MaxCCB represents the maximum number of the context coding cells, ThPos represents the threshold value, and c represents a real number.

7. The image decoding method according to claim 4, wherein: Based on the position of the last significant coefficient being less than the threshold, the maximum number of context coding symbols is derived based on the position value of the last significant coefficient.

8. The image decoding method according to claim 7, wherein: The maximum number of context coding cells is derived by the following formula: MaxCCB=(LastSigCeffScanldx+1)xC Among them, MaxCCB represents the maximum number of the context coding elements, LastSigCoeffScanIdx represents the position value of the last non-zero transform coefficient, and c represents a real number.

9. The image decoding method according to claim 6 or 8, wherein: The c is 1.

75.

10. The image decoding method according to claim 4, wherein: Based on the position of the last significant coefficient being equal to or greater than the threshold, the maximum number of context coding elements is derived based on a width of a transform block and a height of the transform block.

11. An image encoding method, the image encoding method being performed by an encoding device and comprising the following steps: Derive residual samples for the current block; deriving transform coefficients based on the residual samples for the current block; deriving a maximum number of context coding elements for a syntax element of the transform coefficient; as well as generating a bitstream by encoding residual information for the current block including the syntax element based on the maximum number of context coding elements, Wherein, the maximum number of context coding elements is derived based on the position of the last significant coefficient of the current block.

12. The image encoding method according to claim 11, wherein: The syntax element includes a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a parity level flag for the parity of the transform coefficient level of the transform coefficient, a first transform coefficient level flag for whether the transform coefficient level is greater than a first threshold, and a second transform coefficient level flag for whether the transform coefficient level is greater than a second threshold.

13. The image encoding method according to claim 11, wherein: The bitstream includes position information indicating the position of the last significant coefficient of the current block.

14. The image encoding method according to claim 11, wherein: The maximum number of context coding elements is derived based on whether the position of the last significant coefficient is less than a threshold.

15. The image encoding method according to claim 14, wherein: Based on the position of the last significant coefficient being less than the threshold, a maximum number of the context coding elements is derived based on the threshold.

16. The image encoding method according to claim 15, wherein: The maximum number of context coding cells is derived by the following formula: MaXCCBThPoSX C Wherein, MaxCCB represents the maximum number of the context coding cells, ThPos represents the threshold value, and c represents a real number.

17. The image encoding method according to claim 14, wherein: Based on the position of the last significant coefficient being less than the threshold, the maximum number of context coding symbols is derived based on the position value of the last significant coefficient.

18. The image encoding method according to claim 17, wherein: The maximum number of context coding cells is derived by the following formula: MaxCCB=(LastSigCoeffScanldx+1)xc Among them, MaxCCB represents the maximum number of the context coding elements, LastSigCoeffScanIdx represents the position value of the last significant coefficient, and c represents a real number.

19. A computer-readable storage medium storing a bit stream generated by the image encoding method according to claim 11.

20. A method for transmitting image data, the method comprising the following steps: Obtaining a bitstream for the image, wherein the bitstream is generated based on the following steps: deriving residual samples for a current block; deriving transform coefficients based on the residual samples for the current block; deriving the number of context coding elements for syntax elements of the transform coefficients; and encoding residual information for the current block including the syntax elements based on a maximum number of the context coding elements; and sending said data comprising said bit stream, Wherein, the maximum number of context coding elements is derived based on the position of the last significant coefficient of the current block.