METHOD AND APPARATUS FOR CODING RESIDUAL INFORMATION IN A VIDEO CODING SYSTEM - Patent application
By limiting the number of context-encoded bits in the video encoding system, the problem of low encoding efficiency of high-resolution videos is solved, and more efficient encoding and transmission is achieved, reducing costs.
Patent Information
- Application Number
- JP2024558001
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-03-30
- Filing Date
- 2023-01-03
- Publication Date
- 2025-04-22
AI Technical Summary
Existing video encoding technologies are difficult to efficiently compress and transmit high-resolution, high-quality video data, especially in the context of supporting virtual reality (VR), augmented reality (AR), and high-frame-rate game videos, with increased transmission and storage costs.
By introducing a method in the video encoding system, limiting the number of context-encoded bits, the specific steps include: receiving residual information, determining the maximum number of context-encoded bits, decoding syntax elements, calculating the transformation coefficient, generating recovery samples, and generating recovery blocks based on the maximum number of context-encoded bits.
It effectively reduces the number of context-encoded bits in the video encoding system, thereby improving encoding efficiency, reducing transmission and storage costs, and supporting encoding of high-resolution and high-frame rate videos.
Smart Images

Figure 2025512889000001_ABST
Abstract
Description
[Technical field]
[0001] This document relates to video coding technology, and more particularly to a method and apparatus for coding residual information in a video coding system. [Background technology]
[0002] Recently, the demand for high-resolution, high-quality images / videos such as 4K or 8K or higher UHD (Ultra High Definition) images / videos is increasing in various fields. As the image / video data has higher resolution and quality, the amount of information or bits to be transmitted increases relatively compared to existing image / video data, so that when the image data is transmitted using existing media such as wired or wireless broadband lines or when the image / video data is stored using existing storage media, the transmission and storage costs increase.
[0003] In addition, interest and demand for immersive media such as virtual reality (VR), artificial reality (AR) content and holograms has been increasing recently, and the broadcast of videos / images with different image characteristics from real images, such as game images, is increasing.
[0004] Therefore, there is a demand for a highly efficient image compression technology in order to effectively compress and transmit, store, and play back high-resolution, high-quality image / video information having the above-mentioned various characteristics.
[0005] In addition, a technique is required to reduce the amount of processing required for residual coding by limiting the number of context coded bins used in coding using CABAC. Summary of the Invention [Means for solving the problem]
[0006] According to an embodiment of the present document, there is provided a video decoding method performed by a decoding device, the method including the steps of receiving a bitstream including residual information for a current block, deriving a maximum number of context coded bins associated with the residual information, decoding syntax elements included in the residual information based on the maximum number of context coded bins, 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, and generating reconstructed samples for the current block based on the residual samples for the current block, wherein the maximum number of context coded bins is derived based on a position of a last significant coefficient of the current block.
[0007] According to another embodiment of the present document, there is provided an encoding method performed by an encoding apparatus, the method including the steps of: deriving residual samples for a current block, deriving transform coefficients based on the residual samples for the current block, deriving a number of context coded bins for syntax elements for the transform coefficients, and encoding residual information for the current block including the syntax elements based on the maximum number of context coded bins to generate a bitstream, wherein the maximum number of context coded bins is derived based on a position of a last significant coefficient of the current block.
[0008] According to another embodiment of the present document, there is provided a computer readable digital storage medium, which stores a bitstream generated by a specific method, the specific method including the steps of: deriving residual samples for a current block, deriving transform coefficients based on the residual samples for the current block, deriving a number of context coded bins for syntax elements for the transform coefficients, and encoding residual information for the current block including the syntax elements based on the maximum number of context coded bins to generate a bitstream, wherein the maximum number of context coded bins is derived based on a position of a last significant coefficient of the current block.
[0009] According to another embodiment of the present document, there is provided a method for transmitting data for an image, the method including the steps of: deriving residual samples for a current block; deriving transform coefficients based on the residual samples for the current block; deriving a number of context coded bins for syntax elements for the transform coefficients; and generating a bitstream by encoding residual information for the current block including the syntax elements based on the maximum number of context coded bins; and transmitting the data including the bitstream, wherein the maximum number of context coded bins is derived based on a position of a last significant coefficient of the current block.
[0010] According to another embodiment of the present document, a computer-readable digital storage medium is provided that stores encoded information or encoded video / image information that enables a decoding device to perform the video / image decoding method disclosed in at least one of the embodiments of the present document.
[0011] According to another embodiment of the present document, there is provided a method and apparatus for transmitting a bitstream generated by a video / image encoding method disclosed in at least one of the embodiments of the present document. [Brief description of the drawings]
[0012] [Figure 1] 1 illustrates generally an example of a video / image coding system that can be applied to embodiments of the present document; [Diagram 2] FIG. 1 is a diagram illustrating the configuration of a video / image encoding device that can be applied to an embodiment of this document. [Diagram 3] FIG. 1 is a diagram illustrating the configuration of a video / image decoding device that can be applied to an embodiment of this document. [Figure 4] 1 shows an exemplary hierarchical structure for coded video / images. [Diagram 5] Illustratively, CABAC (context-adaptive binary arithmetic coding) is used to encode syntax elements. [Figure 6] FIG. 2 is a diagram showing an example of transform coefficients in a 4×4 block. [Figure 7] 1 illustrates an exemplary method for controlling the number of context coding bins proposed in this document. [Figure 8] 1 illustrates an exemplary method for controlling the number of context coding bins proposed in this document. [Figure 9] 1 illustrates a schematic diagram of an example video / image encoding method and associated components according to an embodiment of the present document; [Figure 10] 1 illustrates a schematic diagram of an example video / image encoding method and associated components according to an embodiment of the present document; [Figure 11] 1 illustrates a schematic diagram of an example of a video / image decoding method and related components according to an embodiment of the present document; [Figure 12]1 illustrates a schematic diagram of an example of a video / image decoding method and related components according to an embodiment of the present document; [Figure 13] 1 illustrates an example of a content streaming system in which the embodiments disclosed herein can be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] This document may have various modifications and may have various embodiments, and a specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to a specific embodiment. Terms commonly used in this specification are used merely to describe a specific embodiment, and are not intended to limit the technical ideas of this document. A singular expression includes a plural expression unless the context clearly indicates otherwise. In this specification, the terms "include" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0014] Meanwhile, each component in the drawings described in this document is illustrated independently for the convenience of explaining the different characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components among the components may be combined to form one component, or one component may be divided into multiple components. An embodiment in which each component is integrated and / or separated is also included in the scope of the rights of this document as long as it does not deviate from the essence of this document.
[0015] Hereinafter, preferred embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Hereinafter, the same reference numerals are used for the same components in the drawings, and duplicated descriptions of the same components may be omitted.
[0016] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document may be related to the versatile video coding (VVC) standard (ITU-T Rec. H.266), a 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 essential video coding (EVC) standard, the AVS2 standard, etc.).
[0017] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the versatile video coding (VVC) standard, the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd generation of audio video coding standard (AVS2), or the next generation video / image coding standard (e.g., H.267 or H.268, etc.).
[0018] In this document, various embodiments relating to video / image coding are presented, which may be performed in combination with each other, unless otherwise stated.
[0019] In this document, video may refer to a collection of a series of images over time. A picture generally refers to a unit showing one image at a specific time, and a subpicture / slice / tile is a unit that constitutes a part of a picture in coding. A subpicture / slice / tile may include one or more coding tree units (CTUs). A picture may consist of one or more subpictures / slices / tiles. A picture may consist of one or more tile groups. A tile group may include one or more tiles. A brick may refer to a rectangular area of a CTU row in a tile in a picture. A tile may be partitioned into multiple bricks, and each brick may consist of one or more CTU rows in the tile. A tile that is not partitioned into multiple bricks may also be called a brick. A brick scan may indicate a particular sequential ordering of CTUs partitioning a picture, where the CTUs may be aligned in a brick by a CTU raster scan, the bricks in a tile may be aligned consecutively by a raster scan of the bricks in the tile, and the tiles in a picture may be aligned consecutively by a raster scan of the tiles in the picture. A sub-picture may also indicate a rectangular region of one or more slices in a picture. That is, a sub-picture may include one or more slices that collectively cover a rectangular region of a picture. A tile is a specific tile column and a rectangular region of a CTU within the specific tile column. The tile column is a rectangular region of a CTU, where the rectangular region has a height equal to the height of the picture, and a width may be specified by a syntax element in a picture parameter set. The tile row is a rectangular region of a CTU, where the rectangular region has a width equal to the height of the picture, and a height is equal to the height of the picture, which is specified by a syntax element in a picture parameter set.A tile scan may indicate a particular sequential ordering of CTUs that partition a picture, and the CTUs may be consecutively aligned with a raster scan of CTUs within a tile, and tiles within a picture may be consecutively aligned with a raster scan of the tiles of the picture. A slice may contain an integer number of bricks of a picture, and the integer number of bricks may be contained in one NAL unit. A slice may consist of a number of complete tiles, or may be a continuous sequence of complete bricks of one tile. In this document, tile group and slice may be used interchangeably. For example, in this document, tile group / tile group header may be referred to as slice / slice header.
[0020] A pixel or a pel can mean the smallest unit that constitutes one picture (or image). A term corresponding to a pixel can also be used as a "sample." A sample can generally indicate a pixel or a pixel value, and can represent only a pixel / pixel value of a luma component, or can indicate only a pixel / pixel value of a chroma component.
[0021] A unit may indicate a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. A unit may be used in combination with terms such as block or area, depending on the case. In a general case, an M×N block may include a sample (or sample array) consisting of M columns and N rows, or a set (or array) of transform coefficients.
[0022] As used herein, "A or B" can mean "only A," "only B," or "both A and B." In other words, as used herein, "A or B" can be interpreted as "A and / or B." For example, as used herein, "A, B or C" can mean "only A," "only B," "only C," or "any combination of A, B and C."
[0023] As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Thus, "A / B" can mean "only A," "only B," or "both A and B." For example, "A, B, C" can mean "A, B, or C."
[0024] In this specification, "at least one of A and B" can mean "only A", "only B", or "both A and B". In addition, in this specification, the expressions "at least one of A or B" and "at least one of A and / or B" can be interpreted as "at least one of A and B".
[0025] In addition, in this specification, "at least one of A, B and C" can mean "only A," "only B," "only C," or "any combination of A, B and C." In addition, "at least one of A, B or C" or "at least one of A, B and / or C" can mean "at least one of A, B and C."
[0026] Furthermore, parentheses used in the present specification may mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction." In other words, "prediction" in the present specification is not limited to "intra prediction," and "intra prediction" is proposed as an example of "prediction." Also, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction."
[0027] In this specification, technical features described individually in one drawing can be realized individually or simultaneously.
[0028] The following drawings are created to explain a specific example of the present specification. The names of specific devices and names of specific signals / messages / fields described in the drawings are presented for illustrative purposes only, and the technical features of the present specification are not limited to the specific names used in the following drawings.
[0029] FIG. 1 illustrates a schematic diagram of an example of a video / image coding system to which this document can be applied.
[0030] Referring to Figure 1, the video / image coding system may include a source device and a receiving device. The source device may transmit encoded video / image information or data to the receiving device via a digital storage medium or a network in the form of a file or streaming.
[0031] The source device may include a video source, an encoding device, and a sending unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / 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 also include a display unit, which may be a separate device or an external component.
[0032] A video source may acquire video / images through a video / image capture, synthesis, or generation process, etc. A video source may include a video / image capture device and / or a video / image generation device. A video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device may include, for example, a computer, a tablet, a smartphone, etc., and may (electronically) generate video / images. For example, a virtual video / image may be generated through a computer, etc., in which case the video / image capture process may be replaced by a process in which related data is generated.
[0033] An encoding device can encode an input video / image. The encoding device can perform a series of steps such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0034] The transmitting unit may transmit the encoded video / image information or data output in the form of a bitstream to a receiving unit of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit may include elements for generating a media file through a predetermined file format and may include elements for transmission via a broadcasting / communication network. The receiving unit may receive / extract the bitstream and transmit it to a decoding device.
[0035] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, prediction, etc., which correspond to the operations of the encoding device.
[0036] The renderer can render the decoded video / images. The rendered video / images can be displayed via a display unit.
[0037] 2 is a diagram for explaining the configuration of a video / image encoding device to which this document can be applied. Hereinafter, the video encoding device may include an image encoding device.
[0038] As shown in FIG. 2, the encoding device 200 may be configured to include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter prediction unit 221 and an intra prediction unit 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image division unit 210, the prediction unit 220, the residual processing unit 230, the entropy encoding unit 240, the addition unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chip set or a processor) according to an embodiment. In addition, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0039] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. As an example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree binary-tree ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the ternary structure may be applied. Alternatively, the binary tree structure may be applied first. The coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. In this case, the maximum coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as necessary, and a coding unit of an optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU: Prediction Unit) or a transform unit (TU: Transform Unit). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit described above.The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0040] The unit may be used interchangeably with terms such as block or area. In the general case, an M×N block may refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally refer to a pixel or pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. A sample may be used as a term corresponding to a pixel or pel of one picture (or image).
[0041] The subtraction unit 231 may subtract a prediction signal (predicted block, prediction sample, or prediction sample array) output from the prediction unit 220 from an 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 transmitted to the conversion unit 232. The prediction unit 220 may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including a prediction sample for the current block. The prediction unit 220 may determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as described below in the description of each prediction mode. The prediction information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0042] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block depending on the prediction mode. In the intra prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, a DC mode and a planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to the neighboring blocks.
[0043] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between a neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated CU (col CU), etc., and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 221 may generate information indicating which candidate is used to derive a motion vector and / or a reference picture index of the current block by forming a motion information candidate list based on neighboring blocks. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, the inter prediction unit 221 may use motion information of a neighboring block as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.
[0044] The prediction unit 220 may generate a prediction signal based on various prediction methods described below. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of a block. The intra block copy may be used for content image / moving image coding such as games, for example, as in screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document.
[0045] The prediction signal generated through the inter prediction unit 221 and / or the intra prediction unit 222 may be used to generate a restored signal or may be used to generate a residual signal. The transform unit 232 may generate transform coefficients 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 conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. The CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to pixel blocks having the same size as a square, or may be applied to non-square, variable-sized blocks.
[0046] The quantization unit 233 quantizes the transform coefficients and transmits them to the entropy encoding unit 240, which may encode the quantized signal (information on the quantized transform coefficients) and output the quantized signal as a bitstream. The information on the quantized transform coefficients may be referred to as residual information. The quantization unit 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit 240 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy encoding unit 240 may also encode information required for video / image restoration (e.g., values of syntax elements, etc.) together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / picture information) may be transmitted or stored in the form of a bitstream in network abstraction layer (NAL) unit units. The video / picture information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / picture information may further include general constraint information. Signaling / transmitted information and / or syntax elements described later in this document may be encoded through the above-mentioned encoding procedure and included in the bitstream.The bitstream may be transmitted via a network or may be stored in a digital storage medium, where the network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) for storing the signal may be configured as an internal / external element of the encoding apparatus 200, or the transmitter may be included in the entropy encoding unit 240.
[0047] The quantized transform coefficients output from the quantizer 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantizer 234 and the inverse transformer 235. The adder 250 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample, or reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the predictor 220. When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as a reconstructed block. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, and may also be used for inter prediction of the next picture after filtering, as described below.
[0048] Meanwhile, luma mapping with chrominance scaling (LMCS) may be applied during picture encoding and / or restoration.
[0049] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset (SAO), an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 290, as will be described later in the description of each filtering method. The filtering information may be encoded by the entropy encoding unit 290 and output in the form of a bitstream.
[0050] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 280. When inter prediction is applied through this, the encoding device can avoid prediction mismatch between the encoding device 200 and the decoding device, and can also improve encoding efficiency.
[0051] The DPB of the memory 270 may store a modified reconstructed picture for use as a reference picture in the inter prediction unit 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 221 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.
[0052] FIG. 3 is a diagram illustrating a schematic configuration of a video / image decoding device to which this document can be applied.
[0053] As shown in FIG. 3, the decoding device 300 may be configured to include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter predictor 331 and an intra predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. The entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured as one hardware component (e.g., a decoder chipset or processor) according to an embodiment. In addition, the memory 360 may include a decoded picture buffer (DPB) and may be configured as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.
[0054] If a bitstream including video / image information is input, the decoding device 300 can restore an image corresponding to a process in which the video / image information is processed by the encoding device of FIG. 3. For example, the decoding device 300 can derive a unit / block based on block division related information obtained from the bitstream. The decoding device 300 can perform decoding using a processing unit applied in the encoding device. Thus, the processing unit for decoding can be, for example, a coding unit, and the coding unit can be divided from a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the coding unit. Then, the restored image signal decoded and output by the decoding device 300 can be reproduced by a reproduction device.
[0055] The decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding apparatus may decode a picture based on information on the parameter set and / or the general constraint information. Signaling / received information and / or syntax elements described later in this document may be obtained from the bitstream by being decoded via the decoding procedure. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element in a bitstream, determine a context model using information on a syntax element to be decoded and decoding information of adjacent and to-be-decoded blocks, or information on symbols / bins decoded in a previous step, predict the occurrence probability of a bin according to the determined context model, and perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element.At this time, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Prediction information from the information decoded by the entropy decoding unit 310 may be provided to the prediction unit 330, and information on the residual on which entropy decoding is performed by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the inverse quantization unit 321. In addition, filtering information from the information decoded by the entropy decoding unit 310 may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) for receiving a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, the decoding device according to this document may be called a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the prediction unit 330, the addition unit 340, the filtering unit 350, and the memory 360.
[0056] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the rearrangement may be performed based on a coefficient scan order performed in the encoding device. The inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0057] The inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0058] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information on the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0059] The predictor may generate a prediction signal based on various prediction methods described below. For example, the predictor may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). The predictor may also perform intra block copy (IBC) for prediction of a block. The intra block copy may be used for content image / moving image coding such as games, for example, as in screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document.
[0060] The intra prediction unit 332 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away depending on the prediction mode. In intra prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 332 may also determine the prediction mode to be applied to the current block by using the prediction mode applied to the neighboring block.
[0061] The inter prediction unit 331 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. For example, the inter prediction unit 331 may configure a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on the received candidate selection information. Inter prediction may be performed based on various prediction modes, and the information regarding the prediction may include information indicating a mode of inter prediction for the current block.
[0062] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to the prediction signal (predicted block, predicted sample array) output from the prediction unit 330. When there is no residual for the current block, such as when the skip mode is applied, the predicted block may be used as the reconstructed block.
[0063] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in a current picture, may be output after filtering as described below, or may be used for inter prediction of a next picture.
[0064] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during the picture decoding process.
[0065] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 60, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0066] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter prediction unit 331. The memory 360 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 331 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 332.
[0067] In this specification, the embodiments described for the prediction unit 330, inverse quantization unit 321, inverse transform unit 322, and filtering unit 350 of the decoding device 300 can be applied identically or correspondingly to the prediction unit 220, inverse quantization unit 234, inverse transform unit 235, and filtering unit 260 of the encoding device 200, respectively.
[0068] Meanwhile, as described above, prediction is performed to improve compression efficiency when performing video coding. As a result, a predicted block including predicted samples for a current block, which is a block to be coded, can be generated. Here, the predicted block includes predicted samples in a spatial domain (or a pixel domain). The predicted block is derived in the same way in an encoding device and a decoding device, and the encoding device can improve image coding efficiency by signaling information (residual information) about the residual between the original block and the predicted block, which is not an original sample value of the original block, to the decoding device. The decoding device can derive a residual block including residual samples based on the residual information, and can generate a reconstructed block including reconstructed samples by adding the residual block and the predicted block, and can generate a reconstructed picture including the reconstructed block.
[0069] The residual information may be generated through a transform and quantization procedure. For example, the encoding apparatus may derive a residual block between the original block and the predicted block, perform a transform procedure on the residual samples (residual sample array) included in the residual block to derive transform coefficients, and perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and then signal the related residual information (through a bitstream) to the decoding apparatus. Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. The decoding apparatus may derive a residual sample (or a residual block) by performing an inverse quantization / inverse transform procedure based on the residual information. The decoding apparatus may generate a reconstructed picture based on the predicted block and the residual block. Also, the encoding apparatus may derive a residual block by inverse quantizing / inverse transforming the quantized transform coefficients for reference for inter-prediction of a future picture, and generate a reconstructed picture based on the residual block.
[0070] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. If the quantization / dequantization is omitted, the quantized transform coefficients may be referred to as transform coefficients. If the transform / inverse transform is omitted, the transform coefficients may be referred to as coefficients or residual coefficients, or may still be referred to as transform coefficients for uniformity of expression. In addition, whether or not the transform / inverse transform is omitted may be signaled based on transform_skip_flag.
[0071] In this document, the quantized transform coefficients and the transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, the residual information may include information on the transform coefficient(s), and the information on the transform coefficient(s) may be signaled via a residual coding syntax. Transform coefficients may be derived based on the residual information (or information on the transform coefficient(s)), and scaled transform coefficients may be derived via an inverse transform (scaling) on the transform coefficients. Residual samples may be derived based on an inverse transform (transform) on the scaled transform coefficients. This may be similarly applied / expressed in other parts of this document.
[0072] A prediction unit of an encoding device / decoding device may perform inter prediction in units of blocks to derive prediction samples. Inter prediction may indicate a prediction derived in a manner that is dependent on data elements (e.g., sample values or motion information) of picture(s) other than the current picture. When inter prediction is applied to a current block, a predicted block (prediction sample array) for the current block may be derived based on a reference block (reference sample array) identified by a motion vector on a reference picture pointed to by a reference picture index. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, motion information of the current block may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between adjacent blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When inter prediction is applied, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring blocks may be the same or different. The temporal neighboring blocks may be called collocated reference blocks, collocated CUs (colCUs), etc., and the reference picture including the temporal neighboring blocks may be called collocated pictures (colPic).For example, a motion information candidate list may be constructed based on neighboring blocks of the current block, and flag or index information indicating which candidate is selected (used) to derive a motion vector and / or a reference picture index of the current block may be signaled. Inter prediction may be performed based on various prediction modes, for example, in skip mode and merge mode, the motion information of the current block is the same as the motion information of the selected neighboring block. In skip mode, unlike merge mode, no residual signal is transmitted. In motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and a 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.
[0073] The motion information may include L0 motion information and / or L1 motion information depending on the inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). A motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and a motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. A prediction based on an L0 motion vector may be referred to as an L0 prediction, a prediction based on an L1 motion vector may be referred to as an L1 prediction, and a prediction based on both the L0 motion vector and the L1 motion vector may be referred to as a pairwise (Bi) prediction. Here, the L0 motion vector may indicate a motion vector associated with a reference picture list L0 (L0), and the L1 motion vector may indicate a motion vector associated with a reference picture list L1 (L1). The reference picture list L0 may include pictures that precede the current picture in output order as reference pictures, and the reference picture list L1 may include pictures that follow the current picture in output order. The previous picture may be referred to as a forward (reference) picture, and the following picture may be referred to as a backward (reference) picture. The reference picture list L0 may further include pictures subsequent to the current picture in output order as reference pictures. In this case, the previous picture may be indexed first in the reference picture list L0, and the subsequent picture may be indexed next. The reference picture list L1 may further include pictures subsequent to the current picture in output order as reference pictures. In this case, the subsequent picture may be indexed first in the reference picture list 1, and the previous picture may be indexed next. Here, the output order may correspond to a picture order count (POC) order.
[0074] FIG. 4 shows an exemplary hierarchical structure for coded video / pictures.
[0075] Referring to Figure 4, the coded video / image is divided into a VCL (video coding layer), which handles the video / image decoding process and itself, a lower system that transmits and stores the coded information, and a NAL (network abstraction layer), which exists between the VCL and the lower system and is responsible for network adaptation functions.
[0076] In VCL, it is possible to generate VCL data including compressed video data (slice data), or to generate parameter sets including information such as a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), and a Video Parameter Set (VPS), or a Supplemental Enhancement Information (SEI) message that is additionally required for the video decoding process.
[0077] In NAL, NAL units can be generated by adding header information (NAL unit header) to RBSP (Raw Byte Sequence Payload) generated by VCL. In this case, RBSP refers to slice data, parameter set, SEI message, etc. generated by VCL. The NAL unit header can include NAL unit type information identified by the RBSP data included in the NAL unit.
[0078] As shown, NAL units can be divided into VCL NAL units and non-VCL NAL units according to the RBSP generated in the VCL. The VCL NAL unit can refer to a NAL unit that contains information about an image (slice data), and the non-VCL NAL unit can refer to a NAL unit that contains information required to decode an image (parameter set or SEI message).
[0079] The above-mentioned VCL NAL unit and non-VCL NAL unit can be transmitted over a network with header information according to the data standard of the lower system. For example, the NAL unit can be transformed into a data format of a predetermined standard such as H.266 / VVC file format, RTP (Real-time Transport Protocol), TS (Transport Stream), etc., and transmitted over various networks.
[0080] As described above, the NAL unit type of a NAL unit can be identified by the RBSP data structure included in the NAL unit, and information regarding such NAL unit type can be stored and signaled in the NAL unit header.
[0081] For example, NAL units can be broadly classified into VCL NAL unit types and non-VCL NAL unit types depending on whether the NAL units include information about images (slice data). The VCL NAL unit types can be classified according to the nature and type of pictures included in the VCL NAL units, and the non-VCL NAL unit types can be classified according to the type of parameter sets.
[0082] The following is an example of a NAL unit type that is specified by the type of parameter set that the Non-VCL NAL unit type includes:
[0083] -APS (Adaptation Parameter Set) NAL unit: Type for NAL units containing APS
[0084] -VPS (Video Parameter Set) NAL unit: Type for NAL units containing VPS
[0085] -SPS (Sequence Parameter Set) NAL unit: Type for NAL units containing SPS
[0086] -PPS (Picture Parameter Set) NAL unit: Type for NAL units containing PPS
[0087] -DCI (Decoding Capability Information) NAL unit: Type for NAL units containing DCI
[0088] -PH (Picture header) NAL unit: Type for NAL unit containing PH
[0089] The above-mentioned NAL unit types have syntax information for the NAL unit types, and the syntax information can be stored in a NAL unit header and signaled. For example, the syntax information can be nal_unit_type, and the NAL unit type can be specified by the nal_unit_type value.
[0090] Meanwhile, as described above, one picture may include multiple slices, and one slice may include a slice header and slice data. In this case, one picture header may be added to multiple slices (slice header and slice data set) in one picture. The picture header (picture header syntax) may include information / parameters commonly applicable to the pictures. In this document, slices may be mixed with or replaced by tile groups. Also, slice headers in this document may be mixed with or replaced by type group headers.
[0091] The slice header (slice header syntax, slice header information) may include information / parameters commonly applicable to the slices. The APS (APS syntax) or PPS (PPS syntax) may include information / parameters commonly applicable to one or more slices or pictures. The SPS (SPS syntax) may include information / parameters commonly applicable to one or more sequences. The VPS (VPS syntax) may include information / parameters commonly applicable to multiple layers. The DCI (DCI syntax) may include information / parameters commonly applicable to all videos. The DCI may include information / parameters related to decoding capability. In this document, a high level syntax (HLS) may include at least one of the APS syntax, PPS syntax, SPS syntax, VPS syntax, DCI syntax, picture header syntax, and slice header syntax.
[0092] In this document, the image / video information encoded from an encoding device to a decoding device and signaled in the form of a bitstream may include information related to partitioning in a picture, intra / inter prediction information, residual information, in-loop filtering information, etc., as well as 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 further include information of a NAL unit header.
[0093] FIG. 5 illustrates an example of CABAC (context-adaptive binary arithmetic coding) for encoding a syntax element. For example, in the encoding process of CABAC, if an input signal is a syntax element that is not a binary value, the input signal value may be converted into a binary value through binarization. Also, if the input signal is already a binary value (i.e., the value of the input signal is a binary value), binarization may be bypassed. Here, each binary digit 0 or 1 constituting a binary value may be referred to as a bin. For example, if the binary string after binarization is 110, each of 1, 1, and 0 may be referred to as a bin. The bins for one syntax element may indicate the value of the corresponding syntax element.
[0094] Thereafter, the binarized bins of the syntax elements may be input to a regular coding engine or a bypass coding engine. The regular coding engine may assign a context model reflecting a probability value to the corresponding bin, and may encode the corresponding bin based on the assigned context model. The regular coding engine may update the probability model for the corresponding bin after performing encoding for each bin. The bins encoded as described above may be referred to as context-coded bins.
[0095] Meanwhile, when the binarized bins of the syntax elements are input to the bypass coding engine, they can be encoded as follows. For example, the bypass coding engine omits a procedure of estimating a probability for an input bin and a procedure of updating a probability model applied to the corresponding bin after encoding. For example, instead of assigning a context model, a uniform probability distribution is applied to encode the input bin, thereby improving the encoding speed. The bins encoded as described above can be referred to as bypass bins.
[0096] The entropy coding can determine whether to perform encoding through a regular coding engine or a bypass coding engine, and can also switch the encoding path, and the entropy decoding can perform the same process as the entropy encoding described above in reverse order.
[0097] For example, when a syntax element is decoded based on a context model, a decoding device may receive a bin corresponding to the syntax element through a bitstream, and may determine a context model using the syntax element and decoding information of a block to be decoded or an adjacent block or information of a symbol / bin decoded in a previous step, and may derive a value of the syntax element by predicting an occurrence probability of the received bin according to the determined context model and performing arithmetic decoding of the bin. Thereafter, the context model of the bin to be decoded next may be updated as the determined context model.
[0098] Also, for example, when a syntax element is bypass decoded, a decoding device may receive a bin corresponding to the syntax element through a bitstream and may decode the input bin by applying a uniform probability distribution. In this case, the decoding device may omit a procedure of deriving a context model of the syntax element and a procedure of updating the context model applied to the bin after decoding.
[0099] As described above, the residual samples may be transformed and quantized to derive quantized transform coefficients. The quantized transform coefficients may also be referred to as transform coefficients. In this case, the transform coefficients in a block may be signaled in the form of residual information. The residual information may include a residual coding syntax. That is, an encoding device may construct a residual coding syntax from the residual information, encode the syntax, and output the syntax in the form of a bitstream, and a decoding device may decode the residual coding syntax from the bitstream to derive residual (quantized) transform coefficients. The residual coding syntax may include syntax elements indicating whether a transform has been applied to a corresponding block, where the last valid transform coefficient in the block is located, whether a valid transform coefficient exists in a subblock, and the magnitude / sign of the valid transform coefficient, as described below.
[0100] For example, the (quantized) transform coefficients (i.e., the 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) coding or (transform) coefficient coding. Syntax elements related to the residual data encoding / decoding may be shown in the following table.
[0101] [Table 1-1]
[0102] [Table 1-2]
[0103] [Table 1-3]
[0104] [Table 1-4]
[0105] [Table 1-5]
[0106] [Table 1-6]
[0107] [Table 1-7]
[0108] 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 coding (x, y) position information of the last non-zero coefficient in an associated block. The associated block is a coding block (CB) or a transform block (TB). In relation to the transform (and quantization) and residual coding procedure, CB and TB can be mixed. For example, a residual sample is derived for the CB, and a (quantized) transform coefficient can be derived through transform and quantization for the residual sample, and information (or syntax element) efficiently indicating (the position, magnitude, sign, etc.) of the (quantized) transform coefficient can be generated and signaled through the residual coding procedure. The quantized transform coefficient can be called a transform coefficient. In general, if CB is not larger than the maximum TB, the size of CB is the same as the size of TB, in which case the target block to be transformed (and quantized) and residually coded can be called CB and TB. On the other hand, if CB is larger than the maximum TB, the target block to be transformed (and quantized) and residually coded can be called TB. Hereinafter, it will be described that syntax elements related to residual coding are signaled in units of transform block (TB), but this is merely an example, and as mentioned above, the TB can be mixed with the coding block (CB).
[0109] Specifically, last_sig_coeff_x_prefix indicates the prefix of the column position of the last significant coefficient in the scanning order within the transform block, last_sig_coeff_y_prefix indicates the prefix of the row position of the last significant coefficient in the scanning order within the transform block, last_sig_coeff_x_suffix indicates the suffix of the column position of the last significant coefficient in the scanning order within the transform block, and last_sig_coeff_y_suffix indicates the suffix of the row position of the last significant coefficient in the scanning order within the transform block. Here, the significant coefficients may indicate the non-zero coefficients. Also, the scan order may be a top-right diagonal scan order. Alternatively, the scan order may be a horizontal scan order or a vertical scan order. The scan order may be determined based on whether intra / inter prediction is applied to a current block (CB or CB including TB) and / or a specific intra / inter prediction mode.
[0110] Then, after dividing the transform block into 4x4 sub-blocks, a 1-bit syntax element sb_coded_flag may be used for each 4x4 sub-block to indicate whether a non-zero coefficient exists in the current sub-block. The sub-blocks may be used in combination with coefficient groups (CGs).
[0111] For example, if the value of sb_coded_flag is 0, there is no more information to transmit, so the coding device can end the coding process for the current sub-block. On the other hand, if the value of sb_coded_flag is 1, the coding device continues to perform the coding process for sig_coeff_flag. Since the sub-block containing the last non-zero coefficient does not require coding for sb_coded_flag, and the sub-block containing DC information of the transform block is highly likely to contain non-zero coefficients, sb_coded_flag is not coded and its value can be assumed to be 1.
[0112] If it is determined that a non-zero coefficient exists in the current sub-block because the value of sb_coded_flag is 1, the coding device may code sig_coeff_flag having a binary value according to the scanning order in reverse. The coding device may code a 1-bit syntax element sig_coeff_flag[n] for each coefficient at a corresponding scanning position (n) according to the scanning order. If the value of the coefficient is not 0 at the current scanning position, the value of sig_coeff_flag[n] becomes 1. Here, in the case of a sub-block including the last non-zero coefficient, since it is not necessary to code sig_coeff_flag[n] for the last non-zero coefficient, the coding process may be omitted. Level information coding is performed only when the value of sig_coeff_flag[n] is 1, and four syntax elements may be used in the level information coding process. Specifically, each sig_coeff_flag[xC][yC] may indicate whether the level (value) of a corresponding transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero.
[0113] The remaining level value after coding of sig_coeff_flag[n] can be derived as follows: That is, the level value remAbsLevel[n] to be coded at the corresponding scanning position (n) can be derived as follows:
[0114]
number
[0115] Here, coeff[n] represents the actual transform coefficient value.
[0116] Also, abs_level_gtx_flag[n][0] may indicate whether remAbsLevel[n] at a corresponding scanning position (n) is greater than 1. For example, if the value of abs_level_gtx_flag[n][0] is 0, the absolute value of the coefficient at the corresponding position is 1. Also, if the value of abs_level_gtx_flag[n][0] is 1, the remAbsLevel[n] indicating the level value to be coded thereafter may be derived as follows:
[0117]
number
[0118] In addition, the least significant coefficient (LSB) value of remAbsLevel[n] described in Equation 2 above can be coded via par_level_flag[n].
[0119]
number
[0120] Here, par_level_flag[n] may indicate the parity of the transform coefficient level (value) at scanning position n. After coding par_level_flag[n], the level value to be coded remAbsLevel[n] may be updated according to the following formula.
[0121]
number
[0122] In addition, abs_level_gtx_flag[n][1] can indicate whether remAbsLevel[n] at the corresponding scanning position (n) is greater than 3. For example, coding for abs_remainder[n] can be performed only if the value of abs_level_gtx_flag[n][1] is 1. The relationship between the actual transform coefficient value coeff and each syntax element is as follows:
[0123]
number
[0124] Here, |coeff[n]| indicates the transform coefficient level (value), and may also be expressed as AbsLevel[n] for the transform coefficient.
[0125] The following table also shows examples related to Equation 5 above.
[0126] [Table 2]
[0127] Finally, the sign of each coefficient can be coded using a 1-bit symbol coeff_sign_flag[n], which can indicate the sign of the transform coefficient level at a corresponding scanning position (n).
[0128] Meanwhile, a method of limiting the number of context-coded bins can be proposed to improve the throughput performance of CABAC. The throughput can be reduced by the regular coding engine of CABAC because regular coding uses the probability state and range updated through coding of the previous bin, which shows high data dependency and requires a lot of time to read the probability interval and determine the current state. Therefore, the throughput performance of CABAC can be improved by limiting the number of context-coded bins.
[0129] Therefore, the sum of the bins used to indicate sig_coeff_flag[n], abs_level_gtx_flag[n][0], par_level_flag[n], and abs_level_gtx_flag[n][1] in Table 1 may be limited to 1.75 per pixel in the transform block according to the size of the transform block. For example, when all the limited context coding bins are used for coding the context elements, the remaining coefficients may be binarized without using CABAC and bypass coded. In other words, when the number of coded context coding bins is TB width*TB height*1.75 in TB, sig_coeff_flag[n], abs_level_gtx_flag[n][0], par_level_flag[n], and abs_level_gtx_flag[n][1] coded in the context coding bins are not coded any more, and the |coeff[n]| value may be coded immediately in dec_abs_level[n]. For example, the relationship between the dec_abs_level[n] value and the |coeff[n]| value is as follows:
[0130]
number
[0131] In this case, the sign of each coefficient can also be coded using a 1-bit symbol, coeff_sign_flag[n].
[0132] The following table also shows examples related to Equation 6 above.
[0133] [Table 3]
[0134] FIG. 6 is a diagram showing an example of transform coefficients in a 4×4 block.
[0135] The 4×4 block in Figure 6 shows an example of quantized coefficients. The block shown in Figure 6 is a 4×4 transform block, or a 4×4 sub-block of an 8×8, 16×16, or 32×32 transform block. Also, the 4×4 block in Figure 6 can represent a luma block or a chroma block.
[0136] As an example, the coding result for the reverse diagonal scanned coefficients in FIG.
[0137] [Table 4]
[0138] In Table 4, n indicates the scan position of the coefficient according to the reverse diagonal scan. For example, n = 15 indicates the coefficient scanned first in a 4x4 block, i.e., the lower right corner, and n = 0 indicates the coefficient scanned last, i.e., the upper left corner.
[0139] On the other hand, the conversion process can be omitted to improve coding efficiency or depending on the application field. In this case, the syntax elements related to residual data encoding / decoding can be shown in the following table.
[0140] [Table 5-1]
[0141] [Table 5-2]
[0142] [Table 5-3]
[0143] [Table 5-4]
[0144] For example, the transform coefficients can be coded using the sb_coded_flag, sig_coeff_flag, coeff_sign_flag(context / bypasscoded), 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.
[0145] For example, after dividing a transform-omitted block into 4x4 sub-blocks, a 1-bit syntax element sb_coded_flag may be used for each 4x4 sub-block to indicate whether a non-zero coefficient exists in the current sub-block. The sub-blocks may be used in combination with coefficient groups (CGs). For example, if the value of sb_coded_flag is 0, the coding process for the current sub-block may be terminated since there is no more information to transmit. On the other hand, if the value of sb_coded_flag is 1, the coding process for sig_coeff_flag may continue to be performed. For the first scanned sub-block (the upper left sub-block in the block) and the last scanned sub-block (the lower right sub-block in the block) in the transform-omitted block, sb_coded_flag coding is not necessary, and therefore the corresponding value may be assumed to be 1.
[0146] If sb_coded_flag indicates that a non-zero coefficient exists in the current sub-block, sig_coeff_flag having a binary value may be coded according to the forward scanned order. A 1-bit syntax element sig_coeff_flag[n] may be coded for each coefficient at a corresponding scanning position (n) according to the scanning order. In this case, sig_coeff_flag[xC][yC] may indicate whether the level (value) of a corresponding coefficient at a coefficient position (xC, yC) is non-zero. If the value of the coefficient at the current scanning position is not 0, the value of sig_coeff_flag[n] may be 1.
[0147] Also, for example, the residual information may include a sign flag indicating the sign for the residual coefficient only when the value of sig_coeff_flag is 1, a first coefficient level flag for whether the coefficient level is greater than a first threshold, a parity level flag for the parity of the coefficient level for the residual coefficient and / or a second coefficient level flag for whether the coefficient level of the residual coefficient is greater than a second threshold, a third coefficient level flag for whether the coefficient level is greater than a third threshold, a fourth coefficient level flag for whether the coefficient level of the residual coefficient is greater than a fourth threshold, and a fifth coefficient level flag for whether the coefficient level of the residual coefficient is greater than a fifth threshold.
[0148] Also, for example, the residual information may include a syntax element coded based on a bypass for a residual coefficient of the current block. The bypass coded syntax element may include coefficient level information for a value of the current residual coefficient. The coefficient level information may be represented by a syntax element abs_remainder. Also, the bypass coded syntax element may include the sign flag.
[0149] Also, to solve the processing volume problem of CABAC, an algorithm for limiting the number of context-coded bins can be used in the residual coding of blocks where the transform is omitted. Here, the sum of the context-coded bins used to indicate 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 be limited to 1.75 per pixel in the transform block.
[0150] For example, when all the restricted context coding bins are used for coding a syntax element, the remaining coefficients can be binarized without using CABAC and bypass coded. In other words, when the number of coded context coding bins is TU TB width * TU TB height * 1.75 in TUB, 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] coded in the context coding bins are not coded any more, and abs_remainder can be coded immediately, and the sign of the coefficient in this case can be bypass coded using coeff_sign_flag, which is a 1-bit symbol.
[0151] The semantics of syntax elements related to the residual data encoding / decoding can be shown in the following table.
[0152] [Table 6-1]
[0153] [Table 6-2]
[0154] [Table 6-3]
[0155] [Table 6-4]
[0156] [Table 6-5]
[0157] In this document, as described above, information (or syntax elements) can be encoded / decoded using CABAC, etc., and the context model used in this case can be derived, for example, as follows: For convenience of explanation, the method and / or procedure for deriving the context model is described in a standard document format used in the HEVC or VVC standard, etc., and the meaning of the detailed contents is obvious to those skilled in the art.
[0158] For example, the following table shows an example of assigning index increments (ctxInc) for syntax elements of context coded bins.
[0159] [Table 7]
[0160] Additionally, the following table shows an example of a procedure for deriving index increments for the last_sig_coeff_x_prefix and last_sig_coeff_y_prefix syntax elements in standard document format.
[0161] [Table 8]
[0162] Additionally, the following table shows an example of a procedure for deriving an index increment for the tu_y_coded_flag syntax element in standard document format.
[0163] [Table 9]
[0164] Additionally, the following table shows an example of a procedure for deriving an index increment for the sb_coded_flag syntax element in standard document format.
[0165] [Table 10]
[0166] Additionally, the following table shows an example of a procedure for deriving the locNumSig and locSumAbsPass1 variables in standard document format.
[0167] [Table 11]
[0168] Additionally, the following table shows an example of a procedure for deriving index increments for the sig_coeff_flag syntax element in standard document format.
[0169] [Table 12]
[0170] Additionally, the following table shows an example of a procedure for deriving index increments for the par_level_flag and abs_level_gtx_flag syntax elements in standard document format.
[0171] [Table 13-1]
[0172] [Table 13-2]
[0173] Additionally, the following table shows an example of a procedure for deriving the index increment for the coeff_sign_flag syntax element in transform skip mode in standard document format.
[0174] [Table 14]
[0175] Meanwhile, in order to control the number of context coding bins and perform efficient coding, the following embodiments can be applied. Each embodiment can be applied individually or in combination.
[0176] As one embodiment, we propose a method for controlling the number of context-coded bins using position information of the last significant coefficient in the current transform block, i.e., the last non-zero coefficient. Current standards use a context-coded bin control method using the size of the transform block. More specifically, in the existing context-coded bin control method using the size of the transform block, the maximum number of context-coded bins MaxCCB that can be used in the current transform block can be determined using the following formula: Here, TB Width and TB Height refer to the width and height of the transform block, respectively.
[0177]
number
[0178] For example, when high frequency zero out is applied, TB Width and TB Height may respectively mean the effective transform block width and height after zero-out, where c is a real number indicating the allowable range of the context coding number per pixel, and may be, for example, 1.75.
[0179] In this embodiment, a method is proposed in which the MaxCCB is used to check whether the position of the last significant coefficient in a transform block is less than a limit value, and if so, to determine the maximum number of context coding bins using the limit value, which may be referred to as a threshold value.
[0180] Here, the position of the last significant coefficient can be compared with the limit value through various methods. For example, the position of the last significant coefficient can be represented by an x-coordinate or a y-coordinate. That is, the x-coordinate or the y-coordinate of the position of the last significant coefficient can be compared with the limit value. Also, for example, the position of the last significant coefficient can be represented by the sum of the x-coordinate and the y-coordinate. That is, the sum of the x-coordinate and the y-coordinate of the position of the last significant coefficient can be compared with the limit value. Also, the position of the last significant coefficient can be represented by LastSigCoeffScanIdx. That is, the position of the last significant coefficient LastSigCoeffScanIdx can be compared with the limit value.
[0181] For example, if the position of the last significant coefficient is less than ThPos, the maximum number of context coding bins MaxCCB available in the current transform block can be determined using ThPos through the following formula: Here, c is a real number indicating the allowable range of the context coding number per pixel, and for example, 1.75 can be used.
[0182]
number
[0183] In this case, the MaxCCB value must always be an integer in the proposed method. However, since c is a real number, the calculation result of Equation 8 may not be an integer. In this case, the calculation result can be rounded up or down to the nearest integer and used as MaxCCB.
[0184] For example, in the case where the position of the last significant coefficient is equal to or greater than ThPos, although this specification is not particularly limited thereto, a method of controlling a context coding bin using the size of a currently standard transform block as shown in Equation 7 may be used.
[0185] Also, when LFNST is applied, only N residual coefficients (e.g., 16 or 32) can exist. When the number of residual coefficients after LFNST determined for each block is used as the limit value through the proposed method, the number of context coding bins of the transform block that are actually used can be reduced while maintaining the maximum coding performance. That is, compared to the prior art method of controlling context coding bins using the size of the transform block, a practical MaxCCB can be specified and the total number of context coding bins can be reduced through this.
[0186] For example, when using the existing context coding bin control method using the size of the transform block for a 16x16 block, when c is 1.75, MaxCCB=TBWidth×TBHeight×1.75=16×16×1.75=448, and 28 context coding bins are assigned to each coefficient when the current transform block has 16 non-zero coefficients. However, when using the proposed method, when ThPos is 16, a context coding bin control method using the position of the last significant coefficient in the transform block is used for a 16x16 block, so when c is 1.75, MaxCCB=ThPos×1.75=16×1.75=28, and exactly 1.75 context coding bins are assigned to each coefficient when the current transform block has 16 non-zero coefficients.
[0187] In this way, the number of context coding bins allowed in a transform block is limited through the proposed method, and if it is outside MaxCCB, the syntax of the residual coefficients is coded into the bypass bins. This allows the amount of residual coding to be increased while maintaining coding performance.
[0188] As an embodiment, a method is proposed in which MaxCCB is used to check whether the position of the last significant coefficient in a transform block is less than a limit value, and if so, to determine the maximum number of context coding bins using the position of the last significant coefficient.
[0189] Here, the position of the last significant coefficient can be compared with the limit value through various methods. For example, the position of the last significant coefficient can be represented by an x-coordinate or a y-coordinate. That is, the x-coordinate or the y-coordinate of the position of the last significant coefficient can be compared with the limit value. Also, for example, the position of the last significant coefficient can be represented by the sum of the x-coordinate and the y-coordinate. That is, the sum of the x-coordinate and the y-coordinate of the position of the last significant coefficient can be compared with the limit value. Also, the position of the last significant coefficient can be represented by LastSigCoeffScanIdx. That is, the position of the last significant coefficient LastSigCoeffScanIdx can be compared with the limit value.
[0190] For example, if the position of the last significant coefficient is less than ThPos, the maximum number of context coding bins MaxCCB available in the current transform block can be determined using the position of the last significant coefficient LastSigCoeffScanIdx through the following formula: LastSigCoeffScanIdx is a value that is 0 for (0,0) of the transform block and increases by 1 according to the scanorder. Here, c is a real number indicating the allowable range of the context coding number per pixel, and for example, 1.75 can be used.
[0191]
number
[0192] In this case, the MaxCCB value must always be an integer in the proposed method. However, since c is a real number, the calculation result of Equation 9 may not be an integer. In this case, the calculation result can be raised or lowered to the nearest integer and used as MaxCCB.
[0193] For example, if the position of the last significant coefficient is equal to or greater than ThPos, the present invention does not limit the present invention, but it is possible to use a currently standard context coding bin control method using the size of a transform block as shown in Equation 7.
[0194] Also, when LFNST is applied, only N residual coefficients (e.g., 16 or 32) can exist. When the number of residual coefficients after LFNST determined for each block is used as the limit value through the proposed method, the number of context coding bins of the transform block that are actually used can be reduced while maintaining the maximum coding performance. That is, compared to the prior art method of controlling context coding bins using the size of the transform block, a practical MaxCCB can be specified and the total number of context coding bins can be reduced through this.
[0195] For example, when using the existing context coding bin control method using the size of the transform block for a 16x16 block, when c is 1.75, MaxCCB=TBWidth×TBHeight×1.75=16×16×1.75=448, and 28 context coding bins are assigned to each coefficient when the current transform block has 16 non-zero coefficients. However, when using the proposed method, when ThPos is 16 and the position index LastScanIdx of the last significant coefficient is 7, i.e., the 8th pixel from (0,0), the context coding bin control method using the position of the last significant coefficient in the transform block is used, so when c is 1.75, MaxCCB=(LastScanIdx+1)×1.75=8×1.75=14, and when the current transform block has 8 non-zero coefficients, exactly 1.75 context coding bins are assigned to each coefficient. When the first embodiment is used, MaxCCB=ThPos×1.75=16×1.75=28, which is different from the present embodiment in that approximately 3.5 context coding bins are assigned to 8 coefficients.
[0196] In this way, the number of context coding bins allowed in a transform block is limited through the proposed method, and if it is outside MaxCCB, the syntax of the residual coefficients is coded into the bypass bins, thereby increasing the amount of residual coding processing while maintaining coding performance.
[0197] 7 and 8 exemplarily show the method for controlling the number of context coding bins proposed in this document.
[0198] 7 and 8, the number of context-coded bins can be controlled using position information of the last significant coefficient, i.e., the last non-zero coefficient, in a current transform block.
[0199] For example, referring to Fig. 7, if the position of the last significant coefficient in the current transform block is less than a limit value, the maximum number of context coding bins (MaxCCB) available in the current transform block may be derived based on the limit value. Specifically, the maximum number of available context coding bins may be derived based on the limit value through the above-mentioned Equation 8. In contrast, if the position of the last significant coefficient in the current transform block is equal to or greater than a limit value, the maximum number of available context coding bins may be derived based on the size of the transform block through the above-mentioned Equation 7.
[0200] For example, referring to Fig. 8, if the position of the last significant coefficient in the current transform block is less than a limit value, the number of maximum context coding bins (MaxCCB) available in the current transform block may be derived based on the position of the last significant coefficient, LastSigCoeffScanIdx. Specifically, the number of maximum context coding bins available may be derived based on the LastSigCoeffScanIdx using Equation 9. In contrast, if the position of the last significant coefficient in the current transform block is equal to or greater than a limit value, the number of maximum context coding bins available may be derived based on the size of the transform block using Equation 7.
[0201] 9 and 10 show a schematic diagram of an example video / image encoding method and associated components according to an embodiment of the present document.
[0202] The method disclosed in FIG. 9 may be performed by the encoding device disclosed in FIG. 2 or FIG. 10. Specifically, for example, S900 to S910 in FIG. 9 may be performed by the residual processing unit of the encoding device, and S920 to S930 may be performed by the entropy encoding unit 240 of the encoding device. Also, although not shown in FIG. 9, a prediction sample for the current block may be generated by the prediction unit 220 of the encoding device, a process of generating a reconstructed sample for the current block based on the residual sample and the prediction sample for the current block may be performed by an adder of the encoding device, and a process of encoding prediction information for the current block may be performed by the entropy encoding unit of the encoding device. The method disclosed in FIG. 9 may include the embodiments detailed in this document.
[0203] 9, the encoding apparatus derives a residual sample for a current block (S900). For example, the encoding apparatus may derive the residual sample for the current block according to the above-described embodiment.
[0204] For example, the encoding apparatus may determine whether to perform inter prediction or intra prediction on the current block, and may determine a specific inter prediction mode or a specific intra prediction mode. Depending on the determined mode, the encoding apparatus may derive predicted samples for the current block and generate the residual samples by subtracting the predicted samples from original samples for the current block.
[0205] The encoding apparatus derives transform coefficients based on the residual samples for the current block (S910). For example, the encoding apparatus may derive transform coefficients based on the residual samples for the current block according to the above-described embodiments.
[0206] For example, an encoding device may determine whether a transform is applied to the residual samples. If a transform is not applied to the residual samples, an encoding device may derive the generated residual samples into the transform coefficients. Alternatively, if a transform is applied to the residual samples, an encoding device may perform a transform on the generated residual samples to derive the transform coefficients.
[0207] The encoding apparatus derives a maximum number of context coding bins for the syntax elements for the transform coefficients (S920). For example, the encoding apparatus may derive the maximum number of context coding bins for the syntax elements for the transform coefficients according to the above-described embodiments.
[0208] For example, the maximum number of context coding bins may be derived based on a position of the last significant coefficient of the current block, or based on whether the position of the last significant coefficient is less than a threshold.
[0209] For example, if the position of the last significant coefficient is less than the threshold, the maximum number of context coding bins may be derived based on the threshold. In this case, the maximum number of context coding bins for a syntax element may be derived based on Equation 8. That is, the maximum number of context coding bins may be derived as a value obtained by multiplying the threshold by c. In this case, c in Equation 8 is 1.75, but is not limited thereto, and c may be another real number.
[0210] Also, if the position of the last significant coefficient is less than the threshold, the maximum number of context coding bins may be derived based on the position value of the last significant coefficient. In this case, the maximum number of context coding bins for an element may be derived according to Equation 9. That is, the maximum number of context coding bins may be derived by multiplying the value of the position value of the last significant coefficient + 1 by c. In this case, in Equation 9, c is 1.75, but is not limited thereto, and c may be another real number.
[0211] Alternatively, based on the location of the last significant coefficient being equal to or greater than the threshold, the maximum number of context coding bins may be derived based on the width of a transform block and the height of the transform block.
[0212] Here, the position of the last significant coefficient can be compared with the threshold value through various methods. For example, the position of the last significant coefficient can be represented through an x-coordinate or a y-coordinate. That is, the x-coordinate or the y-coordinate of the position of the last significant coefficient can be compared with the threshold value. Also, for example, the position of the last significant coefficient can be represented as the sum of the x-coordinate and the y-coordinate. That is, the sum of the x-coordinate and the y-coordinate of the position of the last significant coefficient can be compared with the threshold value. Also, the position of the last significant coefficient can be represented using LastSigCoeffScanIdx. That is, the position of the last significant coefficient LastSigCoeffScanIdx can be compared with the threshold value.
[0213] The encoding apparatus generates a bitstream by encoding residual information for the current block including the syntax elements based on the maximum number of context coding bins (S930). For example, the encoding apparatus may generate a bitstream by encoding residual information for the current block including the syntax elements based on the maximum number of context coding bins according to the above-described embodiment.
[0214] For example, a significance coefficient flag indicating whether a transform coefficient is a non-zero transform coefficient, a parity level flag for parity of a transform coefficient level for 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 of the transform coefficient is greater than a second threshold, may be encoded based on the maximum context coding bin number, where the significance coefficient flag is sig_coeff_flag, the parity level flag is par_level_flag, the first transform coefficient level flag is abs_level_gtx_flag[n][0], and the second transform coefficient level flag is abs_level_gtx_flag[n][1].
[0215] Also, 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.
[0216] Specifically, for example, the residual information may include information indicating a prefix of the column position of the last significant coefficient in the scanning order in the transformation block, information indicating a prefix of the row position of the last significant coefficient in the scanning order in the transformation block, information indicating a suffix of the column position of the last significant coefficient in the scanning order in the transformation block, and information indicating a suffix of the row position of the last significant coefficient in the scanning order in the transformation block. The syntax elements for this information are last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix.
[0217] Also, for example, the residual information may include a context syntax element coded based on a context. For example, the context syntax element may include a significance coefficient flag indicating whether a transform coefficient is a non-zero transform coefficient, a parity level flag for parity of a transform coefficient level for 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 of the transform coefficient is greater than a second threshold. Here, the significance coefficient flag is sig_coeff_flag, the parity level flag is par_level_flag, the first transform coefficient level flag is abs_level_gtx_flag[n][0], and the second transform coefficient level flag is abs_level_gtx_flag[n][1].
[0218] Also, for example, the bitstream may include position information indicating the position of the last significant coefficient of the current block.
[0219] Meanwhile, the bitstream may include prediction information for the current block, The prediction information may include information on an inter prediction mode or an intra prediction mode performed on the current block.
[0220] 11 and 12 show a schematic diagram of an example of a video / image decoding method and related components according to an embodiment of the present document.
[0221] The method disclosed in Fig. 11 may be performed by the decoding device disclosed in Fig. 3 or Fig. 12. Specifically, for example, S1100 to S1120 in Fig. 11 may be performed by the entropy decoding unit 310 of the decoding device, S1130 to S1140 may be performed by the residual processing unit 320 of the decoding device, and S1150 may be performed by the adder 340 of the decoding device. Also, although not shown in Fig. 11, the process of generating a predicted sample may be performed by a prediction unit of the decoding device, and the process of generating a reconstructed sample based on the predicted sample and the residual sample may be performed by the adder of the decoding device. Also, the method disclosed in Fig. 11 may include the embodiments detailed in this document.
[0222] 11, a decoding apparatus receives a bitstream including residual information for a current block (S1100). For example, the decoding apparatus may receive image information including residual information according to the above-described embodiments.
[0223] 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.
[0224] Specifically, for example, the residual information may include information indicating a prefix of the column position of the last significant coefficient in the scanning order in the transformation block, information indicating a prefix of the row position of the last significant coefficient in the scanning order in the transformation block, information indicating a suffix of the column position of the last significant coefficient in the scanning order in the transformation block, and information indicating a suffix of the row position of the last significant coefficient in the scanning order in the transformation block. The syntax elements for this information are last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix.
[0225] Also, for example, the residual information may include syntax elements coded based on a context. For example, the syntax elements may include a significance coefficient flag indicating whether a transform coefficient is a non-zero transform coefficient, a parity level flag for parity of a transform coefficient level for 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 of the transform coefficient is greater than a second threshold. Here, the significance coefficient flag is sig_coeff_flag, the parity level flag is par_level_flag, the first transform coefficient level flag is abs_level_gtx_flag[n][0], and the second transform coefficient level flag is abs_level_gtx_flag[n][1].
[0226] Also, for example, the bitstream may include position information indicating a position of the last significant coefficient of the current block, and the position of the last significant coefficient may be derived based on the position information.
[0227] Meanwhile, the bitstream may include prediction information for the current block. The prediction information may include information on an inter-prediction mode or an intra-prediction mode for the current block. A decoding apparatus may perform inter-prediction or intra-prediction on the current block based on the prediction information received via the bitstream and derive a prediction sample for the current block.
[0228] The decoding apparatus derives a maximum number of context coded bins associated with the residual information (S1110). For example, the decoding apparatus may derive the maximum number of context coded bins associated with the residual information according to the above-described embodiments. For example, the maximum number of context coded bins may be derived based on the position of the last significant coefficient of the current block.
[0229] For example, the maximum number of context coding bins may be derived based on whether the position of the last significant coefficient is less than a threshold.
[0230] For example, if the position of the last significant coefficient is less than the threshold, the maximum number of context coding bins may be derived based on the threshold. In this case, the maximum number of context coding bins associated with residual information may be derived based on Equation 8. That is, the maximum number of context coding bins may be derived as a value obtained by multiplying the threshold by c. In this case, c in Equation 8 is 1.75, but is not limited thereto, and c may be another real number.
[0231] Also, if the position of the last significant coefficient is less than the threshold, the maximum number of context coding bins may be derived based on the position value of the last significant coefficient. In this case, the maximum number of context coding bins associated with residual information may be derived according to Equation 9. That is, the maximum number of context coding bins may be derived by multiplying the position value of the last significant coefficient + 1 by c. In this case, in Equation 9, c is 1.75, but is not limited thereto, and may be another real number.
[0232] Alternatively, based on the location of the last significant coefficient being equal to or greater than the threshold, the maximum number of context coding bins may be derived based on the width of a transform block and the height of the transform block.
[0233] Here, the position of the last significant coefficient can be compared with the threshold value through various methods. For example, the position of the last significant coefficient can be represented through an x-coordinate or a y-coordinate. That is, the x-coordinate or the y-coordinate of the position of the last significant coefficient can be compared with the threshold value. Also, for example, the position of the last significant coefficient can be represented as the sum of the x-coordinate and the y-coordinate. That is, the sum of the x-coordinate and the y-coordinate of the position of the last significant coefficient can be compared with the threshold value. Also, the position of the last significant coefficient can be represented using LastSigCoeffScanIdx. That is, the position of the last significant coefficient LastSigCoeffScanIdx can be compared with the threshold value.
[0234] The decoding device decodes the syntax elements included in the residual information based on the maximum number of context coding bins (S1120). For example, the decoding device may decode the syntax elements included in the residual information based on the maximum number of context coding bins according to the above-described embodiment.
[0235] For example, based on the maximum number of context coding bins, a significance coefficient flag indicating whether a transform coefficient is a non-zero transform coefficient, a parity level flag for parity of a transform coefficient level for 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 of the transform coefficient is greater than a second threshold may be decoded, where the significance coefficient flag is sig_coeff_flag, the parity level flag is par_level_flag, the first transform coefficient level flag is abs_level_gtx_flag[n][0], and the second transform coefficient level flag is abs_level_gtx_flag[n][1].
[0236] The decoding device derives transform coefficients for the current block based on the decoded syntax elements (S1130). For example, the decoding device may derive transform coefficients for the current block based on the decoded syntax elements according to the above-described embodiments.
[0237] For example, a decoding device may determine a value of the transform coefficient based on a value of the decoded syntax element. Also, for example, the residual information may include sign information indicating a sign of the transform coefficient. A decoding device may derive a sign of the transform coefficient based on the sign information. For example, a decoding device may derive the transform coefficient based on the value and the sign of the transform coefficient.
[0238] The decoding apparatus derives a residual sample for the current block based on the transform coefficients (S1140). For example, the decoding apparatus may derive the residual sample for the current block based on the transform coefficients according to the above-described embodiments.
[0239] The decoding apparatus generates reconstructed samples for the current block based on the residual samples for the current block (S1150). For example, the decoding apparatus may generate reconstructed samples for the current block based on the residual samples for the current block according to the above-described embodiments.
[0240] For example, the decoding device may derive a prediction sample by performing an inter prediction mode or an intra prediction mode for the current block based on prediction information received through a bitstream, and may generate the reconstructed picture by adding the prediction sample and the residual sample. For example, the prediction information may include information indicating an intra prediction mode of the current block. Or, the prediction information may include motion related information for the current block.
[0241] According to the above-mentioned document, more efficient coding can be performed by determining a context model based on the position of the last significant coefficient (last non-zero transform coefficient). Specifically, if the position of the last significant coefficient is less than a threshold, the maximum number of context coding bins can be determined using the threshold. Also, if the position of the last significant coefficient is less than a threshold, the maximum number of context coding bins can be determined using a value indicating the position of the last significant coefficient. Therefore, by limiting the maximum number of context coding bins compared to the conventional technology, the amount of residual coding processing can be improved or overall coding efficiency can be increased.
[0242] As described above, the decoding apparatus can then apply an in-loop filtering procedure, such as deblocking filtering and / or an SAO procedure, to the reconstructed picture to improve the subjective / objective picture quality, if necessary.
[0243] For example, a decoding device may decode a bitstream or encoded information to obtain video information including all or a part of the above-mentioned information (or syntax elements), and the bitstream or encoded information may be stored in a computer-readable storage medium, and the above-mentioned decoding method may be performed.
[0244] In the above-described embodiments, the method is described based on a flow chart with a series of steps or blocks, but the embodiment is not limited to the order of steps, and a step may occur in a different order or simultaneously with different steps than described above. Also, a person skilled in the art can understand that the steps shown in the flow chart are not exclusive, and other steps may be included, or one or more steps of the flow chart may be deleted without affecting the scope of the embodiments of this document.
[0245] The methods according to the embodiments of the present document described above may be implemented in software form, and the encoding device and / or decoding device according to the present document may be included in a device that performs image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc.
[0246] In this document, when the embodiments are implemented in software, the methods described above may be implemented with modules (processes, functions, etc.) that perform the functions described above. The modules may be stored in a memory and executed by a processor. The memory may be internal or external to the processor and may be coupled to the processor in various well-known ways. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described in this document may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each drawing may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for implementation may be stored on a digital storage medium.
[0247] In addition, the decoding device and encoding device to which the embodiment(s) of this document are applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interactive device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, a virtual reality (VR) device, an argument reality (AR) device, an image telephone video device, a transportation means terminal (e.g., a vehicle (including an autonomous vehicle) terminal, an airplane terminal, a ship terminal, etc.), and a medical video device, and may be used to process a video signal or a data signal. For example, an over-the-top video (OTT) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.
[0248] In addition, the processing method to which the embodiment(s) of the present document are applied may be produced in the form of a program executed by a computer and may be stored in a computer-readable recording medium. In addition, multimedia data having a data structure according to the embodiment(s) of the present document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium may include a medium realized in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bit stream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0249] Also, the embodiment(s) of the present document may be implemented in a computer program product by program code, the program code being executable by a computer according to the embodiment(s) of the present document. The program code may be stored on a computer readable carrier.
[0250] FIG. 13 illustrates an example of a content streaming system in which the embodiments disclosed herein can be applied.
[0251] Referring to FIG. 13, a content streaming system to which the embodiments of this document are applied may broadly include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.
[0252] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.
[0253] The bitstream may be generated by an encoding method or a bitstream generation method applied to an embodiment of this document, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0254] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server transmits multimedia data to the user. In this case, the content streaming system may include a separate control server, and in this case, the control server controls commands / responses between devices in the content streaming system.
[0255] The streaming server may receive content from a media repository and / or an encoding server. For example, when the content is received from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a certain period of time in order to provide a smooth streaming service.
[0256] Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glass, head mounted displays (HMDs), digital TVs, desktop computers, and digital signage.
[0257] Each server in the content streaming system can be operated as a distributed server, in which case data received at each server can be processed in a distributed manner.
[0258] The claims described herein may be combined in various ways. For example, the technical features of the method claims herein may be combined and realized in an apparatus, the technical features of the apparatus claims herein may be combined and realized in a method, the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and realized in an apparatus, and the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and realized in a method.
Claims
1. 1. A video decoding method performed by a decoding device, comprising: receiving a bitstream including residual information for a current block; deriving a maximum context coded bin number associated with the residual information; decoding a syntax element included in the residual information based on the maximum number of context coding bins; deriving transform coefficients for the current block based on the decoded syntax elements; deriving a residual sample for the current block based on the transform coefficients; and generating a reconstructed sample for the current block based on the residual sample for the current block; The method of claim 1, wherein the maximum number of context coding bins is derived based on a position of a last significant coefficient of the current block.
2. 2. The image decoding method of claim 1, wherein the syntax elements include a significant coefficient flag indicating whether a transform coefficient is a non-zero transform coefficient, a parity level flag for a parity of a transform coefficient level for 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 of the transform coefficient is greater than a second threshold.
3. the bitstream includes position information indicating a position of the last significant coefficient of the current block; 3. The method of claim 2, wherein the position of the last significant coefficient is derived based on the position information.
4. The method of claim 3, wherein the specific number is derived based on whether a position of the last significant coefficient is less than a threshold.
5. The method of claim 4 , wherein the maximum number of context coding bins is derived based on a threshold value based on the location of the last significant coefficient being less than the threshold value.
6. The maximum number of context coding bins is derived via the following formula:
6. The method of claim 5, wherein MaxCCB denotes the maximum number of context coding bins, ThPos denotes the threshold, and c denotes a real number.
7. The method of claim 4 , wherein the maximum number of context coding bins is derived based on a position value of the last significant coefficient based on the position value of the last significant coefficient being less than the threshold.
8. The maximum number of context coding bins is derived via the following formula:
8. The method of claim 7, wherein MaxCCB indicates the maximum number of context coding bins, LastSigCoeffScanIdx indicates a position value of the last non-zero transform coefficient, and c indicates a real number.
9. 9. The video decoding method of claim 6 or 8, wherein c is 1.
75.
10. The video decoding method of claim 4, wherein the maximum number of context coding bins is derived based on a width of a transform block and a height of the transform block, based on the position of the last significant coefficient being greater than or equal to the threshold.
11. 1. A video encoding method performed by an encoding device, comprising: deriving a residual sample for the current block; deriving transform coefficients based on the residual samples for the current block; deriving a maximum context coded bin number for a syntax element for the transform coefficient; and generating a bitstream by encoding residual information for the current block including the syntax element based on the maximum number of context coding bins; The method of claim 1, wherein the maximum number of context coding bins is derived based on a position of a last significant coefficient of the current block.
12. 12. The image encoding method of claim 11, wherein the syntax elements include: a significant coefficient flag indicating whether a transform coefficient is a non-zero transform coefficient; a parity level flag for parity of a transform coefficient level for 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 of the transform coefficient is greater than a second threshold.
13. The method of claim 11, wherein the bitstream includes position information indicating a position of the last significant coefficient of the current block.
14. The method of claim 11, wherein the maximum number of context coding bins is derived based on whether a position of the last significant coefficient is less than a threshold.
15. The method of claim 14, wherein the maximum number of context coding bins is derived based on a threshold value based on the location of the last significant coefficient being less than the threshold value.
16. The maximum number of context coding bins is derived via the following formula:
16. The video encoding method of claim 15, wherein MaxCCB denotes the maximum number of context coding bins, ThPos denotes the threshold, and c denotes a real number.
17. The method of claim 14, wherein the maximum number of context coding bins is derived based on a position value of the last significant coefficient based on the position value of the last significant coefficient being less than the threshold.
18. The maximum number of context coding bins is derived via the following formula:
18. The method of claim 17, wherein MaxCCB indicates the maximum number of context coding bins, LastSigCoeffScanIdx indicates a position value of the last significant coefficient, and c indicates a real number.
19. 12. A computer-readable storage medium storing a bitstream generated by the video encoding method of claim 11.
20. A method for transmitting data for an image, comprising: obtaining a bitstream for the image, the bitstream being generated based on a step of deriving residual samples for a current block; a step of deriving transform coefficients based on the residual samples for the current block; a step of deriving a number of context coded bins for syntax elements for the transform coefficients; and a step of encoding residual information for the current block including the syntax elements based on the maximum number of context coded bins to generate a bitstream; transmitting the data including the bitstream; The method of claim 1, wherein the maximum number of context coding bins is derived based on a position of a last significant coefficient of the current block.