Sign data hiding-related video decoding method and apparatus thereof
The video decoding method uses flags to optimize residual coding in high-resolution videos, reducing bit rates and enhancing coding efficiency by selectively applying Transform Skip Residual Coding, addressing the increased costs associated with high-quality video transmission and storage.
Patent Information
- Application Number
- JP2024167291
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-02-27
- Filing Date
- 2024-09-26
- Publication Date
- 2025-07-23
- Estimated Expiration
- 2041-02-25
AI Technical Summary
The increasing demand for high-resolution and high-quality videos has led to higher bit rates, resulting in increased costs for transmission and storage, necessitating a more efficient video coding method.
A video decoding method that utilizes a sign data hiding availability flag and a Transform Skip Residual Coding (TSRC) availability flag to determine the applicability of sign data hiding and TSRC for transform skip blocks, improving residual coding efficiency by reducing the amount of bits required for coding.
This approach enhances coding efficiency by preventing unnecessary use of sign data hiding where TSRC is not available, thereby reducing the overall bit rate and improving residual coding efficiency.
Smart Images

Figure 0007712451000067 
Figure 0007712451000068 
Figure 0007712451000069
Abstract
Description
Technical Field
[0001] This document relates to video coding technology. More specifically, it relates to a video decoding method and apparatus for coding flag information indicating whether TSRC can be used based on flag information indicating whether SDH can be used when coding residual data of a block in a video coding system. Background Art
[0002] In recent years, the demand for high-resolution and high-quality videos such as HD (High Definition) videos and UHD (Ultra High Definition) videos has been increasing in various fields. As video data becomes higher in resolution and quality, the amount of information or bits to be transmitted increases compared to existing video data. Therefore, when transmitting video data using media such as existing wired and wireless broadband lines or storing video data using existing storage media, the costs associated with transmission and storage increase.
[0003] Therefore, in order to effectively transmit, store, and reproduce information of high-resolution and high-quality videos, a highly efficient video compression technology is required.
Summary of the Invention
Problems to be Solved by the Invention
[0004] The technical problem of this document is to provide a method and apparatus for increasing video coding efficiency.
[0005] Another technical problem of this document is to provide a method and apparatus for increasing the efficiency of residual coding.
Means for Solving the Problems
[0006] According to an embodiment of the present document, a video decoding method performed by a decoding device is provided. The method includes obtaining a sign data hiding availability flag indicating whether sign data hiding is available for a current slice, obtaining a TSRC (Transform Skip Residual Coding) availability flag indicating whether TSRC is available for a transform skip block of the current slice, obtaining residual coding information for the transform skip block based on the TSRC availability flag, deriving residual samples for the transform skip block based on the residual coding information, and generating a restored picture based on the residual samples, wherein the TSRC availability flag is obtained based on the sign data hiding availability flag.
[0007] According to another embodiment of the present document, a decoding device for performing video decoding is provided. The decoding device includes an entropy decoding unit that obtains a sign data hiding availability flag indicating whether sign data hiding is available for a current slice, obtains a TSRC (Transform Skip Residual Coding) availability flag indicating whether TSRC is available for a transform skip block of the current slice, and obtains residual coding information for the transform skip block based on the TSRC availability flag, a residual processing unit that derives residual samples for the transform skip block based on the residual coding information, and an addition unit that generates a restored picture based on the residual samples, wherein the TSRC availability flag is obtained based on the sign data hiding availability flag.
[0008] According to still another embodiment of the present document, there is provided a video encoding method performed by an encoding device. The method includes encoding a sign data hiding available flag indicating whether sign data hiding can be used for a current slice, encoding a TSRC (Transform Skip Residual Coding) available flag indicating whether TSRC can be used for a transform skip block of the current slice based on the sign data hiding available flag, encoding residual information for the transform skip block based on the TSRC available flag, and generating a bitstream including the sign data hiding available flag, the TSRC available flag, and the residual information.
[0009] According to still another embodiment of the present document, there is provided a video encoding device. The encoding device includes an entropy encoding unit that encodes a sign data hiding available flag indicating whether sign data hiding can be used for a current slice, encodes a TSRC (Transform Skip Residual Coding) available flag indicating whether TSRC can be used for a transform skip block of the current slice based on the sign data hiding available flag, encodes residual information for the transform skip block based on the TSRC available flag, and generates a bitstream including the sign data hiding available flag, the TSRC available flag, and the residual information.
[0010] According to still another embodiment of the present document, there is provided a computer-readable digital storage medium storing a bitstream including video information for performing a video decoding method. In the computer-readable digital storage medium, the video decoding method includes: obtaining a sign data hiding available flag for determining whether sign data hiding can be used for a current slice; obtaining a TSRC (Transform Skip Residual Coding) available flag for determining whether TSRC can be used for a transform skip block of the current slice; obtaining residual coding information for the transform skip block based on the TSRC available flag; deriving residual samples for the transform skip block based on the residual coding information; and generating a reconstructed picture based on the residual samples, wherein the TSRC available flag is obtained based on the sign data hiding available flag.
Advantages of the Invention
[0011] According to the present document, the efficiency of residual coding can be improved.
[0012] According to the present document, the TSRC available flag can be signaled depending on the sign data hiding available flag, thereby improving the coding efficiency by preventing sign data hiding from being used for transform skip blocks for which TSRC is not available, reducing the amount of bits to be coded, and improving the overall efficiency of residual coding.
[0013] According to this document, the TSRC available flag can be signaled depending on the conversion skip available flag and the signature data hiding available flag, thereby improving the coding efficiency by preventing signature data hiding from being used for conversion skip blocks where TSRC is not available, reducing the amount of bits to be coded, and improving the overall residual coding efficiency.
Brief Description of the Drawings
[0014]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Best Mode for Carrying Out the Invention
[0015] This document can be modified in various ways and can have various embodiments. Specific embodiments are illustrated in the drawings and described in detail. However, this is not intended to limit the embodiments of this document to specific embodiments. The terms commonly used in this specification are only used to describe specific embodiments and are not intended to limit the technical idea of this document. Singular expressions include plural expressions as well, unless otherwise specified in the context. In this specification, terms such as "including" or "having" are used to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof in advance.
[0016] On the other hand, each configuration on the drawings described in this document is shown independently for the convenience of explaining different characteristic functions, and does not mean that each configuration is embodied as separate hardware or separate software. For example, two or more of the configurations may be combined to form one configuration, or one configuration may be divided into multiple configurations. Embodiments in which each configuration is integrated and / or separated are also included in the scope of rights of this document as long as they do not deviate from the essence of this document.
[0017] Hereinafter, with reference to the accompanying drawings, the preferred embodiments of this document will be described in more detail. Hereinafter, the same reference numerals will be given to the same components on the drawings, and duplicate descriptions of the same components will be omitted.
[0018] FIG. 1 schematically shows an example of a video / video coding system to which the embodiments of this document are applicable.
[0019] Referring to FIG. 1, a video / image coding system can include a first device (source device) and a second device (receiving device). The source device can transmit 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.
[0020] The source device can include a video source, an encoding device, and a transmitting unit. The receiving device can include a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. A transmitter may be included in the encoding device. A receiver may be included in the decoding device. The renderer can also include a display unit, and the display unit may be configured as a separate device or an external component.
[0021] The video source can obtain video / images through processes such as the capture, synthesis, or generation of 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 containing previously captured video / images, etc. The video / image generation device can include, for example, a computer, a tablet, and a smartphone, etc., and can (electronically) generate video / images. For example, virtual video / images may be generated by a computer or the like, and in this case, the process of capturing video / images may be replaced by the process of generating related data.
[0022] The encoding device can encode the input video / image. The encoding device can perform a series of procedures such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) may be output in the form of a bitstream.
[0023] The transmitting unit can transmit the encoded video / image information or data output in the form of a bitstream to the receiving unit of the receiving device in the form of a file or streaming via 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 transmitting unit can include elements for generating a media file according to a predefined file format and can include elements for transmission via a broadcast / communication network. The receiving unit can receive / extract the bitstream and transmit it to the decoding device.
[0024] The decoding device can decode the video / image by performing a series of procedures such as inverse quantization, inverse transformation, prediction, etc. corresponding to the operation of the encoding device.
[0025] The renderer can render the decoded video / image. The rendered video / image may be displayed on the display unit.
[0026] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document may be applied to the methods disclosed in the VVC (versatile video coding) standard, EVC (essential video coding) standard, AV1 (AOMedia Video1) standard, AVS2 (2nd generation of audio video coding standard) or next-generation video / image coding standards (such as H.267 or H.268, etc.).
[0027] This document presents various embodiments related to video / video coding, and unless otherwise specifically mentioned, the embodiments may be carried out in combination with each other.
[0028] In this document, video can mean a collection of a series of images over time. Picture generally means a unit representing one image at a specific time period, and subpicture / slice / tile is a unit that constitutes a part of a picture in coding. A subpicture / slice / tile can contain one or more CTUs (coding tree units). One picture may be composed of one or more subpictures / slices / tiles. One picture may be composed of one or more tile groups. One tile group can contain one or more tiles. A brick can represent a rectangular area of CTU rows within a tile of a picture. A tile may be partitioned into a plurality of bricks, and each brick may be composed of one or more CTU rows within the tile. A tile that is not partitioned into a plurality of bricks can also be called a brick. Brick scan can represent a specific sequential ordering of CTUs that partition a picture, and these CTUs may be arranged in a CTU raster scan within a brick, the bricks within a tile may be continuously arranged in a raster scan of the bricks of the tile, and the tiles within a picture may be continuously arranged in a raster scan of the tiles of the picture. Also, a subpicture can represent a rectangular area of one or more slices within a picture. That is, a subpicture can contain one or more slices that collectively cover a rectangular area of the picture. A tile is a rectangular area of CTUs within a specific tile row and a specific tile column in a picture. The tile column is a rectangular area of CTUs, and the rectangular area has the same height as the height of the picture, and the width may be specified by a syntax element within a picture parameter set. The tile row is a rectangular area of CTUs, and the rectangular area has a width specified by a syntax element within a picture parameter set and may have the same height as the height of the picture.Tile scan can represent a specific sequential ordering of CTUs that partition a picture, where the CTUs may be successively aligned in a CTU raster scan within a tile, and the tiles within a picture may be successively aligned in a raster scan of the tiles of the picture. A slice can contain an integral number of picture blocks, and the integral number of blocks may be included in a single NAL unit. A slice may be composed of a plurality of complete tiles, or may be a consecutive sequence of complete blocks of one tile. In this document, tile group and slice may be used interchangeably. For example, in this document, tile group / tile group header may be referred to as slice / slice header.
[0029] A pixel or PEL can mean the smallest unit that constitutes a picture (or video). Also, the term "sample" may be used as a term corresponding to a pixel. A sample can generally represent a pixel or a pixel value, and may represent only the pixel / pixel value of the luma component, or may represent only the pixel / pixel value of the chroma component.
[0030] A unit can represent the basic unit of video processing. A unit can include at least one of a specific region of a picture and information related to that region. One unit can include one luma block and two chroma (e.g., cb, cr) blocks. A unit may, in some cases, be used interchangeably with terms such as block or area. In general, an MxN block can include a set (or array) of samples (or sample array) or transform coefficients consisting of M columns and N rows.
[0031] In this specification, "A or B" can mean "only A", "only B", or "both A and B". In other words, "A or B" in this specification can be interpreted as "A and / or B". For example, "A, B, or C" in this specification can mean "only A", "only B", "only C", or "any combination of A, B, and C".
[0032] The slashes ( / ) and commas used in this specification can mean "and / or". For example, "A / B" can mean "A and / or B". Therefore, "A / B" can mean "only A", "only B", or "both A and B". For example, "A, B, C" can mean "A, B, or C".
[0033] In this specification, "at least one of A and B" can mean "only A", "only B", or "both A and B". Also, in this specification, expressions such as "at least one of A or B" and "at least one of A and / or B" may be interpreted identically to "at least one of A and B".
[0034] In addition, in this specification, "at least one of A, B, and C" can mean "only A", "only B", "only C", or "any combination of A, B, and C". Also, "at least one of A, B, or C" and "at least one of A, B, and / or C" can mean "at least one of A, B, and C".
[0035] In addition, the parentheses used in this specification can mean "for example". Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" may be proposed as an example of "prediction". In other words, "prediction" in this specification is not limited to "intra prediction", and "intra prediction" may be proposed as an example of "prediction". Also, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" may be proposed as an example of "prediction".
[0036] In this specification, the technical features separately described in one drawing may be implemented individually or simultaneously.
[0037] The following drawings are created to explain a specific example of this specification. The names of specific devices or specific signals / messages / fields described in the drawings are presented exemplarily, and the technical features of this specification are not limited to the specific names in the following drawings.
[0038] FIG. 2 is a diagram schematically explaining the configuration of a video / imaging encoding device to which the embodiment of this document is applicable. Hereinafter, the video encoding device can include an imaging encoding device.
[0039] Referring to FIG. 2, the encoding device 200 may include an image partitioner (210), a predictor (220), a residual processor (230), an entropy encoder (240), an adder (250), a filter (260), and a memory (270). The predictor 220 may include an inter-prediction unit 221 and an intra-prediction unit 222. The residual processor 230 may include a transformer (232), a quantizer (233), a dequantizer (234), and an inverse transformer (235). The residual processor 230 may further include a subtractor (231). The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The above-described image partitioner 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filter 260 may be configured by one or more hardware components (e.g., an encoder chipset or a processor) according to an embodiment. Also, the memory 270 may include a DPB (decoded picture buffer) and may be configured by a digital storage medium. The hardware component may further include the memory 270 as an internal / external component.
[0040] The video segmentation unit 210 can divide the input video (or picture, frame) input to the encoding device 200 into one or more processing units. As an example, the processing unit can be referred to as a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) by a QTBTTT (Quad-tree binary-tree ternary-tree) structure. For example, one coding unit may be divided into a plurality of coding units with a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. In this case, for example, the quad-tree structure may be applied first, and the binary-tree structure and / or the ternary-tree structure may be applied later. Or, the binary-tree structure may be applied first. Based on the final coding unit that is no longer divided, the coding procedure according to this document may be performed. In this case, based on the coding efficiency according to the video characteristics, etc., the largest coding unit may be immediately used as the final coding unit, or, if necessary, the coding unit may be recursively divided into coding units with a further deeper depth, and the coding unit with the optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, conversion, and restoration described later. As another example, the processing unit may further include a prediction unit (PU: Prediction Unit) or a transform unit (TU: Transform Unit). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit described above. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0041] The unit may, in some cases, be used with the same meaning as terms such as block or area. In general, an MxN block can represent a set of samples or transform coefficients consisting of M columns and N rows. Samples can generally represent pixels or pixel values, and can represent only the pixels / pixel values of the luma component, or only the pixels / pixel values of the chroma component. Samples may be used as a term corresponding to one picture (or video) for a pixel or pel.
[0042] The encoding device 200 can subtract the prediction signal (predicted block, predicted sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from the input video signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, in the encoding device 200 as shown in the figure, the unit that subtracts the prediction signal (predicted block, predicted sample array) from the input video signal (original block, original sample array) may be called the subtraction unit 231. The prediction unit can perform prediction on the block to be processed (hereinafter referred to as the current block), and generate a predicted block including the predicted samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit can generate various information related to prediction, such as prediction mode information, and transmit it to the entropy encoding unit 240 as described later in the description of each prediction mode. The information related to prediction may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0043] The intra prediction unit 222 can predict the current block by referring to samples within the current picture. The samples to be referred to may be located in the neighborhood of the current block or at a distance therefrom, depending on the prediction mode. In intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes can include, for example, the DC mode and the Planar mode. The directional modes can include, for example, 33 directional prediction modes or 65 directional prediction modes, depending on the degree of refinement of the prediction direction. However, this is merely an example, and a greater or lesser number of directional prediction modes may be used depending on the settings. The intra prediction unit 222 can also determine the prediction mode to be applied to the current block by using the prediction mode applied to the neighboring blocks.
[0044] The inter prediction unit 221 can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the peripheral block and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction information (such as L0 prediction, L1 prediction, Bi prediction, etc.). In inter prediction, the peripheral blocks can include spatial neighboring blocks existing within the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block can also be called a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block can also be called a collocated picture (colPic). For example, the inter prediction unit 221 can construct a motion information candidate list based on the peripheral blocks, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes. For example, in the skip mode and the merge mode, the inter prediction unit 221 can use the motion information of the peripheral blocks as the motion information of the current block. In the skip mode, different from the merge mode, the residual signal does not need to be transmitted.In the motion vector prediction (MVP) mode, the motion vectors of neighboring blocks can be used as motion vector predictors, and the motion vector difference can be signaled to indicate the motion vector of the current block.
[0045] The prediction unit 220 can generate a prediction signal based on various prediction methods described below. For example, the prediction unit can apply intra prediction or inter prediction for the prediction of one block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP). In addition, the prediction unit may be based on the intra block copy (IBC) prediction mode or the palette mode for the prediction of the block. The IBC prediction mode or the palette mode may be used for coding content video / motion video such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but may be performed similarly to inter prediction in terms of deriving a reference block within the current picture. That is, IBC can use at least one of the inter prediction methods described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, the sample values within the picture can be signaled based on the information regarding the palette table and the palette index.
[0046] The prediction signal generated by the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) may be used to generate a restored signal or may be used to generate a residual signal. The conversion unit 232 can generate transform coefficients by applying a conversion method to the residual signal. For example, the conversion method can include at least one of DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen-Loeve Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Here, GBT means the conversion obtained from this graph when the relationship information between pixels is represented by a graph. CNT means the conversion obtained based on generating a prediction signal using all previously reconstructed pixels. Also, the conversion process may be applied to a pixel block having the same size of a square or may be applied to a block of a variable size other than a square.
[0047] The quantization unit 233 quantizes the transform coefficients and transmits them to the entropy encoding unit 240. The entropy encoding unit 240 can encode the quantized signal (information regarding the quantized transform coefficients) and output it as a bitstream. The information regarding the quantized transform coefficients can be referred to as residual information. The quantization unit 233 can reorder the quantized transform coefficients in block form into a one-dimensional vector form based on the coefficient scan order, and can also generate the information regarding the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit 240 can perform various encoding methods such as, for example, exponential Golomb, CAVLC (context-adaptive variable length coding), CABAC (context-adaptive binary arithmetic coding), etc. The entropy encoding unit 240 can also encode, together or separately, information necessary for video / image restoration (e.g., values of syntax elements) in addition to the quantized transform coefficients. The encoded information (e.g., encoded video / video information) may be transmitted or stored in the form of a bitstream in units of NAL (network abstraction layer) units. The video / video information may further include information regarding various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). Also, the video / video information may further include general constraint information. In this document, the information and / or syntax elements transmitted / signaled from the encoding device to the decoding device may be included in the video / video information. The video / video information may be encoded by the above-described encoding procedure and included in the bitstream.The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network can include a broadcast network and / or a communication network, etc., and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmission unit (not shown) for transmitting and / or a storage unit (not shown) for storing the signal output from the entropy encoding unit 240 may be configured as internal / external elements of the encoding device 200, or the transmission unit may be included in the entropy encoding unit 240.
[0048] The quantized transform coefficients output from the quantization unit 233 may be used to generate a prediction signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients using the inverse quantization unit 234 and the inverse transformation unit 235, a residual signal (residual block or residual sample) can be restored. The addition unit 250 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the restored residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the block to be processed as in the case where the skip mode is applied, the predicted block may be used as the reconstructed block. The addition unit 250 can be called a restoration unit or a reconstructed block generation unit. The generated reconstructed signal may be used for intra prediction of the next block to be processed within the current picture, and as will be described later, may also be used for inter prediction of the next picture after passing through filtering.
[0049] On the other hand, LMCS (luma mapping with chroma scaling) may be applied in the picture encoding and / or restoration process.
[0050] The filtering unit 260 can apply filtering to the restored signal to improve the subjective / objective image quality. For example, the filtering unit 260 can apply various filtering methods to the restored picture to generate a modified restored picture, and store the modified restored picture in the memory 270, specifically in 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 filtering unit 260 can generate various information related to filtering and transmit it to the entropy encoding unit 240 as described later in the description of each filtering method. The information related to filtering may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0051] The modified restored picture transmitted to the memory 270 may be used as a reference picture in the inter prediction unit 221. The encoding device can thereby avoid prediction mismatches between the encoding device 200 and the decoding device 300 when inter prediction is applied, and can also improve the encoding efficiency.
[0052] The DPB of the memory 270 can store the modified restored picture for use as a reference picture in the inter prediction unit 221. The memory 270 can store the motion information of the blocks for which the motion information within the current picture has been derived (or encoded) and / or the motion information of the blocks within the already restored picture. The stored motion information can be transmitted to the inter prediction unit 221 for utilization as the motion information of spatially neighboring blocks or temporally neighboring blocks. The memory 270 can store the restored samples of the restored blocks within the current picture and transmit them to the intra prediction unit 222.
[0053] FIG. 3 is a diagram schematically explaining the configuration of a video / video decoding apparatus to which the embodiments of this document are applicable.
[0054] Referring to FIG. 3, the decoding apparatus 300 may include an entropy decoder (310), a residual processor (320), a predictor (330), an adder (340), a filtering unit (filter, 350), and a memory (memory, 360). The predictor 330 may include an inter-prediction unit 331 and an intra-prediction unit 332. The residual processor 320 may include a dequantizer (321) and an inverse transformer (322). The entropy decoding unit 310, the residual processing unit 320, the prediction unit 330, the addition unit 340, and the filtering unit 350 described above may be configured by one hardware component (for example, a decoder chipset or a processor) according to an embodiment. Further, the memory 360 may include a DPB (decoded picture buffer) and may be configured by a digital storage medium. The hardware component may further include the memory 360 as an internal / external component.
[0055] When a bitstream including video / video information is input, the decoding device 300 can restore the video corresponding to the process in which the video / video information is processed by the encoding device in FIG. 2. For example, the decoding device 300 can derive units / blocks based on the block division related information obtained from the bitstream. The decoding device 300 can perform decoding using the processing units applied in the encoding device. Therefore, the processing unit for decoding may be, for example, a coding unit, and the coding unit may be divided according to a quad tree structure, a binary tree structure, and / or a ternary tree structure from a coding tree unit or a maximum coding unit. One or more conversion units may be derived from the coding unit. Then, the restored video signal decoded and output by the decoding device 300 may be played back by a playback device.
[0056] The decoding device 300 can receive the signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal may be decoded by the entropy decoding unit 310. For example, the entropy decoding unit 310 can parse the bitstream and derive information (e.g., video / video information) necessary for video restoration (or, picture restoration). The video / video information may further include information regarding various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). Also, the video / video information may further include general constraint information. The decoding device can decode a picture based on the information regarding the parameter set and / or the general constraint information. The signaling / received information and / or syntax elements described later in this document may be decoded by the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 can decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the value of the syntax element necessary for video restoration and the quantized value of the transform coefficient regarding the residual. More specifically, the CABAC entropy decoding method receives a bin corresponding to each syntax element from the bitstream, determines a context model using the syntax element information to be decoded, the decoding information of the surrounding and the block to be decoded, or the information of the symbol / bin decoded in the previous stage, predicts the occurrence probability of the bin by the determined context model, performs arithmetic decoding of the bin, and can generate a symbol corresponding to the value of each syntax element. At this time, the CABAC entropy decoding method can update the context model using the information of the symbol / bin decoded for the context model of the next symbol / bin after determining the context model.Of the information decoded by the entropy decoding unit 310, the information related to prediction is provided to the prediction unit 330 (inter prediction unit 332 and intra prediction unit 331), and the residual value for which entropy decoding has been performed by the entropy decoding unit 310, that is, the quantized transform coefficient and related parameter information, may be input to the residual processing unit 320. The residual processing unit 320 can derive a residual signal (residual block, residual sample, residual sample array). Also, the information related to filtering among the information decoded by the entropy decoding unit 310 may be provided to the filtering unit 350. On the other hand, a receiving unit (not shown) that receives a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiving unit may be a component of the entropy decoding unit 310. On the other hand, the decoding device according to this document can be called a video / video / picture decoding device, and the decoding device can be distinguished into an information decoder (video / video / picture information decoder) and a sample decoder (video / video / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, inverse transform unit 322, addition unit 340, filtering unit 350, memory 360, inter prediction unit 332, and intra prediction unit 331.
[0057] In the inverse quantization unit 321, the quantized transform coefficient can be inverse quantized to output a transform coefficient. The inverse quantization unit 321 can rearrange the quantized transform coefficient in the form of a two-dimensional block. In this case, the rearrangement can be performed based on the coefficient scan order performed by the encoding device. The inverse quantization unit 321 can perform inverse quantization on the quantized transform coefficient using a quantization parameter (for example, quantization step size information) to obtain a transform coefficient.
[0058] In the inverse conversion unit 322, the conversion coefficients are inversely converted to obtain a residual signal (residual block, residual sample array).
[0059] The prediction unit can perform prediction on the current block and generate a predicted block including predicted samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied to the current block based on the information regarding the prediction output from the entropy decoding unit 310, and can determine a specific intra / inter prediction mode.
[0060] The prediction unit 320 can generate a prediction signal based on various prediction methods described later. For example, the prediction unit can apply intra prediction or inter prediction for predicting one block, and can also apply intra prediction and inter prediction simultaneously. This can be called the CIIP (combined inter and intra prediction) mode. Also, the prediction unit may be based on the intra block copy (IBC) prediction mode or the palette mode for predicting a block. The IBC prediction mode or the palette mode may be used for coding content video / moving video such as games, for example, like SCC (screen content coding). IBC basically performs prediction within the current picture, but may be performed similarly to inter prediction in terms of deriving a reference block within the current picture. That is, IBC can use at least one of the inter prediction methods described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, information regarding the palette table and the palette index may be included in and signaled in the video / video information.
[0061] The intra prediction unit 331 can predict the current block by referring to samples within the current picture. The samples to be referred to may be located adjacent to or away from the current block depending on the prediction mode. In intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 can also determine the prediction mode to be applied to the current block using the prediction mode applied to the neighboring blocks.
[0062] The inter prediction unit 332 can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on the reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction information (such as L0 prediction, L1 prediction, Bi prediction, etc.). In inter prediction, the neighboring blocks can include spatial neighboring blocks existing within the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter prediction unit 332 can construct a motion information candidate list based on the neighboring blocks and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter prediction may be performed based on various prediction modes, and the information regarding the prediction can include information indicating the inter prediction mode for the current block.
[0063] The adder 340 can generate a restored signal (restored picture, restored block, restored sample array) by adding the acquired residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for the block to be processed, as in the case where the skip mode is applied, the predicted block may be used as the restored block.
[0064] The adder 340 can be referred to as a restoration unit or a restored block generation unit. The generated restored signal may be used for intra prediction of the next block to be processed in the current picture, may be output after filtering as described later, or may be used for inter prediction of the next picture.
[0065] On the other hand, LMCS (luma mapping with chroma scaling) may be applied during the picture decoding process.
[0066] The filtering unit 350 can apply filtering to the restored signal to improve the subjective / objective image quality. For example, the filtering unit 350 can apply various filtering methods to the restored picture to generate a modified restored picture, and can transmit the modified restored picture to the memory 360, specifically, the DPB of the memory 360. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0067] The (corrected) restored picture stored in the DPB of the memory 360 may be used as a reference picture in the inter prediction unit 332. The memory 360 can store the motion information of the blocks for which the motion information in the current picture has been derived (or decoded), and / or the motion information of the blocks in the already restored picture. The stored motion information can be transmitted to the inter prediction unit 260 for utilization as the motion information of spatially neighboring blocks or temporally neighboring blocks. The memory 360 can store the restored samples of the restored blocks in the current picture and can transmit them to the intra prediction unit 331.
[0068] In this specification, the embodiments described in the filtering unit 260, the inter prediction unit 221, and the intra prediction unit 222 of the encoding device 200 may be applied identically or correspondingly to the filtering unit 350, the inter prediction unit 332, and the intra prediction unit 331 of the decoding device 300, respectively.
[0069] In this document, at least one of quantization / inverse quantization and / or transform / inverse transform may be omitted. When the quantization / inverse quantization is omitted, the quantized transform coefficients can be referred to as transform coefficients. When the transform / inverse transform is omitted, the transform coefficients can also be referred to as coefficients or residual coefficients, or can still be referred to as transform coefficients for the sake of consistency of expression.
[0070] Also, in this document, the quantized transform coefficient and the transform coefficient can be referred to as the transform coefficient and the scaled transform coefficient, respectively. In this case, the residual information can include information regarding the transform coefficient, and the information regarding the transform coefficient may be signaled by a residual coding syntax. The transform coefficient may be derived based on the residual information (or the information regarding the transform coefficient), and the scaled transform coefficient may be derived by an inverse transform (scaling) with respect to the transform coefficient. The residual sample may be derived based on an inverse transform (transformation) with respect to the scaled transform coefficient. This may be applied / expressed identically in other parts of this document.
[0071] As described above, the encoding device can perform various encoding methods such as, for example, exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), and the like. Also, the decoding device can decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of the syntax elements necessary for video restoration and the quantized values of the transform coefficients regarding the residual.
[0072] For example, the coding method described above may be performed as described later.
[0073] FIG. 4 exemplarily shows context-adaptive binary arithmetic coding (CABAC) for encoding a syntax element. For example, in the encoding process of CABAC, when the input signal is a syntax element that is not a binary value, the encoding device can binarize the value of the input signal to convert the input signal into a binary value. Also, when the input signal is already a binary value (i.e., when the value of the input signal is a binary value), it may be bypassed without binarization. Here, each binary number 0 or 1 constituting the binary value can be called a bin. For example, when the binary string after binarization is 110, each of 1, 1, and 0 is called one bin. The bin for one syntax element can indicate the value of the syntax element.
[0074] Thereafter, the binarized bin of the syntax element may be input to a regular encoding engine or a bypass encoding engine. The regular encoding engine of the encoding device can assign a context model that reflects a probability value to the bin, and can encode the bin based on the assigned context model. The regular encoding engine of the encoding device can update the context model for the bin after encoding each bin. The bin encoded as described above can be referred to as a context-coded bin.
[0075] On the one hand, when the binary bins of the syntax element are input to the bypass encoding engine, they may be encoded as follows. For example, the bypass encoding engine of the encoding device omits the procedure of estimating the probability for the input bin and the procedure of updating the probability model applied to the bin after encoding. When bypass encoding is applied, the encoding device can encode the input bin by applying a uniform probability distribution instead of assigning a context model, thereby improving the encoding speed. The bins encoded as described above can be referred to as bypass bins.
[0076] Entropy decoding can represent the process of performing the process in the above-described entropy encoding in reverse order.
[0077] For example, when the syntax element is decoded based on a context model, the decoding device can receive the bin corresponding to the syntax element by the bitstream, and use the decoding information of the syntax element and the decoding target block or the peripheral block or the information of the symbol / bin decoded in the previous stage to determine the context model, predict the occurrence probability of the received bin by the determined context model, perform arithmetic decoding of the bin, and derive the value of the syntax element. Thereafter, the context model of the next bin to be decoded may be updated to the determined context model.
[0078] Also, for example, when a syntax element is bypass decoded, the decoding device can receive a bin corresponding to the syntax element using a bit stream and decode the input bin by applying a uniform probability distribution. In this case, the decoding device can omit the procedure of deriving a context model of the syntax element and the procedure of updating the context model applied to the bin after decoding.
[0079] As described above, the residual samples may be derived as quantized transform coefficients that have undergone the conversion and quantization processes. The quantized transform coefficients can also be referred to as transform coefficients. In this case, the intra-block transform coefficients may be signaled in the form of residual information. The residual information can include a residual coding syntax. That is, the encoding device can construct a residual coding syntax with the residual information, encode this, and output it in the form of a bit stream, and the decoding device can decode the residual coding syntax from the bit stream to derive the residual (quantized) transform coefficients. The residual coding syntax can include syntax elements indicating, as will be described later, whether a transform has been applied to the block, the position of the last valid transform coefficient within the block, whether there are valid transform coefficients within the sub-block, the size / symbol of the valid transform coefficients, and the like.
[0080] For example, syntax elements related to residual data encoding / decoding can be represented as shown in the following table.
[0081]
Table 1-1
[0082]
Table 1-2
[0083]
Table 1-3
[0084] The transform_skip_flag indicates whether the transformation is skipped for the associated block. The transform_skip_flag may be a syntax element of the transform skip flag. The associated block may be a CB (coding block) or a TB (Transform block). For the transformation (and quantization) and residual coding procedures, the CB and the TB may be used interchangeably. For example, as described above, residual samples may be derived for a CB, and (quantized) transform coefficients may be derived by transformation and quantization of the residual samples, and information (e.g., syntax elements) that efficiently indicates the position, size, sign, etc. of the (quantized) transform coefficients may be generated and signaled by the residual coding procedure. The quantized transform coefficients may be simply referred to as transform coefficients. Generally, when the CB is not larger than the maximum TB, the size of the CB may be the same as the size of the TB, and in this case, the block to be transformed (and quantized) and residual coded may be referred to as a CB or a TB. On the other hand, when the CB is larger than the maximum TB, the block to be transformed (and quantized) and residual coded may be referred to as a TB. Hereinafter, it will be described assuming that the syntax elements related to the residual coding are signaled in units of transform blocks (TBs), but this is for illustration, and as described above, the TB may be used in the same sense as the coding block (CB).
[0085] On the other hand, the syntax element signaled after the transform skip flag is signaled may be the same as the syntax element disclosed in Table 2 and / or Table 3 described later, and the specific description of the syntax element will be as described later.
[0086]
Table 2-1
[0087]
Table 2-2
[0088]
Table 2-3
[0089]
Table 2-4
[0090]
Table 2-5
[0091]
Table 2-6
[0092]
Table 3-1
[0093]
Table 3-2
[0094]
Table 3-3
[0095] According to this embodiment, as shown in Table 1, residual coding may be branched according to the value of the syntax element transform_skip_flag of the conversion skip flag. That is, different syntax elements may be used for residual coding based on the value of the conversion skip flag (based on whether conversion skip is performed). The residual coding used when conversion skip is not applied (i.e., when conversion is applied) can be called regular residual coding (RRC), and the residual coding when conversion skip is applied (i.e., when conversion is not applied) can be called transform skip residual coding (TSRC). Also, the regular residual coding can also be called general residual coding. Also, the regular residual coding can be called the regular residual coding syntax structure, and the transform skip residual coding can be called the transform skip residual coding syntax structure. Table 2 can represent the syntax elements of residual coding when the value of transform_skip_flag is 0, that is, when conversion is applied, and Table 3 can represent the syntax elements of residual coding when the value of transform_skip_flag is 1, that is, when conversion is not applied.
[0096] Specifically, for example, a conversion skip flag indicating whether to skip the conversion of a conversion block may be parsed, and it may be determined whether the conversion skip flag is 1. When the value of the conversion skip flag is 0, as shown in Table 2, syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gtx_flag, par_level_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level for the residual coefficient of the conversion block may be parsed, and the residual coefficient may be derived based on the syntax elements. In this case, the syntax elements may be parsed sequentially, or the parsing order may be changed. Also, the abs_level_gtx_flag may represent abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n][0] may be an example of the first conversion coefficient level flag (abs_level_gt1_flag), and the abs_level_gtx_flag[n][1] may be an example of the second conversion coefficient level flag (abs_level_gt3_flag).
[0097] Referring to Table 2 above, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level may be encoded / decoded. On the other hand, the sb_coded_flag may also be represented as coded_sub_block_flag.
[0098] In one embodiment, the encoding device can encode the (x, y) position information of the last non-zero transform coefficient in the transform block based on the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. More specifically, the last_sig_coeff_x_prefix represents the prefix of the column position of the last significant coefficient in the scanning order within the transform block, the last_sig_coeff_y_prefix represents the prefix of the row position of the last significant coefficient in the scanning order within the transform block, the last_sig_coeff_x_suffix represents the suffix of the column position of the last significant coefficient in the scanning order within the transform block, and the last_sig_coeff_y_suffix represents the suffix of the row position of the last significant coefficient in the scanning order within the transform block. Here, the significant coefficient can represent the non-zero coefficient. Also, the scanning order may be a right-upward diagonal scanning order. Alternatively, the scanning order may be a horizontal scanning order or a vertical scanning order. The scanning order may be determined based on whether intra / inter prediction is applied to the target block (CB or CB including TB) and / or a specific intra / inter prediction mode.
[0099] Thereafter, the encoding device divides the conversion block into 4x4 sub-blocks, and then, for each 4x4 sub-block, can indicate whether there are non-zero coefficients in the current sub-block by using a 1-bit syntax element coded_sub_block_flag.
[0100] If the value of coded_sub_block_flag is 0, since there is no more information to transmit, the encoding device can terminate the encoding process for the current sub-block. Conversely, if the value of coded_sub_block_flag is 1, the encoding device can continue the encoding process for sig_coeff_flag. The sub-block containing the last non-zero coefficient does not require encoding for coded_sub_block_flag, and the sub-block containing the DC information of the conversion block is likely to contain non-zero coefficients, so coded_sub_block_flag is not encoded and its value can be assumed to be 1.
[0101] If it is determined that there are non-zero coefficients in the current sub-block because the value of coded_sub_block_flag is 1, the encoding device can encode sig_coeff_flag having binary values in the reverse scanned order. The encoding device can encode 1-bit syntax element sig_coeff_flag for each transform coefficient according to the scan order. If the value of the transform coefficient at the current scan position is not 0, the value of sig_coeff_flag can be 1. Here, in the case of a sub-block including the last non-zero coefficient, since sig_coeff_flag does not need to be encoded for the last non-zero coefficient, the encoding process for the sub-block may be omitted. Level information encoding may be performed only when sig_coeff_flag is 1, and 4 syntax elements may be used in the level information encoding process. More specifically, each sig_coeff_flag[xC][yC] can indicate whether the level (value) of the transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero. In one embodiment, the sig_coeff_flag may correspond to an example of a syntax element of a valid coefficient flag indicating whether the quantized transform coefficient is a valid coefficient that is not 0.
[0102] The remaining level value after encoding for sig_coeff_flag may be derived as follows. That is, the syntax element remAbsLevel indicating the level value that must be encoded may be derived as follows.
[0103]
Number
[0104] Here, coeff means the actual transform coefficient value.
[0105] Also, the abs_level_gt1_flag can indicate whether the remAbsLevel at the scanning position (n) is greater than 1. For example, if the value of the abs_level_gt1_flag is 0, the absolute value of the conversion coefficient at that position may be 1. Also, if the value of the abs_level_gt1_flag is 1, the remAbsLevel indicating the level value that must be encoded later may be updated as follows.
[0106] [Number]
[0107] Also, the least significant coefficient (LSB) value of the remAbsLevel described in Equation 2 above may be encoded as follows in Equation 3 by the par_level_flag.
[0108] [Number]
[0109] Here, the par_level_flag[n] can indicate the parity of the conversion coefficient level (value) at the scanning position n.
[0110] The conversion coefficient level value remAbsLevel that must be encoded after the par_leve_flag encoding may be updated as follows.
[0111] [Number]
[0112] The abs_level_gt3_flag can indicate whether the remAbsLevel at the scanning position (n) is greater than 3. Encoding for abs_remainder may be performed only when the abs_level_gt3_flag is 1. The relationship between the actual conversion coefficient value coeff and each syntax element may be as follows.
[0113]
Number
[0114] Also, the following table represents an exemplification related to the above formula 5.
[0115]
Table 4
[0116] Here, |coeff| represents the conversion coefficient level (value) and may be displayed as AbsLevel for the conversion coefficient. Also, the sign of each coefficient may be encoded using the coeff_sign_flag which is a 1-bit symbol.
[0117] Also, for example, if the value of the conversion skip flag is 1, as shown in Table 3, the syntax elements sb_coded_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag, par_level_flag, and / or abs_remainder for the residual coefficients of the conversion block may be parsed, and the residual coefficients may be derived based on the syntax elements. In this case, the syntax elements may be parsed sequentially, or the parsing order may be changed. Also, the abs_level_gtx_flag may represent abs_level_gt1_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and / or abs_level_gt9_flag. For example, abs_level_gtx_flag[n][j] may be a flag indicating whether the absolute value or level (value) of the conversion coefficient at the scanning position n is greater than (j<<1)+1. The (j<<1)+1 may be replaced by a predetermined threshold value such as a first threshold value or a second threshold value depending on the case.
[0118] On the one hand, CABAC provides high performance, but has the drawback that its throughput performance is not good. This is due to the normalization encoding engine of CABAC. Normalization encoding (i.e., encoding using the normalization encoding engine of CABAC) shows high data dependence because it uses the probability state and range updated by the previous bin encoding, and it may take a long time to read the probability interval and determine the current state. The throughput problem of CABAC can be solved by restricting the number of context-coded bins. For example, as shown in Table 2 above, the sum of the bins used to represent sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag may be restricted to the number according to the size of the block. Also, for example, as shown in Table 3 above, the sum of the bins used to represent sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and abs_level_gt9_flag may be restricted to the number according to the size of the block. As an example, when the block is a 4x4 size block, the sum of the bins for the sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag or sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag may be restricted to 32 (or, for example, 28), and when the block is a 2x2 size block, the sum of the bins for the sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag may be restricted to 8 (or, for example, 7).The limited number of the bins can be indicated by remBinsPass1 or RemCcbs. Or, as an example, for a higher CABAC throughput, the number of context coded bins may be limited for a block (CB or TB) including a coding target CG. In other words, the number of context coded bins may be limited in units of blocks (CB or TB). For example, if the size of the current block is 16x16, regardless of the current CG, the number of context coded bins for the current block may be limited to 1.75 times the number of pixels of the current block, i.e., 448.
[0119] In this case, when the encoding device has used all the limited number of context coding bins for encoding context elements, the remaining coefficients may be binary-coded by the binary coding method for the coefficients described below without using context coding, and bypass coding can be performed. In other words, for example, when the number of context coded bins coded for a 4x4 CG is 32 (or, for example, 28), or when the number of context coded bins coded for a 2x2 CG is 8 (or, for example, 7), sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag that are to be coded in more context coding bins may not be coded and may be immediately coded in dec_abs_level. Or, for example, when the number of context coded bins coded for a 4x4 block is limited to 1.75 times the number of pixels of the entire block, i.e., 28, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag that are to be coded in more context coding bins may not be coded and may be immediately coded in dec_abs_level as shown in Table 5 below.
[0120] [Table 5]
[0121] The |coeff| value may be derived based on the dec_abs_level. In this case, the |coeff|, which is the conversion coefficient value, may be derived as follows.
[0122]
Equation
[0123] Also, the coeff_sign_flag can indicate the sign of the conversion coefficient level at the scanning position (n). That is, the coeff_sign_flag can indicate the sign of the conversion coefficient at the scanning position (n).
[0124] FIG. 5 is a diagram showing an example of intra-conversion coefficients in a 4x4 block.
[0125] The 4x4 block in FIG. 5 represents an example of quantized coefficients. The block shown in FIG. 5 may be a 4x4 conversion block or a 4x4 sub-block of an 8x8, 16x16, 32x32, or 64x64 conversion block. The 4x4 block in FIG. 5 can represent a luma block or a chroma block.
[0126] On the one hand, as described above, when the input signal is a syntax element that is not binary, the encoding device can binarize the value of the input signal to convert the input signal into a binary value. Further, the decoding device can decode the syntax element and derive the binarized value of the syntax element (i.e., the binarized bin), and can derive the value of the syntax element by inverse-binarizing the binarized value. The binarization process may be performed by a Truncated Rice (TR) binarization process, a k-th order Exp-Golomb (EGk) binarization process, a Limited k-th order Exp-Golomb (Limited EGk), or a Fixed-length (FL) binarization process, etc., which will be described later. Further, the inverse-binarization process can represent a process of deriving the value of the syntax element based on the TR binarization process, the EGk binarization process, or the FL binarization process.
[0127] For example, the TR binarization process may be performed as follows.
[0128] The input of the TR binarization process may be the requirements for TR binarization and cMax and cRiceParam for the syntax element. Further, the output of the TR binarization process may be the TR binarization for the value symbolVal corresponding to the bin string.
[0129] Specifically, as an example, when there is a suffix bit string for a syntax element, the TR bit string for the syntax element may be a concatenation of a prefix bit string and the suffix bit string, and when the suffix bit string does not exist, the TR bit string for the syntax element may be the prefix bit string. For example, the prefix bit string may be derived as described below.
[0130] The prefix value of the symbolVal for the syntax element may be derived as follows.
[0131] [Number]
[0132] Here, prefixVal can represent the prefix value of the symbolVal. The prefix of the TR bit string of the syntax element (i.e., the prefix bit string) may be derived as described below.
[0133] For example, when the prefixVal is smaller than cMax >> cRiceParam, the prefix bit string may be a bit string of length prefixVal + 1 indexed by binIdx. That is, when the prefixVal is smaller than cMax >> cRiceParam, the prefix bit string may be a bit string of the number of bits prefixVal + 1 indicated by binIdx. The bins for binIdx smaller than prefixVal may be the same as 1. Also, the bin for binIdx the same as prefixVal may be the same as 0.
[0134] For example, the bit string derived by unary binarization for the prefixVal may be as shown in the following table.
[0135]
Table 6
[0136] On the other hand, when the prefixVal is not smaller than cMax >> cRiceParam, the prefix bit string may be a bit string with a length of cMax >> cRiceParam and all bits being 1.
[0137] Also, when cMax is larger than symbolVal and cRiceParam is larger than 0, a suffix bit string of the TR bit string may exist. For example, the suffix bit string may be derived as follows.
[0138] The suffix value of the symbolVal for the syntax element may be derived as follows.
[0139]
Equation
[0140] Here, suffixVal can represent the suffix value of the symbolVal.
[0141] The suffix of the TR bit string (i.e., the suffix bit string) may be derived based on the FL binarization process for suffixVal where the cMax value is (1 << cRiceParam) - 1.
[0142] On the one hand, if the value of cRiceParam, which is an input parameter, is 0, the TR binarization may be exactly truncated unary binarization, and the same cMax value as the possible maximum value of the syntax element that is always decoded may be used.
[0143] Also, for example, the EGk binarization process may be performed as follows. The syntax element encoded by ue(v) may be an Exp-Golomb encoded syntax element.
[0144] As an example, the 0-th order Exp-Golomb (EG0) binarization process may be performed as follows.
[0145] The parsing process for the syntax element may start from the current position of the bitstream, reading the bits including the first non-zero bit and counting the number of leading bits such as 0. The process can be represented as follows in the following table.
[0146]
Table 7
[0147] Also, the variable codeNum may be derived as follows.
[0148]
Equation
[0149] Here, the value returned from read_bits(leadingZeroBits), that is, the value indicated by read_bits(leadingZeroBits), can be interpreted as the binary representation of an unsigned integer for the most significant bit recorded first.
[0150] The structure of the Exp - Golomb code that separates the bit string into "prefix" bits and "suffix" bits can be represented as shown in the following table.
[0151] [Table 8]
[0152] The "prefix" bits may be the bits parsed as described above for the leadingZeroBits calculation and may be represented by 0 or 1 in the bit string in Table 8. That is, the bit string represented by 0 or 1 in Table 8 above can represent the prefix bit string. The "suffix" bits may be the bits parsed in the calculation of codeNum and may be represented by xi in Table 8 above. That is, the bit string represented by xi in Table 8 above can represent the suffix bit string. Here, i may be a value in the range from 0 to LeadingZeroBits - 1. Also, each xi may be the same as 0 or 1.
[0153] The bit string assigned to the codeNum may be as follows in the following table.
[0154] [Table 9]
[0155] When the descriptor of the syntax element is ue(v), that is, when the syntax element is coded as ue(v), the value of the syntax element may be the same as codeNum.
[0156] Also, for example, the EGk binary evolution process may be performed as follows.
[0157] The input of the EGk binary evolution process may be a request for EGk binary evolution. Also, the output of the EGk binary evolution process may be an EGk binary evolution for the value symbolVal corresponding to the bit string.
[0158] The bit string of the EGk binary evolution process for symbolVal may be derived as follows.
[0159] [Table 10]
[0160] Referring to Table 10 above, the binary value X can be added to the end of the bit string using each call of put(X). Here, X may be 0 or 1.
[0161] Also, for example, the limited EGk binary evolution process may be performed as follows.
[0162] The input of the limited EGk binary evolution process may be a request for limited EGk binary evolution, the Rice parameter riceParam, the variable log2TransformRange representing the binary logarithm of the maximum value, and the variable maxPreExtLen representing the maximum prefix extension length. Also, the output of the limited EGk binary evolution process may be a limited EGk binary evolution for the value symbolVal corresponding to the bit string.
[0163] The bit string of the limited EGk evolution process for symbolVal may be derived as follows.
[0164] [Table 11]
[0165] Also, for example, the FL evolution process may be performed as follows.
[0166] The input of the FL evolution process may be the requirements for FL evolution and cMax for the syntax element. Also, the output of the FL evolution process may be the FL evolution for the value symbolVal corresponding to the bit string.
[0167] FL evolution may be configured using a bit string having a number of bits that is the fixed length of the symbol value symbolVal. Here, the fixed-length bits may be an unsigned integer bit string. That is, a bit string for the symbol value symbolVal may be derived by FL evolution, and the bit length (i.e., the number of bits) of the bit string may be a fixed length.
[0168] For example, the fixed length may be derived as follows.
[0169] [Equation]
[0170] The bin indexing for FL evolution may be a method that uses values increasing in order from the most significant bit to the least significant bit. For example, the bin index associated with the most significant bit may be binIdx = 0.
[0171] On one hand, for example, the binary process for the syntax element abs_remainder among the residual information may be performed as follows.
[0172] The input to the binary process for the abs_remainder may be a request for the binary of the syntax element abs_remainder[n], a hue component cIdx, and a luma position (x0, y0). The luma position (x0, y0) can indicate the top-left luma sample of the current luma transform block with reference to the top-left luma sample of the picture.
[0173] The output of the binary process for the abs_remainder may be the binary of the abs_remainder (i.e., the binary bit string of the abs_remainder). A usable bit string for the abs_remainder may be derived by the binary process.
[0174] The Rice parameter cRiceParam for the abs_remainder[n] may be derived by a Rice parameter derivation process that takes as inputs the hue component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the width of the transform block log2TbWidth, and the binary logarithm of the height of the transform block log2TbHeight. A specific description of the Rice parameter derivation process will be given later.
[0175] Also, for example, cMax for the currently coded abs_remainder[n] may be derived based on the Rice parameter cRiceParam. cMax may be derived as follows.
[0176]
Equation
[0177] On the one hand, the binary evolution for the abs_remainder, i.e., the bit string for the abs_remainder, may be the concatenation of a prefix bit string and a suffix bit string if the suffix bit string exists. Also, if the suffix bit string does not exist, the bit string for the abs_remainder may be the prefix bit string.
[0178] For example, the prefix bit string may be derived as described below.
[0179] The prefix value prefixVal of the abs_remainder[n] may be derived as follows.
[0180]
Equation
[0181] The prefix of the bit string of the abs_remainder[n] (i.e., the prefix bit string) may be derived by a TR binary evolution process for the prefixVal using the cMax and the cRiceParam as inputs.
[0182] If the prefix bit string is the same as a bit string with all bits being 1 and a bit length of 6, the suffix bit string of the bit string of the abs_remainder[n] may exist and may be derived as described below.
[0183] The process of deriving the Rice parameter for the abs_remainder[n] may be as follows.
[0184] The inputs to the rice parameter derivation process may be the colour component index cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm log2TbWidth of the width of the transform block, and the binary logarithm log2TbHeight of the height of the transform block. The luma position (x0, y0) can indicate the top-left sample of the current luma transform block with reference to the top-left luma sample of the picture. Also, the output of the rice parameter derivation process may be the rice parameter cRiceParam.
[0185] For example, based on a given component index cIdx and an array AbsLevel[x][y] for a transform block having the top-left luma position (x0, y0), the variable locSumAbs may be derived as in the pseudo code shown in the following table.
[0186] [Table 12]
[0187] Subsequently, based on the given variable locSumAbs, the rice parameter cRiceParam may be derived as in the following table.
[0188] [Table 13]
[0189] Also, for example, in the rice parameter derivation process for abs_remainder[n], baseLevel may be set to 4.
[0190] Alternatively, for example, the Rice parameter cRiceParam may be determined based on whether to skip the transformation of the current block. That is, when no transformation is applied to the current TB including the current CG, in other words, when transform skip is applied to the current TB including the current CG, the Rice parameter cRiceParam may be derived as 1.
[0191] Also, the suffix value suffixVal of the abs_remainder may be derived as follows.
[0192]
Equation
[0193] The suffix bit string of the abs_remainder may be derived by a limited EGk binary evolution process for the suffixVal where k is set to cRiceParam + 1, riceParam is set to cRiceParam, log2TransformRange is set to 15, and maxPreExtLen is set to 11.
[0194] On the other hand, for example, the binary evolution process for the syntax element dec_abs_level in the residual information may be performed as follows.
[0195] The input to the binary process for the dec_abs_level may be the requirements for the binary of the syntax element dec_abs_level[n], the hue component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the width of the transform block log2TbWidth, and the binary logarithm of the height of the transform block log2TbHeight. The luma position (x0, y0) can indicate the upper left sample of the current luma transform block with reference to the upper left luma sample of the picture.
[0196] The output of the binary process for the dec_abs_level may be the binary of the dec_abs_level (i.e., the binary bit string of the dec_abs_level). A usable bit string for the dec_abs_level may be derived by the binary process.
[0197] The Rice parameter cRiceParam for the dec_abs_level[n] may be derived by a Rice parameter derivation process that takes as input the hue component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the width of the transform block log2TbWidth, and the binary logarithm of the height of the transform block log2TbHeight. A specific description of the Rice parameter derivation process will be described later.
[0198] Also, for example, cMax for the dec_abs_level[n] may be derived based on the Rice parameter cRiceParam. cMax may be derived as follows.
[0199]
Equation
[0200] On the one hand, the binary evolution for the dec_abs_level[n], that is, the bit string for the dec_abs_level[n] may be the concatenation of a prefix bit string and a suffix bit string if the suffix bit string exists. Also, if the suffix bit string does not exist, the bit string for the dec_abs_level[n] may be the prefix bit string.
[0201] For example, the prefix bit string may be derived as described below.
[0202] The prefix value prefixVal of the dec_abs_level[n] may be derived as follows.
[0203]
Equation
[0204] The prefix of the bit string of the dec_abs_level[n] (i.e., the prefix bit string) may be derived by a TR binary evolution process for the prefixVal using the cMax and the cRiceParam as inputs.
[0205] If the prefix bit string is the same as a bit string with all bits being 1 and a bit length of 6, the suffix bit string of the bit string of the dec_abs_level[n] may exist and may be derived as described below.
[0206] The process for deriving the Rice parameter for the dec_abs_level[n] may be as follows.
[0207] The input of the rice parameter derivation process may be the colour component index cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm log2TbWidth of the width of the transform block, and the binary logarithm index log2TbHeight of the height of the transform block. The luma position (x0, y0) can indicate the top-left sample of the current luma transform block with reference to the top-left luma sample of the picture. Also, the output of the rice parameter derivation process may be the rice parameter cRiceParam.
[0208] For example, based on a given component index cIdx and an array AbsLevel[x][y] for a transform block having the top-left luma position (x0, y0), the variable locSumAbs may be derived as in the pseudo code shown in the following table.
[0209] [Table 14]
[0210] After that, based on the given variable locSumAbs, the rice parameter cRiceParam may be derived as in the following table.
[0211] [Table 15]
[0212] Also, for example, in the rice parameter derivation process for dec_abs_level[n], baseLevel may be set to 0, and the ZeroPos[n] may be derived as in the following formula.
[0213] [Equation]
[0214] Also, the suffix value suffixVal of the dec_abs_level[n] may be derived as follows.
[0215]
Equation
[0216] The suffix bit string of the bin string of the dec_abs_level[n] may be derived by the limited EGk binary evolution process for the suffixVal where k is set to cRiceParam + 1, truncSuffixLen is set to 15, and maxPreExtLen is set to 11.
[0217] On the other hand, the above-described RRC and TSRC may have the following differences.
[0218] - For example, in TSRC, the Rice parameter for the syntax element abs_remainder[] may be derived as 1. In RRC, the Rice parameter cRiceParam of the syntax element abs_remainder[] may be derived based on the lastAbsRemainder and the lastRiceParam as described above, but the Rice parameter cRiceParam of the syntax element abs_remainder[] in TSRC may be derived as 1. That is, for example, when transform skip is applied to the current block (e.g., the current TB), the Rice parameter cRiceParam for abs_remainder[] of TSRC for the current block may be derived as 1.
[0219] - Also, for example, referring to Table 3 and Table 4, in RRC, abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1] may be signaled, while in TSRC, abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and abs_level_gtx_flag[n][4] may be signaled. Here, the abs_level_gtx_flag[n][0] can be represented as abs_level_gt1_flag or the first coefficient level flag, the abs_level_gtx_flag[n][1] can be represented as abs_level_gt3_flag or the second coefficient level flag, the abs_level_gtx_flag[n][2] can be represented as abs_level_gt5_flag or the third coefficient level flag, the abs_level_gtx_flag[n][3] can be represented as abs_level_gt7_flag or the fourth coefficient level flag, and the abs_level_gtx_flag[n][4] can be represented as abs_level_gt9_flag or the fifth coefficient level flag. Specifically, the first coefficient level flag may be a flag indicating whether the coefficient level is greater than a first critical value (e.g., 1), the second coefficient level flag may be a flag indicating whether the coefficient level is greater than a second critical value (e.g., 3), the third coefficient level flag may be a flag indicating whether the coefficient level is greater than a third critical value (e.g., 5), the fourth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fourth critical value (e.g., 7), and the fifth coefficient level flag may be a flag indicating whether the coefficient level is greater than a fifth critical value (e.g., 9).As described above, compared with RRC, TSRC can further include abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and abs_level_gtx_flag[n][4] in addition to abs_level_gtx_flag[n][0] and abs_level_gtx_flag[n][1].
[0220] - Also, for example, in RRC, the syntax element coeff_sign_flag may be bypass-coded, but in TSRC, the syntax element coeff_sign_flag may be bypass-coded or context-coded.
[0221] - Also, for example, when the context coding bins for the current block are exhausted, in RRC, it may be coded as the syntax element dec_abs_level, but in TSRC, it may be coded as the syntax element abs_remainder.
[0222] - Also, for example, the conversion coefficient parsing order of RRC may be parsed in a predefined order from the lower right - upper left direction based on the last non-zero coefficient, but in TSRC, it may be parsed in a predefined order from the upper left - lower right direction, and the position of the last non-zero coefficient may be omitted.
[0223] - Also, for example, in RRC, the Dependent Quantization (DQ) or Sign Data Hiding (SDH) method may be applied, but in TSRC, the Dependent Quantization and Sign Data Hiding methods may not be used.
[0224] Also, a Sign Data Hiding (SDH) method can be proposed in relation to residual coding. The Sign Data Hiding method may be as follows.
[0225] When deriving the conversion coefficient, the sign of the conversion coefficient may be derived based on a 1-bit sign flag (the syntax element coeff_sign_flag described above). In this connection, SDH can represent a technique of omitting explicit signaling of coeff_sign_flag for the first valid conversion coefficient within a sub-block / coefficient group (Coefficient Group, CG) in order to improve coding efficiency. Here, the value of coeff_sign_flag for the first valid conversion coefficient may be derived based on the sum of the absolute levels (i.e., absolute values) of the valid conversion coefficients within the sub-block / coefficient group. That is, the sign of the first valid conversion coefficient may be derived based on the sum of the absolute levels of the valid conversion coefficients within the sub-block / coefficient group. On the other hand, a valid conversion coefficient can mean a non-zero transform coefficient, i.e., a transform coefficient whose (absolute) value is not 0. For example, when the sum of the absolute levels of the valid conversion coefficients is even, the value of coeff_sign_flag for the first valid conversion coefficient may be derived as 1, and when the sum of the absolute levels of the valid conversion coefficients is odd, the value of coeff_sign_flag for the first valid conversion coefficient may be derived as 0. In other words, for example, when the sum of the absolute levels of the valid conversion coefficients is even, the sign of the first valid conversion coefficient may be derived as a negative value, and when the sum of the absolute levels of the valid conversion coefficients is odd, the sign of the first valid conversion coefficient may be derived as a positive value. Or, for example, when the sum of the absolute levels of the valid conversion coefficients is even, the value of coeff_sign_flag for the first valid conversion coefficient may be derived as 0, and when the sum of the absolute levels of the valid conversion coefficients is odd, the value of coeff_sign_flag for the first valid conversion coefficient may be derived as 1.In other words, for example, when the sum of the absolute levels with respect to the effective conversion coefficient is even, the sign for the first effective conversion coefficient may be derived as a positive value, and when the sum of the absolute levels with respect to the effective conversion coefficient is odd, the sign for the first effective conversion coefficient may be derived as a negative value.
[0226] For example, the SDH in the residual syntax can be represented as shown in the following table.
[0227]
Table 16
[0228] Referring to Table 16, the variable signHiddenFlag can indicate whether the SDH is applied. The variable signHiddenFlag can also be called signHidden. For example, when the value of the variable signHiddenFlag is 0, the variable signHiddenFlag can indicate that the SDH is not applied, and when the value of the variable signHiddenFlag is 1, the variable signHiddenFlag can indicate that the SDH is applied. For example, the value of the variable signHiddenFlag may be set based on the flagged information to be signaled (e.g., sh_sign_data_hiding_used_flag or pic_sign_data_hiding_enabled_flag or sps_sign_data_hiding_enabled_flag). Also, for example, the value of the variable signHiddenFlag may be set based on lastSigScanPosSb and firstSigScanPosSb. Here, lastSigScanPosSb can indicate the position of the last valid transform coefficient searched within the sub-block / coefficient group according to the scan order, and firstSigScanPosSb can indicate the position of the first valid transform coefficient searched within the sub-block / coefficient group according to the scan order. Generally, lastSigScanPosSb may be located in a relatively high-frequency component region compared to firstSigScanPosSb. Therefore, when lastSigScanPosSb - firstSigScanPosSb is greater than a predetermined threshold, the signHidden value may be derived as 1 (i.e., SDH applied), and in other cases, the signHidden value may be derived as 0 (i.e., SDH not applied). Here, for example, referring to Table 35, the threshold may be set to 3.
[0229] Also, referring to Table 16, even if the value of signHiddenFlag is 0 (i.e.,!signHiddenFlag), when the current coefficient is not the first valid coefficient in the (sub) block according to the scan order (i.e., n!=firstSigScanPosSb), the coeff_sign_flag[n] for the current coefficient may be explicitly signaled.
[0230] Also, referring to Table 16, when the value of signHiddenFlag is 1, if the current coefficient is the first valid coefficient in the (sub) block according to the scan order (i.e., n = firstSigScanPosSb), the explicit signaling of coeff_sign_flag[n] for the current coefficient may be omitted. In this case, the value of coeff_sign_flag[n] for the current coefficient (i.e., the first valid coefficient) may be derived as follows. For example, the value of coeff_sign_flag[n] for the first valid coefficient may be derived based on the coeff_sign_flag[n] values for the valid coefficients in the (sub) block. As an example, if the sum of the coeff_sign_flag[n] values for the valid coefficients is even, the coeff_sign_flag[n] for the first valid coefficient may be derived as 1, and if the sum of the coeff_sign_flag[n] values for the remaining valid coefficients excluding the first valid coefficient is odd, the coeff_sign_flag[n] for the first valid coefficient may be derived as 0. Or, as another example, if the sum of the coeff_sign_flag[n] values for the valid coefficients is even, the coeff_sign_flag[n] for the first valid coefficient may be derived as 0, and if the sum of the coeff_sign_flag[n] values for the valid coefficients is odd, the coeff_sign_flag[n] for the first valid coefficient may be derived as 1.
[0231] On one hand, when the above-mentioned sign data hiding is activated in high-level syntax (VPS, SPS, PPS, slice header syntax, etc.) or low-level syntax (slice data syntax, coding unit syntax, transform unit syntax, etc.) and the sh_ts_residual_coding_disabled_flag is 1, the RRC sign data hiding process may be used in lossless coding. Therefore, incorrect settings in the encoding device may make lossless coding impossible. Or, when loss coding (i.e., irreversible coding method) instead of lossless coding is applied and BDPCM is applied while the residual signal to which transform skip is applied is coded in RRC, BDPCM may cause coding loss because SDH is performed in accordance with the SDH application conditions even though intervals where the residual value becomes 0 occur more frequently due to the difference between residuals compared to the general case. Specifically, for example, when valid transform coefficients (non-zero residual data) exist at the 0th position and the 15th position in the CG and the values of the transform coefficients at the remaining positions in the CG are 0, SDH may be applied to the CG according to the above-mentioned SDH application conditions. Therefore, the sign data (i.e., coding of the sign flag) for the first valid transform coefficient of the CG may be omitted. Therefore, in this case, due to the omission of sign data, the parity of only two residual data of the CG may be adjusted at the quantization stage, and coding loss may occur more frequently compared to the case where SDH is not applied. Such cases may also occur in blocks where BDPCM is not applied, but due to the characteristics of BDPCM, the level is lowered using the difference from the surrounding residuals, so inconveniences may occur more frequently when applying SDH.
[0232] Therefore, this document proposes an embodiment of setting the dependency / constraint between the above two technologies to prevent the co - use of SDH and residual coding (i.e., coding the residual samples of the transform skip blocks in the current slice with RRC) when sh_ts_residual_coding_disabled_flag = 1 from causing unintended coding loss or malfunctioning.
[0233] On the other hand, as described above, the residual data coding method may include Regular Residual Coding (RRC) and Transform Skip Residual Coding (TSRC).
[0234] Among the above - mentioned two methods, the residual data coding method for the current block may be determined based on the values of transform_skip_flag and sh_ts_residual_coding_disabled_flag as shown in Table 1. Here, the syntax element sh_ts_residual_coding_disabled_flag can indicate whether the TSRC is available. Therefore, when the transform_skip_flag indicates that transform skip occurs and sh_ts_residual_coding_disabled_flag indicates that the TSRC is not available, the syntax element by RRC for the transform skip block may be signaled. That is, RRC may be used when the value of transform_skip_flag is 0 or the value of sh_ts_residual_coding_disabled_flag is 1, and TSRC may be used in other cases.
[0235] This document proposes, as an example, a method in which the sh_ts_residual_coding_disabled_flag is subordinate to the pic_sign_data_hiding_enabled_flag. For example, the syntax elements proposed in this embodiment may be as shown in the following table.
[0236]
Table 17
[0237] Here, for example, the pic_sign_data_hiding_enabled_flag may be a flag indicating whether signature data hiding is available. For example, the pic_sign_data_hiding_enabled_flag can indicate whether signature data hiding is available. That is, for example, the pic_sign_data_hiding_enabled_flag can indicate whether signature data hiding is available for a picture block with respect to a sequence or a picture header (i.e., a picture_header_structure()). For example, the pic_sign_data_hiding_enabled_flag can indicate whether there can be a signature data hiding usage flag indicating whether signature data hiding is used for the current slice. For example, the pic_sign_data_hiding_enabled_flag with a value of 1 can indicate that the signature data hiding is available, and the pic_sign_data_hiding_enabled_flag with a value of 0 can indicate that the signature data hiding is not available. For example, the pic_sign_data_hiding_enabled_flag with a value of 1 can indicate that there can be a signature flag to which the signature data hiding is applied, and the pic_sign_data_hiding_enabled_flag with a value of 0 can indicate that there is no signature flag to which the signature data hiding is applied.
[0238] According to Table 17 above, the sh_ts_residual_coding_disabled_flag may be signaled only when sign data hiding is not available. Also, when sign data hiding is available, the sh_ts_residual_coding_disabled_flag may not be signaled, and the value of the sh_ts_residual_coding_disabled_flag may be inferred as 0 (coding the residual samples of the transform skip blocks within the current slice in TSRC syntax) or 1 (coding the residual samples of the transform skip blocks within the current slice in RRC syntax).
[0239] Here, for example, the pic_sign_data_hiding_enabled_flag may be signaled as picture header syntax or slice header syntax. For example, when the pic_sign_data_hiding_enabled_flag is signaled as syntax other than the picture header syntax, it may be called by another name. For example, the pic_sign_data_hiding_enabled_flag may also be called slice_sign_data_hiding_enabled_flag. Also, the sh_ts_residual_coding_disabled_flag may be signaled as slice header syntax, or may be signaled at other high-level syntax (High Level Syntax, HLS) (such as SPS syntax / VPS syntax / PPS syntax / PH syntax / DPS syntax, etc.) or low level (CU / TU) rather than slice header syntax. Regardless of the upper / lower relationship or the syntactic position of the signaled syntax, if the residual coding method is determined by whether SDH is available, it may be interpreted as conforming to this embodiment.
[0240] On one hand, according to existing image / video coding, the SDH is activated at a high level syntax (SPS syntax / VPS syntax / PPS syntax / DPS syntax / picture header syntax / slice header syntax, etc.) or at a low level (CU / TU). When the sh_ts_residual_coding_disabled_flag is 1, the SDH in the above-mentioned RRC may be used for lossless coding. Therefore, incorrect settings in the encoding device may make lossless coding impossible. Thus, this document proposes an embodiment in which when the SDH and the sh_ts_residual_coding_disabled_flag = 1, residual coding (i.e., coding the residual samples of the transform skip blocks within the current slice with RRC) are both used, and when the value of the transform_skip_flag is 1, the SDH is not used when coding the level of the transform coefficient to prevent causing unintended coding loss or malfunction. The residual coding syntax according to the proposed embodiment may be as follows in the following table.
[0241]
Table 18-1
[0242]
Table 18-2
[0243]
Table 18-3
[0244]
Table 18-4
[0245]
Table 18-5
[0246]
Table 18-6
[0247] Referring to Table 18 above, a variable signHidden indicating whether the SDH is applied may be derived based on the value of transform_skip_flag. For example, when the value of transform_skip_flag is 1, the value of signHidden may be derived as 0. That is, for example, when the value of transform_skip_flag is 1, the SDH may not be applied when deriving the sign of the transform coefficient of the current block.
[0248] In addition, this document proposes an embodiment in which, when SDH and residual coding (i.e., coding the residual samples of the transform skip block in the current slice with RRC) are both used when sh_ts_residual_coding_disabled_flag = 1, in order to prevent causing unintentional coding loss or malfunction, when the value of BdpcmFlag is 1, the SDH is not used when coding the level of the transform coefficient. The residual coding syntax according to the proposed embodiment may be as follows in the following table.
[0249]
Table 19-1
[0250]
Table 19-2
[0251]
Table 19-3
[0252]
Table 19-4
[0253]
Table 19-5
[0254]
Table 19-6
[0255] Referring to Table 19 above, a variable signHidden indicating whether or not the SDH is applied may be derived based on the value of a variable BdpcmFlag indicating whether or not the BDPCM is applied. For example, when the value of BdpcmFlag is 1, the value of signHidden may be derived as 0. That is, for example, when the value of BdpcmFlag is 1 (when BDPCM is applied to the current block), the SDH may not be applied when deriving the sign of the transform coefficient of the current block.
[0256] Referring to Table 19, when BdpcmFlag is 1, if loss coding is applied, SDH for TSRC is allowed, but when BDPCM is applied, the SDH may not be used.
[0257] Furthermore, this document proposes various embodiments related to the signaling of the above-described syntax element sh_ts_residual_coding_disabled_flag.
[0258] For example, as described above, the sh_ts_residual_coding_disabled_flag is a syntax element that defines whether TSRC is available or not. Therefore, it may not be signaled when the transform skip block is not used. That is, the syntax element for whether to use the transform skip block may only be meaningfully signaled for the sh_ts_residual_coding_disabled_flag when it indicates that the transform skip block is used.
[0259] Therefore, this document proposes an embodiment of signaling the sh_ts_residual_coding_disabled_flag only when the sps_transform_skip_enabled_flag is 1. The syntax according to this embodiment is as follows in the following table.
[0260]
Table 20
[0261] Referring to Table 20, when sps_transform_skip_enabled_flag is 1, sh_ts_residual_coding_disabled_flag may be signaled, and when sps_transform_skip_enabled_flag is 0, sh_ts_residual_coding_disabled_flag need not be signaled. Here, for example, the sps_transform_skip_enabled_flag can indicate whether a transform skip block is used. That is, for example, the sps_transform_skip_enabled_flag can indicate whether transform skip is available. For example, when the value of the sps_transform_skip_enabled_flag is 1, the sps_transform_skip_enabled_flag can indicate that a transform_skip_flag can exist in the transform unit syntax, and when the value of the sps_transform_skip_enabled_flag is 0, the sps_transform_skip_enabled_flag can indicate that no transform_skip_flag exists in the transform unit syntax. On the other hand, when sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be inferred as 0. Also, the above-mentioned sps_transform_skip_enabled_flag may be signaled in the SPS, or may be signaled in other high-level syntaxes (such as VPS, PPS, picture header syntax, slice header syntax, etc.) or low-level syntaxes (such as slice data syntax, coding unit syntax, transform unit syntax, etc.) instead of the SPS.Also, it may be signaled prior to the sh_ts_residual_coding_disabled_flag.
[0262] This document also proposes an embodiment that combines the above-described embodiments in relation to the signaling of the sh_ts_residual_coding_disabled_flag. For example, an embodiment of signaling the sh_ts_residual_coding_disabled_flag may be proposed as shown in the following table.
[0263] [Table 21]
[0264] Referring to Table 21, when sps_transform_skip_enabled_flag is 1 and pic_sign_data_hiding_enabled_flag is 0, the sh_ts_residual_coding_disabled_flag may be signaled; otherwise, the sh_ts_residual_coding_disabled_flag need not be signaled. On the other hand, when the sh_ts_residual_coding_disabled_flag is not signaled, the sh_ts_residual_coding_disabled_flag may be considered as 0 (infer).
[0265] Or, for example, an embodiment of signaling the sh_ts_residual_coding_disabled_flag may be proposed as shown in the following table.
[0266] [Table 22]
[0267] Referring to Table 22, when pic_sign_data_hiding_enabled_flag is 0 or sps_transform_skip_enabled_flag is 1, sh_ts_residual_coding_disabled_flag may be signaled; otherwise, sh_ts_residual_coding_disabled_flag need not be signaled. On the other hand, when sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be considered as 0 (infer).
[0268] Also, for example, according to this embodiment, a scheme may be proposed to signal the syntax elements ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag with the same high-level syntax or low-level syntax. For example, referring to Table 22 above, both ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag may be signaled with the picture header syntax. In this case, the sh_ts_residual_coding_disabled_flag may be referred to as ph_ts_residual_coding_disabled_flag. On the other hand, the ph_dep_quant_enabled_flag may be a flag indicating whether dependent quantization can be used. For example, the ph_dep_quant_enabled_flag can indicate whether dependent quantization can be used. That is, for example, the ph_dep_quant_enabled_flag can indicate whether dependent quantization can be used for blocks of pictures within a sequence. For example, the ph_dep_quant_enabled_flag can indicate whether there can be a dependent quantization usage flag indicating whether dependent quantization is used for the current slice. For example, the ph_dep_quant_enabled_flag with a value of 1 can indicate that the dependent quantization can be used, and the ph_dep_quant_enabled_flag with a value of 0 can indicate that the dependent quantization cannot be used. Also, for example, the ph_dep_quant_enabled_flag can be referred to as sh_dep_quant_enabled_flag depending on the signaled syntax.
[0269] Alternatively, for example, an embodiment of signaling the sh_ts_residual_coding_disabled_flag as shown in the following table may be proposed.
[0270]
Table 23
[0271] Referring to Table 23, when pic_sign_data_hiding_enabled_flag is 0 and sps_transform_skip_enabled_flag is 1, the sh_ts_residual_coding_disabled_flag may be signaled; otherwise, the sh_ts_residual_coding_disabled_flag may not be signaled. On the other hand, when the sh_ts_residual_coding_disabled_flag is not signaled, the sh_ts_residual_coding_disabled_flag may be regarded as 0 (infer). Also, for example, referring to Table 23 above, both ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag may be signaled in the picture header syntax. In this case, the sh_ts_residual_coding_disabled_flag can be called ph_ts_residual_coding_disabled_flag.
[0272] Furthermore, this document proposes embodiments in which the above-described syntax elements ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and / or sh_ts_residual_coding_disabled_flag are signaled using the same high-level syntax (VPS, SPS, PPS, picture header, slice header, etc.) or low-level syntax (slice data, coding unit, transform unit, etc.).
[0273] For example, as shown in the following table, embodiments may be proposed in which both pic_sign_data_hiding_enabled_flag and sh_ts_residual_coding_disabled_flag are signaled using the picture header syntax.
[0274]
Table 24
[0275] In this case, the sh_ts_residual_coding_disabled_flag can be referred to as the ph_ts_residual_coding_disabled_flag.
[0276] According to this embodiment, the syntax element indicating whether SDH can be used with the same HLS (i.e., pic_sign_data_hiding_enabled_flag) has a value of 0. Only in this case, the syntax element indicating whether residual coding for the conversion skip block (i.e., TSRC) can be used (i.e., sh_ts_residual_coding_disabled_flag) may be signaled. For example, referring to Table 24, pic_sign_data_hiding_enabled_flag may be signaled in the picture header syntax. When the value of pic_sign_data_hiding_enabled_flag is 0, ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax. On the other hand, for example, when the value of pic_sign_data_hiding_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may not need to be signaled. When sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be considered as 0 (infer). Also, when the value of sps_sign_data_hiding_enabled_flag is 1, pic_sign_data_hiding_enabled_flag may be signaled in the picture header syntax.
[0277] The embodiment according to Table 24 above is only an example, and both syntax elements may be signaled in other high-level syntaxes (VPS, SPS, PPS, slice header, etc.) or low-level syntaxes (slice data, coding unit, conversion unit, etc.) instead of the picture header.
[0278] Alternatively, for example, an embodiment may be proposed in which a syntax element value indicating whether residual coding (i.e., TSRC) for a conversion skip block is available is 0 (i.e., when TSRC is available), and a syntax element indicating whether SDH is available is signaled.
[0279]
Table 25
[0280] Referring to Table 25 above, when the value of ph_ts_residual_coding_disabled_flag is 0, pic_sign_data_hiding_enabled_flag may be signaled in the picture header syntax. On the other hand, for example, when the value of ph_ts_residual_coding_disabled_flag is 1, pic_sign_data_hiding_enabled_flag may not be signaled. Also, for example, when pic_sign_data_hiding_enabled_flag is not signaled, pic_sign_data_hiding_enabled_flag may be considered 0 (infer) at the decoding device.
[0281] The embodiment according to Table 25 above is only an example, and both syntax elements may be signaled in other high-level syntaxes (such as VPS, SPS, PPS, slice header, etc.) or low-level syntaxes (such as slice data, coding unit, conversion unit, etc.) instead of the picture header.
[0282] Alternatively, for example, a solution may be proposed to constrain pic_sign_data_hiding_enabled_flag and / or ph_dep_quant_enabled_flag based on ph_ts_residual_coding_disabled_flag.
[0283] For example, as shown in the following table, an embodiment may be proposed in which pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag are signaled only when the value of ph_ts_residual_coding_disabled_flag is 0.
[0284] [Table 26]
[0285] Referring to Table 26, when the value of ph_ts_residual_coding_disabled_flag is 0, pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag may be signaled in the picture header syntax. On the other hand, for example, when the value of ph_ts_residual_coding_disabled_flag is 1, pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag may not be signaled. Also, for example, when pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag are not signaled, pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag may be considered as 0 (infer) in the decoding device.
[0286] Also, for example, referring to Table 26 above, both ph_ts_residual_coding_disabled_flag, pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag may be signaled in the picture header syntax.
[0287] Furthermore, this document proposes an embodiment that combines the above-described embodiments in relation to the signaling of the sh_ts_residual_coding_disabled_flag. For example, an embodiment of signaling the sh_ts_residual_coding_disabled_flag may be proposed as shown in the following table.
[0288]
Table 27
[0289] Referring to Table 27, when pic_sign_data_hiding_enabled_flag is 0 or sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may be signaled; otherwise, ph_ts_residual_coding_disabled_flag may not be signaled. On the other hand, when ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag may be regarded as 0 at the decoding device (infer). Also, when the value of sps_sign_data_hiding_enabled_flag is 1, pic_sign_data_hiding_enabled_flag may be signaled in the picture header syntax.
[0290] Or, for example, an embodiment of signaling the sh_ts_residual_coding_disabled_flag may be proposed as shown in the following table.
[0291]
Table 28
[0292] Referring to Table 28, when pic_sign_data_hiding_enabled_flag is 0 and sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may be signaled; otherwise, ph_ts_residual_coding_disabled_flag need not be signaled. On the other hand, when ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag may be regarded as 0 at the decoding device (infer). Also, when the value of sps_sign_data_hiding_enabled_flag is 1, pic_sign_data_hiding_enabled_flag may be signaled in the picture header syntax.
[0293] Alternatively, for example, an embodiment of signaling sh_ts_residual_coding_disabled_flag may be proposed as shown in the following table.
[0294]
Table 29
[0295] Referring to Table 29, when sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may be signaled; otherwise, ph_ts_residual_coding_disabled_flag need not be signaled. Also referring to Table 29, when ph_ts_residual_coding_disabled_flag is 0, pic_sign_data_hiding_enabled_flag may be signaled; otherwise, pic_sign_data_hiding_enabled_flag need not be signaled. On the other hand, when ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag may be regarded as 0 at the decoding device (infer). Also, when pic_sign_data_hiding_enabled_flag is not signaled, pic_sign_data_hiding_enabled_flag may be regarded as 0 at the decoding device (infer).
[0296] Alternatively, for example, an embodiment of signaling sh_ts_residual_coding_disabled_flag may be proposed as shown in the following table.
[0297]
Table 30
[0298] Referring to Table 30, when sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag may be signaled; otherwise, ph_ts_residual_coding_disabled_flag need not be signaled. Also, referring to Table 30, when ph_ts_residual_coding_disabled_flag is 0, pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag may be signaled; otherwise, pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag need not be signaled. On the other hand, when ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag may be regarded as 0 at the decoding device (infer). Also, when pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag are not signaled, pic_sign_data_hiding_enabled_flag and ph_dep_quant_enabled_flag may be regarded as 0 at the decoding device (infer).
[0299] On the other hand, as described above, the information (syntax elements) in the syntax table disclosed in this document may be included in video / video information, configured / encoded by an encoding device, and transmitted to a decoding device in the form of a bitstream. The decoding device can parse / decode the information (syntax elements) in the syntax table. The decoding device can perform block / video / video restoration procedures based on the decoded information.
[0300] FIG. 6 schematically shows a video encoding method by the encoding apparatus according to the present document. The method disclosed in FIG. 6 may be performed by the encoding apparatus disclosed in FIG. 2. Specifically, for example, S600 to S630 in FIG. 6 may be performed by the entropy encoding unit of the encoding apparatus. Also, although not shown, the process of deriving a prediction sample for the conversion skip block may be performed by the prediction unit of the encoding apparatus, and the process of deriving a residual sample for the conversion skip block based on the original sample and the prediction sample for the conversion skip block may be performed by the subtraction unit of the encoding apparatus. The process of generating a restored sample and a restored picture for the conversion skip block based on the residual sample and the prediction sample for the conversion skip block may be performed by the addition unit of the encoding apparatus.
[0301] The encoding device encodes a sign data hiding available flag indicating whether sign data hiding is available for the current slice (S600). The encoding device can encode a sign data hiding available flag indicating whether sign data hiding is available for the current slice. The video information can include the sign data hiding available flag. For example, the encoding device can determine whether sign data hiding is available for blocks of pictures in a sequence, and can encode a sign data hiding available flag indicating whether sign data hiding is available. For example, the sign data hiding available flag may be a flag indicating whether sign data hiding is available. For example, the sign data hiding available flag can indicate whether sign data hiding is available. That is, for example, the sign data hiding available flag can indicate whether sign data hiding is available for blocks of pictures in a sequence. For example, the sign data hiding available flag can indicate whether there can be a sign data hiding usage flag indicating whether sign data hiding is used for the current slice. For example, the sign data hiding available flag with a value of 1 can indicate that the sign data hiding is available, and the sign data hiding available flag with a value of 0 can indicate that the sign data hiding is not available. For example, the sign data hiding available flag with a value of 1 can indicate that there can be a sign flag to which the sign data hiding is applied, and the sign data hiding available flag with a value of 0 can indicate that there is no sign flag to which the sign data hiding is applied.Also, for example, the sign data hiding available flag may be signaled in the SPS (Sequence Parameter Set) syntax. Or, for example, the sign data hiding available flag may be signaled in the picture header syntax or the slice header syntax. The syntax element of the sign data hiding available flag may be the sps_sign_data_hiding_enabled_flag described above.
[0302] The encoding device encodes a TSRC available flag indicating whether TSRC (Transform Skip Residual Coding) can be used for the transform skip block of the current slice based on the sign data hiding available flag (S610). The video information may include the TSRC available flag.
[0303] For example, the encoding device can encode the TSRC availability flag based on the signature data hiding availability flag. For example, the TSRC availability flag may be encoded based on the signature data hiding availability flag having a value of 0. That is, for example, when the value of the signature data hiding availability flag is 0 (i.e., when the signature data hiding availability flag indicates that signature data hiding is not available), the TSRC availability flag may be encoded. In other words, for example, when the value of the signature data hiding availability flag is 0 (i.e., when the signature data hiding availability flag indicates that signature data hiding is not available), the TSRC availability flag may be signaled. Also, for example, when the value of the signature data hiding availability flag is 1, the TSRC availability flag does not need to be encoded, and the value of the TSRC availability flag may be derived as 0 in the decoding device. That is, for example, when the value of the signature data hiding availability flag is 1, the TSRC availability flag does not need to be signaled, and the value of the TSRC availability flag may be derived as 0 in the decoding device.
[0304] Here, for example, the TSRC availability flag may be a flag indicating whether TSRC is available. That is, for example, the TSRC availability flag may be a flag indicating whether TSRC is available for blocks within a slice. In other words, for example, the TSRC availability flag may be a flag indicating whether TSRC is available for transform skip blocks within a slice. Here, the block may be a coding block (CB) or a transform block (TB). For example, the TSRC availability flag with a value of 1 may indicate that the TSRC is not available, and the TSRC availability flag with a value of 0 may indicate that the TSRC is available. Also, for example, the TSRC availability flag may be signaled in the slice header syntax. The syntax element of the TSRC availability flag may be the sh_ts_residual_coding_disabled_flag described above. The TSRC availability flag may also be referred to as the TSRC non-availability flag.
[0305] On the one hand, for example, an encoding device can determine whether dependent quantization can be used for blocks of pictures within a sequence, and can encode a dependent quantization available flag for whether dependent quantization can be used. The video information can include the dependent quantization available flag. For example, the dependent quantization available flag may be a flag for whether dependent quantization can be used. For example, the dependent quantization available flag can indicate whether dependent quantization can be used. That is, for example, the dependent quantization available flag can indicate whether dependent quantization can be used for blocks of pictures within a sequence. For example, the dependent quantization available flag can indicate whether there can be a dependent quantization usage flag indicating whether dependent quantization is used for the current slice. For example, the dependent quantization available flag with a value of 1 can indicate that the dependent quantization can be used, and the dependent quantization available flag with a value of 0 can indicate that the dependent quantization cannot be used. Also, for example, the dependent quantization available flag may be signaled in SPS syntax or slice header syntax, etc. The syntax element of the dependent quantization available flag may be the above-mentioned sps_dep_quant_enabled_flag.
[0306] Also, for example, the encoding device can encode a transform skip available flag indicating whether transform skip can be used for the current slice. The video information can include the transform skip available flag. For example, the encoding device can determine whether transform skip can be used for blocks of pictures in a sequence, and can encode a transform skip available flag indicating whether transform skip can be used. For example, the transform skip available flag may be a flag indicating whether transform skip can be used. For example, the transform skip available flag can indicate whether transform skip can be used. That is, for example, the transform skip available flag can indicate whether transform skip can be used for blocks of pictures in a sequence. For example, the transform skip available flag can indicate whether a transform skip flag can exist. For example, the transform skip available flag with a value of 1 can indicate that the transform skip can be used, and the transform skip available flag with a value of 0 can indicate that the transform skip cannot be used. That is, for example, the transform skip available flag with a value of 1 can indicate that the transform skip flag can exist, and the transform skip available flag with a value of 0 can indicate that the transform skip flag does not exist. Also, for example, the transform skip available flag may be signaled in the SPS (Sequence Parameter Set) syntax. The syntax element of the transform skip available flag may be the above-mentioned sps_transform_skip_enabled_flag.
[0307] Also, for example, the TSRC availability flag may be encoded based on the signature data hiding availability flag and / or the conversion skip availability flag. For example, the TSRC availability flag may be encoded based on the signature data hiding availability flag having a value of 0 and the conversion skip availability flag having a value of 1. That is, for example, when the value of the signature data hiding availability flag is 0 (i.e., indicating that signature data hiding is not available) and the value of the conversion skip availability flag is 1 (i.e., indicating that the conversion skip is available), the TSRC availability flag may be encoded (or signaled). Also, for example, when the value of the conversion skip availability flag is 0, the TSRC availability flag may not need to be encoded, and the value of the TSRC availability flag may be derived as 0. That is, for example, when the value of the conversion skip availability flag is 0, the TSRC availability flag may not need to be signaled, and the value of the TSRC availability flag may be derived as 0.
[0308] The encoding device encodes the residual information for the conversion skip block based on the TSRC availability flag (S620). The encoding device can encode the residual information for the conversion skip block based on the TSRC availability flag.
[0309] For example, the encoding device can determine the residual coding syntax for the transform skip block based on the TSRC availability flag. For example, the encoding device can determine the residual coding syntax for the transform skip block based on the TSRC availability flag to be one of a regular residual coding (RRC) syntax and a transform skip residual coding (TSRC) syntax. The RRC syntax can represent the syntax by RRC, and the TSRC syntax can represent the syntax by TSRC.
[0310] For example, based on the TSRC available flag with a value of 1, the residual coding syntax for the conversion skip block may be determined as regular residual coding (RRC) syntax. In this case, for example, a conversion skip flag for whether to skip the conversion of the conversion skip block may be encoded, and the value of the conversion skip flag may be 1. For example, the video information may include a conversion skip flag for the conversion skip block. The conversion skip flag can indicate whether the conversion of the conversion skip block is skipped. That is, the conversion skip flag can indicate whether conversion is applied to the conversion coefficients of the conversion skip block. The syntax element indicating the conversion skip flag may be the transform_skip_flag described above. For example, when the value of the conversion skip flag is 1, the conversion skip flag can indicate that no conversion is applied to the conversion skip block (i.e., the conversion is skipped), and when the value of the conversion skip flag is 0, the conversion skip flag can indicate that conversion is applied to the conversion skip block. For example, when the block within the current slice is a conversion skip block, the value of the conversion skip flag for the block may be 1.
[0311] Also, for example, based on the TSRC available flag having a value of 0, the residual coding syntax for the transform skip block may be determined as the Transform Skip Residual Coding (TSRC) syntax. Also, for example, a transform skip flag for whether to skip the transform of the transform skip block may be encoded, and based on the transform skip flag having a value of 1 and the TSRC available flag having a value of 0, the residual coding syntax for the transform skip block may be determined as the Transform Skip Residual Coding (TSRC) syntax. Also, for example, a transform skip flag for whether to skip the transform of a block may be encoded, and based on the transform skip flag having a value of 0 and the TSRC available flag having a value of 0, the residual coding syntax for the block may be determined as the Regular Residual Coding (RRC) syntax.
[0312] Thereafter, for example, an encoding device can encode the residual information of the determined residual coding syntax for the transform skip block. The encoding device can derive residual samples for the transform skip block and can encode the residual information of the determined residual coding syntax for the residual samples of the transform skip block. For example, based on the TSRC available flag having a value of 1, the residual information of the Regular Residual Coding (RRC) syntax for the transform skip block may be encoded, and based on the TSRC available flag having a value of 0, the residual information of the TSRC syntax for the transform skip block may be encoded. The video information can include the residual information.
[0313] For example, the encoding device can determine whether to perform inter prediction or intra prediction on the conversion skip block, and can determine a specific inter prediction mode or a specific intra prediction mode based on the RD cost. According to the determined mode, the encoding device can derive a prediction sample for the conversion skip block, and can derive a residual sample for the conversion skip block by subtracting the original sample for the conversion skip block from the prediction sample.
[0314] Thereafter, for example, the encoding device can derive the conversion coefficient of the conversion skip block based on the residual sample. For example, the encoding device can determine whether conversion is applied to the conversion skip block. That is, the encoding device can determine whether conversion is applied to the residual sample of the conversion skip block. The encoding device can determine whether conversion is applied to the conversion skip block in consideration of the coding efficiency. For example, the encoding device can determine that conversion is not applied to the conversion skip block. On the other hand, the block to which the conversion is not applied can also be called a conversion skip block.
[0315] When no transformation is applied to the transformation skip block, i.e., when no transformation is applied to the residual samples, the encoding device can derive the derived residual samples as the transformation coefficients of the transformation skip block. Also, when transformation is applied to the transformation skip block, i.e., when transformation is applied to the residual samples, the encoding device can perform transformation on the residual samples to derive the transformation coefficients of the transformation skip block. The transformation skip block can include a plurality of sub-blocks or coefficient groups (CG). Also, the size of the sub-blocks of the transformation skip block may be 4x4 size or 2x2 size. That is, the sub-blocks of the transformation skip block can include up to 16 non-zero transformation coefficients or up to 4 non-zero transformation coefficients. Here, the transformation skip block may be a coding block (CB) or a transform block (TB). Also, the transform coefficient can also be called the residual coefficient.
[0316] For example, when the residual coding syntax for the transformation skip block is determined to be the RRC syntax, the encoding device can encode the residual information of the RRC syntax for the transformation skip block. For example, the residual information of the RRC syntax can include the syntax elements disclosed in Table 2 above.
[0317] For example, the residual information of the RRC syntax can include syntax elements for the transformation coefficients of the transformation skip block. Here, the transform coefficient can also be called the residual coefficient.
[0318] For example, the syntax element can include syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, abs_remainder, dec_abs_level, and / or coeff_sign_flag.
[0319] Specifically, for example, the syntax element can include position information indicating the position of the last non-zero transform coefficient in the residual coefficient array of the transform skip block. That is, the syntax element can include position information indicating the position of the last non-zero transform coefficient in the scanning order of the transform skip block. The position information can include information indicating the prefix of the column position of the last non-zero transform coefficient, information indicating the prefix of the row position of the last non-zero transform coefficient, information indicating the suffix of the column position of the last non-zero transform coefficient, and information indicating the suffix of the row position of the last non-zero transform coefficient. The syntax elements for the position information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix. On the other hand, the non-zero transform coefficient can also be called a significant coefficient.
[0320] Also, for example, the syntax element can include a coded sub-block flag indicating whether a sub-block of the transform skip block includes non-zero transform coefficients, a valid coefficient flag indicating whether the transform coefficients of the transform skip block are non-zero transform coefficients, a first coefficient level flag indicating whether a coefficient level for the transform coefficient is greater than a first threshold value, a parity level flag for the parity of the coefficient level, and / or a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold value. Here, the coded sub-block flag may be sb_coded_flag or coded_sub_block_flag, the valid coefficient flag may be sig_coeff_flag, the first coefficient level flag may be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag may be par_level_flag, and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
[0321] Also, for example, the syntax element can include coefficient value related information for the value of the transform coefficients of the transform skip block. The coefficient value related information may be abs_remainder and / or dec_abs_level.
[0322] Also, for example, the syntax element can include a sign flag indicating the sign of the transform coefficient. The sign flag may be coeff_sign_flag.
[0323] On the one hand, for example, when the sign data hiding is applied to the conversion skip block, the sign flag of the first valid conversion coefficient of the current CG (coefficient group) in the conversion skip block need not be encoded and signaled. That is, for example, when the sign data hiding is applied to the conversion skip block, the syntax element need not include a sign flag indicating the sign of the first valid conversion coefficient. On the other hand, for example, whether the sign data hiding is applied to the conversion skip block may be derived based on the sign data hiding available flag and / or the positions of the first valid conversion coefficient and the last valid conversion coefficient of the current CG of the conversion skip block. For example, when the value of the sign data hiding available flag is 1 and the value obtained by subtracting the position of the first valid conversion coefficient from the position of the last valid conversion coefficient is greater than 3 (that is, when the value of the sign data hiding available flag is 1 and the number of valid conversion coefficients in the current CG is greater than 3), the sign data hiding may be applied to the current CG of the conversion skip block.
[0324] Also, for example, when the residual coding syntax for the conversion skip block is determined to be the TSRC syntax, the encoding device can encode the residual information of the TSRC syntax for the conversion skip block. For example, the residual information of the TSRC syntax can include the syntax elements disclosed in Table 3 above.
[0325] For example, the residual information of the TSRC syntax can include syntax elements for the conversion coefficients of the conversion skip block. Here, the transform coefficient can also be called the residual coefficient.
[0326] For example, the syntax element can include a context-coded syntax element and / or a bypass-coded syntax element for a conversion coefficient. The syntax element can include syntax elements such as sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, and / or abs_remainder.
[0327] For example, the context-coded syntax element for the conversion coefficient can include a valid coefficient flag indicating whether the conversion coefficient is a non-zero conversion coefficient, a sign flag indicating the sign of the conversion coefficient, a first coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a first critical value, and / or a parity level flag for the parity of the coefficient level of the conversion coefficient. Also, for example, the context-coded syntax element can include a second coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a second critical value, a third coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a third critical value, a fourth coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a fourth critical value, and / or a fifth coefficient level flag indicating whether the coefficient level of the conversion coefficient is greater than a fifth critical value. Here, the valid coefficient flag may be sig_coeff_flag, the sign flag may be coeff_sign_flag, the first coefficient level flag may be abs_level_gt1_flag, and the parity level flag may be par_level_flag. Also, 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.
[0328] Also, for example, the syntax element coded bypass for the conversion coefficient may include coefficient level information for the value (or coefficient level) of the conversion coefficient and / or a sign flag indicating the sign for the conversion coefficient. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be ceff_sign_flag.
[0329] The encoding device generates a bitstream including the sign data hiding available flag, the TSRC available flag, and the residual information (S630). For example, the encoding device can output video information including the sign data hiding available flag, the TSRC available flag, and the residual information as a bitstream. The bitstream can include the sign data hiding available flag, the TSRC available flag, and the residual information. Also, the bitstream can further include the dependent quantization available flag and / or the conversion skip available flag.
[0330] On the other hand, the video information can include prediction-related information for the conversion skip block. The prediction-related information can include prediction mode information for the inter prediction mode or intra prediction mode performed on the conversion skip block.
[0331] On the other hand, the bitstream may be transmitted to a decoding device via a network or a (digital) storage medium. Here, the network can include a broadcast network and / or a communication network, etc., and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.
[0332] FIG. 7 schematically shows an encoding apparatus that performs the video encoding method according to this document. The method disclosed in FIG. 6 may be performed by the encoding apparatus disclosed in FIG. 7. Specifically, for example, the entropy encoding unit of the encoding apparatus in FIG. 7 can perform S600 to S630 in FIG. 6. Also, although not shown, the process of deriving a prediction sample for the conversion skip block may be performed by the prediction unit of the encoding apparatus, and the process of deriving a residual sample for the conversion skip block based on the original sample and the prediction sample for the conversion skip block may be performed by the subtraction unit of the encoding apparatus, and the process of generating a restored sample and a restored picture for the conversion skip block based on the residual sample and the prediction sample for the conversion skip block may be performed by the addition unit of the encoding apparatus.
[0333] FIG. 8 schematically shows a video decoding method by the decoding apparatus according to this document. The method disclosed in FIG. 8 may be performed by the decoding apparatus disclosed in FIG. 3. Specifically, for example, S800 to S820 in FIG. 8 may be performed by the entropy decoding unit of the decoding apparatus, S830 in FIG. 8 may be performed by the residual processing unit of the decoding apparatus, and S840 may be performed by the addition unit of the decoding apparatus. Also, although not shown, the process of receiving prediction information for the conversion skip block may be performed by the entropy decoding unit of the decoding apparatus, and the process of deriving a prediction sample for the conversion skip block may be performed by the prediction unit of the decoding apparatus.
[0334] The decoding device acquires a sign data hiding available flag indicating whether sign data hiding is available for the current slice (S800). The decoding device can acquire video information including the sign data hiding available flag using a bitstream. The video information can include the sign data hiding available flag. For example, the sign data hiding available flag may be a flag indicating whether sign data hiding is available. For example, the sign data hiding available flag can indicate whether sign data hiding is available. That is, for example, the sign data hiding available flag can indicate whether sign data hiding is available for blocks of pictures within a sequence. For example, the sign data hiding available flag can indicate whether a sign data hiding usage flag indicating whether sign data hiding is used for the current slice can exist. For example, the sign data hiding available flag having a value of 1 can indicate that the sign data hiding is available, and the sign data hiding available flag having a value of 0 can indicate that the sign data hiding is not available. For example, the sign data hiding available flag having a value of 1 can indicate that a sign flag to which the sign data hiding is applied can exist, and the sign data hiding available flag having a value of 0 can indicate that a sign flag to which the sign data hiding is applied does not exist. Also, for example, the sign data hiding available flag may be signaled in the SPS (Sequence Parameter Set) syntax. Or, for example, the sign data hiding available flag may be signaled in the picture header syntax or the slice header syntax. The syntax element of the sign data hiding available flag may be the above-described sps_sign_data_hiding_enabled_flag.
[0335] The decoding device acquires a TSRC availability flag indicating whether TSRC (Transform Skip Residual Coding) can be used for the transform skip block of the current slice (S810). The video information can include the TSRC availability flag.
[0336] For example, the decoding device can acquire the TSRC availability flag based on the sign data hiding availability flag. For example, the TSRC availability flag may be acquired based on the sign data hiding availability flag having a value of 0. That is, for example, when the value of the sign data hiding availability flag is 0 (i.e., when the sign data hiding availability flag indicates that sign data hiding is not available), the TSRC availability flag may be acquired. In other words, for example, when the value of the sign data hiding availability flag is 0 (i.e., when the sign data hiding availability flag indicates that sign data hiding is not available), the TSRC availability flag may be signaled. Also, for example, when the value of the sign data hiding availability flag is 1, the TSRC availability flag need not be acquired, and the value of the TSRC availability flag may be derived as 0. That is, for example, when the value of the sign data hiding availability flag is 1, the TSRC availability flag need not be signaled, and the value of the TSRC availability flag may be derived as 0.
[0337] Here, for example, the TSRC available flag may be a flag indicating whether TSRC is available. That is, for example, the TSRC available flag may be a flag indicating whether TSRC is available for blocks within a slice. In other words, for example, the TSRC available flag may be a flag indicating whether TSRC is available for transform skip blocks within a slice. Here, the block may be a coding block (CB) or a transform block (TB). For example, the TSRC available flag with a value of 1 may indicate that the TSRC is not available, and the TSRC available flag with a value of 0 may indicate that the TSRC is available. Also, for example, the TSRC available flag may be signaled in the slice header syntax. The syntax element of the TSRC available flag may be the sh_ts_residual_coding_disabled_flag described above. The TSRC available flag may also be referred to as the TSRC non-available flag.
[0338] On the one hand, for example, a decoding device can acquire a dependent quantization available flag. The decoding device can acquire video information including the dependent quantization available flag using a bitstream. The video information can include the dependent quantization available flag. For example, the dependent quantization available flag may be a flag indicating whether dependent quantization is usable. For example, the dependent quantization available flag can indicate whether dependent quantization is usable. That is, for example, the dependent quantization available flag can indicate whether dependent quantization is usable for blocks of pictures within a sequence. For example, the dependent quantization available flag can indicate whether there can be a dependent quantization usage flag indicating whether dependent quantization is used for the current slice. For example, the dependent quantization available flag with a value of 1 can indicate that the dependent quantization is usable, and the dependent quantization available flag with a value of 0 can indicate that the dependent quantization is not usable. Also, for example, the dependent quantization available flag may be signaled in SPS syntax or slice header syntax, etc. The syntax element of the dependent quantization available flag may be the above-described sps_dep_quant_enabled_flag.
[0339] Also, for example, the decoding device can acquire a transform skip available flag. The decoding device can acquire video information including the transform skip available flag using a bitstream. The video information can include the transform skip available flag. For example, the transform skip available flag may be a flag indicating whether transform skip can be used. For example, the transform skip available flag can indicate whether transform skip can be used. That is, for example, the transform skip available flag can indicate whether transform skip can be used for a block of pictures in a sequence. For example, the transform skip available flag can indicate whether a transform skip flag can exist. For example, the transform skip available flag with a value of 1 can indicate that the transform skip can be used, and the transform skip available flag with a value of 0 can indicate that the transform skip cannot be used. That is, for example, the transform skip available flag with a value of 1 can indicate that the transform skip flag can exist, and the transform skip available flag with a value of 0 can indicate that the transform skip flag does not exist. Also, for example, the transform skip available flag may be signaled in SPS (Sequence Parameter Set) syntax. The syntax element of the transform skip available flag may be the above-mentioned sps_transform_skip_enabled_flag.
[0340] Also, for example, the TSRC availability flag may be obtained based on the signature data hiding availability flag and / or the conversion skip availability flag. For example, the TSRC availability flag may be obtained based on the signature data hiding availability flag having a value of 0 and the conversion skip availability flag having a value of 1. That is, for example, when the value of the signature data hiding availability flag is 0 (i.e., the signature data hiding availability flag indicates that signature data hiding is not available) and the value of the conversion skip availability flag is 1 (i.e., the conversion skip availability flag indicates that the conversion skip is available), the TSRC availability flag may be obtained (or signaled). Also, for example, when the value of the conversion skip availability flag is 0, the TSRC availability flag may not be obtained, and the value of the TSRC availability flag may be derived as 0. That is, for example, when the value of the conversion skip availability flag is 0, the TSRC availability flag may not be signaled, and the value of the TSRC availability flag may be derived as 0.
[0341] The decoding device obtains the residual coding information for the conversion skip block based on the TSRC availability flag (S820). The decoding device can obtain the residual information for the conversion skip block based on the TSRC availability flag.
[0342] For example, the decoding device can determine the residual coding syntax for the transform skip block within the current slice based on the TSRC available flag. For example, the decoding device can determine, based on the TSRC available flag, the residual coding syntax for the transform skip block as one of a regular residual coding (RRC) syntax and a transform skip residual coding (TSRC) syntax. The RRC syntax can represent the syntax by RRC, and the TSRC syntax can represent the syntax by TSRC.
[0343] For example, based on the TSRC available flag with a value of 1, the residual coding syntax for the transform skip block within the current slice may be determined as regular residual coding (RRC) syntax. In this case, for example, based on the transform skip available flag with a value of 1, a transform skip flag for whether to skip the transform of the transform skip block may be obtained, and the value of the transform skip flag may be 1. For example, the video information may include a transform skip flag for the transform skip block. The transform skip flag can indicate whether to skip the transform of the transform skip block. That is, the transform skip flag can indicate whether a transform has been applied to the transform coefficients of the transform skip block. The syntax element representing the transform skip flag may be the transform_skip_flag described above. For example, when the value of the transform skip flag is 1, the transform skip flag can indicate that no transform is applied to the transform skip block (i.e., the transform is skipped), and when the value of the transform skip flag is 0, the transform skip flag can indicate that a transform is applied to the transform skip block. For example, the value of the transform skip flag for the transform skip block may be 1.
[0344] Also, for example, based on the TSRC available flag whose value is 0, the residual coding syntax for the transform skip block may be determined as the Transform Skip Residual Coding (TSRC) syntax. Also, for example, a transform skip flag for whether to skip the transform of the transform skip block may be obtained, and based on the transform skip flag whose value is 1 and the TSRC available flag whose value is 0, the residual coding syntax for the transform skip block may be determined as the Transform Skip Residual Coding (TSRC) syntax. Also, for example, a transform skip flag for whether to skip the transform of the current block may be obtained, and based on the transform skip flag whose value is 0 and the TSRC available flag whose value is 0, the residual coding syntax for the current block may be determined as the Regular Residual Coding (RRC) syntax.
[0345] Thereafter, for example, the decoding device can obtain the residual information of the determined residual coding syntax for the transform skip block. For example, the residual information of the Regular Residual Coding (RRC) syntax may be obtained based on the TSRC available flag whose value is 1, and the residual information of the TSRC syntax may be obtained based on the TSRC available flag whose value is 0. The video information can include the residual information.
[0346] For example, when the residual coding syntax for the conversion skip block is determined to be the RRC syntax, the decoding device can obtain the residual information of the RRC syntax for the conversion skip block. For example, the residual information of the RRC syntax can include the syntax elements disclosed in Table 2 above.
[0347] For example, the residual information of the RRC syntax can include syntax elements for the conversion coefficients of the conversion skip block. Here, the conversion coefficient can also be called the residual coefficient.
[0348] For example, the syntax elements can include syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, abs_remainder, dec_abs_level, and / or coeff_sign_flag.
[0349] Specifically, for example, the syntax element can include position information indicating the position of the last non-zero transform coefficient in the residual coefficient array of the transform skip block. That is, the syntax element can include position information indicating the position of the last non-zero transform coefficient in the scanning order of the transform skip block. The position information can include information indicating a prefix of the column position of the last non-zero transform coefficient, information indicating a prefix of the row position of the last non-zero transform coefficient, information indicating a suffix of the column position of the last non-zero transform coefficient, and information indicating a suffix of the row position of the last non-zero transform coefficient. The syntax elements for the position information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. On the other hand, the non-zero transform coefficient can also be called a significant coefficient.
[0350] Also, for example, the syntax element may include an encoded sub-block flag indicating whether a sub-block of the transform skip block contains non-zero transform coefficients, a valid coefficient flag indicating whether the transform coefficients of the transform skip block are non-zero transform coefficients, a first coefficient level flag indicating whether a coefficient level for the transform coefficient is greater than a first threshold value, a parity level flag for the parity of the coefficient level, and / or a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold value. Here, the encoded sub-block flag may be sb_coded_flag or coded_sub_block_flag, the valid coefficient flag may be sig_coeff_flag, the first coefficient level flag may be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag may be par_level_flag, and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
[0351] Also, for example, the syntax element may include coefficient value related information for the value of the transform coefficient of the transform skip block. The coefficient value related information may be abs_remainder and / or dec_abs_level.
[0352] Also, for example, the syntax element may include a sign flag indicating the sign of the transform coefficient. The sign flag may be coeff_sign_flag.
[0353] On the one hand, for example, when the sign data hiding is applied to the conversion skip block, the sign flag of the first valid conversion coefficient of the current CG (coefficient group) within the conversion skip block may not be signaled. That is, for example, when the sign data hiding is applied to the conversion skip block, the syntax element may not include a sign flag indicating the sign of the first valid conversion coefficient. On the other hand, for example, whether the sign data hiding is applied to the conversion skip block may be derived based on the sign data hiding available flag and / or the position of the first valid conversion coefficient and the position of the last valid conversion coefficient of the current CG. For example, when the value of the sign data hiding available flag is 1 and the value obtained by subtracting the position of the first valid conversion coefficient from the position of the last valid conversion coefficient is greater than 3 (that is, when the value of the sign data hiding available flag is 1 and the number of valid conversion coefficients within the current CG is greater than 3), the sign data hiding may be applied to the current CG of the conversion skip block.
[0354] Also, for example, when the residual coding syntax for the conversion skip block is determined to be the TSRC syntax, the decoding device can obtain the residual information of the TSRC syntax for the conversion skip block. For example, the residual information of the TSRC syntax can include the syntax elements disclosed in Table 3 above.
[0355] For example, the residual information of the TSRC syntax can include the syntax elements for the conversion coefficients of the conversion skip block. Here, the transform coefficient can also be called the residual coefficient.
[0356] For example, the syntax element can include a context-coded syntax element and / or a bypass-coded syntax element for a conversion coefficient. The syntax element can include syntax elements such as sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gtX_flag, and / or abs_remainder.
[0357] For example, the context-coded syntax element for the conversion coefficient may include a valid coefficient flag indicating whether the conversion coefficient is a non-zero conversion coefficient, a sign flag indicating the sign of the conversion coefficient, a first coefficient level flag for indicating whether the coefficient level for the conversion coefficient is greater than a first critical value, and / or a parity level flag for the parity of the coefficient level for the conversion coefficient. Also, for example, the context-coded syntax element may include a second coefficient level flag for indicating whether the coefficient level of the conversion coefficient is greater than a second critical value, a third coefficient level flag for indicating whether the coefficient level of the conversion coefficient is greater than a third critical value, a fourth coefficient level flag for indicating whether the coefficient level of the conversion coefficient is greater than a fourth critical value, and / or a fifth coefficient level flag for indicating whether the coefficient level of the conversion coefficient is greater than a fifth critical value. 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. Also, 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.
[0358] Also, for example, the syntax element bypass-coded for the conversion coefficient may include coefficient level information for the value (or coefficient level) of the conversion coefficient and / or a sign flag indicating the sign of the conversion coefficient. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be coeff_sign_flag.
[0359] The decoding device derives residual samples for the conversion skip block based on the residual coding information (S830). For example, the decoding device can derive the conversion coefficients of the conversion skip block based on the residual information, and can derive the residual samples of the conversion skip block based on the conversion coefficients.
[0360] For example, the decoding device can derive the transform coefficients of the transform skip block based on the syntax elements of the residual information. Then, the decoding device can derive the residual samples of the transform skip block based on the transform coefficients. As an example, when it is derived based on the transform skip flag that no transform is applied to the transform skip block, that is, when the value of the transform skip flag is 1, the decoding device can derive the transform coefficients as the residual samples of the transform skip block. Or, for example, when it is derived based on the transform skip flag that no transform is applied to the transform skip block, that is, when the value of the transform skip flag is 1, the decoding device can inverse quantize the transform coefficients to derive the residual samples of the transform skip block. Or, for example, when it is derived based on the transform skip flag that a transform is applied to the block within the current slice, that is, when the value of the transform skip flag for the block is 0, the decoding device can inverse transform the transform coefficients to derive the residual samples of the block. Or, for example, when it is derived based on the transform skip flag that a transform is applied to the block, that is, when the value of the transform skip flag is 0, the decoding device can inverse quantize the transform coefficients and inverse transform the inverse quantized transform coefficients to derive the residual samples of the current block.
[0361] On one hand, for example, when the sign data hiding is applied to the conversion skip block, the sign of the first valid conversion coefficient of the current CG in the conversion skip block may be derived based on the sum of the absolute values of the valid conversion coefficients in the current CG. For example, when the sum of the absolute values of the valid conversion coefficients is even, the sign of the first valid conversion coefficient may be derived as a positive value, and when the sum of the absolute values of the valid conversion coefficients is odd, the sign of the first valid conversion coefficient may be derived as a negative value.
[0362] The decoding device generates a restored picture based on the residual samples (S840). For example, the decoding device can generate restored samples and / or a restored picture of the conversion skip block in the current slice based on the residual samples. For example, the decoding device can derive a prediction sample by performing an inter prediction mode or an intra prediction mode for the conversion skip block based on prediction information received using a bitstream, and can generate the restored sample by adding the prediction sample and the residual sample.
[0363] Thereafter, if necessary, in-loop filtering procedures such as deblocking filtering, SAO, and / or ALF procedures may be applied to the restored picture to improve subjective / objective picture quality, as described above.
[0364] FIG. 9 schematically shows a decoding apparatus that performs the video decoding method according to this document. The method disclosed in FIG. 8 may be performed by the decoding apparatus disclosed in FIG. 9. Specifically, for example, the entropy decoding unit of the decoding apparatus in FIG. 9 can perform S800 to S820 in FIG. 8, the residual processing unit of the decoding apparatus in FIG. 9 can perform S830 in FIG. 8, and the addition unit of the decoding apparatus in FIG. 9 can perform S840 in FIG. 8. Also, although not shown, the process of receiving prediction information for the transform skip block may be performed by the entropy decoding unit of the decoding apparatus in FIG. 9, and the process of deriving the predicted sample of the current block may be performed by the prediction unit of the decoding apparatus in FIG. 9.
[0365] According to the above-described document, the efficiency of residual coding can be improved.
[0366] Also, according to this document, the TSRC available flag can be signaled depending on the sign data hiding available flag, thereby improving the coding efficiency by preventing sign data hiding from being used for transform skip blocks for which TSRC is not available, reducing the amount of bits to be coded, and improving the overall residual coding efficiency.
[0367] Also, according to this document, the TSRC available flag can be signaled depending on the transform skip available flag and the sign data hiding available flag, thereby improving the coding efficiency by preventing sign data hiding from being used for transform skip blocks for which TSRC is not available, reducing the amount of bits to be coded, and improving the overall residual coding efficiency.
[0368] In the above-described embodiments, the method is a series of steps or blocks and is described based on a sequence diagram. However, this document is not limited to the order of the steps, and certain steps may occur in a different order than the steps described above or simultaneously. Also, those skilled in the art will understand that the steps shown in the sequence diagram are not exclusive, and other steps may be included or one or more of the steps in the sequence diagram may be deleted without affecting the scope of this document.
[0369] The embodiments described in this document may be implemented and performed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each figure may be implemented and performed on a computer, processor, microprocessor, controller, or chip. In this case, information for implementation (e.g., information on instructions) or algorithms may be stored in a digital storage medium.
[0370] Also, the decoding device and encoding device to which the embodiments of this document are applied may be included in multimedia broadcast transmission / reception devices, mobile communication terminals, home cinema video devices, digital cinema video devices, surveillance cameras, video conferencing devices, real-time communication devices such as video communication, mobile streaming devices, storage media, camcorders, video-on-demand (VoD) service providing devices, over-the-top (OTT) video devices, Internet streaming service providing devices, three-dimensional (3D) video devices, picture phone video devices, transportation means terminals (e.g., vehicle terminals, airplane terminals, ship terminals, etc.), and medical video devices, etc., and may be used to process video signals or data signals. For example, over-the-top (OTT) video devices may include game consoles, Blu-ray players, Internet-connected TVs, home theater systems, smartphones, tablet PCs, digital video recorders (DVRs), etc.
[0371] In addition, the processing method to which the embodiments of this document are applied may be produced in the form of a program executed by a computer and may be stored in a computer-readable recording medium. Multimedia data having the data structure according to this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, Blu-ray Disc (BD), Universal Serial Bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices. Further, the computer-readable recording medium includes media embodied in the form of a carrier wave (for example, transmission via the Internet). Also, a bitstream generated by an encoding method may be stored in a computer-readable recording medium or may be transmitted through a wired or wireless communication network.
[0372] In addition, the embodiments of this document may be embodied as a computer program product by program code, and the program code may be executed by a computer according to the embodiments of this document. The program code may be stored on a computer-readable carrier.
[0373] FIG. 10 is a structural diagram illustrating a content streaming system to which the embodiments of this document are applied.
[0374] The content streaming system to which the embodiments of this document are applied may generally include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0375] 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 is responsible for transmitting this to the streaming server. As another example, when a multimedia input device such as a smartphone, a camera, or a camcorder directly generates a bitstream, the encoding server may be omitted.
[0376] The bitstream may be generated by an encoding method or a bitstream generation method to which the embodiments of this document are applied, and the streaming server can temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0377] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server serves as a medium to inform the user of what services are available. If the user requests a desired service to the web server, the web server transmits it to the streaming server, and the streaming server transmits multimedia data to the user. At this time, the content streaming system can include a separate control server, and in this case, the control server is responsible for controlling commands / responses between each device in the content streaming system.
[0378] The streaming server can receive content from a media storage and / or an encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, in order to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.
[0379] Examples of the user device include mobile phones, smart phones, laptop computers, digital broadcast terminals, PDAs (personal digital assistants), PMPs (portable multimedia players), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, head mounted displays (HMDs)), digital TVs, desktop computers, digital signage, and the like. Each server in the content streaming system may be operated as a distributed server, and in this case, the data received by each server may be distributedly processed.
[0380] The claims described in this specification may be combined in various ways. For example, the technical features of the method claims in this specification may be combined and embodied as a device, and the technical features of the device claims in this specification may be combined and embodied as a method. Also, the technical features of the method claims in this specification and the technical features of the device claims may be combined and embodied as a device, and the technical features of the method claims in this specification and the technical features of the device claims may be combined and embodied as a method.
Claims
1. A video decoding method performed by a decoding apparatus, comprising: obtaining a sign data hiding available flag for whether sign data hiding is available; obtaining a TSRC (Transform Skip Residual Coding) non-available flag for whether TSRC syntax is used for a transform skip block within a current slice; obtaining residual information for the transform skip block based on the TSRC non-available flag; deriving residual samples for the transform skip block based on the residual information; and generating a reconstructed picture based on the residual samples, wherein the sign data hiding available flag is obtained from a sequence parameter set of a bitstream, the TSRC non-available flag is obtained from a slice header of the bitstream, and the TSRC non-available flag is obtained based on the sign data hiding available flag.
2. The sign data hiding available flag equal to 1 indicates that the sign data hiding is available, The method according to claim 1, wherein the sign data hiding available flag equal to 0 indicates that the sign data hiding is not available.
3. In response to the value of the sign data hiding available flag being equal to 1, a sign of a first valid transform coefficient of a current CG (coefficient group) within the transform skip block is derived based on a sum of absolute values of valid transform coefficients within the current CG. The method according to claim 2.
4. In response to the value of the sign data hiding available flag being equal to 1, a sign flag for the first valid transform coefficient is not signaled. The method according to claim 3.
5. The method according to claim 2, wherein the TSRC non-available flag is obtained from the slice header of the bitstream based on the value of the sign data hiding available flag being equal to 0.
6. The method according to claim 5, wherein based on the value of the sign data hiding available flag being equal to 1, the TSRC unavailable flag is not obtained from the slice header of the bitstream, and the value of the TSRC unavailable flag is derived as 0.
7. A video encoding method performed by an encoding device, comprising: encoding a sign data hiding available flag for indicating whether sign data hiding is available; encoding a TSRC (Transform Skip Residual Coding) unavailable flag for indicating whether a TSRC syntax is used for transform skip blocks within a current slice; encoding residual information for the transform skip blocks based on the TSRC unavailable flag; and generating a bitstream including the sign data hiding available flag, the TSRC unavailable flag, and the residual information, wherein the sign data hiding available flag is encoded within a sequence parameter set of the bitstream, the TSRC unavailable flag is encoded within a slice header of the bitstream, and the TSRC unavailable flag is encoded based on the sign data hiding available flag.
8. The method according to claim 7, wherein the sign data hiding available flag equal to 1 indicates that sign data hiding is available, and the sign data hiding available flag equal to 0 indicates that sign data hiding is not available.
9. The method according to claim 8, wherein the TSRC unavailable flag is encoded within the slice header of the bitstream based on the value of the sign data hiding available flag being equal to 0.
10. The method according to claim 9, wherein the TSRC unavailable flag is not encoded within the slice header of the bitstream based on the value of the sign data hiding available flag being equal to 1.
11. A non-transitory computer-readable recording medium storing a computer program, wherein when the computer program is executed by a processor, the processor performs the following operations, namely: Encoding a signature data hiding available flag indicating whether signature data hiding is available; Encoding a TSRC (Transform Skip Residual Coding) non-available flag indicating whether TSRC syntax is used for transform skip blocks within a current slice; and Encoding residual information for the transform skip blocks based on the TSRC non-available flag; A bitstream includes the signature data hiding available flag, the TSRC non-available flag, and the residual information; The signature data hiding available flag is encoded within a sequence parameter set of the bitstream; The TSRC non-available flag is encoded within a slice header of the bitstream; A non-transitory computer-readable recording medium, wherein the TSRC non-available flag is encoded based on the signature data hiding available flag.
12. A method for transmitting data for video information, comprising: Encoding a signature data hiding available flag indicating whether signature data hiding is available; Encoding a TSRC (Transform Skip Residual Coding) non-available flag indicating whether TSRC syntax is used for transform skip blocks within a current slice; Encoding residual information for the transform skip blocks based on the TSRC non-available flag; Generating a bitstream including the signature data hiding available flag, the TSRC non-available flag, and the residual information; and Transmitting the data including the bitstream, wherein the signature data hiding available flag is encoded within a sequence parameter set of the bitstream; the TSRC non-available flag is encoded within a slice header of the bitstream; A method, wherein the TSRC non-available flag is encoded based on the signature data hiding available flag.