Image decoding method and apparatus therefor
By controlling the signaling relationship between dependent quantization and TSRC enable flags in image coding, the number of coding bits is reduced, solving the problem of high-cost transmission and storage of high-resolution images and improving residual coding efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-30
- Publication Date
- 2026-03-20
AI Technical Summary
The transmission and storage costs of high-resolution, high-quality images are high, necessitating improvements in image coding efficiency, particularly residual coding efficiency.
By establishing a signaling relationship between the dependency quantization enable flag and the TSRC enable flag, the activation of symbol data hiding and transformation skip residual coding is controlled, thereby reducing the number of encoded bits and improving coding efficiency.
Without enabling symbolic data hiding and TSRC, the overall residual coding efficiency is improved by reducing the number of encoded bits.
Smart Images

Figure CN115699758B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The disclosure relates to an image encoding technique, and more particularly, to an image decoding method of encoding flag information on whether to enable TSRC when encoding residual data representing a current block in an image encoding system, and an apparatus thereof. BACKGROUND
[0002] Recently, in various fields, the demand for high-resolution, high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images is increasing. Because the image data has high resolution and high quality, the amount of information or bits to be transmitted increases relative to conventional image data. Therefore, when transmitting image data using a medium such as a conventional wired / wireless broadband line or storing image data using an existing storage medium, the transmission cost and storage cost thereof increase.
[0003] Therefore, there is a need for an efficient image compression technique for efficiently transmitting, storing, and reproducing information of high-resolution, high-quality images. SUMMARY
[0004] TECHNICAL PROBLEM
[0005] The disclosure provides a method and apparatus for improving image encoding efficiency.
[0006] The disclosure also provides a method and apparatus for improving residual encoding efficiency.
[0007] TECHNICAL SOLUTION
[0008] According to an embodiment of the disclosure, an image decoding method performed by a decoding device is provided. The method includes the steps of: obtaining a dependent quantization enabling flag for whether dependent quantization is enabled; obtaining a sign data hiding enabling flag for whether sign data hiding is enabled; obtaining a transform skip residual coding (TSRC) enabling flag for whether TSRC is enabled based on the dependent quantization enabling flag and the sign data hiding enabling flag; obtaining residual information of a current block based on the TSRC enabling 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 TSRC enabling flag is obtained based on the dependent quantization enabling flag having a value of 0 and the sign data hiding enabling flag having a value of 0.
[0009] According to another embodiment of the disclosure, a decoding device performing image decoding is provided. The decoding device includes an entropy decoder configured to obtain a dependent quantization enabled flag for whether dependent quantization is enabled, obtain a sign data hiding enabled flag for whether sign data hiding is enabled, obtain a transform skip residual coding (TSRC) enabled flag for whether TSRC is enabled based on the dependent quantization enabled flag and the sign data hiding enabled flag, and obtain residual information of a current block based on the TSRC enabled flag; a residual processor configured to derive residual samples of the current block based on the residual information; and an adder configured to generate a reconstructed picture based on the residual samples, wherein the TSRC enabled flag is obtained based on the dependent quantization enabled flag having a value of 0 and the sign data hiding enabled flag having a value of 0.
[0010] According to still another embodiment of the disclosure, a video encoding method performed by an encoding device is provided. The method includes encoding a dependent quantization enabled flag for whether dependent quantization is enabled, encoding a sign data hiding enabled flag for whether sign data hiding is enabled, encoding a transform skip residual coding (TSRC) enabled flag for whether TSRC is enabled based on the dependent quantization enabled flag and the sign data hiding enabled flag, encoding residual information of a current block based on the TSRC enabled flag, and generating a bitstream including the dependent quantization enabled flag, the sign data hiding enabled flag, the TSRC enabled flag, and the residual information, wherein the TSRC enabled flag is encoded based on the dependent quantization enabled flag having a value of 0 and the sign data hiding enabled flag having a value of 0.
[0011] According to another embodiment of the disclosure, a video encoding device is provided. The encoding device includes an entropy encoder configured to encode a dependent quantization enabled flag for whether dependent quantization is enabled, encode a sign data hiding enabled flag for whether sign data hiding is enabled, encode a transform skip residual coding (TSRC) enabled flag for whether TSRC is enabled based on the dependent quantization enabled flag and the sign data hiding enabled flag, encode residual information of a current block based on the TSRC enabled flag, and generate a bitstream including the dependent quantization enabled flag, the sign data hiding enabled flag, the TSRC enabled flag, and the residual information, wherein the TSRC enabled flag is encoded based on the dependent quantization enabled flag having a value of 0 and the sign data hiding enabled flag having a value of 0.
[0012] According to still another embodiment of the disclosure, there is provided a non-transitory computer-readable storage medium storing a bitstream including image information causing an image decoding method to be performed. In the non-transitory computer-readable storage medium, the image decoding method includes the steps of: obtaining a dependent quantization enabled flag for whether dependent quantization is enabled; obtaining a sign data hiding enabled flag for whether sign data hiding is enabled; obtaining a transform skip residual coding (TSRC) enabled flag for whether TSRC is enabled based on the dependent quantization enabled flag and the sign data hiding enabled flag; obtaining residual information of a current block based on the TSRC enabled 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 TSRC enabled flag is obtained based on the dependent quantization enabled flag having a value of 0 and the sign data hiding enabled flag having a value of 0.
[0013] Technical effects
[0014] According to the disclosure, residual coding efficiency can be enhanced.
[0015] According to the disclosure, the TSRC enabled flag can be signaled when sign data hiding is not enabled by setting a signaling relationship between the sign data hiding enabled flag and the TSRC enabled flag, and by this, when RRC syntax is encoded for a transform skip block because TSRC is not enabled, sign data hiding is not used, thus improving coding efficiency, and overall residual coding efficiency can be improved by reducing the amount of bits encoded.
[0016] According to the disclosure, a signaling relationship between the dependent quantization enabled flag and the TSRC enabled flag is established, and if dependent quantization is not enabled, the TSRC enabled flag can be signaled, and by this, if RRC syntax is encoded for a transform skip block because TSRC is not enabled, dependent quantization will not be used, so that coding efficiency is improved, and overall residual coding efficiency can be improved by reducing the amount of bits encoded.
[0017] According to the disclosure, a signaling relationship between the transform skip enabled flag and the TSRC enabled flag is established, and if transform skip is enabled, the TSRC enabled flag can be signaled, and by this, overall residual coding efficiency can be improved by reducing the amount of bits encoded. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 An example of a video / image encoding apparatus to which embodiments of the disclosure are applicable is briefly illustrated.
[0019] Figure 2is a schematic diagram illustrating a configuration of a video / image encoding apparatus to which an embodiment of the present disclosure can be applied.
[0020] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding apparatus to which an embodiment of the present disclosure can be applied.
[0021] Figure 4 An example of a video / image encoding method based on intra prediction is illustrated.
[0022] Figure 5 An example of a video / image decoding method based on intra prediction is illustrated.
[0023] Figure 6 An intra prediction process is schematically illustrated.
[0024] Figure 7 An example of a video / image encoding method based on inter prediction is illustrated.
[0025] Figure 8 An example of a video / image decoding method based on inter prediction is illustrated.
[0026] Figure 9 An inter prediction process is schematically illustrated.
[0027] Figure 10 Context adaptive binary arithmetic coding (CABAC) for encoding syntax elements is schematically illustrated.
[0028] Figure 11 is a diagram showing example transform coefficients within a 4x4 block.
[0029] Figure 12 A scalar quantizer used in dependent quantization is schematically illustrated.
[0030] Figure 13 State transitions and quantizer selection for dependent quantization are schematically illustrated.
[0031] Figure 14 An image encoding method by an encoding apparatus according to the present document is schematically illustrated.
[0032] Figure 15 An encoding apparatus for performing an image encoding method according to the present document is schematically illustrated.
[0033] Figure 16 An image decoding method by a decoding apparatus according to the present document is schematically illustrated.
[0034] Figure 17 A decoding apparatus for performing an image decoding method according to the present document is schematically illustrated.
[0035] Figure 18 A configuration diagram of a content streaming system to which the present disclosure is applied is illustrated. DETAILED DESCRIPTION
[0036] The present disclosure can be modified in various forms, and specific embodiments thereof will be described and illustrated in the accompanying drawings. However, these embodiments are not intended to limit the present disclosure. The terms used in the following description are used to describe specific embodiments only and are not intended to limit the present disclosure. Singular expressions include plural expressions unless it is clearly different from the context. Terms such as "include" and "have" are intended to indicate that there is a feature, number, step, operation, element, component, or a combination thereof described in the following description, and it should be understood that the possibility of existence or addition of one or more different features, numbers, steps, operations, elements, components, or combinations thereof is not excluded.
[0037] In addition, the elements in the drawings described in the present disclosure are independently drawn for the purpose of conveniently explaining different specific functions, and this does not mean that the elements are implemented by independent hardware or independent software. For example, two or more of the elements can be combined to form a single element, or one element can be divided into a plurality of elements. Embodiments in which elements are combined and / or divided do not depart from the concept of the present disclosure.
[0038] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. In addition, throughout the drawings, like reference numerals are used to refer to like elements, and the same description will be omitted for similar elements.
[0039] Figure 1 A brief example of a video / image encoding apparatus to which embodiments of the present disclosure can be applied is illustrated.
[0040] Reference Figure 1 A video / image encoding system can include a first apparatus (a source apparatus) and a second apparatus (a sink). The source apparatus can transmit encoded video / image information or data in the form of a file or a stream to the sink via a digital storage medium or a network.
[0041] The source apparatus can include a video source, an encoding device, and a transmitter. The sink can include a receiver, a decoding device, and a renderer. The encoding device can be referred to as a video / image encoding device, and the decoding device can be referred to as a video / image decoding device. The transmitter can be included in the encoding device. The receiver can be included in the decoding device. The renderer can include a display, and the display can be configured as a separate apparatus or an external component.
[0042] The video source can acquire a video / image through a process of capturing, synthesizing, or generating a video / image. The video source can include a video / image capturing device and / or a video / image generating device. The video / image capturing device can include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generating device can include, for example, a computer, a tablet, and a smartphone, and can (electronically) generate a video / image. For example, a virtual video / image can be generated through a computer, etc. In this case, the video / image capturing process can be replaced by a process of generating related data.
[0043] The encoding device can encode an input video / image. The encoding device can perform a series of processes such as prediction, transformation, and quantization to achieve compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0044] The transmitter can transmit the encoded image / image information or data output in the form of a bitstream to a receiver of a receiving device in the form of a file or a stream through a digital storage medium or a network. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter can include an element for generating a media file through a predetermined file format, and can include an element for transmission through a broadcasting / communication network. The receiver can receive / extract a bitstream and transmit the received bitstream to a decoding device.
[0045] The decoding device can decode a video / image by performing a series of processes such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding device.
[0046] The renderer can render the decoded video / image. The rendered video / image can be displayed through a display.
[0047] The present disclosure relates to video / image encoding. For example, the methods / embodiments disclosed in the present disclosure can be applied to the methods disclosed in the Versatile Video Coding (VVC), EVC (Elementary Video Coding) standard, AOMedia Video 1 (AV1) standard, second generation Audio Video Coding standard (AVS2), or next generation video / image encoding standards (e.g., H.267 or H.268, etc.).
[0048] The present disclosure proposes various embodiments of video / image encoding, and unless otherwise mentioned, the embodiments can be performed in combination with each other.
[0049] In the disclosure, a video can refer to a series of images over time. A picture generally refers to a unit representing one image in a specific time region, and a sub-picture / slice / tile is a unit that constitutes a part of a picture at the time of encoding. A sub-picture / slice / tile can include one or more coding tree units (CTUs). One picture can consist of one or more sub-pictures / slices / tiles. One picture can consist of one or more tile groups. One tile group can include one or more tiles. A brick can refer to a rectangular region of CTU rows within a tile in a picture. A tile can be partitioned into multiple bricks, each of which consists of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks can also be referred to as a brick. Brick scanning is a specific order of partitioning CTUs of a picture in which the CTUs are ordered in a raster scan in the bricks, the bricks within a tile are consecutively ordered in a raster scan of the bricks of the tile, and the tiles in a picture are consecutively ordered in a raster scan of the tiles of the picture. In addition, a sub-picture can refer to a rectangular region of one or more slices within a picture. That is, a sub-picture contains one or more slices that collectively cover a rectangular region of a picture. A tile is a rectangular region of CTUs within a specific tile column and a specific tile row in a picture. A tile column is a rectangular region of CTUs whose height is equal to the height of a picture and whose width is specified by a syntax element in a picture parameter set. A tile row is a rectangular region of CTUs whose height is specified by a syntax element in a picture parameter set and whose width is equal to the picture width. Tile scanning is a specific order of partitioning CTUs of a picture in which the CTUs are consecutively ordered in a raster scan in the tiles, while the tiles in a picture are consecutively ordered in a raster scan of the tiles of the picture. A slice includes an integer number of bricks of a picture that can be exclusively contained in a single NAL unit. A slice can consist of either multiple complete tile groups or a consecutive sequence of complete bricks of only one tile. In the disclosure, a tile group can be used interchangeably with a slice. For example, in the disclosure, a tile group / tile group header can be referred to as a slice / slice header.
[0050] A pixel or pel can mean a minimum unit constituting one picture (or image). In addition, a "sample" can be used as a term corresponding to a pixel. A sample can generally represent a pixel or a value of a pixel, can represent only a pixel / value of a pixel of a luminance component, or can represent only a pixel / value of a pixel of a chrominance component.
[0051] A unit can represent a basic unit of image processing. A unit can include at least one of a specific area of a picture and information related to the area. One unit can include one luma block and two chroma (e.g., cb, cr) blocks. In some cases, a unit can be used interchangeably with terms such as a block or an area. In general, an MxN block can include a set (or an array) of M columns and N rows of samples (or sample array) or transform coefficients.
[0052] In the present specification, "A or B" can mean "only A", "only B", or "both A and B". In other words, in the present specification, "A or B" can be interpreted as "A and / or B". For example, "A, B, or C" in the present specification means "only A", "only B", "only C", or "any one of A, B, and C and any combination thereof".
[0053] In the present specification, a slash ( / ) or a comma (,) used in the present specification can mean "and / or". For example, "A / B" can mean "A and / or B". Accordingly, "A / B" can mean "only A", "only B", or "both A and B". For example, "A, B, C" can mean "A, B, or C".
[0054] In the present specification, "at least one of A and B" can mean "only A", "only B", or "both A and B". In addition, in the present specification, the expression "at least one of A or B" or "at least one of A and / or B" can be interpreted as the same as "at least one of A and B".
[0055] In addition, in the present specification, "at least one of A, B, and C" means "only A", "only B", "only C", or "any combination of A, B, and C". In addition, "at least one of A, B, or C" or "at least one of A, B, and / or C" can mean "at least one of A, B, and C".
[0056] In addition, the parentheses used in the present specification can mean "for example". Specifically, when indicating "prediction (intra prediction)", "intra prediction" can be proposed as an example of "prediction". In other words, "prediction" in the present specification is not limited to "intra prediction", and "intra prediction" can be proposed as an example of "prediction". In addition, even when indicating "prediction (i.e., intra prediction)", "intra prediction" can be proposed as an example of "prediction".
[0057] In the present specification, technical features described separately in one drawing can be implemented separately or can be implemented simultaneously.
[0058] The following drawings are created in order to explain specific examples of the present specification. Since names of specific apparatuses described in the drawings or names of specific signals / messages / fields are presented in an exemplary manner, technical features of the present specification are not limited to the specific names used in the following drawings.
[0059] Figure 2 is a schematic diagram illustrating a configuration of a video / image encoding apparatus to which embodiments of the present disclosure can be applied. Hereinafter, the video encoding apparatus can include an image encoding apparatus.
[0060] Referring to Figure 2 , the encoding apparatus 200 includes an image partitioner 210, a predictor 220, a residual processor 230, and an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 can include an inter-predictor 221 and an intra-predictor 222. The residual processor 230 can include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 can further include a subtractor 231. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. According to an embodiment, the image partitioner 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250, and the filter 260 can be constituted by at least one hardware component (e.g., an encoder chipset or a processor). In addition, the memory 270 can include a decoded picture buffer (DPB) or can be constituted by a digital storage medium. The hardware component can further include the memory 270 as an internal / external component.
[0061] The image partitioner 210 can partition an input image (or picture or frame) input to the encoding apparatus 200 into one or more processors. For example, the processor can be referred to as a coding unit (CU). In this case, the coding unit can be recursively partitioned from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad tree binary tree ternary (QTBTT) structure. For example, one coding unit can be partitioned into a plurality of coding units having a deeper depth based on a quad tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad tree structure can be applied first, and then the binary tree structure and / or the ternary structure can be applied. Alternatively, the binary tree structure can be applied first. The encoding process according to the disclosure can be performed based on the final coding unit that is no longer partitioned. In this case, the largest coding unit can be used as the final coding unit based on coding efficiency according to image characteristics, or if necessary, the coding unit can be recursively partitioned into a coding unit having a deeper depth and having an optimal size, and the coding unit can be used as the final coding unit. Here, the encoding process can include a process of prediction, transformation, and reconstruction, which will be described later. As another example, the processor can also include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit can be separated or partitioned from the final coding unit described above. The prediction unit can be a unit of sample prediction, and the transform unit can be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.
[0062] In some cases, the term unit can be used interchangeably with terms such as block or region. In general, an MxN block can represent a set of samples or transform coefficients consisting of M columns and N rows. The sample can generally represent a pixel or a pixel value, can represent only a pixel / pixel value of a luminance component, or can represent only a pixel / pixel value of a chrominance component. The sample can be used as a term corresponding to a picture (or image) of pixels or pixels.
[0063] In the encoding device 200, a prediction signal (prediction block, prediction sample array) output from the inter-predictor 221 or the intra-predictor 222 is subtracted from an input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array) and the generated residual signal is sent to the transformer 232. In this case, as illustrated, a unit for subtracting a prediction signal (prediction block, prediction sample array) from an input image signal (original block, original sample array) in the encoding device 200 can be referred to as a subtractor 231. The predictor can perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a prediction block including predicted samples of the current block. The predictor can determine whether to apply intra-prediction or inter-prediction on a basis of the current block or CU. As described later in the description of each prediction mode, the predictor can generate various information related to prediction, such as prediction mode information, and send the generated information to the entropy encoder 240. The information about prediction can be encoded in the entropy encoder 240 and output in the form of a bitstream.
[0064] The intra-predictor 222 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the referred samples can be located in the vicinity of the current block, or can be far away from the current block. In intra-prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes can include, for example, a DC mode and a planar mode. Depending on the level of detail of the prediction direction, the directional modes can include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and depending on the settings, more or less directional prediction modes can be used. The intra-predictor 222 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
[0065] The inter predictor 221 can derive a prediction block of a current block based on a reference block (a reference sample array) specified by a motion vector on a reference picture. Here, to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of a block, a sub-block, or a sample based on the correlation of the motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block can be the same or different. The temporal neighboring block can be referred to as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block can be referred to as a collocated picture (colPic). For example, the inter predictor 221 can configure a motion information candidate list based on the neighboring blocks and generate information indicating which candidate to use to derive the motion vector and / or the reference picture index of the current block. The inter prediction can be performed based on various prediction modes. For example, in the case of a skip mode and a merge mode, the inter predictor 221 can use the motion information of the neighboring blocks as the motion information of the current block. In the skip mode, unlike the merge mode, a residual signal can not be transmitted. In the case of a motion vector prediction (MVP) mode, the motion vector of the neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling a motion vector difference.
[0066] The predictor 220 can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra prediction or inter prediction to predict one block, but also can simultaneously apply both the intra prediction and the inter prediction. This can be referred to as combined inter-intra prediction (CIIP). In addition, the predictor can predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode can be used for content image / video encoding of a game or the like, e.g., screen content coding (SCC). The IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC can use at least one of the inter prediction techniques described in the disclosure. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, sample values within a picture can be signaled based on information about a palette table and a palette index.
[0067] The prediction signal generated by the predictor (including the inter-predictor 221 and / or the intra-predictor 222) can be used to generate a reconstructed signal or to generate a residual signal. The transformer 232 can generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique can include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, the GBT denotes a transform obtained from a graph when relationship information between pixels is represented by a graph. The CNT refers to a transform generated based on a prediction signal generated using all previously reconstructed pixels. Also, the transform process can be applied to square pixel blocks having the same size, or can be applied to blocks having variable sizes other than squares.
[0068] The quantizer 233 can quantize the transform coefficients and transmit them to the entropy encoder 240, and the entropy encoder 240 can encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients can be referred to as residual information. The quantizer 233 can rearrange the block-type quantized transform coefficients 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 quantized transform coefficients. Information about the transform coefficients can be generated. The entropy encoder 240 can perform various encoding methods such as, for example, exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), and the like. The entropy encoder 240 can encode information (e.g., values of syntax elements, etc.) required for video / image reconstruction, together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in units of NAL (network abstraction layer). The video / image information can further include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information can further include general constraint information. In the disclosure, information and / or syntax elements transmitted / signaled from the encoding apparatus to the decoding apparatus can be included in the video / picture information. The video / picture information can be encoded through the above-described encoding process and included in the bitstream. The bitstream can be transmitted through a network, or can be stored in a digital storage medium. The network can include a broadcast network and / or a communication network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits a signal output from the entropy encoder 240 and / or a storage unit (not shown) that stores the signal can be included as an internal / external element of the encoding apparatus 200, and alternatively, the transmitter can be included in the entropy encoder 240.
[0069] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, a residual signal (a residual block or a residual sample) can be reconstructed by applying dequantization and inverse transform to the quantized transform coefficients using the dequantizer 234 and the inverse transformer 235. The adder 250 adds the reconstructed residual signal to the prediction signal output from the inter-predictor 221 or the intra-predictor 222 to generate a reconstructed signal (a reconstructed picture, a reconstructed block, a reconstructed sample array). If a block to be processed has no residual (such as a case where a skip mode is applied), a prediction block can be used as a reconstructed block. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-prediction of a next block to be processed in a current picture, and can be used for inter-prediction of a next picture through filtering as described below.
[0070] Further, during picture encoding and / or reconstruction, luma mapping with chroma scaling (LMCS) can be applied.
[0071] The filter 260 can improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 270 (specifically, a DPB of the memory 270). The various filtering methods can include, for example, a deblocking filter, a sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filter 260 can generate various information related to filtering, and transmit the generated information to the entropy encoder 240, as described later in descriptions of the various filtering methods. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bitstream.
[0072] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter-predictor 221. When inter-prediction is applied by the encoding apparatus, prediction mismatch between the encoding apparatus 200 and a decoding apparatus can be avoided, and encoding efficiency can be improved.
[0073] The DPB of the memory 270 can store the modified reconstructed picture used as a reference picture in the inter-predictor 221. The memory 270 can store motion information of a block from which motion information in a current picture is derived (or encoded), and / or motion information of a reconstructed block in a picture. The stored motion information can be transmitted to the inter-predictor 221, and used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 can store reconstructed samples of a reconstructed block in a current picture, and can deliver the reconstructed samples to the intra-predictor 222.
[0074] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding apparatus to which embodiments of the present disclosure can be applied.
[0075] Referring to Figure 3 , the decoding apparatus 300 can include an entropy decoder 310, a residue processor 320, a predictor 330, an adder 340, a filter 350, a memory 360. The predictor 330 can include an inter-predictor 332 and an intra-predictor 331. The residue processor 320 can include a dequantizer 321 and an inverse transformer 322. According to an embodiment, the entropy decoder 310, the residue processor 320, the predictor 330, the adder 340, and the filter 350 can be constituted by hardware components (e.g., a decoder chipset or a processor). In addition, the memory 360 can include a decoded picture buffer (DPB), or can be constituted by a digital storage medium. The hardware components can further include the memory 360 as an internal / external component.
[0076] When a bitstream including video / image information is input, the decoding apparatus 300 can reconstruct an image corresponding to the processing of the video / image information in the encoding apparatus of Figure 2 . For example, the decoding apparatus 300 can derive a unit / block based on block partitioning-related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processor applied in the encoding apparatus. Accordingly, the processor for decoding can be, for example, an encoding unit, and can partition an encoding unit from a coding tree unit or a largest coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the encoding unit. The reconstructed image signal decoded and output by the decoding apparatus 300 can be reproduced through a reproducing device.
[0077] The decoding apparatus 300 can receive a bitstream from Figure 2The signal output from the encoding apparatus can be received and decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse a bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information can further include information on various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information can further include general constraint information. The decoding apparatus can further decode a picture based on the information on the parameter sets and / or the general constraint information. The signaled / received information and / or syntax elements described later in the disclosure can be decoded through the decoding process and obtained from the bitstream. For example, the entropy decoder 310 decodes information in the bitstream based on an encoding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs syntax elements and quantized values of transform coefficients of a residual required for image reconstruction. More specifically, the CABAC entropy decoding method can receive bins corresponding to each syntax element in the bitstream, determine a context model using information of a decoding target syntax element, decoding information of a decoding target block, or a symbol / bin decoded in a previous stage, and arithmetically decode the bins by predicting a probability of occurrence of the bins according to the determined context model, and generate a symbol corresponding to a value of each syntax element. In this case, after the context model is determined, the CABAC entropy decoding method can update the context model by using information of the decoded symbol / bin for the context model of the next symbol / bin. Information related to prediction among the information decoded by the entropy decoder 310 can be provided to the predictors (inter-predictor 332 and intra-predictor 331), and residual values (that is, quantized transform coefficients and related parameter information) on which entropy decoding is performed in the entropy decoder 310 can be input to the residual processor 320. The residual processor 320 can derive a residual signal (a residual block, a residual sample, a residual sample array). In addition, information on filtering among the information decoded by the entropy decoder 310 can be provided to the filter 350. Further, a receiver (not shown) for receiving a signal output from the encoding apparatus can be further configured as an internal / external element of the decoding apparatus 300, or the receiver can be a component of the entropy decoder 310. In addition, the decoding apparatus according to the disclosure can be referred to as a video / image / picture decoding apparatus, and the decoding apparatus can be classified into an information decoder (a video / image / picture information decoder) and a sample decoder (a video / image / picture sample decoder). The information decoder can include the entropy decoder 310, and the sample decoder can include at least one of the inverse quantizer 321, the inverse transformer 322, the adder 340, the filter 350, the memory 360, the inter-predictor 332, and the intra-predictor 331.
[0078] The dequantizer 321 can dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 321 can rearrange the quantized transform coefficients in the form of a two-dimensional block. In this case, the rearrangement can be performed based on a coefficient scanning order performed in the encoding apparatus. The dequantizer 321 can perform dequantization on the quantized transform coefficients by using a quantization parameter (e.g., quantization step information), and obtain the transform coefficients.
[0079] The inverse transformer 322 inverse-transforms the transform coefficients to obtain a residual signal (a residual block, a residual sample array).
[0080] The predictor can perform prediction on the current block and generate a prediction block including prediction samples of the current block. The predictor can determine whether to apply intra prediction or inter prediction to the current block based on information about prediction output from the entropy decoder 310, and can determine a specific intra / inter prediction mode.
[0081] The predictor can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra prediction or inter prediction to predict one block, but also can simultaneously apply intra prediction and inter prediction. This can be referred to as combined inter and intra prediction (CIIP). In addition, the predictor can predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode can be used for content image / video encoding of games, etc., for example, screen content coding (SCC). The IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC can use at least one of the inter prediction techniques described in the present disclosure. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, sample values within a picture can be signaled based on information about a palette table and a palette index.
[0082] The intra predictor 331 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the referred samples can be located in the vicinity of the current block, or can be far from the current block. In intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The intra predictor 331 can determine the prediction mode applied to the current block by using a prediction mode applied to a neighboring block.
[0083] The inter predictor 332 can derive a prediction block of the current block based on reference samples array of a reference block specified by a motion vector on a reference picture. In this case, to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of a block, a sub-block, or a sample based on the correlation of the motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter predictor 332 can configure a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index of the current block based on received candidate selection information. The inter prediction can be performed based on various prediction modes, and information about the prediction can include information indicating a mode of the inter prediction for the current block.
[0084] The adder 340 can generate a reconstructed signal (a reconstructed picture, a reconstructed block, a reconstructed sample array) by adding the obtained residual signal to a prediction signal (a prediction block, a prediction sample array) output from the predictor (including the inter predictor 332 and / or the intra predictor 331). If there is no residual for a block to be processed (for example, when a skip mode is applied), the prediction block can be used as the reconstructed block.
[0085] The adder 340 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra prediction of a next block to be processed in the current picture, can be output through filtering as described below, or can be used for inter prediction of a next picture.
[0086] In addition, luminance mapping and chrominance scaling (LMCS) can be applied in the picture decoding process.
[0087] The filter 350 can improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 360 (specifically, the DPB of the memory 360). The various filtering methods can include, for example, a deblocking filter, a sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0088] The reconstructed picture (modified) stored in the DPB of the memory 360 can be used as a reference picture in the inter prediction 332. The memory 360 can store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a reconstructed block in the picture. The stored motion information can be sent to the inter prediction 332 to be utilized as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 can store reconstructed samples of a reconstructed block in the current picture and can transfer the reconstructed samples to the intra prediction 331.
[0089] In the disclosure, the embodiments described in the filter 260, the inter prediction 221, and the intra prediction 222 of the encoding apparatus 200 can be the same as or respectively applied to correspond to the filter 350, the inter prediction 332, and the intra prediction 331 of the decoding apparatus 300. The same can also apply to the inter prediction 332 and the intra prediction 331.
[0090] In the disclosure, at least one of quantization / dequantization and / or transform / inverse transform can be omitted. When quantization / dequantization is omitted, the quantized transform coefficient can be referred to as a transform coefficient. When transform / inverse transform is omitted, the transform coefficient can be referred to as a coefficient or a residual coefficient, or for the unity of expression, can still be referred to as a transform coefficient.
[0091] In the disclosure, the quantized transform coefficient and the transform coefficient can be referred to as a transform coefficient and a scaled transform coefficient, respectively. In this case, the residual information can include information on the transform coefficient, and the information on the transform coefficient can be signaled through a residual coding syntax. The transform coefficient can be derived based on the residual information (or the information on the transform coefficient), and the scaled transform coefficient can be derived by inverse transforming (scaling) the transform coefficient. The residual sample can be derived based on inverse transforming (transforming) the scaled transform coefficient. This can also be applied / expressed in other parts of the disclosure.
[0092] Further, as described above, when video encoding is performed, prediction is performed to improve compression efficiency. Thereby, a prediction block including prediction samples for a current block as a block to be encoded (i.e., an encoding target block) can be generated. Here, the prediction block includes prediction samples in a spatial domain (or a pixel domain). The prediction block is derived in the same manner in the encoding apparatus and the decoding apparatus, and the encoding apparatus can signal information on a residual between an original block and the prediction block (residual information) rather than original sample values of the original block to the decoding apparatus, thereby improving image encoding efficiency. The decoding apparatus can derive a residual block including residual samples based on the residual information, add the residual block and the prediction block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.
[0093] Residual information can be generated through a transform and quantization process. For example, an encoding device can derive a residual block between an original block and a prediction block, perform a transform process on residual samples (an array of residual samples) included in the residual block to derive transform coefficients, perform a quantization process on the transform coefficients to derive quantized transform coefficients, and signal relevant residual information to a decoding device (through a bitstream). Here, the residual information can include value information of the quantized transform coefficients, position information, a transform technique, a transform kernel, a quantization parameter, etc. The decoding device can perform a dequantization / inverse transform process based on the residual information and derive the residual samples (or the residual block). The decoding device can generate a reconstructed picture based on the prediction block and the residual block. Further, for a reference of inter prediction of a picture thereafter, the encoding device can also dequantize / inverse transform the quantized transform coefficients to derive the residual block and generate a reconstructed picture based thereon.
[0094] Intra prediction can refer to a prediction that generates prediction samples of a current block based on reference samples in a picture (hereinafter, referred to as a current picture) to which the current block belongs. When intra prediction is applied to the current block, neighboring reference samples to be used for intra prediction of the current block can be derived. The neighboring reference samples of the current block can include samples neighboring a left boundary of the current block of size nWx nH and a total of 2x nH samples neighboring a left lower side of the current block, samples neighboring an upper boundary of the current block, and a total of 2x nW samples neighboring a right upper side, and samples neighboring a left upper side of the current block. Alternatively, the neighboring reference samples of the current block can include a plurality of columns of upper neighboring samples and a plurality of rows of left neighboring samples. In addition, the neighboring reference samples of the current block can include a total of nH samples neighboring a right boundary of the current block of size nWx nH, a total of nW samples neighboring a lower boundary of the current block, and samples neighboring a right lower side of the current block.
[0095] However, some of the neighboring reference samples of the current block are not yet decoded or can not be available. In this case, a decoder can construct the neighboring reference samples to be used for prediction by replacing the unavailable samples with available samples. Alternatively, the neighboring reference samples to be used for prediction can be configured through interpolation of the available samples.
[0096] When the neighboring reference samples are derived, (i) the prediction samples can be derived based on an average or interpolation of the neighboring reference samples of the current block, or (ii) the prediction samples can be derived based on reference samples existing in a certain (prediction) direction with respect to the prediction samples among the neighboring reference samples of the current block. Case (i) can be referred to as a non-directional mode or a non-angular mode, and case (ii) can be referred to as a directional mode or an angular mode.
[0097] In addition, the prediction samples can be generated by interpolation of first neighboring samples located in a prediction direction of the intra prediction mode of the current block and second neighboring samples located in an opposite direction of the prediction direction among the neighboring reference samples of the current block. The above case can be referred to as linear interpolation intra prediction (LIP). In addition, the chroma prediction samples can be generated based on the luma samples using a linear model (LM). This case can be referred to as an LM mode or a chroma component LM (CCLM) mode.
[0098] In addition, the temporary prediction samples of the current block are derived based on the filtered neighboring reference samples, and the prediction samples of the current block can also be derived by weighted sum of the temporary prediction samples and at least one reference sample derived according to the intra prediction mode among the existing neighboring reference samples (i.e., unfiltered neighboring reference samples). The above case can be referred to as position dependent intra prediction (PDPC).
[0099] In addition, among the multiple neighboring reference sample rows of the current block, a reference sample row having the highest prediction accuracy is selected, and the prediction samples are derived by using the reference samples located in the prediction direction in the selected row. In this case, the intra prediction encoding can be performed by indicating (signaling) the used reference sample row to the decoding device. The above case can be referred to as multi-reference line intra prediction or MRL-based intra prediction.
[0100] In addition, the current block can be divided into vertical or horizontal sub-partitions, and the intra prediction is performed based on the same intra prediction mode, but the neighboring reference samples can be derived and used in units of the sub-partitions. That is, in this case, the intra prediction mode for the current block is equally applied to the sub-partitions, but in some cases, the intra prediction performance can be improved by deriving and using the neighboring reference samples in units of the sub-partitions. This prediction method can be referred to as intra prediction based on intra sub-partition (ISP).
[0101] The above intra prediction methods can be referred to as intra prediction types to be distinguished from the intra prediction modes. The intra prediction types can be referred to by various terms such as intra prediction techniques or additional intra prediction modes. For example, the intra prediction types (or additional intra prediction modes, etc.) can include at least one of the above-mentioned LIP, PDPC, MRL, and ISP. A general intra prediction method excluding specific intra prediction types such as LIP, PDPC, MRL, and ISP can be referred to as a normal intra prediction type. The normal intra prediction type can be generally applied when the above specific intra prediction types are not applied, and can perform prediction based on the above-mentioned intra prediction modes. In addition, if necessary, post-processing filtering can be performed on the derived prediction samples.
[0102] In particular, the intra prediction process can include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and a predicted sample derivation step based on the intra prediction mode / type. In addition, a post-filtering step can be performed on the derived predicted samples if necessary.
[0103] Figure 4 An example of a video / image encoding method based on intra prediction is illustrated.
[0104] Referring to Figure 4 The encoding apparatus performs intra prediction on the current block S400. The encoding apparatus derives an intra prediction mode / type for the current block, derives neighboring reference samples for the current block, and generates predicted samples in the current block based on the intra prediction mode / type and the neighboring reference samples. Here, the intra prediction mode / type determination, the neighboring reference sample derivation, and the predicted sample generation processes can be performed simultaneously, or one process can be performed before another process. The encoding apparatus can determine a mode / type among a plurality of intra prediction modes / types to be applied to the current block. The encoding apparatus can compare RD costs of the intra prediction modes / types and determine the best intra prediction mode / type for the current block.
[0105] In addition, the encoding apparatus can perform a predicted sample filtering process. The predicted sample filtering can be referred to as post-filtering. Some or all of the predicted samples can be filtered through the predicted sample filtering process. In some cases, the predicted sample filtering process can be omitted.
[0106] The encoding apparatus can generate residual samples for the current block based on the (filtered) residual samples S410. The encoding apparatus can compare the predicted samples in the original samples of the current block based on the phase and derive the residual samples.
[0107] The encoding apparatus can encode image information including information about intra prediction (prediction information) and residual information about residual samples S420. The prediction information can include intra prediction mode information and intra prediction type information. The encoding apparatus can output the encoded image information in the form of a bitstream. The output bitstream can be transmitted to a decoding apparatus through a storage medium or a network.
[0108] The residual information can include residual coding syntaxes to be described later. The encoding apparatus can transform / quantize the residual samples to derive quantized transform coefficients. The residual information can include information about the quantized transform coefficients.
[0109] Furthermore, as mentioned above, the encoding device can generate a reconstructed picture (including reconstructed samples and a reconstructed block). To this end, the encoding device can derive (modified) residual samples by performing inverse quantization / inverse transform on the quantized transform coefficients again. The reason for performing inverse quantization / inverse transform again after transform / quantization of the residual samples in this way is to derive the same residual samples as derived in the decoding device as described above. The encoding device can generate a reconstructed block including reconstructed samples of the current block based on the prediction samples and the (modified) residual samples. A reconstructed picture of the current picture can be generated based on the reconstructed block. As mentioned above, a loop filtering process can also be applied to the reconstructed picture.
[0110] Figure 5 An example of a video / image decoding method based on intra prediction is illustrated.
[0111] The decoding device can perform operations corresponding to those performed by the encoding apparatus.
[0112] The prediction information and the residual information can be obtained from the bitstream. The residual samples of the current block can be derived based on the residual information. Specifically, the transform coefficients can be derived by performing inverse quantization based on the quantized transform coefficients derived based on the residual information, and the residual samples of the current block can be derived by performing inverse transform on the transform coefficients.
[0113] Specifically, the decoding device can derive an intra prediction mode / type of the current block based on the received prediction information (intra prediction mode / type information) S500. The decoding device can derive neighboring reference samples of the current block S510. The decoding device generates prediction samples in the current block based on the intra prediction mode / type and the neighboring reference samples S520. In this case, the decoding device can perform a prediction sample filtering process. The prediction sample filtering can be referred to as post-filtering. Some or all of the prediction samples can be filtered by the prediction sample filtering process. In some cases, the prediction sample filtering process can be omitted.
[0114] The decoding device generates residual samples of the current block based on the received residual information S530. The decoding device can generate reconstructed samples of the current block based on the prediction samples and the residual samples, and can derive a reconstructed block including the reconstructed samples S540. A reconstructed picture of the current picture can be generated based on the reconstructed block. As mentioned above, a loop filtering process can also be applied to the reconstructed picture.
[0115] The intra prediction mode information can include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether MPM (most probable mode) is applied to the current block or whether the remaining modes are applied, and when the MPM is applied to the current block, the prediction mode information can further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) can be constituted by an MPM candidate list or an MPM list. In addition, when the MPM is not applied to the current block, the intra prediction mode information includes remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes other than the intra prediction mode candidates (MPM candidates). The decoding device can determine the intra prediction mode of the current block based on the intra prediction mode information.
[0116] In addition, the intra prediction type information can be implemented in various forms. For example, the intra prediction type information can include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information can include at least one of reference sample line information (e.g., intra_luma_ref_idx) indicating whether MRL is applied to the current block and which reference sample line is used if applied, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating the split type of the sub-partitions when ISP is applied, flag information indicating whether PDPC is applied, or flag information indicating whether LIP is applied. In addition, the intra prediction type information can include MIP flag indicating whether matrix-based intra prediction (MIP) is applied to the current block.
[0117] The intra prediction mode information and / or the intra prediction type information can be encoded / decoded by the encoding method described in the present disclosure. For example, the intra prediction mode information and / or the intra prediction type information can be encoded / decoded by entropy encoding (e.g., CABAC, CAVLC).
[0118] Figure 6 An intra prediction process is schematically illustrated.
[0119] Reference Figure 6As described above, the intra prediction process can include a step of determining an intra prediction mode / type, a step of deriving neighboring reference samples, and a step of performing intra prediction (generating predicted samples). The intra prediction process can be performed by the encoding apparatus and the decoding apparatus as described above. In the present disclosure, the encoding apparatus can include the encoding apparatus and / or the decoding apparatus.
[0120] With reference to Figure 6 The encoding apparatus determines the intra prediction mode / type S600.
[0121] The encoding apparatus can determine the intra prediction mode / type applied to the current block from among the various intra prediction modes / types described above, and can generate prediction-related information. The prediction-related information can include intra prediction mode information indicating the intra prediction mode applied to the current block and / or intra prediction type information indicating the intra prediction type applied to the current block. The decoding apparatus can determine the intra prediction mode / type applied to the current block based on the prediction-related information.
[0122] The intra prediction mode information can include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether a most probable mode (MPM) is applied to the current block or a remaining mode is applied, and when the MPM is applied to the current block, the prediction mode information can further include index information (e.g., intra_luma_mpm_idx) indicating one of intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) can be constituted by an MPM candidate list or an MPM list. In addition, when the MPM is not applied to the current block, the intra prediction mode information can further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes other than the intra prediction mode candidates (MPM candidates). The decoding apparatus can determine the intra prediction mode of the current block based on the intra prediction mode information.
[0123] In addition, the intra prediction type information can be implemented in various forms. For example, the intra prediction type information can include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information can include at least one of reference sample line information (e.g., intra_luma_ref_idx) indicating whether to apply MRL to the current block and which reference sample line to use if applied, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether to apply ISP to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating a split type of a sub-partition when ISP is applied, flag information indicating whether to apply PDPC, or flag information indicating whether to apply LIP. In addition, the intra prediction type information can include MIP flag indicating whether to apply matrix-based intra prediction (MIP) to the current block.
[0124] For example, when intra prediction is applied, an intra prediction mode applied to the current block can be determined using an intra prediction mode of a neighboring block. For example, the encoding apparatus can select one of MPM candidates in a most probable mode (MPM) list derived based on an intra prediction mode of a neighboring block (e.g., a left and / or an above neighboring block) of the current block and / or additional candidate modes, or select one of remaining intra prediction modes not included in the MPM candidates (and a planar mode) based on MPM remaining information (remaining intra prediction mode information). The MPM list can be configured to include or not include the planar mode as a candidate. For example, when the MPM list includes the planar mode as a candidate, the MPM list can have 6 candidates, and when the MPM list does not include the planar mode as a candidate, the MPM list can have 5 candidates. When the MPM list does not include the planar mode as a candidate, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not the planar mode can be signaled. For example, the MPM flag can be first signaled, and when the value of the MPM flag is 1, the MPM index and the non-planar flag can be signaled. In addition, when the value of the non-planar flag is 1, the MPM index can be signaled. Here, the fact that the MPM list is configured not to include the planar mode as a candidate is that the planar mode is always considered as an MPM, and the non-planar mode is not an MPM, and thus, the flag (non-planar flag) is first signaled to check whether it is the planar mode.
[0125] For example, whether the intra prediction mode applied to the current block is among the MPM candidates (and the planar mode) or among the remaining modes can be indicated based on an MPM flag (e.g., intra_luma_mpm_flag). The MPM flag with a value of 1 can indicate that the intra prediction mode of the current block is within the MPM candidates (and the planar mode), and the MPM flag with a value of 0 can indicate that the intra prediction mode of the current block is not within the MPM candidates (and the planar mode). The non-planar flag with a value of 0 (e.g., intra_luma_not_planar_flag) can indicate that the intra prediction mode of the current block is the planar mode, and the non-planar flag with a value of 1 can indicate that the intra prediction mode of the current block is not the planar mode. The MPM index can be signaled in the form of mpm_idx or intra_luma_mpm_idx syntax elements, and the remaining intra prediction mode information can be signaled in the form of rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax elements. For example, the remaining intra prediction mode information can indicate one of the remaining intra prediction modes that is not included in the MPM candidates (and the planar mode) among all the intra prediction modes by being indexed in the order of the prediction mode numbers. The intra prediction mode can be an intra prediction mode of a luma component (sample). Hereinafter, the intra prediction mode information can include at least one of the MPM flag (e.g., intra_luma_mpm_flag), the non-planar flag (e.g., intra_luma_not_planar_flag), the MPM index (e.g., mpm_idx or intra_luma_mpm_idx), or the remaining intra prediction mode information (rem_intra_luma_pred_mode or intra_luma_luma_mpm_remainder). In the disclosure, the MPM list can be referred to with various terms such as MPM candidate list and candModeList.
[0126] When the MIP is applied to the current block, a separate MPM flag (e.g., intra_mip_mpm_flag) of the MIP, an MPM index (e.g., intra_mip_mpm_idx), and remaining intra prediction mode information (e.g., intra_mip_mpm_remainder) can be signaled, and the non-planar flag can not be signaled.
[0127] In other words, generally, when block partitioning is performed on an image, a current block to be encoded and a neighboring block have similar image characteristics. Accordingly, there is a high likelihood that the current block has the same or similar intra prediction mode as the neighboring block. Thus, the encoder can use the intra prediction mode of the neighboring block to encode the intra prediction mode of the current block.
[0128] The encoding apparatus can construct a most probable mode (MPM) list of the current block. The MPM list can be referred to as an MPM candidate list. Here, the MPM can refer to a mode used to improve coding efficiency in consideration of similarity between the current block and the neighboring block during intra prediction mode encoding. As described above, the MPM list can be constructed to include the planar mode, or can be constructed not to include the planar mode. For example, when the MPM list includes the planar mode, the number of candidates in the MPM list can be 6. Also, when the MPM list does not include the planar mode, the number of candidates in the MPM list can be 5.
[0129] The encoding apparatus can perform prediction based on various intra prediction modes, and can determine the best intra prediction mode based on rate-distortion optimization (RDO) based thereon. In this case, the encoding apparatus can determine the best intra prediction mode by using only the MPM candidates configured in the MPM list and the planar mode, or by further using the remaining intra prediction modes in addition to the MPM candidates configured in the MPM list and the planar mode. Specifically, for example, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP) other than a normal intra prediction type, the encoding apparatus can determine the best intra prediction mode by considering only the MPM candidates and the planar mode as the intra prediction mode candidates of the current block. That is, in this case, the intra prediction mode of the current block can be determined only from among the MPM candidates and the planar mode, and in this case, the encoding / signaling of the mpm flag can not be performed. In this case, the decoding apparatus can infer the mpm flag as 1 without separately signaling the mpm flag.
[0130] In addition, generally, when the intra prediction mode of the current block is not the planar mode but one of the MPM candidates in the MPM list, the encoding apparatus generates an mpm index (mpm idx) indicating one of the MPM candidates. When the intra prediction mode of the current block is not included in the MPM list, the encoding apparatus generates MPM remaining information (remaining intra prediction mode information) indicating the same mode as the intra prediction mode of the current block from among the remaining intra prediction modes not included in the MPM list (and the planar mode). The MPM reminder information can include, for example, an intra_luma_mpm_remainder syntax element.
[0131] The decoding apparatus obtains intra prediction mode information from the bitstream. As described above, the intra prediction mode information can include at least one of an MPM flag, a non-planar flag, an MPM index, and MPM remainder information (remainder intra prediction mode information). The decoding apparatus can construct an MPM list. The MPM list is constructed to be the same as the MPM list constructed in the encoding apparatus. That is, the MPM list can include intra prediction modes of neighboring blocks, or can further include a specific intra prediction mode according to a predetermined method.
[0132] The decoding apparatus can determine an intra prediction mode of the current block based on the MPM list and the intra prediction mode information. For example, when a value of the MPM flag is 1, the decoding apparatus can derive (based on the non-planar flag) a planar mode as the intra prediction mode of the current block, or derive a candidate indicated by the MPM index among MPM candidates in the MPM list as the intra prediction mode of the current block. Here, the MPM candidates can mean only candidates included in the MPM list, or can include not only the candidates included in the MPM list but also the planar mode applicable when the value of the MPM flag is 1.
[0133] As another example, when a value of the MPM flag is 0, the decoding apparatus can derive an intra prediction mode indicated by the remainder intra prediction mode information (which can be referred to as mpm remainder information) among the remainder intra prediction modes not included in the MPM list and the planar mode as the intra prediction mode of the current block. Further, as another example, when an intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP, etc.), the decoding apparatus can derive the planar mode or the candidate indicated by the MPM flag in the MPM list as the intra prediction mode of the current block without parsing / decoding / checking the MPM flag.
[0134] The encoding apparatus derives neighboring reference samples of the current block S610. When intra prediction is applied to the current block, the neighboring reference samples to be used for the intra prediction of the current block can be derived. The neighboring reference samples of the current block can include samples neighboring a left boundary of the current block of size nWx nH and a total of 2x nH samples neighboring a left lower side of the current block, samples neighboring an upper boundary of the current block, and a total of 2x nW samples neighboring a right upper side and samples neighboring a left upper side of the current block. Alternatively, the neighboring reference samples of the current block can include a plurality of columns of upper neighboring samples and a plurality of rows of left neighboring samples. In addition, the neighboring reference samples of the current block can include a total of nH samples neighboring a right boundary of the current block of size nWx nH, a total of nW samples neighboring a lower boundary of the current block, and samples neighboring a right lower side of the current block.
[0135] On the other hand, when MRL is applied (i.e., when the value of the MRL index is greater than 0), the neighboring reference samples can be located in lines 1-2 instead of line 0 that is adjacent to the current block on the left / top side, and in this case, the number of neighboring reference samples can further increase. Moreover, when ISP is applied, the neighboring reference samples can be derived in sub-partition units.
[0136] The encoding device derives prediction samples by performing intra prediction on the current block S620. The encoding device can derive the prediction samples based on the intra prediction mode / type and the neighboring samples. The encoding device can derive the reference samples from the neighboring reference samples of the current block according to the intra prediction mode of the current block, and can derive the prediction samples of the current block based on the reference samples.
[0137] Further, when inter prediction is applied, a predictor of the encoding / decoding device can derive prediction samples by performing inter prediction in a unit of block. Inter prediction can be applied when prediction is performed on a current block. That is, a predictor (more specifically, an inter predictor) of the encoding / decoding device can derive prediction samples by performing inter prediction in a unit of block. Inter prediction can mean prediction derived in a method that depends on data elements (e.g., sample values or motion information) of a picture other than a current picture. When inter prediction is applied to a current block, a prediction block (prediction sample array) of the current block can be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. In this case, in order to reduce the amount of motion information transmitted in an inter prediction mode, motion information of the current block can be predicted in a unit of block, sub-block, or sample based on the correlation of the motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can also include inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case where inter prediction is applied, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in a reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block can be the same as or different from each other. The temporal neighboring block can be referred to as such a name as collocated reference block, collocated CU (colCU), etc., and the reference picture including the temporal neighboring block can be referred to as collocated picture (colPic). For example, a motion information candidate list can be configured based on neighboring blocks of the current block, and in order to derive a motion vector and / or a reference picture index of the current block, flag or index information indicating which candidate is selected (used) can be signaled. Inter prediction can be performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, motion information of the current block can be the same as that of the selected neighboring block. In the skip mode, a residual signal can not be transmitted as in the merge mode. In the case of a motion vector prediction (MVP) mode, a motion vector of the selected neighboring block can be used as a motion vector predictor, and a motion vector difference can be signaled. In this case, the motion vector of the current block can be derived using a sum of the motion vector predictor and the motion vector difference.
[0138] Motion information can also include L0 motion information and / or L1 motion information depending on the inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). An L0 directional motion vector can be referred to as an L0 motion vector or MVL0, and an L1 directional motion vector can be referred to as an L1 motion vector or MVL1. Prediction based on an L0 motion vector can be referred to as L0 prediction, prediction based on an L1 motion vector can be referred to as L1 prediction, and prediction based on both an L0 motion vector and an L1 motion vector can be referred to as bi-directional prediction. Here, an L0 motion vector can indicate a motion vector associated with a reference picture list L0, and an L1 motion vector can indicate a motion vector associated with a reference picture list L1. As a reference picture, a reference picture list L0 can include pictures preceding a current picture in an output order, and a reference picture list L1 can include pictures succeeding the current picture in the output order. A preceding picture can be referred to as a forward (reference) picture, and a succeeding picture can be referred to as a backward (reference) picture. A reference picture list L0 can also include pictures succeeding the current picture in the output order as a reference picture. In this case, preceding pictures can be indexed first and then succeeding pictures can be indexed in the reference picture list L0. A reference picture list L1 can also include pictures preceding the current picture in the output order as a reference picture. In this case, succeeding pictures can be indexed first and then preceding pictures can be indexed in the reference picture list L1. Here, the output order can correspond to a picture order count (POC) order.
[0139] A video / image encoding process based on inter prediction can illustratively include, for example, the following.
[0140] Figure 7 Examples of a video / image encoding method based on inter prediction are exemplified.
[0141] The encoding device performs inter prediction on the current block (S700). The encoding device can derive an inter prediction mode and motion information of the current block, and generate prediction samples of the current block. Here, the inter prediction mode derivation process, the motion information derivation process, and the prediction sample generation process can be performed simultaneously, and any one of the processes can be performed earlier than the other processes. For example, the inter prediction unit of the encoding device can include a prediction mode derivation unit, a motion information derivation unit, and a prediction sample derivation unit, and the prediction mode derivation unit can derive a prediction mode of the current block, the motion information derivation unit can derive motion information of the current block, and the prediction sample derivation unit can derive prediction samples of the current block. For example, the inter prediction unit of the encoding device can search for a block similar to the current block in a predetermined region (search region) of a reference picture through motion estimation, and derive a reference block having a minimum difference or equal to or less than a predetermined criterion from the current block. A reference picture index indicating a reference picture in which the reference block is located can be derived based on this, and a motion vector can be derived based on a positional difference between the reference block and the current block. The encoding device can determine a mode applied to the current block among various prediction modes. The encoding device can compare RD costs of various prediction modes, and determine a best prediction mode of the current block.
[0142] For example, when the skip mode or the merge mode is applied to the current block, the encoding device can configure a merge candidate list to be described below, and derive a reference block having a minimum difference or equal to or less than a predetermined criterion from the current block among reference blocks indicated by merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block can be selected, and merge index information indicating the selected merge candidate can be generated and signaled to the decoding device. The motion information of the current block can be derived by using the motion information of the selected merge candidate.
[0143] As another example, when the (A)MVP mode is applied to the current block, the encoding device can configure an (A)MVP candidate list to be described below, and use a motion vector of an mvp candidate selected among mvp candidates included in the (A)MVP candidate list as an mvp of the current block. In this case, for example, a motion vector indicating a reference block derived through motion estimation can be used as a motion vector of the current block, and an mvp candidate having a motion vector having a minimum difference from the motion vector of the current block among the mvp candidates can become the selected mvp candidate. A motion vector difference (MVD) that is a difference value obtained by subtracting the mvp from the motion vector of the current block can be derived. In this case, information about the MVD can be signaled to the decoding device. In addition, when the (A)MVP mode is applied, a value of a reference picture index can be configured as reference picture index information and separately signaled to the decoding device.
[0144] The encoding apparatus can derive the residual samples based on the prediction samples (S710). The encoding apparatus can derive the residual samples by comparing the original samples of the current block with the prediction samples.
[0145] The encoding apparatus encodes the image information including the prediction information and the residual information (S720). The encoding apparatus can output the encoded image information in the form of a bitstream. The prediction information can include information on prediction mode information (e.g., a skip flag, a merge flag, or a mode index, etc.) and information on motion information as information related to the prediction process. The information on motion information can include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index) as information used to derive a motion vector. In addition, the information on motion information can include information on an MVD and / or reference picture index information. In addition, the information on motion information can include information indicating whether to apply L0 prediction, L1 prediction, or bi-prediction. The residual information is information on the residual samples. The residual information can include information on quantized transform coefficients of the residual samples.
[0146] The output bitstream can be stored in a (digital) storage medium and transmitted to a decoding apparatus, or transmitted to a decoding apparatus via a network.
[0147] In addition, as described above, the encoding apparatus can generate a reconstructed picture (including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples. This is to derive the same prediction result as that performed by the decoding apparatus, and as a result, to improve coding efficiency. Accordingly, the encoding apparatus can store the reconstructed picture (or the reconstructed samples or the reconstructed blocks) in a memory, and utilize the reconstructed picture as a reference picture. A loop filtering process can also be applied to the reconstructed picture as described above.
[0148] A video / image decoding method based on inter prediction can illustratively include, for example, the following.
[0149] Figure 8 An example of a video / image decoding method based on inter prediction is exemplified.
[0150] Referring to Figure 8 The decoding apparatus can perform operations corresponding to those performed by the encoding apparatus. The decoding apparatus can perform prediction on the current block based on the received prediction information, and derive prediction samples.
[0151] Specifically, the decoding apparatus can determine a prediction mode of the current block based on the received prediction information (S800). The decoding apparatus can determine which inter prediction mode to apply to the current block based on the prediction mode information in the prediction information.
[0152] For example, it can be determined whether to apply the merge mode or the (A)MVP mode to the current block based on the merge flag. Alternatively, one of various inter prediction mode candidates can be selected based on a mode index. The inter prediction mode candidates can include the skip mode, the merge mode, and / or the (A)MVP mode, or can include various inter prediction modes to be described below.
[0153] The decoding device derives the motion information of the current block based on the determined inter prediction mode (S810). For example, when the skip mode or the merge mode is applied to the current block, the decoding device can configure a merge candidate list to be described below, and select one of merge candidates included in the merge candidate list. Here, the selection can be performed based on selection information (merge index). The motion information of the current block can be derived by using the motion information of the selected merge candidate. The motion information of the selected merge candidate can be used as the motion information of the current block.
[0154] As another example, when the (A)MVP mode is applied to the current block, the decoding device can configure an (A)MVP candidate list to be described below, and use a motion vector of an mvp candidate selected from among mvp candidates included in the (A)MVP candidate list as an mvp of the current block. The selection can be performed based on selection information (mvp flag or mvp index). In this case, the MVD with respect to the current block can be derived based on information about the MVD, and the motion vector of the current block can be derived based on the mvp of the current block and the MVD. In addition, the reference picture index of the current block can be derived based on the reference picture index information. The picture indicated by the reference picture index in the reference picture list of the current block can be derived as a reference picture referred to for inter prediction of the current block.
[0155] Further, as described below, the motion information of the current block can be derived without candidate list configuration, and in this case, the motion information of the current block can be derived according to a process disclosed in the prediction mode. In this case, the candidate list configuration can be omitted.
[0156] The decoding device can generate the prediction samples of the current block based on the motion information of the current block (S820). In this case, the reference picture can be derived based on the reference picture index of the current block, and the prediction samples of the current block can be derived by using samples of a reference block indicated by the motion vector of the current block on the reference picture. In this case, in some cases, a prediction sample filtering process for all or some of the prediction samples of the current block can also be performed.
[0157] For example, the inter-frame prediction unit of the decoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit can determine the prediction mode of the current block based on the received prediction mode information. The motion information derivation unit can derive the motion information (motion vector and / or reference image index) of the current block based on information about the received motion information. The prediction sample derivation unit can derive the prediction samples of the current block.
[0158] The decoding device generates residual samples for the current block based on the received residual information (S830). The decoding device can generate reconstructed samples for the current block based on the predicted samples and residual samples, and generate a reconstructed image based on the generated reconstructed samples (S840). Subsequently, a loop filtering process can be applied to the reconstructed image as described above.
[0159] Figure 9 The inter-frame prediction process is illustrated schematically.
[0160] Reference Figure 9 As described above, the inter-frame prediction process may include an inter-frame prediction mode determination step, a motion information derivation step based on the determined prediction mode, and a prediction processing step (prediction sample generation) based on the derivation of motion information. The inter-frame prediction process may be performed by the encoding and decoding devices described above. In this document, the encoding apparatus may include an encoding device and / or a decoding device.
[0161] Reference Figure 9 The encoding device determines the inter-frame prediction mode (S900) for the current block. Various inter-frame prediction modes can be used to predict the current block in the image. For example, modes such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, merge with MVD (MMVD) mode, and history motion vector prediction (HMVP) mode can be used. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bidirectional prediction with CU-level weights (BCW), and bidirectional optical flow (BDOF) can also be used as additional modes. The affine mode can also be referred to as the affine motion prediction mode. The MVP mode can also be referred to as the advanced motion vector prediction (AMVP) mode. In this document, some modes and / or motion information candidates derived from some modes can also be included in one of the motion information related candidates for other modes. For example, an HMVP candidate can be added to the merge candidate of the merge / skip mode, or also to the MVP candidate of the MVP mode. If an HMVP candidate is used as a motion information candidate for the merge mode or skip mode, then the HMVP candidate can be referred to as an HMVP merge candidate.
[0162] Prediction mode information indicating an inter prediction mode of the current block can be signaled from the encoding device to the decoding device. In this case, the prediction mode information can be included in the bitstream and received by the decoding device. The prediction mode information can include index information indicating one of a plurality of candidate modes. Alternatively, the inter prediction mode can be indicated by hierarchical signaling of flag information. In this case, the prediction mode information can include one or more flags. For example, whether to apply a skip mode can be indicated by signaling a skip flag, whether to apply a merge mode can be indicated by signaling a merge flag when the skip mode is not applied, and a flag for additional discrimination or an indication to apply an MVP mode can also be signaled when the merge mode is not applied. An affine mode can be signaled as an independent mode or as a dependent mode of the merge mode or the MVP mode. For example, the affine mode can include an affine merge mode and an affine MVP mode.
[0163] The encoding device derives motion information of the current block (S910). The motion information can be derived based on the inter prediction mode.
[0164] The encoding device can perform inter prediction using the motion information of the current block. The encoding device can derive the optimal motion information of the current block through a motion estimation process. For example, the encoding device can search for a similar reference block having high correlation in a predetermined search range in a reference picture in a fractional pixel unit by using an original block in an original picture of the current block, and derive the motion information through the searched reference block. The similarity of the blocks can be derived based on a difference between phase-based sample values. For example, the similarity of the blocks can be calculated based on a sum of absolute differences (SAD) between the current block (or a template of the current block) and the reference block (or a template of the reference block). In this case, the motion information can be derived based on the reference block having the minimum SAD in the search area. The derived motion information can be signaled to the decoding device according to various methods based on the inter prediction mode.
[0165] The encoding device performs prediction based on the motion information of the current block (S920). The encoding device can derive predicted samples of the current block based on the motion information. The current block including the predicted samples can be referred to as a predicted block.
[0166] Furthermore, as described above, the encoding apparatus can perform various encoding methods such as exponential Golomb, context adaptive variable length coding (CAVLC), and context adaptive binary arithmetic coding (CABAC). For example, the decoding apparatus can decode information in the bitstream based on the encoding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements and quantized values of transform coefficients related to a residual required for image reconstruction.
[0167] For example, the above-described encoding method can be performed as described below.
[0168] Figure 10 An exemplary context adaptive binary arithmetic coding (CABAC) for encoding a syntax element is shown. For example, in the CABAC encoding process, when an input signal is a syntax element rather than a binary value, the encoding apparatus can convert the input signal into a binary value by binarizing a value of the input signal. In addition, when the input signal is already a binary value (i.e., when the value of the input signal is a binary value), binarization can not be performed and can be bypassed. Here, each binary number 0 or 1 constituting a binary value can be referred to as a bin. For example, if a binary string after binarization is 110, each of 1, 1, and 0 can be referred to as a bin. A bin for one syntax element can indicate a value of the syntax element.
[0169] Thereafter, bins of binarization of the syntax element can be input to a regular encoding engine or a bypass encoding engine. The regular encoding engine of the encoding apparatus can assign a context model reflecting a probability value to a corresponding bin and encode the corresponding bin based on the assigned context model. The regular encoding engine of the encoding apparatus can update the context model for each bin after encoding each bin. The bin encoded as described above can be referred to as a context-coded bin.
[0170] In addition, when bins of binarization of the syntax element are input to the bypass encoding engine, they can be encoded as follows. For example, the bypass encoding engine of the encoding apparatus omits a process of estimating a probability with respect to an input bin and a process of updating a probability model applied to the bin after encoding. When bypass encoding is applied, the encoding apparatus can encode the input bin by applying a uniform probability distribution instead of assigning a context model, thereby increasing an encoding rate. The bin encoded as described above can be referred to as a bypass bin.
[0171] Entropy decoding can mean a process of performing the same process as the above-described entropy encoding in reverse order.
[0172] For example, when a syntax element is decoded based on a context model, the decoding device can receive a bin corresponding to the syntax element through a bitstream, determine a context model using the syntax element and decoding information of a decoding target block or a neighboring block or information of a decoded symbol / bin in a previous stage, predict a probability of occurrence of the received bin according to the determined context model, and perform arithmetic decoding on the bin to derive a value of the syntax element. Thereafter, the context model of the decoded bin can be updated using the determined context model.
[0173] In addition, for example, when a syntax element is bypass-decoded, the decoding device can receive a bin corresponding to the syntax element through a bitstream and decode the input bin by applying a uniform probability distribution. In this case, a process for deriving a context model of the syntax element and a process for updating a context model applied to the bin after decoding can be omitted.
[0174] As described above, a residual sample can be derived into a quantized transform coefficient through a transform and quantization process. The quantized transform coefficient can also be referred to as a transform coefficient. In this case, the transform coefficient in a block can be signaled in the form of residual information. The residual information can include residual coding syntax. That is, the encoding device can configure residual coding syntax using the residual information, encode the same, and output the same in the form of a bitstream, and the decoding device can decode the residual coding syntax from the bitstream and derive a residual (quantized) transform coefficient. The residual coding syntax can include syntax elements indicating whether a transform is applied to a corresponding block, a position of a last significant transform coefficient in a block, whether there is a significant transform coefficient in a sub-block, a size / sign of a significant transform coefficient, and the like, as will be described later.
[0175] For example, syntax elements related to residual data encoding / decoding can be expressed as shown in the following table.
[0176] [Table 1]
[0177]
[0178]
[0179]
[0180] transform_skip_flag indicates whether a transform is skipped in an associated block. The transform_skip_flag can be a syntax element of a transform skip flag. The associated block can be a coding block (CB) or a transform block (TB). The CB and the TB can be interchangeably used with respect to a transform (and quantization) and a residual coding process. For example, as described above, residual samples can be derived for a CB, and transform coefficients (quantized) can be derived by a transform and quantization of the residual samples, and by a residual coding process, information (e.g., syntax elements) efficiently indicating a position, size, sign, etc. of the (quantized) transform coefficients can be generated and signaled. The quantized transform coefficients can be simply referred to as transform coefficients. Generally, when the CB is not larger than a maximum TB, a size of the CB can be the same as a size of the TB, and in this case, a target block to be transformed (and quantized) and residual coded can be referred to as a CB or a TB. Also, when the CB is larger than the maximum TB, a target block to be transformed (and quantized) and residual coded can be referred to as a TB. Hereinafter, it will be described that syntax elements related to a residual coding are signaled in units of transform blocks (TBs), but this is an example, and as described above, the TBs can be interchangeably used with coding blocks (CBs).
[0181] Also, syntax elements signaled after the transform skip flag can be the same as syntax elements disclosed in Table 2 and / or Table 3 below, and detailed descriptions regarding the syntax elements are described below.
[0182] [Table 2]
[0183]
[0184]
[0185]
[0186]
[0187]
[0188] [Table 3]
[0189]
[0190]
[0191]
[0192] According to the present embodiment, as shown in Table 1, the residual coding can be divided according to the value of the syntax element transform_skip_flag of the transform skip flag. That is, based on the value of the transform skip flag (based on whether the transform is skipped), different syntax elements can be used for the residual coding. The residual coding used when the transform skip is not applied (i.e., when the transform is applied) can be referred to as regular residual coding (RRC), and the residual coding used when the transform skip is applied (i.e., when the transform is not applied) can be referred to as transform skip residual coding (TSRC). In addition, the regular residual coding can be referred to as general residual coding. In addition, the regular residual coding can be referred to as regular residual coding syntax structure, and the transform skip residual coding can be referred to as transform skip residual coding syntax structure. Table 2 above can show the syntax elements of the residual coding when the value of transform_skip_flag is 0 (i.e., when the transform is applied), and Table 3 above can show the syntax elements of the residual coding when the value of transform_skip_flag is 1 (i.e., when the transform is not applied).
[0193] Specifically, for example, a transform skip flag indicating whether the transform of the transform block is skipped can be parsed, and it can be determined whether the transform skip flag is 1. If the value of the transform skip flag is 0, as shown in Table 2, the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, abs_level_gtx_flag, par_level_flag, abs_remainder, coeff_sign_flag, and / or dec_abs_level for the residual coefficients of the transform block can be parsed, and the residual coefficients can be derived based on the syntax elements. In this case, the syntax elements can be parsed in order, and the parsing order can change. In addition, abs_level_gtx_flag can represent abs_level_gt1_flag and / or abs_level_gt3_flag. For example, abs_level_gtx_flag[n][0] can be an example of a first transform coefficient level flag (abs_level_gt1_flag), and abs_level_gtx_flag[n][1] can be an example of a second transform coefficient level flag (abs_level_gt3_flag).
[0194] 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 can be encoded / decoded. Further, sb_coded_flag can be denoted as coded_sub_block_flag.
[0195] In an embodiment, the encoding device can encode (x, y) position information of the last non-zero transform coefficient in the 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, last_sig_coeff_x_prefix denotes a prefix of a column position of the last significant coefficient in the transform block in a scan order, last_sig_coeff_y_prefix denotes a prefix of a row position of the last significant coefficient in the transform block in the scan order, last_sig_coeff_x_suffix denotes a suffix of the column position of the last significant coefficient in the transform block in the scan order, and last_sig_coeff_y_suffix denotes a suffix of the row position of the last significant coefficient in the transform block in the scan order. Here, the significant coefficient can denote a non-zero coefficient. In addition, the scan order can be a right diagonal scan order. Alternatively, the scan order can be a horizontal scan order or a vertical scan order. The scan order can be determined based on whether intra-prediction / inter-prediction is applied to the target block (CB or CB including the TB) and / or a specific intra-prediction / inter-prediction mode.
[0196] Thereafter, the encoding device can divide the transform block into 4x4 sub-blocks, and then indicate whether there is a non-zero coefficient in the current sub-block using a 1-bit syntax element coded_sub_block_flag for each 4x4 sub-block.
[0197] If the value of coded_sub_block_flag is 0, there is no more information to be transmitted, and thus the encoding apparatus can terminate the encoding process for the current sub-block. In contrast, if the value of coded_sub_block_flag is 1, the encoding apparatus can successively perform the encoding process for sig_coeff_flag. Since a sub-block including the last non-zero coefficient does not need to encode coded_sub_block_flag and a sub-block including DC information of a transform block has a high probability of including a non-zero coefficient, coded_sub_block_flag can not be encoded and its value can be assumed to be 1.
[0198] If the value of coded_sub_block_flag is 1 and thus it is determined that there is a non-zero coefficient in the current sub-block, the encoding apparatus can encode sig_coeff_flag having a binary value according to the reverse scanning order. The encoding apparatus can encode a 1-bit syntax element sig_coeff_flag for each transform coefficient according to the scanning order. If the value of the transform coefficient at the current scanning position is not 0, the value of sig_coeff_flag can be 1. Here, in the case of a sub-block including the last non-zero coefficient, sig_coeff_flag does not need to be encoded for the last non-zero coefficient, and thus the encoding process for the sub-block can be omitted. Level information encoding can be performed only when sig_coeff_flag is 1, and four syntax elements can be used in the level information encoding process. More specifically, each sig_coeff_flag[xC][yC] can indicate whether the level (value) of the corresponding transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero. In an embodiment, sig_coeff_flag can correspond to an example of a syntax element indicating whether a quantized transform coefficient is a non-zero significant coefficient.
[0199] The level value remaining after encoding sig_coeff_flag can be derived as shown in the following equation. That is, a syntax element remAbsLevel indicating the level value to be encoded can be derived from the following equation.
[0200] [Equation 1]
[0201] remAbsLevel = |coeff| - 1
[0202] Here, coeff means an actual transform coefficient value.
[0203] In addition, abs_level_gtl_flag can indicate whether remAbsLevel' of a corresponding scan position (n) is greater than 1. For example, when the value of abs_level_gtl_flag is 0, the absolute value of a transform coefficient of a corresponding position can be 1. In addition, when the value of abs_level_gt1_flag is 1, remAbsLevel indicating a level value to be encoded later can be updated as shown in the following equation.
[0204] [Equation 2]
[0205] remAbsLevel = remAbsLevel - 1
[0206] In addition, the least significant bit (LSB) value of remAbsLevel described in Equation 2 above can be encoded by par_level_flag as in Equation 3 below.
[0207] [Equation 3]
[0208] par_level_flag = |coeff| & 1
[0209] Herein, par_level_flag[n] can indicate the parity of a transform coefficient level (value) at a scan position (n).
[0210] The transform coefficient level value remAbsLevel to be encoded after performing par_level_flag encoding can be updated as shown in the following equation.
[0211] [Equation 4]
[0212] remAbsLevel = remAbsLevel » 1
[0213] abs_level_gt3_flag can indicate whether remAbsLevel' of a corresponding scan position (n) is greater than 3. The encoding of abs_remainder can be performed only in the case where rem_abs_gt3_flag is equal to 1. The relationship between the actual transform coefficient value coeff and each syntax element can be expressed as shown below using the following equation.
[0214] [Equation 5]
[0215] |coeff| = sig_coeff_flag + abs_level_gt1_flag + par_level_flag + 2 * (abs_level_gt3_flag + abs_remainder)
[0216] In addition, the following table indicates examples related to the above Equation 5.
[0217] [Table 4]
[0218]
[0219] Herein, |coeff| indicates a transform coefficient level (value), and can also be indicated as AbsLevel of the transform coefficient. In addition, a sign of each coefficient can be encoded by using coeff_sign_flag as a 1-bit symbol.
[0220] In addition, if a 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 residual coefficients of a transform block can be parsed as shown in Table 3, and residual coefficients can be derived based on the syntax elements. In this case, the syntax elements can be parsed in sequence, and a parsing order can be changed. In addition, abs_level_gtx_flag can represent abs_level_gt1_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and / or abs_level_gt9_flag. For example, abs_level_gtx_flag[n][j] can be a flag indicating whether an absolute value or level (value) of a transform coefficient at a scan position n is greater than (j<<1)+1. The condition (j<<1)+1 can be optionally replaced with a specific threshold value such as a first threshold value, a second threshold value, and / or the like.
[0221] Further, CABAC provides high performance, but has a drawback of poor throughput performance. This is caused by a regular coding engine of CABAC. Regular coding (i.e., coding by the regular coding engine of CABAC) exhibits high data dependency because it uses a probability state and a range that are updated by coding of a previous bin, and it takes a lot of time to read a probability interval and determine a current state. The throughput problem of CABAC can be solved by limiting the number of bins that are context coded. For example, as shown in Table 2 above, the sum of bins for representing sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag can be limited to the number of bins depending on a corresponding block size. In addition, for example, as shown in Table 3 above, the sum of bins for representing sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag can be limited to the number of bins depending on a corresponding block size. For example, if the corresponding block is a 4x4 size block, the sum of bins of sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag or sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, abs_level_gt9_flag can be limited to 32 (or, for example, 28), and if the corresponding block is a 2x2 size block, the sum of bins of sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag can be limited to 8 (or, for example, 7). The limited number of bins can be represented by remBinsPass1 or RemCcbs. Alternatively, for example, for higher CABAC throughput, the number of bins that are context coded can be limited for a block (CB or TB) including a coding target CG. In other words, the number of bins that are context coded can be limited in units of blocks (CB or TB).For example, when the size of the current block is 16x16, the number of bins used for context encoding of the current block can be limited to 1.75 times the number of pixels of the current block (i.e., 448), regardless of the current CG.
[0222] In this case, if all the context-encoded bins with the limited number are used when encoding the context elements, the encoding apparatus can binarize the remaining coefficients by the method of binarizing the coefficients as described below, instead of using context encoding, and can perform bypass encoding. In other words, for example, if the number of context-encoded bins for 4x4 CG encoding is 32 (or, for example, 28), or if the number of context-encoded bins for 2x2 CG encoding is 8 (or, for example, 7), sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag encoded with context-encoded bins can no longer be encoded, and can be directly encoded as dec_abs_level. Alternatively, for example, when the number of context-encoded bins for 4x4 block encoding is 1.75 times the number of pixels of the entire block, i.e., when it is limited to 28, sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag encoded as context-encoded bins can no longer be encoded, and can be directly encoded as dec_abs_level, as shown in Table 5 below.
[0223] [Table 5]
[0224] |coeff[n]| dec_abs_level[n] 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 ... ...
[0225] A value |coeff| can be derived based on dec_abs_level. In this case, the transform coefficient value, i.e., |coeff|, can be derived as shown in Equation below.
[0226] [Equation 6]
[0227] |coeff| = dec_abs_level
[0228] In addition, coeff_sign_flag can indicate the sign of the transform coefficient level at the corresponding scan position n. That is, coeff_sign_flag can indicate the sign of the transform coefficient at the corresponding scan position n.
[0229] Figure 11 An example of transform coefficients in a 4x4 block is shown.
[0230] Figure 11The 4x4 block of the quantized coefficients. Figure 11 The block of the quantized coefficients can be a 4x4 transform block or a 4x4 sub-block of an 8x8, 16x16, 32x32, or 64x64 transform block. Figure 11 The 4x4 block of the quantized coefficients can represent a luma block or a chroma block.
[0231] Further, as described above, when the input signal is not a binary value but a syntax element, the encoding apparatus can transform the input signal into a binary value by binarizing a value of the input signal. Also, the decoding apparatus can decode the syntax element to derive a binarized value (e.g., binarized bin) of the syntax element, and can de-binarize the binarized value to derive a value of the syntax element. The binarization process can be performed as a truncated rice (TR) binarization process, a k-th order exponential golomb (EGk) binarization process, a limited k-th order exponential golomb (limited EGk), a fixed length (FL) binarization process, etc. Also, the de-binarization process can denote a process performed based on the TR binarization process, the EGk binarization process, or the FL binarization process to derive the value of the syntax element.
[0232] For example, the TR binarization process can be performed as follows.
[0233] An input of the TR binarization process can be cMax and cRiceParam for the syntax element and a request for the TR binarization. Also, an output of the TR binarization process can be the TR binarization for symbolVal which is a value corresponding to a bin string.
[0234] Specifically, for example, in a case where there is a suffix bin string for the syntax element, the TR bin string for the syntax element can be a concatenation of a prefix bin string and the suffix bin string, and in a case where there is no suffix bin string, the TR bin string for the syntax element can be the prefix bin string. For example, the prefix bin string can be derived as follows.
[0235] A prefix value of symbolVal for the syntax element can be derived as shown in the following equation.
[0236] [Equation 7]
[0237] p " efixVal = symbolVal » cRiceParam
[0238] Herein, prefixVal can denote a prefix value of symbolVal. The prefix (i.e., prefix bin string) of the TR bin string for the syntax element can be derived as follows.
[0239] For example, if the prefixVal is less than cMax>>cRiceParam, the prefix bin string can be a bit string of length prefixVal 1 indexed by the binIdx. That is, if the prefixVal is less than cMax>>cRiceParam, the prefix bin string can be a bit string of which the number of bits indicated by the binIdx is prefixVal+1. The bins of the binIdx less than the prefixVal can be equal to 1. Also, the bin of the binIdx identical to the prefixVal can be equal to 0.
[0240] For example, the bin string derived by unary binarization of the prefixVal can be as shown in the following table.
[0241] [Table 6]
[0242]
[0243] Also, if the prefixVal is not less than cMax>>cRiceParam, the prefix bin string can be a bit string of length cMax>>cRiceParam and all bits of which are 1.
[0244] Also, if the cMax is greater than the symbolVal and if the cRiceParam is greater than 0, there can be a bin suffix bin string of the TR bin string. For example, the suffix bin string can be derived as described below.
[0245] The suffix value for the symbolVal of the syntax element can be derived as shown in the following equation.
[0246] [Equation 8]
[0247] suffixVal = symbolVal - ((prefixVal) << cRiceParam)
[0248] Herein, the suffixVal can denote a suffix value of the symbolVal.
[0249] The suffix of the suffix (i.e., the suffix bin string) of the TR bin string can be derived based on the FL binarization process for the suffixVal of which the value cMax is (1<<cRiceParam)-1.
[0250] Also, if the value of the input parameter (i.e., the cRiceParam) is 0, the TR binarization can be exactly truncated unary binarization, and can always use the value cMax identical to the possible maximum value of the syntax element to be decoded.
[0251] In addition, for example, the EGk binarization process can be performed as follows. The syntax element coded with ue(v) can be a syntax element subjected to exponential Golomb coding.
[0252] For example, the 0th order exponential Golomb (EG0) binarization process can be performed as follows.
[0253] The parsing process for the syntax element can start from reading a bit including a first non-zero bit from a current position of the bitstream and counting a number of leading bits equal to 0. This process can be expressed as shown in the following table.
[0254] [Table 7]
[0255]
[0256] In addition, the variable codeNum can be derived as follows.
[0257] [Equation 9]
[0258] codeNum = 2 leadingZeroBits - 1 + read_bits(leadingZeroBits)
[0259] Here, the value returned from read_bits(leadingZeroBits) (i.e., the value indicated by read_bits(leadingZeroBits)) can be interpreted as a binary representation of an unsigned integer of the most significant bit recorded first.
[0260] The structure of the exponential Golomb code in which a bit string is divided into "prefix" bits and "suffix" bits can be expressed as shown in the following table.
[0261] [Table 8]
[0262] Bit string form Range of codeNum 1 0 01 x0 1..2 [001x1x0] 3..6 [001x2x1x0] 7..14 <![CDATA[00001x3x2x1x0]]> 15..30 [000001 x4 x3 x2 x1 x0] 31..62 ... ...
[0263] The "prefix" bits can be bits parsed for the calculation of leadingZeroBits as described above, and can be indicated by 0 or 1 in the bit string in Table 8. That is, the bit string indicated by 0 or 1 in Table 8 above can represent a prefix bit string. The "suffix" bits can be bits parsed when codeNum is calculated, and can be represented by xi in Table 8 above. That is, the bit string indicated by xi in Table 8 above can represent a suffix bit string. Here, i can be a value from 0 to LeadingZeroBits - 1. In addition, each xi can be equal to 0 or 1.
[0264] The bit string assigned to codeNum can be as shown in the following table.
[0265] [Table 9]
[0266] Bit string codeNum 1 0 010 1 011 2 00100 3 00101 4 00110 5 00111 6 0001000 7 0001001 8 0001010 9 ... ...
[0267] If the descriptor of the syntax element is ue(v) (i.e., if the syntax element is coded with ue(v)), the value of the syntax element can be equal to codeNum.
[0268] In addition, for example, the EGk binarization process can be executed as follows.
[0269] The input of the EGk binarization process can be a request for EGk binarization. In addition, the output of the EGk binarization process can be the EGk binarization for symbolVal (i.e., a value corresponding to a bin string).
[0270] The bin string of the EGk binarization process for symbolVal can be derived as follows.
[0271] [Table 10]
[0272]
[0273] Referring to Table 10 above, a binary value X can be added to the end of the bin string by each call of put(X). Herein, X can be 0 or 1.
[0274] In addition, for example, the limited EGk binarization process can be executed as follows.
[0275] The input of the limited EGk binarization process can be a request for limited EGk binarization, a rice parameter ricParam, a variable log2TransformRange that is a binary logarithm representing a maximum value, and a variable maxPreExtLen that is a maximum prefix extension length. In addition, the output of the limited EGk binarization process can be the limited EGk binarization for symbolVal that is a value corresponding to an empty string.
[0276] The bin string of the limited EGk binarization process for symbolVal can be derived as follows.
[0277] [Table 11]
[0278]
[0279] In addition, for example, the FL binarization process can be executed as follows.
[0280] An input of the FL binarization process can be a request for cMax and FL binarization for a syntax element. Also, an output of the FL binarization process can be FL binarization for symbolVal that is a value corresponding to a bin string.
[0281] The FL binarization can be configured by using a bit string having a fixed length of symbolVal in terms of a number of bits. Herein, the fixed length bit can be an unsigned integer bit string. That is, a bit string for symbolVal that is a symbol value can be derived by the FL binarization, and a bit length (i.e., a number of bits) of the bit string can be a fixed length.
[0282] For example, the fixed length can be derived as shown in the following equation.
[0283] [Equation 10]
[0284] fixedLength = Ceil(Log2(cMax+1))
[0285] An index for a bin of the FL binarization can be a method using a value sequentially increasing from a most significant bit to a least significant bit. For example, a bin index related to the most significant bit can be binIdx=0.
[0286] Also, for example, a binarization process for a syntax element abs_remainder in residual information can be performed as follows.
[0287] An input of the binarization process for abs_remainder can be a request for binarization of a syntax element abs_remainder[n], a color component cIdx, and a luma position (x0, y0). The luma position (x0, y0) can indicate a left upper sample of a current luma transform block based on a left upper luma sample of a picture.
[0288] An output of the binarization process for abs_remainder can be binarization of abs_remainder (i.e., a bin string of binarization of abs_remainder). A bit string available for abs_remainder can be derived by the binarization process.
[0289] The Rice parameter cRiceParam for abs_remainder[n] can be derived using a Rice parameter derivation process performed by inputting a color component cIdx and a luma position (x0, y0), a current coefficient scan position (xC, yC), log2TbWidth that is a binary logarithm of a transform block width, and log2TbHeight that is a binary logarithm of a transform block height. Detailed description of the Rice parameter derivation process will be described later.
[0290] In addition, for example, cMax of abs_remainder[n] that is currently to be encoded can be derived based on the Rice parameter cRiceParam. cMax can be derived as shown in the following equation.
[0291] [Equation 11]
[0292] cMax = 6 « cRiceParam
[0293] In addition, binarization for abs_remainder (i.e., bin string for abs_remainder) can be a concatenation of a prefix bin string and a suffix bin string in the presence of the suffix bin string. In addition, the bin string for abs_remainder can be a prefix bin string in the absence of the suffix bin string.
[0294] For example, the prefix bin string can be derived as described below.
[0295] The prefix value prefixVal of abs_remainder[n] can be derived as shown in the following equation.
[0296] [Equation 12]
[0297] prefixVal = Min(cMax, abs_remainder[n])
[0298] The prefix of the bin string (i.e., prefix bin string) of abs_remainder[n] can be derived by a TR binarization process for prefixVal, in which cMax and cRiceParam are used as inputs.
[0299] If the prefix bin string is identical to a bit string in which all bits are 1 and the bit length is 6, there can be a suffix bin string of the bin string of abs_remainder[n] and it can be derived as described below.
[0300] The Rice parameter derivation process for dec_abs_level[n] can be as follows.
[0301] An input of the Rice parameter derivation process can be a color component index cldx, a luma position (x0, y0), a current coefficient scan position (xC, yC), a log2TbWidth that is a binary logarithm of a transform block width, and a log2TbHeight that is a binary logarithm of a transform block height. The luma position (x0, y0) can indicate a top-left sample of a current luma transform block based on a top-left luma sample of a picture. Also, an output of the Rice parameter derivation process can be a Rice parameter cRiceParam.
[0302] For example, a variable locSumAbs can be derived based on an array AbsLevel[x][y] of a transform block having a given component index cldx and a top-left luma position (x0, y0), similar to the pseudo code disclosed in the following table.
[0303] [Table 12]
[0304]
[0305] Then, based on the given variable locSumAbs, a Rice parameter cRiceParam can be derived as shown in the following table.
[0306] [Table 13]
[0307] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0308] Also, for example, in the Rice parameter derivation process for abs_remainder[n], the baseLevel can be set to 4.
[0309] Alternatively, for example, the Rice parameter cRiceParam can be determined based on whether a transform is applied to a current block. That is, if a transform is not applied to a current TB including a current CG, in other words, if a transform is skipped for a current TB including a current CG, the Rice parameter cRiceParam can be derived as 1.
[0310] Also, a suffix value sufflxVal of abs_remainder can be derived as shown in the following equation.
[0311] [Equation 13]
[0312] suffixVal = abs_remainder[n] - cMax
[0313] A suffix bin string of the bin string of abs_remainder can be derived by a limited EGk binarization process for suffixVal, where k is set to cRiceParam + 1, riceParam is set to cRiceParam, and log2TransformRange is set to 15, and maxPreExtLen is set to 11.
[0314] Further, for example, the binarization process for the syntax element dec_abs_level in the residual information can be performed as follows.
[0315] The input to the binarization process for dec_abs_level can be a request for binarization of the syntax element dec_abs_level[n], the color component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth which is a binary logarithm of a transform block width, and log2TbHeight which is a binary logarithm of a transform block height. The luma position (x0, y0) can indicate a top-left sample of a current luma transform block based on a top-left luma sample of a picture.
[0316] The output of the binarization process for dec_abs_level can be a binarization of dec_abs_level (i.e., a bin string of the binarization of dec_abs_level). The available bin string of dec_abs_level can be derived by the binarization process.
[0317] A rice parameter cRiceParam of dec_abs_level[n] can be derived by a rice parameter derivation process performed with the input of the color component cIdx, the luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth which is a binary logarithm of a transform block width, and log2TbHeight which is a binary logarithm of a transform block height. Hereinafter, the rice parameter derivation process will be described in detail.
[0318] In addition, for example, cMax of dec_abs_level[n] can be derived based on the rice parameter cRiceParam. cMax can be derived as shown in the following table.
[0319] [Equation 14]
[0320] cMax = 6 « cRiceParam
[0321] Furthermore, binarization for dec_abs_level[n] (i.e., bin string for dec_abs_level[n]) can be a concatenation of prefix bin string and suffix bin string in case there is a suffix bin string. In addition, in case there is no suffix bin string, the bin string for dec_abs_level[n] can be a prefix bin string.
[0322] For example, the prefix bin string can be derived as follows.
[0323] The prefix value prefixVal for dec_abs_level[n] can be derived as shown in the following equation.
[0324] [Equation 15]
[0325] prefixVal = Min(cMax, dec_abs_level[n])
[0326] The prefix of the bin string (i.e., prefix bin string) for dec_abs_level[n] can be derived by TR binarization process for prefixVal, where cMax and cRiceParam are used as inputs.
[0327] If the prefix bin string is identical to the bit string of all bits being 1 and bit length of 6, there can be a suffix bin string for dec_abs_level[n] and it can be derived as follows.
[0328] The Rice parameter derivation process for dec_abs_level[n] can be as follows.
[0329] The inputs of the Rice parameter derivation process can be color component index cIdx, luma position (x0, y0), current coefficient scan position (xC, yC), log2TbWidth as binary logarithm of transform block width, and log2TbHeight as binary logarithm of transform block height. The luma position (x0, y0) can indicate the top-left sample of the current luma transform block based on the top-left luma sample of the picture. In addition, the output of the Rice parameter derivation process can be the Rice parameter cRiceParam.
[0330] For example, the variable locSumAbs can be derived based on the array AbsLevel[x][y] of the transform block having the given component index cIdx and the top-left luma position (x0, y0), similar to the pseudo code disclosed in the following table.
[0331] [Table 14]
[0332]
[0333] Then, based on the given variable locSumAbs, the Rice parameter cRiceParam can be derived as shown in the following table.
[0334] [Table 15]
[0335] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0336] In addition, for example, in the Rice parameter derivation process for dec_abs_level[n], baseLevel can be set to 0, and ZeroPos[n] can be derived as follows.
[0337] [Equation 16]
[0338] ZeroPos[n] = (QState < 2? 1 : 2) << cRiceParam
[0339] In addition, the suffix value suffixVal of dec_abs_level[n] can be derived as shown in the following equation.
[0340] [Equation 17]
[0341] suffixVal = dec_abs_level[n] - cMax
[0342] The suffix bin string of the bin string of dec_abs_level[n] can be derived through the limited EGk binarization process for suffixVal, where k is set to cRiceParam + 1, truncSuffixLen is set to 15, and maxPreExtLen is set to 11.
[0343] Furthermore, RRC and TSRC can have the following differences.
[0344] For example, the Rice parameter cRiceParam of the syntax elements abs_remainder[] and dec_abs_level[] in RRC can be derived based on locSumAbs, a lookup table, and / or baseLevel as described above, but the Rice parameter cRiceParam of the syntax element abs_remainder[] in TSRC can be derived as 1. That is, for example, when transform skip is applied to a current block (e.g., a current TB), the Rice parameter cRiceParam of abs_remainder[] of TSRC for the current block can be derived as 1.
[0345] - Additionally, for example, referring to Table 3 and Table 4, in the RRC, abs_level_gtx_flag[n][0] and / or abs_level_gtx_flag[n][1] can be signaled, but in the TSRC, abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], and abs_level_gtx_flag[n][4] can be signaled. Here, abs_level_gtx_flag[n][0] can be denoted as abs_level_gt1_flag or a first coefficient level flag, abs_level_gtx_flag[n][1] can be denoted as abs_level_gt3_flag or a second coefficient level flag, abs_level_gtx_flag[n][2] can be denoted as abs_level_gt5_flag or a third coefficient level flag, abs_level_gtx_flag[n][3] can be denoted as abs_level_gt7_flag or a fourth coefficient level flag, and abs_level_gtx_flag[n][4] can be denoted as abs_level_gt9_flag or a fifth coefficient level flag. Specifically, the first coefficient level flag can be a flag for whether the coefficient level is greater than a first threshold (e.g., 1), the second coefficient level flag can be a flag for whether the coefficient level is greater than a second threshold (e.g., 3), the third coefficient level flag can be a flag for whether the coefficient level is greater than a third threshold (e.g., 5), the fourth coefficient level flag can be a flag for whether the coefficient level is greater than a fourth threshold (e.g., 7), and the fifth coefficient level flag can be a flag for whether the coefficient level is greater than a fifth threshold (e.g., 9). As described above, in the TSRC, abs_level_gtx_flag[n][0], abs_level_gtx_flag[n][1], and abs_level_gtx_flag[n][2], abs_level_gtx_flag[n][3], abs_level_gtx_flag[n][4] can be further included compared to the RRC.
[0346] - Additionally, for example, in the RRC, the syntax element coeff_sign_flag can be bypass coded, but in the TSRC, the syntax element coeff_sign_flag can be bypass coded or context coded.
[0347] Additionally, for the residual sample quantization process, dependent quantization can be proposed. Dependent quantization can denote a method that depends on the value of the transform coefficient (the value of the transform coefficient level) in which the set of reconstructed values allowed for the current transform coefficient precedes the current transform coefficient in the reconstruction order. That is, for example, dependent quantization can be implemented by (a) defining two scalar quantizers with different reconstructed levels and (b) defining a process for transition between the scalar quantizers. Compared to the existing independent scalar quantization, dependent quantization can have the effect of more concentrated allowed reconstructed vectors in the N-dimensional vector space. Here, N can denote the number of transform coefficients of the transform block.
[0348] Figure 12 An example illustrates the scalar quantizers used in dependent quantization. Referring to Figure 12 , the position of the enabled reconstructed level can be specified by the quantization step size Δ. Referring to Figure 12 , the scalar quantizers can be denoted as Q0and Q1. The scalar quantizer being used can be derived without explicit signaling from the bitstream. For example, the quantizer used for the current transform coefficient can be determined by the parity of the transform coefficient level preceding the current transform coefficient in the encoding / reconstruction order.
[0349] Figure 13 An example illustrates the state transition and quantizer selection for dependent quantization.
[0350] Referring to Figure 13 , the transition between the two scalar quantizers Q0and Q1may be implemented by a state machine with four states. The four states can have four different values (0, 1, 2, and 3). In the encoding / reconstruction order, the state of the current transform coefficient can be determined by the parity of the transform coefficient level preceding the current transform coefficient.
[0351] For example, in the case where the inverse quantization process for the transform block starts, the state for dependent quantization can be configured as 0. Thereafter, the transform coefficients of the transform block can be reconstructed in the scan order (i.e., the same order as the entropy decoding). For example, after the current transform coefficient is reconstructed, the state for dependent quantization can be updated as illustrated in Figure 13 . In the scan order, the inverse quantization process for the transform coefficients reconstructed after the current transform coefficient can be performed based on the updated state. In Figure 13In this case, k can represent a value of a transform coefficient, i.e., a value of a transform coefficient level value. For example, if k (a value of a current transform coefficient) & 1 is 0 in a state where a current state is 0, the state can be updated to 0, and if k & 1 is 1, the state can be updated to 2. Also, for example, if k & 1 is 0 in a state where a current state is 1, the state can be updated to 2, and if k & 1 is 1, the state can be updated to 0. Also, for example, if k & 1 is 0 in a state where a current state is 2, the state can be updated to 1, and if k & 1 is 1, the state can be updated to 3. Also, for example, if k & 1 is 0 in a state where a current state is 3, the state can be updated to 3, and if k & 1 is 1, the state can be updated to 1. Referring to Table 1, the state can be updated according to the value of k & 1. Figure 13 If the state is 0 or 1, a scalar quantizer used in a dequantization process can be Q0, and if the state is 2 or 3, a scalar quantizer used in a dequantization process can be Q1. The transform coefficient can be dequantized by a scalar quantizer for a current state based on a quantization parameter of a reconstructed level of the transform coefficient.
[0352] Further, the disclosure proposes an embodiment related to residual data coding. The embodiments explained in the disclosure can be combined with each other. In the residual data coding method as described above, there can be regular residual coding (RRC) and transform skip residual coding (TSRC).
[0353] Among the two methods as described above, a residual data coding method of a current block can be determined based on values of transform_skip_flag and sh_ts_residual_coding_disabled_flag as exemplified in Table 1. Here, the syntax element sh_ts_residual_coding_disabled_flag can indicate whether TSRC is enabled. Thus, if slice_ts_residual_coding_disabled_flag indicates that TSRC is not enabled even in a case where transform_skip_flag indicates transform skip, syntax elements according to RRC can be signaled for a transform skip block. That is, if a value of transform_skip_flag is 0, or if a value of slice_ts_residual_coding_disabled_flag is 1, RRC can be used, and otherwise, TSRC can be used.
[0354] Although high coding efficiency can be obtained by using slice_ts_residual_coding_disabled_flag in a specific application (e.g., lossless coding, etc.), in existing video / image coding standards, there has been no proposal for a restriction on the case where dependent quantization and slice_ts_residual_coding_disabled_flag are used together. That is, dependent quantization can be activated at a high level (e.g., sequence parameter set (SPS) syntax / video parameter set (VPS) syntax / decoding parameter set (DPS) syntax / picture header syntax / slice header syntax) or a low level (CU / TU), and if slice_ts_residual_coding_disabled_flag is 1, the value depending on the state of dependent quantization in RRC can perform unnecessary operations (i.e., operations according to dependent quantization) to deteriorate coding performance, or an unexpected loss of coding performance can occur due to an error configuration in a coding device. Therefore, the present embodiment proposes a scheme of configuring a correlation / limit between dependent quantization and residual coding (i.e., coding of residual samples of a transform skip block in a current slice by RRC) which are used together in the case of slice_ts_residual_coding_disabled_flag = 1 to prevent an unexpected coding loss or a malfunction from occurring.
[0355] As an embodiment, the present disclosure proposes a method in which slice_ts_residual_coding_disabled_flag depends on ph_dep_quant_enabled_flag. For example, the syntax element proposed in the present embodiment can be in the following table.
[0356] [Table 16]
[0357]
[0358] According to the present embodiment, slice_ts_residual_coding_disabled_flag can be signaled in the case where the value of ph_dep_quant_enabled_flag is 0. Here, ph_dep_quant_enabled_flag can indicate whether dependent quantization is enabled. For example, if the value of ph_dep_quant_enabled_flag is 1, this can indicate that dependent quantization is enabled, and if the value of ph_dep_quant_enabled_flag is 0, this can indicate that dependent quantization is not enabled.
[0359] Accordingly, according to the present embodiment, the slice_ts_residual_coding_disabled_flag can be signaled only in the case where the dependent quantization is not enabled, and in the case where the dependent quantization is enabled and thus the slice_ts_residual_coding_disabled_flag is not signaled, the slice_ts_residual_coding_disabled_flag can be inferred as 0. Further, the ph_dep_quant_enabled_flag and the slice_ts_residual_coding_disabled_flag can be signaled to the picture header syntax and / or the slice header syntax, or can be signaled to another high level syntax (HLS) (e.g., SPS syntax / VPS syntax / DPS syntax) other than the picture header syntax and the slice header syntax or signaled at a low level (CU / TU). If the ph_dep_quant_enabled_flag is signaled to a syntax other than the picture header syntax, it can be referred to as another name. For example, the ph_dep_quant_enabled_flag can be expressed as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or sps_dep_quant_enabled_flag.
[0360] In addition, the present disclosure proposes another embodiment of configuring the correlation / limitation between the dependent quantization and the residual coding (i.e., the encoding of the residual samples of the transform skip block in the current slice by RRC) in the case where slice_ts_residual_coding_disabled_flag = 1. For example, the present embodiment proposes the following scheme: in the case where the value of the slice_ts_residual_coding_disabled_flag is 1, the state of the dependent quantization is not used to encode the level value of the transform coefficient in order to prevent unexpected encoding loss or failure from occurring due to the use of the dependent quantization and the residual coding (i.e., the encoding of the residual samples of the transform skip block in the current slice by RRC) together in the case where slice_ts_residual_coding_disabled_flag = 1. The residual coding syntax according to the present embodiment can be as in the following table.
[0361] [Table 17]
[0362]
[0363]
[0364]
[0365]
[0366]
[0367] Referring to Table 17 as described above, in case that the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, Qstate can be derived, and the value of the transform coefficient (transform coefficient level) can be derived based on Qstate. For example, referring to Table 17, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be an absolute value of the transform coefficient derived based on a syntax element of the transform coefficient, coeff_sign_flag[n] can be a syntax element of a sign flag indicating a sign of the transform coefficient, and (QState>1?1:0) can indicate 1 in case that the value of the state QState is greater than 1 (i.e., the value of the state Qstate is 2 or 3), and can indicate 0 in case that the value of the state Qstate is equal to or less than 1 (i.e., the value of the state Qstate is 0 or 1).
[0368] In addition, referring to Table 17 as described above, in case that the value of slice_ts_residual_coding_disabled_flag is 1, the value of the transform coefficient (transform coefficient level) can be derived without using Qstate. For example, referring to Table 17, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be an absolute value of the transform coefficient derived based on a syntax element of the transform coefficient, and coeff_sign_flag[n] can be a syntax element of a sign flag indicating a sign of the transform coefficient.
[0369] Further, according to the present embodiment, if the value of slice_ts_residual_coding_disabled_flag is 1, the state of the dependent quantization can not be used for encoding the level value of the transform coefficient, and the state update can also not be performed. For example, the residual coding syntax according to the present embodiment can be as in the following table.
[0370] [Table 18]
[0371]
[0372]
[0373]
[0374]
[0375]
[0376] Referring to Table 18 as described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, Qstate can be updated. For example, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, QState can be updated to QStateTransTable[QState][AbsLevelPassl[xC][yC]&l] or QStateTransTable[QState][AbsLevel[xC][yC]&l]. Further, if the value of slice_ts_residual_coding_disabled_flag is 1, the process of updating Qstate can not be performed.
[0377] In addition, referring to Table 18 as described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of slice_ts_residual_coding_disabled_flag is 0, the value of the transform coefficient (transform coefficient level) can be derived based on QState. For example, referring to Table 18, the transform coefficient level TransCoeffLevel[x0][y0][cldx][xC][yC] can be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be an absolute value of the transform coefficient derived based on a syntax element of the transform coefficient, coeff_sign_flag[n] can be a syntax element of a sign flag indicating a sign of the transform coefficient, and (QState>1?1:0) can represent 1 in the case where the value of the state QState is greater than 1 (i.e., the value of the state Qstate is 2 or 3), and can represent 0 in the case where the value of the state Qstate is equal to or less than 1 (i.e., the value of the state Qstate is 0 or 1).
[0378] In addition, referring to Table 18 as described above, if the value of slice_ts_residual_coding_disabled_flag is 1, the value of the transform coefficient (transform coefficient level) can be derived without using Qstate. For example, referring to Table 18, the transform coefficient level TransCoeffLevel[x0][y0][cldx][xC][yC] can be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be an absolute value of the transform coefficient derived based on a syntax element of the transform coefficient, and coeff_sign_flag[n] can be a syntax element of a sign flag indicating a sign of the transform coefficient.
[0379] Further, the disclosure proposes another embodiment of the following correlation / limitation between dependent quantization and residual coding (i.e., coding of residual samples of transform skip blocks in the current slice by RRC) configured in the case of slice_ts_residual_coding_disabled_flag = 1. For example, the embodiment proposes the following scheme: in the process of deriving the value of the transform coefficient (transform coefficient level) depending on the state or state update of dependent quantization in RRC, a limit is added using transform_skip_flag. That is, the embodiment proposes the following scheme: based on transform_skip_flag, the process of deriving the value of the transform coefficient (transform coefficient level) is used not to depend on the state and / or state update of dependent quantization in RRC. The residual coding syntax according to the embodiment can be as in the following table.
[0380] [Table 19]
[0381]
[0382]
[0383]
[0384]
[0385]
[0386] Referring to Table 19 as described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, Qstate can be updated. For example, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, QState can be updated to QStateTransTable[QState][AbsLevelPass1[xC][yC]&1] or QStateTransTable[QState][AbsLevel[xC][yC]&1]. Further, if the value of transform_skip_flag is 1, the process of updating Qstate can not be performed.
[0387] In addition, referring to Table 19 as described above, if the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 0, the QState can be derived, and the value of the transform coefficient (transform coefficient level) can be derived based on the QState. For example, referring to Table 19, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as (2*AbsLevel[xC][yC]-(QState>1?1:0))*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be an absolute value of the transform coefficient derived based on a syntax element of the transform coefficient, coeff_sign_flag[n] can be a syntax element of a sign flag indicating a sign of the transform coefficient, and (QState>1?1:0) can indicate 1 in a case where the value of the state QState is greater than 1 (i.e., the value of the state QState is 2 or 3), and can indicate 0 in a case where the value of the state QState is equal to or less than 1 (i.e., the value of the state QState is 0 or 1).
[0388] In addition, referring to Table 19 as described above, if the value of transform_skip_flag is 1, the value of the transform coefficient (transform coefficient level) can be derived without using the QState. Accordingly, in a case where the residual data according to the RRC is encoded for the transform skip block, the value of the transform coefficient can be derived without using the QState. For example, referring to Table 19, the transform coefficient level TransCoeffLevel[x0][y0][cIdx][xC][yC] can be derived as AbsLevel[xC][yC]*(1-2*coeff_sign_flag[n]). Here, AbsLevel[xC][yC] can be an absolute value of the transform coefficient derived based on a syntax element of the transform coefficient, and coeff_sign_flag[n] can be a syntax element of a sign flag indicating a sign of the transform coefficient.
[0389] In addition, for example, the disclosure proposes an embodiment as shown in the following table.
[0390] [Table 20]
[0391]
[0392]
[0393] Referring to Table 20, a method of deriving ZeroPos of dec_abs_level based on ph_dep_quant_enabled_flag and transform_skip_flag can be selected. For example, when the value of ph_dep_quant_enabled_flag is 1 and the value of transform_skip_flag is 1, ZeroPos of dec_abs_level can be derived based on a formula that does not use the state value of dependent quantization. For example, as shown in Table 20 above, ZeroPos can be derived as 1<<cRiceParam.
[0394] In addition, for example, when the value of ph_dep_quant_enabled_flag is 0 or the value of transform_skip_flag is 0, ZeroPos of dec_abs_level can be derived according to the state value of dependent quantization.
[0395] In addition, the present disclosure proposes various embodiments related to the signaling of the above-described syntax element sh_ts_residual_coding_disabled_flag.
[0396] For example, as described above, sh_ts_residual_coding_disabled_flag is a syntax element that defines whether TSRC is not enabled, and in the case where a transform skip block is not used, it can not be necessary to signal sh_ts_residual_coding_disabled_flag. That is, signaling of sh_ts_residual_coding_disabled_flag can be important only in the case where a syntax element for whether a transform skip block is used indicates that a transform skip block is used.
[0397] Accordingly, the present disclosure proposes an embodiment in which sh_ts_residual_coding_disabled_flag is signaled only in the case where sps_transform_skip_enabled_flag is 1. Syntax according to the present embodiment is as in the following table.
[0398] [Table 21]
[0399]
[0400] Referring to Table 21, if sps_transform_skip_enabled_flag is 1, sh_ts_residual_coding_disabled_flag can be signaled, and if sps_transform_skip_enabled_flag is 0, sh_ts_residual_coding_disabled_flag can not be signaled. Here, for example, sps_transform_skip_enabled_flag can indicate whether or not a transform skip block is used. That is, for example, sps_transform_skip_enabled_flag can indicate whether or not transform skip is enabled. For example, if the value of sps_transform_skip_enabled_flag is 1, sps_transform_skip_enabled_flag can indicate that a transform skip flag (transform_skip_flag) can exist in a transform unit syntax, and if the value of sps_transform_skip_enabled_flag is 0, sps_transform_skip_enabled_flag can indicate that the transform skip flag does not exist in the transform unit syntax. Also, if sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag can be inferred to be 0. Also, the above-described sps_transform_skip_enabled_flag can be signaled in an SPS, or can be signaled in other high-level syntax (VPS, PPS, picture header syntax, and slice header syntax) or low-level syntax (slice data syntax, coding unit syntax, and transform unit syntax) other than the SPS. Also, it can be signaled before slice_ts_residual_coding_disabled_flag.
[0401] Also, the disclosure proposes an embodiment combining the above-described embodiments for the signaling of sh_ts_residual_coding_disabled_flag. For example, as in the following table, an embodiment for signaling sh_ts_residual_coding_disabled_flag can be proposed.
[0402] [Table 22]
[0403]
[0404] Referring to Table 22, sh ts residual coding disabled flag can be signaled in case that sps transform skip enabled flag is 1 or ph dep quant enabled flag is 0, otherwise sh ts residual coding disabled flag can not be signaled. Further, in case that sh ts residual coding disabled flag is not signaled, sh ts residual coding disabled flag can be inferred to be 0.
[0405] Further, for example, an embodiment for signaling sh ts residual coding disabled flag in the following table can be proposed.
[0406] [Table 23]
[0407]
[0408] Referring to Table 23, sh ts residual coding disabled flag can be signaled to picture header. sh ts residual coding disabled flag can be denoted as ph ts residual coding disabled flag. Further, referring to Table 23, ph dep quant enabled flag can be signaled to picture header.
[0409] For example, referring to Table 23, ph ts residual coding disabled flag can be signaled in case that ph dep quant enabled flag is 0 and sps transform skip enabled flag is 1, otherwise ph ts residual coding disabled flag can not be signaled. Further, in case that ph ts residual coding disabled flag is not signaled, ph ts residual coding disabled flag can be inferred to be 0.
[0410] In the existing video / image encoding standards described in the embodiments of the present disclosure, ph_dep_quant_enabled_flag can be signaled in the picture header syntax, and sh_ts_residual_coding_disabled_flag can be signaled in the slice header syntax. In this regard, the present disclosure proposes embodiments for signaling the two syntax elements in the same high-level syntax or low-level syntax.
[0411] For example, an embodiment in which both ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag are signaled in the picture header syntax can be proposed. In this case, sh_ts_residual_coding_disabled_flag can be referred to as ph_ts_residual_coding_disabled_flag.
[0412] In addition, for example, an embodiment in which both ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag are signaled in the slice header syntax can be proposed. In this case, ph_dep_quant_enabled_flag can be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or slice_dep_quant_enabled_flag.
[0413] In addition, for example, an embodiment in which both ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag are signaled in the same HLS, but ph_ts_residual_coding_disabled_flag is signaled only in the case where the value of ph_dep_quant_enabled_flag is 0, can be proposed. For example, an example in which both ph_dep_quant_enabled_flag and sh_ts_residual_coding_disabled_flag are signaled in the picture header syntax can be as in the following table.
[0414] [Table 24]
[0415]
[0416] Referring to Table 24, ph_dep_quant_enabled_flag can be signaled in the picture header syntax, and if the value of ph_dep_quant_enabled_flag is 0, ph_ts_residual_coding_disabled_flag can be signaled in the picture header syntax, while if the value of ph_dep_quant_enabled_flag is 1, ph_ts_residual_coding_disabled_flag can not be signaled. For example, if ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag can be inferred to be 0.
[0417] Further, the above-described embodiments are examples, and the following example can be proposed: ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in other high-level syntax (VPS, SPS, PPS, and slice header syntax) or low-level syntax (slice data syntax, coding unit syntax, and transform unit syntax) other than the picture header syntax.
[0418] In addition, for example, the following embodiment can be proposed: both ph_ts_residual_coding_disabled_flag and ph_dep_quant_enabled_flag are signaled in the same HLS, but ph_dep_quant_enabled_flag is signaled only in the case where the value of ph_ts_residual_coding_disabled_flag is 0.
[0419] [Table 25]
[0420]
[0421] Referring to Table 25, `ph_ts_residual_coding_disabled_flag` can be signaled in the image header syntax. If the value of `ph_ts_residual_coding_disabled_flag` is 0, then `ph_dep_quant_enabled_flag` can be signaled in the image header syntax; conversely, if the value of `ph_ts_residual_coding_disabled_flag` is 1, then `ph_dep_quant_enabled_flag` may not be signaled. For example, if `ph_dep_quant_enabled_flag` is not signaled, then `ph_dep_quant_enabled_flag` can be inferred to be 0.
[0422] Furthermore, the above implementation is an example, and the following examples can be proposed: ph_ts_residual_coding_disabled_flag and ph_dep_quant_enabled_flag signal notifications in other high-level syntaxes (VPS, SPS, PPS, and slice header syntax) or low-level syntaxes (slice data syntax, coding unit syntax, and transform unit syntax) instead of image header syntax.
[0423] Alternatively, implementations that combine the above-described implementations can be proposed. For example, the following implementation can be proposed: both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS, but ph_ts_residual_coding_disabled_flag is only signaled when the value of ph_dep_quant_enabled_flag is 0 or the value of sps_transform_skip_enabled_flag is 1.
[0424] [Table 26]
[0425]
[0426] Referring to Table 26, ph_dep_quant_enabled_flag can be signaled in the picture header syntax, and in the case where the value of ph_dep_quant_enabled_flag is 0 or the value of sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag can be signaled in the picture header syntax, otherwise, ph_ts_residual_coding_disabled_flag can not be signaled. Here, for example, sps_transform_skip_enabled_flag can indicate whether transform skip block is used. That is, for example, sps_transform_skip_enabled_flag can indicate whether transform skip is enabled. For example, if the value of sps_transform_skip_enabled_flag is 1, sps_transform_skip_enabled_flag can indicate that a transform skip flag (transform_skip_flag) can be present in the transform unit syntax, while if the value of sps_transform_skip_enabled_flag is 0, sps_transform_skip_enabled_flag can indicate that the transform skip flag is not present in the transform unit syntax. For example, if ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag can be inferred to be 0.
[0427] In addition, for example, the following implementation can be proposed: both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS (e.g., slice header syntax, etc.), but ph_ts_residual_coding_disabled_flag is signaled only in the case where the value of ph_dep_quant_enabled_flag is 0 and the value of sps_transform_skip_enabled_flag is 1.
[0428] [Table 27]
[0429]
[0430] Referring to Table 27, ph_dep_quant_enabled_flag can be signaled in the picture header syntax, and in the case where the value of ph_dep_quant_enabled_flag is 0 and the value of sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag can be signaled in the picture header syntax, otherwise, ph_ts_residual_coding_disabled_flag can not be signaled. For example, if ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag can be inferred to be 0.
[0431] In addition, for example, the following implementation can be proposed: both ph_dep_quant_enabled_flag and ph_ts_residual_coding_disabled_flag are signaled in the same HLS, but ph_ts_residual_coding_disabled_flag is signaled only in the case where the value of sps_transform_skip_enabled_flag is 1, and ph_dep_quant_enabled_flag is signaled only in the case where the value of ph_ts_residual_coding_disabled_flag is 0.
[0432] [Table 28]
[0433]
[0434] Referring to Table 28, if the value of sps_transform_skip_enabled_flag is 1, ph_ts_residual_coding_disabled_flag can be signaled in the picture header syntax, and if the value of ph_ts_residual_coding_disabled_flag is 0, ph_dep_quant_enabled_flag can be signaled in the picture header syntax. For example, if the value of sps_transform_skip_enabled_flag is 0, ph_ts_residual_coding_disabled_flag can not be signaled. For example, if ph_ts_residual_coding_disabled_flag is not signaled, ph_ts_residual_coding_disabled_flag can be inferred to be 0. Also, for example, if the value of ph_ts_residual_coding_disabled_flag is 1, ph_dep_quant_enabled_flag can not be signaled. For example, if ph_dep_quant_enabled_flag is not signaled, ph_dep_quant_enabled_flag can be inferred to be 0.
[0435] Further, as described above, the information (syntax elements) in the syntax tables disclosed in the disclosure can be included in the image / video information, configured / encoded by the encoding device, and transmitted to the decoding device in the form of a bitstream. The decoding device can parse / decode the information (syntax elements) in the corresponding syntax table. The decoding device can perform a block / image / video reconstruction process based on the decoded information.
[0436] In addition, the disclosure proposes various embodiments related to the signaling of the above-described syntax element sh_ts_residual_coding_disabled_flag.
[0437] For example, high coding efficiency can be obtained in a specific application (e.g., lossless encoding, etc.) by using slice_ts_residual_coding_disabled_flag as described above, but in the existing video / image encoding standard, there is no proposal to limit the case where slice_ts_residual_coding_disabled_flag is used together for sign data hiding (SDH).
[0438] Here, the sign data hiding method can be as follows. In deriving the transform coefficients, the sign of the transform coefficients can be derived based on a 1-bit sign flag (syntax element coeff_sign_flag described above). In this regard, the SDH can indicate a technique of omitting explicit signaling of coeff_sign_flag for a first significant transform coefficient in a subblock / group of coefficients (CG) in order to improve coding efficiency. Here, the value of coeff_sign_flag for the first significant transform coefficient can be derived based on a sum of absolute levels (i.e., absolute values) of significant transform coefficients in the corresponding subblock / group of coefficients. That is, the sign of the first significant transform coefficient can be derived based on the sum of absolute levels of significant transform coefficients in the corresponding subblock / group of coefficients. Further, the significant transform coefficients can mean non-zero transform coefficients whose (absolute) values are not 0. For example, when the sum of absolute levels of significant transform coefficients is even, the value of coeff_sign_flag for the first significant transform coefficient can be derived as 1, and when the sum of absolute levels of significant transform coefficients is odd, the value of coeff_sign_flag for the first significant transform coefficient can be derived as 0. In other words, for example, when the sum of absolute levels of significant transform coefficients is even, the value of coeff_sign_flag for the first significant transform coefficient can be derived as a negative value, and when the sum of absolute levels of significant transform coefficients is odd, the value of coeff_sign_flag for the first significant transform coefficient can be derived as a positive value. Or, for example, when the sum of absolute levels of significant transform coefficients is even, the value of coeff_sign_flag for the first significant transform coefficient can be derived as 0, and when the sum of absolute levels of significant transform coefficients is odd, the value of coeff_sign_flag for the first significant transform coefficient can be derived as 1. In other words, for example, when the sum of absolute levels of significant transform coefficients is even, the value of coeff_sign_flag for the first significant transform coefficient can be derived as a positive value, and when the sum of absolute levels of significant transform coefficients is odd, the value of coeff_sign_flag for the first significant transform coefficient can be derived as a negative value.
[0439] For example, the SDH in the residual syntax can be as shown in the following table.
[0440] [Table 29]
[0441]
[0442] Referring to Table 29, a variable signHiddenFlag can indicate whether to apply SDH. The variable signHiddenFlag can be referred to as signHidden. For example, when the value of the variable signHiddenFlag is 0, the variable signHiddenFlag can indicate not to apply SDH, and when the value of the variable signHiddenFlag is 1, the variable signHiddenFlag can indicate to apply SDH. For example, the value of the variable signHiddenFlag can be set based on signaled flag information (e.g., sh_sign_data_hiding_used_flag or pic_sign_data_hiding_enabled_flag or sps_sign_data_hiding_enabled_flag). Also, for example, the value of the variable signHiddenFlag can be set based on lastSigScanPosSb and firstSigScanPosSb. Here, lastSigScanPosSb can indicate the position of the last significant transform coefficient searched in the corresponding sub-block / tile according to the scan order, and firstSigScanPosSb can indicate the position of the first significant transform coefficient searched in the corresponding sub-block / tile according to the scan order. Generally, lastSigScanPosSb can be located in a relatively high frequency component region than firstSigScanPosSb. Accordingly, when lastSigScanPosSb - firstSigScanPosSb is greater than a predetermined threshold, the signHidden value can be derived as 1 (i.e., to apply SDH), otherwise the signHidden value can be derived as 0 (i.e., not to apply SDH). Here, for example, referring to Table 29, the threshold can be set to 3.
[0443] Furthermore, when the sign data hiding is activated in the high level syntax (VPS, SPS, PPS, slice header syntax, etc.) or the low level syntax (slice data syntax, coding unit syntax, transform unit syntax, etc.) and slice_ts_residual_coding_disabled_flag is 1, the sign data hiding process of RRC can be used for lossless coding. Accordingly, it can be impossible for lossless coding to occur due to incorrect settings in the encoding device. Alternatively, when lossy coding (i.e., irreversible encoding method) other than lossless coding is applied and the residual signal of transform skip is coded using RRC and at the same time BDPCM is applied, although the interval in which the residual value becomes 0 due to the difference between the residuals in BDPCM occurs more frequently than in the general case, since SDH is performed according to the SDH application condition, it can be possible for encoding loss to occur. Specifically, for example, when there are valid transform coefficients (non-zero residual data) at positions 0 and 15 in the CG respectively and the values of the transform coefficients at the remaining positions in the CG are 0, SDH can be applied to the CG according to the above-described SDH application condition, and thus the sign data (i.e., coding of the sign flag) of the first valid transform coefficient of the CG can be omitted. Accordingly, in this case, it can be possible to adjust only the parity of the two residual data of the CG in the quantization step to omit the sign data, and more encoding loss can occur than in the case where SDH is not applied. This situation can even occur in a block where BDPCM is not applied, but since the level is lowered by the difference from the neighboring residual due to the characteristics of BDPCM, the disadvantageous situation can occur more frequently when SDH is applied.
[0444] Accordingly, in order to prevent SDH and residual coding of slice_ts_residual_coding_disabled_flag = 1 (i.e., coding of the residual samples of the transform skip block in the current slice using RRC) from being used together to cause unexpected encoding loss or failure, the present disclosure proposes an embodiment for setting the correlation / dependency between the two technologies.
[0445] For example, the present disclosure proposes a method in which slice_ts_residual_coding_disabled_flag depends on pic_sign_data_hiding_enabled_flag. The residual coding syntax according to the present embodiment can be as in the following table.
[0446] [Table 30]
[0447]
[0448] Here, the slice_ts_residual_coding_disabled_flag can be signaled as a slice header syntax or a high level syntax (HLS) (e.g., SPS syntax / VPS syntax / DPS syntax, etc.) other than the slice header syntax or a low level (CU / TU). In addition, the pic_sign_data_hiding_enabled_flag can be signaled in a picture header syntax or a high level syntax (HLS) (e.g., SPS syntax / VPS syntax / DPS syntax, etc.) other than the picture header syntax or a 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 can be referred to as another name. For example, the pic_sign_data_hiding_enabled_flag can be represented by sps_sign_data_hiding_enabled_flag.
[0449] In addition, the sps_sign_data_hiding_enabled_flag can be a flag indicating whether or not the sign data hiding is enabled. That is, for example, the pic_sign_data_hiding_enabled_flag can indicate whether or not the sign data hiding is enabled. For example, when the value of the sps_sign_data_hiding_enabled_flag is 1, the sps_sign_data_hiding_enabled_flag can indicate that the sign data hiding is enabled, and when the value of the sps_sign_data_hiding_enabled_flag is 0, the sps_sign_data_hiding_enabled_flag can indicate that the sign data hiding is not enabled.
[0450] According to Table 30 in which the present embodiment is disclosed, the slice_ts_residual_coding_disabled_flag can be signaled only when the sign data hiding is not enabled. In addition, when the sign data hiding is enabled, the slice_ts_residual_coding_disabled_flag can not be signaled, and the value of the slice_ts_residual_coding_disabled_flag can be inferred to be 0 (the residual samples of the transform skip block in the current slice are encoded with the TSRC syntax) or 1 (the residual samples of the transform skip block in the current slice are encoded with the RRC syntax).
[0451] In addition, the present disclosure proposes an implementation of the above-described implementation for signaling of sh ts residual coding disabled flag. For example, the implementation of signaling of sh ts residual coding disabled flag can be proposed as shown in the following table.
[0452] [Table 31]
[0453]
[0454] Referring to Table 31, when 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 can be signaled, otherwise sh ts residual coding disabled flag can not be signaled. On the other hand, when sh ts residual coding disabled flag is not signaled, sh ts residual coding disabled flag can be inferred to be 0.
[0455] Further, the implementation of Table 31 is an example, and the following example can be proposed: ph dep quant enabled flag, pic sign data hiding enabled flag, and sh ts residual coding disabled flag are all signaled in the same HLS (e.g., slice header syntax, etc.).
[0456] Alternatively, for example, the implementation of signaling of sh ts residual coding disabled flag can be proposed as shown in the following table.
[0457] [Table 32]
[0458]
[0459] Referring to Table 32, sh_ts_residual_coding_disabled_flag can be signaled when ph_dep_quant_enabled_flag is 0 and pic_sign_data_hiding_enabled_flag is 0, otherwise sh_ts_residual_coding_disabled_flag can not be signaled. On the other hand, when sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag can be inferred to be 0.
[0460] Furthermore, the embodiment of Table 32 is an example, and the following example can be proposed: ph_dep_quant_enabled_flag, pic_sign_data_hiding_enabled_flag, and sh_ts_residual_coding_disabled_flag are all signaled in the same HLS (e.g., slice header syntax, etc.).
[0461] Alternatively, for example, the following embodiment of signaling sh_ts_residual_coding_disabled_flag as shown in the table below can be proposed.
[0462] [Table 33]
[0463]
[0464] Referring to Table 33, sh_ts_residual_coding_disabled_flag can be signaled when ph_dep_quant_enabled_flag is 0 or pic_sign_data_hiding_enabled_flag is 0, otherwise sh_ts_residual_coding_disabled_flag can not be signaled. On the other hand, when sh_ts_residual_coding_disabled_flag is not signaled, sh_ts_residual_coding_disabled_flag can be inferred to be 0.
[0465] Further, the present disclosure proposes the following embodiments: the 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 low-level syntax.
[0466] For example, the following embodiment can be proposed: 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.
[0467] [Table 34]
[0468]
[0469] In this case, slice_ts_residual_coding_disabled_flag can be referred to as ph_ts_residual_coding_disabled_flag.
[0470] Referring to Table 34, ph_ts_residual_coding_disabled_flag can be signaled in the picture header syntax, and when the value of ph_ts_residual_coding_disabled_flag is 0, ph_dep_quant_enabled_flag can be signaled in the picture header syntax if the value of sps_dep_quant_enabled_flag is 1. Further, when the value of ph_ts_residual_coding_disabled_flag is 0, pic_sign_data_hiding_enabled_flag can be signaled in the picture header syntax if the value of sps_sign_data_hiding_enabled_flag is 1 and ph_dep_quant_enabled_flag is 0. In addition, 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 can not be signaled.
[0471] Alternatively, for example, the following implementation can be proposed as shown in the following table: 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.
[0472] [Table 35]
[0473]
[0474] Referring to Table 35, when the value of sps_transform_skip_enabled_flag is 1, ph ts residual coding disabled flag can be signaled in the picture header syntax. In addition, for example, when the value of sps_transform_skip_enabled_flag is 0, ph ts residual coding disabled flag can not be signaled. When ph ts residual coding disabled flag is not signaled, ph ts residual coding disabled flag can be inferred to be 0 in the decoding device.
[0475] In addition, referring to Table 35, 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 can be signaled in the picture header syntax. In addition, when the value of ph_ts_residual_coding_disabled_flag is 0, if 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 can be signaled in the picture header syntax. Further, 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 can not be signaled. In addition, for example, when ph_dep_quant_enabled_flag is not signaled, ph_dep_quant_enabled_flag can be inferred as 0 in the decoding device. In addition, for example, when pic_sign_data_hiding_enabled_flag is not signaled, pic_sign_data_hiding_enabled_flag can be inferred as 0 in the decoding device.
[0476] Further, the above-described embodiments are examples, and the following examples can be proposed: ph_ts_residual_coding_disabled_flag, ph_dep_quant_enabled_flag, and pic_sign_data_hiding_enabled_flag are signaled in high-level syntax (VPS, SPS, PPS, slice header syntax, etc.) or low-level syntax (slice data syntax, coding unit syntax, etc.) other than the picture header syntax.
[0477] Further, as described above, the information (syntax elements) in the syntax tables disclosed in the present disclosure can be included in image / video information, and can be configured / encoded in the encoding device and transmitted to the decoding device in the form of a bitstream. The decoding device can parse / decode the information (syntax elements) in the corresponding syntax table. The decoding device can perform a block / image / video reconstruction process based on the decoded information.
[0478] Figure 14 A picture encoding method performed by an encoding device according to the present disclosure is briefly exemplified.Figure 14 The method disclosed in the article can be derived from Figure 2 The encoding device disclosed in the document executes the commands. Specifically, for example, Figure 14 The S1400 can be executed by the predictor of the encoding device. Figure 14 S1410 can be executed by the subtractor of the encoding device, and Figure 14 S1420 to S1440 can be performed by the entropy encoder of the encoding device. Additionally, although not illustrated, the process of generating reconstructed samples and a reconstructed image of the current block based on the residual samples and predicted samples of the current block can be performed by the adder of the encoding device.
[0479] The encoding device encodes a dependency quantization enable flag for determining whether dependency quantization is enabled (S1400). The encoding device can encode the dependency quantization enable flag for determining whether dependency quantization is enabled. Image information may include the dependency quantization enable flag. For example, the encoding device can determine whether dependency quantization is enabled for a block of images in the sequence, and can encode the dependency quantization enable flag for determining whether dependency quantization is enabled. For example, the dependency quantization enable flag can be a flag indicating whether dependency quantization is enabled. For example, the dependency quantization enable flag can indicate whether dependency quantization is enabled. That is, for example, the dependency quantization enable flag can indicate whether dependency quantization is enabled for a block of images in the sequence. For example, the dependency quantization enable flag can indicate whether a dependency quantization usage flag indicating whether dependency quantization is used for the current slice exists. For example, a dependency quantization enable flag with a value of 1 can indicate that dependency quantization is enabled, and a dependency quantization enable flag with a value of 0 can indicate that dependency quantization is not enabled. Additionally, for example, the dependency quantization enable flag can be signaled in the SPS syntax or slice header syntax. The syntax element of the dependency quantization enable flag can be the sps_dep_quant_enabled_flag mentioned above. sps_dep_quant_enabled_flag can be called sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.
[0480] The encoding device encodes a sign data hiding enabled flag for whether to enable sign data hiding (S1410). The encoding device can encode a sign data hiding enabled flag for whether to enable sign data hiding. The image information can include the sign data hiding enabled flag. For example, the encoding device can determine whether to enable sign data hiding for blocks of pictures in a sequence, and can encode a sign data hiding enabled flag for whether to enable sign data hiding. For example, the sign data hiding enabled flag can be a flag for whether to enable sign data hiding. For example, the sign data hiding enabled flag can indicate whether to enable sign data hiding. That is, for example, the sign data hiding enabled flag can indicate whether to enable sign data hiding for blocks of pictures in a sequence. For example, the sign data hiding enabled flag can indicate whether there can be a sign data hiding used flag that indicates whether to use sign data hiding for a current slice. For example, the sign data hiding enabled flag having a value of 1 can indicate to enable sign data hiding, and the sign data hiding enabled flag having a value of 0 can indicate not to enable sign data hiding. For example, the sign data hiding enabled flag having a value of 1 can indicate that there can be a sign data hiding used flag, and the sign data hiding enabled flag having a value of 0 can indicate that there is not a sign data hiding used flag. Also, for example, the sign data hiding enabled flag can be signaled in a SPS syntax. Alternatively, for example, the sign data hiding enabled flag can be signaled in a picture header syntax or a slice header syntax. A syntax element of the sign data hiding enabled flag can be sps_sign_data_hiding_enabled_flag.
[0481] The encoding device encodes a transform skip residual coding (TSRC) enabled flag for whether to enable TSRC based on the dependency quantization enabled flag and the sign data hiding enabled flag (S1420). The image information can include the TSRC enabled flag.
[0482] For example, the encoding device can encode the TSRC enabling flag based on the dependent quantization enabling flag and the sign data hiding enabling flag. For example, the TSRC enabling flag can be encoded based on the dependent quantization enabling flag having a value of 0 and the sign data hiding enabling flag having a value of 0. That is, for example, the TSRC enabling flag can be encoded when the value of the dependent quantization enabling flag is 0 (i.e., the dependent quantization enabling flag indicates that the dependent quantization is not enabled) and the value of the sign data hiding enabling flag is 0 (i.e., the sign data hiding enabling flag indicates that the sign data hiding is not enabled). In other words, for example, the TSRC enabling flag can be signaled when the value of the dependent quantization enabling flag is 0 (i.e., the dependent quantization enabling flag indicates that the dependent quantization is not enabled) and the value of the sign data hiding enabling flag is 0 (i.e., the sign data hiding enabling flag indicates that the sign data hiding is not enabled). In addition, for example, when the value of the sign data hiding enabling flag is 1, the TSRC enabling flag can not be encoded and the value of the TSRC enabling flag can be derived as 0 in the decoding device. That is, for example, when the value of the sign data hiding enabling flag is 1, the TSRC enabling flag can not be signaled and the value of the TSRC enabling flag can be derived as 0 in the decoding device. In addition, for example, when the value of the dependent quantization enabling flag is 1, the TSRC enabling flag can not be encoded and the value of the TSRC enabling flag can be derived as 0 in the decoding device. That is, for example, when the value of the dependent quantization enabling flag is 1 (i.e., when the dependent quantization is applied (or used) to the current block), the TSRC enabling flag can not be signaled and the value of the TSRC enabling flag can be derived as 0 in the decoding device. Accordingly, for example, the TSRC enabling flag can be signaled (or encoded) when the dependent quantization and the sign data hiding are not enabled for the current block. The TSRC enabling flag can not be signaled (or encoded) when the dependent quantization and / or the sign data hiding is enabled for the current block and the value of the TSRC enabling flag can be derived as 0 in the decoding device. Here, the current block can be a coding block (CB) or a transform block (TB).
[0483] Here, for example, the TSRC enabling flag can be a flag for whether the TSRC is enabled. That is, for example, the TSRC enabling flag can be a flag indicating whether the TSRC is enabled for a block in a slice. For example, the TSRC enabling flag having a value of 1 can indicate that the TSRC is not enabled and the TSRC enabling flag having a value of 0 can indicate that the TSRC is enabled. In addition, for example, the TSRC enabling flag can be signaled in a slice header syntax. A syntax element of the TSRC enabling flag can be the sh_ts_residual_coding_disabled_flag described above.
[0484] Further, for example, the encoding device can encode a transform skip enabled flag for whether transform skip is enabled. The image information can include the transform skip enabled flag. For example, the encoding device can determine whether transform skip is enabled for a block of a picture in a sequence and can encode a transform skip enabled flag for whether transform skip is enabled. For example, the transform skip enabled flag can be a flag for whether transform skip is enabled. For example, the transform skip enabled flag can indicate whether transform skip is enabled. That is, for example, the transform skip enabled flag can indicate whether transform skip is enabled for a block of a picture in a sequence. For example, the transform skip enabled flag can indicate whether a transform skip flag can be present. For example, the transform skip enabled flag having a value of 1 can indicate that transform skip is enabled and the transform skip enabled flag having a value of 0 can indicate that transform skip is not enabled. That is, for example, the transform skip enabled flag having a value of 1 can indicate that the transform skip flag can be present and the transform skip enabled flag having a value of 0 can indicate that the transform skip flag is not present. Additionally, for example, the transform skip enabled flag can be signaled to a sequence parameter set (SPS) syntax. The syntax element of the transform skip enabled flag can be the aforementioned sps transform skip enabled flag.
[0485] Additionally, for example, the TSRC enabled flag can be encoded based on the sign data hiding enabled flag, the dependent quantization enabled flag, and / or the transform skip enabled flag. For example, the TSRC enabled flag can be encoded based on the sign data hiding enabled flag having a value of 0, the dependent quantization enabled flag having a value of 0, and the transform skip enabled flag having a value of 1. That is, for example, when the value of the sign data hiding enabled flag is 0 (i.e., the sign data hiding enabled flag indicates that sign data hiding is not enabled), the value of the dependent quantization enabled flag is 0 (i.e., the dependent quantization enabled flag indicates that dependent quantization is not enabled), and the value of the transform skip enabled flag is 1 (i.e., the transform skip enabled flag indicates that transform skip is enabled), the TSRC enabled flag can be encoded (or signaled). Additionally, for example, when the value of the dependent quantization enabled flag is 1, the TSRC enabled flag can not be encoded and the value of the TSRC enabled flag can be derived to be 0 in the decoding device. That is, for example, when the value of the dependent quantization enabled flag is 1, the TSRC enabled flag can not be signaled and the value of the TSRC enabled flag can be derived to be 0 in the decoding device. Additionally, for example, when the value of the transform skip enabled flag is 0, the TSRC enabled flag can not be encoded and the value of the TSRC enabled flag can be derived to be 0. That is, for example, when the value of the transform skip enabled flag is 0, the TSRC enabled flag can not be signaled and the value of the TSRC enabled flag can be derived to be 0.
[0486] The encoding device encodes the residual information of the current block based on the TSRC enabling flag (S1430). The encoding device can encode the residual information of the current block based on the TSRC enabling flag.
[0487] For example, the encoding device can determine the residual coding syntax of the current block based on the TSRC enabling flag. For example, the encoding device can determine the residual coding syntax of the current block as one of a regular residual coding (RRC) syntax and a transform skip residual coding (TSRC) syntax based on the TSRC enabling flag. The RRC syntax can denote a syntax according to the RRC, and the TSRC syntax can denote a syntax according to the TSRC.
[0488] For example, based on the TSRC enabling flag having the value 1, the residual coding syntax of the current block can be determined as a regular residual coding (RRC) syntax. In this case, for example, a transform skip flag for whether the current block is a transform skip block can be encoded, and the value of the transform skip flag can be 1. For example, the image information can include the transform skip flag of the current block. The transform skip flag can denote whether the current block is a transform skip block. That is, the transform skip flag can denote whether a transform has been applied to the transform coefficients of the current block. The syntax element denoting the transform skip flag can be transform_skip_flag as described above. For example, if the value of the transform skip flag is 1, the transform skip flag can denote that a transform has not been applied to the current block (i.e., skip transform), and if the value of the transform skip flag is 0, the transform skip flag can denote that a transform has been applied to the current block. For example, if the current block is a transform skip block, the value of the transform skip flag of the current block can be 1.
[0489] In addition, for example, based on the TSRC enabling flag having the value 0, the residual coding syntax of the current block can be determined as a transform skip residual coding (TSRC) syntax. In addition, for example, a transform skip flag for whether the current block is a transform skip block can be encoded, and based on the transform skip flag having the value 1 and the TSRC enabling flag having the value 0, the residual coding syntax of the current block can be determined as a transform skip residual coding (TSRC) syntax. In addition, for example, a transform skip flag for whether the current block is a transform skip block can be encoded, and based on the transform skip flag having the value 0 and the TSRC enabling flag having the value 0, the residual coding syntax of the current block can be determined as a regular residual coding (RRC) syntax.
[0490] Thereafter, for example, the encoding device can encode residual information of the determined residual coding syntax for the current block. The encoding device can derive the residual samples of the current block and can encode the determined residual information of the residual coding syntax for the residual samples of the current block. For example, the residual information of the regular residual coding (RRC) syntax can be encoded based on the TSRC enable flag having a value of 1 and the residual information of the TSRC syntax can be encoded based on the TSRC enable flag having a value of 0. The image information can include the residual information.
[0491] For example, the encoding device can determine whether to perform inter prediction or intra prediction for the current block and can determine a particular inter prediction mode or a particular intra prediction mode based on the RD cost. According to the determined mode, the encoding device can derive the prediction samples of the current block and can derive the residual samples of the current block by subtracting the prediction samples from the original samples of the current block.
[0492] Then, for example, the encoding device can derive the transform coefficients of the current block based on the residual samples. For example, the encoding device can determine whether to apply a transform to the current block. That is, the encoding device can determine whether to apply a transform to the residual samples of the current block. The encoding device can determine whether to apply the transform to the current block considering the encoding efficiency. For example, the encoding device can determine not to apply the transform to the current block. The block for which the transform is not applied can be denoted as a transform skipped block. That is, for example, the current block can be a transform skipped block.
[0493] If the transform is not applied to the current block, that is, if the transform is not applied to the residual samples, the encoding device can derive the derived residual samples as the current transform coefficients. In addition, if the transform is applied to the current block, that is, if the transform is applied to the residual samples, the encoding device can derive the transform coefficients by performing the transform on the residual samples. The current block can include a plurality of sub-blocks or a coefficient group (CG). In addition, the size of the sub-block of the current block can be a 4x4 size or a 2x2 size. That is, the sub-block of the current block can include at most 16 non-zero transform coefficients or 4 non-zero transform coefficients. Here, the current block can be a coding block (CB) or a transform block (TB). In addition, the transform coefficients can be denoted as residual coefficients.
[0494] Further, the encoding device can determine whether to apply dependent quantization for the current block. For example, if dependent quantization is applied for the current block, the encoding device can derive transform coefficients of the current block by performing a dependent quantization process on the transform coefficients. For example, if dependent quantization is applied for the current block, the encoding device can update a state (Qstate) of the dependent quantization based on a coefficient level of a transform coefficient that immediately precedes a current transform coefficient in a scan order, can derive a coefficient level of the current transform coefficient based on the updated state and a syntax element of the current transform coefficient, and can derive the current transform coefficient by quantizing the derived coefficient level. For example, the current transform coefficient can be quantized based on a quantization parameter of a reconstructed level of the current transform coefficient in a scalar quantizer for the updated state.
[0495] For example, if the residual coding syntax of the current block is determined to be the RRC syntax, the encoding device can encode residual information of the RRC syntax of the current block. For example, the residual information of the RRC syntax can include syntax elements disclosed in Table 2 as described above.
[0496] For example, the residual information of the RRC syntax can include syntax elements of transform coefficients of the current block. Here, the transform coefficients can be represented as residual coefficients.
[0497] For example, the syntax elements can include syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, 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.
[0498] Specifically, for example, the syntax elements can include position information representing a position of a last non-zero transform coefficient in a residual coefficient array of the current block. That is, the syntax elements can include position information representing a position of a last non-zero transform coefficient in a scan order of the current block. The position information can include information of a prefix representing a column position of the last non-zero transform coefficient, information of a prefix representing a row position of the last non-zero transform coefficient, information of a suffix representing the column position of the last non-zero transform coefficient, and information of a suffix representing the row position of the last non-zero transform coefficient. Syntax elements of the position information can be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. Also, the non-zero transform coefficient can be referred to as a significant coefficient.
[0499] In addition, for example, the syntax elements can include a coded sub-block flag representing whether a current sub-block of the current block includes a non-zero transform coefficient, a significant coefficient flag representing whether a transform coefficient of the current block is a non-zero transform coefficient, a first coefficient level flag for whether a coefficient level for the transform coefficient is greater than a first threshold, a parity level flag for a parity of the coefficient level, and / or a second coefficient level flag for whether the coefficient level for the transform coefficient is greater than a second threshold. Here, the coded sub-block flag can be sb_coded_flag or coded_sub_block_flag, the significant coefficient flag can be sig_coeff_flag, the first coefficient level flag can be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag can be par_level_flag, and the second coefficient level flag can be abs_level_gt3_flag or abs_level_gtx_flag.
[0500] In addition, for example, the syntax elements can include coefficient value related information of a transform coefficient value of the current block. The coefficient value related information can be abs_remainder and / or dec_abs_level.
[0501] In addition, for example, the syntax elements can include a sign flag representing a sign of a transform coefficient. The sign flag can be coeff_sign_flag.
[0502] Further, for example, when sign data hiding is applied to the current block, a sign flag of a first significant transform coefficient of a current coefficient group (CG) in the current block can not be encoded and signaled. That is, for example, when sign data hiding is applied to the current block, the syntax elements can not include a sign flag representing a sign of the first significant transform coefficient. Further, for example, whether sign data hiding is applied to the current block can be derived based on a sign data hiding enabled flag and / or a position of the first significant transform coefficient of the current CG and a position of the last significant transform coefficient. For example, when a value of the sign data hiding enabled flag is 1 and a value obtained by subtracting the position of the first significant transform coefficient from the position of the last significant transform coefficient is greater than 3 (i.e., when the value of the sign data hiding enabled flag is 1 and a number of significant transform coefficients in the current CG is greater than 3), sign data hiding can be applied to the current CG of the current block.
[0503] In addition, for example, if the residual coding syntax of the current block is determined to be the TSRC syntax, the encoding device can encode the residual information of the TSRC syntax of the current block. For example, the residual information of the TSRC syntax can include the syntax elements disclosed in Table 3 as described above.
[0504] For example, the residual information of the TSRC syntax can include syntax elements for transform coefficients of the current block. Here, the transform coefficients can be represented as residual coefficients.
[0505] For example, the syntax elements can include context-coded syntax elements and / or bypass-coded syntax elements for the transform coefficients. The syntax elements can 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.
[0506] For example, the context-coded syntax elements of the transform coefficient can include a significant coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a sign flag indicating a sign of the transform coefficient, a first coefficient level flag for whether a coefficient level of the transform coefficient is greater than a first threshold, and / or a parity level flag for a parity of a transform level of the transform coefficient. In addition, for example, the context-coded syntax elements can include a second coefficient level flag for whether the coefficient level of the transform coefficient is greater than a second threshold, a third coefficient level flag for whether the coefficient level of the transform coefficient is greater than a third threshold, a fourth coefficient level flag for whether the coefficient level of the transform coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag for whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the significant coefficient flag can be sig_coeff_flag, the sign flag can be ceff_sign_flag, the first coefficient level flag can be abs_level_gt1_flag, and the parity level flag can be par_level_flag. In addition, the second coefficient level flag can be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag can be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag can be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag can be abs_level_gt9_flag or abs_level_gtx_flag.
[0507] In addition, for example, the bypass-coded syntax elements of the transform coefficient can include coefficient level information of a value of the transform coefficient (or a coefficient level) and / or a sign flag indicating a sign of the transform coefficient. The coefficient level information can be abs_remainder and / or dec_abs_level, and the sign flag can be ceff_sign_flag.
[0508] The encoding device generates a bitstream including the dependent quantization enabled flag, the sign data hiding enabled flag, the TSRC enabled flag, and the residual information (S1440). For example, the encoding device can output the image information including the dependent quantization enabled flag, the sign data hiding enabled flag, the TSRC enabled flag, and the residual information as a bitstream. The bitstream can include the dependent quantization enabled flag, the sign data hiding enabled flag, the TSRC enabled flag, and the residual information. In addition, the bitstream can further include the transform skipping enabled flag.
[0509] In addition, the image information can include prediction-related information of the current block. The prediction-related information can include prediction mode information about an inter prediction mode or an intra prediction mode performed on the current block.
[0510] Further, the bitstream can be transmitted to a decoding device through a network or a (digital) storage medium. Here, the network can include a broadcasting network and / or a communication network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.
[0511] Figure 15 An image encoding method performed by an encoding device according to the disclosure is briefly illustrated. Figure 14 The method disclosed in Figure 15 may be performed by an encoding device. Specifically, for example, Figure 15 The entropy encoder of the encoding device of Figure 14 may perform S1400 to S1440 in . In addition, although not illustrated, the process of deriving the prediction sample can be performed by a predictor of the encoding device, the process of deriving the residual sample of the current block based on the original sample and the prediction sample of the current block can be performed by a subtracter of the encoding device, and the process of generating the reconstructed sample of the current block and the reconstructed picture based on the residual sample and the prediction sample of the current block can be performed by an adder of the encoding device.
[0512] Figure 16 An image decoding method performed by a decoding device according to the disclosure is briefly illustrated. Figure 16 The method disclosed in Figure 3 may be performed by a decoding device. Specifically, for example, Figure 16 S1600 to S1630 in may be performed by an entropy decoder of the decoding device, Figure 16 S1640 in may be performed by a residual processor of the decoding device, and Figure 16 S1650 in may be performed by an adder of the decoding device. In addition, although not illustrated, the process of receiving the prediction information of the current block can be performed by the entropy decoder of the decoding device, and the process of deriving the prediction sample of the current block can be performed by a predictor of the decoding device.
[0513] The decoding device obtains a dependent quantization enabled flag for whether dependent quantization is enabled (S1600). The decoding device can obtain image information including the dependent quantization enabled flag through a bitstream. The image information can include the dependent quantization enabled flag. For example, the dependent quantization enabled flag can be a flag for whether dependent quantization is enabled. For example, the dependent quantization enabled flag can indicate whether dependent quantization is enabled. That is, for example, the dependent quantization enabled flag can indicate whether dependent quantization is enabled for blocks of pictures in a sequence. For example, the dependent quantization enabled flag can indicate whether there can be a dependent quantization used flag indicating whether dependent quantization is used for a current slice. For example, the dependent quantization enabled flag having a value of 1 can indicate that dependent quantization is enabled, and the dependent quantization enabled flag having a value of 0 can indicate that dependent quantization is not enabled. Also, for example, the dependent quantization enabled flag can be signaled in an SPS syntax or a slice header syntax. A syntax element of the dependent quantization enabled flag can be the above-described sps_dep_quant_enabled_flag. The sps_dep_quant_enabled_flag can be referred to as sh_dep_quant_enabled_flag, sh_dep_quant_used_flag, or ph_dep_quant_enabled_flag.
[0514] The decoding device obtains a sign data hiding enabled flag for whether sign data hiding is enabled (S1610). The decoding device can obtain image information including the sign data hiding enabled flag through a bitstream. The image information can include the sign data hiding enabled flag. For example, the sign data hiding enabled flag can be a flag for whether sign data hiding is enabled. For example, the sign data hiding enabled flag can indicate whether sign data hiding is enabled. That is, for example, the sign data hiding enabled flag can indicate whether sign data hiding is enabled for blocks of pictures in a sequence. For example, the sign data hiding enabled flag can indicate whether there can be a sign data hiding used flag indicating whether sign data hiding is used for a current slice. For example, the sign data hiding enabled flag having a value of 1 can indicate that sign data hiding is enabled, and the sign data hiding enabled flag having a value of 0 can indicate that sign data hiding is not enabled. For example, the sign data hiding enabled flag having a value of 1 can indicate that there can be a sign data hiding used flag, and the sign data hiding enabled flag having a value of 0 can indicate that there is no sign data hiding used flag. Also, for example, the sign data hiding enabled flag can be signaled in an SPS syntax. Alternatively, for example, the sign data hiding enabled flag can be signaled in a picture header syntax or a slice header syntax. A syntax element of the sign data hiding enabled flag can be sps_sign_data_hiding_enabled_flag.
[0515] The decoding device obtains a transform skip residual coding (TSRC) enabled flag for whether TSRC is enabled based on the dependent quantization enabled flag and the sign data hiding enabled flag (S1620). The image information can include the TSRC enabled flag.
[0516] For example, the decoding device can obtain the TSRC enabled flag based on the dependent quantization enabled flag and the sign data hiding enabled flag. For example, the TSRC enabled flag can be obtained based on the dependent quantization enabled flag having a value of 0 and the sign data hiding enabled flag having a value of 0. That is, for example, when the value of the dependent quantization enabled flag is 0 (i.e., the dependent quantization enabled flag indicates that dependent quantization is not enabled) and the value of the sign data hiding enabled flag is 0 (i.e., the sign data hiding enabled flag indicates that sign data hiding is not enabled), the TSRC enabled flag can be obtained. In other words, for example, when the value of the dependent quantization enabled flag is 0 (i.e., the dependent quantization enabled flag indicates that dependent quantization is not enabled) and the value of the sign data hiding enabled flag is 0 (i.e., the sign data hiding enabled flag indicates that sign data hiding is not enabled), the TSRC enabled flag can be signaled. In addition, for example, when the value of the sign data hiding enabled flag is 1, the TSRC enabled flag can not be obtained and the value of the TSRC enabled flag can be derived to be 0. That is, for example, when the value of the sign data hiding enabled flag is 1, the TSRC enabled flag can not be signaled and the value of the TSRC enabled flag can be derived to be 0. In addition, for example, when the value of the dependent quantization enabled flag is 1, the TSRC enabled flag can not be obtained and the value of the TSRC enabled flag can be derived to be 0. That is, for example, when the value of the dependent quantization enabled flag is 1 (i.e., when dependent quantization is applied (or used) for the current block), the TSRC enabled flag can not be signaled and the value of the TSRC enabled flag can be derived to be 0. Thus, for example, when neither dependent quantization nor sign data hiding is enabled for the current block, the TSRC enabled flag can be signaled (or obtained). When dependent quantization and / or sign data hiding is enabled for the current block, the TSRC enabled flag can not be signaled (or obtained) and the value of the TSRC enabled flag can be derived to be 0. Here, the current block can be a coding block (CB) or a transform block (TB).
[0517] Here, for example, the TSRC enabling flag can be a flag for whether to enable TSRC. That is, for example, the TSRC enabling flag can be a flag indicating whether to enable TSRC for blocks in a slice. For example, the TSRC enabling flag having a value of 1 can indicate not to enable TSRC, and the TSRC enabling flag having a value of 0 can indicate to enable TSRC. Also, for example, the TSRC enabling flag can be signaled in a slice header syntax. A syntax element of the TSRC enabling flag can be the sh_ts_residual_coding_disabled_flag described above.
[0518] Also, for example, the decoding device can acquire a transform skip enabling flag. The decoding device can acquire image information including the transform skip enabling flag through a bitstream. The image information can include the transform skip enabling flag. Here, the current block can be a coding block (CB) or a transform block (TB). For example, the transform skip enabling flag can be a flag for whether to enable transform skip. For example, the transform skip enabling flag can indicate whether to enable transform skip. That is, for example, the transform skip enabling flag can indicate whether to enable transform skip for blocks of a picture in a sequence. For example, the transform skip enabling flag can indicate whether there can be a transform skip flag. For example, the transform skip enabling flag having a value of 1 can indicate to enable transform skip, and the transform skip enabling flag having a value of 0 can indicate not to enable transform skip. That is, for example, the transform skip enabling flag having a value of 1 can indicate that there can be a transform skip flag, and the transform skip enabling flag having a value of 0 can indicate that there is no transform skip flag. Also, for example, the transform skip enabling flag can be signaled to a sequence parameter set (SPS) syntax. A syntax element of the transform skip enabling flag can be the sps_transform_skip_enabled_flag described above.
[0519] In addition, the TSRC enabled flag can be derived based on the sign data hiding enabled flag, the dependent quantization enabled flag, and / or the transform skip enabled flag. For example, the TSRC enabled flag can be derived based on the sign data hiding enabled flag having a value of 0, the dependent quantization enabled flag having a value of 0, and the transform skip enabled flag having a value of 1. That is, for example, the TSRC enabled flag can be derived (or signaled) when the value of the sign data hiding enabled flag is 0 (i.e., the sign data hiding enabled flag indicates that sign data hiding is not enabled), the value of the dependent quantization enabled flag is 0 (i.e., the dependent quantization enabled flag indicates that dependent quantization is not enabled), and the value of the transform skip enabled flag is 1 (i.e., the transform skip enabled flag indicates that transform skip is enabled). In addition, for example, the TSRC enabled flag can not be derived when the value of the dependent quantization enabled flag is 1, and the value of the TSRC enabled flag can be derived to be 0. That is, for example, the TSRC enabled flag can not be signaled when the value of the dependent quantization enabled flag is 1, and the value of the TSRC enabled flag can be derived to be 0. In addition, for example, the TSRC enabled flag can not be derived when the value of the transform skip enabled flag is 0, and the value of the TSRC enabled flag can be derived to be 0. That is, for example, the TSRC enabled flag can not be signaled when the value of the transform skip enabled flag is 0, and the value of the TSRC enabled flag can be derived to be 0.
[0520] The decoding device derives the residual information of the current block based on the TSRC enabled flag (S1630). The decoding device can derive the residual information of the current block based on the TSRC enabled flag.
[0521] For example, the decoding device can determine the residual coding syntax of the current block based on the TSRC enabled flag. For example, the decoding device can determine the residual coding syntax of 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 enabled flag. The RRC syntax can indicate a syntax according to RRC, and the TSRC syntax can indicate a syntax according to TSRC.
[0522] For example, based on the TSRC enable flag having the value 1, the residual coding syntax of the current block can be determined as a regular residual coding (RRC) syntax. In this case, for example, a transform skip flag for whether to apply transform skip to the current block can be acquired based on the transform skip enable flag having the value 1, and the value of the transform skip flag can be 1. For example, the picture information can include the transform skip flag of the current block. The transform skip flag can indicate whether the current block is a transform skip block. That is, the transform skip flag can indicate whether a transform has been applied to the transform coefficients of the current block. The syntax element representing the transform skip flag can be transform_skip_flag as described above. For example, if the value of the transform skip flag is 1, the transform skip flag can indicate that a transform has not been applied to the current block (i.e., skip transform), and if the value of the transform skip flag is 0, the transform skip flag can indicate that a transform has been applied to the current block. For example, if the current block is a transform skip block, the value of the transform skip flag of the current block can be 1.
[0523] In addition, for example, based on the TSRC enable flag having the value 0, the residual coding syntax of the current block can be determined as a transform skip residual coding (TSRC) syntax. In addition, for example, a transform skip flag for whether to apply transform skip to the current block can be acquired, and based on the transform skip flag having the value 1 and the TSRC enable flag having the value 0, the residual coding syntax of the current block can be determined as a transform skip residual coding (TSRC) syntax. In addition, for example, a transform skip flag for whether to apply transform skip to the current block can be acquired, and based on the transform skip flag having the value 0 and the TSRC enable flag having the value 0, the residual coding syntax of the current block can be determined as a regular residual coding (RRC) syntax.
[0524] Thereafter, for example, the decoding device can acquire residual information of the residual coding syntax determined for the current block. For example, residual information of the regular residual coding (RRC) syntax can be acquired based on the TSRC enable flag having the value 1, and residual information of the TSRC syntax can be acquired based on the TSRC enable flag having the value 0. The picture information can include the residual information.
[0525] For example, if the residual coding syntax of the current block is determined as the RRC syntax, the decoding device can acquire residual information of the RRC syntax for the current block. For example, the residual information of the RRC syntax can include the syntax elements disclosed in Table 2 as described above.
[0526] For example, the residual information of the RRC syntax can include syntax elements of the transform coefficients of the current block. Here, the transform coefficients can be represented as residual coefficients.
[0527] For example, the syntax elements can include syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, sb_coded_flag, sig_coeff_flag, 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.
[0528] Specifically, for example, the syntax elements can include position information indicating a position of a last non-zero transform coefficient in a residual coefficient array of a current block. That is, the syntax elements can include position information indicating a position of a last non-zero transform coefficient in a scan order of the current block. The position information can include information of a prefix indicating a column position of the last non-zero transform coefficient, information of a prefix indicating a row position of the last non-zero transform coefficient, information of a suffix indicating the column position of the last non-zero transform coefficient, and information of a suffix indicating the row position of the last non-zero transform coefficient. Syntax elements of the position information can be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. Also, the non-zero transform coefficient can be referred to as a significant coefficient.
[0529] In addition, for example, the syntax elements can include a coded subblock flag indicating whether a current subblock of the current block includes a non-zero transform coefficient, a significant coefficient flag indicating whether a transform coefficient of the current block is a non-zero transform coefficient, a first coefficient level flag for whether a coefficient level for the transform coefficient is greater than a first threshold, a parity level flag for a parity of the coefficient level, and / or a second coefficient level flag for whether the coefficient level for the transform coefficient is greater than a second threshold. Here, the coded subblock flag can be sb_coded_flag or coded_sub_block_flag, the significant coefficient flag can be sig_coeff_flag, the first coefficient level flag can be abs_level_gt1_flag or abs_level_gtx_flag, the parity level flag can be par_level_flag, and the second coefficient level flag can be abs_level_gt3_flag or abs_level_gtx_flag.
[0530] In addition, for example, the syntax elements can include coefficient value related information of the transform coefficient values of the current block. The coefficient value related information can be abs_remainder and / or dec_abs_level.
[0531] In addition, for example, the syntax elements can include a sign flag that represents a sign of a transform coefficient. The sign flag can be coeff_sign_flag.
[0532] Further, for example, when sign data hiding is applied to the current block, a sign flag of a first significant transform coefficient of a current coefficient group (CG) in the current block can not be signaled. That is, for example, when sign data hiding is applied to the current block, the syntax elements can not include a sign flag that represents a sign of the first significant transform coefficient. Further, for example, whether sign data hiding is applied to the current block can be derived based on a sign data hiding enabled flag and / or a position of the first significant transform coefficient of the current CG and a position of the last significant transform coefficient. For example, when a value of the sign data hiding enabled flag is 1 and a value obtained by subtracting the position of the first significant transform coefficient from the position of the last significant transform coefficient is greater than 3 (i.e., when the value of the sign data hiding enabled flag is 1 and a number of significant transform coefficients in the current CG is greater than 3), sign data hiding can be applied to the current CG of the current block.
[0533] In addition, for example, if the residual coding syntax of the current block is determined to be a TSRC syntax, the decoding device can obtain residual information of the TSRC syntax of the current block. For example, the residual information of the TSRC syntax can include the syntax elements disclosed in Table 3 as described above.
[0534] For example, the residual information of the TSRC syntax can include syntax elements of transform coefficients of the current block. Here, the transform coefficients can be represented as residual coefficients.
[0535] For example, the syntax elements can include context coded syntax elements and / or bypass coded syntax elements for the transform coefficients. The syntax elements can 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.
[0536] For example, the context-coded syntax elements of the transform coefficient can include a significant coefficient flag that indicates whether the transform coefficient is a non-zero transform coefficient, a sign flag that indicates a sign of the transform coefficient, a first coefficient level flag for whether a coefficient level of the transform coefficient is greater than a first threshold, and / or a parity level flag for a parity of a transform level of the transform coefficient. In addition, for example, the context-coded syntax elements can include a second coefficient level flag for whether the coefficient level of the transform coefficient is greater than a second threshold, a third coefficient level flag for whether the coefficient level of the transform coefficient is greater than a third threshold, a fourth coefficient level flag for whether the coefficient level of the transform coefficient is greater than a fourth threshold, and / or a fifth coefficient level flag for whether the coefficient level of the transform coefficient is greater than a fifth threshold. Here, the significant coefficient flag can be sig_coeff_flag, the sign flag can be ceff_sign_flag, the first coefficient level flag can be abs_level_gt1_flag, and the parity level flag can be par_level_flag. In addition, the second coefficient level flag can be abs_level_gt3_flag or abs_level_gtx_flag, the third coefficient level flag can be abs_level_gt5_flag or abs_level_gtx_flag, the fourth coefficient level flag can be abs_level_gt7_flag or abs_level_gtx_flag, and the fifth coefficient level flag can be abs_level_gt9_flag or abs_level_gtx_flag.
[0537] In addition, for example, the bypass-coded syntax elements of the transform coefficient can include coefficient level information of a value of the transform coefficient (or a coefficient level) and / or a sign flag that indicates a sign of the transform coefficient. The coefficient level information can be abs_remainder and / or dec_abs_level, and the sign flag can be ceff_sign_flag.
[0538] The decoding device derives the residual samples of the current block based on the residual information (S1640). For example, the decoding device can derive transform coefficients of the current block based on the residual information, and can derive the residual samples of the current block based on the transform coefficients.
[0539] For example, the decoding device can derive transform coefficients of the current block based on the syntax elements of the residual information. Thereafter, the decoding device can derive the residual samples of the current block based on the transform coefficients. As an example, if it is derived based on the transform skip flag that no transform is applied to the current block, i.e., if the value of the transform skip flag is 1, the decoding device can derive the transform coefficients as the residual samples of the current block. Also, for example, if it is derived based on the transform skip flag that no transform is applied to the current block, i.e., if the value of the transform skip flag is 1, the decoding device can derive the residual samples of the current block by inverse quantizing the transform coefficients. Also, for example, if it is derived based on the transform skip flag that a transform is applied to the current block, i.e., if the value of the transform skip flag is 0, the decoding device can derive the residual samples of the current block by performing inverse transform of the transform coefficients. Also, for example, if it is derived based on the transform skip flag that a transform is applied to the current block, i.e., if the value of the transform skip flag is 0, the decoding device can derive the residual samples of the current block by inverse quantizing the transform coefficients and performing inverse transform of the inverse quantized transform coefficients.
[0540] Further, in a case where dependent quantization is applied to the current block, the decoding device can derive the residual samples of the current block by performing the dependent quantization process on the transform coefficients. For example, in a case where dependent quantization is applied to the current block, the decoding device can update a state (Qstate) of the dependent quantization based on a coefficient level of a transform coefficient that is immediately before the current transform coefficient in a scan order, can derive a coefficient level of the current transform coefficient based on the updated state and the syntax elements of the current transform coefficient, and can derive the residual samples by inverse quantizing the derived coefficient level. For example, the current transform coefficient can be inverse quantized based on a quantization parameter of a reconstructed level of the current transform coefficient in a scalar quantizer for the updated state. Here, the reconstructed level can be derived based on the syntax elements of the current transform coefficient.
[0541] Further, for example, when sign data hiding is applied to the current block, a sign of a first significant transform coefficient of a current CG in the current block can be derived based on a sum of absolute values of significant transform coefficients in the current CG. For example, the sign of the first significant transform coefficient can be derived as a positive value when the sum of the absolute values of the significant transform coefficients is even, and the sign of the first significant transform coefficient can be derived as a negative value when the sum of the absolute values of the significant transform coefficients is odd.
[0542] The decoding device generates a reconstructed picture based on the residual samples (S1650). For example, the decoding device can generate reconstructed samples of the current block and / or the reconstructed picture based on the residual samples. For example, the decoding device can derive prediction samples by performing an inter prediction mode or an intra prediction mode on the current block based on prediction information received through a bitstream, and can generate the reconstructed samples by adding the prediction samples and the residual samples to each other.
[0543] Thereafter, if necessary, in order to enhance subjective / objective picture quality, a loop filtering process such as a deblocking filter, SAO, and / or ALF process can be applied to the reconstructed picture as described above.
[0544] Figure 17 A decoding device performing an image decoding method according to the present disclosure is briefly illustrated. Figure 16 The method disclosed in the present disclosure can be performed by Figure 17 The decoding device disclosed in the present disclosure. Specifically, for example, Figure 17 The entropy decoder of the decoding device of Figure 17 The residual processor of the decoding device of Figure 16 S1640 in the present disclosure, and Figure 17 The adder of the decoding device of Figure 16 S1650 in the present disclosure. In addition, although not illustrated, the process of receiving prediction information of the current block can be performed by the entropy decoder of the decoding device of Figure 17 The process of deriving prediction samples of the current block can be performed by the predictor of the decoding device of Figure 17
[0545] According to the present disclosure, residual coding efficiency can be enhanced.
[0546] In addition, according to the present disclosure, the signaling relationship between the sign data hiding enabling flag and the TSRC enabling flag can be established, the TSRC enabling flag can be signaled when the sign data hiding is not enabled, and by doing so, when the RRC syntax is encoded for a transform skip block because the TSRC is not enabled, the sign data hiding is not used, thus improving the coding efficiency, and the overall residual coding efficiency can be improved by reducing the amount of bits encoded.
[0547] In addition, according to the present disclosure, the signaling relationship between the dependent quantization enabling flag and the TSRC enabling flag can be established, and the TSRC enabling flag can be signaled if the dependent quantization is not enabled, and by doing so, if the TSRC is not enabled and then the RRC syntax is encoded for a transform skip block, the dependent quantization will not be used, so that the coding efficiency can be improved, and the overall residual coding efficiency can be improved by reducing the amount of bits encoded.
[0548] In addition, according to the present disclosure, the signaling relationship between the transform skip enabling flag and the TSRC enabling flag can be established, and the TSRC enabling flag can be signaled if the transform skip is enabled, and by doing so, the overall residual coding efficiency can be improved by reducing the amount of bits encoded.
[0549] In the above embodiments, the methods are described based on flowcharts having a series of steps or blocks. The disclosure is not limited to the order of the above steps or blocks. Some steps or blocks can be executed in a different order from other steps or blocks described above or simultaneously. Also, those skilled in the art will understand that the steps shown in the flowcharts are not exclusive and can further include other steps, or one or more steps of the flowcharts can be deleted without affecting the scope of the disclosure.
[0550] The embodiments described in the present specification can be executed by being implemented on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in each drawing can be executed by being implemented on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information for implementation (for example, information on instructions) or an algorithm can be stored in a digital storage medium.
[0551] In addition, the decoding apparatus and the encoding apparatus to which the disclosure is applied can be included in a multimedia broadcast transmitting / receiving apparatus, a mobile communication terminal, a home theater video apparatus, a digital theater video apparatus, a surveillance camera, a video chat apparatus, a real-time communication apparatus such as video communication, a mobile streaming apparatus, a storage medium, a camcorder, a VoD service providing apparatus, an over-the-top (OTT) video apparatus, an Internet streaming service providing apparatus, a three-dimensional (3D) video apparatus, a teleconference video apparatus, a transport user apparatus (for example, a vehicle user apparatus, an airplane user apparatus, and a ship user apparatus), and a medical video device, and can be used to process a video signal or a data signal. For example, the over-the-top (OTT) video apparatus can include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smart phone, a tablet, a digital video recorder (DVR), etc.
[0552] In addition, the processing method to which the disclosure is applied can be generated in the form of a program executed by a computer, and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the disclosure can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices in which computer-readable data are stored. The computer-readable recording medium can include, for example, a BD, a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier wave (for example, transmission via the Internet). In addition, a bitstream generated by the encoding method can be stored in a computer-readable recording medium or transmitted through a wired / wireless communication network.
[0553] In addition, the embodiments of the disclosure can be implemented using a computer program product according to program codes, and the program codes can be executed in a computer by the embodiments of the disclosure. The program codes can be stored on a computer readable carrier.
[0554] Figure 18 A configuration diagram of a content streaming system to which the disclosure is applied is illustrated.
[0555] A content streaming system to which the embodiments of the disclosure are applied can mainly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0556] The encoding server compresses content input from a multimedia input device such as a smartphone, a camera, or a camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, when a multimedia input device such as a smartphone, a camera, or a camcorder, etc. directly generates a bitstream, the encoding server can be omitted.
[0557] A bitstream can be generated by applying an encoding method or a bitstream generation method to which the embodiments of the disclosure are applied, and the streaming server can temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0558] The streaming server transmits multimedia data to a user device through a web server based on a user request, and the web server serves as a medium for informing a service to a user. When a user requests a desired service from the web server, the web server delivers the request to the streaming server, and the streaming server transmits multimedia data to the user. In this case, the content streaming system can include a separate control server. In this case, the control server is used to control commands / responses between devices within the content streaming system.
[0559] The streaming server can receive content from the media storage and / or the encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, in order to provide a smooth streaming service, the streaming server can store a bitstream for a predetermined period of time.
[0560] Examples of the user device can include a mobile phone, a smartphone, a laptop computer, a digital broadcasting terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), a navigator, a touch screen PC, a tablet PC, an ultrabook, a wearable device (e.g., a smart watch, smart glasses, and a head-mounted display), a digital TV, a desktop computer, and a digital signage, etc. Each server within the content streaming system can operate as a distributed server, in which case data received from each server can be distributed.
[0561] The technical features of the method claims of the present disclosure can be combined in various ways. For example, the technical features of the method claims of the present disclosure can be combined to be implemented as an apparatus, and the technical features of the apparatus claims of the present disclosure can be combined to be implemented as a method. Furthermore, the technical features of the method claims of the present disclosure and the technical features of the apparatus claims of the present disclosure can be combined to be implemented as an apparatus, and the technical features of the method claims of the present disclosure and the technical features of the apparatus claims of the present disclosure can be combined to be implemented as a method.
Claims
1. An image decoding method performed by a decoding device, the image decoding method comprising the following steps: Retrieves the dependency quantization enable flag, specifying whether dependency quantization is enabled; Retrieves the symbol data hiding enable flag, specifying whether symbol data hiding is enabled; Based on the dependent quantization enable flag and the symbolic data hiding enable flag, obtain the TSRC disable flag specifying whether to use transform skip residual coding TSRC syntax; Residual information for the current block is obtained based on the TSRC disable flag; The residual sample of the current block is derived based on the residual information; as well as The reconstructed image is generated based on the residual samples. Specifically, the TSRC disable flag is obtained from the bitstream in response to the dependent quantization enable flag being equal to 0 and the symbol data hiding enable flag being equal to 0. Wherein, a value of 0 for the dependency quantization enable flag indicates that dependency quantization is not enabled, and a value of 1 for the dependency quantization enable flag indicates that dependency quantization is enabled. Wherein, a value of 0 for the symbol data hiding enable flag indicates that symbol data hiding is not enabled, and a value of 1 for the symbol data hiding enable flag indicates that symbol data hiding is enabled. The TSRC disable flag with a value of 1 indicates that the TSRC syntax is not used, and The TSRC disable flag with a value of 0 indicates that the TSRC syntax is used.
2. The image decoding method according to claim 1, wherein, In response to enabling symbolic data hiding for the current block, the sign of the first effective transform coefficient of the current coefficient group CG is derived based on the sum of the absolute values of the effective transform coefficients in the current coefficient group CG of the current block.
3. The image decoding method according to claim 2, wherein, In response to enabling the symbol data hiding for the current block, the residual information does not include the symbol flag for the first valid transform coefficient.
4. The image decoding method according to claim 1, wherein, The residual information for the current block is obtained from the regular residual coding RRC syntax in response to the TSRC disable flag being equal to 1.
5. The image decoding method according to claim 4, wherein, Obtain a transform skip flag from the bitstream that specifies whether to apply transform skip to the current block.
6. The image decoding method according to claim 1, wherein, In response to the current block being a transform skip block and the value of the TSRC disable flag being equal to 0, the residual information for the current block is obtained from the TSRC syntax.
7. The image decoding method according to claim 6, wherein, The residual information of the TSRC syntax includes context-coded syntax elements for the transform coefficients, and The context encoding syntax elements include a valid coefficient flag indicating whether the transform coefficient is a non-zero transform coefficient, a parity level flag indicating the parity of the coefficient level used for the transform coefficient, a sign flag indicating the sign of the transform coefficient, a first coefficient level flag indicating whether the coefficient level is greater than a first threshold, and a second coefficient level flag indicating whether the coefficient level of the transform coefficient is greater than a second threshold.
8. The image decoding method according to claim 1, wherein, In response to enabling the dependent quantization for the current block, the TSRC disable flag is not obtained from the bitstream, and The value of the TSRC disable flag is deduced to be 0.
9. An image encoding method performed by an encoding device, the image encoding method comprising the following steps: Encode the dependency quantization enable flag that specifies whether dependency quantization is enabled; Encode the symbol data hiding enable flag that specifies whether symbol data hiding is enabled; The TSRC disable flag, which specifies whether to use the transform skip residual coding (TSRC) syntax, is encoded based on the dependent quantization enable flag and the symbolic data hiding enable flag. The residual information for the current block is encoded based on the TSRC disable flag; as well as Generate a bitstream including the dependency quantization enable flag, the symbol data hiding enable flag, the TSRC disable flag, and the residual information. Specifically, the TSRC disable flag is encoded into the bitstream in response to the dependent quantization enable flag being equal to 0 and the symbol data hiding enable flag being equal to 0. Wherein, a value of 0 for the dependency quantization enable flag indicates that dependency quantization is not enabled, and a value of 1 for the dependency quantization enable flag indicates that dependency quantization is enabled. Wherein, a value of 0 for the symbol data hiding enable flag indicates that symbol data hiding is not enabled, and a value of 1 for the symbol data hiding enable flag indicates that symbol data hiding is enabled. The TSRC disable flag with a value of 1 indicates that the TSRC syntax is not used, and The TSRC disable flag with a value of 0 indicates that the TSRC syntax is used.
10. A non-transitory computer-readable storage medium for storing a bitstream generated by an image encoding method, the image encoding method comprising the following steps: Encode the dependency quantization enable flag that specifies whether dependency quantization is enabled; Encode the symbol data hiding enable flag that specifies whether symbol data hiding is enabled; The TSRC disable flag, which specifies whether to use the transform skip residual coding (TSRC) syntax, is encoded based on the dependent quantization enable flag and the symbolic data hiding enable flag. The residual information for the current block is encoded based on the TSRC disable flag; as well as Generate a bitstream including the dependency quantization enable flag, the symbol data hiding enable flag, the TSRC disable flag, and the residual information. Specifically, the TSRC disable flag is encoded into the bitstream in response to the dependent quantization enable flag being equal to 0 and the symbol data hiding enable flag being equal to 0. Wherein, a value of 0 for the dependency quantization enable flag indicates that dependency quantization is not enabled, and a value of 1 for the dependency quantization enable flag indicates that dependency quantization is enabled. Wherein, a value of 0 for the symbol data hiding enable flag indicates that symbol data hiding is not enabled, and a value of 1 for the symbol data hiding enable flag indicates that symbol data hiding is enabled. The TSRC disable flag with a value of 1 indicates that the TSRC syntax is not used, and The TSRC disable flag with a value of 0 indicates that the TSRC syntax is used.
11. A method for transmitting image information data, the method comprising the following steps: Encode the dependency quantization enable flag that specifies whether dependency quantization is enabled; Encode the symbol data hiding enable flag that specifies whether symbol data hiding is enabled; The TSRC disable flag, which specifies whether to use the transform skip residual coding (TSRC) syntax, is encoded based on the dependent quantization enable flag and the symbolic data hiding enable flag. The residual information for the current block is encoded based on the TSRC disable flag; Generate a bitstream including the dependent quantization enable flag, the symbol data hiding enable flag, the TSRC disable flag, and the residual information; as well as Send the bit stream, Specifically, the TSRC disable flag is encoded into the bitstream in response to the dependent quantization enable flag being equal to 0 and the symbol data hiding enable flag being equal to 0. Wherein, a value of 0 for the dependency quantization enable flag indicates that dependency quantization is not enabled, and a value of 1 for the dependency quantization enable flag indicates that dependency quantization is enabled. Wherein, the value of the symbol data hiding enable flag being equal to 0 indicates that the symbol data hiding is not enabled, and the value of the symbol data hiding enable flag being equal to 1 indicates that the symbol data hiding is enabled, wherein the TSRC disable flag having a value of 1 indicates that the TSRC syntax is not used, and wherein the TSRC disable flag having a value of 0 indicates that the TSRC syntax is used.
Citation Information
Patent Citations
Sign coding for blocks with transform skipped
CN105723714A
Sign coding for blocks with transform skipped
US20150103918A1