Image decoding method and its device
By optimizing the image decoding method and device, and generating reconstructed samples using prediction and residual processing, the problem of high-resolution image transmission and storage costs is solved and the compilation efficiency is improved.
Patent Information
- Application Number
- CN202080068623.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-08-31
- Filing Date
- 2020-08-31
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2040-08-31
AI Technical Summary
When the prior art transmits and stores high-resolution and high-quality images, the increase in the amount of information leads to high transmission and storage costs, and it is necessary to improve image compilation efficiency.
Through the image decoding method and device, a reconstructed sample is generated based on the prediction mode and residual information by using an entropy decoder, predictor, residual processor and adder, and the reconstruction sample is generated based on the prediction mode and residual information, the residual compilation structure is optimized, and the bypass compilation complexity is reduced.
It improves residual compilation efficiency, reduces the complexity of signal transmission, and improves the overall compilation efficiency.
Smart Images

Figure CN114467301B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an image compilation technology, and more particularly, to an image compilation method and apparatus thereof, in an image compilation system, when all bins used for compiling the maximum available context of the current block in the compiled residual data are used, subsequent residual data is compiled according to a simplified residual data compilation structure. Background Art
[0002] Recently, in various fields, the demand for high-resolution and high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images is increasing. Since image data has high resolution and high quality, the amount of information or bits to be transmitted increases compared to traditional image data. Therefore, when transmitting image data using a medium such as a traditional wired / wireless broadband line or storing image data using an existing storage medium, the transmission cost and storage cost increase.
[0003] Therefore, there is a need for an efficient image compression technology for effectively transmitting, storing, and reproducing information of high-resolution and high-quality images. Summary of the Invention
[0004] Technical Problem
[0005] The present disclosure provides a method and apparatus for improving image compilation efficiency.
[0006] The present disclosure also provides a method and apparatus for improving residual compilation efficiency.
[0007] Technical Solution
[0008] According to an embodiment of this document, an image decoding method performed by a decoding device is provided. The method includes: obtaining, through a bitstream, image information including residual information and prediction mode information of a current block, deriving a prediction mode of the current block based on the prediction mode information, deriving a prediction sample of the current block based on the prediction mode, deriving a residual sample of the current block based on the residual information, and generating a reconstructed sample of the current block based on the prediction sample and the residual sample.
[0009] According to another embodiment of this document, a decoding device for performing image decoding is provided. The decoding device includes: an entropy decoder configured to obtain, through a bitstream, image information including residual information and prediction mode information of a current block; a predictor configured to derive a prediction mode of the current block based on the prediction mode information and derive a prediction sample of the current block based on the prediction mode; a residual processor configured to derive a residual sample of the current block based on the residual information; and an adder configured to generate a reconstructed sample of the current block based on the prediction sample and the residual sample.
[0010] According to another embodiment of this document, an image encoding method performed by an encoding device is provided. The method includes: deriving prediction samples of a current block based on inter-frame prediction or intra-frame prediction, deriving residual samples of the current block based on the prediction samples, deriving transform coefficients of the current block based on the residual samples, and encoding image information including prediction mode information of the current block and residual information for the transform coefficients.
[0011] According to another embodiment of this document, an image encoding device is provided. The encoding device includes: a predictor configured to derive prediction samples of a current block based on inter-frame prediction or intra-frame prediction; a residual processor configured to derive residual samples of the current block based on the prediction samples and derive transform coefficients of the current block based on the residual samples; and an entropy encoder configured to encode image information including prediction mode information of the current block and residual information for the transform coefficients.
[0012] According to another embodiment of this document, a non-transitory computer-readable storage medium storing a bitstream including image information for causing an image decoding method to be executed is provided. In the non-transitory computer-readable storage medium, the image decoding method includes: obtaining, through the bitstream, image information including residual information and prediction mode information of a current block, deriving a prediction mode of the current block based on the prediction mode information, deriving prediction samples of the current block based on the prediction mode, deriving residual samples of the current block based on the residual information, and generating reconstructed samples of the current block based on the prediction samples and the residual samples.
[0013] Beneficial effects
[0014] According to the present disclosure, the efficiency of residual compilation can be improved.
[0015] According to the present disclosure, when consuming the maximum number of context compilation bins for a current block in TSRC, a syntax element according to a simplified residual data compilation structure can be signaled, and thereby, the compilation complexity of the syntax element for bypass compilation is reduced, and the overall residual compilation efficiency can be improved.
[0016] According to the present disclosure, as the compilation order of the syntax element for bypass compilation, an order in which the syntax element takes precedence can be used, and thereby, the compilation efficiency of the syntax element for bypass compilation can be improved, and the overall residual compilation efficiency can be improved. Brief description of the drawings
[0017] Figure 1 Briefly illustrate an example of a video / image encoding device to which embodiments of the present disclosure can be applied.
[0018] Figure 2It is a schematic diagram showing the configuration of a video / image encoding device to which embodiments of the present disclosure can be applied.
[0019] Figure 3 It is a schematic diagram showing the configuration of a video / image decoding device to which embodiments of the present disclosure can be applied.
[0020] Figure 4 It illustrates an example of a video / image encoding method based on intra prediction.
[0021] Figure 5 It illustrates an example of a video / image encoding method based on intra prediction.
[0022] Figure 6 It schematically shows the intra prediction process.
[0023] Figure 7 It illustrates an example of a video / image encoding method based on inter prediction.
[0024] Figure 8 It illustrates an example of a video / image decoding method based on inter prediction.
[0025] Figure 9 It schematically shows the inter prediction process.
[0026] Figure 10 It exemplarily shows context adaptive binary arithmetic coding (CABAC) for encoding syntax elements.
[0027] Figure 11 It is a diagram showing exemplary transform coefficients within a 4×4 block.
[0028] Figure 12 It illustrates an example in which syntax elements are coded in TSRC.
[0029] Figure 13 It illustrates another example in which syntax elements are coded in TSRC.
[0030] Figure 14 It illustrates another example in which syntax elements are coded in TSRC.
[0031] Figure 15 It illustrates an example in which bypass-coded syntax elements are coded in TSRC in a syntax element-first coding order instead of a coefficient position-first coding order.
[0032] Figure 16 It illustrates an example in which bypass-coded syntax elements are coded in TSRC in a syntax element-first coding order instead of a coefficient position-first coding order.
[0033] Figure 17Illustrate an example of compiling syntax elements in a simplified residual data compilation structure.
[0034] Figure 18 Illustrate an example of compiling bypass-compiled syntax elements in a simplified residual data compilation structure in a syntax-element-first compilation order rather than a coefficient-position-first compilation order.
[0035] Figure 19a and 19b Illustrate an embodiment in which syntax elements are compiled in a simplified residual data compilation structure.
[0036] Figure 20a and 20b Illustrate an example of compiling bypass-compiled syntax elements in a simplified residual data compilation structure in a syntax-element-first compilation order rather than a coefficient-position-first compilation order.
[0037] Figure 21 Illustrate an embodiment in which syntax elements are compiled in a simplified residual data compilation structure.
[0038] Figure 22 Illustrate an example of compiling bypass-compiled syntax elements in a simplified residual data compilation structure in a syntax-element-first compilation order rather than a coefficient-position-first compilation order.
[0039] Figure 23 Briefly illustrate an image encoding method performed by an encoding device according to the present disclosure.
[0040] Figure 24 Briefly illustrate an encoding device for performing an image encoding method according to the present disclosure.
[0041] Figure 25 Briefly illustrate an image decoding method performed by a decoding device according to the present disclosure.
[0042] Figure 26 Briefly illustrate a decoding device for performing an image decoding method according to the present disclosure.
[0043] Figure 27 Illustrate a structural diagram of a content streaming system applying the present disclosure. Detailed Description
[0044] The present disclosure can be modified in various forms, and specific embodiments thereof will be described and illustrated in the accompanying drawings. However, the embodiments are not intended to limit the present disclosure. The terms used in the following description are only for describing specific embodiments and are not intended to limit the present disclosure. As long as it is clearly understood in a different way, singular expressions include plural expressions. 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, and thus it should be understood that the possibility of the presence or addition of one or more different features, numbers, steps, operations, elements, components, or combinations thereof is not excluded.
[0045] In addition, the elements in the accompanying drawings described in the present disclosure are independently drawn for the convenience of explaining different specific functions, and do not mean that these elements are embodied by independent hardware or independent software. For example, two or more of the elements may be combined to form a single element, or one element may be divided into multiple elements. Embodiments in which elements are combined and / or divided belong to the present disclosure without departing from the concept of the present disclosure.
[0046] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. In addition, throughout the drawings, like reference numerals are used to indicate like elements, and the same description of like elements will be omitted.
[0047] Figure 1 Briefly illustrate an example of a video / image compilation device to which embodiments of the present disclosure can be applied.
[0048] Refer to Figure 1 , a video / image compilation system may include a first device (source device) and a second device (receiving device). The source device may send encoded video / image information or data to the receiving device in the form of a file or a stream via a digital storage medium or a network.
[0049] 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.
[0050] The video source can obtain video / images through processes such as capturing, synthesizing, or generating video / images. The video source can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive including previously captured video / images, etc. The video / image generation device can include, for example, a computer, a tablet, and a smart phone, and can (electronically) generate video / images. For example, virtual video / images can be generated by a computer, etc. In this case, the video / image capture process can be replaced by a process of generating relevant data.
[0051] The encoding device can encode the input video / images. The encoding device can perform a series of processes such as prediction, transformation, and quantization to achieve compression and compilation efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0052] The transmitter can send the encoded image / image information or data output in the form of a bitstream to the receiver of the receiving device in the form of a file or a stream through a digital storage medium or a network. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter can include elements for generating a media file in a predetermined file format and can include elements for transmitting through a broadcast / communication network. The receiver can receive / extract the bitstream and send the received bitstream to the decoding device.
[0053] The decoding device can decode the video / images by performing a series of processes such as dequantization, inverse transformation, and prediction corresponding to the operations of the encoding device.
[0054] The renderer can render the decoded video / images. The rendered video / images can be displayed through a display.
[0055] This disclosure relates to video / image compilation. For example, the methods / embodiments disclosed in this disclosure can be applied to the methods disclosed in Versatile Video Coding (VVC), Efficient Video Coding (EVC) standard, AOMedia Video 1 (AV1) standard, Second Generation Audio Video Coding Standard (AVS2), or a next-generation video / image compilation standard (e.g., H.267, or H.268, etc.).
[0056] This disclosure presents various embodiments of video / image compilation, and unless otherwise mentioned, the embodiments can be executed in combination with each other.
[0057] In the present disclosure, a video may refer to a series of images over time. Generally, a picture refers to a unit representing an image in a specific time zone, and a sub-picture / slice / tile is a unit that forms part of a picture being compiled. A sub-picture / slice / tile may include one or more Compilation Tree Units (CTUs). A picture may be composed of one or more sub-pictures / slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles. A brick may represent a rectangular area of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each brick consisting of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick. Brick scan may sort CTUs in a specific order for the partitioned CTUs of a picture, where CTUs are sorted continuously in raster scan order within a brick, bricks within a tile are sorted continuously in raster scan order of the tiles of the tile, and tiles in a picture are sorted continuously in raster scan order of the tiles of the picture. Additionally, 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 jointly cover a rectangular area of the picture. A tile is a rectangular area of CTUs within a specific tile column and a specific tile row in a picture. A tile column is a rectangular area of CTUs, the height of which is equal to the height of the picture and the width of which is specified by a syntax element in the picture parameter set. A tile row is a rectangular area of CTUs, the height of which is specified by a syntax element in the picture parameter set and the width of which is equal to the width of the picture. Tile scan is a specific order sorting of CTUs for the partitioned CTUs of a picture, where CTUs may be sorted continuously in raster scan order within a tile, while tiles in a picture may be sorted continuously in raster scan order of the tiles of the picture. A slice includes an integer number of bricks that can be exclusively included in a single NAL unit of a picture. A slice may consist of multiple complete tiles or only of complete bricks in a continuous sequence of a single tile. In the present disclosure, tile group and slice 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.
[0058] A pixel or pel may represent the smallest unit that makes up a picture (or image). Additionally, "sample" may be used as a term corresponding to a pixel. A sample generally may represent a pixel or a pixel value, and may represent only the pixel / pixel value of the luminance component or only the pixel / pixel value of the chrominance component.
[0059] A unit may represent a basic unit of image processing. A unit may include at least one of a specific area of a picture and information related to the area. A unit may include one luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as a block or a region. Generally, an M×N block may include a set (or array) of samples (or sample arrays) or transform coefficients having M columns and N rows.
[0060] In this specification, "A or B" may mean "only A", "only B", or "A and B". In other words, in this specification, "A or B" may be interpreted as "A and / or B". For example, "A, B, or C" herein means "only A", "only B", "only C", or "any one and any combination of A, B, and C".
[0061] The slashes ( / ) or commas used in this specification may mean "and / or". For example, "A / B" may mean "A and / or B". Thus, "A / B" may mean "only A", "only B", or "A and B". For example, "A, B, C" may mean "A, B, or C".
[0062] In this specification, "at least one of A and B" may mean "only A", "only B", or "both A and B". Additionally, in this specification, the expressions "at least one of A or B" or "at least one of A and / or B" may be interpreted the same as "at least one of A and B".
[0063] Moreover, 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". Further, "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".
[0064] Furthermore, the parentheses used in this specification may mean "for example". Specifically, when indicating "prediction (intra prediction)", "intra prediction" may be presented as an example of "prediction". In other words, "prediction" in this specification is not limited to "intra prediction", and "intra prediction" may be presented as an example of "prediction". Moreover, even when indicating "prediction (i.e., intra prediction)", "intra prediction" may still be presented as an example of "prediction".
[0065] In this specification, the technical features separately described in a figure may be implemented separately or may be implemented simultaneously.
[0066] The following drawings are created to explain specific examples of this specification. Since the names of specific devices or the names of specific signals / messages / fields described in the drawings are presented by way of example, the technical features of this specification are not limited to the specific names used in the following drawings.
[0067] Figure 2 is a schematic diagram showing the configuration of a video / image encoding device to which embodiments of the present disclosure can be applied. Hereinafter, the video encoding device may include an image encoding device.
[0068] Referring to Figure 2 , the encoding device 200 includes an image splitter 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter-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 further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstruction block generator. According to an embodiment, the image splitter 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250, and the filter 260 may be constituted by at least one hardware component (e.g., an encoder chipset or a processor). Additionally, the memory 270 may include a decoded picture buffer (DPB) or may be constituted by a digital storage medium. The hardware component may further include the memory 270 as an internal / external component.
[0069] The image splitter 210 may split an input image (or picture or frame) input to the encoding device 200 into one or more processors. For example, the processor may be referred to as a compilation unit (CU). In this case, the compilation unit may be recursively split from a compilation tree unit (CTU) or a largest compilation unit (LCU) according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, a compilation unit may be split into multiple deeper compilation units based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quadtree structure may be applied first, and then the binary tree structure and / or the ternary structure may be applied. Alternatively, the binary tree structure may be applied first. The compilation process according to the present disclosure may be performed based on the final compilation unit that is no longer split. In this case, the largest compilation unit may be used as the final compilation unit based on compilation efficiency according to the image characteristics, or if necessary, the compilation unit may be recursively split into deeper compilation units and the compilation unit with the optimal size may be used as the final compilation unit. Here, the compilation process may include processes of prediction, transformation, and reconstruction, which will be described later. As another example, the processor may further include a prediction unit (PU) or a transformation unit (TU). In this case, the prediction unit and the transformation unit may be split or divided from the above-mentioned final compilation unit. The prediction unit may be a unit for sample prediction, and the transformation unit may be a unit for deriving transformation coefficients and / or a unit for deriving a residual signal from the transformation coefficients.
[0070] In some cases, a unit may be used interchangeably with terms such as a block or a region. In general, an M×N block may represent a set of samples or transformation coefficients composed of M columns and N rows. A sample may generally represent a pixel or a pixel value, a pixel / pixel value representing only a luminance component, or a pixel / pixel value representing only a chrominance component. A sample may be used as a term corresponding to a picture (or image) of pixels or picture elements.
[0071] In the encoding apparatus 200, a 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 apparatus 200 for subtracting the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) may be referred to as the subtractor 231. The predictor may perform prediction on the block to be processed (hereinafter referred to as the current block) and generate a prediction block including the prediction samples of the current block. The predictor can determine whether to apply intra-frame prediction or inter-frame prediction in units of the current block or CU. As described later in the description of each prediction mode, the predictor may 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 may be encoded in the entropy encoder 240 and output in the form of a bitstream.
[0072] The intra-frame predictor 222 may predict the current block by referring to the samples in the current picture. Depending on the prediction mode, the samples referred to may be located near the current block or may be far from the current block. In intra-frame prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, the DC mode and the planar mode. Depending on the level of detail of the prediction direction, the directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the settings. The intra-frame predictor 222 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0073] The inter - frame predictor 221 can derive a prediction block of a current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. Here, in order to reduce the amount of motion information transmitted in the inter - frame prediction mode, the motion information can be predicted in units of blocks, sub - blocks, or samples based on the correlation of the motion information between 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 inter - frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter - frame prediction, neighboring blocks can include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block can be the same or different. The temporal neighboring block can be referred to as a collocated reference block, a co - located CU (colCU), etc., and the reference picture including the temporal neighboring block can be referred to as a collocated picture (colPic). For example, the inter - frame predictor 221 can configure a motion information candidate list based on neighboring blocks, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter - frame prediction can be performed based on various prediction modes. For example, in the skip mode and the merge mode, the inter - frame predictor 221 can use the motion information of neighboring blocks as the motion information of the current block. In the skip mode, different from the merge mode, a residual signal may not be sent. In the case of the motion vector prediction (MVP) mode, the motion vector of a neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling a motion vector difference.
[0074] The predictor 220 can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra - frame prediction or inter - frame prediction to predict a block, but also apply both intra - frame prediction and inter - frame prediction simultaneously. This can be referred to as combined intra - inter prediction (CIIP). Additionally, the predictor can predict a block based on the intra - block copy (IBC) prediction mode or the palette mode. The IBC prediction mode or the palette mode can be used for content image / video compilation such as games, for example, screen content coding (SCC). IBC basically performs prediction in the current picture, but IBC can be performed similar to inter - frame prediction because the reference block is derived in the current picture. That is, IBC can use at least one of the inter - frame prediction techniques described in this disclosure. The palette mode can be regarded as an example of intra - frame compilation or intra - frame prediction. When the palette mode is applied, the sample values within the picture can be signaled based on information about the palette table and the palette index.
[0075] The prediction signal generated by a predictor (including the inter-frame predictor 221 and / or the intra-frame predictor 222) can be used to generate a reconstructed signal or to generate a residual signal. The transformer 232 can generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique can 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 non-linear transform (CNT). Here, GBT represents a transform obtained from a graph when the relationship information between pixels is represented by the graph. CNT refers to a transform generated based on a prediction signal generated using all previously reconstructed pixels. Additionally, the transform processing can be applied to a square pixel block of the same size, or can be applied to a block having a variable size rather than a square shape.
[0076] Quantizer 233 may quantize the transform coefficients and send them to entropy encoder 240, and entropy encoder 240 may encode the quantized signals (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients may be referred to as residual information. Quantizer 233 may rearrange the block type quantized transform coefficients into a one-dimensional vector form based on the coefficient scan order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. Information about the transform coefficients may be generated. Entropy encoder 240 may perform various encoding methods, such as, for example, exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. Entropy encoder 240 may encode the information required for video / image reconstruction other than the quantized transform coefficients (e.g., values of syntax elements, etc.) together or separately. The encoded information (e.g., encoded video / image information) can be sent or stored in units of NAL (network abstraction layer) in the form of a bitstream. The video / image information may also include information about various parameter sets such as adaptive parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS). Additionally, the video / image information may further include general constraint information. In the present disclosure, the information and / or syntax elements sent / signaled from the encoding device to the decoding device may be included in the video / picture information. The video / image information may be encoded through the above encoding process and included in the bitstream. The bitstream may be sent through 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) for sending the signal output from entropy encoder 240 and / or a storage unit (not shown) for storing the signal may be included as internal / external elements of encoding device 200. Alternatively, the transmitter may be included in entropy encoder 240.
[0077] 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 by using the dequantizer 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 in the case where the skip mode is applied), the predicted block can be used as the 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.
[0078] In addition, during picture encoding and / or reconstruction, luminance mapping and chrominance scaling (LMCS) can be applied.
[0079] 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). The various filtering methods can 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 the various filtering methods. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bitstream.
[0080] The modified reconstructed picture sent to the memory 270 can be used as a reference picture in the inter-frame predictor 221. When inter-frame prediction is applied by the encoding device, prediction mismatches between the encoding device 200 and the decoding device can be avoided, and the encoding efficiency can be improved.
[0081] The DPB of the memory 270 can store the modified reconstructed picture used as a reference picture in the inter-frame predictor 221. The memory 270 can store the motion information of the block from which the motion information in the current picture is derived (or encoded) and / or the motion information of the reconstructed blocks in the picture. The stored motion information can be sent to the inter-frame predictor 221 and used as the motion information of spatially adjacent blocks or temporally adjacent blocks. The memory 270 can store the reconstructed samples of the reconstructed blocks in the current picture and can transmit the reconstructed samples to the intra-frame predictor 222.
[0082] Figure 3 is a schematic diagram showing the configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.
[0083] Reference Figure 3 Figure 3 , the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter-frame predictor 332 and an intra-frame predictor 331. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. According to an embodiment, the entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be constituted by hardware components (e.g., a decoder chipset or a processor). Additionally, the memory 360 may include a decoded picture buffer (DPB), or may be constituted by a digital storage medium. The hardware components may also include the memory 360 as an internal / external component.
[0084] When the input includes a bitstream of video / image information, the decoding device 300 may reconstruct an image corresponding to the processing of the video / image information in the Figure 2 encoding device. For example, the decoding device 300 may derive units / blocks based on block segmentation-related information obtained from the bitstream. The decoding device 300 may perform decoding using the processor applied in the encoding device. Thus, the decoding processor may be, for example, a compilation unit, and may divide the compilation unit from a compilation tree unit or a largest compilation unit according to a quadtree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units may be derived from the compilation unit. The reconstructed image signal decoded and output by the decoding device 300 may be reproduced by a reproduction device.
[0085] The decoding device 300 may receive, in the form of a bitstream, from Figure 2The signal output by the encoding device, and the received signal can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive the information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information can also include information about various parameter sets such as adaptive parameter sets (APS), picture parameter sets (PPS), sequence parameter sets (SPS), or video parameter sets (VPS). Additionally, the video / image information can also include general constraint information. The decoding device can also decode the picture based on the information about the parameter sets and / or the general constraint information. The signaled / received information and / or syntax elements described later in this disclosure can be decoded through the decoding process and obtained from the bitstream. For example, the entropy decoder 310 decodes the information in the bitstream based on coding methods such as exponential Golomb coding, CAVLC, or CABAC, and outputs the syntax elements required for image reconstruction and the quantization values of the transformed coefficients of the residuals. More specifically, the CABAC entropy decoding method can receive the bin (binary digit) corresponding to each syntax element in the bitstream, determine the context model using the decoding target syntax element information, the decoding information of the decoding target block, or the information of the symbols / bins decoded in the previous stage, and perform arithmetic decoding on the bin by predicting the occurrence probability of the bin according to the determined context model, and generate the 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 predictors (inter-frame predictor 332 and intra-frame predictor 331), and the residual values (i.e., the quantized transform coefficients and the related parameter information) for which entropy decoding has been performed in the entropy decoder 310 can be input to the residual processor 320. The residual processor 320 can derive the residual signal (residual block, residual sample, residual sample array). Additionally, the information about filtering among the information decoded by the entropy decoder 310 can be provided to the filter 350. Furthermore, the receiver (not shown) for receiving the signal output by the encoding device can be further configured as an internal / external component of the decoding device 300, or the receiver can be a component of the entropy decoder 310. Additionally, the decoding device according to this disclosure can be referred to as a video / image / picture decoding device, and the decoding device can be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder can include the entropy decoder 310, and the sample decoder can include at least one of the dequantizer 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.
[0086] The dequantizer 321 can dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 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 scan order executed in the encoding device. The dequantizer 321 can dequantize the quantized transform coefficients by using a quantization parameter (e.g., quantization step information) and obtain the transform coefficients.
[0087] The inverse transformer 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0088] The predictor can perform prediction on the current block and generate a prediction block including the prediction samples of the current block. The predictor can determine whether to apply intra prediction or inter prediction to the current block based on the information about prediction output from the entropy decoder 310, and can determine a specific intra / inter prediction mode.
[0089] The predictor 330 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 intra prediction and inter prediction simultaneously. This can be referred to as combined intra and inter prediction (CIIP). Additionally, the predictor can predict a block based on the intra block copy (IBC) prediction mode or the palette mode. The IBC prediction mode or the palette mode can be used for content image / video compilation such as games, e.g., screen content compilation (SCC). IBC basically performs prediction in the current picture, but IBC can be performed similar to inter prediction because a reference block is derived in the current picture. That is, IBC can use at least one of the inter prediction techniques described in the present disclosure. The palette mode can be regarded as an example of intra compilation or intra prediction. When the palette mode is applied, the sample values within the picture can be signaled based on the information about the palette table and the palette index.
[0090] The intra predictor 331 can predict the current block by referring to the samples in the current picture. Depending on the prediction mode, the samples referred to can be located near the current block or far from the current block. In intra prediction, the prediction mode can include multiple non - directional modes and multiple directional modes. The intra predictor 331 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0091] The inter - frame predictor 332 can derive a predicted block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter - frame prediction mode, the motion information can be predicted in units of blocks, sub - blocks, or samples based on the correlation of the motion information between 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 inter - frame prediction direction (L0 prediction, L1 prediction, Bi - prediction, etc.) information. In the case of inter - frame prediction, neighboring blocks can include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter - frame predictor 332 can configure a motion information candidate list based on neighboring blocks and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. The inter - frame prediction can be performed based on various prediction modes, and the information about the prediction can include information indicating the mode of the inter - frame prediction for the current block.
[0092] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the predicted signal (predicted block, predicted sample array) output from a predictor (including the inter - frame predictor 332 and / or the intra - frame predictor 331). If the block to be processed has no residual (e.g., when the skip mode is applied), the predicted block can be used as the reconstructed block.
[0093] The adder 340 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, can be output through filtering as described below, or can be used for inter - frame prediction of the next picture.
[0094] In addition, luminance mapping and chrominance scaling (LMCS) can be applied during the picture decoding process.
[0095] The filter 350 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 360 (specifically, the DPB of the memory 360). The various filtering methods can include, for example, de - blocking filtering, sample - adaptive offset, adaptive loop filter, bilateral filter, etc.
[0096] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter - predictor 332. The memory 360 can store the motion information of the blocks from which the motion information in the current picture is derived (or decoded) and / or the motion information of the reconstructed blocks in the picture. The stored motion information can be sent to the inter - predictor 332 to be utilized as the motion information of spatially adjacent blocks or temporally adjacent blocks. The memory 360 can store the reconstructed samples of the reconstructed blocks in the current picture and can transmit the reconstructed samples to the intra - predictor 331.
[0097] In this disclosure, the embodiments described in the filter 260, inter - predictor 221, and intra - predictor 222 of the encoding device 200 can be the same as or respectively applied corresponding to the filter 350, inter - predictor 332, and intra - predictor 331 of the decoding device 300. The same content can also be applied to the inter - predictor 332 and intra - predictor 331.
[0098] In this disclosure, at least one of quantization / inverse quantization and / or transform / inverse transform can be omitted. When quantization / inverse quantization is omitted, the quantized transform coefficients can be referred to as transform coefficients. When transform / inverse transform is omitted, the transform coefficients can be referred to as coefficients or residual coefficients, or still be referred to as transform coefficients for the sake of uniform expression.
[0099] In this disclosure, the quantized transform coefficients and the transform coefficients can be respectively referred to as transform coefficients and scaled transform coefficients. In this case, the residual information can include information about the transform coefficients, and the information about the transform coefficients can be signaled through the residual coding syntax. The transform coefficients can be derived based on the residual information (or information about the transform coefficients), and the scaled transform coefficients can be derived by inverse - transforming (scaling) the transform coefficients. The residual samples can be derived based on inverse - transforming (transforming) the scaled transform coefficients. This can also be applied / expressed in other parts of this disclosure.
[0100] Meanwhile, as described above, when performing video coding, prediction is performed to improve the compression efficiency. By doing so, a prediction block including the prediction samples of the current block can be generated as the block to be coded (i.e., the coding target block). Here, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block is derived in the same way in the encoding device and the decoding device, and the encoding device can signal the information about the residual between the original block and the prediction block (residual information) instead of the original sample values of the original block, thereby improving the 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.
[0101] Residual information can be generated through a transform and quantization process. For example, an encoding device can derive a residual block between an original block and a predicted block, perform a transform process on residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization process on the transform coefficients to derive quantized transform coefficients, and signal relevant residual information (through a bitstream) to a decoding device. Here, the residual information can include value information such as the value information of the quantized transform coefficients, position information, transform technology, transform core, and quantization parameters. The decoding device can perform a dequantization / inverse transform process based on the residual information and derive residual samples (or a residual block). The decoding device can generate a reconstructed picture based on the predicted block and the residual block. In addition, for reference in inter-picture prediction of a future reference picture, the encoding device can dequantize / inverse transform the quantized transform coefficients to derive a residual block and generate a reconstructed picture based on this.
[0102] Intra prediction can refer to a prediction that generates prediction samples for a current block based on reference samples in a picture (hereinafter referred to as the current picture) to which the current block belongs. When intra prediction is applied to the current block, adjacent reference samples to be used for intra prediction of the current block can be derived. The adjacent reference samples of the current block can include a total of 2xnH samples adjacent to the left boundary of the current block of size nWxnH and adjacent to the lower left of the current block, samples adjacent to the upper boundary of the current block and a total of 2xnW samples adjacent to the upper right, and samples adjacent to the upper left of the current block. Alternatively, the adjacent reference samples of the current block can include multiple columns of vertically adjacent samples and multiple rows of horizontally adjacent samples. In addition, the adjacent reference samples of the current block can include a total of nH samples adjacent to the right boundary of the current block of size nWxnH, a total of nW samples adjacent to the lower boundary of the current block, and samples adjacent to the lower right of the current block.
[0103] However, some of the adjacent reference samples of the current block have not been decoded or may be unavailable. In this case, the decoder can construct adjacent reference samples to be used for prediction by replacing the unavailable samples with available samples. Alternatively, the adjacent reference samples to be used for prediction can be configured by interpolation of available samples.
[0104] When deriving adjacent reference samples, (i) prediction samples can be derived based on the average or interpolation of the adjacent reference samples of the current block, or (ii) prediction samples can be derived based on reference samples existing in a specific (prediction) direction with respect to the prediction samples in the adjacent reference samples of the current block. Case (i) can be referred to as a non-directional mode or non-angle mode, and case (ii) can be referred to as a directional mode or angle mode.
[0105] Alternatively, a predicted sample for the current block can be generated by interpolating between a first neighboring sample among the neighboring reference samples that is in the prediction direction of the intra prediction mode for the current block and a second neighboring sample that is in the direction opposite to the prediction direction. The above situation can be referred to as linear interpolation intra prediction (LIP). In addition, a chrominance prediction sample can be generated based on the luminance samples using a linear model (LM). This situation can be referred to as the LM mode or the chrominance component LM (CCLM) mode.
[0106] Alternatively, a temporary predicted sample for the current block is derived based on filtered neighboring reference samples, and the predicted sample for the current block can also be derived by weighted summing the temporary predicted sample and at least one reference sample derived according to the intra prediction mode among the existing neighboring reference samples (i.e., unfiltered neighboring reference samples). The above situation can be referred to as position-dependent intra prediction (PDPC).
[0107] Alternatively, a reference sample line with the highest prediction accuracy among a plurality of neighboring reference sample lines of the current block is selected, and the predicted sample is derived using the reference sample in the prediction direction in the selected line. In this case, intra prediction coding can be performed by indicating (signaling) the reference sample line used to the decoding device. The above situation can be referred to as multi-reference line intra prediction or MRL-based intra prediction.
[0108] Alternatively, the current block is divided into vertical or horizontal sub-partitions and intra prediction is performed based on the same intra prediction mode, but neighboring reference samples can be derived and used on a sub-partition basis. That is, in this case, the intra prediction mode of the current block also applies to the sub-partitions, but in some cases, the intra prediction performance can be improved by deriving and using neighboring reference samples on a sub-partition basis. This prediction method can be referred to as intra prediction based on intra sub-partition (ISP).
[0109] The above intra prediction methods can be referred to as intra prediction types to distinguish them from the intra prediction modes. Intra prediction types can be referred to by various terms, such as intra prediction techniques or additional intra prediction modes. For example, an intra prediction type (or additional intra prediction mode, etc.) can include at least one of the above LIP, PDPC, MRL, and ISP. A general intra prediction method excluding specific intra prediction types such as LIP, PDPC, MRL, and ISP can be referred to as a normal intra prediction type. When the above specific intra prediction types are not applied, the normal intra prediction type can generally be applied, and prediction can be performed based on the above intra prediction mode. At the same time, post-processing filtering can be performed on the derived predicted sample if necessary.
[0110] Specifically, the intra prediction process may include an intra prediction mode / type determination step, an adjacent reference sample derivation step, and a prediction sample derivation step based on the intra prediction mode / type. Additionally, if necessary, a post-filtering step may be performed on the derived prediction samples.
[0111] Figure 4 An example of a video / image encoding method based on intra prediction is illustrated.
[0112] Refer to Figure 4 , the encoding device performs intra prediction on the current block (S400). The encoding device derives the intra prediction mode / type of the current block, derives the adjacent reference samples of the current block, and generates prediction samples in the current block based on the intra prediction mode / type and the adjacent reference samples. Here, the intra prediction mode / type determination, adjacent reference sample derivation, and prediction sample generation processes may be performed simultaneously, or one process may be performed before another process. The encoding device may determine the mode / type to be applied to the current block from among multiple intra prediction modes / types. The encoding device may compare the RD costs of the intra prediction modes / types and determine the best intra prediction mode / type for the current block.
[0113] Meanwhile, the encoding device may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.
[0114] The encoding device generates residual samples for the current block based on the (filtered) prediction samples (S410). The encoding device may compare the prediction samples in the original samples of the current block based on phase and derive the residual samples.
[0115] The encoding device may encode the image information including information about intra prediction (prediction information) and residual information about the residual samples (S420). The prediction information may include intra prediction mode information and intra prediction type information. The encoding device is capable of outputting the encoded image information in the form of a bitstream. The output bitstream may be sent to the decoding device via a storage medium or a network.
[0116] The residual information may include the residual compilation syntax described later. The encoding device may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information about the quantized transform coefficients.
[0117] Meanwhile, as described above, the encoding device may generate reconstructed pictures (including reconstructed samples and reconstructed blocks). To this end, the encoding device may derive (modified) residual samples by performing inverse quantization / inverse transformation on the quantized transform coefficients again. The reason for performing inverse quantization / inverse transformation again after performing transformation / quantization on the residual samples in this way is to derive the same residual samples as those derived in the above decoding device. The encoding device may generate a reconstructed block including the reconstructed samples for the current block based on the prediction samples and the (modified) residual samples. A reconstructed picture for the current picture may be generated based on the reconstructed block. As described above, an in-loop filtering process may be further applied to the reconstructed picture.
[0118] Figure 5 FIG. illustrates an example of a video / image encoding method based on intra prediction.
[0119] The decoding device may perform operations corresponding to those performed by the encoding device.
[0120] The prediction information and the residual information may be obtained from the bitstream. The residual samples for the current block may be derived based on the residual information. Specifically, the transform coefficients may be derived by performing inverse quantization on the quantized transform coefficients derived based on the residual information, and the residual samples for the current block may be derived by performing inverse transformation on the transform coefficients.
[0121] Specifically, the decoding device may derive the intra prediction mode / type for the current block (S500) based on the received prediction information (intra prediction mode / type information). The decoding device may derive the neighboring reference samples for the current block (S510). The decoding device generates the prediction samples in the current block (S520) based on the intra prediction mode / type and the neighboring reference samples. In this case, the decoding device may perform a prediction sample filtering process. The prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.
[0122] The decoding device generates the residual samples for the current block based on the received residual information (S530). The decoding device may generate the reconstructed samples for the current block based on the prediction samples and the residual samples, and may derive a reconstructed block including the reconstructed samples (S540). A reconstructed picture for the current picture may be generated based on the reconstructed block. As described above, an in-loop filtering process may be further applied to the reconstructed picture.
[0123] The intra prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether the MPM (Most Probable Mode) is applied to the current block or whether the remaining mode is applied, and when the MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be constituted by an MPM candidate list or an MPM list. Additionally, when the MPM is not applied to the current block, the intra prediction mode information includes remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes other than the intra prediction mode candidates (MPM candidates). The decoding device may determine the intra prediction mode of the current block based on the intra prediction mode information.
[0124] In addition, the intra prediction type information can be implemented in various forms. For example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include at least one of the following: reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and, if applied, which reference sample line is used, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether the ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating the split type of the subpartition when the ISP is applied, flag information indicating whether PDPC is applied, or flag information indicating whether LIP is applied. Additionally, the intra prediction type information may include an MIP flag indicating whether matrix-based intra prediction (MIP) is applied to the current block.
[0125] The intra prediction mode information and / or the intra prediction type information can be encoded / decoded by the encoding / decoding methods described in the present disclosure. For example, the intra prediction mode information and / or the intra prediction type information can be encoded / decoded by entropy encoding (e.g., CABAC, CAVLC).
[0126] Figure 6 Schematically shows the intra prediction process.
[0127] Refer to Figure 6, as described above, the intra prediction process may include steps of determining an intra prediction mode / type, deriving adjacent reference samples, and performing intra prediction (generating prediction samples). The intra prediction process may be performed by the encoding device and the decoding device as described above. In the present disclosure, the compiling device may include an encoding device and / or a decoding device.
[0128] Reference Figure 6 , the compiling device determines the intra prediction mode / type S600.
[0129] The encoding device may determine an intra prediction mode / type applied to a current block from the various intra prediction modes / types described above and may generate prediction-related information. The prediction-related information may include intra prediction mode information indicating an intra prediction mode applied to the current block and / or intra prediction type information indicating an intra prediction type applied to the current block. The decoding device may determine the intra prediction mode / type applied to the current block based on the prediction-related information.
[0130] The intra prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether the most probable mode (MPM) is applied to the current block or the remaining mode is applied, and when the MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be constituted by an MPM candidate list or an MPM list. Additionally, when the MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes other than the intra prediction mode candidates (MPM candidates). The decoding device may determine the intra prediction mode of the current block based on the intra prediction mode information.
[0131] In addition, the intra prediction type information can be implemented in various forms. For example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include at least one of the following: reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and, if applied, which reference sample line to use, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether the ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating the split type of the subpartition when the ISP is applied, flag information indicating whether the PDPC is applied, or flag information indicating whether the LIP is applied. In addition, the intra prediction type information may include an MIP flag indicating whether matrix-based intra prediction (MIP) is applied to the current block.
[0132] For example, when intra prediction is applied, the intra prediction mode of neighboring blocks can be used to determine the intra prediction mode applied to the current block. For example, the compilation device can select one of the most probable mode (MPM) candidates in the MPM list derived based on additional candidate modes and / or the intra prediction modes of neighboring blocks (e.g., left and / or upper neighboring blocks) of the current block or select one of the remaining intra prediction modes not included in the MPM candidates (and the planar mode) based on the MPM remaining information (remaining intra prediction mode information). The MPM list can be configured to include or not include the planar mode as a candidate. For example, when the MPM list includes the planar mode as a candidate, the MPM list can have 6 candidates, and when the MPM list does not include the planar mode as a candidate, the MPM list can have 5 candidates. When the MPM list does not include the planar mode as a candidate, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not the planar mode can be signaled. For example, the MPM flag can be signaled first, and when the value of the MPM flag is 1, the MPM index and the non-planar flag can be signaled. In addition, when the value of the non-planar flag is 1, the MPM index can be signaled. Here, the fact that the MPM list is configured not to include the planar mode as a candidate means that the planar mode is always considered an MPM rather than not an MPM, so the flag (non-planar flag) is signaled first to check whether it is the planar mode.
[0133] For example, based on an MPM flag (e.g., intra_luma_mpm_flag), it can be indicated whether the intra prediction mode applied to the current block is among the MPM candidates (and the planar mode) or among the residual modes. An MPM flag with a value of 1 can indicate that the intra prediction mode of the current block is within the MPM candidates (and the planar mode), while an MPM flag with a value of 0 can indicate that the intra prediction mode of the current block is not within the MPM candidates (and the planar mode). A non-planar flag with a value of 0 (e.g., intra_luma_not_planar_flag) can indicate that the intra prediction mode of the current block is the planar mode, and a non-planar flag with a value of 1 can indicate that the intra prediction mode of the current block is not the planar mode. The MPM index can be signaled in the form of the mpm_idx or intra_luma_mpm_idx syntax element, and the residual intra prediction mode information can be signaled in the form of the rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the residual intra prediction mode information can indicate one of the residual intra prediction modes not included in the MPM candidates (and the planar mode) among all the intra prediction modes by indexing in the order of the prediction mode numbers. The intra prediction mode can be the intra prediction mode of the luminance component (samples). Hereinafter, the intra prediction mode information can include at least one of an MPM flag (e.g., intra_luma_mpm_flag), a non-planar flag (e.g., intra_luma_not_planar_flag), an MPM index (e.g., mpm_idx or intra_luma_mpm_idx), or the residual intra prediction mode information (rem_intra_luma_luma_mpm_mode or intra_luma_mpminder). In the present disclosure, the MPM list can be referred to by various terms, such as the MPM candidate list and candModeList.
[0134] When applying MIP to the current block, a separate mpm flag (e.g., intra_mip_mpm_flag), an mpm index (e.g., intra_mip_mpm_idx), and the residual intra prediction mode information (e.g., intra_mip_mpm_remainder) for MIP can be signaled, and the non-planar flag can be not signaled.
[0135] In other words, generally, when performing block segmentation of an image, the current block to be coded and the neighboring blocks have similar image features. Therefore, it is highly likely that the current block and the neighboring blocks have the same or similar intra prediction modes. Thus, the encoder can use the intra prediction mode of the neighboring blocks to encode the intra prediction mode of the current block.
[0136] The encoding device can build a list of the most probable modes (MPMs) for the current block. The MPM list can be referred to as the MPM candidate list. Here, the MPM can refer to a mode that is used to improve the encoding efficiency by considering the similarity between the current block and neighboring blocks during intra prediction mode encoding. As described above, the MPM list can be built to include the planar mode, or can be built to exclude the planar mode. For example, when the MPM list includes the planar mode, the number of candidates in the MPM list can be 6. When the MPM list does not include the planar mode, the number of candidates in the MPM list can be 5.
[0137] The encoding device can perform prediction based on various intra prediction modes and can determine the best intra prediction mode based on rate distortion optimization (RDO) according to it. In this case, the encoding device can determine the best intra prediction mode by using only the MPM candidates configured in the MPM list and the planar mode, or by further using the remaining intra prediction modes as well as the MPM candidates and the planar mode configured in the MPM list. Specifically, for example, if the intra prediction type of the current block is a specific type other than the normal intra prediction type (e.g., LIP, MRL, or ISP), the encoding device can determine the best intra prediction mode by considering only the MPM candidates and the planar mode as the intra prediction mode candidates for the current block. That is, in this case, the intra prediction mode of the current block can be determined only from the MPM candidates and the planar mode, and in this case, the encoding / signaling of the mpm flag can be not performed. In this case, the decoding device can infer that the mpm flag is 1 without signaling the mpm flag separately.
[0138] Meanwhile, generally, when the intra prediction mode of the current block is not the planar mode but one of the MPM candidates in the MPM list, the encoding device generates an mpm index (mpm idx) indicating one of the MPM candidates. When the intra prediction mode of the current block is not included in the MPM list, the encoding device generates MPM remainder information (remaining intra prediction mode information) indicating the mode that is the same as the intra prediction mode of the current block among the remaining intra prediction modes not included in the MPM list (and the planar mode). The MPM remainder information can include, for example, the intra_luma_mpm_remainder syntax element.
[0139] The decoding device obtains intra prediction mode information from the bitstream. As described above, the intra prediction mode information may include at least one of an MPM flag, a non - planar flag, an MPM index, and MPM residual information (residual intra prediction mode information). The decoding device may construct an MPM list. The construction of the MPM list is the same as that constructed in the encoding device. That is, the MPM list may include the intra prediction modes of neighboring blocks, or may further include specific intra prediction modes according to a predetermined method.
[0140] The decoding device may determine the intra prediction mode of the current block based on the MPM list and the intra prediction mode information. For example, when the value of the MPM flag is 1, the decoding device may (based on the non - planar flag) derive the planar mode as the intra prediction mode of the current block, or derive the candidate indicated by the MPM index among the MPM candidates of the MPM list as the intra prediction mode of the current block. Here, the MPM candidates may only represent the candidates included in the MPM list, or may include not only the candidates included in the MPM list, but also the planar mode applicable when the value of the MPM flag is 1.
[0141] As another example, when the value of the MPM flag is 0, the decoding device may derive the intra prediction mode indicated by the residual intra prediction mode information (which may be referred to as mpm residual information) among the remaining intra prediction modes not included in the MPM list and the planar mode as the intra prediction mode of the current block. Meanwhile, as another example, when the intra prediction type of the current block is a specific type (such as LIP, MRL, or ISP, etc.), the decoding device may derive the candidate indicated by the planar mode or the MPM flag in the MPM list as the intra prediction mode of the current block without parsing / decoding / checking the MPM flag.
[0142] The compiling device derives adjacent reference samples of the current block (S610). When intra prediction is applied to the current block, adjacent reference samples to be used for the intra prediction of the current block may be derived. The adjacent reference samples of the current block may include samples adjacent to the left boundary of the current block of size nW x nH and a total of 2 x nH samples adjacent to the lower left of the current block, samples adjacent to the upper boundary of the current block and a total of 2 x nW samples adjacent to the upper right, and samples adjacent to the upper left of the current block. Alternatively, the adjacent reference samples of the current block may include multiple columns of upper - adjacent samples and multiple rows of left - adjacent samples. In addition, the adjacent reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nW x nH, a total of nW samples adjacent to the lower boundary of the current block, and samples adjacent to the lower right of the current block.
[0143] On the other hand, when applying MRL (i.e., when the value of the MRL index is greater than 0), the adjacent reference samples may be located on lines 1 to 2 instead of line 0 adjacent to the current block on the left / upper side, and in this case, the number of adjacent reference samples can be further increased. Meanwhile, when applying ISP, adjacent reference samples can be derived in units of sub-partitions.
[0144] The encoding device derives prediction samples by performing intra prediction on the current block (S620). The encoding device can derive prediction samples based on the intra prediction mode / type and adjacent samples. The encoding device can derive reference samples according to the intra prediction mode of the current block among the adjacent reference samples of the current block, and can derive prediction samples of the current block based on the reference samples.
[0145] Meanwhile, when inter-frame prediction is applied, the predictor of the encoding device / 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 represent prediction derived by a method that depends on data elements (e.g., sample values or motion information) of (one or more) pictures other than the current picture. When applying inter-frame prediction to the current block, a prediction block (prediction sample array) for the current block can be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. In this case, in order to reduce the amount of motion information transmitted in the 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 the 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 further include inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of applying inter-frame prediction, neighboring blocks can include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block can be the same as or different from each other. Temporal neighboring blocks can be referred to by names such as collocated reference blocks, collocated CUs (ColCUs), etc., and the reference picture including the temporal neighboring block can be referred to as a collocated picture (ColPic). For example, a motion information candidate list can be configured based on neighboring blocks of the current block, and a flag or index information indicating which candidate is selected (used) can be signaled in order to derive the motion vector and / or reference picture index of the current block. Inter-frame prediction can be performed based on various prediction modes, and for example, in the case of the skip mode and the merge mode, the motion information of the current block can be the same as the motion information of the selected neighboring block. In the case of the skip mode, different from the merge mode, a residual signal may not be sent. In the case of the motion vector prediction (MVP) mode, the motion vector of the selected neighboring block can be used as a motion vector predictor, and a motion vector difference can be signaled. In this case, the motion vector of the current block can be derived by using the sum of the motion vector predictor and the motion vector difference.
[0146] 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. The prediction based on the L0 motion vector may be referred to as L0 prediction, the prediction based on the L1 motion vector may be referred to as L1 prediction, and the prediction based on both the L0 motion vector and the L1 motion vector may be referred to as bi-prediction. Herein, 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 are before the current picture in the output order, and the reference picture list L1 may include pictures that are after the current picture in the 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 are after the current picture in the output order as reference pictures. In this case, the previous pictures may be indexed first in the reference picture list L0, and then the subsequent pictures may be indexed. The reference picture list L1 may further include pictures that are before the current picture in the output order as reference pictures. In this case, the subsequent pictures may be indexed first in the reference picture list L1, and then the previous pictures may be indexed. Herein, the output order may correspond to the picture order count (POC) order.
[0147] The video / image encoding process based on inter-frame prediction may schematically include, for example, the following.
[0148] Figure 7 An example of a video / image encoding method based on inter-frame prediction is illustrated.
[0149] The encoding device performs inter prediction on the current block (S700). The encoding device may derive an inter prediction mode and motion information of the current block, and generate a prediction sample of the current block. Herein, the inter prediction mode determination process, the motion information derivation process, and the prediction sample generation process may be performed simultaneously, and any one of the processes may be performed earlier than the other processes. For example, the inter prediction unit of the encoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit, and the prediction mode determination unit may determine the prediction mode of the current block, the motion information derivation unit may derive the motion information of the current block, and the prediction sample derivation unit may derive the prediction sample of the current block. For example, the inter 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 the smallest difference from the current block or equal to or less than a predetermined criterion. A reference picture index indicating the reference picture in which the reference block is located may be derived based on this, and a motion vector may be derived based on the positional difference between the reference block and the current block. The encoding device may determine a mode to be applied to the current block among various prediction modes. The encoding device may compare the RD costs of various prediction modes and determine the best prediction mode of the current block.
[0150] For example, when the skip mode or the 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 having the smallest difference from the current block or equal to or less than a predetermined criterion 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.
[0151] 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 predictors (mvps) included in the (A)MVP candidate list as the mvp of the current block. In this case, for example, the motion vector indicating the reference block derived through motion estimation may be used as the motion vector of the current block, and the mvp candidate having the smallest difference from the motion vector of the current block among the mvp candidates may become the selected mvp candidate. A motion vector difference (MVD), which is a difference obtained by subtracting the mvp from the motion vector of the current block, may be derived. In this case, information regarding the MVD may be signaled to the decoding device. Further, when the (A)MVP mode is applied, the value of the reference picture index may be configured as reference picture index information and signaled to the decoding device separately.
[0152] The encoding device may derive a residual sample based on a prediction sample (S710). The encoding device may derive a residual sample by comparing an original sample of a current block with a prediction sample.
[0153] The encoding device encodes image information including prediction information and residual information (S720). 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., skip flag, merge flag, or mode index, etc.) and information about motion information, as information related to the prediction process. The information about motion information may include candidate selection information (e.g., merge index, mvp flag, or mvp index), which is information for deriving a motion vector. In addition, the information about motion information may include information about MVD and / or reference picture index information. In addition, the information about motion information may include information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. The residual information is information about the residual sample. The residual information may include information about quantization transform coefficients for the residual sample.
[0154] 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.
[0155] Meanwhile, as described above, the encoding device may generate a reconstructed picture (including reconstructed samples and reconstructed blocks) based on the reference sample and the residual sample. This is to derive the same prediction result as the prediction result executed by the decoding device, and as a result, the encoding efficiency can be improved. Therefore, the encoding device may store the reconstructed picture (or reconstructed samples or reconstructed blocks) in a memory and use the reconstructed picture as a reference picture. As described above, an in-loop filtering process may be further applied to the reconstructed picture.
[0156] The video / image decoding process based on inter-frame prediction may schematically include, for example, the following.
[0157] Figure 8 An example of a video / image decoding method based on inter-frame prediction is illustrated.
[0158] Reference Figure 8 , the decoding device may perform an operation corresponding to the operation performed by the encoding device. The decoding device may perform prediction on a current block based on the received prediction information and derive a prediction sample.
[0159] Specifically, the decoding device may determine a prediction mode of a current block based on the received prediction information (S800). The decoding device may determine which inter-frame prediction mode to apply to the current block based on the prediction mode information in the prediction information.
[0160] For example, it is possible to determine whether to apply the merge mode or the (A)MVP mode to the current block based on a merge flag. Alternatively, one of various inter prediction mode candidates can be selected based on a mode index. The inter prediction mode candidates can include a skip mode, a merge mode, and / or the (A)MVP mode, or can include various inter prediction modes to be described below.
[0161] The decoding device derives motion information for the current block based on the determined inter prediction mode (S810). For example, when the skip mode or the merge mode is applied to the current block, the decoding device can configure a merge candidate list to be described below and select one merge candidate among the merge candidates included in the merge candidate list. Here, the selection can be performed based on 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.
[0162] As another example, when the (A)MVP mode is applied to the current block, the decoding device can 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 can be performed based on selection information (mvp flag or mvp index). In this case, the MVD of the current block can be derived based on information about the MVD, and the motion vector of the current block can be derived based on the mvp and the MVD of the current block. In addition, the reference picture index of the current block can be derived based on the reference picture index information. The picture indicated by the reference picture index in the reference picture list of the current block can be derived as the reference picture referred to for the inter prediction of the current block.
[0163] Meanwhile, as described below, the motion information of the current block can be derived without configuring a candidate list, 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.
[0164] The decoding device can generate a prediction sample for the current block based on the motion information of the current block (S820). In this case, the reference picture can be derived based on the reference picture index of the current block, and the prediction sample of the current block can be derived by using the sample 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 can be further performed for all or some of the prediction samples of the current block.
[0165] 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. The prediction mode determination unit may determine the prediction mode of 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 information about the received motion information. And the prediction sample derivation unit may derive the prediction sample of the current block.
[0166] The decoding device generates the residual sample of the current block based on the received residual information (S830). The decoding device may generate the reconstructed sample of the current block based on the prediction sample and the residual sample, and generate the reconstructed picture based on the generated reconstructed sample (S840). Thereafter, as described above, the in-loop filtering process may be further applied to the reconstructed picture.
[0167] Figure 9 Schematically shows the inter-frame prediction process.
[0168] Reference Figure 9 , as described above, the inter-frame prediction process may include an inter-frame prediction mode determination step, a motion information derivation step according to the determined prediction mode, and a prediction process (prediction sample generation) step based on the derived motion information. The inter-frame prediction process may be executed by the encoding device and the decoding device as described above. Herein, the compilation device may include an encoding device and / or a decoding device.
[0169] Reference Figure 9 , the compilation device determines the inter-frame prediction mode of the current block (S900). Various inter-frame prediction modes may be used for the prediction of the current block in the picture. For example, various modes such as the merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, merge with MVD (MMVD) mode, and history motion vector prediction (HMVP) mode may be used. The decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bi-prediction with CU-level weight (BCW), and bi-directional optical flow (BDOF), etc. may be further used as additional modes. The affine mode may also be referred to as the affine motion prediction mode. The MVP mode may also be referred to as the advanced motion vector prediction (AMVP) mode. Herein, some modes and / or candidates of motion information derived from some modes may also be included in one of the motion information-related candidates in other modes. For example, the HMVP candidate may be added to the merge candidates of the merge / skip mode, or added to the mvp candidates of the MVP mode. If the HMVP candidate is used as the motion information candidate of the merge mode or skip mode, the HMVP candidate may be referred to as the HMVP merge candidate.
[0170] Prediction mode information indicating an inter - frame prediction mode of a current block can be signaled from an encoding device to a decoding device. In this case, the prediction mode information can be included in a bitstream and received by the decoding device. The prediction mode information can include index information indicating one of a plurality of candidate modes. Alternatively, the inter - frame prediction mode can be indicated by hierarchical signaling of flag information. In this case, the prediction mode information can include one or more flags. For example, whether to apply a skip mode can be indicated by signaling a skip flag, and when the skip mode is not applied, whether to apply a merge mode can be indicated by signaling a merge flag, and when the merge mode is not applied, indicating the application of the MVP mode or additional flags for further discrimination can be signaled. The affine mode can be signaled as an independent mode or as a dependent mode with respect to the merge mode or the MVP mode. For example, the affine mode can include an affine merge mode and an affine MVP mode.
[0171] The encoding device derives motion information of the current block (S910). The motion information derivation can be based on the inter - frame prediction mode.
[0172] The encoding device can use the motion information of the current block to perform inter - frame prediction. The encoding device can derive optimal motion information of the current block through a motion estimation process. For example, the encoding device can search for a similar reference block with high correlation in a predetermined search range in a reference picture in units of fractional pixels by using an original block in the original picture of the current block, and derive the motion information from the searched reference block. The similarity of a block can be derived based on the difference of sample values based on a phase. For example, the similarity of a block can be calculated based on the sum of absolute differences (SAD) between the current block (or a template of the current block) and the reference block (or a template of the reference block). In this case, the motion information can be derived based on the reference block with the minimum 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.
[0173] The encoding device performs inter - frame prediction based on the motion information of the current block (S920). The encoding device can derive the (one or more) predicted samples of the current block based on the motion information. The current block including the predicted samples can be referred to as a prediction block.
[0174] Meanwhile, 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 the information in the bitstream based on an encoding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of syntax elements required for image reconstruction and the quantization values of transform coefficients related to residuals.
[0175] For example, the above compilation method can be performed as described below.
[0176] Figure 10 Context Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements is exemplarily shown. For example, during the CABAC coding 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. Additionally, 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 binarization can be bypassed. Here, each binary number 0 or 1 that constitutes the binary value can be referred to as a bin. For example, if the binary string after binarization is 110, each of 1, 1, and 0 is called a bin. The bins for a syntax element can indicate the value of the syntax element.
[0177] Thereafter, the binarized bins of the syntax elements can be input to a regular coding engine or a bypass coding engine. The regular coding engine of the encoding device can assign a context model reflecting probability values to the corresponding bins, and can encode the corresponding bins based on the assigned context model. After encoding each bin, the regular coding engine of the encoding device can update the context model for the corresponding bin. The encoded bins as described above can be referred to as context-coded bins.
[0178] Meanwhile, 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 regarding the input bins, and the process of updating the probability model applied to the bins after encoding. When bypass coding is applied, the encoding device can encode the input bins by applying a uniform probability distribution instead of assigning a context model, thereby increasing the coding speed. The encoded bins as described above can be referred to as bypass bins.
[0179] Entropy decoding can represent a process of performing the same process as the above entropy encoding in the reverse order.
[0180] For example, when decoding a syntax element based on a context model, the decoding device can receive the bins corresponding to the syntax element through a bitstream, can use the syntax element and the decoding information of the decoding target block or neighboring blocks or the information of the previously decoded symbol / bin to determine the context model, and can derive the value of the syntax element by predicting the occurrence probability of the received bins according to the determined context model and performing arithmetic decoding on the bins. Thereafter, the determined context model can be used to update the context model of the next decoded bin.
[0181] In addition, for example, when bypassing the decoding of a syntax element, the decoding device may receive a bin corresponding to the syntax element through a bitstream and may decode the input bin by applying a uniform probability distribution. In this case, the decoding device may omit the process of deriving the context model for the syntax element and the process of updating the context model applied to the bin after decoding.
[0182] As described above, the residual samples can be derived as quantized transform coefficients through the transform and quantization processes. The quantized transform coefficients may 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 a residual compilation syntax. That is, the encoding device may configure the residual compilation syntax using the residual information, encode the residual compilation syntax, and output it in the form of a bitstream, and the decoding device may decode the residual compilation syntax from the bitstream and derive the residual (quantized) transform coefficients. The residual compilation syntax may include syntax elements indicating whether a transform is applied to the corresponding block, the position of the last significant transform coefficient in the block, whether there are valid transform coefficients in the sub-block, the size / symbol of the valid transform coefficients, etc., as described later.
[0183] For example, the (quantized) transform coefficients (i.e., the residual information) can be encoded and / or decoded based on syntax elements such as transform_skip_flag, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, coded_sub_block_flag, sig_coeff_flag, par_level_flag, abs_level_gt1_flag, abs_level_gt3_flag, abs_remaind, coeff_sign_flag, dec_abs_level, mts_idx. The syntax elements related to the residual data encoding / decoding can be represented as shown in the following table.
[0184] [Table 1]
[0185]
[0186]
[0187]
[0188]
[0189] The transform_skip_flag indicates whether to skip the transformation in the associated block. The transform_skip_flag can be a syntax element of the transform skip flag. The associated block can be a compilation block (CB) or a transform block (TB). Regarding the transformation (and quantization) and the residual compilation process, the CB and the TB can be used interchangeably. For example, as described above, residual samples can be derived for the CB, and (quantized) transform coefficients can be derived through the transformation and quantization of the residual samples, and through the residual compiler, information (such as syntax elements) effectively indicating the position, magnitude, sign, etc. of the (quantized) transform coefficients can be generated and signaled. The quantized transform coefficients can simply be 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 residual-compiled can be referred to as the CB or the TB. At the same time, when the CB is larger than the maximum TB, the target block to be transformed (and quantized) and residual-compiled can be referred to as the TB. Hereinafter, signaling the syntax elements related to the residual compilation in units of transform blocks (TBs) will be described, but this is an example, and the TB can be used interchangeably with the compilation block (CB) as described above.
[0190] Meanwhile, the syntax elements signaled after signaling the transform skip flag can be the same as the syntax elements disclosed in Table 2 below, and a detailed description of the syntax elements will be described hereinafter.
[0191] [Table 2]
[0192]
[0193]
[0194]
[0195] [Table 3]
[0196]
[0197]
[0198]
[0199]
[0200]
[0201]
[0202] [Table 4]
[0203]
[0204]
[0205]
[0206] According to this embodiment, as shown in Table 2, residual compilation 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 compilation. The residual compilation used when transform skipping is not applied (i.e., when the transform is applied) can be referred to as regular residual compilation (RRC), while the residual compilation used when transform skipping is applied (i.e., when the transform is not applied) can be referred to as transform skip residual compilation (TSRC). In addition, regular residual compilation can be referred to as general residual compilation. In addition, regular residual compilation can be referred to as the regular residual compilation syntax structure, while transform skip residual compilation can be referred to as the transform skip residual compilation syntax structure. Table 3 above can show the syntax elements of the residual compilation when the value of transform_skip_flag is 0 (i.e., when the transform is applied), and Table 4 above can show the syntax elements of the residual compilation when the value of transform_skip_flag is 1 (i.e., when the transform is not applied).
[0207] Specifically, for example, a transform skip flag indicating whether to skip the transform of a transform block can be parsed, and it can be determined whether the transform skip flag is 1. If the value of the transform skip flag is 0, as shown in Table 3, 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 coefficients of the transform block can be parsed, and the residual coefficients 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. Additionally, abs_level_gtx_flag can represent abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n][0] can be an example of the first transform coefficient level flag (abs_level_gt1_flag), and abs_level_gtx_flag[n][1] can be an example of the second transform coefficient level flag (abs_level_gt3_flag).
[0208] Referring to Table 3 above, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level can be encoded / decoded. At the same time, sb_coded_flag can be represented as coded_sub_block_flag.
[0209] In an embodiment, the encoding device may encode the (x, y) position information of the last non-zero transform coefficient in a transform block based on the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. More specifically, last_sig_coeff_x_prefix represents a prefix of the column position of the last valid coefficient in the transform block in scan order, last_sig_coeff_y_prefix represents a prefix of the row position of the last valid coefficient in the transform block in scan order, last_sig_coeff_x_suffix represents a suffix of the column position of the last valid coefficient in the transform block in scan order, and last_sig_coeff_y_suffix represents a suffix of the row position of the last valid coefficient in the transform block in scan order. Herein, the valid coefficient may represent a non-zero coefficient. Additionally, the scan order may be a right diagonal scan order. Alternatively, the scan order may be a horizontal scan order or a vertical scan order. The scan order may be determined based on whether intra / inter prediction is applied to the target block (CB or CB including TB) and / or a specific intra / inter prediction mode.
[0210] Thereafter, the encoding device may divide the transform block into 4×4 sub-blocks, and then for each 4×4 sub-block, use a 1-bit syntax element coded_sub_block_flag to indicate whether there is a non-zero coefficient in the current sub-block.
[0211] If the value of coded_sub_block_flag is 0, there is no more information to be sent, and thus, the encoding device may terminate the encoding process for the current sub-block. Conversely, if the value of coded_sub_block_flag is 1, the encoding device may continuously perform the encoding process on sig_coeff_flag. Since the sub-block including the last non-zero coefficient does not need to encode coded_sub_block_flag, and the sub-block including the DC information of the transform block has a high probability of including non-zero coefficients, coded_sub_block_flag may not be compiled, and its value may be assumed to be 1.
[0212] If the value of coded_sub_block_flag is 1 and it is thus determined that there are non-zero coefficients in the current sub-block, the encoding device may encode sig_coeff_flag having a binary value according to the reverse scan order. The encoding device may encode the 1-bit syntax element sig_coeff_flag for each transform coefficient according to the scan order. If the value of the transform coefficient at the current scan position is not 0, the value of sig_coeff_flag may be 1. Here, in the case of a sub-block including the last non-zero coefficient, it is not necessary to encode sig_coeff_flag for the last non-zero coefficient, and thus the compilation process of the sub-block may be omitted. The level information compilation 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 valid coefficient flag indicating whether a quantized transform coefficient is a non-zero valid coefficient.
[0213] The remaining level value after encoding sig_coeff_flag may be derived as shown in the following equation. That is, the syntax element remAbsLevel indicating the level value to be encoded may be derived from the following equation.
[0214] [Equation 1]
[0215] remAbsLevel = |coeff| - 1
[0216] Here, coeff represents the actual transform coefficient value.
[0217] In addition, abs_level_gt1_flag may indicate whether remAbsLevel at the corresponding scan 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 the level value to be encoded later may be updated as shown in the following equation.
[0218] [Equation 2]
[0219] remAbsLevel = remAbsLevel - 1
[0220] In addition, the least significant bit (LSB) value of remAbsLevel described in Equation 2 above can be encoded by par_level_flag as shown in Equation 3 below.
[0221] [Equation 3]
[0222] par_level_flag = |coeff| & 1
[0223] Here, par_level_flag[n] can indicate the parity of the transform coefficient level (value) at scan position n.
[0224] After performing the par_level_flag encoding, the transform coefficient level value remAbsLevel to be encoded can be updated as shown in the following equation below.
[0225] [Equation 4]
[0226] remAbsLevel = remAbsLevel >> 1
[0227] abs_level_gt3_flag can indicate whether remAbsLevel at the corresponding scan position (n) is greater than 3. Encoding of abs_remainder can 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 can be as shown in the following equation below.
[0228] [Equation 5]
[0229] |coeff| = sig_coeff_flag + abs_level_gt1_flag + par_level_flag + 2 * (abs_level_gt3_flag + abs_remainder)
[0230] In addition, the following table indicates an example related to Equation 5 above.
[0231] [Table 5]
[0232]
[0233] Here, |coeff| indicates the transform coefficient level (value), and can also be indicated as AbsLevel for the transform coefficient. In addition, the sign of each coefficient can be encoded by using coeff_sign_flag as a 1-bit symbol.
[0234] In addition, if the value of the transform skip flag is 1, as shown in Table 4, 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 coefficients of the transform block can be parsed, and the residual coefficients 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. Additionally, 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 scan position n is greater than (j << 1) + 1. The condition (j << 1) + 1 can optionally be replaced with a specific threshold such as a first threshold, a second threshold, etc.
[0235] Meanwhile, CABAC provides high performance but disadvantageously has poor throughput performance. This is caused by the conventional compilation engine of CABAC. Conventional encoding (i.e., compilation by the conventional compilation engine of CABAC) shows high data correlation because it uses probability states and ranges updated by the compilation of previous bins, and it takes a lot of time to read probability intervals and determine the current state. The throughput problem of CABAC can be solved by limiting the number of bins for context compilation. For example, as shown in Table 1 or Table 3 above, the sum of the 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 size of the corresponding block. In addition, for example, as shown in Table 4 above, the sum of the bins that can be 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 can be limited to the number of bins depending on the size of the corresponding block. For example, if the corresponding block is a 4×4 sized block, the sum of the bins for sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag or sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag can be limited to 32 (or 28 in the example), and if the corresponding block is a 2×2 sized block, the sum of the bins for sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag can be limited to 8 (or 7 in the example). The limited number of bins can be represented by remBinsPass1 or RemCcbs. Or, for example, for higher CABAC throughput, the number of bins for context compilation can be limited for the block (CB or TB) including the compilation target CG. In other words, it is possible to limit the number of bins for context compilation in units of blocks (CB or TB).For example, when the size of the current block is 16×16, the number of bins for context compilation of the current block can be limited to 1.75 times the number of pixels in the current block, i.e., 448, regardless of the current CG.
[0236] In this case, if all context-compiled bins with a limited number are used for compiling context elements, the encoding device can binarize the remaining coefficients by the method of binarizing coefficients described below instead of using context compilation, and can perform bypass encoding. In other words, for example, if the number of context-compiled bins for 4×4 CG compilation is 32 (or 28 in the example), or if the number of context-compiled bins for 2×2 CG compilation is 8 (or 7 in the example), then sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag compiled with context-compiled bins can no longer be compiled and can be directly compiled into dec_abs_level. Or, for example, when the number of context-compiled bins for 4×4 block compilation is 1.75 times the number of pixels in the entire block, i.e., when limited to 28, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag compiled as context-compiled bins can no longer be compiled and can be directly compiled into dec_abs_level, as shown in Table 6 below.
[0237] [Table 6]
[0238] cocff]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 ... ...
[0239] The value |coeff| can be derived based on dec_abs_level. In this case, the transform coefficient value (i.e., |coeff|) can be derived as shown in the following equation.
[0240] [Equation 6]
[0241] coeff = dec abslevel
[0242] In addition, coeff_sign_flag can indicate the sign of the transform coefficient level at the corresponding scan position n. That is to say, coeff_sign_flag can indicate the sign of the transform coefficient at the corresponding scan position n.
[0243] Figure 11 An example of transform coefficients in a 4×4 block is shown.
[0244] Figure 11An example of a 4×4 block representing quantization coefficients. Figure 11 The block can 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 11 The 4×4 block can represent a luminance block or a chrominance block.
[0245] Meanwhile, as described above, when the input signal is not a binary value but a syntax element, the encoding device can transform the input signal into a binary value by binarizing the value of the input signal. Additionally, the decoding device can decode the syntax element to derive the binarized value of the syntax element (e.g., binarized bin), and can de-binarize the binarized value to derive the value of the syntax element. The binarization process can be performed as a Truncated Rice (TR) binarization process, a k-th order Exponential Golomb (EGk) binarization process, a finite k-th order Exponential Golomb (finite EGk), a Fixed Length (FL) binarization process, etc. Additionally, the de-binarization process can represent 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.
[0246] For example, the TR binarization process can be performed as follows.
[0247] The input to the TR binarization process can be cMax and cRiceParam for the syntax element and a request for TR binarization. Additionally, the output of the TR binarization process can be the TR binarization for symbolVal, where symbolVal is the value corresponding to the bin string.
[0248] Specifically, for example, in the presence of a suffix bin string for the syntax element, the TR bin string for the syntax element can be the concatenation of the prefix bin string and the suffix bin string, and in the absence of a suffix bin string, the TR bin string for the syntax element can be the prefix bin string. For example, the prefix bin string can be derived as described below.
[0249] The prefix value for symbolVal for the syntax element can be derived as shown in the following equation.
[0250] [Equation 7]
[0251] prefixVal = symbolVal >> CRiceParam
[0252] Here, prefixVal can represent the prefix value of symbolVal. The prefix of the TR bin string for the syntax element (i.e., the prefix bin string) can be derived as described below.
[0253] 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 being prefixVal + 1 indicated by binIdx. The bin with binIdx less than prefixVal can be equal to 1. Additionally, the bin for the same binIdx as prefixVal can be equal to 0.
[0254] For example, the bin string derived by unary binarization of prefixVal can be as shown in the following table.
[0255] [Table 7]
[0256]
[0257] Meanwhile, if prefixVal is not less than cMax >> cRiceParam, the prefix bin string can be a bit string of length cMax >> cRiceParam and all bits being 1.
[0258] Additionally, if cMax is greater than symbolVal and if cRiceParam is greater than 0, there may be a bin suffix bin string for the TR bin string. For example, the suffix bin string can be derived as described below.
[0259] The suffix value of symbolVal for the syntax element can be derived as shown in the following equation.
[0260] [Equation 8]
[0261] suffixVal = symbolVal - ((prefixVal) << cRiceParam
[0262] Here, suffixVal can represent the suffix value of symbolVal.
[0263] The suffix of the TR bin string (i.e., the suffix bin string) can be derived based on the FL binarization process for suffixVal, where the value of cMax for suffixVal is (1 << cRiceParam) - 1.
[0264] Meanwhile, if the value of the input parameter (i.e., cRiceParam) is 0, the TR binarization can be exact truncated unary binarization, and the value cMax that is always the same as the possible maximum value of the syntax element to be decoded can be used.
[0265] Alternatively, for example, the EGk binarization process may be performed as follows. The syntax element encoded by ue(v) may be a syntax element subject to Exp-Golomb coding.
[0266] For example, the 0th order Exp-Golomb (EG0) binarization process may be performed as follows.
[0267] The parsing process for the 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.
[0268] [Table 8]
[0269]
[0270] In addition, the variable "codeNum" may be derived as shown in the following equation.
[0271] [Equation 9]
[0272] codeNum = 2 * leadingZeroBits1 + read_bits(leadingZeroBits)
[0273] Here, the value returned from read_bits(leadingZeroBits), i.e., the value indicated by read_bits(leadingZeroBits), may be interpreted as the binary representation of an unsigned integer for the most significant bit recorded first.
[0274] The structure of the Exp-Golomb code in which the bitstring is divided into "prefix" bits and "suffix" bits may be represented as shown in the following table.
[0275] [Table 9]
[0276] In the form of a bit string Range of codeNum l 0 <![CDATA[0 1 x0]]> 1..2 <![CDATA[0 0 1 x1 x0]]> 3..6 <![CDATA[0 0 0 1x2 x1 x0]]> 7..14 <![CDATA[0 0 0 0 1 x3 x2 x1 x0]]> 15..30 <![CDATA[0 0 0 0 0 1 x1 x3 x2 x1x0]]> 31..62 ... ...
[0277] The "prefix" bits may be the bits parsed as described above to calculate leadingZeroBits and may be represented by 0 or 1 of the bitstring in Table 9. That is, the bitstring disclosed as 0 or 1 in Table 9 above may represent the prefix bitstring. The "suffix" bits may be the bits parsed in the calculation of codeNum and may be represented by xi in Table 9 above. That is, the bitstring disclosed as xi in Table 9 above may represent the suffix bitstring. Here, i may be a value in the range of LeadingZeroBits - 1. In addition, each xi may be equal to 0 or 1.
[0278] The bitstring assigned to CodeNum may be as shown in the following table.
[0279] [Table 10]
[0280] Bit string codeNum 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 ... ...
[0281] If the descriptor of the syntax element is ue(v), i.e., if the syntax element is coded with ue(v), the value of the syntax element may be equal to codeNum.
[0282] In addition, for example, the EGk binarization process may be performed as follows.
[0283] The input to the EGk binarization process may be a request for EGk binarization. In addition, the output of the EGk binarization process may be the EGk binarization for symbolVal (i.e., the value corresponding to the bin string).
[0284] The bit string for the EGk binarization process for symbolVal may be derived as follows.
[0285] [Table 11]
[0286]
[0287] Referring to Table 11 above, the binary value X may be added to the end of the bin string by each call of put(X). Here, X may be 0 or 1.
[0288] In addition, for example, the finite EGk binarization process may be performed as follows.
[0289] The input to the finite EGk binarization process may be a request for finite EGk binarization, the Rice parameter riceParam, the variable log2TransformRange as the base-2 logarithm representing the maximum value, and the variable maxPreExtLen as the variable representing the maximum prefix extension length. In addition, the output of the finite EGk binarization process may be the finite EGk binarization for symbolVal as the value corresponding to the empty string.
[0290] The bit string for the finite EGk binarization process for symbolVal may be derived as follows.
[0291] [Table 12]
[0292]
[0293] In addition, for example, the FL binarization process may be performed as follows.
[0294] The input to the FL binarization process may be a request for FL binarization for a syntax element and cMax. In addition, the output of the FL binarization process may be the FL binarization for symbolVal as the value corresponding to the bin string.
[0295] The FL binarization can be configured by using a bit string of symbolVal with a fixed length of bits. Here, the fixed-length bits can be an unsigned integer bit string. That is, a bit string for symbolVal used as a symbol value can be derived by FL binarization, and the bit length (i.e., the number of bits) of the bit string can be a fixed length.
[0296] For example, the fixed length can be derived as shown in the following equation.
[0297] [Equation 10]
[0298] fixedLength = Ceil(Log2(cMax + 1))
[0299] The index of the bin for FL binarization can be a method that uses values that increase in order from the most significant bit to the least significant bit. For example, the bin index related to the most significant bit can be binIdx = 0.
[0300] Meanwhile, for example, the binarization process for the syntax element abs_remainder in the residual information can be performed as follows.
[0301] The input to the binarization process of abs_remainder can be a request for binarization of the syntax element abs_remainder[n], the color component cIdx, and the luminance position (x0, y0). The luminance position (x0, y0) can indicate the top-left sample of the current luminance transform block based on the top-left luminance sample of the picture.
[0302] The output of the binarization process for abs_remainder can be the binarization of abs_remainder (i.e., the binarization bin string of abs_remainder). The available bin string for abs_remainder can be derived through the binarization process.
[0303] The Rice parameter cRiceParam for abs_remainer[n] can be derived through a Rice parameter derivation process performed via the input color component cIdx, the luminance position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth (which is the base-2 logarithm of the width of the transform block), and log2TbHeight (which is the base-2 logarithm of the height of the transform block). A detailed description of the Rice parameter derivation process will be described later.
[0304] Additionally, for example, cMax for the currently to-be-compiled abs_remainder[n] can be derived based on the Rice parameter cRiceParam. cMax can be derived as shown in the following equation.
[0305] [Equation 11]
[0306] cMax = 6cRiceParam
[0307] Meanwhile, the binarization for abs_remainder (i.e., the bin string for abs_remainder) can be the concatenation of the prefix bin string and the suffix bin string in the case where there is a suffix bin string. Additionally, in the case where there is no suffix bin string, the bin string for abs_remainder can be the prefix bin string.
[0308] For example, the prefix bin string can be derived as described below.
[0309] The prefix value prefixVal of abs_remainder[n] can be derived as shown in the following equation.
[0310] [Equation 12]
[0311] prefixVal = Min(cMax, abs_remainder[n])
[0312] The prefix of the bin string of abs_remainder[n] (i.e., the prefix bin string) can be derived through the TR binarization process for prefixVal, where cMax and cRiceParam are used as inputs.
[0313] If the prefix bin string is the same as the bit string with all bits being 1 and a bit length of 6, the suffix bin string of the bin string of abs_remainder[n] may exist and can be derived as described below.
[0314] The Rice parameter derivation process for dec_abs_level[n] can be as follows.
[0315] The inputs to the Rice parameter derivation process can be the color component index cIdx, the luminance position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth which is the base-2 logarithm of the width of the transform block, and log2TbHeight which is the base-2 logarithm of the height of the transform block. The luminance position (x0, y0) can indicate the top-left sample of the current luminance transform block based on the top-left luminance sample of the picture. Additionally, the output of the Rice parameter derivation process can be the Rice parameter cRiceParam.
[0316] For example, similar to the pseudo-code disclosed in the following table, the variable locSumAbs can be derived based on the array AbsLevel[x][y] of transform blocks with a given component index cIdx and the upper-left luminance position (x0, y0).
[0317] [Table 13]
[0318]
[0319] Then, based on the given variable locSumAbs, the Rice parameter cRiceParam can be derived as shown in the following table.
[0320] [Table 14]
[0321] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiccParam 0 0 0 0 0 0 0 1 l 1 l 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
[0322] In addition, for example, during the process of deriving the Rice parameter for abs_remainder[n], baseLevel can be set to 4.
[0323] Alternatively, for example, the Rice parameter cRiceParam can be determined based on whether transform skip is applied to the current block. That is, if the transform is not applied to the current TB including the current CG, in other words, if the transform skip is applied to the current TB including the current CG, then the Rice parameter cRiceParam can be derived as 1.
[0324] In addition, the suffix value suffixVal of abs_remainder can be derived as shown in the following equation.
[0325] [Equation 13]
[0326] suffixVal = abs_remainder[n] - CMax
[0327] The suffix bin string of the bin string of abs_remainder can be derived through the finite EGk binarization process for suffixVal, where k is set to cRiceParam + 1, riceParam is set to cRiceParam, log2TransformRange is set to 15, and maxPreExtLen is set to 11.
[0328] Meanwhile, for example, the binarization process for the syntax element dec_abs_level in the residual information can be performed as follows.
[0329] The input to the binarization process for dec_abs_level can be a request for binarization of the syntax element dec_abs_level[n], color component cIdx, luminance position (x0, y0), current coefficient scan position (xC, yC), log2TbWidth which is the base-2 logarithm of the width of the transform block, and log2TbHeight which is the base-2 logarithm of the height of the transform block. The luminance position (x0, y0) can indicate the top-left sample of the current luminance transform block based on the top-left luminance sample of the picture.
[0330] The output of the binarization process for dec_abs_level can be the binarization of dec_abs_level (i.e., the binarization bin string of dec_abs_level). The available bin string for dec_abs_level can be derived through the binarization process.
[0331] The Rice parameter cRiceParam for dec_abs_level[n] can be derived through a Rice parameter derivation process executed using the input of color component cIdx, luminance position (x0, y0), current coefficient scan position (xC, yC), log2TbWidth which is the base-2 logarithm of the width of the transform block, and log2TbHeight which is the base-2 logarithm of the height of the transform block. The Rice parameter derivation process will be described in detail below.
[0332] In addition, for example, cMax for dec_abs_level[n] can be derived based on the Rice parameter cRiceParam. cMax can be derived as shown in the following table.
[0333] [Equation 14]
[0334] cMax = 6cRiccParam
[0335] Meanwhile, the binarization for dec_abs_level[n] (i.e., the bin string for dec_abs_level[n]) can be the concatenation of a prefix bin string and a suffix bin string in the presence of a suffix bin string. Additionally, in the absence of a suffix bin string, the bin string for dec_abs_level[n] can be the prefix bin string.
[0336] For example, the prefix bin string can be derived as described below.
[0337] The prefix value prefixVal of dec_abs_level[n] can be derived as shown in the following equation.
[0338] [Equation 15]
[0339] prefixVal = Min(cMax, dec_abs_level[n])
[0340] The prefix (i.e., the prefix bin string) of the bin string of dec_abs_level[n] can be derived through the TR binarization process for prefixVal, where cMax and cRiceParam are used as inputs.
[0341] If the prefix bin string is the same as the bit string with all bits being 1 and a bit length of 6, the suffix bin string of the bin string of dec_abs_level[n] can exist and can be derived as described below.
[0342] The Rice parameter derivation process for dec_abs_level[n] can be as follows.
[0343] The inputs to the Rice parameter derivation process can be the color component index cIdx, the luminance position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth which is the base-2 logarithm of the width of the transform block, and log2TbHeight which is the base-2 logarithm of the height of the transform block. The luminance position (x0, y0) can indicate the top-left sample of the current luminance transform block based on the top-left luminance sample of the picture. In addition, the output of the Rice parameter derivation process can be the Rice parameter cRiceParam.
[0344] For example, the variable locSumAbs can be derived based on the array AbsLevel[x][y] of transform blocks with a given component index cIdx and top-left luminance position (x0, y0), similar to the pseudocode disclosed in the following table.
[0345] [Table 15]
[0346]
[0347] Then, based on the given variable locSumAbs, the Rice parameter cRiceParam can be derived as shown in the following table.
[0348] [Table 16]
[0349] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiccParam 0 0 0 0 0 0 0 1 1 1 1 l 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
[0350] 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.
[0351] [Equation 16]
[0352] ZeroPos[n] = (QState < 2? 1 : 2) << cRiceParam
[0353] In addition, the suffix value suffixVal of dec_abs_level[n] can be derived as shown in the following equation.
[0354] [Equation 17]
[0355] suffixVal = decabs level[n] - CMax
[0356] The suffix bin string of the bin string of dec_abs_level[n] can be derived through the finite EGk binarization process for suffixVal, where k is set to cRiceParam + 1, truncSuffixLen is set to 15, and maxPreExtLen is set to 11.
[0357] Meanwhile, RRC and TSRC can have the following differences.
[0358] - For example, in TSRC, the Rice parameter for the syntax element abs_remainder[] can be derived as 1. The Rice parameter cRiceParam of the syntax element abs_remainder[] in RRC can be derived based on LastAbsRemainder and lastRiceParam as described above, but the Rice parameter cRiceParam of the syntax element abs_remainder[] in TSRC can be derived as 1. That is, for example, when transform skip is applied to the current block (e.g., the current TB), the Rice parameter cRiceParam of abs_remainder[] of TSRC for the current block can be derived as 1.
[0359] - 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] can 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] can be signaled. Here, abs_level_gtx_flag[n][0] can be expressed as abs_level_gt1_flag or the first coefficient level flag, abs_level_gtx_flag[n][1] can be expressed as abs_level_gt3_flag or the second coefficient level flag, abs_level_gtx_flag[n][2] can be expressed as abs_level_gt5_flag or the third coefficient level flag, abs_level_gtx_flag[n][3] can be expressed as abs_level_gt7_flag or the fourth coefficient level flag, and abs_level_gtx_flag[n][4] can be expressed as abs_level_gt9_flag or the fifth coefficient level flag. Specifically, the first coefficient level flag can be a flag indicating whether the coefficient level is greater than a first threshold (e.g., 1), the second coefficient level flag can be a flag indicating whether the coefficient level is greater than a second threshold (e.g., 3), the third coefficient level flag can be a flag indicating whether the coefficient level is greater than a third threshold (e.g., 5), the fourth coefficient level flag can be a flag indicating whether the coefficient level is greater than a fourth threshold (e.g., 7), and the fifth coefficient level flag can be a flag indicating whether the coefficient level is greater than a fifth threshold (e.g., 9). As described above, in TSRC, compared with RRC, 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] can also be included.
[0360] - In addition, for example, in RRC, the syntax element coeff_sign_flag can be bypassed in compilation, but in TSRC, the syntax element coeff_sign_flag can be bypassed in compilation or context-compiled.
[0361] Meanwhile, in the compilation of residual data for a block to which transform skip is applied (i.e., a transform skip block), in the case where a syntax element is bypass-compiled, the present disclosure proposes a method of compiling bypass-compiled bins by grouping the bins for bypass-compilation of each syntax element.
[0362] As a proposed embodiment, the number of bins for context compilation that can be used for transform skip residual compilation (i.e., the above-mentioned transform skip residual compilation (TSRC)) in a TU can be limited to a specific threshold, and in the case where all the bins for context compilation available for the TU are consumed, and then, the syntax elements for the TU are compiled into bypass bins, a method is proposed that uses a compilation order in which syntax elements are prioritized rather than the existing compilation order in which coefficient positions are prioritized.
[0363] In particular, for example, in traditional TSRC, the compilation of syntax elements sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag, abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], abs_level_gtx_flag[n][4], and / or abs_remainder is included. The above syntax elements can be compiled in the order shown in the following figure.
[0364] Figure 12 An example of compiling syntax elements in TSRC is illustrated.
[0365] Meanwhile, in the present disclosure, a layer can mean a group / unit in which syntax elements are continuously compiled in a single repetition statement, and can be described with the same meaning in other elements below. In addition, in Figure 12 ,"sig" can represent sig_coeff_flag, "sign" can represent coeff_sign_flag, gt0 can represent abs_level_gtx_flag[n][0], "par" can represent par_level_flag, gt1 can represent abs_level_gtx_flag[n][1], gt2 can represent abs_level_gtx_flag[n][2], gt3 can represent abs_level_gtx_flag[n][3], gt4 can represent abs_level_gtx_flag[n][4], and "rem" can represent abs_remainder.
[0366] For example, in the case of the TSRC of the present embodiment shown in Figure 12 , the syntax elements can be compiled in the order of priority of the positions of the coefficients in a single layer. That is, for example, referring to Figure 12 , in the first layer, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], and par_level_flag for a specific coefficient (e.g., Coeff0) can be compiled, and sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], and par_level_flag for the next coefficient (e.g., Coeff1) can be compiled. Later, for example, in the second layer, 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] for a specific coefficient (e.g., Coeff0) are compiled, and 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] for the next coefficient (e.g., Coeff1) are compiled. Subsequently, in the third layer, abs_remainder for all the coefficients (e.g., from Coeff0 to Coeff n-1 ) in the sub-block can be compiled.
[0367] Meanwhile, in the TSRC of the VVC standard, as described above, the maximum number of bins that can be compiled with available context is limited to a specific threshold for residual data compilation (e.g., RemCcbs or MaxCcbs shown in Table 4), and the specific threshold can be derived based on the number of samples included in the transform block or the width and / or height of the transform block, etc. For example, the specific threshold can be derived as shown in the following equation.
[0368] [Equation 18]
[0369] MaxCcbs = c × horizontal size of the transform block × vertical size of the transform block
[0370] Here, "c" can represent any real value. In the present disclosure, the value of c is not limited to a specific value. For example, c can have an integer value such as 2 or a decimal value such as 1.5, 1.75, or 1.25. Additionally, for example, a threshold for limiting the maximum number of bins available for context compilation can also be derived based on whether the transform block is a chrominance block and the number of samples included in the transform block and the width and / or height of the transform block. Further, the threshold (RemCcbs) can be initialized on a per-transform-block basis, and the threshold can be reduced by as much as the number of bins for context compilation for the compilation of syntax elements used for residual data compilation.
[0371] Meanwhile, in TSRC, the syntax elements sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag, abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], abs_level_gtx_flag[n][4], and / or abs_remainder can be context-compiled, but can also be bypass-compiled.
[0372] For example, ctxInc for the above syntax elements can be assigned as shown in the following table.
[0373] [Table 17]
[0374]
[0375] As represented in Table 17, when compiling the syntax elements sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag, abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], or abs_level_gtx_flag[n][4], if the threshold (e.g., RemCcbs or MaxCcbs) is greater than 0, the syntax element can be compiled as a context-compiled bin, and if the threshold is less than or equal to 0, the syntax element can be compiled as a bypass bin using a uniform probability distribution.
[0376] Figure 13 Illustrate another example of compiling syntax elements in TSRC. For example, Figure 13It is possible to illustrate the case where the threshold becomes zero after compiling the coeff_sign_flag for Coeff0 into a context-compiled bin when compiling any sub-block / coefficient group in a transform block. In this case, referring to Figure 13 , the syntax elements including the abs_level_gtx_flag[n][0] for Coeff0 and the coeff_sign_flag for Coeff0 that are compiled later can be compiled into a bypass bin because the remaining threshold is zero, that is, there are no remaining context-compiled bins available. The compilation order of the embodiment shown in Figure 12 can be maintained without any changes in the embodiment shown in Figure 13 .
[0377] Figure 14 Another example of compiling syntax elements in TSRC is illustrated. In addition, for example, Figure 14 It is possible to illustrate the case where the threshold becomes zero after compiling the abs_level_gtx_flag[n][2] for Coeff0 into a context-compiled bin when compiling any sub-block / coefficient group in a transform block. In this case, referring to Figure 14 , the syntax elements including the abs_level_gtx_flag[n][3] for Coeff0 and the abs_level_gtx_flag[n][2] for Coeff0 that are compiled later can be compiled into a bypass bin because the remaining threshold is zero, that is, there are no remaining context-compiled bins available. The compilation order of the embodiment shown in Figure 12 can be maintained without any changes in the embodiment shown in Figure 14 .
[0378] As described above, during the compilation of TSRC for a block in TSRC, when all available remaining context-compiled bins of the block have been used, subsequent syntax elements can be bypass-compiled. However, in traditional TSRC, when all available remaining context-compiled bins have been used and the syntax elements are compiled into bypass bins, as described above, the syntax elements can be compiled in the compilation order with coefficient position priority. Therefore, the present disclosure proposes an embodiment of compiling syntax elements for bypass compilation in the compilation order with syntax element priority instead of the existing compilation order with coefficient position priority. By this, the advantages of a bypass compilation engine with high throughput can be maximized, and the compilation efficiency of the residual data of an image can be improved.
[0379] Specifically, for example, an entropy encoder / entropy decoder may include a binarization unit, a regular compilation engine, and a bypass compilation engine. For example, the value of a syntax element may be input to the binarization unit. The binarization unit may transform the value of the syntax element into a bin string and output the bin string. Here, the bin string may mean a binary sequence or a binary code composed of one or more bins. A bin may mean the value (0 or 1) of each digit number that constitutes the binary sequence (or binary code) when the symbol and / or the value of the syntax element are represented as a binary sequence (or binary code) by binarization.
[0380] Subsequently, the binarized signal (bin string) may be input to the regular compilation engine or the bypass compilation engine. The regular compilation engine may assign a context reflecting the probability value of the corresponding bin and perform compilation on the corresponding bin based on the assigned context. The regular compilation engine may perform compilation on each bin and then update the probability and / or context of the bin. The bin compiled by using the regular compilation engine may be referred to as a context-compiled bin.
[0381] In addition, the bypass compilation engine may bypass the process of estimating the probability for the input bin and the process of updating the probability applied to the bin after compiling the probability. In the bypass mode, no context is assigned according to the input bin, but the input bin is simply compiled, and the throughput can be improved. For example, in the bypass mode, the compilation process may be performed by applying a uniform probability distribution (0.5). The bin compiled by using the bypass compilation engine may be referred to as a bypass-compiled bin or a bypass bin.
[0382] Generally, the bypass mode has better throughput performance than the context-compiled bin. To compile one context-compiled bin, one or more processing cycles may be required. However, for the bypass compilation engine, only one cycle is required to compile n bypass-compiled bins. Here, n may be greater than 1. To improve the throughput of entropy compilation, it may be beneficial to change the compilation order (i.e., grouping) such that the bypass-compiled bins are compiled continuously. In particular, in the case of grouping the bypass-compiled bins, from the perspectives of throughput and hardware complexity, it may be beneficial to group the bypass-compiled bins for each syntax element.
[0383] Figure 15 An example of compiling bypass-compiled syntax elements in the TSRC in a syntax-element-first compilation order instead of a coefficient-position-first compilation order is illustrated. For example, Figure 15It is possible to illustrate the case where the threshold becomes zero after the coeff_sign_flag for Coeff0 is compiled into a context-compiled bin during the compilation of any sub-block / coefficient group in the transform block. In this case, refer to Figure 15 , the syntax elements compiled after the coeff_sign_flag for Coeff0, including the abs_level_gtx_flag[n][0] for Coeff0, can be compiled into bypass bins because the remaining threshold is 0, that is, there are no remaining context-compiled bins available. For example, refer to Figure 15 , the remaining context elements (abs_level_gtx_flag[n][0] and par_level_flag) for the Coeff0 context compilation in the first layer can be bypass-compiled according to the existing compilation order, but later, the syntax elements for coefficients Coeff1 to Coeff n-1 can be compiled in the order of syntax elements. In other words, later, the sig_coeff_flag for coefficients Coeff1 to Coeff n-1 can be bypass-compiled continuously, and subsequently, the coeff_sign_flag for coefficients Coeff1 to Coeff n-1 can be bypass-compiled continuously. Next, the abs_level_gtx_flag[n][0] for coefficients Coeff1 to Coeff n-1 can be bypass-compiled continuously, and subsequently, the par_level_flag for coefficients Coeff1 to Coeff n-1 can be bypass-compiled continuously. Additionally, for example, refer to Figure 15 , for the compilation of syntax elements in subsequent layers after the first layer, the proposed compilation order where the syntax elements are prioritized can be maintained.
[0384] Figure 16 Illustrate examples of compiling bypass-compiled syntax elements in TSRC in the compilation order where the syntax elements are prioritized rather than the coefficient position being prioritized. For example, Figure 16 It is possible to illustrate the case where the threshold becomes zero after the abs_level_gtx_flag[n][2] for Coeff0 is compiled into a context-compiled bin during the compilation of any sub-block / coefficient group in the transform block. In this case, refer to Figure 16, the syntax elements compiled after abs_level_gtx_flag[n][2] for Coeff0's abs_level_gtx_flag[n][3] can be compiled into bypass bins because the remaining threshold is 0, that is, there are no remaining context-compiled bins available. For example, referring to Figure 16 , the remaining context elements (abs_level_gtx_flag[n][3] and abs_level_gtx_flag[n][4]) for Coeff0 context-compiled in the second layer can be bypass-compiled according to the existing compilation order. However, later, the syntax elements for coefficients Coeff1 to Coeff n-1 can be compiled in the syntax element order. In other words, later, the abs_level_gtx_flag[n][1] for coefficients Coeff1 to Coeff n-1 can be continuously bypass-compiled, and subsequently, the abs_level_gtx_flag[n][2] for coefficients Coeff1 to Coeff n-1 can be continuously bypass-compiled. Next, the abs_level_gtx_flag[n][3] for coefficients Coeff1 to Coeff n-1 can be bypass-compiled continuously, and subsequently, the abs_level_gtx_flag[n][4] for coefficients Coeff1 to Coeff n-1 can be bypass-compiled continuously. Additionally, for example, referring to Figure 16 , even for compiling syntax elements in subsequent layers after the second layer, the proposed compilation order prior to the syntax elements can be maintained.
[0385] Furthermore, the present disclosure proposes a method for compiling bypass-compiled bins by grouping the bypass-compiled bins for each syntax element in the case where the syntax elements are bypass-compiled in a simplified residual data compilation structure. There are advantages in terms of compilation performance such as lossless compilation or near-lossless compilation under specific conditions, and the simplified residual compilation structure can be used for a single compilation block or transform block. In this case, by using the method proposed in the present disclosure, instead of the existing compilation order with coefficient position priority, a syntax element priority compilation order can be used.
[0386] In addition, since the number of bins available for context compilation for residual compilation in a TU may be limited to a specific threshold, when all the bins available for context compilation for the TU are consumed and subsequently the syntax elements for the TU are compiled into bypass bins, an embodiment in the present disclosure proposes a method that uses a syntax-element-first compilation order instead of the existing coefficient-position-first compilation order. At the same time, the existing simplified residual data compilation structure may be the same as those shown in the following drawings and the descriptions for the drawings.
[0387] Figure 17 An example of compiling syntax elements in a simplified residual data compilation structure is illustrated. Refer to Figure 17 , the existing simplified residual data compilation may include the compilation of syntax elements sig_coeff_flag, coeff_sign_flag, and abs_remainder. Figure 17 The compilation order of syntax elements in a simplified residual data compilation structure with the existing compilation order can be illustrated, where coefficient position is prioritized for a sub-block / coefficient group / transformation block / compilation block.
[0388] For example, refer to Figure 17, in the first layer, the sig_coeff_flag and coeff_sign_flag for a specific coefficient can be compiled, the sig_coeff_flag and coeff_sign_flag for the next coefficient after the specific coefficient can be compiled, and the sig_coeff_flag and coeff_sign_flag for the coefficients up to the last coefficient position in the scan order can be compiled. Later, in the second layer, the compilation of abs_remainder for all the coefficients in the sub-block can be performed in the scan order. Here, when the value of the coefficient at the position is zero, the value of sig_coeff_flag can be zero, and when the value of the coefficient at the position is non-zero, the value of sig_coeff_flag can be 1. Additionally, the coeff_sign_flag can indicate the sign of the coefficient at the position. For example, when the coefficient at the position is zero, that is, when the sig_coeff_flag for the coefficient is zero, the coeff_sign_flag for the coefficient may not be compiled. Further, when the coefficient is non-zero and negative, the value of the coeff_sign_flag for the coefficient can be 1 (or zero), and when the coefficient is non-zero and positive, the value of the coeff_sign_flag for the coefficient can be zero (or 1). Alternatively, when the coefficient is negative regardless of the sig_coeff_flag for the coefficient, the value of the coeff_sign_flag for the coefficient can be 1 (or zero), and when the coefficient is positive or zero, the value of the coeff_sign_flag for the coefficient can be zero (or 1). Alternatively, when the coefficient is positive regardless of the sig_coeff_flag for the coefficient, the value of the coeff_sign_flag for the coefficient can be 1 (or zero), and when the coefficient is negative or zero, the value of the coeff_sign_flag for the coefficient can be zero (or 1).
[0389] Meanwhile, the present disclosure proposes a method for compiling and grouping each syntax element to generate advantages in terms of CABAC throughput and hardware complexity in a simplified residual data compilation structure.
[0390] Figure 18 The figure shows an example of compiling the syntax elements bypass-compiled in the simplified residual data compilation structure in a syntax element-prioritized compilation order rather than a coefficient-position-prioritized compilation order. For example, according to this embodiment, as Figure 18 shown, in the first layer, it can be from the sig_coeff_flag of Coeff0 to Coeff n-1(The last coefficient in the scan order) The sig_coeff_flag of continuously performs bypass compilation, and subsequently, can be from the coeff_sign_flag of Coeff0 to Coeff n-1 (The last coefficient in the scan order) The coeff_sign_flag of continuously performs bypass compilation. Later, can be from the abs_remainder of Coeff0 to Coeff n-1 (The last coefficient in the scan order) The abs_remainder of continuously performs bypass compilation.
[0391] At the same time, the simplified residual data compilation structure can have a different syntax structure from that shown above Figure 17 For example, the simplified residual data compilation structure shown in the following figure can be compiled.
[0392] Figure 19a and 19b illustrate embodiments in which syntax elements are compiled in the simplified residual data compilation structure. Refer to Figure 19a and 19b , the simplified residual data compilation can include the compilation of the syntax elements dec_abs_level and coeff_sign_flag. Figure 19a and 19b can illustrate the compilation order of the syntax elements of the simplified residual data compilation structure with the existing compilation order, where for a sub-block / coefficient group / transformation block / compilation block, the coefficient position takes precedence. For example, refer to Figure 19a , in a layer, the dec_abs_level and coeff_sign_flag for a specific coefficient can be compiled, the dec_abs_level and coeff_sign_flag for the next coefficient after a specific coefficient can be compiled, and the dec_abs_level and coeff_sign_flag for the coefficients up to the last coefficient position in the scan order can be compiled. Additionally, for example, refer to Figure 19b , in a layer, the coeff_sign_flag and dec_abs_level for a specific coefficient can be compiled, the coeff_sign_flag and dec_abs_level for the next coefficient after a specific coefficient can be compiled, and the coeff_sign_flag and dec_abs_level for the coefficients up to the last coefficient position in the scan order can be compiled.
[0393] Here, when the value of the coefficient at a position is zero, the value of dec_abs_level can be zero, and when the value of the coefficient at the position is non-zero, the value of dec_abs_level can be the absolute value of the coefficient. Additionally, coeff_sign_flag can indicate the sign of the coefficient at the position. For example, when the coefficient at the position is zero, i.e., when dec_abs_level for the coefficient is zero, the coeff_sign_flag for the coefficient may not be compiled. Further, when the coefficient is non-zero and negative, the value of coeff_sign_flag for the coefficient can be 1 (or zero), and when the coefficient is non-zero and positive, the value of coeff_sign_flag for the coefficient can be zero (or 1). Alternatively, when the coefficient is negative regardless of dec_abs_level for the coefficient, the value of coeff_sign_flag for the coefficient can be 1 (or zero), and when the coefficient is positive or zero, the value of coeff_sign_flag for the coefficient can be zero (or 1). Alternatively, when the coefficient is positive regardless of dec_abs_level for the coefficient, the value of coeff_sign_flag for the coefficient can be 1 (or zero), and when the coefficient is negative or zero, the value of coeff_sign_flag for the coefficient can be zero (or 1).
[0394] Meanwhile, when specific conditions in the above-mentioned RRC or TSRC are met, a simplified residual data compilation structure can be used. For example, when the current block is losslessly compiled or nearly losslessly compiled, or when all available context compilation bins for the current block are consumed, the residual data can be compiled in the simplified residual data compilation structure.
[0395] For example, the present disclosure proposes a method for compiling the syntax elements of the coefficients for the current block in the simplified residual data compilation structure when all available context compilation bins for the current block are consumed in the TSRC for the current block.
[0396] In particular, for example, the syntax elements according to the TSRC for the current block can be parsed. In this case, the maximum number of bins available for context compilation for the current block can be derived, and in the case where all the maximum number of context-compiled bins for the current block are used to compile the syntax elements of the previous transform coefficient of the current transform coefficient in the scan order, the syntax elements of the current transform coefficient and the subsequent transform coefficients of the current transform coefficient in the scan order can be compiled in a simplified residual data compilation structure. Therefore, the syntax elements of the current transform coefficient and the subsequent transform coefficients of the current transform coefficient in the scan order can include the sign flag for the transform coefficient and the coefficient level information. The decoding device can derive the transform coefficient based on the syntax elements of the transform coefficient compiled in the simplified residual data compilation structure. For example, the coefficient level information can represent the absolute value of the coefficient level of the transform coefficient. In addition, the sign flag can represent the sign of the current transform coefficient. The decoding device can derive the coefficient level of the transform coefficient based on the coefficient level information and the sign of the transform coefficient based on the sign flag.
[0397] Meanwhile, in order to achieve advantages in terms of CABAC throughput and hardware complexity, the present disclosure proposes a method for compiling and grouping the syntax elements bypass-compiled in the simplified residual data compilation structure shown in FIG. 19 for each syntax element.
[0398] Figure 20a and 20b Illustrated is an example of compiling the syntax elements bypass-compiled in the simplified residual data compilation structure in a syntax-element-first compilation order rather than a coefficient-position-first compilation order. For example, according to this embodiment, as Figure 20a shown, in a layer, bypass compilation can be continuously performed from the dec_abs_level of Coeff0 to the dec_abs_level of Coeff n-1 (the last coefficient in the scan order), and subsequently, bypass compilation can be continuously performed from the coeff_sign_flag of Coeff0 to the coeff_sign_flag of Coeff n-1 (the last coefficient in the scan order). Alternatively, for example, according to this embodiment, as Figure 20b shown, in a layer, bypass compilation can be continuously performed from the coeff_sign_flag of Coeff0 to the coeff_sign_flag of Coeff n-1 (the last coefficient in the scan order), and subsequently, bypass compilation can be continuously performed from the dec_abs_level of Coeff0 to the dec_abs_level of Coeff n-1(The last coefficient in the scan order) continuously performs bypass compilation on dec_abs_level. According to this embodiment, the bins of bypass compilation can be grouped and continuously compiled for each syntax element, and effects such as improving the throughput of entropy compilation and reducing the hardware complexity can be produced.
[0399] Meanwhile, the simplified residual data compilation structure can have a syntax structure different from the Figure 17 , Figure 19a and Figure 19b shown in the syntax structure. For example, the simplified residual data compilation structure shown in the following figure can be compiled.
[0400] Figure 21 Illustrates an embodiment in which syntax elements are compiled in the simplified residual data compilation structure. Referring to Figure 21 , the simplified residual data compilation can include the compilation of syntax elements sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], par_level_flag, and abs_remainder. Figure 21 The compilation order of syntax elements of the simplified residual data compilation structure with the existing compilation order can be illustrated, where for one sub-block / coefficient group / transformation block / compilation block, the coefficient position is prioritized. For example, referring to Figure 21 , in the first layer, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], and par_level_flag for a specific coefficient can be compiled, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], and par_level_flag for the next coefficient after the specific coefficient can be compiled, and sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[n][0], and par_level_flag for the coefficients up to the last coefficient position in the scan order can be compiled. Later, in the second layer, the compilation of abs_remainder for all coefficients in the sub-block can be performed in the scan order.
[0401] Meanwhile, in order to produce advantages in terms of CABAC throughput and hardware complexity, the present disclosure proposes a method for compiling and grouping the syntax elements bypass-compiled in the simplified residual data compilation structure shown in Figure 21 for each syntax element.
[0402] Figure 22 FIG. shows an example of compiling a syntax element bypass-compiled in a simplified residual data compilation structure in a compilation order prioritizing syntax elements rather than a coefficient position priority. For example, according to this embodiment, as Figure 22 shown, in the first layer, bypass compilation can be continuously performed from the sig_coeff_flag of Coeff0 to the sig_coeff_flag of Coeff n-1 (the last coefficient in the scan order), and then continuously performed from the coeff_sign_flag of Coeff0 to the coeff_sign_flag of Coeff n-1 (the last coefficient in the scan order), then continuously performed from the abs_level_gtx_flag[n][0] of Coeff0 to the abs_level_gtx_flag[n][0] of Coeff n-1 (the last coefficient in the scan order), and then continuously performed from the par_level_flag of Coeff0 to the par_level_flag of Coeff n-1 (the last coefficient in the scan order). Later, in the second layer, bypass compilation can be continuously performed from the abs_remainder of Coeff0 to the abs_remainder of Coeff n-1 (the last coefficient in the scan order). According to this embodiment, the bins of bypass compilation can be grouped and continuously compiled for each syntax element, and effects such as improving the throughput of entropy compilation and reducing hardware complexity can be produced.
[0403] Figure 23 Briefly shows an image encoding method performed by an encoding device according to the present disclosure. Figure 23 The method proposed in can be performed by Figure 2 the encoding device disclosed in. Specifically, for example, Figure 23 the step S2300 shown in can be performed by the predictor of the encoding device, Figure 23 the steps S2310 and S2320 shown in can be performed by the residual processor of the encoding device, and Figure 23 the step S2330 shown in can be performed by the entropy encoder of the encoding device. Additionally, although not shown, the process of generating the reconstructed samples and the reconstructed picture for the current block can also be performed by the adder of the encoding device based on the residual samples and the prediction samples for the current block.
[0404] The encoding device derives prediction samples for the current block based on inter-frame prediction or intra-frame prediction (step S2300). The encoding device may derive prediction samples for the current block based on a prediction mode. In this case, various prediction methods disclosed in the present disclosure, such as inter-frame prediction or intra-frame prediction, may be applied.
[0405] For example, the encoding device may determine whether to perform inter-frame prediction or intra-frame prediction on the current block, and determine a specific inter-frame prediction mode or a specific intra-frame prediction mode based on the RD cost. According to the determined mode, the encoding device may derive prediction samples for the current block.
[0406] The encoding device derives residual samples for the current block based on the prediction samples (step S2310). For example, the encoding device may derive the residual samples for the current block by subtraction between the original samples and the prediction samples for the current block.
[0407] The encoding device derives transform coefficients for the current block based on the residual samples (step S2320). For example, the encoding device may derive the transform coefficients for the current block based on the residual samples. For example, the encoding device may determine whether a transform is applied 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 a transform is applied to the current block in consideration of the compilation efficiency. For example, the encoding device may determine that no transform is applied to the current block. A block to which no transform is applied may be referred to as a transform skip block. That is, for example, the current block may be a transform skip block.
[0408] When no transform is applied to the current block, that is, when no transform is applied to the residual samples, the encoding device may export the derived residual samples as transform coefficients. In addition, when a transform is applied to the current block, that is, when a transform is applied to the residual samples, the encoding device may derive the transform coefficients by performing a transform on the residual samples. The current block may include a plurality of sub-blocks or coefficient groups (CG). In addition, the size of the sub-blocks of the current block may be 4x4 size or 2x2 size. That is, the sub-blocks of the current block may include at most 16 non-zero transform coefficients or at most 4 non-zero transform coefficients.
[0409] Here, the current block may be a compilation block (CB) or a transform block (TB). In addition, the transform coefficients may also be expressed as residual coefficients.
[0410] The encoding device encodes the image information including the prediction mode information of the current block and the residual information of the transform coefficients (step S2330). The encoding device may encode the image information including the prediction mode information indicating the prediction mode of the current block and the residual information for the transform coefficients. For example, the encoding device may generate and encode the prediction-related information of the current block. The prediction-related information may include the prediction mode information.
[0411] In addition, for example, the residual information may include syntax elements for transform skip residual compilation (TSRC) of transform coefficients for the current block. For example, the encoding device may generate and encode syntax elements for transform skip residual compilation (TSRC) of transform coefficients for the current block. For example, the residual information may include syntax elements according to a first residual data compilation structure of TSRC and syntax elements according to a second residual data compilation structure of TSRC.
[0412] For example, the encoding device may generate and encode syntax elements for the first transform coefficient to the nth transform coefficient. The residual information of the current block may include syntax elements for the first transform coefficient to the nth transform coefficient of the current block.
[0413] For example, the residual information may include syntax elements for the first transform coefficient to the nth transform coefficient of the current block. Here, for example, the syntax element may be a syntax element according to a first residual data compilation structure of transform skip residual compilation (TSRC). The syntax element according to the first residual data compilation structure may include syntax elements for context compilation of transform coefficients and / or bypass compilation of transform coefficients. The syntax element according to the first residual data compilation structure may include syntax elements such as sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, abs_remainder, and / or coeff_sign_flag.
[0414] For example, the syntax elements for context encoding of transform coefficients may include a valid 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 for the parity of the coefficient level of the transform coefficient. Additionally, for example, the syntax elements for context encoding may include a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold, a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third threshold, a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the valid coefficient flag may be sig_coeff_flag, the sign flag may be ceff_sign_flag, the first coefficient level flag may be abs_level_gt1_flag, and the parity level flag may be par_level_flag. Furthermore, 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.
[0415] In addition, for example, the syntax elements for bypass encoding of transform coefficients may include coefficient level information for the value (or coefficient level) of the transform coefficient 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.
[0416] In addition, the number of syntax elements for context coding of the first transform coefficient to the nth transform coefficient may be the same as the maximum number of bins for context coding of the current block. That is, for example, all the bins for context coding of the current block may be used as the bins for the syntax elements for context coding of the first transform coefficient to the nth transform coefficient. For example, the maximum number of bins for context coding of the current block may be derived based on the width and height of the current block. For example, the maximum number of bins for context coding of the current block may be derived as a value obtained by multiplying the number of samples of the current block by a specific value. Here, the number of samples may be derived as a value obtained by multiplying the width and height of the current block. In addition, the specific value may have an integer value such as 2 or a decimal value such as 1.5, 1.75, or 1.25.
[0417] Meanwhile, for example, the syntax elements according to the first residual data coding structure can be coded in a coding order according to the coefficient position. The coding order according to the coefficient position may be the scanning order of the transform coefficients. For example, the scanning order may be the raster scanning order. For example, the raster scanning order may represent the order of scanning row by row from the top row and scanning from left to right in each row. For example, the syntax elements according to the first residual data coding structure can be coded in the order from the syntax elements for the first transform coefficient to the syntax elements for the nth transform coefficient. In addition, for example, when the current block includes a plurality of sub-blocks or coefficient groups (CGs), the plurality of sub-blocks or coefficient groups can be coded in the scanning order, and the syntax elements for the transform coefficients in each sub-block or coefficient group can be coded in the scanning order.
[0418] Meanwhile, for example, the residual information may include a transform skip flag for the current block. The transform skip flag may indicate whether the transform is applied to the current block. That is, the transform skip flag may indicate whether the transform is applied to the transform coefficients of the current block. The syntax element indicating the transform skip flag may be the above-mentioned transform_skip_flag. For example, when the value of the transform skip flag is 0, the transform skip flag may indicate that the transform is not applied to the current block, and when the value of the transform skip flag is 1, the transform skip flag may indicate that the transform is applied to the current block. For example, when the current block is a transform skip block, the value of the transform skip flag for the current block may be 1.
[0419] In addition, the encoding device may generate and encode the syntax elements for the (n + 1)th transform coefficient to the last transform coefficient of the current block.
[0420] For example, the residual information may include syntax elements for the (n+1)-th to the last transform coefficient of the current block. Here, for example, the syntax elements may be syntax elements of a second residual data compilation structure according to transform skip residual compilation (TSRC). The syntax elements according to the second residual data compilation structure may be referred to as syntax elements according to a simplified residual data compilation structure. For example, when all the bins for context compilation of the current block are used as the bins for context compilation of the first to the n-th transform coefficients, that is, for example, when the number of syntax elements for context compilation of the first to the n-th transform coefficients is equal to or greater than the maximum number of bins for context compilation of the current block, the encoding device may generate and encode syntax elements for the (n+1)-th to the last transform coefficient of the current block, which are syntax elements of the second residual data compilation structure according to TSRC.
[0421] For example, the syntax elements according to the second residual data compilation structure may include syntax elements for bypass compilation of transform coefficients. For example, the syntax elements according to the second residual data compilation structure may include a sign flag and coefficient level information for transform coefficients. For example, the syntax elements according to the second residual data compilation structure may include coefficient level information representing the absolute value of the coefficient level of a transform coefficient and a sign flag representing the sign of the transform coefficient. The syntax elements for transform coefficients may be compiled based on bypass. That is, the residual syntax elements for transform coefficients may be compiled based on a uniform probability distribution. For example, the coefficient level information may represent the absolute value of the coefficient level of a transform coefficient. Additionally, the sign flag may represent the sign of a transform coefficient. For example, when the value of the sign flag is 0, the sign flag may indicate that the coefficient level of the transform coefficient is positive, and when the value of the sign flag is 1, the sign flag may indicate that the coefficient level of the transform coefficient is negative. The coefficient level information may be the above-mentioned abs_remainder, and the sign flag may be the above-mentioned coeff_sign_flag.
[0422] Meanwhile, for example, the syntax elements according to the second residual data compilation structure can be compiled in a compilation order according to the coefficient position. The compilation order according to the coefficient position may be the scan order of transform coefficients. For example, the scan order may be a raster scan order. For example, the raster scan order may represent the order of scanning from the top row downwards and from left to right in each row. For example, the syntax elements according to the second residual data compilation structure can be compiled in the order of syntax elements for the (n+1)-th to the last transform coefficient. Additionally, for example, when the current block includes multiple sub-blocks or coefficient groups (CGs), the multiple sub-blocks or coefficient groups can be compiled in the scan order, and the syntax elements for the transform coefficients in each sub-block or coefficient group can be compiled in the scan order.
[0423] In addition, for example, the syntax elements of the compilation structure according to the second residual data can be compiled in the compilation order according to the syntax elements. That is, for example, the syntax elements of the compilation structure according to the second residual data can be compiled in a compilation order in which the syntax elements have priority. For example, the coefficient level information for the (n + 1)-th transform coefficient to the last transform coefficient can be compiled, and thereafter, the sign flag for the (n + 1)-th transform coefficient to the last transform coefficient can be compiled. Specifically, for example, the coefficient level information can be compiled in the order from the coefficient level information for the (n + 1)-th transform coefficient to the coefficient level information for the last transform coefficient, and later, the sign flag can be compiled in the order from the sign flag for the (n + 1)-th transform coefficient to the sign flag for the last transform coefficient.
[0424] For example, an encoding device can encode image information including prediction mode information and residual information, and output the image information in a bitstream format. The bitstream can be sent to a decoding device via a network or a storage medium.
[0425] Meanwhile, the bitstream 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, SSD, etc.
[0426] Figure 24 Briefly shown is an encoding device for performing an image encoding method according to the present disclosure. Figure 23 The method proposed in Figure 24 can be executed by the encoding device disclosed in Figure 24 Specifically, for example, the predictor of the encoding device shown in Figure 23 can execute step S2300 shown in Figure 24 the residual processor of the encoding device shown in Figure 23 can execute steps S2310 and S2320 shown in Figure 24 and the entropy encoder of the encoding device shown in Figure 23 can execute step S2330 shown in
[0427] Figure 25 Briefly illustrated is an image decoding method executed by a decoding device according to the present disclosure. Figure 25 The method proposed in Figure 3 can be executed by the decoding device disclosed in Figure 25The step S2500 shown in can be executed by the entropy decoder of the decoding device. Figure 25 The steps S2510 and S2520 shown in can be executed by the predictor of the decoding device. Figure 25 The step S2530 shown in can be executed by the residual processor of the decoding device, and Figure 25 The step S2540 shown in can be executed by the adder of the decoding device.
[0428] The decoding device obtains image information including residual information and prediction mode information of the current block (step S2500). The decoding device can obtain image information including residual information and prediction mode information of the current block. For example, the image information can include the prediction mode information of the current block. For example, the image information can include prediction-related information for the current block, and the prediction-related information can include prediction mode information. The prediction mode information can indicate whether inter-frame prediction or intra-frame prediction is applied to the current block.
[0429] In addition, for example, the image information can include residual information for the current block. The decoding device can obtain image information including residual information for the current block.
[0430] The residual information can include syntax elements of the transform coefficients for the current block. Here, the current block can be a coding block (CB) or a transform block (TB). Additionally, the transform coefficients can also be represented as residual coefficients. Furthermore, for example, the current block can be a transform skip block.
[0431] For example, the residual information can include syntax elements of the first transform coefficient to the nth transform coefficient for the current block and syntax elements of the (n + 1)th transform coefficient to the last transform coefficient for the current block. In this case, for example, the number of syntax elements for context coding of the first transform coefficient to the nth transform coefficient can be the same as the maximum number of context-coded bins of the current block. That is, for example, all the context-coded bins of the current block can be used as the bins for the syntax elements for context coding of the first transform coefficient to the nth transform coefficient. For example, the maximum number of context-coded bins of the current block can be derived based on the width and height of the current block. For example, the maximum number of context-coded bins of the current block can be derived as the value obtained by multiplying the number of samples of the current block by a specific value. Here, the number of samples can be derived as the value obtained by multiplying the width and height of the current block. Additionally, the specific value can have an integer value such as 2 or a decimal value such as 1.5, 1.75, or 1.25.
[0432] Specifically, for example, the decoding device may obtain syntax elements for the first transformation coefficient to the nth transformation coefficient of the current block. For example, the residual information may include syntax elements for the first transformation coefficient to the nth transformation coefficient of the current block. Here, the syntax elements may be syntax elements according to the first residual data compilation structure of transform skip residual compilation (TSRC). The syntax elements according to the first residual data compilation structure may include syntax elements for context compilation of transformation coefficients and / or bypass compilation syntax elements. The syntax elements according to the first residual data compilation structure may include syntax elements such as sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, abs_remainder, and / or coeff_sign_flag.
[0433] For example, the syntax elements for context compilation of transformation coefficients may include a valid coefficient flag indicating whether the transformation coefficient is a non-zero transformation coefficient, a sign flag indicating the sign of the transformation coefficient, a first coefficient level flag for whether the coefficient level of the transformation coefficient is greater than a first threshold, and / or a parity level flag for the parity of the coefficient level of the transformation coefficient. Additionally, for example, the syntax elements for context compilation may include a second coefficient level flag for whether the coefficient level of the transformation coefficient is greater than a second threshold, a third coefficient level flag for whether the coefficient level of the transformation coefficient is greater than a third threshold, a fourth coefficient level flag for whether the coefficient level of the transformation coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag for whether the coefficient level of the transformation coefficient is greater than a fifth threshold. Here, the valid coefficient flag may be sig_coeff_flag, the sign flag may be ceff_sign_flag, the first coefficient level flag may be abs_level_gt1_flag, and the parity level flag may be par_level_flag. In addition, the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag may be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag may be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag may be abs_level_gt9_flag or abs_level_gtx_flag.
[0434] In addition, for example, the syntax elements for bypass coding of transform coefficients may include coefficient level information for the values (or coefficient levels) of the transform coefficients and / or a sign flag indicating the signs of the transform coefficients. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.
[0435] Meanwhile, for example, the syntax elements according to the first residual data coding structure can be coded in a coding order according to the coefficient positions. The coding order according to the coefficient positions may be the scanning order of the transform coefficients. For example, the scanning order may be a raster scanning order. For example, the raster scanning order may represent the order of scanning row by row from the top row downwards and scanning from left to right in each row. For example, the syntax elements according to the first residual data coding structure can be coded in the order from the syntax element of the first transform coefficient to the syntax element of the nth transform coefficient. In addition, for example, when the current block includes a plurality of sub-blocks or coefficient groups (CGs), the plurality of sub-blocks or coefficient groups can be coded in the scanning order, and the syntax elements for the transform coefficients in each sub-block or coefficient group can be coded in the scanning order.
[0436] In addition, for example, the residual information may include a transform skip flag for the current block. The transform skip flag may indicate whether the transform is applied to the current block. That is to say, the transform skip flag may indicate whether the transform is applied to the transform coefficients of the current block. The syntax element indicating the transform skip flag may be the above-mentioned transform_skip_flag. For example, when the value of the transform skip flag is 0, the transform skip flag may indicate that the transform is not applied to the current block, and when the value of the transform skip flag is 1, the transform skip flag may indicate that the transform is applied to the current block. For example, when the current block is a transform skip block, the value of the transform skip flag for the current block may be 1.
[0437] In addition, for example, the decoding device may obtain syntax elements for the (n+1)-th to the last transform coefficients of the current block. For example, the residual information may include syntax elements for the (n+1)-th to the last transform coefficients of the current block. That is, for example, the syntax elements may be syntax elements of a second residual data compilation structure according to transform skip residual compilation (TSRC). The syntax elements according to the second residual data compilation structure may be referred to as syntax elements according to a simplified residual data compilation structure. For example, when all the bins for context compilation of the current block are used as the bins for syntax elements of context compilation of the first to the n-th transform coefficients, that is, for example, when the number of syntax elements of context compilation of the first to the n-th transform coefficients is equal to or greater than the maximum number of bins for context compilation of the current block, the decoding device may obtain syntax elements for the (n+1)-th to the last transform coefficients of the current block, which are syntax elements of the second residual data compilation structure according to TSRC.
[0438] For example, the syntax elements according to the second residual data compilation structure may include syntax elements for bypass compilation of transform coefficients. For example, the syntax elements according to the second residual data compilation structure may include a sign flag and coefficient level information for transform coefficients. For example, the syntax elements according to the second residual data compilation structure may include coefficient level information representing the absolute value of the coefficient level of the transform coefficient and a sign flag representing the sign of the transform coefficient. The syntax elements for transform coefficients may be compiled based on bypass. That is, the residual syntax elements for transform coefficients may be compiled based on a uniform probability distribution. For example, the coefficient level information may represent the absolute value of the coefficient level of the transform coefficient. In addition, the sign flag may represent the sign of the transform coefficient. For example, when the value of the sign flag is 0, the sign flag may indicate that the coefficient level of the transform coefficient is positive, and when the value of the sign flag is 1, the sign flag may indicate that the coefficient level of the transform coefficient is negative. The coefficient level information may be the above-mentioned abs_remainder, and the sign flag may be the above-mentioned coeff_sign_flag.
[0439] Meanwhile, for example, the syntax elements of the coding structure according to the second residual data can be coded in a coding order according to the coefficient positions. The coding order according to the coefficient positions can be the scanning order of the transform coefficients. For example, the scanning order can be the raster scanning order. For example, the raster scanning order can represent the order of scanning row by row from the top row downwards and from left to right in each row. For example, the syntax elements of the coding structure according to the second residual data can be coded in the order of the syntax elements from the (n + 1)-th transform coefficient to the last transform coefficient. Further, for example, when the current block includes a plurality of sub-blocks or coefficient groups (CGs), the plurality of sub-blocks or coefficient groups can be coded in the scanning order, and the syntax elements of the transform coefficients in each sub-block or coefficient group can be coded in the scanning order.
[0440] Further, for example, the syntax elements of the coding structure according to the second residual data can be coded in a coding order according to the syntax elements. That is, for example, the syntax elements of the coding structure according to the second residual data can be coded in a coding order in which the syntax elements have priority. For example, the coefficient level information for the (n + 1)-th transform coefficient to the last transform coefficient can be coded, and thereafter, the sign flag for the (n + 1)-th transform coefficient to the last transform coefficient can be coded. Specifically, for example, the coefficient level information can be coded in the order from the coefficient level information for the (n + 1)-th transform coefficient to the coefficient level information for the last transform coefficient, and later, the sign flag can be coded in the order from the sign flag for the (n + 1)-th transform coefficient to the sign flag for the last transform coefficient.
[0441] The decoding device derives the prediction mode of the current block based on the prediction mode information (step S2510). The decoding device can determine whether to apply inter prediction or intra prediction to the current block based on the prediction mode information, and perform prediction based on the determination.
[0442] The decoding device derives the prediction samples of the current block based on the prediction mode (step S2520). For example, the decoding device may derive the prediction mode applied to the current block based on the prediction mode information and derive the prediction samples of the current block based on the prediction mode. For example, when performing inter prediction on the current block, the decoding device may derive the motion information of the current block based on the prediction mode information included in the picture information, and derive the prediction samples of the current block based on the motion information. Further, for example, when performing intra prediction on the current block, the decoding device may derive the reference samples based on the neighboring samples of the current block, and derive the prediction samples of the current block based on the intra prediction mode. The reference samples for the current block may include the upper reference sample and the left reference sample of the current block. For example, when the size of the current block is NxN, the x component of the top-left sample position of the current block is 0, and the y component of the top-left sample position of the current block is 0. The left reference samples may be p[-1][0] to p[-1][2N-1], and the upper reference samples may be p[0][-1] to p[2N-1][-1].
[0443] The decoding device derives the residual samples of the current block based on the residual information (step S2530). The decoding device may derive the residual samples of the current block based on the residual information.
[0444] For example, the decoding device may derive the syntax elements according to the first residual data compilation structure and the syntax elements according to the second residual data compilation structure.
[0445] For example, the decoding device may derive the first transform coefficient to the nth transform coefficient of the current block based on the syntax elements according to the first residual data compilation structure.
[0446] In addition, for example, the decoding device may derive the (n+1)th transform coefficient to the last transform coefficient based on the syntax elements according to the second residual data compilation structure. For example, the coefficient level for the transform coefficient may be derived as the value represented by the coefficient level information, and the sign of the transform coefficient may be derived as the sign represented by the sign flag. In this case, for example, the transform coefficient may be derived without performing level mapping.
[0447] Later, for example, the decoding device may derive the residual samples of the current block based on the transform coefficients. In one example, when it is derived based on the transform skip flag that no transform is applied to the current block, i.e., when the value of the transform skip flag is 1, the decoding device may derive the transform coefficients as the residual samples of the current block. Alternatively, for example, when it is derived based on the transform skip flag that no transform is applied to the current block, i.e., when the value of the transform skip flag is 1, the decoding device may derive the residual samples of the current block by dequantizing the transform coefficients. Alternatively, for example, when it is derived based on the transform skip flag that a transform is applied to the current block, i.e., when the value of the transform skip flag is 0, the decoding device may derive the residual samples of the current block by performing an inverse transform on the transform coefficients. Alternatively, for example, when it is derived based on the transform skip flag that a transform is applied to the current block, i.e., when the value of the transform skip flag is 0, the decoding device may derive the residual samples of the current block by dequantizing the transform coefficients and performing an inverse transform on the dequantized transform coefficients.
[0448] The decoding device generates the reconstructed samples of the current block based on the prediction samples and the residual samples (step S2540). For example, the decoding device may generate the reconstructed samples and / or the reconstructed picture of the current block based on the prediction samples and the residual samples. For example, the decoding device generates the reconstructed samples by adding the prediction samples and the residual samples.
[0449] Later, as required by the occasion, in order to improve the subjective / objective image quality, the decoding device may apply a loop filtering process, such as a deblocking filter, SAO, and / or ALF process, to the reconstructed picture as described above.
[0450] Figure 26 Briefly illustrated is a decoding device for performing the image decoding method according to the present disclosure. Figure 25 The method proposed in Figure 26 can be executed by the decoding device disclosed in Figure 26 In particular, for example, Figure 25 the entropy decoder of the decoding device shown in Figure 26 can execute step S2500 shown in Figure 25 the predictor of the decoding device shown in Figure 26 can execute steps S2510 and S2520 shown in Figure 25 the residual processor of the decoding device shown in Figure 26 can execute step S2530 shown in Figure 25 and the adder of the decoding device shown in
[0451] can execute step S2540 shown in
[0452] In addition, according to the present disclosure, when consuming the maximum number of contexts for the current block in the TSRC to compile bins, syntax elements according to a simplified residual data compilation structure can be signaled, and thereby, the compilation complexity of the bypass-compiled syntax elements is reduced, and the overall residual compilation efficiency can be improved.
[0453] In addition, according to the present disclosure, as the compilation order of the bypass-compiled syntax elements, an order in which syntax elements are prioritized can be used, and thereby, the compilation efficiency of the bypass-compiled syntax elements can be improved, and the overall residual compilation efficiency can be improved.
[0454] In the above embodiments, the method is described based on a flowchart having a series of steps or blocks. The present disclosure is not limited to the order of the above steps or blocks. Some steps or blocks can be executed in an order different from that of other steps or blocks described above or executed simultaneously. In addition, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and may further include other steps, or one or more steps in the flowchart can be deleted without affecting the scope of the present disclosure.
[0455] The embodiments described in this specification can be implemented by being executed on a processor, a microprocessor, a controller, or a chip. For example, each functional unit shown in each figure can be executed by being implemented on a computer, a processor, a microprocessor, a controller, or a chip. In this case, the information for implementation (e.g., information about instructions) or algorithms can be stored in a digital storage medium.
[0456] In addition, the decoding device and the encoding device applying the present disclosure can be included in the following devices: a multimedia broadcast transmission / reception device, a mobile communication terminal, a home theater video device, a digital cinema video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a portable camera, a VoD service providing device, an over-the-top (OTT) video device, an Internet streaming service providing device, a three-dimensional (3D) video device, a videoconference video device, a transportation user device (e.g., a vehicle user device, an aircraft user device, and a ship user device), and a medical video device, and the decoding device and the encoding device applying the present disclosure can be used to process video signals or data signals. For example, an over-the-top (OTT) video device can include a game console, a Blu-ray player, an Internet-connected television, a home theater system, a smart phone, a tablet computer, a digital video recorder (DVR), etc.
[0457] In addition, the processing method of the present disclosure can be generated in the form of a computer-executable program and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the present disclosure can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, BD, Universal Serial Bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier wave (e.g., transmission via the Internet). In addition, the bitstream generated by the encoding method can be stored in a computer-readable recording medium or transmitted through a wired / wireless communication network.
[0458] In addition, embodiments of the present disclosure can be implemented using a computer program product according to program code, and the program code can be executed in a computer by embodiments of the present disclosure. The program code can be stored on a computer-readable carrier.
[0459] Figure 27 The figure shows a structural diagram of a content stream system to which the content of the present disclosure is applied.
[0460] The content stream system applying the embodiments of this document may mainly include an encoding server, a streaming server, a web server, a media storage device, a user device, and a multimedia input device.
[0461] The encoding server compresses the content input from a multimedia input device such as a smartphone, a camera, or a camcorder into digital data to generate a bitstream and sends the bitstream to the streaming server. As another example, when a multimedia input device such as a smartphone, a camera, or a camera directly generates a bitstream, the encoding server can be omitted.
[0462] The bitstream can be generated by applying the encoding method or the bitstream generation method of the embodiments of the present disclosure, and the streaming server can temporarily store the bitstream during the process of sending or receiving the bitstream.
[0463] The streaming server sends multimedia data to the user device via the web server based on a user request, and the web server serves as a medium for notifying the user of the service. When the user requests a required service from the web server, the web server delivers the request to the streaming server, and the streaming server sends multimedia data to the user. In this case, the content stream system may include a separate control server. In this case, the control server is used to control commands / responses between devices within the content stream system.
[0464] The streaming server may receive content from a media storage device and / or an encoding server. For example, when receiving content from the encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream for a predetermined period of time.
[0465] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigators, slate 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, the data received from each server may be distributed.
[0466] The claims described in this disclosure can be combined in various ways. For example, the technical features of the method claims of this disclosure can be combined to be implemented as a device, and the technical features of the device claims of this disclosure can be combined to be implemented as a method. In addition, the technical features of the method claims of this disclosure and the technical features of the device claims of this disclosure can be combined to be implemented as a device, and the technical features of the method claims of this disclosure and the technical features of the device claims of this disclosure can be combined to be implemented as a method.
Claims
1. An image decoding method performed by a decoding device, the method comprising: Obtaining image information including residual information and prediction mode information of a current block from a bitstream; Deriving a prediction mode of the current block based on the prediction mode information; Deriving prediction samples of the current block based on the prediction mode; Deriving residual samples of the current block based on the residual information; And Generating reconstructed samples of the current block based on the prediction samples and the residual samples, wherein the residual information includes syntax elements for first to nth transform coefficients of the current block and syntax elements for (n + 1)th to last transform coefficients; wherein the number of context - compiled syntax elements for the first to nth transform coefficients is equal to the maximum number of context - compiled bins of the current block; wherein the syntax elements for the first to nth transform coefficients are syntax elements of a first residual data compilation structure compiled according to transform - skipped residuals; wherein the syntax elements for the (n + 1)th to last transform coefficients are syntax elements of a second residual data compilation structure compiled according to the transform - skipped residuals, and wherein the syntax elements according to the second residual data compilation structure include a sign flag for the transform coefficient and coefficient level information.
2. An image encoding method performed by an encoding device, the method comprising: Deriving prediction samples of a current block based on inter - frame prediction or intra - frame prediction; Deriving residual samples of the current block based on the prediction samples; Deriving transform coefficients of the current block based on the residual samples; And Encoding image information including prediction mode information of the current block and residual information for the transform coefficients, wherein the residual information includes syntax elements for first to nth transform coefficients of the current block and syntax elements for (n + 1)th to last transform coefficients; wherein the number of context - compiled syntax elements for the first to nth transform coefficients is equal to the maximum number of context - compiled bins of the current block; wherein the syntax elements for the first to nth transform coefficients are syntax elements of a first residual data compilation structure compiled according to transform - skipped residuals; wherein the syntax elements for the (n + 1)th to last transform coefficients are syntax elements of a second residual data compilation structure compiled according to the transform - skipped residuals, and wherein the syntax elements according to the second residual data compilation structure include a sign flag for the transform coefficient and coefficient level information.
3. A method for transmitting data of an image, the method comprising: Obtaining a bitstream of image information including prediction mode information of a current block and residual information for the transform coefficients of the current block; And Transmitting data of the bitstream including the image information, the image information including the prediction mode information and the residual information, Among them, the transform coefficients are derived based on the residual samples of the current block, and the residual samples are derived based on the prediction samples of the current block. Among them, the prediction samples are derived based on inter-frame prediction or intra-frame prediction, and the prediction mode information indicates the prediction mode for the prediction samples. Among them, the residual information includes syntax elements for the first to nth transform coefficients of the current block and syntax elements for the (n + 1)th to last transform coefficients. Among them, the number of syntax elements for context coding of the first to nth transform coefficients is equal to the maximum number of bins for context coding of the current block. Among them, the syntax elements for the first to nth transform coefficients are the syntax elements of the first residual data coding structure coded according to transform skip residuals. Among them, the syntax elements for the (n + 1)th to last transform coefficients are the syntax elements of the second residual data coding structure coded according to the transform skip residuals, and Among them, the syntax elements according to the second residual data coding structure include a sign flag for the transform coefficient and coefficient level information.
Citation Information
Patent Citations
Constrained depth intra mode coding for 3D video coding
JP2019050621A
Sign prediction in video coding
US20190208225A1