Decoding devices, encoding devices, and devices that send data
By establishing a signaling relationship between the dependent quantization enable flag and the TSRC enable flag in image coding, the TSRC enable flag is notified only when dependent quantization is not enabled, thereby solving the problem of high transmission and storage costs of high-resolution and high-quality images and achieving more efficient image coding and residual coding.
Patent Information
- Application Number
- CN202310524539.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-02-05
- Filing Date
- 2021-02-05
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2041-02-05
AI Technical Summary
The transmission and storage costs of high-resolution and high-quality images are high, and it is necessary to improve the efficiency of image coding.
By establishing a signaling relationship between the dependent quantization enable flag and the TSRC enable flag, the TSRC enable flag is signaled only when the dependent quantization is not enabled, and the residual coding syntax of the transform skip block is encoded, the amount of coding bits is reduced to improve the overall residual coding efficiency.
The efficiency of image coding, especially residual coding, is improved, the amount of coding bits is reduced, and the transmission and storage costs are reduced.
Smart Images

Figure BDA0004234039970000231 
Figure BDA0004234039970000241 
Figure BDA0004234039970000251
Abstract
Description
[0001] This application is a divisional application of the original invention patent application number 202180025496.6 (International application number: PCT / KR2021 / 001513, application date: February 5, 2021, invention name: Image decoding method associated with residual coding and device therefor). Technical Field
[0002] The present disclosure relates to an image encoding technology, and more particularly, to an image decoding method and a device therefor for encoding flag information indicating whether TSRC is enabled when encoding residual data of a current block in an image encoding system. Background Art
[0003] Recently, demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition), has been growing in various fields. Because image data has high resolution and high quality, the amount of information or bits to be transmitted has increased compared to conventional image data. Consequently, when image data is transmitted using media such as conventional wired / wireless broadband lines or stored using existing storage media, transmission and storage costs increase.
[0004] Therefore, there is a need for efficient image compression technology for effectively transmitting, storing, and reproducing information of high-resolution and high-quality images. Summary of the Invention
[0005] Technical issues
[0006] The present disclosure provides a method and apparatus for improving image coding efficiency.
[0007] The present disclosure also provides a method and apparatus for improving residual coding efficiency.
[0008] Technical Solution
[0009] According to an embodiment of the present disclosure, a method for image decoding performed by a decoding device is provided. The method includes the following steps: obtaining prediction-related information of a current block; obtaining a dependent quantization enable flag indicating whether dependent quantization is enabled; obtaining a transform skip residual coding (TSRC) enable flag indicating whether TSRC is enabled based on the dependent quantization enable flag; obtaining residual information of a residual coding syntax of the current block derived based on the TSRC enable flag; deriving motion information of the current block based on the prediction-related information; deriving prediction samples of the current block based on the motion information; deriving residual samples of the current block based on the residual information; and generating a reconstructed picture based on the prediction samples and the residual samples.
[0010] According to another embodiment of the present disclosure, a decoding device for performing image decoding is provided. The decoding device includes: an entropy decoder configured to obtain prediction-related information of a current block, obtain a dependent quantization enable flag for enabling dependent quantization, obtain a transform skip residual coding (TSRC) enable flag for enabling TSRC based on the dependent quantization enable flag, and obtain residual information of a residual coding syntax of the current block derived based on the TSRC enable flag; a predictor configured to derive motion information of the current block based on the prediction-related information, and derive prediction samples of the current block based on the motion information; a residual processor configured to derive residual samples of the current block based on the residual information; and an adder configured to generate a reconstructed picture based on the prediction samples and the residual samples.
[0011] According to another embodiment of the present disclosure, a video encoding method performed by an encoding device is provided. The method includes the following steps: deriving a prediction sample of a current block based on inter-frame prediction; encoding prediction-related information of the current block; encoding a dependent quantization enable flag for enabling dependent quantization; encoding a transform skip residual coding (TSRC) enable flag for enabling TSRC based on the dependent quantization enable flag; determining a residual coding syntax of the current block based on the TSRC enable flag; encoding residual information of the determined residual coding syntax of the current block; and generating a bitstream including the prediction-related information, the dependent quantization enable flag, the TSRC enable flag, and the residual information.
[0012] According to another embodiment of the present disclosure, a video encoding device is provided. The encoding device includes: a predictor configured to derive prediction samples of a current block based on inter-frame prediction; and an entropy encoder configured to encode prediction-related information of the current block, encode a dependent quantization enable flag for enabling dependent quantization, encode a transform skip residual coding (TSRC) enable flag for enabling TSRC based on the dependent quantization enable flag, determine a residual coding syntax of the current block based on the TSRC enable flag, encode residual information of the determined residual coding syntax of the current block, and generate a bitstream including the prediction-related information, the dependent quantization enable flag, the TSRC enable flag, and the residual information.
[0013] According to another embodiment of the present disclosure, a non-transitory computer-readable storage medium storing a bitstream including image information enabling execution of an image decoding method is provided. In the non-transitory computer-readable storage medium, the image decoding method includes the following steps: obtaining prediction-related information of a current block; obtaining a dependent quantization enable flag for enabling dependent quantization; obtaining a transform skip residual coding (TSRC) enable flag for enabling TSRC based on the dependent quantization enable flag; obtaining residual information of a residual coding syntax of the current block derived based on the TSRC enable flag; deriving motion information of the current block based on the prediction-related information; deriving prediction samples of the current block based on the motion information; deriving residual samples of the current block based on the residual information; and generating a reconstructed picture based on the prediction samples and the residual samples.
[0014] Technical Effects
[0015] According to the present disclosure, the efficiency of image encoding performed based on inter-frame prediction and / or residual encoding can be improved.
[0016] According to the present disclosure, residual coding efficiency can be enhanced.
[0017] According to the present disclosure, a signaling relationship between a dependent quantization enable flag and a TSRC enable flag is established, and if dependent quantization is not enabled, the TSRC enable flag can be signaled, and by doing so, if TSRC is not enabled and the RRC syntax is encoded for the transform skip block, dependent quantization is not used, so that the coding efficiency is improved, and the overall residual coding efficiency can be improved by reducing the amount of encoded bits.
[0018] According to the present disclosure, the TSRC enable flag is signaled only when dependent quantization is not used, and by doing so, the encoding of the RRC syntax and the use of dependent quantization for the transform skip block do not overlap with each other, and the TSRC enable flag is encoded more efficiently, so the bit amount can be reduced and the overall residual coding efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 An example of a video / image encoding device to which the embodiments of the present disclosure are applicable is briefly illustrated.
[0020] Figure 2 is a schematic diagram illustrating a configuration of a video / image encoding device to which an embodiment of the present disclosure can be applied.
[0021] Figure 3 FIG. 1 is a schematic diagram illustrating a configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.
[0022] Figure 4 An example of a video / image encoding method based on inter-frame prediction is illustrated.
[0023] Figure 5 An example of a video / image decoding method based on inter-frame prediction is illustrated.
[0024] Figure 6 The inter-frame prediction process is schematically illustrated.
[0025] Figure 7 Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements is exemplified.
[0026] Figure 8 is a diagram illustrating exemplary transform coefficients within a 4×4 block.
[0027] Figure 9 A scalar quantizer used in dependent quantization is exemplarily illustrated.
[0028] Figure 10 State transitions and quantizer selection for dependent quantization are exemplarily illustrated.
[0029] Figure 11 The image encoding method performed by the encoding device according to this document is schematically shown.
[0030] Figure 12 A coding device for performing the image coding method according to the present document is schematically shown.
[0031] Figure 13 The figure schematically shows an image decoding method performed by a decoding device according to the present document.
[0032] Figure 14 A decoding device for performing the image decoding method according to the present document is schematically shown.
[0033] Figure 15 A structural diagram of a content streaming system to which the present disclosure is applied is illustrated. DETAILED DESCRIPTION
[0034] The present disclosure can be modified in various forms, and its specific embodiments will be described and illustrated in the accompanying drawings. However, these embodiments are not intended to limit the present disclosure. The terms used in the following description are only used to describe specific embodiments and are not intended to limit the present disclosure. Singular expressions include plural expressions as long as they are clearly read out differently. Terms such as "including" and "having" are intended to indicate the presence of features, numbers, steps, operations, elements, components, or combinations thereof used in the following description, so it should be understood that there is no possibility of excluding the presence or addition of one or more different features, numbers, steps, operations, elements, components, or combinations thereof.
[0035] In addition, for the purpose of conveniently illustrating different specific functions, the elements in the figures described in this disclosure are drawn independently, which does not mean that these elements are implemented by independent hardware or independent software. For example, two or more of these elements can be combined to form a single element, or an element can be divided into multiple elements. Without departing from the concept of the present disclosure, embodiments in which elements are combined and / or divided belong to the present disclosure.
[0036] Hereinafter, the embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. In addition, in the entire drawings, like reference numerals are used to indicate like elements, and the same description of the like elements will be omitted.
[0037] Figure 1 An example of a video / image encoding device to which the embodiments of the present disclosure can be applied is briefly illustrated.
[0038] Reference Figure 1 The video / image coding system may include a first device (source device) and a second device (receiver). The source device may send coded video / image information or data to the receive device in the form of a file or stream via a digital storage medium or a network.
[0039] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display, and the display may be configured as a separate device or an external component.
[0040] The video source can obtain the video / image through a process of capturing, synthesizing, or generating the video / image. The video source may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generation device may include, for example, a computer, a tablet computer, and a smartphone, and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capture process may be replaced by a process of generating relevant data.
[0041] An encoding device can encode an input video / image. The encoding device can perform a series of processes such as prediction, transformation, and quantization to achieve compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0042] The transmitter can transmit the encoded image / image information or data in the form of a bitstream to a receiver of a receiving device via a digital storage medium or network in the form of a file or stream. Digital storage media can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter can include components for generating a media file in a predetermined file format and can also include components for transmitting via a broadcast / communication network. The receiver can receive / extract the bitstream and transmit the received bitstream to a decoding device.
[0043] The decoding device may decode the video / image by performing a series of processes such as dequantization, inverse transformation, and prediction corresponding to the operations of the encoding device.
[0044] The renderer can render the decoded video / image, and the rendered video / image can be displayed on a display.
[0045] The present disclosure relates to video / image coding. For example, the methods / implementations disclosed in the present disclosure may be applied to methods disclosed in the Versatile Video Coding (VVC), EVC (Essential Video Coding) standard, the AOMedia Video 1 (AV1) standard, the second-generation Audio Video Coding standard (AVS2), or next-generation video / image coding standards (e.g., H.267 or H.268, etc.).
[0046] The present disclosure proposes various embodiments of video / image encoding, and unless otherwise mentioned, these embodiments may be performed in combination with each other.
[0047] In the present disclosure, video may refer to a series of images over time. A picture generally refers to a unit that represents an image in a specific time region, and a sub-picture / slice / tile is a unit that constitutes a part of a picture when encoded. A sub-picture / slice / tile may include one or more coding tree units (CTUs). A picture may consist of one or more sub-pictures / slices / tiles. A picture may consist of one or more tile groups. A tile group may include one or more tiles. A brick may represent a rectangular area of a CTU row within a tile in a picture. A tile may be divided into multiple bricks, each of which consists of one or more CTU rows within the tile. A tile that is not divided into multiple bricks may also be referred to as a brick. Brick scanning is a specific ordering of the CTUs of a divided picture as follows: sorting the CTUs by raster scanning of the CTUs in the bricks, continuously sorting the bricks within the tile by raster scanning of the bricks of the tile, and continuously sorting the tiles in the picture by raster scanning of the tiles of the picture. In addition, a sub-picture may represent a rectangular area of one or more slices within a picture. That is, a sub-picture contains one or more slices that together cover a rectangular area of a picture. A tile is a rectangular area of a CTU within a specific tile column and a specific tile row in a picture. A tile column is a rectangular area of a CTU whose height is equal to the height of the picture and whose width is specified by a syntax element in the picture parameter set. A tile row is a rectangular area of a CTU whose height is specified by a syntax element in the picture parameter set and whose width is equal to the picture width. Tile scanning is a specific sequential ordering of the CTUs of a partitioned picture in which the CTUs are sequentially ordered by a raster scan of the CTUs in the tiles and the tiles in the picture are sequentially ordered by a raster scan of the tiles of the picture. A slice comprises an integer number of tiles of a picture that can be exclusively contained in a single NAL unit. A slice may consist of either a plurality of complete tiles or a continuous sequence of complete tiles of only one tile. In the present disclosure, tile groups and slices may be used interchangeably. For example, in the present disclosure, a tile group / tile group header may be referred to as a slice / slice header.
[0048] A pixel or a picture element (pel) may refer to the smallest unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luminance component, or only a pixel / pixel value of a chrominance component.
[0049] A unit may represent a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. A unit may include a luma block and two chroma (e.g., CB, CR) blocks. In some cases, terms such as unit and block or region may be used interchangeably. In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients.
[0050] In this specification, "A or B" may mean "only A", "only B", or "both A and B". In other words, in this specification, "A or B" may be interpreted as "A and / or B". For example, "A, B, or C" herein means "only A", "only B", "only C", or "any one of A, B, and C and any combination thereof".
[0051] A slash mark ( / ) or a comma (,) used in this specification may mean "and / or". For example, "A / B" may mean "A and / or B". Accordingly, "A / B" may mean "only A", "only B", or "both A and B". For example, "A, B, C" may mean "A, B, or C".
[0052] In this specification, “at least one of A and B” may mean “only A”, “only B”, or “both A and B”. In addition, in this specification, the expression “at least one of A or B” or “at least one of A and / or B” may be interpreted as the same as “at least one of A and B”.
[0053] In addition, in this specification, "at least one of A, B, and C" means "only A", "only B", "only C", or "any combination of A, B, and C". In addition, "at least one of A, B, or C" or "at least one of A, B, and / or C" may mean "at least one of A, B, and C".
[0054] In addition, the brackets used in this specification may mean "for example." Specifically, when "prediction (intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra-frame prediction," and "intra-frame prediction" may be proposed as an example of "prediction." In addition, even when "prediction (i.e., intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction."
[0055] In this specification, technical features described individually in one drawing may be implemented individually or may be implemented simultaneously.
[0056] The following figures are created to illustrate specific examples of this specification. Since the names of specific devices or the names of specific signals / messages / fields described in the figures are provided by way of example, the technical features of this specification are not limited to the specific names used in the following figures.
[0057] Figure 2 1 is a schematic diagram illustrating a configuration of a video / image encoding device to which an embodiment of the present disclosure can be applied. Hereinafter, a video encoding device may include an image encoding device.
[0058] Reference Figure 2 , the encoding device 200 includes an image segmenter 210, a predictor 220, a residual processor 230 and an entropy encoder 240, an adder 250, a filter 260 and a memory 270. The predictor 220 may include an inter-frame predictor 221 and an intra-frame predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, an inverse quantizer 234 and an inverse transformer 235. The residual processor 230 may also include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. According to an embodiment, the image segmenter 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250 and the filter 260 may be composed of at least one hardware component (e.g., an encoder chipset or processor). In addition, the memory 270 may include a decoded picture buffer (DPB) or may be composed of a digital storage medium. The hardware components may also include the memory 270 as an internal / external component.
[0059] The image splitter 210 can split the input image (or picture or frame) input to the encoding device 200 into one or more processors. For example, the processor can be referred to as a coding unit (CU). In this case, the coding unit can be recursively split from the coding tree unit (CTU) or the largest coding unit (LCU) according to the quadtree binary tree ternary tree (QTBTTT) structure. For example, a coding unit can be split into multiple coding units of deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quadtree structure can be applied first, and then the binary tree structure and / or ternary structure can be applied. Alternatively, the binary tree structure can be applied first. The encoding process according to the present disclosure can be performed based on the final coding unit that is no longer split. In this case, the maximum coding unit can be used as the final coding unit based on coding efficiency according to image characteristics, or if necessary, the coding unit can be recursively split into coding units of deeper depth and the coding unit with the optimal size can be used as the final coding unit. Here, the encoding process may include prediction, transformation, and reconstruction processes, which will be described later. As another example, the processor may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be separated or partitioned from the final coding unit. The prediction unit may be a unit for 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.
[0060] In some cases, the term "unit" may be used interchangeably with terms such as "block" or "region." In general, an M×N block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or pixel value, and may represent only the pixel / pixel value of the luma component or only the pixel / pixel value of the chroma component. A sample may be used as a term corresponding to a picture (or image) of pixels or picture elements.
[0061] In the encoding device 200, the prediction signal (prediction block, prediction sample array) output from the inter-frame predictor 221 or the intra-frame predictor 222 is subtracted from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is sent to the transformer 232. In this case, as shown in the figure, the unit in the encoding device 200 for subtracting the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) can be referred to as a subtractor 231. The predictor can perform prediction on a block to be processed (hereinafter referred to as the current block) and generate a prediction block including prediction samples for the current block. The predictor can determine whether to apply intra-frame prediction or inter-frame prediction based on the current block or CU. As described later in the description of each prediction mode, the predictor can generate various information related to the prediction, such as prediction mode information, and send the generated information to the entropy encoder 240. The information about the prediction can be encoded in the entropy encoder 240 and output in the form of a bitstream.
[0062] The intra-frame predictor 222 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the referenced samples can be located near the current block or can be far away from the current block. In intra-frame prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. The non-directional mode can include, for example, a DC mode and a planar mode. Depending on the level of detail of the prediction direction, the directional mode can include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes can be used depending on the settings. The intra-frame predictor 222 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
[0063] The inter-frame predictor 221 can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector in a reference picture. To reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted on a block, sub-block, or sample basis based on the correlation of motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can also include information about the inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter-frame prediction, neighboring blocks can include spatially neighboring blocks in the current picture and temporally neighboring blocks in a reference picture. The reference picture containing the reference block and the reference picture containing the temporally neighboring block can be the same or different. Temporally neighboring blocks can be referred to as collocated reference blocks, collocated CUs (colCUs), etc., and the reference picture containing temporally neighboring blocks can be referred to as collocated pictures (colPics). For example, the inter-frame predictor 221 can configure a motion information candidate list based on the neighboring blocks and generate information indicating which candidate to use to derive the motion vector and / or reference picture index for the current block. Inter-frame prediction can be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter-frame predictor 221 can use the motion information of the neighboring block as the motion information of the current block. In skip mode, unlike merge mode, it may not be possible to send a residual signal. 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.
[0064] The predictor 220 can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra prediction or inter prediction to predict a block, but also apply both intra prediction and inter prediction at the same time. This can be called inter-frame intra-frame combined prediction (CIIP). In addition, the predictor can predict the block based on the intra block copy (IBC) prediction mode or palette mode. The IBC prediction mode or palette mode can be used for content image / video coding of games, etc., such as screen content coding (SCC). IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction because the reference block is derived in the current picture. That is, IBC can use at least one of the inter prediction techniques described in this disclosure. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, the sample value within the picture can be signaled based on information about the palette table and the palette index.
[0065] The prediction signal generated by the predictor (including the inter-frame predictor 221 and / or the intra-frame predictor 222) can be used to generate a reconstruction signal or to generate a residual signal. The transformer 232 can generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is represented by a graph. CNT refers to a transform generated based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process can be applied to square pixel blocks of the same size, or can be applied to blocks of variable size other than square.
[0066] The quantizer 233 can quantize the transform coefficients and send them to the entropy encoder 240, which can encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients can be called residual information. The quantizer 233 can rearrange the block-type quantized transform coefficients into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. Information about the transform coefficients can be generated. The entropy encoder 240 can perform various encoding methods, such as, for example, exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 240 can encode information required for video / image reconstruction (e.g., syntax element values, etc.) in addition to the quantized transform coefficients, together or separately. The encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in units of NAL (Network Abstraction Layer). The video / image information may also include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). Furthermore, the video / image information may also include general constraint information. In the present disclosure, information and / or syntax elements transmitted / signaled from the encoding device to the decoding device may be included in the video / image information. The video / image information may be encoded through the above-described encoding process and included in the bitstream. The bitstream may be transmitted over a network or stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits the signal output from the entropy encoder 240 and / or a storage unit (not shown) that stores the signal may be included as internal / external elements of the encoding device 200, and alternatively, the transmitter may be included in the entropy encoder 240.
[0067] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients using the inverse quantizer 234 and the inverse transformer 235. The adder 250 adds the reconstructed residual signal to the prediction signal output from the inter-frame predictor 221 or the intra-frame predictor 222 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If the block to be processed has no residual (such as when skip mode is applied), the prediction block can be used as a reconstructed block. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture through filtering as described below.
[0068] Furthermore, during picture encoding and / or reconstruction, luma mapping and chroma scaling (LMCS) may be applied.
[0069] The filter 260 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 270 (specifically, the DPB of the memory 270). Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various information related to filtering and send the generated information to the entropy encoder 240, as described later in the description of various filtering methods. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bit stream.
[0070] The modified reconstructed picture sent to the memory 270 may be used as a reference picture in the inter-frame predictor 221. When inter-frame prediction is applied by the encoding apparatus, prediction mismatch between the encoding apparatus 200 and the decoding apparatus may be avoided, and encoding efficiency may be improved.
[0071] The DPB of the memory 270 may store a modified reconstructed picture used as a reference picture in the inter-frame predictor 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a reconstructed block in the picture. The stored motion information may be sent to the inter-frame predictor 221 and used as motion information of spatially neighboring blocks or motion information of temporally neighboring blocks. The memory 270 may store reconstructed samples of a reconstructed block in the current picture and may transmit the reconstructed samples to the intra-frame predictor 222.
[0072] Figure 3 FIG. 1 is a schematic diagram illustrating a configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.
[0073] Reference Figure 3 , the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter-frame predictor 332 and an intra-frame predictor 331. The residual processor 320 may include an inverse quantizer 321 and an inverse transformer 322. According to an embodiment, the entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be composed of hardware components (e.g., a decoder chipset or processor). In addition, the memory 360 may include a decoded picture buffer (DPB) or may be composed of a digital storage medium. The hardware components may also include the memory 360 as an internal / external component.
[0074] When a bit stream including video / image information is input, the decoding device 300 can be used with Figure 2 The image is reconstructed accordingly to the processing of the video / image information in the encoding device. For example, the decoding device 300 can derive the unit / block based on the block segmentation related information obtained from the bit stream. The decoding device 300 can perform decoding using a processor applied in the encoding device. Therefore, the decoding processor can be, for example, a coding unit, and the coding unit can be divided from the coding tree unit or the maximum coding unit according to the quadtree structure, the binary tree structure and / or the ternary tree structure. One or more transform units can be derived from the coding unit. The reconstructed image signal decoded and output by the decoding device 300 can be reproduced by a reproduction device.
[0075] The decoding device 300 can receive the data in the form of a bit stream from Figure 2The signal output by the encoding device of the encoding device can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information required for image reconstruction (or picture reconstruction) (for example, video / image information). The video / image information may also include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The signaled / received information and / or syntax elements described later in this disclosure can be decoded through a decoding process and obtained from the bitstream. For example, the entropy decoder 310 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs syntax elements required for image reconstruction and quantized values of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method can receive a bin corresponding to each syntax element in the bitstream, use the decoding target syntax element information, the decoding information of the decoding target block, or the information of the symbol / bin decoded in the previous stage to determine the context model, and arithmetically decode the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, after determining the context model, the CABAC entropy decoding method can update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bin. The information related to prediction among the information decoded by the entropy decoder 310 can be provided to the predictor (inter-frame predictor 332 and intra-frame predictor 331), and the residual value (that is, quantized transform coefficient and related parameter information) on which entropy decoding is performed in the entropy decoder 310 can be input to the residual processor 320. The residual processor 320 can derive a residual signal (residual block, residual sample, residual sample array). In addition, the information about filtering among the information decoded by the entropy decoder 310 can be provided to the filter 350. In addition, a receiver (not shown) for receiving a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiver may be a component of the entropy decoder 310. In addition, the decoding device according to the present disclosure may be referred to as a video / image / picture decoding device, and the decoding device may be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoder 310, and the sample decoder may include at least one of the inverse quantizer 321, the inverse transformer 322, the adder 340, the filter 350, the memory 360, the inter-frame predictor 332, and the intra-frame predictor 331.
[0076] The inverse quantizer 321 can dequantize the quantized transform coefficients and output the transform coefficients. The inverse quantizer 321 can rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement can be performed based on the coefficient scanning order performed in the encoding device. The inverse quantizer 321 can dequantize the quantized transform coefficients by using quantization parameters (e.g., quantization step size information) and obtain transform coefficients.
[0077] The inverse transformer 322 performs an inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0078] The predictor may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block based on the information on prediction output from the entropy decoder 310, and may determine a specific intra / inter prediction mode.
[0079] The predictor can generate a prediction signal based on the various prediction methods described below. For example, the predictor can not only apply intra prediction or inter prediction to predict a block, but also apply intra prediction and inter prediction at the same time. This can be called inter and intra combined prediction (CIIP). In addition, the predictor can predict the block based on the intra block copy (IBC) prediction mode or palette mode. The IBC prediction mode or palette mode can be used for content image / video encoding of games, etc., for example, screen content coding (SCC). IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction because the reference block is derived in the current picture. That is, IBC can use at least one of the inter prediction techniques described in this disclosure. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, the sample value within the picture can be signaled based on information about the palette table and the palette index.
[0080] The intra-frame predictor 331 can predict the current block by referencing samples in the current picture. Depending on the prediction mode, the referenced samples may be located near the current block or may be located far away from the current block. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. The intra-frame predictor 331 may determine the prediction mode to be applied to the current block by using the prediction modes applied to the neighboring blocks.
[0081] The inter-frame predictor 332 can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector in a reference picture. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include information on the inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. For example, the inter-frame predictor 332 may configure a motion information candidate list based on the neighboring blocks and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter-frame prediction can be performed based on various prediction modes, and the prediction information may include information indicating the inter-frame prediction mode for the current block.
[0082] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 332 and / or the intra-frame predictor 331). If the block to be processed has no residual (for example, when skip mode is applied), the prediction block can be used as the reconstructed block.
[0083] The adder 340 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra-frame prediction of the next block to be processed in the current picture, may be output through filtering as described below, or may be used for inter-frame prediction of the next picture.
[0084] In addition, luma mapping and chroma scaling (LMCS) can be applied during picture decoding.
[0085] The filter 350 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed image by applying various filtering methods to the reconstructed image, and store the modified reconstructed image in the memory 360 (specifically, the DPB of the memory 360). Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0086] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter-frame predictor 332. The memory 360 can store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the reconstructed block in the picture. The stored motion information can be sent to the inter-frame predictor 332 to be used as the motion information of the spatially neighboring block or the motion information of the temporally neighboring block. The memory 360 can store the reconstructed samples of the reconstructed block in the current picture and can transmit the reconstructed samples to the intra-frame predictor 331.
[0087] In the present disclosure, the embodiments described in the filter 260, the inter-frame predictor 221, and the intra-frame predictor 222 of the encoding device 200 may be the same as the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300 or may be applied to correspond to the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300, respectively. The same contents can also be applied to the inter-frame predictor 332 and the intra-frame predictor 331.
[0088] In the present disclosure, at least one of quantization / inverse quantization and / or transform / inverse transform may be omitted. When quantization / inverse quantization is omitted, the quantized transform coefficient may be referred to as a transform coefficient. When transform / inverse transform is omitted, the transform coefficient may be referred to as a coefficient or a residual coefficient, or, for uniformity of expression, may still be referred to as a transform coefficient.
[0089] In the present disclosure, quantized transform coefficients and transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, residual information may include information about the transform coefficients, and information about the transform coefficients may be signaled via residual coding syntax. Transform coefficients may be derived based on the residual information (or information about the transform coefficients), and scaled transform coefficients may be derived by inversely transforming (scaling) the transform coefficients. Residual samples may be derived based on inversely transforming (transforming) the scaled transform coefficients. This may also be applied / expressed in other parts of the present disclosure.
[0090] In addition, as described above, when performing video encoding, prediction is performed to improve compression efficiency. In this way, a prediction block including prediction samples for the current block can be generated as a block to be encoded (i.e., an encoding target block). Here, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block is derived in the same manner in the encoding device and the decoding device, and the encoding device can signal information about the residual between the original block and the prediction block (residual information) instead of the original sample value of the original block to the decoding device, thereby improving image coding efficiency. The decoding device can derive a residual block including residual samples based on the residual information, add the residual block and the prediction block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.
[0091] Residual information can be generated through a transformation and quantization process. For example, the encoding device can derive a residual block between the original block and the prediction block, can perform a transformation process on the residual samples (residual sample array) included in the residual block to derive a transform coefficient, can perform a quantization process on the transform coefficient to derive a quantized transform coefficient, and can signal the relevant residual information (through a bitstream) to the decoding device. Here, the residual information may include value information, position information, transform technology, transform kernel, and quantization parameter value information of the quantized transform coefficient. The decoding device can perform a dequantization / inverse transform process based on the residual information and derive residual samples (or residual blocks). The decoding device can generate a reconstructed picture based on the prediction block and the residual block. In addition, for reference for inter-frame prediction of a reference picture later, the encoding device can dequantize / inverse transform the quantized transform coefficient to derive a residual block, and generate a reconstructed picture based on this.
[0092] When inter-frame prediction is applied, the predictor of the encoding / decoding device can derive prediction samples by performing inter-frame prediction on a block-by-block basis. When performing prediction on the current block, inter-frame prediction can be applied. That is, the predictor of the encoding / decoding device (more specifically, the inter-frame predictor) can derive prediction samples by performing inter-frame prediction on a block-by-block basis. Inter-frame prediction can refer to a prediction derived by a method that depends on data elements (e.g., sample values or motion information) of a picture other than the current picture. When inter-frame prediction is applied to the current block, the prediction block (prediction sample array) of the current block can be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, the motion information of the current block can be predicted on a block, sub-block, or sample basis based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include information on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). When inter-frame prediction is applied, neighboring blocks may include spatially neighboring blocks in the current picture and temporally neighboring blocks in the reference picture. The reference picture comprising the reference block and the reference picture comprising the temporally neighboring block may be the same or different. The temporally neighboring block may be referred to as a collocated reference block, collocated CU (colCU), etc., and the reference picture comprising the temporally neighboring block may be referred to as a collocated picture (colPic). For example, a motion information candidate list may be configured based on the neighboring blocks of the current block, and a flag or index information indicating which candidate is selected (used) for deriving the motion vector and / or reference picture index of the current block may be signaled. Inter-frame prediction can be performed based on various prediction modes. For example, in skip mode and merge mode, the motion information of the current block may be the same as that of the selected neighboring block. In skip mode, a residual signal may not be transmitted as in merge mode. In motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and the motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.
[0093] Depending on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), the motion information may further include L0 motion information and / or L1 motion information. The L0 direction motion vector may be referred to as the L0 motion vector or MVL0, and the L1 direction motion vector may be referred to as the L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as L0 prediction, prediction based on the L1 motion vector may be referred to as L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be referred to as bi-prediction. Here, the L0 motion vector may indicate a motion vector associated with the reference picture list L0, and the L1 motion vector may indicate a motion vector associated with the reference picture list L1. The reference picture list L0 may include pictures that precede the current picture in output order, and the reference picture list L1 may include pictures that follow the current picture in output order as reference pictures. The previous picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. The reference picture list L0 may further include pictures that follow the current picture in output order as reference pictures. In this case, the previous picture in the reference picture list L0 may be indexed first, and then the subsequent picture may be indexed. The reference picture list L1 may further include pictures preceding the current picture in the output order as reference pictures. In this case, the subsequent picture in the reference picture list L1 may be indexed first, and then the previous picture may be indexed. Here, the output order may correspond to the picture order count (POC) order.
[0094] The video / image encoding process based on inter-frame prediction may schematically include, for example, the following contents.
[0095] Figure 4 An example of a video / image encoding method based on inter-frame prediction is illustrated.
[0096] The encoding device performs inter-frame prediction on the current block (S400). The encoding device may derive an inter-frame prediction mode and motion information for the current block, and generate prediction samples for the current block. Here, the inter-frame prediction mode determination process, the motion information derivation process, and the prediction sample generation process may be performed simultaneously, and any one process may be performed earlier than the other. For example, the inter-frame prediction unit of the encoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit may determine a prediction mode for the current block, the motion information derivation unit may derive motion information for the current block, and the prediction sample derivation unit may derive prediction samples for the current block. For example, the inter-frame prediction unit of the encoding device may search for a block similar to the current block in a predetermined area (search area) of a reference picture through motion estimation, and derive a reference block having a minimum difference with the current block or equal to or less than a predetermined criterion. Based on this derivation, a reference picture index of the reference picture in which the reference block is located may be indicated, and a motion vector may be derived based on the position difference between the reference block and the current block. The encoding device may determine a mode to apply to the current block from among various prediction modes. The encoding apparatus may compare RD costs of various prediction modes and determine an optimal prediction mode for the current block.
[0097] For example, when skip mode or merge mode is applied to the current block, the encoding device may configure a merge candidate list to be described below and derive a reference block whose difference with the current block is the smallest or equal to or less than a predetermined standard among the reference blocks indicated by the merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and signaled to the decoding device. The motion information of the current block may be derived by using the motion information of the selected merge candidate.
[0098] As another example, when the (A)MVP mode is applied to the current block, the encoding device may configure an (A)MVP candidate list to be described below, and use the motion vector of a selected MVP candidate among the motion vector predictor (MVP) candidates included in the (A)MVP candidate list as the MVP of the current block. In this case, for example, a motion vector indicating a reference block derived by motion estimation may be used as the motion vector of the current block, and the MVP candidate having the motion vector with the minimum difference from the motion vector of the current block among the MVP candidates may become the selected MVP candidate. A motion vector difference (MVD) may be derived, which is the difference obtained by subtracting the MVP from the motion vector of the current block. In this case, information about the MVD may be signaled to the decoding device. In addition, when the (A)MVP mode is applied, the value of the reference picture index may be configured as reference picture index information and signaled separately to the decoding device.
[0099] The encoding apparatus may induce residual samples based on the prediction samples (S410). The encoding apparatus may induce residual samples by comparing original samples and prediction samples of the current block.
[0100] The encoding device encodes the image information including prediction information and residual information (S420). The encoding device can output the encoded image information in the form of a bitstream. The prediction information may include information about prediction mode information (e.g., a skip flag, a merge flag, or a mode index, etc.) and information about motion information as information related to the prediction process. The information about the motion information may include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index), which is information for deriving a motion vector. In addition, the information about the motion information may include information about MVD and / or reference picture index information. In addition, the information about the motion information may include information indicating whether L0 prediction, L1 prediction, or dual prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficients used for the residual sample.
[0101] The output bitstream may be stored in a (digital) storage medium and transmitted to the decoding device, or transmitted to the decoding device via a network.
[0102] In addition, as described above, the encoding device can generate a reconstructed picture (including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples. This is to derive the same prediction result as the prediction result performed by the decoding device, and as a result, the encoding efficiency can be improved. Therefore, the encoding device can store the reconstructed picture (or reconstructed sample or reconstructed block) in a memory and use the reconstructed picture as a reference picture. As described above, the in-loop filtering process can be further applied to the reconstructed picture.
[0103] The video / image decoding process based on inter-frame prediction may schematically include, for example, the following.
[0104] Figure 5 An example of a video / image decoding method based on inter-frame prediction is illustrated.
[0105] Reference Figure 5 , the decoding device may perform an operation corresponding to the operation performed by the encoding device. The decoding device may perform prediction on the current block based on the received prediction information and derive a prediction sample.
[0106] Specifically, the decoding apparatus may determine a prediction mode of the current block based on the received prediction information (S500).The decoding apparatus may determine which inter prediction mode to apply to the current block based on prediction mode information in the prediction information.
[0107] For example, whether merge mode or (A)MVP mode is applied to the current block may be determined based on a merge flag. Alternatively, one of various inter-prediction mode candidates may be selected based on a mode index. Inter-prediction mode candidates may include skip mode, merge mode, and / or (A)MVP mode, or may include various inter-prediction modes described below.
[0108] The decoding device derives the motion information of the current block based on the determined inter-frame prediction mode (S510). For example, when the skip mode or merge mode is applied to the current block, the decoding device can configure a merge candidate list to be described below and select a merge candidate from among the merge candidates included in the merge candidate list. Here, the selection can be performed based on the selection information (merge index). The motion information of the current block can be derived by using the motion information of the selected merge candidate. The motion information of the selected merge candidate can be used as the motion information of the current block.
[0109] As another example, when the (A)MVP mode is applied to the current block, the decoding device may configure an (A)MVP candidate list to be described below, and use the motion vector of the selected MVP candidate among the motion vector predictor (MVP) candidates included in the (A)MVP candidate list as the MVP of the current block. Here, the selection may be performed based on selection information (MVP flag or MVP index). In this case, the MVD of the current block may be derived based on information about the MVD, and the motion vector of the current block may be derived based on the MVP and MVD of the current block. In addition, the reference picture index of the current block may be derived based on reference picture index information. The picture indicated by the reference picture index in the reference picture list for the current block may be derived as the reference picture referenced by the inter-frame prediction of the current block.
[0110] In addition, as described below, the motion information of the current block can be derived without the candidate list configuration, and in this case, the motion information of the current block can be derived according to the process disclosed in the prediction mode. In this case, the candidate list configuration can be omitted.
[0111] The decoding device may generate prediction samples for the current block based on the motion information of the current block (S520). In this case, a reference picture may be derived based on a reference picture index of the current block, and the prediction samples of the current block may be derived by using samples of the reference block indicated by the motion vector of the current block on the reference picture. In this case, in some cases, a prediction sample filtering process may be further performed for all or some prediction samples of the current block.
[0112] For example, the inter-frame prediction unit of the decoding device may include a prediction mode determination unit, a motion information derivation unit and a prediction sample derivation unit, and the prediction mode determination unit may determine the prediction mode for the current block based on the received prediction mode information, the motion information derivation unit may derive the motion information (motion vector and / or reference picture index) of the current block based on the information about the received motion information, and the prediction sample derivation unit may derive the prediction sample of the current block.
[0113] The decoding device generates residual samples for the current block based on the received residual information (S530). The decoding device may generate reconstructed samples for the current block based on the predicted samples and the residual samples, and generate a reconstructed picture based on the generated reconstructed samples (S540). Thereafter, as described above, the in-loop filtering process may be further applied to the reconstructed picture.
[0114] Figure 6 The inter-frame prediction process is schematically illustrated.
[0115] Reference Figure 6 As described above, the inter-frame prediction process may include an inter-frame prediction mode determination step, a motion information derivation step based on the determined prediction mode, and a prediction processing (prediction sample generation) step based on the deduced motion information. The inter-frame prediction process may be performed by the encoding device and decoding device described above. In this article, the encoding device may include an encoding device and / or a decoding device.
[0116] Reference Figure 6 , the encoding device determines the inter-frame prediction mode of the current block (S600). Various inter-frame prediction modes can be used for the prediction of the current block in the picture. For example, various modes such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, merge with MVD (MMVD) mode and historical motion vector prediction (HMVP) mode can be used. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, dual prediction with CU-level weights (BCW) and bidirectional optical flow (BDOF) can be further used as additional modes. Affine mode can also be referred to as affine motion prediction mode. MVP mode can also be referred to as advanced motion vector prediction (AMVP) mode. In this article, some modes and / or motion information candidates derived from some modes can also be included in one of the motion information-related candidates in other modes. For example, an HMVP candidate can be added to the merge candidate of the merge / skip mode, or to the MVP candidate of the MVP mode. If an HMVP candidate is used as a motion information candidate for merge mode or skip mode, the HMVP candidate may be referred to as an HMVP merge candidate.
[0117] Prediction mode information indicating the inter-frame prediction mode of the current block can be signaled from the encoding device to the decoding device. In this case, the prediction mode information can be included in the bitstream and received by the decoding device. The prediction mode information may include index information indicating one of a plurality of candidate modes. Alternatively, the inter-frame prediction mode may be indicated by hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, whether the skip mode is applied may be indicated by signaling a skip flag, and when the skip mode is not applied, whether the merge mode is applied may be indicated by signaling a merge flag, and when the merge mode is not applied, the MVP mode may be indicated or a flag for additional distinction may be further signaled. The affine mode may be signaled as an independent mode, or as a subordinate mode with respect to the merge mode or the MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.
[0118] The encoding apparatus derives motion information for a current block (S610). The motion information may be derived based on an inter prediction mode.
[0119] The encoding device can use the motion information of the current block to perform inter-frame prediction. The encoding device can derive the best motion information for the current block through a motion estimation process. For example, the encoding device can search for a similar reference block with high correlation in units of fractional pixels within a predetermined search range in the reference picture using the original block in the original picture for the current block, and derive motion information through the searched reference block. The similarity of the blocks can be derived based on the difference in sample values based on the phase. For example, the similarity of the blocks can be calculated based on the sum of absolute differences (SAD) between the current block (or the template of the current block) and the reference block (or the template of the reference block). In this case, the motion information can be derived based on the reference block with the smallest SAD in the search area. The derived motion information can be signaled to the decoding device according to various methods based on the inter-frame prediction mode.
[0120] The encoding device performs inter-frame prediction based on the motion information for the current block (S620). The encoding device can derive (one or more) prediction samples for the current block based on the motion information. The current block including the prediction samples can be referred to as a prediction block.
[0121] In addition, as described above, the encoding device can perform various encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). In addition, the decoding device can decode information in the bitstream based on the encoding method such as exponential Golomb, CAVLC, or CABAC, and output the value of the syntax element required for image reconstruction and the quantized value of the transform coefficient related to the residual.
[0122] For example, the above encoding method may be performed as follows.
[0123] Figure 7 Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements is exemplified. For example, in the CABAC encoding process, when the input signal is a syntax element rather than a binary value, the encoding device can convert the input signal into a binary value by binarizing the value of the input signal. In addition, when the input signal is already a binary value (i.e., when the value of the input signal is a binary value), binarization may not be performed and may be bypassed. Here, each binary number 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 bin for a syntax element may indicate the value of the syntax element.
[0124] Thereafter, the binarized bins of the syntax elements may be input to a conventional encoding engine or a bypass encoding engine. The conventional encoding engine of the encoding device may assign a context model reflecting a probability value to the corresponding bin and encode the corresponding bin based on the assigned context model. The conventional encoding engine of the encoding device may update the context model for each bin after encoding each bin. The bin encoded as described above may be referred to as a context-encoded bin.
[0125] In addition, when the binarized bins of the syntax elements are input to the bypass coding engine, they can be coded as follows. For example, the bypass coding engine of the encoding device omits the process of estimating the probability of the input bin and the process of updating the probability model applied to the bin after coding. When bypass coding is applied, the encoding device can encode the input bin by applying a uniform probability distribution instead of assigning a context model, thereby increasing the coding rate. The bin coded as described above can be referred to as a bypass bin.
[0126] Entropy decoding may mean a process of performing the same process as the above-described entropy encoding in reverse order.
[0127] For example, when decoding a syntax element based on a context model, the decoding device may receive a bin corresponding to the syntax element through a bitstream, determine the context model using the syntax element and decoded information of a decoding target block or a neighboring block, or information about a symbol / bin decoded in a previous stage, predict the occurrence probability of the received bin based on the determined context model, and perform arithmetic decoding on the bin to derive the value of the syntax element. Thereafter, the context model of the decoded bin may be updated using the determined context model.
[0128] Furthermore, for example, when a syntax element is bypass-decoded, the decoding device may receive a bin corresponding to the syntax element through a bitstream and decode the input bin by applying a uniform probability distribution. In this case, the process of deriving a context model for the syntax element and the process of updating the context model applied to the bin after decoding may be omitted.
[0129] As described above, the residual samples can be derived into quantized transform coefficients through transformation and quantization processing. The quantized transform coefficients can also be referred to as transform coefficients. In this case, the transform coefficients in the block can be signaled in the form of residual information. The residual information may include residual coding syntax. That is, the encoding device can configure the residual coding syntax using the residual information, encode it, and output it in the form of a bit stream, and the decoding device can decode the residual coding syntax from the bit stream and derive the residual (quantized) transform coefficients. The residual coding syntax may include syntax elements indicating whether a transform is applied to the corresponding block, the position of the last valid transform coefficient in the block, whether there is a valid transform coefficient in the sub-block, the size / sign of the valid transform coefficient, etc., as will be described later.
[0130] For example, syntax elements related to residual data encoding / decoding can be represented as shown in the following table.
[0131] [Table 1]
[0132]
[0133]
[0134]
[0135] transform_skip_flag indicates whether the transform is skipped in the associated block. transform_skip_flag can be a syntax element of the transform skip flag. The associated block can be a coding block (CB) or a transform block (TB). With respect to the transform (and quantization) and residual coding process, CB and TB can be used interchangeably. For example, as described above, residual samples can be derived for the CB, and the transform coefficients can be derived (quantized) by transforming and quantizing the residual samples, and through the residual coding process, information (e.g., syntax elements) that efficiently indicates the position, size, sign, etc. of the (quantized) transform coefficients can be generated and signaled. The quantized transform coefficients can be simply referred to as transform coefficients. Generally, when the CB is not larger than the maximum TB, the size of the CB can be the same as the size of the TB, and in this case, the target block to be transformed (and quantized) and residually encoded can be referred to as a CB or TB. In addition, when the CB is larger than the maximum TB, the target block to be transformed (and quantized) and residually encoded can be referred to as a TB. Hereinafter, signaling of syntax elements related to residual encoding in units of transform blocks (TBs) will be described, but this is an example and, as described above, TBs may be used interchangeably with coding blocks (CBs).
[0136] In addition, the syntax elements signaled after the transform skip flag is signaled may be the same as the syntax elements disclosed in Table 2 and / or Table 3 below, and a detailed description of the syntax elements is described below.
[0137] [Table 2]
[0138]
[0139]
[0140]
[0141]
[0142]
[0143] [Table 3]
[0144]
[0145]
[0146]
[0147] According to this embodiment, as shown in Table 1, residual coding can be divided according to the value of the syntax element transform_skip_flag of the transform skip flag. That is, based on the value of the transform skip flag (based on whether the transform is skipped), different syntax elements can be used for residual coding. The residual coding used when transform skip is not applied (i.e., when the transform is applied) can be referred to as regular residual coding (RRC), while the residual coding used when transform skip is applied (i.e., when the transform is not applied) can be referred to as transform skip residual coding (TSRC). In addition, regular residual coding can be referred to as general residual coding. In addition, regular residual coding can be referred to as a regular residual coding syntax structure, and transform skip residual coding can be referred to as a transform skip residual coding syntax structure. Table 2 above can show the syntax elements of residual coding when the value of transform_skip_flag is 0 (i.e., when the transform is applied), and Table 3 above can show the syntax elements of residual coding when the value of transform_skip_flag is 1 (i.e., when the transform is not applied).
[0148] Specifically, for example, a transform skip flag indicating whether the transform of the transform block is skipped may be parsed, and it may be determined whether the transform skip flag is 1. If the value of the transform skip flag is 0, as shown in Table 2, the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gtx_flag, par_level_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level for the residual coefficient of the transform block may be parsed, and the residual coefficient may be derived based on the syntax elements. In this case, the syntax elements may be parsed sequentially, and the parsing order may be changed. In addition, abs_level_gtx_flag may indicate abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n][0] may be an example of a first transform coefficient level flag (abs_level_gt1_flag), and abs_level_gtx_flag[n][1] may be an example of a second transform coefficient level flag (abs_level_gt3_flag).
[0149] Referring to Table 2 above, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level may be encoded / decoded. In addition, sb_coded_flag may be expressed as coded_sub_block_flag.
[0150] In an embodiment, the encoding device may encode the (x, y) position information of the last non-zero transform coefficient in the transform block based on the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. More specifically, last_sig_coeff_x_prefix represents the prefix of the column position of the last significant coefficient in the scan order within the transform block, last_sig_coeff_y_prefix represents the prefix of the row position of the last significant coefficient in the scan order within the transform block, last_sig_coeff_x_suffix represents the suffix of the column position of the last significant coefficient in the scan order within the transform block, and last_sig_coeff_y_suffix represents the suffix of the row position of the last significant coefficient in the scan order within the transform block. Here, the significant coefficient may represent a non-zero coefficient. In addition, the scanning order may be a right-angled diagonal scanning order. Alternatively, the scanning order may be a horizontal scanning order or a vertical scanning order. The scanning order may be determined based on whether intra prediction / inter prediction and / or a specific intra prediction / inter prediction mode is applied to a target block (CB or CB including a TB).
[0151] Thereafter, the encoding apparatus may divide the transform block into 4×4 sub-blocks, and then use a 1-bit syntax element coded_sub_block_flag for each 4×4 sub-block to indicate whether a non-zero coefficient exists in the current sub-block.
[0152] If the value of coded_sub_block_flag is 0, there is no more information to be sent, so the encoding device can terminate the encoding process of the current subblock. Conversely, if the value of coded_sub_block_flag is 1, the encoding device can continuously perform the encoding process on sig_coeff_flag. Since the subblock including the last non-zero coefficient does not need to encode coded_sub_block_flag and the subblock including DC information of the transform block has a high probability of including a non-zero coefficient, coded_sub_block_flag may not be encoded and its value may be assumed to be 1.
[0153] If the value of coded_sub_block_flag is 1 and it is therefore determined that there is a non-zero coefficient in the current sub-block, the encoding device may encode a sig_coeff_flag having a binary value according to the reverse scanning order. The encoding device may encode a 1-bit syntax element sig_coeff_flag for each transform coefficient according to the scanning order. If the value of the transform coefficient at the current scanning position is not 0, the value of sig_coeff_flag may be 1. Here, in the case of a sub-block including the last non-zero coefficient, sig_coeff_flag does not need to be encoded for the last non-zero coefficient, and thus the encoding process for the sub-block may be omitted. Level information encoding may be performed only when sig_coeff_flag is 1, and four syntax elements may be used in the level information encoding process. More specifically, each sig_coeff_flag[xC][yC] may indicate whether the level (value) of the corresponding transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero. In an embodiment, sig_coeff_flag may correspond to an example of a syntax element of a significant coefficient flag indicating whether a quantized transform coefficient is a non-zero significant coefficient.
[0154] The level value remaining after encoding sig_coeff_flag can be derived as shown in the following equation: That is, the syntax element remAbsLevel indicating the level value to be encoded can be derived from the following equation.
[0155] [Formula 1]
[0156] remAbsLevel=|coeff|-1
[0157] Herein, coeff means the actual transform coefficient value.
[0158] In addition, abs_level_gt1_flag may indicate whether the remAbsLevel' of the corresponding scanning position (n) is greater than 1. For example, when the value of abs_level_gt1_flag is 0, the absolute value of the transform coefficient at the corresponding position may be 1. In addition, when the value of abs_level_gt1_flag is 1, remAbsLevel indicating a level value to be encoded later may be updated as shown in the following equation.
[0159] [Formula 2]
[0160] remAbsLevel=remAbsLevel-1
[0161] In addition, the least significant coefficient (LSB) value of remAbsLevel described in the above-mentioned Equation 2 may be encoded through par_level_flag as in Equation 3 below.
[0162] [Formula 3]
[0163] par_level_flag=|coeff|&1
[0164] Herein, par_level_flag[n] may indicate the parity of the transform coefficient level (value) at the scanning position (n).
[0165] The transform coefficient level value remAbsLevel to be encoded after performing par_level_flag encoding may be updated as shown in the following equation.
[0166] [Formula 4]
[0167] remAbsLevel=remAbsLevel>>1
[0168] abs_level_gt3_flag may indicate whether the remAbsLevel' corresponding to the scanning position (n) is greater than 3. Coding of abs_remainder may be performed only when rem_abs_gt3_flag is equal to 1. The relationship between the actual transform coefficient value coeff and each syntax element may be expressed as follows.
[0169] [Formula 5]
[0170] |coeff|=sig_coeff_flag+abs_level_gt1_flag+par_level_flag+2*(abs_level_gt3_flag+abs_remainder)
[0171] In addition, the following table indicates examples related to the above-mentioned Formula 5.
[0172] [Table 4]
[0173]
[0174] Herein, |coeff| indicates a transform coefficient level (value), and may also be indicated as AbsLevel of the transform coefficient. In addition, the sign of each coefficient may be encoded by using coeff_sign_flag which is a 1-bit symbol.
[0175] In addition, if the value of the transform skip flag is 1, as shown in Table 3, the syntax elements sb_coded_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag, par_level_flag, and / or abs_remainder for the residual coefficient of the transform block can be parsed, and the residual coefficient can be derived based on the syntax elements. In this case, the syntax elements can be parsed sequentially, and the parsing order can be changed. In addition, abs_level_gtx_flag can represent abs_level_gt1_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and / or abs_level_gt9_flag. For example, abs_level_gtx_flag[n][j] can be a flag indicating whether the absolute value or level (value) of the transform coefficient at the scan position n is greater than (j<<1)+1. The condition (j<<1)+1 may optionally be replaced with a specific threshold value such as a first threshold value, a second threshold value, or the like.
[0176] In addition, CABAC provides high performance, but has the disadvantage of poor throughput performance. This is caused by CABAC's conventional coding engine. Conventional coding (i.e., coding performed by CABAC's conventional coding engine) exhibits a high degree of data dependence because it uses probability states and ranges updated by encoding the previous bin, and reading the probability interval and determining the current state may take a lot of time. The throughput problem of CABAC can be solved by limiting the number of bins for context coding. For example, as shown in Table 2 above, the sum of bins used to represent sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag can be limited to the number of bins depending on the corresponding block size. In addition, for example, as shown in Table 3 above, the sum of bins used to represent sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag may be limited to the number of bins depending on the corresponding block size. For example, if the corresponding block is a 4×4 block, the sum of the bins of sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag or sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag may be limited to 32 (or, for example, 28), and if the corresponding block is a 2×2 block, the sum of the bins of sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag may be limited to 8 (or, for example, 7). The limited number of bins may be represented by remBinsPass1 or RemCcbs. Alternatively, for example, for higher CABAC throughput, the number of context-coded bins can be limited for a block (CB or TB) including the encoding target CG. In other words, the number of context-coded bins can be limited in units of blocks (CB or TB).For example, when the size of the current block is 16×16, the number of bins used for context encoding of the current block can be limited to 1.75 times the number of pixels of the current block (i.e., 448), regardless of the current CG.
[0177] In this case, if a limited number of bins for all context encoding are used when encoding the context element, the encoding device may binarize the remaining coefficients by a method for binarizing the coefficients as described below, instead of using context encoding, and may perform bypass encoding. In other words, for example, if the number of bins for context encoding for 4×4 CG encoding is 32 (or, for example, 28), or if the number of bins for context encoding for 2×2 CG encoding is 8 (or, for example, 7), sig_coeff_flag, abs_level_gtl_flag, par_level_flag, abs_level_gt3_flag encoded with the context encoding bin may no longer be encoded and may be directly encoded as dec_abs_level. Alternatively, for example, when the number of context-coded bins for 4×4 block encoding is 1.75 times the number of pixels of the entire block, that is, when limited to 28, sig_coeff_flag, abs_level_gtl_flag, par_level_flag, and abs_level_gt3_flag encoded as context-coded bins may no longer be encoded and may be directly encoded as dec_abs_level, as shown in Table 5 below.
[0178] [Table 5]
[0179] |coeff[n]| dec_abs_level[n] 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 ... ...
[0180] The value |coeff| may be derived based on dec_abs_level. In this case, the transform coefficient value, ie, |coeff|, may be derived as shown in the following equation.
[0181] [Formula 6]
[0182] |coeff|=dec_abs_level
[0183] In addition, coeff_sign_flag may indicate the sign of the transform coefficient level at the corresponding scanning position n. That is, coeff_sign_flag may indicate the sign of the transform coefficient at the corresponding scanning position n.
[0184] Figure 8 An example of transform coefficients in a 4x4 block is shown.
[0185] Figure 8The 4×4 block represents an example of quantized coefficients. Figure 8 The block may be a 4×4 transform block or a 4×4 sub-block of an 8×8, 16×16, 32×32, or 64×64 transform block. Figure 8 A 4×4 block can represent a luma block or a chroma block.
[0186] Furthermore, as described above, when the input signal is not a binary value but a syntax element, the encoding device may convert the input signal into a binary value by binarizing the value of the input signal. Furthermore, the decoding device may decode the syntax element to derive the binarized value (e.g., binarized bin) of the syntax element, and may debinarize the binarized value to derive the value of the syntax element. The binarization process may be performed as a truncated Rice (TR) binarization process, a k-order exponential Golomb (EGk) binarization process, a limited k-order exponential Golomb (limited EGk) binarization process, a fixed-length (FL) binarization process, or the like. Furthermore, the debinarization process may refer to a process performed based on the TR binarization process, the EGk binarization process, or the FL binarization process to derive the value of the syntax element.
[0187] For example, the TR binarization process can be performed as follows.
[0188] The input of the TR binarization process may be cMax and cRiceParam for the syntax element and a request for TR binarization. In addition, the output of the TR binarization process may be TR binarization for symbolVal which is a value corresponding to the bin string.
[0189] Specifically, for example, if there is a suffix bin string for a syntax element, the TR bin string for the syntax element may be a concatenation of the prefix bin string and the suffix bin string. If there is no suffix bin string, the TR bin string for the syntax element may be the prefix bin string. For example, the prefix bin string may be derived as follows.
[0190] The prefix value of symbolVal for a syntax element can be derived as shown in the following formula.
[0191] [Formula 7]
[0192] prefixVal=symbolVal>>cRiceParam
[0193] Herein, prefixVal may represent a prefix value of symbolVal. A prefix of a TR bin string of a syntax element (ie, a prefix bin string) may be derived as follows.
[0194] For example, if prefixVal is less than cMax >> cRiceParam, the prefix bin string can be a bit string of length prefixVal + 1 indexed by binIdx. That is, if prefixVal is less than cMax >> cRiceParam, the prefix bin string can be a bit string with the number of bits indicated by binIdx being prefixVal + 1. The bin of binIdx less than prefixVal can be equal to 1. Additionally, the bin of binIdx equal to prefixVal can be equal to 0.
[0195] For example, the bin string derived by unary - binaryizing prefixVal can be as shown in the following table.
[0196] [Table 6]
[0197]
[0198] In addition, if prefixVal is not less than cMax >> cRiceParam, the prefix bin string can be a bit string of length cMax >> cRiceParam and all bits are 1.
[0199] Additionally, if cMax is greater than symbolVal and if cRiceParam is greater than 0, there can be a bin suffix bit string of the TR bin string. For example, the suffix bit string can be derived as described below.
[0200] The suffix value for symbolVal of the syntax element can be derived as shown in the following formula. <## <##
[0201] [Formula 8]<##000 / / 483><##
[0202] suffixVal = symbolVal - ((prefixVal) << cRiceParam) <000 / / *85>
[0203] In this article, suffixVal can represent the suffix value of symbolVal.
[0204] The suffix of the TR bin string (i.e., the suffix bin string) can be derived based on the FL binaryization process for suffixVal whose value of cMax is (1 << cRiceParam) - 1.
[0205] In addition, if the value of the input parameter (i.e., cRiceParam) is 0, the TR binaryization can be exactly truncated unary binaryization and can always use the same value cMax as the possible maximum value of the syntax element to be decoded. <##
[0206] In addition, for example, the EGk binarization process may be performed as follows: The syntax element encoded using ue(v) may be an Exponential Golomb-encoded syntax element.
[0207] For example, the 0th-order Exponential Golomb (EG0) binarization process can be performed as follows.
[0208] The parsing process for a syntax element may start by reading the bits including the first non-zero bit starting from the current position of the bitstream and counting the number of leading bits equal to 0. This process may be represented as shown in the following table.
[0209] [Table 7]
[0210]
[0211] Additionally, the variable codeNum can be derived as follows.
[0212] [Formula 9]
[0213] codeNum=2 leadingZeroBits -1+read_bits(leadingZeroBits)
[0214] Herein, the value returned from read_bits(leadingZeroBits) (ie, the value indicated by read_bits(leadingZeroBits)) may be interpreted as the binary representation of an unsigned integer with the most significant bit recorded first.
[0215] The structure of an Exponential Golomb code in which a bit string is divided into "prefix" bits and "suffix" bits can be represented as shown in the following table.
[0216] [Table 8]
[0217] Bit string format Range of codeNum 1 0 <![CDATA[0 1 x0]]> 1..2 <![CDATA[0 0 1 x1 x0]]> 3..6 <![CDATA[0 0 0 1 x2 x1 x0]]> 7..14 <![CDATA[0 0 0 0 1 x3 x2 x1 x0]]> 15..30 <![CDATA[0 0 0 0 0 1 x4 x3 x2 x1 x0]]> 31..62 ... ...
[0218] The "prefix" bits may be bits parsed for calculating leadingZeroBits as described above, and may be indicated by 0 or 1 in the bit string in Table 8. That is, the bit string indicated by 0 or 1 in Table 8 above may represent the prefix bit string. The "suffix" bits may be bits parsed when calculating codeNum, and may be indicated by xi in Table 8 above. That is, the bit string indicated by xi in Table 8 above may represent the suffix bit string. Here, i may be a value from 0 to LeadingZeroBits-1. In addition, each xi may be equal to 0 or 1.
[0219] The bit string assigned to codeNum may be as shown in the following table.
[0220] [Table 9]
[0221] Bit string codeNum 1 0 0 1 0 1 0 1 1 2 0 0 1 0 0 3 0 0 1 0 1 4 0 0 1 1 0 5 0 0 1 1 1 6 0 0 0 1 0 0 0 7 0 0 0 1 0 0 1 8 0 0 0 1 0 1 0 9 ... ...
[0222] If the descriptor of the syntax element is ue(v) (ie, if the syntax element is encoded with ue(v)), the value of the syntax element may be equal to codeNum.
[0223] In addition, for example, the EGk binarization process can be performed as follows.
[0224] The input to the EGk binarization process may be a request for EGk binarization. Additionally, the output of the EGk binarization process may be the EGk binarization for symbolVal (ie, the value corresponding to the bin string).
[0225] The bit string of the EGk binarization process for symbolVal can be derived as follows.
[0226] [Table 10]
[0227]
[0228] Referring to Table 10 above, a binary value X can be added to the end of the bin string by each call of put(X). In this article, X can be 0 or 1.
[0229] In addition, for example, the limited EGk binarization process can be performed as follows.
[0230] The input to the finite EGk binarization process may be a request for finite EGk binarization, a rice parameter ricParam, a variable representing the binary logarithm of the maximum value, and a variable representing the maximum prefix extension length, maxPreExtLen. Furthermore, the output of the finite EGk binarization process may be a finite EGk binarization for symbolVal, which is a value corresponding to an empty string.
[0231] The bit string for the finite EGk binarization process of symbolVal can be derived as follows.
[0232] [Table 11]
[0233]
[0234] In addition, for example, the FL binarization process can be performed as follows.
[0235] The input of the FL binarization process may be a request for cMax and FL binarization for a syntax element. In addition, the output of the FL binarization process may be the FL binarization for symbolVal which is a value corresponding to the bin string.
[0236] FL binarization can be configured by using a bit string with a fixed length, the number of bits of which has symbolVal. In this article, the fixed-length bit string can be an unsigned integer bit string. That is, the bit string for symbolVal, which is the symbol value, can be derived through FL binarization, and the bit length (i.e., the number of bits) of the bit string can be a fixed length.
[0237] For example, the fixed length can be derived as shown in the following equation.
[0238] [Equation 10]
[0239] fixedLength=Ceil(Log2(cMax+1))
[0240] The index of the bin for FL binarization may be a method of using values that increase sequentially from the most significant bit to the least significant bit. For example, the bin index associated with the most significant bit may be binIdx=0.
[0241] Furthermore, for example, the binarization process for the syntax element abs_remainder in the residual information may be performed as follows.
[0242] The input to the binarization process of abs_remainder may be a request for binarization of the syntax element abs_remainder[n], the color component cIdx, and the luma position (x0, y0). The luma position (x0, y0) may indicate the top left sample of the current luma transform block based on the top left luma sample of the picture.
[0243] An output of the binarization process for abs_remainder may be a binarization of abs_remainder (ie, a binarized bin string of abs_remainder). A usable bit string for abs_remainder may be derived through the binarization process.
[0244] The Rice parameter cRiceParam for abs_remainder[n] can be derived by using a Rice parameter derivation process performed by inputting the color component cIdx and the luminance position (x0, y0), the current coefficient scanning position (xC, yC), log2TbWidth as the binary logarithm of the transform block width, and log2TbHeight as the binary logarithm of the transform block height. A detailed description of the Rice parameter derivation process will be described later.
[0245] In addition, for example, cMax of abs_remainder[n] to be currently encoded can be derived based on the Rice parameter cRiceParam. cMax can be derived as shown in the following formula.
[0246] [Equation 11]
[0247] cMax=6<<cRiceParam
[0248] In addition, the binarization for abs_remainder (ie, the bin string for abs_remainder) can be the concatenation of the prefix bin string and the suffix bin string when there is a suffix bin string. In addition, in the absence of a suffix bin string, the bin string for abs_remainder can be the prefix bin string.
[0249] For example, the prefix bin string may be derived as follows.
[0250] The prefix value prefixVal of abs_remainder[n] can be derived as shown in the following formula.
[0251] [Equation 12]
[0252] prefixVal=Min(cMax, abs_remainder[n])
[0253] The prefix of the bin string of abs_remainder[n] (ie, the prefix bin string) can be derived through the TR binarization process on prefixVal, where cMax and cRiceParam are used as inputs.
[0254] If the prefix bin string is identical to a bit string in which all bits are 1 and the bit length is 6, a suffix bin string of the bin string of abs_remainder[n] may exist and can be derived as described below.
[0255] The Rice parameter derivation process for dec_abs_level[n] can be as follows.
[0256] The input of the Rice parameter derivation process can be the color component index cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the log2TbWidth as the binary logarithm of the transform block width, and the log2TbHeight as the binary logarithm of the transform block height. The luma position (x0, y0) can indicate the upper left sample of the current luma transform block based on the upper left luma sample of the picture. In addition, the output of the Rice parameter derivation process can be the Rice parameter cRiceParam.
[0257] For example, the variable locSumAbs may be derived similarly to the pseudo code disclosed in the following table based on the array AbsLevel[x][y] of the transform block with a given component index cIdx and the top left luma position (x0, y0).
[0258] [Table 12]
[0259]
[0260] Then, based on the given variable locSumAbs, the Rice parameter cRiceParam can be derived as shown in the following table.
[0261] [Table 13]
[0262] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0263] Additionally, for example, in the Rice parameter derivation process for abs_remainder[n], baseLevel may be set to 4.
[0264] Alternatively, for example, the Rice parameter cRiceParam can be determined based on whether transform skipping is applied to the current block. That is, if transform is not applied to the current TB including the current CG, in other words, if transform skipping is applied to the current TB including the current CG, the Rice parameter cRiceParam can be derived as 1.
[0265] In addition, the suffix value suffixVal of abs_remainder can be derived as shown in the following formula.
[0266] [Equation 13]
[0267] suffixVal=abs_remainder[n]-cMax
[0268] The suffix bin string of the bin string of abs_remainder can be derived by a finite EGk binarization process on suffixVal, where k is set to cRiceParam+1, riceParam is set to cRiceParam, log2TransformRange is set to 15, and maxPreExtLen is set to 11.
[0269] Furthermore, for example, the binarization process for the syntax element dec_abs_level in the residual information can be performed as follows.
[0270] Inputs to the binarization process for dec_abs_level may be a request for binarization of the syntax element dec_abs_level[n], the color component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth as the binary logarithm of the transform block width, and log2TbHeight as the binary logarithm of the transform block height. The luma position (x0, y0) may indicate the top left sample of the current luma transform block based on the top left luma sample of the picture.
[0271] An output of the binarization process for dec_abs_level may be a binarization of dec_abs_level (ie, a binarized bin string of dec_abs_level). An available bin string of dec_abs_level may be derived through the binarization process.
[0272] The Rice parameter cRiceParam of dec_abs_level[n] can be derived by performing a Rice parameter derivation process using the color component cIdx, the luminance position (x0, y0), the current coefficient scanning position (xC, yC), log2TbWidth as the binary logarithm of the transform block width, and log2TbHeight as the binary logarithm of the transform block height. Hereinafter, the Rice parameter derivation process will be described in detail.
[0273] In addition, for example, cMax of dec_abs_level[n] can be derived based on the Rice parameter cRiceParam. cMax can be derived as shown in the following table.
[0274] [Equation 14]
[0275] cMax=6<<cRiceParam
[0276] Furthermore, the binarization for dec_abs_level[n] (i.e., the bin string for dec_abs_level[n]) may be the concatenation of the prefix bin string and the suffix bin string if there is a suffix bin string. Alternatively, the bin string for dec_abs_level[n] may be the prefix bin string if there is no suffix bin string.
[0277] For example, the prefix bin string may be derived as follows.
[0278] The prefix value prefixVal of dec_abs_level[n] can be derived as shown in the following formula.
[0279] [Equation 15]
[0280] prefix Val=Min(cMax,dec abs level[n])
[0281] The prefix of the bin string of dec_abs_level[n] (ie, prefix bin string) may be derived through a TR binarization process on prefixVal, with cMax and cRiceParam being used as inputs.
[0282] If the prefix bin string is the same as a bit string in which all bits are 1 and the bit length is 6, a suffix bin string of the bin string of dec_abs_level[n] may exist and can be derived as described below.
[0283] The Rice parameter derivation process for dec_abs_level[n] can be as follows.
[0284] The input of the Rice parameter derivation process can be the color component index cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the log2TbWidth as the binary logarithm of the transform block width, and the log2TbHeight as the binary logarithm of the transform block height. The luma position (x0, y0) can indicate the upper left sample of the current luma transform block based on the upper left luma sample of the picture. In addition, the output of the Rice parameter derivation process can be the Rice parameter cRiceParam.
[0285] For example, the variable locSumAbs may be derived similarly to the pseudo code disclosed in the following table based on the array AbsLevel[x][y] of the transform block with a given component index cIdx and the top left luma position (x0, y0).
[0286] [Table 14]
[0287]
[0288] Then, based on the given variable locSumAbs, the Rice parameter cRiceParam can be derived as shown in the following table.
[0289] [Table 15]
[0290] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0291] In addition, for example, in the Rice parameter derivation process for dec_abs_level[n], baseLevel can be set to 0, and ZeroPos[n] can be derived as follows.
[0292] [Equation 16]
[0293] ZeroPos[n]=(QState<2?1:2)<<cRiceParam
[0294] In addition, the suffix value suffixVal of dec_abs_level[n] can be derived as shown in the following equation.
[0295] [Equation 17]
[0296] sufffixVal=dec_abs_level[n]-cMax
[0297] The suffix bin string of the bin string of dec_abs_level[n] can be derived by a finite EGk binarization process on suffixVal, where k is set to cRiceParam+1, truncSuffixLen is set to 15, and maxPreExtLen is set to 11.
[0298] Furthermore, RRC and TSRC may have the following differences.
[0299] -For example, the Rice parameter cRiceParam of the syntax elements abs_remainder[] and dec_abs_level[] in the RRC may be derived based on locSumAbs, the lookup table, and / or baseLevel as described above, but the Rice parameter cRiceParam of the syntax element abs_remainder[] in the TSRC may be derived as 1. That is, for example, when transform skip is applied to the current block (e.g., the current TB), the Rice parameter cRiceParam of the abs_remainder[] of the TSRC for the current block may be derived as 1.
[0300] -In addition, for example, referring to Table 3 and Table 4, in RRC, abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1] may be signaled, but in TSRC, abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and abs_level_gtx_flag[n][4] may be signaled. Here, abs_level_gtx_flag[n][0] may be represented as abs_level_gt1_flag or a first coefficient level flag, abs_level_gtx_flag[n][1] may be represented as abs_level_gt3_flag or a second coefficient level flag, abs_level_gtx_flag[n][2] may be represented as abs_level_gt5_flag or a third coefficient level flag, abs_level_gtx_flag[n][3] may be represented as abs_level_gt7_flag or a fourth coefficient level flag, and abs_level_gtx_flag[n][4] may be represented as abs_level_gt9_flag or a fifth coefficient level flag. Specifically, the first coefficient level flag may be a flag indicating whether the coefficient level is greater than a first threshold value (e.g., 1), the second coefficient level flag may be a flag indicating whether the coefficient level is greater than a second threshold value (e.g., 3), the third coefficient level flag may be a flag indicating whether the coefficient level is greater than a third threshold value (e.g., 5), the fourth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fourth threshold value (e.g., 7), and the fifth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fifth threshold value (e.g., 9). As described above, in TSRC, compared to RRC, abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], and abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and abs_level_gtx_flag[n][4] may also be included.
[0301] - In addition, for example, in RRC, the syntax element coeff_sign_flag may be bypass coded, but in TSRC, the syntax element coeff_sign_flag may be bypass coded or context coded.
[0302] In addition, for the residual sample quantization process, dependent quantization can be proposed. Dependent quantization can represent a method that depends on the value of the transform coefficient (the value of the transform coefficient level), in which the set of reconstruction values allowed for the current transform coefficient precedes the current transform coefficient in the reconstruction order. That is, for example, dependent quantization can be achieved by (a) defining two scalar quantizers with different reconstruction levels and (b) defining a process for transitioning between scalar quantizers. Compared with existing independent scalar quantization, dependent quantization can have the effect of allowing the reconstruction vector to be more concentrated in the N-dimensional vector space. Here, N can represent the number of transform coefficients of the transform block.
[0303] Figure 9 The scalar quantizer used in the dependent quantization is exemplified. Figure 9 , the location of the enabled reconstruction level can be specified by the quantization step size △. Figure 9 , the scalar quantizers can be denoted as Q0 and Q1. The scalar quantizer being used can be derived without explicit signaling from the bitstream. For example, the quantizer being used for the current transform coefficient can be determined by the parity of the transform coefficient levels that precede the current transform coefficient in the coding / reconstruction order.
[0304] Figure 10 State transitions and quantizer selection for dependent quantization are exemplarily illustrated.
[0305] Reference Figure 10 The transition between the two scalar quantizers Q0 and Q1 can be implemented by a state machine with four states. These four states can have four different values (0, 1, 2, and 3). In the coding / reconstruction order, the state of the current transform coefficient can be determined by the parity of the transform coefficient level before the current transform coefficient.
[0306] For example, when the inverse quantization process for a transform block is started, the state of the quantization dependency may be configured to be 0. Thereafter, the transform coefficients of the transform block may be reconstructed in a scanning order (i.e., the same order as the order of entropy decoding). For example, after reconstructing the current transform coefficients, as Figure 10 As illustrated in , the state of the dependent quantization can be updated. In the scanning order, the inverse quantization processing of the transform coefficient reconstructed after the current transform coefficient is reconstructed can be performed based on the updated state. Figure 10, k can represent the value of the transform coefficient, that is, the value of the transform coefficient level value. For example, if k (the value of the current transform coefficient) & 1 is 0 when the current state is 0, the state can be updated to 0, and if k & 1 is 1, the state can be updated to 2. In addition, for example, if k & 1 is 0 when the current state is 1, the state can be updated to 2, and if k & 1 is 1, the state can be updated to 0. In addition, for example, if k & 1 is 0 when the current state is 2, the state can be updated to 1, and if k & 1 is 1, the state can be updated to 3. In addition, for example, if k & 1 is 0 when the current state is 3, the state can be updated to 3, and if k & 1 is 1, the state can be updated to 1. Reference Figure 10 If the state is 0 or 1, the scalar quantizer used in the inverse quantization process may be Q0, and if the state is 2 or 3, the scalar quantizer used in the inverse quantization process may be Q1. The transform coefficient may be inverse quantized by the scalar quantizer for the current state based on the quantization parameter of the reconstruction level of the transform coefficient.
[0307] In addition, the present disclosure proposes embodiments related to residual data coding. The embodiments described in the present disclosure can be combined with each other. In the residual data coding method described above, there can be regular residual coding (RRC) and transform skip residual coding (TSRC).
[0308] In the two methods described above, the residual data encoding method of the current block can be determined based on the values of transform_skip_flag and sh_ts_residual_coding_disabled_flag as illustrated in Table 1. Here, the syntax element sh_ts_residual_coding_disabled_flag can indicate whether TSRC is enabled. Therefore, if slice_ts_residual_coding_disabled_flag indicates that TSRC is not enabled even when transform_skip_flag indicates transform skipping, the syntax element according to RRC can be signaled for the transform skip block. That is, if the value of transform_skip_flag is 0, or if the value of slice_ts_residual_coding_disabled_flag is 1, RRC can be used, otherwise, TSRC can be used.
[0309] Although high coding efficiency can be achieved by using slice_ts_residual_coding_disabled_flag in specific applications (e.g., lossless coding, etc.), in existing video / image coding standards, no restrictions have been proposed on the use of dependent quantization and slice_ts_residual_coding_disabled_flag together. That is, dependent quantization can be activated at a high level (e.g., sequence parameter set (SPS) syntax / video parameter set (VPS) syntax / decoding parameter set (DPS) syntax / picture header syntax / slice header syntax) or a low level (CU / TU), and if slice_ts_residual_coding_disabled_flag is 1, unnecessary operations (i.e., operations based on dependent quantization) may be performed depending on the value of the dependent quantization state in RRC, thereby degrading coding performance, or unexpected loss of coding performance may occur due to incorrect configuration in the encoding device. Therefore, this embodiment proposes a scheme for configuring the correlation / restriction between two techniques, quantization-dependent and residual coding (i.e., coding of residual samples of transform-skipped blocks in the current slice by RRC), which are used together to prevent unexpected coding loss or failure when slice_ts_residual_coding_disabled_flag=1.
[0310] As an embodiment, the present disclosure proposes a method in which slice_ts_residual_coding_disabled_flag depends on ph_dep_quant_enabled_flag. For example, the syntax elements proposed in this embodiment may be in the following table.
[0311] [Table 16]
[0312]
[0313] According to this embodiment, when the value of ph_dep_quant_enabled_flag is 0, slice_ts_residual_coding_disabled_flag may be signaled. Here, ph_dep_quant_enabled_flag may indicate whether dependent quantization is enabled. For example, if the value of ph_dep_quant_enabled_flag is 1, this may indicate that dependent quantization is enabled, while if the value of ph_dep_quant_enabled_flag is 0, this may indicate that dependent quantization is not enabled.
[0314] Accordingly, according to the present embodiment, slice_ts_residual_coding_disabled_flag may be signaled only when dependent quantization is not enabled, and when dependent quantization is enabled and slice_ts_residual_coding_disabled_flag is not signaled, slice_ts_residual_coding_disabled_flag may be inferred to be 0. Furthermore, ph_dep_quant_enabled_flag and slice_ts_residual_coding_disabled_flag may be signaled to picture header syntax and / or slice header syntax, or may be signaled to another high-level syntax (HLS) (e.g., SPS syntax / VPS syntax / DPS syntax) that is not picture header syntax and slice header syntax or is at a low level (CU / TU). If ph_dep_quant_enabled_flag is signaled to a syntax that does not include picture header syntax, it may be referred to by another name. For example, ph_dep_quant_enabled_flag may be expressed as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or sps_dep_quant_enabled_flag.
[0315] In addition, the present disclosure proposes another embodiment for configuring the correlation / restriction between dependent quantization and residual coding (i.e., encoding of residual samples of the transform skip block in the current slice by RRC) when slice_ts_residual_coding_disabled_flag=1. For example, the present embodiment proposes the following scheme: when the value of slice_ts_residual_coding_disabled_flag is 1, the state of dependent quantization is not used to encode the level value of the transform coefficient, so as to prevent unexpected coding loss or failure due to the use of dependent quantization and residual coding (i.e., encoding of residual samples of the transform skip block in the current slice by RRC) together when slice_ts_residual_coding_disabled_flag=1. The residual coding syntax according to the present embodiment can be as shown in the following table.
[0316] [Table 17]
[0317]
[0318]
[0319]
[0320]
[0321]
[0322] Referring to Table 17 as described above, when the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, Qstate may be derived, and the value of the transform coefficient (transform coefficient level) may be derived based on Qstate. For example, referring to Table 17, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the transform coefficient, and (QState>1?1:0) can represent 1 when the value of state QState is greater than 1 (i.e., when the value of state Qstate is 2 or 3), and can represent 0 when the value of state Qstate is equal to or less than 1 (i.e., when the value of state Qstate is 0 or 1).
[0323] In addition, referring to Table 17 as described above, if the value of slice_ts_residual_coding_disabled_flag is 1, the value of the transform coefficient (transform coefficient level) can be derived without using Qstate. For example, referring to Table 17, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, and coeff_sign_flag[n] can be a syntax element of a sign flag indicating the sign of the transform coefficient.
[0324] In addition, according to this embodiment, if the value of slice_ts_residual_coding_disabled_flag is 1, the quantization-dependent state may not be used to encode the level value of the transform coefficient, and the state update may not be performed. For example, the residual coding syntax according to this embodiment may be as shown in the following table.
[0325] [Table 18]
[0326]
[0327]
[0328]
[0329]
[0330]
[0331] Referring to Table 18 described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, Qstate may be updated. For example, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, Qstate may be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. In addition, if the value of slice_ts_residual_coding_disabled_flag is 1, the process of updating Qstate may not be performed.
[0332] In addition, referring to Table 18 as described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, the value of the transform coefficient (transform coefficient level) can be derived based on Qstate. For example, referring to Table 18, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the transform coefficient, and (QState>1?1:0) can represent 1 when the value of state QState is greater than 1 (i.e., when the value of state Qstate is 2 or 3), and can represent 0 when the value of state Qstate is equal to or less than 1 (i.e., when the value of state Qstate is 0 or 1).
[0333] In addition, referring to Table 18 as described above, if the value of slice_ts_residual_coding_disabled_flag is 1, the value of the transform coefficient (transform coefficient level) can be derived without using Qstate. For example, referring to Table 18, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] may be the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, and coeff_sign_flag[n] may be a syntax element of a sign flag indicating the sign of the transform coefficient.
[0334] In addition, the present disclosure proposes another embodiment for configuring the correlation / restriction between dependent quantization and residual coding (i.e., encoding of residual samples of the transform skip block in the current slice of RRC) when slice_ts_residual_coding_disabled_flag=1. For example, the present embodiment proposes a scheme for adding restrictions using transform_skip_flag in the process of deriving the value of the transform coefficient (transform coefficient level) according to the state or state update of dependent quantization in RRC. That is, the present embodiment proposes the following scheme: based on transform_skip_flag, the process of deriving the value of the transform coefficient (transform coefficient level) is not used according to the state and / or state update of dependent quantization in RRC. The residual coding syntax according to the present embodiment can be as shown in the following table.
[0335] [Table 19]
[0336]
[0337]
[0338]
[0339]
[0340]
[0341] Referring to Table 19 described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, Qstate may be updated. For example, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, Qstate may be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. In addition, if the value of transform_skip_flag is 1, the process of updating Qstate may not be performed.
[0342] In addition, referring to Table 19 as described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, Qstate can be derived, and the value of the transform coefficient (transform coefficient level) can be derived based on Qstate. For example, referring to Table 19, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, coeff_sign_flag[n] can be the syntax element of the sign flag representing the sign of the transform coefficient, and (QState>1?1:0) can represent 1 when the value of state QState is greater than 1 (i.e., when the value of state Qstate is 2 or 3), and can represent 0 when the value of state Qstate is equal to or less than 1 (i.e., when the value of state Qstate is 0 or 1).
[0343] In addition, referring to Table 19 as described above, if the value of transform_skip_flag is 1, the value of the transform coefficient (transform coefficient level) can be derived without using Qstate. Accordingly, in the case where the transform skip block is encoded according to the residual data of RRC, the value of the transform coefficient can be derived without using Qstate. For example, referring to Table 19, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, and coeff_sign_flag[n] can be a syntax element of a sign flag representing the sign of the transform coefficient.
[0344] In addition, as described above, the information (syntax elements) in the syntax table disclosed in the present disclosure can be included in the image / video information, configured / encoded by the encoding device, and transmitted to the decoding device in the form of a bitstream. The decoding device can parse / decode the information (syntax elements) in the corresponding syntax table. The decoding device can perform a block / image / video reconstruction process based on the decoded information.
[0345] Figure 11 The image encoding method performed by the encoding device according to the present disclosure is briefly illustrated. Figure 11 The method disclosed in Figure 2 Specifically, for example, Figure 11 S1100 of the encoding device may be performed by a predictor, and S1110 to S1160 may be performed by an entropy encoder of the encoding device. In addition, although not illustrated, the process of deriving the residual samples of the current block based on the original samples and the predicted samples of the current block may be performed by a subtractor of the encoding device, and the process of generating the reconstructed samples and the reconstructed picture of the current block based on the residual samples and the predicted samples of the current block may be performed by an adder of the encoding device.
[0346] The encoding device derives prediction samples for the current block based on inter-frame prediction (S1100). For example, the encoding device may derive the inter-frame prediction mode and motion information for the current block, and may generate prediction samples for the current block. Here, the processes for determining the inter-frame prediction mode, deriving motion information, and generating prediction samples may be performed simultaneously as described above, or one process may be performed after the other. For example, the encoding device may search for blocks similar to the current block within a certain area (search area) of a reference picture through motion estimation, and may derive a reference block whose difference from the current block is equal to or less than a minimum value or a predetermined standard. Based on this, the encoding device may derive a reference picture index indicating the reference picture in which the reference block is located, and may derive a motion vector based on the positional difference between the reference block and the current block. The encoding device may determine an inter-frame prediction mode to be applied to the current block from among various inter-frame prediction modes. For example, the encoding device may compare the RD costs under various inter-frame prediction modes and determine the optimal inter-frame prediction mode for the current block.
[0347] For example, the encoding device may construct a motion information candidate list for the current block and derive a reference block whose difference with the current block is equal to or less than a minimum value or a predetermined standard from among the reference blocks indicated by the motion information candidates included in the motion information candidate list. In this case, a motion information candidate associated with the derived reference block may be selected, and the motion information of the current block may be derived based on the motion information of the selected motion information candidate.
[0348] The encoding device encodes prediction-related information for the current block (S1110). The image information may include prediction-related information for the current block. For example, the prediction-related information may include prediction mode information and information about motion information of the current block as information related to the prediction process. The information about motion information may include the aforementioned motion vector difference (MVD) information and / or reference picture index information.
[0349] The encoding device encodes a dependent quantization enable flag indicating whether dependent quantization is enabled (S1120). The encoding device may encode the dependent quantization enable flag for whether dependent quantization is enabled. The image information may include the dependent quantization enable flag. For example, the encoding device may determine whether dependent quantization is enabled for a block of a picture in a sequence, and encode the dependent quantization enable flag for whether dependent quantization is enabled. For example, the dependent quantization enable flag may be a flag for whether dependent quantization is enabled. For example, the dependent quantization enable flag may indicate whether dependent quantization is enabled. That is, for example, the dependent quantization enable flag may indicate whether dependent quantization is enabled for a block of a picture in a sequence. For example, the dependent quantization enable flag may indicate whether a dependent quantization use flag indicating whether dependent quantization is used for the current slice may exist. For example, a dependent quantization enable flag having a value of 1 may indicate that dependent quantization is enabled, and a dependent quantization enable flag having a value of 0 may indicate that dependent quantization is not enabled. In addition, for example, the dependent quantization enable flag may be signaled in an SPS syntax or a slice header syntax. The syntax element of the dependent quantization enable flag may be sps_dep_quant_enabled_flag as described above. sps_dep_quant_enabled_flag may be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.
[0350] The encoding apparatus encodes a transform skip residual coding (TSRC) enable flag for whether to enable TSRC based on the quantization-dependent enable flag (S1130). The image information may include the TSRC enable flag.
[0351] For example, the encoding device may encode the TSRC enable flag based on the dependent quantization enable flag. For example, the TSRC enable flag may be encoded based on the dependent quantization enable flag having a value of 0. That is, for example, if the value of the dependent quantization enable flag is 0 (i.e., if the dependent quantization enable flag indicates that dependent quantization is not enabled), the TSRC enable flag may be encoded. In other words, for example, if the value of the dependent quantization enable flag is 0 (i.e., if the dependent quantization enable flag indicates that dependent quantization is not enabled), the TSRC enable flag may be signaled. Additionally, for example, if the value of the dependent quantization enable flag is 1, the TSRC enable flag may not be encoded, and the value of the TSRC enable flag may be derived as 0 in the decoding device. That is, for example, if the value of the dependent quantization enable flag is 1 (i.e., if dependent quantization is applied (or used) for the current block), the TSRC enable flag may not be signaled, and the value of the TSRC enable flag may be derived as 0 in the decoding device. Accordingly, for example, if dependent quantization is not enabled for the current block, the TSRC enable flag may be signaled (or encoded). If dependent quantization is enabled for the current block, the TSRC enable flag may not be signaled (or encoded), and the value of the TSRC enable flag may be derived in the decoding device as 0. Here, the current block may be a coding block (CB) or a transform block (TB).
[0352] Here, for example, the TSRC enable flag may be a flag indicating whether TSRC is enabled. Specifically, for example, the TSRC enable flag may be a flag indicating whether TSRC is enabled for blocks in a slice. For example, a TSRC enable flag with a value of 1 may indicate that TSRC is not enabled, and a TSRC enable flag with a value of 0 may indicate that TSRC is enabled. Furthermore, for example, the TSRC enable flag may be signaled in the slice header syntax. The syntax element of the TSRC enable flag may be sh_ts_residual_coding_disabled_flag as described above.
[0353] The encoding device determines the residual coding syntax of the current block based on the TSRC enable flag (S1140). The encoding device may determine the residual coding syntax of the current block based on the TSRC enable flag. For example, the encoding device may determine the residual coding syntax of the current block to be one of regular residual coding (RRC) syntax and transform skipped residual coding (TSRC) syntax based on the TSRC enable flag. The RRC syntax may indicate syntax according to RRC, and the TSRC syntax may indicate syntax according to TSRC.
[0354] For example, based on the TSRC enable flag having a value of 1, the residual coding syntax of the current block can be determined to be a conventional residual coding (RRC) syntax. In this case, for example, a transform skip flag for whether the current block is a transform skip block can be encoded, and the value of the transform skip flag can be 1. For example, the image information may include a transform skip flag of the current block. The transform skip flag can indicate whether the current block is a transform skip block. That is, the transform skip flag can indicate whether a transform has been applied to the transform coefficients of the current block. The syntax element representing the transform skip flag can be transform_skip_flag as described above. For example, if the value of the transform skip flag is 1, the transform skip flag can indicate that a transform has not been applied to the current block (that is, the transform is skipped), and if the value of the transform skip flag is 0, the transform skip flag can indicate that a transform has been applied to the current block. For example, if the current block is a transform skip block, the value of the transform skip flag of the current block can be 1.
[0355] Additionally, for example, based on a TSRC enable flag having a value of 0, the residual coding syntax of the current block may be determined to be a transform skip residual coding (TSRC) syntax. Additionally, for example, a transform skip flag for determining whether the current block is a transform skip block may be encoded, and based on a transform skip flag having a value of 1 and a TSRC enable flag having a value of 0, the residual coding syntax of the current block may be determined to be a transform skip residual coding (TSRC) syntax. Additionally, for example, a transform skip flag for determining whether the current block is a transform skip block may be encoded, and based on a transform skip flag having a value of 0 and a TSRC enable flag having a value of 0, the residual coding syntax of the current block may be determined to be a transform skip residual coding (TSRC) syntax. Additionally, for example, a transform skip flag for determining whether the current block is a transform skip block may be encoded, and based on a transform skip flag having a value of 0 and a TSRC enable flag having a value of 0, the residual coding syntax of the current block may be determined to be a regular residual coding (RRC) syntax.
[0356] The encoding device encodes the residual information of the determined residual encoding syntax of the current block (S1150). The encoding device can derive the residual samples of the current block and can encode the residual information of the determined residual encoding syntax of the residual samples of the current block. The image information may include the residual information.
[0357] For example, the encoding device may derive residual samples of the current block by subtracting original samples from predicted samples of the current block.
[0358] Thereafter, for example, the encoding device may derive transform coefficients for the current block based on the residual samples. For example, the encoding device may determine whether to apply a transform to the current block. That is, the encoding device may determine whether to apply a transform to the residual samples of the current block. The encoding device may determine whether to apply a transform to the current block based on coding efficiency. For example, the encoding device may determine not to apply a transform to the current block. A block to which a transform is not applied may be designated as a transform-skip block. That is, for example, the current block may be a transform-skip block.
[0359] If the transform is not applied to the current block, that is, if the transform is not applied to the residual samples, the encoding device may derive the derived residual samples as transform coefficients. In addition, if the transform is applied to the current block, that is, if the transform is applied to the residual samples, the encoding device may derive the transform coefficients by performing the transform on the residual samples. The current block may include a plurality of sub-blocks or coefficient groups (CGs). In addition, the size of the sub-blocks of the current block may be 4×4 or 2×2. That is, the sub-blocks of the current block may include up to 16 non-zero transform coefficients or 4 non-zero transform coefficients. Here, the current block may be a coding block (CB) or a transform block (TB). In addition, the transform coefficients may be expressed as residual coefficients.
[0360] In addition, the encoding device may determine whether to apply dependent quantization to the current block. For example, if dependent quantization is applied to the current block, the encoding device may derive the transform coefficient of the current block by performing dependent quantization processing on the transform coefficient. For example, if dependent quantization is applied to the current block, the encoding device may update a state of dependent quantization (Qstate) based on the coefficient level of a transform coefficient immediately preceding the current transform coefficient in the scan order, may derive the coefficient level of the current transform coefficient based on the updated state and a syntax element of the current transform coefficient, and may derive the current transform coefficient by quantizing the derived coefficient level. For example, the current transform coefficient may be quantized based on a quantization parameter of a reconstruction level of the current transform coefficient in a scalar quantizer for the updated state.
[0361] For example, if the residual coding syntax of the current block is determined to be RRC syntax, the encoding device may encode the residual information of the RRC syntax of the current block. For example, the residual information of the RRC syntax may include the syntax elements disclosed in Table 2 as described above.
[0362] For example, the residual information of the RRC syntax may include syntax elements of the transform coefficients of the current block. Here, the transform coefficients may be expressed as residual coefficients.
[0363] For example, the syntax elements 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, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1]), abs_remainder, dec_abs_level, and / or coeff_sign_flag.
[0364] Specifically, for example, the syntax element may include position information indicating the position of the last non-zero transform coefficient in the residual coefficient array of the current block. That is, the syntax element may include position information indicating the position of the last non-zero transform coefficient in the scanning order of the current block. The position information may include information indicating a prefix of the column position of the last non-zero transform coefficient, information indicating a prefix of the row position of the last non-zero transform coefficient, information indicating a suffix of the column position of the last non-zero transform coefficient, and information indicating a suffix of the row position of the last non-zero transform coefficient. The syntax elements of the position information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. In addition, the non-zero transform coefficient may be referred to as a significant coefficient.
[0365] In addition, for example, the syntax element may include a coded sub-block flag indicating whether the current sub-block of the current block includes a non-zero transform coefficient, a significant coefficient flag indicating whether the transform coefficient of the current block is a non-zero transform coefficient, a first coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a first threshold, a parity level flag indicating parity of the coefficient level, and / or a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold. Here, the coded sub-block flag may be sb_coded_flag or coded_sub_block_flag, the significant coefficient flag may be sig_coeff_flag, the first coefficient level flag may be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag may be par_level_flag, and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
[0366] In addition, for example, the syntax element may include coefficient value related information of the transform coefficient value of the current block. The coefficient value related information may be abs_remainder and / or dec_abs_level.
[0367] In addition, for example, the syntax element may include a sign flag indicating the sign of the transform coefficient. The sign flag may be coeff_sign_flag.
[0368] For example, if the residual coding syntax of the current block is determined to be a TSRC syntax, the encoding device may encode the residual information of the TSRC syntax of the current block. For example, the residual information of the TSRC syntax may include the syntax elements disclosed in Table 3 as described above.
[0369] For example, the residual information of the TSRC syntax may include syntax elements of the transform coefficients of the current block. Here, the transform coefficients may also be expressed as residual coefficients.
[0370] For example, the syntax elements may include context coding syntax elements and / or bypass coding syntax elements for transform coefficients. The syntax elements may include syntax elements such as sig_coeff_flag, coeff_sign_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and / or abs_level_gtx_flag[n][4]), abs_remainder, and / or coeff_sign_flag.
[0371] For example, a context coding syntax element for a transform coefficient may include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a sign flag indicating the sign of the transform coefficient, a first coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a first threshold, and / or a parity level flag indicating the parity of the transform level of the transform coefficient. Furthermore, for example, the context coding syntax element may include a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold, a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third threshold, a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the significant coefficient flag may be sig_coeff_flag, the sign flag may be ceff_sign_flag, the first coefficient level flag may be abs_level_gt1_flag, and the parity level flag may be par_level_flag. Additionally, the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag may be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag may be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag may be abs_level_gt9_flag or abs_level_gtx_flag.
[0372] In addition, for example, the bypass coding syntax element of the transform coefficient may include coefficient level information of the value of the transform coefficient (or coefficient level) and / or a sign flag indicating the sign of the transform coefficient. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.
[0373] The encoding device generates a bitstream including prediction related information, a quantization-dependent enable flag, a TSRC enable flag, and residual information (S1160). For example, the encoding device may output image information including prediction related information, a quantization-dependent enable flag, a TSRC enable flag, and residual information as a bitstream. The bitstream may include prediction related information, a quantization-dependent enable flag, a TSRC enable flag, and residual information.
[0374] In addition, the bit stream can be sent to the decoding device via a network or a (digital) storage medium. Here, the network can include a broadcast network and / or a communication network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD and SSD.
[0375] Figure 12 An encoding device that performs an image encoding method according to the present disclosure is briefly illustrated. Figure 11 The method disclosed in Figure 12 Specifically, for example, Figure 12 The predictor of the encoding device can perform Figure 11 S1100 in the Figure 12 The entropy encoder of the encoding device can perform Figure 11 In addition, although not illustrated, the process of deriving the residual samples of the current block based on the original samples and the predicted samples of the current block may be performed by a subtractor of the encoding device, and the process of generating the reconstructed samples and the reconstructed picture of the current block based on the residual samples and the predicted samples of the current block may be performed by an adder of the encoding device.
[0376] Figure 13 The image decoding method performed by the decoding device according to the present disclosure is briefly illustrated. Figure 13 The method disclosed in Figure 3 Specifically, for example, Figure 13 S1300 to S1330 in the above method may be performed by an entropy decoder of a decoding device. Figure 13 S1340 to S1350 in may be performed by a predictor of a decoding device, Figure 13 S1360 in the decoding apparatus may be performed by a residual processor, and S1370 may be performed by an adder of the decoding apparatus.
[0377] The decoding device obtains prediction-related information of the current block (S1300). The decoding device may obtain prediction-related information of the current block through a bitstream. For example, image information may include prediction-related information of the current block. For example, prediction-related information may include prediction mode information of the current block. The decoding device may determine which inter-frame prediction mode to apply to the current block based on the prediction mode information. For example, the inter-frame prediction mode may include skip mode, merge mode, and / or (A)MVP mode, or may include the various inter-frame prediction modes described above.
[0378] The decoding device obtains a dependent quantization enable flag for whether to enable dependent quantization (S1310). The decoding device can obtain image information including the dependent quantization enable flag through the bitstream. The image information may include the dependent quantization enable flag. For example, the dependent quantization enable flag can be a flag for whether to enable dependent quantization. For example, the dependent quantization enable flag can indicate whether dependent quantization is enabled. That is, for example, the dependent quantization enable flag can indicate whether dependent quantization is enabled for a block of a picture in a sequence. For example, the dependent quantization enable flag can indicate whether there may be a dependent quantization use flag indicating whether dependent quantization is used for the current slice. For example, a dependent quantization enable flag with a value of 1 can indicate that dependent quantization is enabled, and a dependent quantization enable flag with a value of 0 can indicate that dependent quantization is not enabled. In addition, for example, the dependent quantization enable flag can be signaled to the SPS syntax or the slice header syntax. The syntax element of the dependent quantization enable flag can be sps_dep_quant_enabled_flag as described above. sps_dep_quant_enabled_flag may be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.
[0379] The decoding apparatus obtains a transform skip residual coding (TSRC) enable flag for whether to enable TSRC based on the quantization enable flag (S1320). The image information may include the TSRC enable flag.
[0380] For example, the decoding device may obtain the TSRC enable flag based on the dependent quantization enable flag. For example, the TSRC enable flag may be obtained based on the dependent quantization enable flag having a value of 0. That is, for example, if the value of the dependent quantization enable flag is 0 (i.e., if the dependent quantization enable flag indicates that dependent quantization is not enabled), the TSRC enable flag may be obtained. In other words, for example, if the value of the dependent quantization enable flag is 0 (i.e., if the dependent quantization enable flag indicates that dependent quantization is not enabled), the TSRC enable flag may be signaled. Additionally, for example, if the value of the dependent quantization enable flag is 1, the TSRC enable flag may not be obtained, and the value of the TSRC enable flag may be derived as 0. That is, for example, if the value of the dependent quantization enable flag is 1 (i.e., if dependent quantization is applied (or used) for the current block), the TSRC enable flag may not be signaled, and the value of the TSRC enable flag may be derived as 0. Accordingly, for example, if dependent quantization is not enabled for the current block, the TSRC enable flag may be signaled (or obtained). If dependent quantization is enabled for the current block, the TSRC enable flag cannot be signaled (or obtained), and the value of the TSRC enable flag may be derived as 0. Here, the current block may be a coding block (CB) or a transform block (TB).
[0381] Here, for example, the TSRC enable flag may be a flag indicating whether TSRC is enabled. Specifically, for example, the TSRC enable flag may be a flag indicating whether TSRC is enabled for blocks in a slice. For example, a TSRC enable flag with a value of 1 may indicate that TSRC is not enabled, and a TSRC enable flag with a value of 0 may indicate that TSRC is enabled. Furthermore, for example, the TSRC enable flag may be signaled in the slice header syntax. The syntax element of the TSRC enable flag may be sh_ts_residual_coding_disabled_flag as described above.
[0382] The decoding device obtains residual information of the residual coding syntax of the current block derived based on the TSRC enable flag (S1330). The decoding device can derive one of the TSRC syntax and the regular residual coding (RRC) syntax as the residual coding syntax of the current block based on the TSRC enable flag, and can obtain residual information of the derived residual coding syntax.
[0383] For example, the decoding device may derive the residual coding syntax of the current block based on the TSRC enable flag. For example, the decoding device may derive the residual coding syntax of the current block as one of regular residual coding (RRC) syntax and transform skipped residual coding (TSRC) syntax based on the TSRC enable flag. The RRC syntax may indicate syntax according to RRC, and the TSRC syntax may indicate syntax according to TSRC.
[0384] For example, based on the TSRC enable flag having a value of 1, the residual coding syntax of the current block can be derived as a conventional residual coding (RRC) syntax. In this case, for example, a transform skip flag for whether the current block is a transform skip block can be obtained, and the value of the transform skip flag can be 1. For example, the image information may include a transform skip flag of the current block. The transform skip flag can indicate whether the current block is a transform skip block. That is, the transform skip flag can indicate whether a transform has been applied to the transform coefficients of the current block. The syntax element representing the transform skip flag can be transform_skip_flag as described above. For example, if the value of the transform skip flag is 1, the transform skip flag can indicate that a transform has not been applied to the current block (that is, the transform is skipped), and if the value of the transform skip flag is 0, the transform skip flag can indicate that a transform has been applied to the current block. For example, if the current block is a transform skip block, the value of the transform skip flag of the current block can be 1.
[0385] In addition, for example, based on a TSRC enable flag having a value of 0, the residual coding syntax of the current block may be derived as a transform skip residual coding (TSRC) syntax. In addition, for example, a transform skip flag for determining whether the current block is a transform skip block may be obtained, and based on a transform skip flag having a value of 1 and a TSRC enable flag having a value of 0, the residual coding syntax of the current block may be derived as a transform skip residual coding (TSRC) syntax. In addition, for example, a transform skip flag for determining whether the current block is a transform skip block may be obtained, and based on a transform skip flag having a value of 0 and a TSRC enable flag having a value of 0, the residual coding syntax of the current block may be determined to be a transform skip residual coding (TSRC) syntax. In addition, for example, a transform skip flag for determining whether the current block is a transform skip block may be obtained, and based on a transform skip flag having a value of 0 and a TSRC enable flag having a value of 0, the residual coding syntax of the current block may be derived as a regular residual coding (RRC) syntax.
[0386] Thereafter, for example, the decoding device may obtain residual information of the derived residual coding syntax of the current block.The image information may include the residual information.
[0387] For example, if the residual coding syntax of the current block is derived as RRC syntax, the decoding device may obtain the residual information of the RRC syntax of the current block. For example, the residual information of the RRC syntax may include the syntax elements disclosed in Table 2 as described above.
[0388] For example, the residual information of the RRC syntax may include syntax elements of the transform coefficients of the current block. Here, the transform coefficients may be expressed as residual coefficients.
[0389] For example, the syntax elements 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, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1]), abs_remainder, dec_abs_level, and / or coeff_sign_flag.
[0390] Specifically, for example, the syntax element may include position information indicating the position of the last non-zero transform coefficient in the residual coefficient array of the current block. That is, the syntax element may include position information indicating the position of the last non-zero transform coefficient in the scanning order of the current block. The position information may include information indicating a prefix of the column position of the last non-zero transform coefficient, information indicating a prefix of the row position of the last non-zero transform coefficient, information indicating a suffix of the column position of the last non-zero transform coefficient, and information indicating a suffix of the row position of the last non-zero transform coefficient. The syntax elements of the position information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. In addition, the non-zero transform coefficient may be referred to as a significant coefficient.
[0391] In addition, for example, the syntax element may include a coded sub-block flag indicating whether the current sub-block of the current block includes a non-zero transform coefficient, a significant coefficient flag indicating whether the transform coefficient of the current block is a non-zero transform coefficient, a first coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a first threshold, a parity level flag indicating parity of the coefficient level, and / or a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold. Here, the coded sub-block flag may be sb_coded_flag or coded_sub_block_flag, the significant coefficient flag may be sig_coeff_flag, the first coefficient level flag may be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag may be par_level_flag, and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
[0392] In addition, for example, the syntax element may include coefficient value related information of the transform coefficient value of the current block. The coefficient value related information may be abs_remainder and / or dec_abs_level.
[0393] In addition, for example, the syntax element may include a sign flag indicating the sign of the transform coefficient. The sign flag may be coeff_sign_flag.
[0394] For example, if the residual coding syntax of the current block is derived as a TSRC syntax, the decoding device may obtain the residual information of the TSRC syntax of the current block. For example, the residual information of the TSRC syntax may include the syntax elements disclosed in Table 3 as described above.
[0395] For example, the residual information of the TSRC syntax may include syntax elements of the transform coefficients of the current block. Here, the transform coefficients may also be expressed as residual coefficients.
[0396] For example, the syntax elements may include context coding syntax elements and / or bypass coding syntax elements for transform coefficients. The syntax elements may include syntax elements such as sig_coeff_flag, coeff_sign_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and / or abs_level_gtx_flag[n][4]), abs_remainder, and / or coeff_sign_flag.
[0397] For example, a context coding syntax element for a transform coefficient may include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a sign flag indicating the sign of the transform coefficient, a first coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a first threshold, and / or a parity level flag indicating the parity of the transform level of the transform coefficient. Furthermore, for example, the context coding syntax element may include a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold, a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third threshold, a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the significant coefficient flag may be sig_coeff_flag, the sign flag may be ceff_sign_flag, the first coefficient level flag may be abs_level_gt1_flag, and the parity level flag may be par_level_flag. Additionally, the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag may be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag may be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag may be abs_level_gt9_flag or abs_level_gtx_flag.
[0398] In addition, for example, the bypass coding syntax element of the transform coefficient may include coefficient level information of the value of the transform coefficient (or coefficient level) and / or a sign flag indicating the sign of the transform coefficient. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.
[0399] The decoding device derives motion information of the current block based on the prediction-related information (S1340). For example, the decoding device may derive motion information of the current block based on an inter-frame prediction mode determined based on the prediction-related information. For example, the decoding device may construct a motion information candidate list for the current block, may select a motion information candidate in the motion information candidate list based on motion information candidate index information included in the prediction-related information, and may derive motion information of the current block based on the selected motion information candidate.
[0400] The decoding device derives a prediction sample of the current block based on the motion information (S1350). For example, the decoding device may derive the reference picture of the current block based on the reference picture index of the current block, and derive the prediction sample of the current block based on the sample of the reference block in the reference picture indicated by the motion vector of the current block. The motion information may include the motion vector and the reference picture index of the current block.
[0401] The decoding apparatus derives residual samples of the current block based on the residual information (S1360). For example, the decoding apparatus may derive transform coefficients of the current block based on the residual information, and may derive residual samples of the current block based on the transform coefficients.
[0402] For example, the decoding device may derive transform coefficients for the current block based on the syntax elements of the residual information. Thereafter, the decoding device may derive residual samples for the current block based on the transform coefficients. For example, if the transform skip flag indicates that a transform is not applied to the current block, i.e., if the transform skip flag has a value of 1, the decoding device may derive the transform coefficients as the residual samples for the current block. Furthermore, for example, if the transform skip flag indicates that a transform is not applied to the current block, i.e., if the transform skip flag has a value of 1, the decoding device may derive the residual samples for the current block by inverse quantizing the transform coefficients. Furthermore, for example, if the transform skip flag indicates that a transform is applied to the current block, i.e., if the transform skip flag has a value of 0, the decoding device may derive the residual samples for the current block by performing an inverse transform on the transform coefficients. Furthermore, for example, if the transform skip flag indicates that a transform is applied to the current block, i.e., if the transform skip flag has a value of 0, the decoding device may derive the residual samples for the current block by inverse quantizing the transform coefficients and then performing an inverse transform on the inverse quantized transform coefficients.
[0403] Furthermore, for example, whether dependent quantization is applied to the current block may be determined based on a dependent quantization enable flag. For example, if the value of the dependent quantization enable flag is 1 (i.e., if the dependent quantization enable flag indicates that dependent quantization is enabled), dependent quantization may be applied to the current block. For example, if dependent quantization is applied to the current block, the decoding device may derive residual samples for the current block by performing dependent quantization on the transform coefficients. That is, for example, when dependent quantization is applied to the current block, the decoding device may derive residual samples for the current block based on the dependent quantization of the transform coefficients. For example, when dependent quantization is applied to the current block, the decoding device may update a dependent quantization state (Qstate) based on the coefficient level of the transform coefficient immediately preceding the current transform coefficient in scan order, derive the coefficient level of the current transform coefficient based on the updated state and syntax elements of the current transform coefficient, and derive residual samples by inverse quantizing the derived coefficient level. For example, the current transform coefficient may be quantized based on a quantization parameter of a reconstruction level of the current transform coefficient in a scalar quantizer for the updated state. Here, the reconstruction level may be derived based on the syntax elements of the current transform coefficient.
[0404] In addition, for example, when dependent quantization is not applied to the current block, the decoding device may derive the coefficient level of the transform coefficient based on the syntax element of the transform coefficient of the current block, and may derive the residual sample by inverse quantizing the coefficient level. That is, for example, when dependent quantization is not applied to the current block, the decoding device may not perform the state (Qstate) update process performed based on the coefficient level of the transform coefficient immediately preceding the current transform coefficient in the scanning order.
[0405] The decoding device generates a reconstructed picture based on the prediction samples and the residual samples (S1370). For example, the decoding device may generate a reconstructed sample and / or a reconstructed picture of the current block based on the prediction samples and the residual samples. For example, the decoding device may generate the reconstructed sample by adding the prediction samples and the residual samples to each other.
[0406] Thereafter, if necessary, in order to enhance subjective / objective picture quality, a loop filtering process such as deblocking filtering, SAO and / or ALF process may be applied to the reconstructed picture as described above.
[0407] Figure 14 A decoding device that performs an image decoding method according to the present disclosure is briefly illustrated. Figure 13 The method disclosed in Figure 14 Specifically, for example, Figure 14 The entropy decoder of the decoding device can perform Figure 13 S1300 to S1330, Figure 14 The predictor of the decoding device can perform Figure 13 S1340 to S1350, Figure 14 The residual processor of the decoding device can perform Figure 13 S1360 in the Figure 14 The adder of the decoding device can perform Figure 13 S1370 in.
[0408] According to the present disclosure, residual coding efficiency can be enhanced.
[0409] In addition, according to the present disclosure, a signaling relationship between a dependent quantization enable flag and a TSRC enable flag can be established, and if dependent quantization is not enabled, the TSRC enable flag can be signaled, and by doing so, if TSRC is not enabled and then the RRC syntax is encoded for the transform skip block, dependent quantization is not used, so that the coding efficiency can be improved, and the overall residual coding efficiency can be improved by reducing the amount of encoded bits.
[0410] In addition, according to the present disclosure, the TSRC enable flag can be signaled only when dependent quantization is not used, and by doing so, the encoding of the RRC syntax and the use of dependent quantization for the transform skip block do not overlap with each other, and the TSRC enable flag can be encoded more efficiently, so that the bit amount can be reduced and the overall residual coding efficiency can be improved.
[0411] In the above embodiments, the method is described based on a flow chart with a series of steps or boxes. The present disclosure is not limited to the order of the above steps or boxes. Some steps or boxes can be performed in an order different from the above-mentioned other steps or boxes or performed simultaneously. In addition, it will be understood by those skilled in the art that the steps shown in the flow chart are not exclusive and may also include other steps, or one or more steps in the flow chart may be deleted without affecting the scope of the present disclosure.
[0412] The embodiments described in this specification can be implemented on a processor, microprocessor, controller, or chip. For example, the functional units shown in each figure can be implemented on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information about instructions) or algorithms used for implementation can be stored in a digital storage medium.
[0413] In addition, the decoding device and encoding device to which the present disclosure is applied may be included in the following devices: multimedia broadcast transmission / reception devices, mobile communication terminals, home theater video devices, digital theater video devices, surveillance cameras, video chat devices, real-time communication devices such as video communication, mobile streaming devices, storage media, portable cameras, VoD service providers, over-the-top (OTT) video devices, Internet streaming service providers, three-dimensional (3D) video devices, teleconferencing video devices, transportation user devices (e.g., vehicle user devices, aircraft user devices, and ship user devices), and medical video devices; and the decoding device and encoding device to which the present disclosure is applied may be used to process video signals or data signals. For example, over-the-top (OTT) video devices may include game consoles, Blu-ray players, Internet-accessible televisions, home theater systems, smartphones, tablet computers, digital video recorders (DVRs), and the like.
[0414] In addition, the processing method of the present invention can be generated in the form of a program executed by a computer and can be stored in a computer-readable recording medium. The multimedia data with a data structure according to the present invention can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, BD, universal serial bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk and optical data storage device. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier wave (for example, transmission via the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or transmitted through a wired / wireless communication network.
[0415] In addition, the embodiments of the present disclosure may be implemented using a computer program product according to a program code, and the program code may be executed in a computer through the embodiments of the present disclosure. The program code may be stored on a computer-readable carrier.
[0416] Figure 15 The structure diagram of the content streaming system to which the present disclosure is applied is illustrated.
[0417] A content streaming system to which the embodiments of the present disclosure are applied may mainly include an encoding server, a streaming server, a network server, a media storage, a user device, and a multimedia input device.
[0418] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, or camcorder into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, when the multimedia input device such as a smartphone, camera, or camcorder directly generates the bitstream, the encoding server can be omitted.
[0419] A bitstream may be generated by applying the encoding method or the bitstream generating method according to the embodiment of the present disclosure, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0420] The streaming server sends multimedia data to user devices via a network server based on user requests. The network server also serves as a medium for notifying users of services. When a user requests a desired service from the network server, the network server delivers the request to the streaming server, which then sends the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control commands and responses between devices within the content streaming system.
[0421] The streaming media server can receive content from a media storage and / or encoding server. For example, when receiving content from an encoding server, the content can be received in real time. In this case, in order to provide a stable streaming service, the streaming media server can store the bitstream for a predetermined period of time.
[0422] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigators, touch-screen PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, and head-mounted displays), digital TVs, desktop computers, and digital signage, etc. Each server within the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.
[0423] The claims described in this disclosure can be combined in various ways. For example, the technical features of the method claims of this disclosure can be combined to implement an apparatus, and the technical features of the apparatus claims of this disclosure can be combined to implement a method. Furthermore, the technical features of the method claims of this disclosure can be combined with the technical features of the apparatus claims of this disclosure to implement an apparatus, and the technical features of the method claims of this disclosure can be combined with the technical features of the apparatus claims of this disclosure to implement a method.
Claims
1. A decoding device for image decoding, the decoding device comprising: Memory; as well as at least one processor coupled to the memory, the at least one processor configured to: Get prediction related information of the current block; Get the dependency quantization enable flag used to determine whether to enable dependency quantization; Obtaining a TSRC disable flag for enabling transform skip residual coding (TSRC) based on the quantization-dependent enable flag; Obtaining residual information of the residual coding syntax of the current block derived based on the TSRC disable flag; deriving motion information of the current block based on the prediction related information; deriving a prediction sample of the current block based on the motion information; deriving residual samples of the current block based on the residual information; as well as generating a reconstructed picture based on the prediction samples and the residual samples, wherein the TSRC disable flag is obtained based on the dependent quantization enable flag having a value of 0, and The TSRC disable flag is signaled via slice header syntax.
2. The decoding device according to claim 1, wherein The dependent quantization enable flag having a value of 1 indicates that the dependent quantization is enabled, and The dependent quantization enable flag having a value of 0 indicates that the dependent quantization is not enabled.
3. The decoding device according to claim 2, wherein: Deriving the residual sample includes: When the dependent quantization is applied to the current block, updating the dependent quantization state Qstate based on the coefficient level of the transform coefficient before the current transform coefficient; deriving a coefficient level of the current transform coefficient based on a syntax element of the current transform coefficient in the residual information and the updated state; and The residual samples are derived by inverse quantizing the derived coefficient levels.
4. The decoding device according to claim 1, wherein The TSRC disable flag having a value of 1 indicates that the TSRC is not enabled, and The TSRC disable flag having a value of 0 indicates that the TSRC is enabled.
5. The decoding device according to claim 1, wherein When the value of the dependent quantization enable flag is 1, the TSRC disable flag is not obtained and the value of the TSRC disable flag is derived to be 0. The decoding device according to claim 1 , wherein: When the dependent quantization is not enabled for the current block, the TSRC disable flag is obtained.
7. The decoding device according to claim 4, wherein: The residual coding syntax of the current block based on the TSRC disable flag having a value of 1 is determined to be a normal residual coding RRC syntax.
8. The decoding device according to claim 7, wherein: When the current block is a transform skip block and the value of the TSRC disable flag is 0, the residual coding syntax of the current block is determined to be a TSRC syntax.
9. The decoding device according to claim 8, wherein obtain a transform skip flag for determining whether to apply transform skip to the current block, and The value of the transform skip flag is 1.
10. The decoding device according to claim 8, wherein: The TSRC syntax includes context coding syntax elements for transform coefficients, and The context encoding syntax element includes a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a parity level flag for the parity of the coefficient level of the transform coefficient, a sign flag indicating the sign of the transform coefficient, a first coefficient level flag for whether the coefficient level is greater than a first threshold, and a second coefficient level flag for whether the coefficient level of the transform coefficient is greater than a second threshold.
11. A coding device for image coding, the coding device comprising: Memory; as well as at least one processor coupled to the memory, the at least one processor configured to: Derives prediction samples of the current block based on inter-frame prediction; Encoding prediction related information of the current block; A dependent quantization enable flag encoding whether dependent quantization is enabled; encoding a TSRC disable flag for enabling transform skip residual coding (TSRC) based on the quantization-dependent enable flag; Determining a residual coding syntax of the current block based on the TSRC disable flag; encoding residual information of the determined residual coding syntax of the current block; as well as generating a bitstream including the prediction related information, the dependent quantization enable flag, the TSRC disable flag and the residual information, wherein the TSRC disable flag is encoded based on the dependent quantization enable flag having a value of 0, and The TSRC disable flag is signaled via slice header syntax.
12. The encoding device according to claim 11, wherein The dependent quantization enable flag having a value of 1 indicates that the dependent quantization is enabled, and The dependent quantization enable flag having a value of 0 indicates that the dependent quantization is not enabled.
13. The encoding device according to claim 11, wherein When the dependent quantization is not enabled for the current block, the TSRC disable flag is encoded.
14. The encoding device according to claim 11, wherein When the value of the dependent quantization enable flag is 1, the TSRC disable flag is not encoded.
15. A device for transmitting data for an image, the device comprising: At least one processor is configured to: obtain a bitstream of image information including residual information, wherein the bitstream is generated by the following operations: deriving a prediction sample of a current block based on inter-frame prediction, encoding prediction-related information of the current block, encoding a dependent quantization enable flag indicating whether to enable dependent quantization, encoding a TSRC disable flag for enabling transform skip residual coding (TSRC) based on the dependent quantization enable flag, determining a residual coding syntax of the current block based on the TSRC disable flag, encoding residual information of the determined residual coding syntax of the current block, and generating a bitstream including the prediction-related information, the dependent quantization enable flag, the TSRC disable flag, and the residual information; a transmitter configured to transmit the data of the bitstream containing the image information including the residual information, wherein the TSRC disable flag is encoded based on the dependent quantization enable flag having a value of 0, and The TSRC disable flag is signaled via slice header syntax.
Citation Information
Patent Citations
Image encoding / decoding method
CN109644276A
Coefficient level coding in video coding
KR1020180048929A