Video decoding method and apparatus for residual coding
The video decoding method improves residual coding efficiency by utilizing TSRC availability flags to optimize signaling in high-resolution image transmission and storage, addressing the increased data volume challenge.
Patent Information
- Application Number
- JP2024082349
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-03-31
- Filing Date
- 2024-05-21
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2041-03-30
AI Technical Summary
The increasing demand for high-resolution, high-quality images has led to a surge in the amount of information to be transmitted and stored, necessitating highly efficient video compression technologies to reduce costs.
A video decoding method and apparatus that utilize Transform Skip Residual Coding (TSRC) by establishing a signaling relationship between sign data hiding and TSRC availability flags to improve coding efficiency, reducing the number of coded bits.
This approach enhances residual coding efficiency by minimizing the use of unnecessary signaling and syntax, thereby reducing the amount of coded bits and improving overall coding performance.
Smart Images

Figure 0007807488000076 
Figure 0007807488000077 
Figure 0007807488000078
Abstract
Description
[Technical Field]
[0001] This document relates to a video coding technology, and more particularly to a video decoding method and apparatus for encoding flag information indicating whether TSRC is available when encoding residual data of a current block in a video coding system. [Background technology]
[0002] In recent years, demand for high-resolution, high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images has been increasing in various fields. As the resolution and quality of image data increases, the amount of information or bits to be transmitted increases compared to existing image data. Therefore, when transmitting image data using existing media such as wired or wireless broadband lines or storing image data using existing storage media, the costs of transmission and storage increase.
[0003] Therefore, highly efficient video compression technology is required to effectively transmit, store and play back high-resolution, high-quality video information. Summary of the Invention [Problem 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 improving the efficiency of residual coding. [Means for solving the problem]
[0006] According to one embodiment of the present document, there is provided a video decoding method performed by a decoding device, the method including the steps of: obtaining a sign data hiding available flag; obtaining a Transform Skip Residual Coding (TSRC) available flag based on the sign data hiding available flag; obtaining residual information for a current block based on the TSRC available flag; deriving residual samples of the current block based on the residual information; and generating a reconstructed picture based on the residual samples, wherein the sign data hiding available flag indicates whether sign data hiding is available, and the TSRC available flag indicates whether TSRC is available, and the TSRC available flag is obtained based on the sign data hiding available flag having a value of 0.
[0007] According to another embodiment of the present document, there is provided a decoding device for decoding video, the decoding device including: an entropy decoding unit that acquires a sign data hiding available flag, acquires a Transform Skip Residual Coding (TSRC) available flag based on the sign data hiding available flag, acquires residual information for a current block based on the TSRC available flag, a residual processing unit that derives residual samples of the current block based on the residual information, and an adder that generates a reconstructed picture based on the residual samples, wherein the sign data hiding available flag indicates whether sign data hiding is available, and the TSRC available flag indicates whether TSRC is available, and the TSRC available flag is acquired based on the sign data hiding available flag having a value of 0.
[0008] According to yet another embodiment of the present document, there is provided a video encoding method performed by an encoding apparatus, the method including: encoding a sign data hiding available flag indicating whether sign data hiding is available, encoding a Transform Skip Residual Coding (TSRC) available flag indicating whether TSRC is available based on the sign data hiding available flag, encoding residual information for a current 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, wherein the TSRC available flag is encoded based on the sign data hiding available flag having a value of 0.
[0009] According to yet another embodiment of the present document, there is provided a video encoding apparatus, including an entropy encoding unit that encodes a sign data hiding availability flag indicating whether sign data hiding is available, encodes a Transform Skip Residual Coding (TSRC) availability flag indicating whether TSRC is available based on the sign data hiding availability flag, encodes residual information for a current block based on the TSRC availability flag, and generates a bitstream including the sign data hiding availability flag, the TSRC availability flag, and the residual information, wherein the TSRC availability flag is encoded based on the sign data hiding availability flag having a value of 0.
[0010] According to yet 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, the video decoding method including the steps of: acquiring a sign data hiding available flag; acquiring a Transform Skip Residual Coding (TSRC) available flag based on the sign data hiding available flag; acquiring residual information for a current block based on the TSRC available flag; deriving residual samples of the current block based on the residual information; and generating a reconstructed picture based on the residual samples, wherein the sign data hiding available flag indicates whether sign data hiding is available, and the TSRC available flag indicates whether TSRC is available, and the TSRC available flag is acquired based on the sign data hiding available flag having a value of 0. [Effects of the Invention]
[0011] According to this document, the efficiency of residual coding can be improved.
[0012] According to this document, by establishing a signaling relationship between the sign data hiding available flag and the TSRC available flag and signaling the TSRC available flag when sign data hiding is not available, sign data hiding is not used when TSRC is not available and RRC syntax is coded for the transform skip block, thereby improving coding efficiency, reducing the amount of coded bits, and improving overall residual coding efficiency.
[0013] According to this document, by establishing a signaling relationship between the dependent quantization available flag and the TSRC available flag and signaling the TSRC available flag when dependent quantization is not available, dependent quantization is not used when TSRC is not available and RRC syntax is coded for a transform skip block, thereby improving coding efficiency, reducing the amount of coded bits and improving overall residual coding efficiency.
[0014] According to this document, by establishing a signaling relationship between the transform skip available flag and the TSRC available flag and signaling the TSRC available flag when transform skip is available, the amount of coded bits can be reduced and the overall residual coding efficiency can be improved. [Brief explanation of the drawings]
[0015] [Figure 1] FIG. 1 illustrates a schematic diagram of an example video / image coding system to which embodiments of the present document may be applied. [Figure 2] 1 is a diagram illustrating the configuration of a video / image encoding device to which the embodiments of this document can be applied. [Figure 3] 1 is a diagram illustrating the configuration of a video / image decoding device to which an embodiment of this document can be applied. [Figure 4] FIG. 1 illustrates a context-adaptive binary arithmetic coding (CABAC) scheme for encoding syntax elements. [Figure 5] FIG. 10 is a diagram illustrating an example of transform coefficients within a 4x4 block. [Figure 6] FIG. 1 illustrates a scalar quantizer used in dependent quantization. [Figure 7] FIG. 1 illustrates state transitions and quantizer selection for dependent quantization. [Figure 8]1 is a diagram illustrating a video encoding method using an encoding device according to the present document; [Figure 9] 1 is a diagram illustrating a schematic diagram of an encoding device for performing a video encoding method according to the present document. [Figure 10] 1 is a diagram illustrating a video decoding method according to a decoding device according to the present document; [Figure 11] 1 is a diagram illustrating a decoding device for performing a video decoding method according to the present document; [Figure 12] FIG. 1 illustrates the structure of a content streaming system to which the embodiments of this document are applied. DETAILED DESCRIPTION OF THE INVENTION
[0016] This document may be modified in various ways and may have various embodiments. A specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit the embodiments of this document to the specific embodiment. Common terms used in this document are used only to describe specific embodiments and are not intended to limit the technical ideas of this document. Unless otherwise specified in the context, singular expressions also include plural expressions. In this specification, terms such as "comprise" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0017] Meanwhile, each component in the drawings described in this document is shown independently for the convenience of describing the different characteristic functions, and does not mean that each component is embodied as separate hardware or software. For example, two or more components may be combined to form a single component, or a single component may be divided into multiple components. Implementations in which each component is integrated and / or separated are also within the scope of this document as long as they do not deviate from the essence of this document.
[0018] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. In the following, the same components in the drawings will be designated by the same reference numerals, and duplicated descriptions of the same components will be omitted.
[0019] FIG. 1 shows a schematic diagram of an example video / image coding system to which embodiments of this document may be applied.
[0020] 1, a video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device in the form of a file or streaming data via a digital storage medium or a network.
[0021] The source device may include a video source, an encoding device, and a sending unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be called a video / video encoding device, and the decoding device may be called a video / video decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may also include a display unit, which may be configured as a separate device or an external component.
[0022] A video source can acquire video / video through a video / video capture, synthesis, or generation process. A video source can include a video / video capture device and / or a video / video generation device. A video / video capture device can include, for example, one or more cameras, a video / video archive containing previously captured video / video, etc. A video / video generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / video. For example, a virtual video / video can be generated by a computer, etc., in which case the process of generating related data can replace the video / video capture process.
[0023] An encoding device may encode input video / images. The encoding device may perform a series of steps such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video / image information) may be output in the form of a bitstream.
[0024] The transmitter may transmit the encoded video / image information or data output in the form of a bitstream to a receiver of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include elements for generating a media file according to a predetermined file format and elements for transmission via a broadcasting / communication network. The receiver may receive / extract the bitstream and transmit it to a decoding device.
[0025] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transform, and prediction, which correspond to the operations of the encoding device.
[0026] The renderer can render the decoded video / image, which can then be displayed on a display unit.
[0027] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document may be applied to methods disclosed in the versatile video coding (VVC) standard, the essential video coding (EVC) standard, the AOMedia Video1 (AV1) standard, the second generation of audio video coding standard (AVS2) or next generation video / image coding standards (e.g., H.267 or H.268).
[0028] This document presents various embodiments relating to video / image coding, and unless otherwise specified, the embodiments may be performed in combination with each other.
[0029] In this document, video can refer to a collection of a series of images over time. A picture generally refers to a unit representing an image at a specific time period, and a subpicture / slice / tile is a unit that constitutes part of a picture in coding. A subpicture / slice / tile can include one or more coding tree units (CTUs). A picture can be composed of one or more subpictures / slices / tiles. A picture can be composed of one or more tile groups. A tile group can include one or more tiles. A brick can represent a rectangular area of CTU rows within a tile of a picture. A tile can be partitioned into multiple bricks, and each brick can be composed of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks can also be called a brick. A brick scan may represent a specific sequential ordering of CTUs that partition a picture, where these CTUs may be aligned in a CTU raster scan within a brick, bricks within a tile may be aligned consecutively in a raster scan of the bricks in the tile, and tiles within a picture may be aligned consecutively in a raster scan of the tiles in the picture. A subpicture may represent a rectangular region of one or more slices within a picture. That is, a subpicture may include one or more slices that collectively cover a rectangular region of a picture. A tile is a rectangular region of a CTU within a specific tile row and a specific tile column in a picture. The tile column is a rectangular region of a CTU, where the rectangular region has a height equal to the height of the picture, and the width may be specified by a syntax element in the picture parameter set. The tile row is a rectangular region of a CTU, where the rectangular region has a width specified by a syntax element in the picture parameter set, and the height may be equal to the height of the picture.A tile scan may represent a specific sequential ordering of CTUs that partition a picture, and the CTUs may be consecutively aligned within a tile by a CTU raster scan, and tiles within a picture may be consecutively aligned by a raster scan of the tiles of the picture. A slice may include an integer number of bricks of a picture, and the integer number of bricks may be included in a single NAL unit. A slice may consist of multiple complete tiles or may be a contiguous sequence of complete bricks of one tile. In this document, tile group and slice may be used interchangeably. For example, tile group / tile group header may be referred to as slice / slice header in this document.
[0030] A pixel or PEL (pel) can mean the smallest unit that constitutes one picture (or image). A term corresponding to a pixel may also be used: "sample." A sample generally represents a pixel or a pixel value, and may represent only a pixel / pixel value of a luma component, or may represent only a pixel / pixel value of a chroma component.
[0031] A unit may represent a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to that region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. The term unit may be used interchangeably with terms such as block or area. In general, an MxN block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0032] As used herein, "A or B" can mean "A only," "B only," or "both A and B." In other words, as used herein, "A or B" can be interpreted as "A and / or B." For example, as used herein, "A, B, or C" can mean "A only," "B only," "C only," or "any combination of A, B, and C."
[0033] As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Thus, "A / B" can mean "A only," "B only," or "both A and B." For example, "A, B, C" can mean "A, B, or C."
[0034] In this specification, "at least one of A and B" can mean "A only," "B only," or "both A and B." Furthermore, in this specification, the expressions "at least one of A or B" and "at least one of A and / or B" can be interpreted as the same as "at least one of A and B."
[0035] Furthermore, in this specification, "at least one of A, B, and C" can mean "A only," "B only," "C only," or "any combination of A, B, and C." Furthermore, "at least one of A, B, or C" or "at least one of A, B, and / or C" can mean "at least one of A, B, and C."
[0036] Furthermore, parentheses used in this specification may 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." Furthermore, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" may be proposed as an example of "prediction."
[0037] In this specification, technical features described separately in one drawing may be embodied separately or simultaneously.
[0038] The following drawings are created to explain a specific example of the present specification. The names of specific devices or names of specific signals / messages / fields shown in the drawings are provided for illustrative purposes only, and the technical features of the present specification are not limited to the specific names in the following drawings.
[0039] 2 is a diagram illustrating the configuration of a video / image encoding device to which the embodiments of this document can be applied. Hereinafter, the video encoding device may include an image encoding device.
[0040] Referring to FIG. 2, the encoding apparatus 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 predictor 221 and an intra predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may also be referred to as a reconstructor or a reconstructed block generator. The above-described image divider 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filterer 260 may be configured by one or more hardware components (e.g., an encoder chipset or a processor) depending on the embodiment. In addition, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0041] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) using a quad-tree, binary-tree, ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into multiple coding units of deeper depths based on a quad-tree structure, a binary tree structure, and / or a tannery structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the tannery structure may be applied later. Alternatively, the binary tree structure may be applied first. The coding procedure described herein may be performed based on the final coding unit that is not further divided. In this case, based on coding efficiency according to video characteristics, the largest coding unit may be immediately used as the final coding unit, or the coding unit may be recursively divided into coding units of lower depths as needed, and the coding unit of the optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be divided or partitioned from the final coding unit. 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.
[0042] The term "unit" may be used interchangeably with 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. A sample generally represents a pixel or a pixel value, or can represent only a pixel / pixel value of a luma component, or can represent only a pixel / pixel value of a chroma component. A sample may be used as a term corresponding to one picture (or image) for a pixel or pel.
[0043] The encoding apparatus 200 may subtract a prediction signal (prediction block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an 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 apparatus 200, as shown in the figure, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input video signal (original block, original sample array) may be referred to as a subtraction unit 231. The prediction unit may predict a target block (hereinafter referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is to be applied for the current block or CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0044] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away, depending on the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, DC mode and planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the degree of precision of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the settings. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.
[0045] The inter prediction unit 221 may derive a prediction block for a current block based on a reference block (reference sample array) identified by a motion vector in a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction information (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In inter prediction, neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may also be referred to as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may also be referred to as a collocated picture (colPic). For example, the inter prediction unit 221 may configure a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to derive a motion vector and / or a reference picture index for the current block. Inter prediction may be performed based on various prediction modes. For example, in skip mode and merge mode, the inter prediction unit 221 may use motion information of neighboring blocks as motion information for the current block. In skip mode, unlike merge mode, a residual signal may not be transmitted.In motion vector prediction (MVP) mode, the motion vector of the surrounding block is used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.
[0046] The prediction unit 220 may generate a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for predicting a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as combined inter and intra prediction (CIIP). The prediction unit may also use an intra block copy (IBC) prediction mode or a palette mode for predicting a block. The IBC prediction mode or palette mode may be used for coding content images / moving images, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be similar to inter prediction in that it derives a reference block within the current picture. That is, IBC may use at least one of the inter prediction methods described herein. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, a sample value within the picture may be signaled based on information about a palette table and a palette index.
[0047] 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 reconstructed signal or a residual signal. The transform unit 232 may generate transform coefficients by applying a transform method to the residual signal. For example, the transform method may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, GBT refers to a transform obtained from a graph representing inter-pixel relationship information. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to pixel blocks having the same square size or to blocks of variable sizes other than a square.
[0048] The quantization unit 233 quantizes the transform coefficients and transmits them to the entropy encoding unit 240. The entropy encoding unit 240 encodes the quantized signal (information about the quantized transform coefficients) and outputs it as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantization unit 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order and generate information about the quantized transform coefficients based on the one-dimensional vector form of the quantized transform coefficients. The entropy encoding unit 240 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). In addition to the quantized transform coefficients, the entropy encoding unit 240 may also encode information required for video / image restoration (e.g., values of syntax elements) together with or separately from 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 network abstraction layer (NAL) units. The video / video information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / video information may also include general constraint information. In this document, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / video information. The video / video information may be encoded according to the encoding procedure described above and included in the bitstream.The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting and / or a storage unit (not shown) for storing the signal output from the entropy encoding unit 240 may be configured as an internal / external element of the encoding apparatus 200, or the transmitter may be included in the entropy encoding unit 240.
[0049] The quantized transform coefficients output from the quantization unit 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients in the inverse quantization unit 234 and the inverse transform unit 235. The adder 250 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to a prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the current block, such as when a skip mode is applied, a predicted block may be used as a reconstructed block. The adder 250 may be referred to as a reconstruction unit or a reconstructed block generation unit. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, or may be used for inter prediction of the next picture after filtering, as described below.
[0050] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during the picture encoding and / or reconstruction process.
[0051] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture and store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 240, as will be described later in the description of each filtering method. The filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0052] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter prediction unit 221. This allows the encoding apparatus to avoid prediction mismatch between the encoding apparatus 200 and the decoding apparatus 300 when inter prediction is applied, and also improves coding efficiency.
[0053] The DPB of the memory 270 may store the modified reconstructed picture to be used as a reference picture in the inter prediction unit 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block already reconstructed in the picture. The stored motion information may be transmitted to the inter prediction unit 221 to be used as motion information of a spatially neighboring block or motion information of a temporally neighboring block. The memory 270 may store reconstructed samples of a block reconstructed in the current picture and transmit them to the intra prediction unit 222.
[0054] FIG. 3 is a diagram illustrating the configuration of a video / image decoding device to which the embodiments of this document can be applied.
[0055] Referring to FIG. 3, the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter predictor 331 and an intra predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. Depending on the embodiment, the entropy decoding unit 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be implemented as a single hardware component (e.g., a decoder chipset or processor). The memory 360 may include a decoded picture buffer (DPB) and may be implemented as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.
[0056] When a bitstream including video / picture information is input, the decoding apparatus 300 can reconstruct an image corresponding to the process by which the video / picture information was processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 can derive units / blocks based on block division-related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied by the encoding apparatus. Accordingly, the processing unit for decoding may be, for example, a coding unit, and the coding unit may be divided from a coding tree unit or a maximal coding unit according to a quad tree structure, a binary tree structure, and / or a tannery tree structure. One or more transform units may be derived from the coding unit. The reconstructed video signal decoded and output by the decoding apparatus 300 may be played back by a playback device.
[0057] The decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal may be decoded by the entropy decoding unit 310. For example, the entropy decoding unit 310 may 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 on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / video information may also include general constraint information. The decoding apparatus may decode pictures further based on the information on the parameter sets and / or the general constraint information. 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 may decode information in a bitstream based on a coding method such as Exponential-Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element from the bitstream, determines a context model using information on the syntax element to be decoded, decoding information on neighboring and current blocks, or information on symbols / bins decoded in a previous step, predicts the occurrence probability of the bins based on the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element. In this case, after determining the context model, the CABAC entropy decoding method may update the context model using information on the decoded symbols / bins for the context model of the next symbol / bin.Among the information decoded by the entropy decoding unit 310, information related to prediction is provided to the prediction unit 330 (inter prediction unit 332 and intra prediction unit 331), and residual values entropy decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, among the information decoded by the entropy decoding unit 310, information related to filtering may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding apparatus may be further configured as an internal / external element of the decoding apparatus 300, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, the decoding device according to this document may be referred to as a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.
[0058] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in the form of a two-dimensional block. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding apparatus. The inverse quantization unit 321 may inverse quantize the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0059] The inverse transform unit 322 performs inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0060] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0061] The prediction unit 320 may generate a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for predicting a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as a combined inter and intra prediction (CIIP) mode. The prediction unit may also use an intra block copy (IBC) prediction mode or a palette mode for predicting a block. The IBC prediction mode or palette mode may be used for coding content images / moving images, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be similar to inter prediction in that it derives a reference block within the current picture. That is, IBC may use at least one of the inter prediction methods described herein. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, information about a palette table and a palette index may be included in the video / picture information and signaled.
[0062] The intra prediction unit 331 can predict a current block by referring to samples in a current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away from the current block depending on the prediction mode. In intra prediction, prediction modes can include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 can also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.
[0063] The inter prediction unit 332 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector in a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction information (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 332 may construct a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on received candidate selection information. Inter prediction may be performed based on various prediction modes, and the prediction information may include information indicating the inter prediction mode for the current block.
[0064] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (prediction block, prediction sample array) output from a prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for the current block, such as when the skip mode is applied, the predicted block may be used as the reconstructed block.
[0065] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in the current picture, may be output after filtering as described below, or may be used for inter prediction of a next picture.
[0066] Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture decoding process.
[0067] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0068] The (modified) reconstructed 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 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 331.
[0069] In this specification, the embodiments described for the filtering unit 260, inter prediction unit 221, and intra prediction unit 222 of the encoding device 200 may also be applied identically or correspondingly to the filtering unit 350, inter prediction unit 332, and intra prediction unit 331 of the decoding device 300, respectively.
[0070] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When the quantization / dequantization is omitted, the quantized transform coefficients may be referred to as transform coefficients. When the transform / inverse transform is omitted, the transform coefficients may be referred to as coefficients or residual coefficients, or may still be referred to as transform coefficients for consistency of expression.
[0071] In this document, quantized transform coefficients and transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, residual information may include information about transform coefficients, and the information about the transform coefficients may be signaled by a residual coding syntax. Transform coefficients may be derived based on the residual information (or information about the transform coefficients), and scaled transform coefficients may be derived by inverse transform (scaling) of the transform coefficients. Residual samples may be derived based on inverse transform (transform) of the scaled transform coefficients. This may be equally applied / expressed in other parts of this document.
[0072] As described above, the encoding device can perform various encoding methods, such as exponential Golomb, CAVLC (context-adaptive variable length coding), CABAC (context-adaptive binary arithmetic coding), etc. The decoding device can decode information in a bitstream based on a coding method, such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals.
[0073] For example, the coding method described above may be performed as follows:
[0074] FIG. 4 illustrates an example of CABAC (context-adaptive binary arithmetic coding) for encoding a syntax element. For example, in a CABAC encoding process, if an input signal is a syntax element that is not a binary value, an encoding device may convert the input signal into a binary value by binarizing the value of the input signal. Alternatively, if the input signal is already a binary value (i.e., the value of the input signal is a binary value), binarization may be bypassed. Here, each binary digit 0 or 1 constituting a binary value may be referred to as a bin. For example, if the binary string after binarization is 110, each of 1, 1, and 0 is referred to as a bin. The bin for a syntax element may indicate the value of the syntax element.
[0075] The binarized bins of the syntax elements may then be input to a regular encoding engine or a bypass encoding engine. The regular encoding engine of the encoding device may assign a context model reflecting a probability value to the bin and encode the bin based on the assigned context model. The regular encoding engine of the encoding device may update the context model for each bin after encoding the bin. Bins encoded as described above may be referred to as context-coded bins.
[0076] Meanwhile, when the binarized bins of the syntax element are input to the bypass encoding engine, they may be coded as follows. For example, the bypass encoding engine of the encoding device omits the steps of estimating the probability for the input bin and updating the probability model applied to the bin after encoding. When bypass encoding is applied, the encoding device can encode the input bins by applying a uniform probability distribution instead of assigning a context model, thereby improving the encoding speed. Bins encoded as described above can be called bypass bins.
[0077] Entropy decoding can refer to the process of performing the above-described entropy encoding process in reverse order.
[0078] For example, when a syntax element is decoded based on a context model, a decoding device may receive a bin corresponding to the syntax element through a bitstream, determine a context model using the syntax element and decoding information of a block to be decoded or a neighboring block, or information on a symbol / bin decoded in a previous step, predict an occurrence probability of the received bin based on the determined context model, and perform arithmetic decoding of the bin to derive a value of the syntax element. Thereafter, the context model of a bin to be decoded next may be updated to the determined context model.
[0079] For example, when a syntax element is bypass decoded, a decoding device can receive a bin corresponding to the syntax element using a bitstream and decode the input bin by applying a uniform probability distribution. In this case, the decoding device can omit the steps of deriving a context model for the syntax element and updating the context model applied to the bin after decoding.
[0080] As described above, residual samples may be derived as quantized transform coefficients through a transform and quantization process. Quantized transform coefficients may also be referred to as transform coefficients. In this case, the transform coefficients within a block may be signaled in the form of residual information. The residual information may include a residual coding syntax. That is, an encoding device may construct a residual coding syntax using the residual information, encode the syntax, and output it in the form of a bitstream. A decoding device may decode the residual coding syntax from the bitstream to derive residual (quantized) transform coefficients. The residual coding syntax may include syntax elements indicating whether a transform has been applied to the block, the position of the last significant transform coefficient within the block, whether significant transform coefficients exist within a sub-block, and the size / sign of the significant transform coefficients, as will be described below.
[0081] For example, syntax elements related to residual data encoding / decoding can be represented as follows:
[0082] [Table 1-1]
[0083] [Table 1-2]
[0084] [Table 1-3]
[0085] Transform_skip_flag indicates whether transform is skipped for an associated block. The transform_skip_flag may be a syntax element for a transform skip flag. The associated block may be a coding block (CB) or a transform block (TB). The terms CB and TB may be used interchangeably in the transform (and quantization) and residual coding procedures. For example, as described above, residual samples may be derived for the CB, and (quantized) transform coefficients may be derived by transforming and quantizing the residual samples. Information (e.g., syntax elements) efficiently indicating the position, size, sign, etc. of the (quantized) transform coefficients may be generated and signaled in the residual coding procedure. Quantized transform coefficients may be simply referred to as transform coefficients. In general, if the CB is not larger than the maximum TB, the size of the CB may be the same as the size of the TB. In this case, the target block to be transformed (and quantized) and residual coded may be referred to as the CB or the TB. On the other hand, if CB is larger than the maximum TB, the target block to be transformed (and quantized) and residually coded can be referred to as a TB. Hereinafter, syntax elements related to residual coding will be described as being signaled in units of transform blocks (TB), but this is merely an example, and as mentioned above, the TB may be used in the same sense as a coding block (CB).
[0086] Meanwhile, the syntax elements signaled after the conversion skip flag is signaled may be the same as the syntax elements disclosed in Table 2 and / or Table 3 described below, and a detailed description of the syntax elements will be provided below.
[0087] Table 2-1
[0088] Table 2-2
[0089] Table 2-3
[0090] Table 2-4
[0091] Table 2-5
[0092] Table 2-6
[0093] Table 3-1
[0094] Table 3-2
[0095] Table 3-3
[0096] 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 transform skip flag. That is, different syntax elements may be used for residual coding depending on the value of the transform skip flag (whether or not there is a transform skip). Residual coding used when a transform skip is not applied (i.e., a transform is applied) may be referred to as regular residual coding (RRC), and residual coding used when a transform skip is applied (i.e., no transform is applied) may be referred to as transform skip residual coding (TSRC). The regular residual coding may also be referred to as general residual coding. The regular residual coding may also be referred to as a regular residual coding syntax structure, and the transform skip residual coding may also be referred to as a transform skip residual coding syntax structure. Table 2 may represent the syntax elements of residual coding when the value of transform_skip_flag is 0, i.e., when a transform is applied, and Table 3 may represent the syntax elements of residual coding when the value of transform_skip_flag is 1, i.e., when a transform is not applied.
[0097] Specifically, for example, a transform skip flag indicating whether to skip transform of a transform block may be parsed, and it may be determined whether the transform skip flag is 1. If the value of the transform skip flag is 0, 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 residual coefficients of the transform block may be parsed, as shown in Table 2, 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. Furthermore, 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 transform coefficient level flag (abs_level_gt1_flag), and the abs_level_gtx_flag[n][1] may be an example of the second transform coefficient level flag (abs_level_gt3_flag).
[0098] 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. Meanwhile, sb_coded_flag may also be expressed as coded_sub_block_flag.
[0099] In one embodiment, the encoding device may encode (x, y) position information of the last non-zero transform coefficient in a transform block based on 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 a 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 a 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 a 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 a suffix of the row position of the last significant coefficient in the scanning order within the transform block. The significant coefficients may represent the non-zero coefficients. The scan order may be a diagonal scan order from top right to bottom right. Alternatively, the scan order may be a horizontal scan order or a vertical scan order. The scan order may be determined based on whether intra / inter prediction is applied to the current block (CB or CB including TB) and / or a specific intra / inter prediction mode.
[0100] The encoding device then divides the transform block into 4x4 sub-blocks, and for each 4x4 sub-block, can use a 1-bit syntax element coded_sub_block_flag to indicate whether there are any non-zero coefficients in the current sub-block.
[0101] If the value of coded_sub_block_flag is 0, there is no further information to transmit, and 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. Since the last sub-block containing a non-zero coefficient does not require coding for coded_sub_block_flag, and since sub-blocks containing DC information of transform blocks are likely to contain non-zero coefficients, coded_sub_block_flag is not coded and its value may be assumed to be 1.
[0102] If it is determined that a non-zero coefficient exists in the current sub-block because the value of coded_sub_block_flag is 1, the encoding apparatus may encode sig_coeff_flag having a binary value in the reverse scanning order. The encoding apparatus may encode a 1-bit syntax element sig_coeff_flag for each transform coefficient in the scanning order. If the value of the transform coefficient at the current scanning position is non-zero, the value of sig_coeff_flag may be 1. In the case of a sub-block including the last non-zero coefficient, sig_coeff_flag does not need to be encoded for the last non-zero coefficient, so the encoding process for the sub-block may be omitted. Level information encoding may be performed only if sig_coeff_flag is 1, and four syntax elements may be used in the level information encoding process. More specifically, each sig_coeff_flag[xC][yC] may indicate whether the level (value) of a 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 significance coefficient flag indicating whether a quantized transform coefficient is a significance coefficient that is not zero.
[0103] The remaining level value after encoding for sig_coeff_flag may be derived as follows: That is, a syntax element remAbsLevel indicating the level value that must be encoded may be derived as follows: remAbsLevel = sig_coeff_flag + remAbsLevel + remAbsLevel + remAbsLevel + remAbsLevel + remAbsLevel + remAbsLevel
[0104]
number
[0105] Here, coeff means the actual conversion coefficient value.
[0106] Furthermore, abs_level_gt1_flag may indicate whether the remAbsLevel at the corresponding scanning position (n) is greater than 1. For example, if the value of abs_level_gt1_flag is 0, the absolute value of the transform coefficient at the corresponding position may be 1. Furthermore, if the value of abs_level_gt1_flag is 1, the remAbsLevel, which indicates the level value that must be coded later, may be updated as follows:
[0107]
number
[0108] Furthermore, the least significant coefficient (LSB) value of remAbsLevel described in the above equation 2 may be encoded by par_level_flag as shown in the following equation 3.
[0109]
number
[0110] Here, par_level_flag[n] can indicate the parity of the transform coefficient level (value) at scanning position n.
[0111] The transform coefficient level value remAbsLevel that must be encoded after par_level_flag encoding may be updated as follows:
[0112]
number
[0113] abs_level_gt3_flag may indicate whether the remAbsLevel at the corresponding scanning position (n) is greater than 3. Encoding for abs_remainder may be performed only if abs_level_gt3_flag is 1. The relationship between the actual transform coefficient value coeff and each syntax element may be as follows:
[0114]
number
[0115] The following table also provides examples related to Equation 5 above.
[0116] [Table 4]
[0117] Here, |coeff| represents the transform coefficient level (value) and may be denoted as AbsLevel for the transform coefficient. Furthermore, the sign of each coefficient may be encoded using a 1-bit symbol, coeff_sign_flag.
[0118] For example, if the value of the transform skip flag is 1, syntax elements sb_coded_flag, sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag, par_level_flag, and / or abs_remainder for the residual coefficients of the transform block may be parsed, and the residual coefficients may be derived based on the syntax elements, as shown in Table 3. 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 transform coefficient at scanning position n is greater than (j<<1)+1, where (j<<1)+1 may be replaced with a predetermined threshold value such as a first threshold value or a second threshold value, depending on the case.
[0119] On the other hand, CABAC offers high performance but suffers from poor throughput. This is due to the regular encoding engine of CABAC. Regular encoding (i.e., encoding using the regular encoding engine of CABAC) uses the probability state and range updated by encoding the previous bin, which exhibits high data dependency and can take a long time to read the probability interval and determine the current state. The throughput issue of CABAC can be resolved by limiting 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 limited to a number based on the size of the block. Also, for example, as 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 limited to a number depending on the size of the block. As an example, if the block is a 4x4 size block, the sum of bins for sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag or sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag may be limited to 32 (or, for example, 28), and if the block is a 2x2 size block, the sum of bins for sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag may be limited to 8 (or, for example, 7).The limited number of bins may be indicated by remBinsPass1 or RemCcbs. Alternatively, for example, for a higher CABAC throughput, the number of context coded bins may be limited for a block (CB or TB) including a CG to be coded. In other words, the number of context coded bins may be limited on a block (CB or TB) basis. For example, if the size of the current block is 16x16, 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, regardless of the current CG.
[0120] In this case, when the limited number of context coding bins are all used for encoding the context elements, the encoding apparatus may perform bypass coding by binarizing the remaining coefficients using a binarization method for the coefficients described below without using context coding. In other words, for example, when the number of context coded bins coded for 4x4 CG becomes 32 (or, for example, 28), or the number of context coded bins coded for 2x2 CG becomes 8 (or, for example, 7), sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag coded in the context coding bins may not be coded any more, and may be directly coded in dec_abs_level. Or, for example, if the number of context coded bins coded for a 4x4 block is limited to 1.75 times the number of pixels in the entire block, i.e., 28, then sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag coded into the context coded bins do not need to be coded, and may be immediately coded into dec_abs_level as shown in Table 5 below.
[0121] [Table 5]
[0122] may be derived based on dec_abs_level. In this case, the transform coefficient value |coeff| may be derived as follows:
[0123]
number
[0124] Also, the coeff_sign_flag may indicate the sign of the transform coefficient level at the corresponding scanning position (n), i.e., the coeff_sign_flag may indicate the sign of the transform coefficient at the corresponding scanning position (n).
[0125] FIG. 5 is a diagram illustrating an example of transform coefficients within a 4x4 block.
[0126] The 4x4 blocks in Figure 5 represent an example of quantized coefficients. The blocks shown in Figure 5 may be 4x4 transform blocks or 4x4 sub-blocks of 8x8, 16x16, 32x32, or 64x64 transform blocks. The 4x4 blocks in Figure 5 may represent luma blocks or chroma blocks.
[0127] Meanwhile, as described above, when an input signal is a syntax element that is not a binary value, the encoding apparatus can binarize the value of the input signal to convert the input signal into a binary value. Furthermore, the decoding apparatus can decode the syntax element to derive a binarized value (i.e., a binarized bin) of the syntax element, and can debinarize the binarized value to derive the value of the syntax element. The binarization process may be a truncated Rice (TR) binarization process, a k-th order Exp-Golomb (EGk) binarization process, a k-th order limited Exp-Golomb (Limited k-th order Exp-Golomb, Limited EGk), a fixed-length (FL) binarization process, or the like, which will be described later. Also, the inverse binarization process may 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.
[0128] For example, the TR binarization process may be performed as follows:
[0129] The input of the TR binarization process may be the TR binarization request and the syntax element cMax and cRiceParam, and the output of the TR binarization process may be the TR binarization for the value symbolVal corresponding to the bin string.
[0130] Specifically, for example, if a suffix bin string exists for a syntax element, the TR bin string for the syntax element may be the concatenation of a prefix bin string and a suffix bin string, and if the suffix bin string does not exist, the TR bin string for the syntax element may be the prefix bin string. For example, the prefix bin string may be derived as described below.
[0131] The prefix value of the symbolVal for the syntax element may be derived as follows:
[0132]
number
[0133] Here, prefixVal may represent a prefix value of the symbolVal. The prefix of the TR bin string of the syntax element (i.e., prefix bin string) may be derived as described below.
[0134] For example, if prefixVal is smaller than cMax>>cRiceParam, the prefix bin string may be a bit string of length prefixVal+1 indexed by binIdx. That is, if prefixVal is smaller than cMax>>cRiceParam, the prefix bin string may be a bit string of prefixVal+1 bits indicated by binIdx. The bin for binIdx smaller than prefixVal may be equal to 1. Also, the bin for binIdx equal to prefixVal may be equal to 0.
[0135] For example, the bit string derived by unary binarization for the prefixVal may be as shown in the following table.
[0136]
Table 6
[0137] 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.
[0138] 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 described below.
[0139] The suffix value of the symbolVal for the syntax element may be derived as follows.
[0140]
Equation
[0141] Here, suffixVal can represent the suffix value of the symbolVal.
[0142] 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.
[0143] On the other hand, if the value of the input parameter cRiceParam is 0, the TR binarization may be exactly truncated unary binarization, and the cMax value may always be the same as the maximum possible value of the syntax element being decoded.
[0144] Also, for example, the EGk binarization process may be performed as follows: The syntax elements coded by ue(v) may be Exp-Golomb coded syntax elements.
[0145] As an example, a 0-th order Exp-Golomb (EG0) binarization process may be performed as follows:
[0146] The parsing process for the syntax element may begin by reading bits including the first non-zero bit starting from the current position in the bitstream and counting the number of leading bits such as 0. This process can be represented as follows:
[0147] [Table 7]
[0148] Furthermore, the variable codeNum may be derived as follows:
[0149]
number
[0150] Here, the value returned by read_bits(leadingZeroBits), i.e., the value indicated by read_bits(leadingZeroBits), can be interpreted as a binary representation of an unsigned integer with the most significant bit recorded first.
[0151] The structure of the Exp-Golomb code, which separates the bit string into "prefix" bits and "suffix" bits, can be represented as shown in the following table.
[0152] [Table 8]
[0153] The "prefix" bits may be the bits parsed as described above for the leadingZeroBits calculation and may be represented by a bit string of 0 or 1 in Table 8. That is, a bit string represented by 0 or 1 in Table 8 above may represent a prefix bit string. The "suffix" bits may be the bits parsed in the codeNum calculation and may be represented by xi in Table 8 above. That is, a bit string represented by xi in Table 8 above may represent a suffix bit string, where i may be a value ranging from 0 to LeadingZeroBits-1. Also, each xi may be equal to 0 or 1.
[0154] The bit string assigned to the codeNum may be as shown in the following table.
[0155] [Table 9]
[0156] If the descriptor of a syntax element is ue(v), that is, if the syntax element is coded with ue(v), the value of the syntax element may be the same as codeNum.
[0157] Also, for example, the EGk binarization process may be performed as follows.
[0158] An input of the EGk binarization process may be a request for EGk binarization, and an output of the EGk binarization process may be an EGk binarization for a value symbolVal corresponding to a bin string.
[0159] The bit string for the EGk binarization process for symbolVal may be derived as follows:
[0160] [Table 10]
[0161] Referring to Table 10 above, each call to put(X) can be used to add a binary value X to the end of the bin string, where X can be 0 or 1.
[0162] Also, for example, the limited EGk binarization process may be performed as follows.
[0163] The input of the limited EGk binarization process may be a request for limited EGk binarization and a Rice parameter riceParam, a variable log2TransformRange representing the binary logarithm of the maximum value, and a variable maxPreExtLen representing the maximum prefix extension length. Also, the output of the limited EGk binarization process may be limited EGk binarization for a value symbolVal corresponding to a bin string.
[0164] The bit string of the limited EGk binarization process for symbolVal may be derived as follows:
[0165] [Table 11]
[0166] Also, for example, the FL binarization process may be performed as follows.
[0167] The input of the FL binarization process may be a request for FL binarization and cMax for the syntax element, and the output of the FL binarization process may be the FL binarization for the value symbolVal corresponding to the bin string.
[0168] The FL binarization may be performed using a bit string having a number of bits that is a fixed length of the symbol value symbolVal. Here, the fixed length bit string may be an unsigned integer bit string. That is, the FL binarization may derive a bit string for the symbol value symbolVal, and the bit length (i.e., the number of bits) of the bit string may be a fixed length.
[0169] For example, the fixed length may be derived as follows:
[0170]
number
[0171] Bin indexing for FL binarization may be in a manner that uses increasing values 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.
[0172] Meanwhile, for example, the binarization process for the syntax element abs_remainder of the residual information may be performed as follows.
[0173] Inputs of the binarization process for the abs_remainder may be a binarization request for the syntax element abs_remainder[n], a color component cIdx, and a luma position (x0, y0), which may indicate the top left sample of the current luma transform block relative to the top left luma sample of the picture.
[0174] The output of the binarization process for the abs_remainder may be the binarization of the abs_remainder (i.e., a binarized bin string of the abs_remainder). The binarization process may derive an available bin string for the abs_remainder.
[0175] The Rice parameter cRiceParam for the abs_remainder[n] may be derived by a Rice parameter derivation process using the color component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth, which is the binary logarithm of the width of the transform block, and log2TbHeight, which is the binary logarithm of the height of the transform block, as inputs. The Rice parameter derivation process will be described in detail below.
[0176] Also, for example, cMax for the currently coded abs_remainder[n] may be derived based on the Rice parameter cRiceParam. The cMax may be derived as follows:
[0177]
number
[0178] Meanwhile, the binarization for the abs_remainder, i.e., the bin string for the abs_remainder, may be the concatenation of a prefix bin string and a suffix bin string if a suffix bin string exists, or the bin string for the abs_remainder may be the prefix bin string if the suffix bin string does not exist.
[0179] For example, the prefix bin string may be derived as described below.
[0180] The prefix value prefixVal of the abs_remainder[n] may be derived as follows:
[0181]
number
[0182] The prefix of the bin string in the abs_remainder[n] (ie, the prefix bin string) may be derived by a TR binarization process on the prefixVal using the cMax and the cRiceParam as inputs.
[0183] If the prefix bin string is identical to a bit string with all bits equal to 1 and a bit length of 6, then a suffix bin string of the bin string in abs_remainder[n] may exist and may be derived as described below.
[0184] The Rice parameter derivation process for the abs_remainder[n] may be as follows.
[0185] Inputs of the Rice parameter derivation process may be a color component index cIdx, a luma position (x0, y0), a current coefficient scan position (xC, yC), a binary logarithm of the width of the transform block (log2TbWidth), and a binary logarithm of the height of the transform block (log2TbHeight). The luma position (x0, y0) may indicate the top-left sample of the current luma transform block based on the top-left luma sample of the picture. In addition, an output of the Rice parameter derivation process may be the Rice parameter cRiceParam.
[0186] 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 shown in the pseudo code in the following table:
[0187] [Table 12]
[0188] Then, based on the given variable locSumAbs, the rice parameter cRiceParam may be derived as shown in the following table.
[0189] [Table 13]
[0190] Also, for example, baseLevel may be set to 4 in the Rice parameter derivation process for abs_remainder[n].
[0191] Alternatively, for example, the Rice parameter cRiceParam may be determined based on whether or not the transformation of the current block is skipped. That is, when no transformation is applied to the current TB including the current CG, in other words, when a transform skip is applied to the current TB including the current CG, the Rice parameter cRiceParam may be derived as 1.
[0192] Also, the suffix value suffixVal of the abs_remainder may be derived as follows:
[0193]
number
[0194] The suffix bin string of the bin string of the abs_remainder may be derived by a limited EGk binarization process on the suffixVal with k set to cRiceParam+1, riceParam set to cRiceParam, log2TransformRange set to 15, and maxPreExtLen set to 11.
[0195] Meanwhile, for example, the binarization process for the syntax element dec_abs_level of the residual information may be performed as follows.
[0196] Inputs to the binarization process for the dec_abs_level may be a binarization request for the syntax element dec_abs_level[n], a color component cIdx, a luma position (x0, y0), a current coefficient scan position (xC, yC), log2TbWidth, which is the binary logarithm of the width of the transform block, and log2TbHeight, which is the binary logarithm of the height of the transform block. The luma position (x0, y0) may indicate the top left sample of the current luma transform block based on the top left luma sample of the picture.
[0197] The output of the binarization process for the dec_abs_level may be the binarization of the dec_abs_level (i.e., a binarized bin string of the dec_abs_level). The binarization process may derive an available bin string for the dec_abs_level.
[0198] The Rice parameter cRiceParam for the dec_abs_level[n] may be derived by a Rice parameter derivation process using the color component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth, which is the binary logarithm of the width of the transform block, and log2TbHeight, which is the binary logarithm of the height of the transform block, as inputs. The Rice parameter derivation process will be described in detail later.
[0199] Also, for example, cMax for the dec_abs_level[n] may be derived based on the Rice parameter cRiceParam. The cMax may be derived as follows:
[0200]
number
[0201] Meanwhile, the binarization for the dec_abs_level[n], i.e., the bin string for the dec_abs_level[n], may be the concatenation of a prefix bin string and a suffix bin string if a suffix bin string exists, or the bin string for the dec_abs_level[n] may be the prefix bin string if the suffix bin string does not exist.
[0202] For example, the prefix bin string may be derived as described below.
[0203] The prefix value prefixVal of the dec_abs_level[n] may be derived as follows:
[0204]
number
[0205] The prefix of the bin string in the dec_abs_level[n] (ie, the prefix bin string) may be derived by a TR binarization process on the prefixVal using the cMax and the cRiceParam as inputs.
[0206] If the prefix bin string is identical to a bit string with all bits equal to 1 and a bit length of 6, then a suffix bin string of the bin string of the dec_abs_level[n] may exist and may be derived as described below.
[0207] The Rice parameter derivation process for the dec_abs_level[n] may be as follows.
[0208] Inputs of the Rice parameter derivation process may be a color component index cIdx, a luma position (x0, y0), a current coefficient scan position (xC, yC), a binary logarithm of the width of the transform block (log2TbWidth), and a binary logarithm of the height of the transform block (log2TbHeight). The luma position (x0, y0) may indicate the top-left sample of the current luma transform block based on the top-left luma sample of the picture. In addition, an output of the Rice parameter derivation process may be the Rice parameter cRiceParam.
[0209] 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 shown in the pseudo code in the following table:
[0210] [Table 14]
[0211] Then, based on the given variable locSumAbs, the rice parameter cRiceParam may be derived as shown in the following table.
[0212] [Table 15]
[0213] Also, for example, in the process of deriving the Rice parameter for dec_abs_level[n], baseLevel may be set to 0, and ZeroPos[n] may be derived as follows:
[0214]
number
[0215] Also, the suffix value suffixVal of the dec_abs_level[n] may be derived as follows:
[0216]
number
[0217] The suffix bin string of the bin string of the dec_abs_level[n] may be derived by a limited EGk binarization process on the suffixVal with k set to cRiceParam+1, truncSuffixLen set to 15, and maxPreExtLen set to 11.
[0218] Meanwhile, the above-mentioned RRC and TSRC may have the following differences.
[0219] 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 a transform skip is applied to a current block (e.g., a current TB), the Rice parameter cRiceParam of the abs_remainder[] of TSRC for the current block may be derived as 1.
[0220] - Also, for example, referring to Tables 3 and 4, abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1] may be signaled in RRC, while 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 in TSRC. 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 to 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].
[0221] 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.
[0222] Furthermore, dependent quantization can be proposed for the quantization process of residual samples. Dependent quantization can refer to a scheme in which a set of allowable reconstruction values for a current transform coefficient depends on the value (value of the transform coefficient level) of the transform coefficient preceding the current transform coefficient in the reconstruction order. That is, for example, dependent quantization can be realized by (a) defining two scalar quantizers with different reconstruction levels and (b) defining a process for switching between these scalar quantizers. Compared to existing independent scalar quantization, the dependent quantization can have the effect of allowing more densely packed reconstruction vectors in an N-dimensional vector space. Here, N can represent the number of transform coefficients in a transform block.
[0223] FIG. 6 illustrates an example of a scalar quantizer used in dependent quantization. Referring to FIG. 6, the position of the available reconstruction levels may be designated as a quantization step size Δ. Referring to FIG. 6, the scalar quantizers may be represented as Q0 and Q1. The scalar quantizer used may not be explicitly signaled in the bitstream but may be derived. For example, the quantizer used for a current transform coefficient may be determined by the parity of the transform coefficient level preceding the current transform coefficient in the coding / reconstruction order.
[0224] FIG. 7 illustrates state transitions and quantizer selection for dependent quantization.
[0225] 7, the transition between two scalar quantizers (Q0 and Q1) may be implemented by a state machine with four states. The four states may have four different values (0, 1, 2, 3). The state for a current transform coefficient may be determined by the parity of the transform coefficient level preceding the current transform coefficient in the coding / decoding order.
[0226] For example, when an inverse quantization process for a transform block begins, a state for dependent quantization may be set to 0. Thereafter, transform coefficients for the transform block may be restored in scan order (i.e., the same order as entropy decoding). For example, after a current transform coefficient is restored, a state for dependent quantization may be updated as shown in FIG. 7. An inverse quantization process for transform coefficients restored after the current transform coefficient is restored in the scan order may be performed based on the updated state. k shown in FIG. 7 may represent a value of a transform coefficient, i.e., a transform coefficient level value. For example, when the current state is 0, if k (the value of the current transform coefficient) & 1 is 0, the state may be updated to 0, and if k & 1 is 1, the state may be updated to 2. Also, for example, when the current state is 1, if k & 1 is 0, the state may be updated to 2, and if k & 1 is 1, the state may be updated to 0. Also, for example, when the current state is 2, if k&1 is 0, the state may be updated to 1, and when k&1 is 1, the state may be updated to 3. Also, for example, when the current state is 3, if k&1 is 0, the state may be updated to 3, and when k&1 is 1, the state may be updated to 1. Referring to FIG. 7, when the state is one of 0 and 1, the scalar quantizer used in the inverse quantization process may be Q0, and when the state is one of 2 and 3, the scalar quantizer used in the inverse quantization process may be Q1. The transform coefficients may be inverse quantized based on a quantization parameter for the restoration level of the transform coefficient in the scalar quantizer for the current state.
[0227] Meanwhile, this document proposes embodiments related to residual data coding. The embodiments described in this document may be combined with each other. As described above, residual data coding methods include Regular Residual Coding (RRC) and Transform Skip Residual Coding (TSRC).
[0228] Of the two methods described above, 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 may indicate whether the TSRC is available. Therefore, even if the transform_skip_flag indicates that the transform is skipped, if the sh_ts_residual_coding_disabled_flag indicates that the TSRC is not available, a syntax element according to RRC may be signaled for the transform-skip block. That is, if the value of transform_skip_flag is 0 or the value of sh_ts_residual_coding_disabled_flag is 1, RRC may be used, and in other cases, TSRC may be used.
[0229] Although the slice_ts_residual_coding_disabled_flag can be used to achieve high coding efficiency in certain applications (e.g., lossless coding, etc.), existing video / picture coding standards do not propose any restrictions on when the slice_ts_residual_coding_disabled_flag is used together with the dependent quantization. That is, when dependent quantization is activated in a high level (e.g., sequence parameter set (SPS) syntax / video parameter set (VPS) syntax / decoding parameter set (DPS) syntax / picture header syntax / slice header syntax, etc.) or a low level (CU / TU) and the slice_ts_residual_coding_disabled_flag is 1, a value depending on the state of dependent quantization in RRC may perform an unnecessary operation (i.e., an operation due to dependent quantization), resulting in degradation of coding performance or an unintended loss of coding performance due to incorrect setting in the encoding device. For this reason, in this embodiment, dependent quantization and residual coding when slice_ts_residual_coding_disabled_flag=1 (i.e., coding the residual samples of the transform skip block in the current slice by RRC) are used together, and a method for setting dependencies / constraints between the two technologies is proposed to prevent unintended coding losses or malfunctions.
[0230] As an embodiment, this document proposes a method in which slice_ts_residual_coding_disabled_flag is subordinate to ph_dep_quant_enabled_flag. For example, the syntax elements proposed in this embodiment may be as shown in the following table.
[0231] [Table 16]
[0232] According to this embodiment, the slice_ts_residual_coding_disabled_flag may be signaled when the value of the ph_dep_quant_enabled_flag is 0. Here, the ph_dep_quant_enabled_flag may indicate whether dependent quantization is enabled. For example, when the value of the ph_dep_quant_enabled_flag is 1, the ph_dep_quant_enabled_flag may indicate that dependent quantization is enabled, and when the value of the ph_dep_quant_enabled_flag is 0, the ph_dep_quant_enabled_flag may indicate that dependent quantization is not enabled.
[0233] Therefore, according to this embodiment, slice_ts_residual_coding_disabled_flag may be signaled only when the dependent quantization is not available, and when the dependent quantization is available and the slice_ts_residual_coding_disabled_flag is not signaled, the slice_ts_residual_coding_disabled_flag may be regarded as 0 (infer). Meanwhile, the ph_dep_quant_enabled_flag and the slice_ts_residual_coding_disabled_flag may be signaled in a picture header syntax and / or a slice header syntax, or may be signaled in a High Level Syntax (HLS) other than the picture header syntax and the slice header syntax (e.g., SPS syntax / VPS syntax / DPS syntax, etc.) or a low level (CU / TU). If the ph_dep_quant_enabled_flag is signaled in a syntax other than the picture header syntax, it may be called something else, for example, the ph_dep_quant_enabled_flag may be expressed as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or sps_dep_quant_enabled_flag.
[0234] Furthermore, this document proposes another embodiment for setting a dependency / constraint between dependent quantization and residual coding when slice_ts_residual_coding_disabled_flag=1 (i.e., coding residual samples of a transform skip block in the current slice by RRC). For example, this embodiment proposes a solution for not using the state of dependent quantization in coding the level values of transform coefficients when the value of slice_ts_residual_coding_disabled_flag is 1, in order to prevent unintended coding loss or malfunction when both dependent quantization and residual coding when slice_ts_residual_coding_disabled_flag=1 are used. The residual coding syntax according to this embodiment may be as shown in the following table.
[0235] [Table 17-1]
[0236] [Table 17-2]
[0237] [Table 17-3]
[0238] [Table 17-4]
[0239] [Table 17-5]
[0240] [Table 17-6]
[0241] Referring to Table 17 above, when the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, a QState may be derived, and a transform coefficient value (transform coefficient level) may be derived based on the QState. For example, referring to Table 17, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived as (2*AbsLevel[xC][yC]-(QState>11:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] is the absolute value of the transform coefficient derived based on the transform coefficient syntax element, coeff_sign_flag[n] is a syntax element of the sign flag indicating the sign of the transform coefficient, and (QState>1?1:0) can represent 1 if the value of the state QState is greater than 1, i.e., if the value of the state QState is 2 or 3, or 0 if the value of the state QState is 1 or less, i.e., if the value of the state QState is 0 or 1.
[0242] Also, referring to Table 17 above, when the value of slice_ts_residual_coding_disabled_flag is 1, the value of the transform coefficient (transform coefficient level) may be derived without using the QState. For example, referring to Table 17, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] is the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, and coeff_sign_flag[n] may be a syntax element of a sign flag indicating the sign of the transform coefficient.
[0243] Also, according to this embodiment, when the value of slice_ts_residual_coding_disabled_flag is 1, the dependent quantization state is not used in coding the level values of the transform coefficients, and the state update may not be performed. For example, the residual coding syntax according to this embodiment may be as shown in the following table.
[0244] [Table 18-1]
[0245] [Table 18-2]
[0246] [Table 18-3]
[0247] [Table 18-4]
[0248] [Table 18-5]
[0249] [Table 18-6]
[0250] Referring to Table 18 above, QState may be updated when the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0. For example, when the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, QState may be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. Also, when the value of slice_ts_residual_coding_disabled_flag is 1, the process of updating QState may not be performed.
[0251] Also, referring to Table 18 above, when the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, the value of the transform coefficient (transform coefficient level) may be derived based on the QState. For example, referring to Table 18, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived as (2*AbsLevel[xC][yC]-(QState>11:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] is the absolute value of the transform coefficient derived based on the transform coefficient syntax element, coeff_sign_flag[n] is a syntax element of the sign flag indicating the sign of the transform coefficient, and (QState>1?1:0) can represent 1 if the value of the state QState is greater than 1, i.e., if the value of the state QState is 2 or 3, and 0 if the value of the state QState is 1 or less, i.e., if the value of the state QState is 0 or 1.
[0252] Also, referring to Table 18 above, when the value of slice_ts_residual_coding_disabled_flag is 1, the value of the transform coefficient (transform coefficient level) may be derived without using the QState. For example, referring to Table 18, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] is the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, and coeff_sign_flag[n] may be a syntax element of a sign flag indicating the sign of the transform coefficient.
[0253] This document also proposes another embodiment for setting a dependency / constraint between dependent quantization and residual coding (i.e., coding residual samples of transform skip blocks in the current slice by RRC) when slice_ts_residual_coding_disabled_flag=1. For example, this embodiment proposes a scheme for adding a constraint using transform_skip_flag to the process of deriving values of transform coefficients (transform coefficient levels) depending on the state update or state of dependent quantization in RRC. That is, this embodiment proposes a scheme for disabling the process of deriving values of transform coefficients (transform coefficient levels) depending on the state update and / or state of dependent quantization in RRC based on the transform_skip_flag. The residual coding syntax according to this embodiment may be as shown in the following table.
[0254] [Table 19-1]
[0255] [Table 19-2]
[0256] [Table 19-3]
[0257] [Table 19-4]
[0258] [Table 19-5]
[0259] [Table 19-6]
[0260] Referring to Table 19 above, QState may be updated when the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0. For example, when the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, QState may be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. Also, when the value of transform_skip_flag is 1, the process of updating QState may not be performed.
[0261] Also, referring to Table 19 above, when the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, a QState may be derived, and a transform coefficient value (transform coefficient level) may be derived based on the QState. For example, referring to Table 19, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] is the absolute value of the transform coefficient derived based on the transform coefficient syntax element, coeff_sign_flag[n] is a syntax element of the sign flag indicating the sign of the transform coefficient, and (QState>1?1:0) can represent 1 if the value of the state QState is greater than 1, i.e., if the value of the state QState is 2 or 3, or 0 if the value of the state QState is 1 or less, i.e., if the value of the state QState is 0 or 1.
[0262] Also, referring to Table 19 above, when the value of transform_skip_flag is 1, the value of the transform coefficient (transform coefficient level) may be derived without using the QState. Therefore, when residual data by RRC is coded for a transform skip block, the value of the transform coefficient may be derived without using QState. For example, referring to Table 19, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] may be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] is the absolute value of the transform coefficient derived based on the syntax element of the transform coefficient, and coeff_sign_flag[n] may be a syntax element of a sign flag indicating the sign of the transform coefficient.
[0263] This document also proposes various embodiments related to the signaling of the above mentioned syntax element sh_ts_residual_coding_disabled_flag.
[0264] For example, as described above, sh_ts_residual_coding_disabled_flag is a syntax element that defines whether TSRC is unavailable, and therefore does not need to be signaled if transform skip blocks are not used. That is, it may be meaningful to signal sh_ts_residual_coding_disabled_flag only when a syntax element for whether transform skip blocks are used indicates that transform skip blocks are used.
[0265] Therefore, this document proposes an embodiment in which sh_ts_residual_coding_disabled_flag is signaled only when sps_transform_skip_enabled_flag is 1. The syntax according to this embodiment is as shown in the following table.
[0266] [Table 20]
[0267] Referring to Table 20, if sps_transform_skip_enabled_flag is 1, sh_ts_residual_coding_disabled_flag may be signaled, and if sps_transform_skip_enabled_flag is 0, sh_ts_residual_coding_disabled_flag may not be signaled. Here, for example, the sps_transform_skip_enabled_flag may indicate whether a transform skip block is used. That is, for example, the sps_transform_skip_enabled_flag may indicate whether transform skip is enabled. For example, if the value of the sps_transform_skip_enabled_flag is 1, the sps_transform_skip_enabled_flag may indicate that a transform skip flag may exist in the transform unit syntax, and if the value of the sps_transform_skip_enabled_flag is 0, the sps_transform_skip_enabled_flag may indicate that a transform skip flag does not exist in the transform unit syntax. On the other hand, if the sh_ts_residual_coding_disabled_flag is not signaled, the sh_ts_residual_coding_disabled_flag may be inferred as 0. Furthermore, the above-mentioned sps_transform_skip_enabled_flag may be signaled in the SPS, or may be signaled in other high-level syntaxes (VPS, PPS, picture header syntax, slice header syntax, etc.) or low-level syntaxes (slice data syntax, coding unit syntax, transform unit syntax, etc.) other than the SPS.It may also be signaled prior to slice_ts_residual_coding_disabled_flag.
[0268] This document also proposes an embodiment that combines the above-mentioned embodiments in relation to signaling sh_ts_residual_coding_disabled_flag. For example, an embodiment that signals sh_ts_residual_coding_disabled_flag as shown in the following table may be proposed.
[0269] [Table 21]
[0270] Referring to Table 21, if sps_transform_skip_enabled_flag is 1 or ph_dep_quant_enabled_flag is 0, sh_ts_residual_coding_disabled_flag may be signaled, otherwise sh_ts_residual_coding_disabled_flag may not be signaled. On the other hand, if sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be inferred as 0.
[0271] Alternatively, for example, an embodiment may be proposed in which sh_ts_residual_coding_disabled_flag is signaled as shown in the following table.
[0272] [Table 22]
[0273] Referring to Table 22, sh_ts_residual_coding_disabled_flag may be signaled in the picture header. The sh_ts_residual_coding_disabled_flag may be expressed as ph_ts_residual_coding_disabled_flag. Also referring to Table 22, ph_dep_quant_enabled_flag may be signaled in the picture header.
[0274] For example, referring to Table 22, if ph_dep_quant_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 may not be signaled. On the other hand, if ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag may be inferred as 0.
[0275] Meanwhile, in relation to the syntax elements described in the embodiments of this document, in existing video / picture coding standards, the ph_dep_quant_enabled_flag may be signaled in a picture header syntax, and the sh_ts_residual_coding_disabled_flag may be signaled in a slice header syntax. In this regard, this document proposes an embodiment in which both syntax elements are signaled in the same high-level syntax or low-level syntax.
[0276] For example, an embodiment may be proposed in which both the ph_dep_quant_enabled_flag and the sh_ts_residual_coding_disabled_flag are signaled in the picture header syntax, in which case the sh_ts_residual_coding_disabled_flag may be referred to as ph_ts_residual_coding_disabled_flag.
[0277] Alternatively, for example, an embodiment may be proposed in which both the ph_dep_quant_enabled_flag and the sh_ts_residual_coding_disabled_flag are signaled in a slice header syntax, in which case the ph_dep_quant_enabled_flag may be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, slice_dep_quant_enabled_flag, or the like.
[0278] Alternatively, for example, an embodiment may be proposed in which both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS, but the ph_ts_residual_coding_disabled_flag is signaled only if the value of the ph_dep_quant_enabled_flag is 0. For example, an example in which both the ph_dep_quant_enabled_flag and the ph_ts_residual_coding_disabled_flag are signaled in the picture header syntax may be as shown in the following table.
[0279] [Table 23]
[0280] Referring to Table 23, the ph_dep_quant_enabled_flag may be signaled in the picture header syntax, and if the value of the ph_dep_quant_enabled_flag is 0, the ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax, and if the value of the ph_dep_quant_enabled_flag is 1, the ph_ts_residual_coding_disabled_flag may not be signaled. For example, if the ph_ts_residual_coding_disabled_flag is not signaled, the ph_ts_residual_coding_disabled_flag may be inferred as 0.
[0281] Meanwhile, as an example of the above-mentioned embodiment, an example may be proposed in which the ph_dep_quant_enabled_flag and the ph_ts_residual_coding_disabled_flag are signaled in a high-level syntax other than the picture header syntax (VPS, SPS, PPS, slice header syntax, etc.) or a low-level syntax (slice data syntax, coding unit syntax, transform unit syntax, etc.).
[0282] Also, for example, an embodiment may be proposed in which both ph_ts_residual_coding_disabled_flag and ph_dep_quant_enabled_flag are signaled in the same HLS, but the ph_dep_quant_enabled_flag is signaled only if the value of the ph_ts_residual_coding_disabled_flag is 0.
[0283] [Table 24]
[0284] Referring to Table 24, the ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax, and if the value of the ph_ts_residual_coding_disabled_flag is 0, the ph_dep_quant_enabled_flag may be signaled in the picture header syntax, and if the value of the ph_ts_residual_coding_disabled_flag is 1, the ph_dep_quant_enabled_flag may not be signaled. For example, if the ph_dep_quant_enabled_flag is not signaled, the ph_dep_quant_enabled_flag may be inferred as 0.
[0285] Meanwhile, the above-mentioned embodiment may, as an example, be proposed in which the ph_ts_residual_coding_disabled_flag and the ph_dep_quant_enabled_flag are signaled in other high-level syntax (VPS, SPS, PPS, slice header syntax, etc.) or low-level syntax (slice data syntax, coding unit syntax, transform unit syntax, etc.) other than picture header syntax.
[0286] Also, for example, an embodiment combining the above-mentioned embodiments may be proposed, such as an embodiment in which both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS, but the ph_ts_residual_coding_disabled_flag is signaled only if the value of the ph_dep_quant_enabled_flag is 0 or the value of the sps_transform_skip_enabled_flag is 1.
[0287] [Table 25]
[0288] Referring to Table 25, the ph_dep_quant_enabled_flag may be signaled in the picture header syntax, and if the value of the ph_dep_quant_enabled_flag is 0 or the value of the sps_transform_skip_enabled_flag is 1, the ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax; otherwise, the ph_ts_residual_coding_disabled_flag may not be signaled. Here, for example, the sps_transform_skip_enabled_flag may indicate whether a transform skip block is used. That is, for example, the sps_transform_skip_enabled_flag may indicate whether transform skip is enabled. For example, if the value of the sps_transform_skip_enabled_flag is 1, the sps_transform_skip_enabled_flag may indicate that a transform skip flag may be present in the transform unit syntax, and if the value of the sps_transform_skip_enabled_flag is 0, the sps_transform_skip_enabled_flag may indicate that a transform skip flag is not present in the transform unit syntax. For example, if the ph_ts_residual_coding_disabled_flag is not signaled, the ph_ts_residual_coding_disabled_flag may be inferred to be 0.
[0289] Also, for example, an embodiment may be proposed in which both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS (e.g., slice header syntax), but the ph_ts_residual_coding_disabled_flag is signaled only when the value of the ph_dep_quant_enabled_flag is 0 and the value of the sps_transform_skip_enabled_flag is 1.
[0290] [Table 26]
[0291] Referring to Table 26, the ph_dep_quant_enabled_flag may be signaled in the picture header syntax, and the ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax if the value of the ph_dep_quant_enabled_flag is 0 and the value of the sps_transform_skip_enabled_flag is 1; otherwise, the ph_ts_residual_coding_disabled_flag may not be signaled. For example, if the ph_ts_residual_coding_disabled_flag is not signaled, the ph_ts_residual_coding_disabled_flag may be inferred as 0.
[0292] Also, for example, an embodiment may be proposed in which both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS, but the ph_ts_residual_coding_disabled_flag is signaled only when the value of the sps_transform_skip_enabled_flag is 1, and the ph_dep_quant_enabled_flag is signaled only when the value of the ph_ts_residual_coding_disabled_flag is 0.
[0293] [Table 27]
[0294] Referring to Table 27, if the value of the sps_transform_skip_enabled_flag is 1, the ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax, and if the value of the ph_ts_residual_coding_disabled_flag is 0, the ph_dep_quant_enabled_flag may be signaled in the picture header syntax. For example, if the value of the sps_transform_skip_enabled_flag is 0, the ph_ts_residual_coding_disabled_flag may not be signaled. For example, if the ph_ts_residual_coding_disabled_flag is not signaled, the ph_ts_residual_coding_disabled_flag may be inferred as 0. Also, for example, the ph_dep_quant_enabled_flag may not be signaled when the value of the ph_ts_residual_coding_disabled_flag is 1. For example, when the ph_dep_quant_enabled_flag is not signaled, the ph_dep_quant_enabled_flag may be inferred as 0.
[0295] Meanwhile, as described above, the information in the syntax table (syntax elements) disclosed in this document may be included in image / video information, may be constructed / encoded by an encoding device, and may be transmitted to a decoding device in the form of a bitstream. The decoding device may parse / decode the information in the corresponding syntax table (syntax elements). The decoding device may perform a block / image / video restoration procedure based on the decoded information.
[0296] This document also proposes various embodiments related to the signaling of the above mentioned syntax element sh_ts_residual_coding_disabled_flag.
[0297] For example, as mentioned above, the slice_ts_residual_coding_disabled_flag can be used to achieve high coding efficiency in certain applications (e.g., lossless coding, etc.), but existing video / image coding standards do not propose any restrictions on when Sign Data Hiding (SDH) is used with the slice_ts_residual_coding_disabled_flag.
[0298] Here, the sign data omission method may be as follows: When deriving a transform coefficient, the sign of the transform coefficient may be derived based on a 1-bit sign flag (the above-mentioned syntax element coeff_sign_flag). In this regard, SDH may indicate a technique for omitting explicit signaling of coeff_sign_flag for the first significant transform coefficient in a sub-block / coefficient group (CG) to improve coding efficiency. Here, the value of coeff_sign_flag for the first significant transform coefficient may be derived based on the sum of the absolute levels (i.e., absolute values) of the significant transform coefficients in the corresponding sub-block / coefficient group. That is, the sign of the first significant transform coefficient may be derived based on the sum of the absolute levels for the significant transform coefficients in the corresponding sub-block / coefficient group. Meanwhile, a significant transform coefficient may refer to a transform coefficient whose (absolute) value is not zero (non-zero transform coefficient). For example, if the sum of absolute levels for the significant transform coefficients is even, the value of coeff_sign_flag for the first significant transform coefficient may be derived as 1, and if the sum of absolute levels for the significant transform coefficients is odd, the value of coeff_sign_flag for the first significant transform coefficient may be derived as 0. In other words, if the sum of absolute levels for the significant transform coefficients is even, the sign for the first significant transform coefficient may be derived as a negative value, and if the sum of absolute levels for the significant transform coefficients is odd, the sign for the first significant transform coefficient may be derived as a positive value. Or, for example, if the sum of absolute levels for the valid transform coefficients is even, the value of coeff_sign_flag for the first valid transform coefficient may be derived as 0, and if the sum of absolute levels for the valid transform coefficients is odd, the value of coeff_sign_flag for the first valid transform coefficient may be derived as 1.In other words, for example, if the sum of the absolute levels for the significant transform coefficients is even, the sign for the first significant transform coefficient may be derived as a positive value, and if the sum of the absolute levels for the significant transform coefficients is odd, the sign for the first significant transform coefficient may be derived as a negative value.
[0299] For example, the SDH in residual syntax can be shown as in the following table.
[0300] [Table 28]
[0301] Referring to Table 28, the variable signHiddenFlag may indicate whether the SDH is applied. The variable signHiddenFlag may be referred to as signHidden. For example, when the value of the variable signHiddenFlag is 0, the variable signHiddenFlag may indicate that the SDH is not applied, and when the value of the variable signHiddenFlag is 1, the variable signHiddenFlag may indicate that the SDH is applied. For example, the value of the variable signHiddenFlag may be set based on signaled flag information (e.g., sh_sign_data_hiding_used_flag, 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 may indicate the last valid transform coefficient position searched for in the corresponding sub-block / coefficient group according to the scan order, and firstSigScanPosSb may indicate the first valid transform coefficient position searched for in the corresponding sub-block / coefficient group according to the scan order. Generally, lastSigScanPosSb may be located in a higher frequency component region than firstSigScanPosSb. Therefore, if lastSigScanPosSb-firstSigScanPosSb is greater than a predetermined threshold, the signHidden value may be derived as 1 (i.e., SDH is applied), and otherwise the signHidden value may be derived as 0 (i.e., SDH is not applied). Here, for example, referring to Table 28, the threshold may be set to 3.
[0302] Meanwhile, when the sign data hiding is activated in a high-level syntax (e.g., VPS, SPS, PPS, slice header syntax, etc.) or a low-level syntax (e.g., slice data syntax, coding unit syntax, transform unit syntax, etc.) and the slice_ts_residual_coding_disabled_flag is set to 1, the RRC sign data hiding process may be used for lossless coding. Therefore, lossless coding may be impossible due to incorrect settings in the encoding device. Alternatively, when lossy coding (i.e., a lossy coding method) is applied instead of lossless coding, and a residual signal to which a transform skip is applied is coded by RRC and BDPCM is applied at the same time, BDPCM may cause more intervals in which the residual value becomes 0 due to a difference between residuals than in a general case, but coding loss may occur because SDH is performed in accordance with SDH application conditions. Specifically, for example, if valid transform coefficients (non-zero residual data) exist at positions 0 and 15 in a 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 SDH application conditions described above. Therefore, sign data (i.e., coding of a 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 the only two residual data in the CG may be adjusted during quantization, which may result in more coding loss than when SDH is not applied. This case may also occur in blocks to which BDPCM is not applied, but due to the characteristics of BDPCM, the level is lowered depending on the difference with surrounding residuals, which may make it more difficult to apply SDH.
[0303] Therefore, this document proposes an embodiment that sets dependencies / constraints between SDH and residual coding when slice_ts_residual_coding_disabled_flag=1 (i.e., coding residual samples of transform skip blocks in the current slice by RRC) to prevent unintended coding losses or malfunctions when both technologies are used.
[0304] For example, this embodiment proposes a scheme in which slice_ts_residual_coding_disabled_flag is subordinate to pic_sign_data_hiding_enabled_flag. The residual coding syntax according to this embodiment may be as shown in the following table.
[0305] [Table 29]
[0306] Here, slice_ts_residual_coding_disabled_flag may be signaled in the slice header syntax, or may be signaled in other high level syntax (HLS) (e.g., SPS syntax / VPS syntax / DPS syntax, etc.) or low level (CU / TU) other than the slice header syntax. Also, pic_sign_data_hiding_enabled_flag may be signaled in the picture header syntax, or may be signaled in other high level syntax (HLS) (e.g., SPS syntax / VPS syntax / DPS syntax, etc.) or low level (CU / TU). For example, when the pic_sign_data_hiding_enabled_flag is signaled in a syntax other than the picture header syntax, it may be given a different name. For example, the pic_sign_data_hiding_enabled_flag may be expressed as sps_sign_data_hiding_enabled_flag.
[0307] Furthermore, sps_sign_data_hiding_enabled_flag may be a flag indicating whether sign data hiding is enabled. That is, for example, sps_sign_data_hiding_enabled_flag may indicate whether the sign data hiding is enabled. For example, when the value of sps_sign_data_hiding_enabled_flag is 1, sps_sign_data_hiding_enabled_flag may indicate that the sign data hiding is enabled, and when the value of sps_sign_data_hiding_enabled_flag is 0, sps_sign_data_hiding_enabled_flag may indicate that the sign data hiding is not enabled.
[0308] According to Table 29 disclosing this embodiment, slice_ts_residual_coding_disabled_flag may be signaled only when sign data hiding is not available. Also, when sign data hiding is available, slice_ts_residual_coding_disabled_flag may not be signaled, and the value of slice_ts_residual_coding_disabled_flag may be inferred as 0 (residual samples of transform skip blocks in the current slice are coded using the TSRC syntax) or 1 (residual samples of transform skip blocks in the current slice are coded using the RRC syntax).
[0309] In addition, this document proposes an embodiment that combines the above-described embodiments in relation to the signaling of sh_ts_residual_coding_disabled_flag. For example, an embodiment that signals sh_ts_residual_coding_disabled_flag as shown in the following table may be proposed.
[0310] [Table 30]
[0311] Referring to Table 30, if sps_transform_skip_enabled_flag is 1, ph_dep_quant_enabled_flag is 0, and pic_sign_data_hiding_enabled_flag is 0, sh_ts_residual_coding_disabled_flag may be signaled, otherwise sh_ts_residual_coding_disabled_flag may not be signaled. On the other hand, if sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be considered (infer) to be 0.
[0312] Meanwhile, the example in Table 30 is merely an example, and an example may be proposed in which ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and ph_ts_residual_coding_disabled_flag are all signaled in the same HLS (e.g., slice header syntax, etc.).
[0313] Alternatively, for example, an embodiment may be proposed in which sh_ts_residual_coding_disabled_flag is signaled as shown in the following table.
[0314] [Table 31]
[0315] Referring to Table 31, if ph_dep_quant_enabled_flag is 0 and pic_sign_data_hiding_enabled_flag is 0, sh_ts_residual_coding_disabled_flag may be signaled, otherwise sh_ts_residual_coding_disabled_flag may not be signaled. On the other hand, if sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be inferred as 0.
[0316] Meanwhile, the example in Table 31 is merely an example, and an example may be proposed in which ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and ph_ts_residual_coding_disabled_flag are all signaled in the same HLS (e.g., slice header syntax, etc.).
[0317] Alternatively, for example, an embodiment may be proposed in which sh_ts_residual_coding_disabled_flag is signaled as shown in the following table.
[0318] [Table 32]
[0319] Referring to Table 32, if ph_dep_quant_enabled_flag is 0 or pic_sign_data_hiding_enabled_flag is 0, sh_ts_residual_coding_disabled_flag may be signaled, otherwise sh_ts_residual_coding_disabled_flag may not be signaled. On the other hand, if sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag may be inferred as 0.
[0320] This document also proposes an embodiment in which the above mentioned syntax elements ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag and slice_ts_residual_coding_disabled_flag are signaled in the same high-level syntax or in the same low-level syntax.
[0321] For example, an embodiment may be proposed in which ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and slice_ts_residual_coding_disabled_flag are all signaled in the picture header syntax, as shown in the following table.
[0322] [Table 33]
[0323] In this case, the slice_ts_residual_coding_disabled_flag can be called ph_ts_residual_coding_disabled_flag.
[0324] Referring to Table 33, ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax, and when the value of ph_ts_residual_coding_disabled_flag is 0 and the value of sps_dep_quant_enabled_flag is 1, ph_dep_quant_enabled_flag may be signaled in the picture header syntax. Also, when the value of ph_ts_residual_coding_disabled_flag is 0, and the value of sps_sign_data_hiding_enabled_flag is 1 and ph_dep_quant_enabled_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, ph_dep_quant_enabled_flag and pic_sign_data_hiding_enabled_flag may not be signaled.
[0325] Alternatively, for example, an embodiment may be proposed in which ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and slice_ts_residual_coding_disabled_flag are all signaled in the picture header syntax, as shown in the following table.
[0326] [Table 34]
[0327] Referring to Table 34, ph_ts_residual_coding_disabled_flag may be signaled in the picture header syntax when the value of sps_transform_skip_enabled_flag is 1. Also, for example, ph_ts_residual_coding_disabled_flag may not be signaled when the value of sps_transform_skip_enabled_flag is 0. When ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag may be inferred as 0 in the decoding device.
[0328] Also, referring to Table 34, when the value of ph_ts_residual_coding_disabled_flag is 0 and the value of sps_dep_quant_enabled_flag is 1, ph_dep_quant_enabled_flag may be signaled in the picture header syntax. Also, when the value of ph_ts_residual_coding_disabled_flag is 0, when the value of sps_sign_data_hiding_enabled_flag is 1 and ph_dep_quant_enabled_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, ph_dep_quant_enabled_flag and pic_sign_data_hiding_enabled_flag may not be signaled. Also, for example, if ph_dep_quant_enabled_flag is not signaled, ph_dep_quant_enabled_flag may be inferred as 0 in the decoding device. Also, for example, if pic_sign_data_hiding_enabled_flag is not signaled, pic_sign_data_hiding_enabled_flag may be inferred as 0 in the decoding device.
[0329] Meanwhile, the above-mentioned embodiments are merely examples, and examples may be proposed in which ph_ts_residual_coding_disabled_flag, ph_dep_quant_enabled_flag, and pic_sign_data_hiding_enabled_flag are signaled in other high-level syntax (VPS, SPS, PPS, slice header syntax, etc.) or low-level syntax (slice data syntax, coding unit syntax, transform unit syntax, etc.) other than picture header syntax.
[0330] Meanwhile, as described above, the information (syntax elements) in the syntax tables disclosed herein may be included in image / video information, may be constructed / encoded by an encoding device, and may be transmitted to a decoding device in the form of a bitstream. The decoding device may parse / decode the information (syntax elements) in the syntax tables. The decoding device may perform a block / image / video restoration procedure based on the decoded information.
[0331] FIG. 8 schematically illustrates a video encoding method by an encoding apparatus according to the present disclosure. The method disclosed in FIG. 8 may be performed by the encoding apparatus disclosed in FIG. 2. Specifically, for example, steps S800 to S830 of FIG. 8 may be performed by an entropy encoding unit of the encoding apparatus. Also, although not shown, the process of deriving predicted samples may be performed by a prediction unit of the encoding apparatus, the process of deriving residual samples for the current block based on original samples and predicted samples for the current block may be performed by a subtraction unit of the encoding apparatus, and the process of generating reconstructed samples and reconstructed pictures for the current block based on the residual samples and predicted samples for the current block may be performed by an addition unit of the encoding apparatus.
[0332] The encoding apparatus encodes a sign data hiding availability flag indicating whether sign data hiding is available for a current slice (S800). The encoding apparatus may encode the sign data hiding availability flag indicating whether sign data hiding is available. The video information may include the sign data hiding availability flag. For example, the encoding apparatus may determine whether sign data hiding is available for a block of a picture in a sequence and encode a sign data hiding availability flag indicating whether sign data hiding is available. For example, the sign data hiding availability flag may be a flag indicating whether sign data hiding is available. For example, the sign data hiding availability flag may indicate whether sign data hiding is available. That is, for example, the sign data hiding availability flag may indicate whether sign data hiding is available for a block of a picture in a sequence. For example, the sign data hiding available flag may indicate whether a sign data hiding use flag indicating whether sign data hiding is used for the current slice is present. For example, the sign data hiding available flag having a value of 1 may indicate that the sign data hiding is available, and the sign data hiding available flag having a value of 0 may indicate that the sign data hiding is not available. For example, the sign data hiding available flag having a value of 1 may indicate that the sign data hiding use flag is present, and the sign data hiding available flag having a value of 0 may indicate that the sign data hiding use flag is not present. Also, for example, the sign data hiding available flag may be signaled using a Sequence Parameter Set (SPS) syntax.Alternatively, for example, the sign data hiding enabled flag may be signaled in a picture header syntax or a slice header syntax. The syntax element for the sign data hiding enabled flag may be sps_sign_data_hiding_enabled_flag as described above.
[0333] The encoding apparatus encodes a TSRC availability flag indicating whether Transform Skip Residual Coding (TSRC) is available based on the sign data hiding availability flag (S810). The video information may include a TSRC availability flag.
[0334] For example, the encoding device may encode the TSRC available flag based on the sign data hiding available flag. For example, the TSRC available flag may be encoded based on the sign data hiding available flag having a value of 0. That is, for example, when the value of the sign data hiding available flag is 0 (i.e., when the sign data hiding available flag indicates that sign data hiding is not available), the TSRC available flag may be encoded. In other words, for example, when the value of the sign data hiding available flag is 0 (i.e., when the sign data hiding available flag indicates that sign data hiding is not available), the TSRC available flag may be signaled. Also, for example, when the value of the sign data hiding available flag is 1, the TSRC available flag may not be encoded, and the value of the TSRC available flag may be derived as 0 in the decoding device. That is, for example, if the value of the sign data hiding available flag is 1, the TSRC available flag may not be signaled, and the value of the TSRC available flag may be derived as 0 in a decoding device.
[0335] 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 a block in a slice. For example, the TSRC availability flag having a value of 1 may indicate that the TSRC is not available, and the TSRC availability flag having a value of 0 may indicate that the TSRC is available. Also, for example, the TSRC availability flag may be signaled in a slice header syntax. A syntax element of the TSRC availability flag may be the above-mentioned sh_ts_residual_coding_disabled_flag.
[0336] Meanwhile, for example, an encoding apparatus may determine whether dependent quantization is available for a block of a picture in a sequence and encode a dependent quantization available flag indicating whether dependent quantization is available. The video information may include the dependent quantization available flag. For example, the dependent quantization available flag may be a flag indicating whether dependent quantization is available. For example, the dependent quantization available flag may indicate whether dependent quantization is available. That is, for example, the dependent quantization available flag may indicate whether dependent quantization is available for a block of a picture in a sequence. For example, the dependent quantization available flag may indicate whether a dependent quantization use flag indicating whether dependent quantization is used for a current slice is present. For example, a value of 1 of the dependent quantization enabled flag may indicate that the dependent quantization is enabled, and a value of 0 of the dependent quantization enabled flag may indicate that the dependent quantization is not enabled. Also, for example, the dependent quantization enabled flag may be signaled in an SPS syntax or a slice header syntax. The syntax element of the dependent quantization enabled flag may be the above-mentioned sps_dep_quant_enabled_flag. The sps_dep_quant_enabled_flag may be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.
[0337] Furthermore, for example, the encoding apparatus may encode a transform skip availability flag indicating whether a transform skip is available. The video information may include a transform skip availability flag. For example, the encoding apparatus may determine whether a transform skip is available for a block of a picture in a sequence, and encode a transform skip availability flag indicating whether a transform skip is available. For example, the transform skip availability flag may be a flag indicating whether a transform skip is available. For example, the transform skip availability flag may indicate whether a transform skip is available for a block of a picture in a sequence. For example, the transform skip availability flag may indicate whether a transform skip flag is present. For example, the transform skip availability flag having a value of 1 may indicate that the transform skip is available, and the transform skip availability flag having a value of 0 may indicate that the transform skip is not available. That is, for example, the transform skip enabled flag having a value of 1 may indicate that the transform skip flag is present, and the transform skip enabled flag having a value of 0 may indicate that the transform skip flag is not present. Also, for example, the transform skip enabled flag may be signaled using a Sequence Parameter Set (SPS) syntax. The syntax element of the transform skip enabled flag may be the above-mentioned sps_transform_skip_enabled_flag.
[0338] Furthermore, for example, the TSRC available flag may be encoded based on the sign data hiding available flag, the dependent quantization available flag, and / or the transform skip available flag. For example, the TSRC available flag may be encoded based on the sign data hiding available flag having a value of 0, the dependent quantization available flag having a value of 0, and the transform skip available flag having a value of 1. That is, for example, the TSRC available flag may be encoded (or signaled) when the sign data hiding available flag has a value of 0 (i.e., the sign data hiding available flag indicates that sign data hiding is not available), the dependent quantization available flag has a value of 0 (i.e., the dependent quantization available flag indicates that dependent quantization is not available), and the transform skip available flag has a value of 1 (i.e., the transform skip available flag indicates that the transform skip is available). Also, for example, when the value of the dependent quantization available flag is 1, the TSRC available flag may not be encoded, and the value of the TSRC available flag may be derived as 0 in a decoding device. That is, for example, when the value of the dependent quantization available flag is 1, the TSRC available flag may not be signaled, and the value of the TSRC available flag may be derived as 0 in a decoding device. Also, for example, when the value of the transform skip available flag is 0, the TSRC available flag may not be encoded, and the value of the TSRC available flag may be derived as 0. That is, for example, when the value of the transform skip available flag is 0, the TSRC available flag may not be signaled, and the value of the TSRC available flag may be derived as 0.
[0339] The encoding apparatus encodes residual information for the current block based on the TSRC availability flag (S820). The encoding apparatus can encode residual information for the current block based on the TSRC availability flag.
[0340] For example, the encoding apparatus may determine a residual coding syntax for the current block based on the TSRC availability flag. For example, the encoding apparatus may determine the residual coding syntax for the current block to be one of a Regular Residual Coding (RRC) syntax and a Transform Skip Residual Coding (TSRC) syntax based on the TSRC availability flag. The RRC syntax may represent a syntax according to the RRC, and the TSRC syntax may represent a syntax according to the TSRC.
[0341] For example, based on the TSRC availability flag having a value of 1, the residual coding syntax for the current block may be determined to be Regular Residual Coding (RRC) syntax. In this case, for example, a transform skip flag indicating whether to skip a transform of the current block may be encoded, and the value of the transform skip flag may be 1. For example, the video information may include a transform skip flag for the current block. The transform skip flag may indicate whether a transform of the current block is skipped. That is, the transform skip flag may indicate whether a transform has been applied to transform coefficients of the current block. A syntax element indicating the transform skip flag may be the above-mentioned transform_skip_flag. For example, if the transform skip flag has a value of 1, the transform skip flag may indicate that no transform is applied to the current block (i.e., that the transform is skipped), and if the transform skip flag has a value of 0, the transform skip flag may indicate that a transform is applied to the current block. For example, if the current block is a transform skip block, the transform skip flag for the current block may have a value of 1.
[0342] Furthermore, for example, based on the TSRC availability flag being a value of 0, the residual coding syntax for the current block may be determined to be a Transform Skip Residual Coding (TSRC) syntax. Also, for example, a transform skip flag indicating whether the transform of the current block is skipped may be encoded, and based on the transform skip flag being a value of 1 and the TSRC availability flag being a value of 0, the residual coding syntax for the current block may be determined to be a Transform Skip Residual Coding (TSRC) syntax. Also, for example, a transform skip flag indicating whether the transform of the current block is skipped may be encoded, and based on the transform skip flag being a value of 0 and the TSRC availability flag being a value of 0, the residual coding syntax for the current block may be determined to be a Regular Residual Coding (RRC) syntax.
[0343] Thereafter, for example, an encoding apparatus may encode residual information of the determined residual coding syntax for the current block. The encoding apparatus may derive residual samples for the current block and encode the residual information of the determined residual coding syntax for the residual samples of the current block. For example, residual information of a Regular Residual Coding (RRC) syntax may be encoded based on the TSRC availability flag having a value of 1, and residual information of a TSRC syntax may be encoded based on the TSRC availability flag having a value of 0. The video information may include residual information.
[0344] For example, the encoding apparatus may determine whether to perform inter prediction or intra prediction on the current block, and may determine a specific inter prediction mode or a specific intra prediction mode based on the RD cost. Depending on the determined mode, the encoding apparatus may derive predicted samples for the current block and derive residual samples for the current block by subtracting the predicted samples from original samples for the current block.
[0345] Thereafter, for example, the encoding device may derive transform coefficients of the current block based on the residual samples. For example, the encoding device may determine whether a transform is applied to the current block. That is, the encoding device may determine whether a transform is applied to the residual samples of the current block. The encoding device may determine whether a transform is applied to the current block in consideration of coding efficiency. For example, the encoding device may determine that a transform is not applied to the current block. The block to which a transform is not applied may be referred to as a transform skip block. That is, for example, the current block may be a transform skip block.
[0346] When a transform is not applied to the current block, i.e., when a transform is not applied to the residual sample, the encoding apparatus may derive the derived residual sample as the current transform coefficient. When a transform is applied to the current block, i.e., when a transform is applied to the residual sample, the encoding apparatus may derive the transform coefficient by performing a transform on the residual sample. The current block may include a plurality of sub-blocks or coefficient groups (CG). Furthermore, the size of the sub-blocks of the current block may be 4x4 or 2x2. That is, the sub-blocks of the current block may include up to 16 non-zero transform coefficients or up to 4 non-zero transform coefficients. Here, the current block may be a coding block (CB) or a transform block (TB). Transform coefficients may also be referred to as residual coefficients.
[0347] Meanwhile, an encoding apparatus may determine whether dependent quantization is applied to the current block. For example, if dependent quantization is applied to the current block, the encoding apparatus may perform the dependent quantization process on the transform coefficients to derive the transform coefficients of the current block. For example, if dependent quantization is applied to the current block, the encoding apparatus may update a state (Qstate) for dependent quantization based on a coefficient level of a transform coefficient immediately preceding the current transform coefficient in scanning order, derive a coefficient level of the current transform coefficient based on the updated state and a syntax element for the current transform coefficient, and quantize the derived coefficient level to derive the current transform coefficient. For example, the current transform coefficient may be quantized based on a quantization parameter for a restoration level of the current transform coefficient in a scalar quantizer for the updated state.
[0348] For example, if the residual coding syntax for the current block is derived from the RRC syntax, the encoding apparatus may encode residual information of the RRC syntax for the current block. For example, the residual information of the RRC syntax may include syntax elements disclosed in Table 2 above.
[0349] For example, the residual information of the RRC syntax may include a syntax element for a transform coefficient of the current block, where the transform coefficient may also be referred to as a residual coefficient.
[0350] For example, the syntax elements may include syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1]), abs_remainder, dec_abs_level, and / or coeff_sign_flag.
[0351] Specifically, for example, the syntax element may include position information indicating the position of the last non-zero transform coefficient in a residual coefficient array of the current block. That is, the syntax element may include position information indicating the position of the last non-zero transform coefficient in a scanning order of the current block. The position information may include information indicating a prefix of a column position of the last non-zero transform coefficient, information indicating a prefix of a row position of the last non-zero transform coefficient, information indicating a suffix of a column position of the last non-zero transform coefficient, and information indicating a suffix of a 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. Meanwhile, non-zero transform coefficients may also be called significant coefficients.
[0352] Further, for example, the syntax element may include a coded sub-block flag indicating whether the current sub-block of the current block includes a non-zero transform coefficient, a significant coefficient flag indicating whether the transform coefficient of the current block is a non-zero transform coefficient, a first coefficient level flag indicating whether the coefficient level for the transform coefficient is greater than a first critical 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 critical value. Here, the coded sub-block flag may be sb_coded_flag or coded_sub_block_flag, the significant coefficient flag may be sig_coeff_flag, the first coefficient level flag may be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag may be par_level_flag, and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
[0353] Also, for example, the syntax element may include coefficient value related information for values of the transform coefficients of the current block, which may be abs_remainder and / or dec_abs_level.
[0354] Also, for example, the syntax element may include a sign flag indicating the sign of the transform coefficient, and the sign flag may be coeff_sign_flag.
[0355] Meanwhile, for example, when the sign data hiding is applied to the current block, the sign flag of the first valid transform coefficient of a current coefficient group (CG) in the current block may not be encoded or signaled. That is, for example, when the sign data hiding is applied to the current block, the syntax element may not include a sign flag indicating the sign of the first valid transform coefficient. Meanwhile, for example, whether the sign data hiding is applied to the current block may be determined based on the sign data hiding available flag and / or the first valid transform coefficient position and the last valid transform coefficient position of the current CG. For example, when the sign data hiding available flag is 1 and the value obtained by subtracting the first valid transform coefficient position from the last valid transform coefficient position is greater than 3 (i.e., when the sign data hiding available flag is 1 and the number of valid transform coefficients in the current CG is greater than 3), the sign data hiding may be applied to the current CG of the current block.
[0356] Furthermore, for example, if the residual coding syntax for the current block is determined to be the TSRC syntax, the encoding apparatus may encode residual information of the TSRC syntax for the current block. For example, the residual information of the TSRC syntax may include the syntax elements disclosed in Table 3 above.
[0357] For example, the residual information of the TSRC syntax may include syntax elements for transform coefficients of the current block, where the transform coefficients may also be referred to as residual coefficients.
[0358] For example, the syntax elements may include context-coded syntax elements and / or bypass-coded syntax elements for transform coefficients. The syntax elements may include syntax elements such as sig_coeff_flag, coeff_sign_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and / or abs_level_gtx_flag[n][4]), abs_remainder, and / or coeff_sign_flag.
[0359] For example, the context-coded syntax element for the transform coefficient may include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a sign flag indicating the sign of the transform coefficient, a first coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a first critical value, and / or a parity level flag indicating the parity of the coefficient level of the transform coefficient. Also, for example, the context-coded syntax element may include a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second critical value, a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third critical value, a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth critical value, and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth critical value. Here, the significance 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, the parity level flag may be par_level_flag, 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.
[0360] Also, for example, the bypass-coded syntax element for the transform coefficient may include coefficient level information for the value (or coefficient level) of the transform coefficient and / or a sign flag indicating a sign for the transform coefficient. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be coeff_sign_flag.
[0361] The encoding apparatus generates a bitstream including the sign data hiding available flag, the TSRC available flag, and the residual information (S830). For example, the encoding apparatus may output video information including the sign data hiding available flag, the TSRC available flag, and the residual information as a bitstream. The bitstream may include the sign data hiding available flag, the TSRC available flag, and the residual information. The bitstream may further include the dependent quantization available flag and / or the transform skip available flag.
[0362] Meanwhile, the image information may include prediction-related information for the current block, which may include prediction mode information for an inter prediction mode or an intra prediction mode performed on the current block.
[0363] Meanwhile, the bitstream may be transmitted to the decoding device via a network or a (digital) storage medium, where the network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.
[0364] FIG. 9 schematically illustrates an encoding device that performs the video encoding method according to the present document. The method disclosed in FIG. 8 may be performed by the encoding device disclosed in FIG. 9. Specifically, for example, the entropy encoding unit of the encoding device of FIG. 9 may perform steps S800 to S830 of FIG. 8. Although not shown, the process of deriving predicted samples may be performed by a prediction unit of the encoding device, the process of deriving residual samples for the current block based on original samples and predicted samples for the current block may be performed by a subtraction unit of the encoding device, and the process of generating reconstructed samples and reconstructed pictures for the current block based on the residual samples and predicted samples for the current block may be performed by an addition unit of the encoding device.
[0365] FIG. 10 schematically illustrates a video decoding method by a decoding device according to the present disclosure. The method disclosed in FIG. 10 may be performed by the decoding device disclosed in FIG. 3. Specifically, for example, steps S1000 to S1020 of FIG. 10 may be performed by an entropy decoding unit of the decoding device, step S1030 of FIG. 10 may be performed by a residual processing unit of the decoding device, and step S1040 may be performed by an adder of the decoding device. Also, although not shown, the step of receiving prediction information for a current block may be performed by an entropy decoding unit of the decoding device, and the step of deriving a prediction sample for the current block may be performed by a prediction unit of the decoding device.
[0366] A decoding apparatus acquires a sign data hiding availability flag (S1000). The decoding apparatus may acquire video information including the sign data hiding availability flag using a bitstream. The video information may include the sign data hiding availability flag. For example, the sign data hiding availability flag may be a flag indicating whether sign data hiding is available. For example, the sign data hiding availability flag may indicate whether sign data hiding is available for a block of a picture in a sequence. For example, the sign data hiding availability flag may indicate whether a sign data hiding use flag indicating whether sign data hiding is used for a current slice is present. For example, the sign data hiding availability flag having a value of 1 may indicate that the sign data hiding is available, and the sign data hiding availability flag having a value of 0 may indicate that the sign data hiding is not available. For example, a value of 1 for the sign data hiding enabled flag may indicate that the sign data hiding enabled flag is present, and a value of 0 for the sign data hiding enabled flag may indicate that the sign data hiding enabled flag is absent. For example, the sign data hiding enabled flag may be signaled in a Sequence Parameter Set (SPS) syntax. Alternatively, for example, the sign data hiding enabled flag may be signaled in a picture header syntax or a slice header syntax. The syntax element for the sign data hiding enabled flag may be the above-mentioned sps_sign_data_hiding_enabled_flag.
[0367] The decoding apparatus acquires a Transform Skip Residual Coding (TSRC) availability flag based on the sign data hiding availability flag (S1010). The video information may include a TSRC availability flag.
[0368] For example, the decoding device may acquire the TSRC available flag based on the sign data hiding available flag. For example, the TSRC available flag may be acquired based on the sign data hiding available flag having a value of 0. That is, for example, when the value of the sign data hiding available flag is 0 (i.e., when the sign data hiding available flag indicates that sign data hiding is not available), the TSRC available flag may be acquired. In other words, for example, when the value of the sign data hiding available flag is 0 (i.e., when the sign data hiding available flag indicates that sign data hiding is not available), the TSRC available flag may be signaled. Also, for example, when the value of the sign data hiding available flag is 1, the TSRC available flag may not be acquired, and the value of the TSRC available flag may be derived as 0. That is, for example, when the value of the sign data hiding available flag is 1, the TSRC available flag may not be signaled, and the value of the TSRC available flag may be derived as 0.
[0369] 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 a block in a slice. For example, the TSRC availability flag having a value of 1 may indicate that the TSRC is not available, and the TSRC availability flag having a value of 0 may indicate that the TSRC is available. Also, for example, the TSRC availability flag may be signaled in a slice header syntax. A syntax element of the TSRC availability flag may be the above-mentioned sh_ts_residual_coding_disabled_flag.
[0370] Meanwhile, for example, a decoding device may obtain a dependent quantization available flag. The decoding device may obtain video information including the dependent quantization available flag using a bitstream. The video information may include the dependent quantization available flag. For example, the dependent quantization available flag may be a flag indicating whether dependent quantization is available. For example, the dependent quantization available flag may indicate whether dependent quantization is available. That is, for example, the dependent quantization available flag may indicate whether dependent quantization is available for a block of a picture in a sequence. For example, the dependent quantization available flag may indicate whether a dependent quantization use flag indicating whether dependent quantization is used for a current slice is present. For example, the dependent quantization available flag having a value of 1 may indicate that the dependent quantization is available, and the dependent quantization available flag having a value of 0 may indicate that the dependent quantization is not available. Also, for example, the dependent quantization enabled flag may be signaled in an SPS syntax or a slice header syntax. The syntax element of the dependent quantization enabled flag may be the above-mentioned sps_dep_quant_enabled_flag. The sps_dep_quant_enabled_flag may be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.
[0371] Also, for example, a decoding device may acquire a transform skip available flag. The decoding device may acquire video information including the transform skip available flag using a bitstream. The video information may include the transform skip available flag. Here, the current block may be a coding block (CB) or a transform block (TB). For example, the transform skip available flag may be a flag indicating whether a transform skip is available. For example, the transform skip available flag may indicate whether a transform skip is available for a block of a picture in a sequence. For example, the transform skip available flag may indicate whether a transform skip flag exists. For example, the transform skip available flag having a value of 1 may indicate that the transform skip is available, and the transform skip available flag having a value of 0 may indicate that the transform skip is not available. That is, for example, the transform skip enabled flag having a value of 1 may indicate that the transform skip flag is present, and the transform skip enabled flag having a value of 0 may indicate that the transform skip flag is not present. Also, for example, the transform skip enabled flag may be signaled using a Sequence Parameter Set (SPS) syntax. The syntax element of the transform skip enabled flag may be the above-mentioned sps_transform_skip_enabled_flag.
[0372] Furthermore, for example, the TSRC available flag may be obtained based on the sign data hiding available flag, the dependent quantization available flag, and / or the transform skip available flag. For example, the TSRC available flag may be obtained based on the sign data hiding available flag having a value of 0, the dependent quantization available flag having a value of 0, and the transform skip available flag having a value of 1. That is, for example, the TSRC available flag may be obtained (or signaled) when the value of the sign data hiding available flag is 0 (i.e., the sign data hiding available flag indicates that sign data hiding is not available), the value of the dependent quantization available flag is 0 (i.e., the dependent quantization available flag indicates that dependent quantization is not available), and the value of the transform skip available flag is 1 (i.e., the transform skip available flag indicates that the transform skip is available). Also, for example, when the value of the dependent quantization available flag is 1, the TSRC available flag may not be acquired, and the value of the TSRC available flag may be derived as 0. That is, for example, when the value of the dependent quantization available flag is 1, the TSRC available flag may not be signaled, and the value of the TSRC available flag may be derived as 0. Also, for example, when the value of the transform skip available flag is 0, the TSRC available flag may not be acquired, and the value of the TSRC available flag may be derived as 0. That is, for example, when the value of the transform skip available flag is 0, the TSRC available flag may not be signaled, and the value of the TSRC available flag may be derived as 0.
[0373] The decoding apparatus acquires residual information for the current block based on the TSRC available flag (S1020). The decoding apparatus can acquire residual information for the current block based on the TSRC available flag.
[0374] For example, the decoding device may determine a residual coding syntax for the current block based on the TSRC availability flag. For example, the decoding device may determine the residual coding syntax for the current block to be one of a Regular Residual Coding (RRC) syntax and a Transform Skip Residual Coding (TSRC) syntax based on the TSRC availability flag. The RRC syntax may represent a syntax according to the RRC, and the TSRC syntax may represent a syntax according to the TSRC.
[0375] For example, based on the TSRC available flag having a value of 1, the residual coding syntax for the current block may be determined to be Regular Residual Coding (RRC) syntax. In this case, based on the transform skip available flag having a value of 1, for example, a transform skip flag indicating whether to skip a transform of the current 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 current block. The transform skip flag may indicate whether to skip a transform of the current block. That is, the transform skip flag may indicate whether a transform has been applied to transform coefficients of the current block. A syntax element representing the transform skip flag may be the above-mentioned transform_skip_flag. For example, when the transform skip flag has a value of 1, the transform skip flag may indicate that no transform is applied to the current block (i.e., that a transform is skipped), and when the transform skip flag has a value of 0, the transform skip flag may indicate that a transform is applied to the current block. For example, if the current block is a transform skip block, the value of the transform skip flag for the current block may be 1.
[0376] Furthermore, for example, based on the TSRC availability flag being a value of 0, the residual coding syntax for the current block may be determined to be a Transform Skip Residual Coding (TSRC) syntax. Furthermore, for example, a transform skip flag indicating whether to skip a transform of the current block may be obtained, and based on the transform skip flag being a value of 1 and the TSRC availability flag being a value of 0, the residual coding syntax for the current block may be determined to be a Transform Skip Residual Coding (TSRC) syntax. Furthermore, for example, a transform skip flag indicating whether to skip a transform of the current block may be obtained, and based on the transform skip flag being a value of 0 and the TSRC availability flag being a value of 0, the residual coding syntax for the current block may be determined to be a Regular Residual Coding (RRC) syntax.
[0377] Thereafter, for example, a decoding apparatus may obtain residual information of the determined residual coding syntax for the current block. For example, residual information of a Regular Residual Coding (RRC) syntax may be obtained based on the TSRC availability flag having a value of 1, and residual information of a TSRC syntax may be obtained based on the TSRC availability flag having a value of 0. The video information may include residual information.
[0378] For example, if the residual coding syntax for the current block is determined to be the RRC syntax, the decoding device may obtain residual information of the RRC syntax for the current block. For example, the residual information of the RRC syntax may include the syntax elements disclosed in Table 2 above.
[0379] For example, the residual information of the RRC syntax may include a syntax element for a transform coefficient of the current block, where the transform coefficient may also be referred to as a residual coefficient.
[0380] For example, the syntax elements may include syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1]), abs_remainder, dec_abs_level, and / or coeff_sign_flag.
[0381] Specifically, for example, the syntax element may include position information indicating the position of the last non-zero transform coefficient in a residual coefficient array of the current block. That is, the syntax element may include position information indicating the position of the last non-zero transform coefficient in a scanning order of the current block. The position information may include information indicating a prefix of a column position of the last non-zero transform coefficient, information indicating a prefix of a row position of the last non-zero transform coefficient, information indicating a suffix of a column position of the last non-zero transform coefficient, and information indicating a suffix of a 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. Meanwhile, a non-zero transform coefficient may also be called a significant coefficient.
[0382] Further, for example, the syntax element may include a coded sub-block flag indicating whether the current sub-block of the current block includes a non-zero transform coefficient, a significant coefficient flag indicating whether the transform coefficient of the current block is a non-zero transform coefficient, a first coefficient level flag indicating whether the coefficient level for the transform coefficient is greater than a first critical 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 critical value. Here, the coded sub-block flag may be sb_coded_flag or coded_sub_block_flag, the significant coefficient flag may be sig_coeff_flag, the first coefficient level flag may be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag may be par_level_flag, and the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
[0383] Also, for example, the syntax element may include coefficient value related information for values of the transform coefficients of the current block, which may be abs_remainder and / or dec_abs_level.
[0384] Also, for example, the syntax element may include a sign flag indicating the sign of the transform coefficient, and the sign flag may be coeff_sign_flag.
[0385] Meanwhile, for example, when the sign data hiding is applied to the current block, the sign flag of the first valid transform coefficient of a current coefficient group (CG) in the current block may not be signaled. That is, for example, when the sign data hiding is applied to the current block, the syntax element may not include a sign flag indicating the sign of the first valid transform coefficient. Meanwhile, for example, whether the sign data hiding is applied to the current block may be determined based on the sign data hiding available flag and / or the first valid transform coefficient position and the last valid transform coefficient position of the current CG. For example, when the sign data hiding available flag is 1 and the value obtained by subtracting the first valid transform coefficient position from the last valid transform coefficient position is greater than 3 (i.e., when the sign data hiding available flag is 1 and the number of valid transform coefficients in the current CG is greater than 3), the sign data hiding may be applied to the current CG of the current block.
[0386] Also, for example, if the residual coding syntax for the current block is determined to be the TSRC syntax, the decoding device may obtain residual information of the TSRC syntax for the current block. For example, the residual information of the TSRC syntax may include the syntax elements disclosed in Table 3 above.
[0387] For example, the residual information of the TSRC syntax may include a syntax element for a transform coefficient of the current block, where the transform coefficient may also be referred to as a residual coefficient.
[0388] For example, the syntax elements may include context-coded syntax elements and / or bypass-coded syntax elements for transform coefficients. The syntax elements may include syntax elements such as sig_coeff_flag, coeff_sign_flag, par_level_flag, abs_level_gtX_flag (e.g., abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and / or abs_level_gtx_flag[n][4]), abs_remainder, and / or coeff_sign_flag.
[0389] For example, the context-coded syntax element for the transform coefficient may include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a sign flag indicating the sign of the transform coefficient, a first coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a first critical value, and / or a parity level flag indicating the parity of the coefficient level of the transform coefficient. Also, for example, the context-coded syntax element may include a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second critical value, a third coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a third critical value, a fourth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fourth critical value, and / or a fifth coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a fifth critical value. Here, the significance 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, the parity level flag may be par_level_flag, 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.
[0390] Also, for example, the bypass-coded syntax element for the transform coefficient may include coefficient level information for the value (or coefficient level) of the transform coefficient and / or a sign flag indicating a sign for the transform coefficient. The coefficient level information may be abs_remainder and / or dec_abs_level, and the sign flag may be coeff_sign_flag.
[0391] The decoding device derives residual samples of the current block based on the residual information (S1030). For example, the decoding device may derive transform coefficients of the current block based on the residual information, and may derive residual samples of the current block based on the transform coefficients.
[0392] For example, a decoding device may derive transform coefficients of the current block based on the residual information syntax element. Then, the decoding device may derive residual samples of the current block based on the transform coefficients. For example, if it is determined based on the transform skip flag that no transform is applied to the current block, i.e., if the transform skip flag has a value of 1, the decoding device may derive the transform coefficients as the residual samples of the current block. Alternatively, if it is determined based on the transform skip flag that no transform is applied to the current block, i.e., if the transform skip flag has a value of 1, the decoding device may dequantize the transform coefficients to derive the residual samples of the current block. Alternatively, if it is determined based on the transform skip flag that a transform is applied to the current block, i.e., if the transform skip flag has a value of 0, the decoding device may inverse transform the transform coefficients to derive the residual samples of the current block. Alternatively, for example, if it is determined that a transform has been applied to the current block based on the transform skip flag, i.e., if the value of the transform skip flag is 0, the decoding device can dequantize the transform coefficients and inverse transform the dequantized transform coefficients to derive the residual samples of the current block.
[0393] Meanwhile, when the dependent quantization is applied to the current block, the decoding apparatus may perform the dependent quantization process on the transform coefficients to derive the residual samples of the current block. For example, when the dependent quantization is applied to the current block, the decoding apparatus may update a state (Qstate) for dependent quantization based on a coefficient level of a transform coefficient immediately preceding the current transform coefficient in scanning order, derive a coefficient level of the current transform coefficient based on the updated state and a syntax element for the current transform coefficient, and dequantize the derived coefficient level to derive a residual sample. For example, the current transform coefficient may be dequantized in a scalar quantizer for the updated state based on a quantization parameter for a restoration level of the current transform coefficient. Here, the restoration level may be derived based on a syntax element for the current transform coefficient.
[0394] Meanwhile, for example, when the sign data hiding is applied to the current block, the sign of the first significant transform coefficient of the current CG in the current block may be derived based on the sum of the absolute values of the significant transform coefficients in the current CG. For example, if the sum of the absolute values of the significant transform coefficients is even, the sign of the first significant transform coefficient may be derived as a positive value, and if the sum of the absolute values of the significant transform coefficients is odd, the sign of the first significant transform coefficient may be derived as a negative value.
[0395] The decoding device generates a reconstructed picture based on the residual sample (S1040). For example, the decoding device may generate a reconstructed sample and / or a reconstructed picture of the current block based on the residual sample. For example, the decoding device may derive a predicted sample by performing inter prediction mode or intra prediction mode on the current block based on prediction information received through a bitstream, and may generate the reconstructed sample by adding the predicted sample and the residual sample.
[0396] As mentioned above, thereafter, if necessary, in-loop filtering procedures such as deblocking filtering, SAO and / or ALF procedures may be applied to the reconstructed picture to improve the subjective / objective image quality.
[0397] FIG. 11 schematically illustrates a decoding device that performs the video decoding method according to the present document. The method disclosed in FIG. 10 may be performed by the decoding device disclosed in FIG. 11. Specifically, for example, an entropy decoding unit of the decoding device of FIG. 11 may perform steps S1000 to S1020 of FIG. 10, a residual processing unit of the decoding device of FIG. 11 may perform step S1030 of FIG. 10, and an adder of the decoding device of FIG. 11 may perform step S1040 of FIG. 10. Although not shown, receiving prediction information for a current block may be performed by the entropy decoding unit of the decoding device of FIG. 11, and deriving a prediction sample for the current block may be performed by a prediction unit of the decoding device of FIG. 11.
[0398] According to the above-mentioned document, the efficiency of residual coding can be increased.
[0399] In addition, this document establishes a signaling relationship between the sign data hiding available flag and the TSRC available flag, and does not signal the TSRC available flag when sign data hiding is not available, so that sign data hiding is not used when TSRC is not available and RRC syntax is coded for the transform skip block. This improves coding efficiency, reduces the amount of coded bits, and improves overall residual coding efficiency.
[0400] In addition, this document establishes a signaling relationship between the dependent quantization available flag and the TSRC available flag, and signals the TSRC available flag when dependent quantization is not available, so that dependent quantization is not used when TSRC is not available and RRC syntax is coded for a transform skip block, thereby improving coding efficiency and reducing the amount of coded bits, thereby improving overall residual coding efficiency.
[0401] In addition, this document establishes a signaling relationship between the transform skip available flag and the TSRC available flag, and by signaling the TSRC available flag when transform skip is available, the amount of coded bits can be reduced and the overall residual coding efficiency can be improved.
[0402] In the above-described embodiments, the method is a series of steps or blocks and is described based on a flowchart, but this document is not limited to the order of steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and other steps may be included, or one or more steps of the flowchart may be omitted, without affecting the scope of this document.
[0403] The embodiments described herein may be embodied and performed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in the figures may be embodied and performed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for the implementation may be stored in a digital storage medium.
[0404] In addition, the decoding device and encoding device to which the embodiments of this document are applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top (OTT) video (over-the-top) device, an internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, a vehicle terminal (e.g., a vehicle terminal, an airplane terminal, a ship terminal, etc.), a medical video device, etc., and may be used to process video signals or data signals. For example, over-the-top (OTT) video (over-the-top) video devices include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.
[0405] Furthermore, a processing method to which the embodiments of this document are applied may be produced in the form of a computer-executable program and stored in a computer-readable recording medium. Multimedia data having a data structure according to this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes any type of storage device or distributed storage device in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The computer-readable recording medium may also include media embodied in the form of a carrier wave (e.g., transmission via the Internet). The bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0406] Furthermore, the embodiments of the present document may be embodied as a computer program product by program code, which may be executed by a computer according to the embodiments of the present document. The program code may be stored on a computer-readable carrier.
[0407] FIG. 12 illustrates a structural diagram of a content streaming system to which the embodiments of this document are applied.
[0408] A content streaming system to which the embodiments of this document are applied can broadly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0409] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.
[0410] The bitstream may be generated by an encoding method or a bitstream generation method to which an embodiment of this document is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0411] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, which then transmits the multimedia data to the user. In this case, the content streaming system may include a separate control server, which controls commands and responses between devices in the content streaming system.
[0412] The streaming server can receive content from a media storage and / or encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, the streaming server can store the bitstream for a certain period of time to provide a smooth streaming service.
[0413] Examples of the user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, and head mounted displays (HMDs)), digital TVs, desktop computers, and digital signage. Each server in the content streaming system may be operated as a distributed server, and in this case, data received by each server may be processed in a distributed manner.
[0414] The claims described herein may be combined in various ways. For example, technical features of method claims herein may be combined and embodied as an apparatus, and technical features of apparatus claims herein may be combined and embodied as a method. Furthermore, technical features of method claims herein and technical features of apparatus claims herein may be combined and embodied as an apparatus, and technical features of method claims herein and technical features of apparatus claims herein may be combined and embodied as a method.
Claims
1. A video decoding method performed by a decoding device, comprising: obtaining a sign data hiding available flag and a dependent quantization available flag; obtaining a Transform Skip Residual Coding (TSRC) disable flag based on the sign data hiding enable flag and the dependent quantization enable flag; obtaining residual information for a current block based on the TSRC unusable flag; deriving a residual sample of the current block based on the residual information; generating a reconstructed picture based on the residual samples; The signature data hiding availability flag is a flag indicating whether signature data hiding is available, The dependent quantization availability flag is a flag indicating whether dependent quantization is available, The TSRC unusable flag is a flag indicating whether the TSRC syntax is used or not, the TSRC unavailable flag is obtained based on the value of the sign data hiding available flag being equal to 0 and the value of the dependent quantization available flag being equal to 0; The video decoding method, wherein the TSRC unusable flag is obtained from a slice header of a bitstream.
2. based on the value of the sign data hiding enabled flag being equal to 1, the TSRC disabled flag is not obtained from the bitstream; The video decoding method of claim 1 , wherein the value of the TSRC unusable flag is derived as 0.
3. 3. The video decoding method of claim 2, wherein, in response to the value of the sign data hiding available flag being equal to 1, the sign of a first significant transform coefficient of a current coefficient group (CG) in the current block is derived based on the sum of absolute values of the significant transform coefficients in the current coefficient group.
4. The video decoding method of claim 3 , wherein a sign flag for the first valid transform coefficient is not signaled based on the value of the sign data hiding available flag being equal to one.
5. The value of the sign data hiding available flag equal to 1 indicates that the sign data hiding is available; The video decoding method of claim 1 , wherein the value of the sign data hiding enabled flag equal to 0 indicates that the sign data hiding is not enabled.
6. A value of the TSRC unusable flag equal to 1 indicates that the TSRC syntax is not used; The video decoding method of claim 1 , wherein the value of the TSRC disabled flag equal to 0 indicates that the TSRC syntax is used.
7. The video decoding method of claim 6 , wherein, based on the value of the TSRC unusable flag being equal to one, residual information for the current block is obtained from a regular residual coding (RRC) syntax.
8. The video decoding method of claim 7 , wherein a transform skip flag indicating whether a transform skip is applied to the current block is obtained from the bitstream.
9. 7. The video decoding method of claim 6, wherein the residual information for the current block is obtained from the TSRC syntax when the current block is a transform skip block and the value of the TSRC unusable flag is equal to 0.
10. The residual information of the TSRC syntax includes context-coded syntax elements for transform coefficients; The context-coded syntax element is: a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient; a parity level flag for the parity of a coefficient level for the transform coefficient; a sign flag indicating a sign for the transform coefficient; a first coefficient level flag for whether the coefficient level is greater than a first threshold value; 10. The image decoding method of claim 9, further comprising: a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold value.
11. A video encoding method performed by an encoding device, comprising: encoding a sign data hiding available flag and a dependent quantization available flag; encoding a Transform Skip Residual Coding (TSRC) disable flag based on the sign data hiding enable flag and the dependent quantization enable flag; encoding residual information for a current block based on the TSRC unusable flag; generating a bitstream including the sign data hiding enabled flag, the dependent quantization enabled flag, the TSRC disabled flag, and the residual information; The signature data hiding availability flag is a flag indicating whether signature data hiding is available, The dependent quantization availability flag is a flag indicating whether dependent quantization is available, The TSRC unusable flag is a flag indicating whether the TSRC syntax is used or not, the TSRC unavailable flag is encoded based on the value of the sign data hiding available flag being equal to 0 and the value of the dependent quantization available flag being equal to 0; The video encoding method, wherein the TSRC unavailable flag is encoded in a slice header of the bitstream.
12. The video encoding method of claim 11 , wherein the TSRC disabled flag is not encoded based on the value of the sign data hiding enabled flag being equal to one.
13. A method for transmitting data relating to video, comprising: generating a bitstream relating to the video, the bitstream comprising: encoding a sign data hiding available flag and a dependent quantization available flag; encoding a Transform Skip Residual Coding (TSRC) disable flag based on the sign data hiding enable flag and the dependent quantization enable flag; encoding residual information for the current block based on the TSRC unusable flag; transmitting the data including the bitstream; The signature data hiding availability flag is a flag indicating whether signature data hiding is available, The dependent quantization availability flag is a flag indicating whether dependent quantization is available, The TSRC unusable flag is a flag indicating whether the TSRC syntax is used or not, the TSRC unavailable flag is encoded based on the value of the sign data hiding available flag being equal to 0 and the value of the dependent quantization available flag being equal to 0; A transmission method, wherein the TSRC unavailable flag is encoded in a slice header of the bitstream.
Citation Information
Patent Citations
Sign data hiding in video recording
JP2023518713A
JPP7493612B
Sign data hiding of video recording
WO2021195240A1
Cited By
Video decoding method and apparatus
JP2025003494A