WO2020171668A1 - Procédé et dispositif de décodage d'image à l'aide d'informations résiduelles comprenant des informations de signes codés selon le contexte dans un système de codage d'image - Google Patents
Procédé et dispositif de décodage d'image à l'aide d'informations résiduelles comprenant des informations de signes codés selon le contexte dans un système de codage d'image Download PDFInfo
- Publication number
- WO2020171668A1 WO2020171668A1 PCT/KR2020/002597 KR2020002597W WO2020171668A1 WO 2020171668 A1 WO2020171668 A1 WO 2020171668A1 KR 2020002597 W KR2020002597 W KR 2020002597W WO 2020171668 A1 WO2020171668 A1 WO 2020171668A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- current
- residual coefficient
- flag
- sign
- derived
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/12—Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
- H04N19/122—Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/132—Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
- H04N19/137—Motion inside a coding unit, e.g. average field, frame or block difference
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/44—Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
Definitions
- This document relates to an image coding technology, and more particularly, an image decoding method for deriving a context model of a sign flag representing a sign of a residual coefficient in an image coding system, and coding the sign flag based on the derived context model, and It's about the device.
- the image data becomes high-resolution and high-quality, the amount of information or bits to be transmitted is relatively increased compared to the existing image data. Therefore, the image data is transmitted using a medium such as an existing wired or wireless broadband line, or the image data is stored using an existing storage medium. In the case of storage, the transmission cost and storage cost increase.
- high-efficiency image compression technology is required to effectively transmit, store, and reproduce information of high-resolution and high-quality images.
- the technical problem of this document is to provide a method and apparatus for increasing image coding efficiency.
- Another technical problem of this document is to provide a method and apparatus for increasing the efficiency of residual coding.
- Another technical problem of this document is a method of deriving and coding a context model of a sine flag indicating a sign of a residual coefficient based on the sign of a neighboring residual coefficient adjacent to the residual coefficient in coding residual information And to provide an apparatus.
- an image decoding method performed by a decoding apparatus includes receiving residual information for a current block, deriving a context model for a sign flag of a current residual coefficient of the current block, decoding the sign flag based on the context model, the Deriving the current residual coefficient based on a sine flag, deriving a residual sample based on the current residual coefficient, and generating a reconstructed picture based on the residual sample, the sine
- the context model for the flag is characterized in that it is derived based on a sign of an upper peripheral residual coefficient of the current residual coefficient and a sign of a left peripheral residual coefficient.
- a decoding apparatus for performing video decoding.
- the decoding apparatus receives residual information for a current block, derives a context model for a sign flag of a current residual coefficient of the current block, decodes the sign flag based on the context model, and the sign flag
- An entropy decoding unit that derives the current residual coefficient based on, a transform unit that derives a residual sample based on the current residual coefficient, and an adder that generates a reconstructed picture based on the residual sample, wherein the The context model for the sine flag is derived based on a sign of an upper peripheral residual coefficient of the current residual coefficient and a sign of a left peripheral residual coefficient.
- a video encoding method performed by an encoding device includes deriving a current residual coefficient of a current block, deriving a context model for a sign flag of the current residual coefficient, encoding the sign flag based on the context model, and the sign flag Generating a bitstream including, wherein the context model for the sign flag is derived based on a sign of an upper peripheral residual coefficient of the current residual coefficient and a sign of a left peripheral residual coefficient It is characterized by being.
- a video encoding apparatus derives a transform unit for deriving a current residual coefficient of a current block, and a context model for a sign flag of the current residual coefficient, encodes the sign flag based on the context model, and the sign flag And an entropy encoding unit that generates a bitstream including, wherein the context model for the sign flag is based on a sign of an upper peripheral residual coefficient of the current residual coefficient and a sign of a left peripheral residual coefficient It is characterized by being derived.
- the efficiency of residual coding can be improved.
- a sign flag representing the sign of the residual coefficient is coded based on the context model, and through this, the amount of bits allocated to the sign flag for the residual coefficient is saved, and the overall residual coding efficiency is improved. I can make it.
- a context model for a sine flag indicating the sign of the residual coefficient is derived based on the sign of the neighboring residual coefficients of the residual coefficient, through which correlation between adjacent residual coefficients.
- the sign flag may be coded in consideration of, saving the amount of bits allocated to the sign flag, and improving overall residual coding efficiency.
- FIG. 1 schematically shows an example of a video/video coding system to which embodiments of this document can be applied.
- FIG. 2 is a diagram schematically illustrating a configuration of a video/video encoding apparatus to which embodiments of the present document can be applied.
- FIG. 3 is a diagram schematically illustrating a configuration of a video/image decoding apparatus to which embodiments of the present document can be applied.
- FIG. 4 exemplarily shows context-adaptive binary arithmetic coding (CABAC) for encoding a syntax element.
- CABAC context-adaptive binary arithmetic coding
- FIG. 5 is a diagram illustrating an example of transform coefficients in a 4x4 block.
- FIG. 6 shows an example of determining a context model of a sign flag of a current residual coefficient according to the present embodiment.
- FIG. 7 exemplarily shows an encoding apparatus and a decoding apparatus for coding a sign flag of a current residual coefficient based on whether or not a transform of the current block is applied and a sign of a neighboring residual coefficient.
- FIG. 9 schematically shows an encoding apparatus that performs an image encoding method according to this document.
- FIG. 10 schematically shows an image decoding method by a decoding apparatus according to this document.
- FIG. 11 schematically shows a decoding apparatus that performs an image decoding method according to this document.
- FIG. 12 is an exemplary structural diagram of a content streaming system to which embodiments of the present document are applied.
- each of the components in the drawings described in the present document is independently illustrated for convenience of description of different characteristic functions, and does not mean that the components are implemented as separate hardware or separate software.
- two or more of the configurations may be combined to form one configuration, or one configuration may be divided into a plurality of configurations.
- Embodiments in which each configuration is integrated and/or separated are also included in the scope of the rights of this document, unless departing from the essence of this document.
- FIG. 1 schematically shows an example of a video/video coding system to which embodiments of this document can be applied.
- a video/image coding system may include a first device (a source device) and a second device (a receiving device).
- the source device may transmit the encoded video/image information or data in a file or streaming form to the receiving device through a digital storage medium or a network.
- the source device may include a video source, an encoding device, and a transmission unit.
- the receiving device may include a receiving unit, a decoding device, and a renderer.
- the encoding device may be referred to as a video/image encoding device, and the decoding device may be referred to as a video/image decoding device.
- the transmitter may be included in the encoding device.
- the receiver may be included in the decoding device.
- the renderer may include a display unit, and the display unit may be configured as a separate device or an external component.
- the video source may acquire a video/image through a process of capturing, synthesizing, or generating video/image.
- the video source may include a video/image capturing device and/or a video/image generating device.
- the video/image capture device may include, for example, one or more cameras, a video/image archive including previously captured video/images, and the like.
- the video/image generating device may include, for example, a computer, a tablet and a smartphone, and may (electronically) generate a video/image.
- a virtual video/image may be generated through a computer or the like, and in this case, a video/image capturing process may be substituted as a process of generating related data.
- the encoding device may encode the input video/video.
- the encoding apparatus may perform a series of procedures such as prediction, transformation, and quantization for compression and coding efficiency.
- the encoded data (encoded video/video information) may be output in the form of a bitstream.
- the transmission unit may transmit the encoded video/video information or data output in the form of a bitstream to the reception unit of the receiving device through a digital storage medium or a network in a file or streaming form.
- Digital storage media may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.
- the transmission unit may include an element for generating a media file through a predetermined file format, and may include an element for transmission through a broadcast/communication network.
- the receiver may receive/extract the bitstream and transmit it to the decoding device.
- the decoding device may decode the video/image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding device.
- the renderer can render the decoded video/video.
- the rendered video/image may be displayed through the display unit.
- VVC versatile video coding
- EVC essential video coding
- AV1 AOMedia Video 1
- AVS2 2nd generation of audio video coding standard
- next-generation video/ It can be applied to a method disclosed in an image coding standard (ex. H.267 or H.268, etc.).
- video may mean a set of images over time.
- a picture generally refers to a unit representing one image in a specific time period, and a subpicture/slice/tile is a unit constituting a part of a picture in coding.
- the subpicture/slice/tile may include one or more coding tree units (CTU).
- CTU coding tree units
- One picture may consist of one or more subpictures/slices/tiles.
- One picture may consist of one or more tile groups.
- One tile group may include one or more tiles.
- a brick may represent a rectangular region of CTU rows within a tile in a picture.
- a tile may be partitioned into multiple bricks, each of which consisting of one or more CTU rows within the tile. ).
- a tile that is not partitioned into multiple bricks may be also referred to as a brick.
- a brick scan may represent a specific sequential ordering of CTUs partitioning a picture
- the CTUs may be arranged in a CTU raster scan within a brick
- bricks in a tile may be sequentially arranged in a raster scan of the bricks of the tile.
- tiles in a picture may be sequentially aligned by raster scan of the tiles of the picture (A brick scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a brick.
- a subpicture may represent a rectangular region of one or more slices within a picture. That is, a subpicture may include one or more slices that collectively cover a rectangular region of a picture.
- a tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture.
- the tile column is a rectangular region of CTUs, the rectangular region has a height equal to the height of the picture, and the width may be specified by syntax elements in a picture parameter set (The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set).
- the tile row is a rectangular region of CTUs, the rectangular region has a width specified by syntax elements in a picture parameter set, and a height may be the same as the height of the picture (The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the width of the picture).
- a tile scan may represent a specific sequential ordering of CTUs that partition a picture, the CTUs may be sequentially arranged in a CTU raster scan in a tile, and tiles in a picture may be sequentially arranged in a raster scan of the tiles of the picture.
- a tile scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture).
- a slice may include an integer number of bricks of a picture, and the integer number of bricks may be included in one NAL unit (A slice includes an integer number of bricks of a picture that may be exclusively contained in a single NAL unit).
- a slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile. ).
- Tile groups and slices can be used interchangeably in this document.
- the tile group/tile group header may be referred to as a slice/slice header.
- a pixel or pel may mean a minimum unit constituting one picture (or image).
- sample' may be used as a term corresponding to a pixel.
- a sample may generally represent a pixel or a value of a pixel, may represent only a pixel/pixel value of a luma component, or may represent only a pixel/pixel value of a chroma component.
- a unit may represent a basic unit of image processing.
- the unit may include at least one of a specific area of a picture and information related to the corresponding area.
- One unit may include one luma block and two chroma (ex. cb, cr) blocks.
- the unit may be used interchangeably with terms such as a block or an area depending on the case.
- the MxN block may include samples (or sample arrays) consisting of M columns and N rows, or a set (or array) of transform coefficients.
- a or B (A or B) may mean “only A”, “only B”, or “both A and B”.
- a or B (A or B) may be interpreted as “A and/or B (A and/or B)”.
- A, B or C (A, B or C) means “only A”, “only B”, “only C”, or "any and all combinations of A, B and C ( It can mean any combination of A, B and C)”.
- a slash (/) or comma used in the present specification may mean “and/or”.
- A/B can mean “A and/or B”. Accordingly, “A/B” may mean “only A”, “only B”, or “both A and B”.
- A, B, C may mean “A, B or C”.
- At least one of A and B may mean “only A”, “only B”, or “both A and B”.
- the expression “at least one of A or B” or “at least one of A and/or B” means “at least one A and B (at least one of A and B)" can be interpreted the same.
- At least one of A, B and C means “only A", “only B", “only C", or "A, B and C May mean any combination of A, B and C”.
- at least one of A, B or C at least one of A, B or C
- at least one of A, B and/or C at least one of A, B and/or C
- parentheses used in the present specification may mean “for example”. Specifically, when indicated as “prediction (intra prediction)", “intra prediction” may be proposed as an example of “prediction”. In other words, “prediction” in the present specification is not limited to “intra prediction”, and “intra prediction” may be suggested as an example of “prediction”. In addition, even when displayed as “prediction (ie, intra prediction)", “intra prediction” may be proposed as an example of "prediction”.
- the video encoding device may include an image encoding device.
- the encoding device 200 includes an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, and It may be configured to include an adder 250, a filter 260, and a memory 270.
- the prediction unit 220 may include an inter prediction unit 221 and an intra prediction unit 222.
- the residual processing unit 230 may include a transform unit 232, a quantizer 233, an inverse quantizer 234, and an inverse transformer 235.
- the residual processing unit 230 may further include a subtractor 231.
- the addition unit 250 may be referred to as a reconstructor or a recontructged block generator.
- the image segmentation unit 210, the prediction unit 220, the residual processing unit 230, the entropy encoding unit 240, the addition unit 250, and the filtering unit 260 described above may include one or more hardware components (for example, it may be configured by an encoder chipset or a processor).
- the memory 270 may include a decoded picture buffer (DPB), and may be configured by a digital storage medium.
- the hardware component may further include the memory 270 as an internal/external component.
- the image segmentation unit 210 may divide an input image (or picture, frame) input to the encoding apparatus 200 into one or more processing units.
- the processing unit may be referred to as a coding unit (CU).
- the coding unit is recursively divided according to the QTBTTT (Quad-tree binary-tree ternary-tree) structure from a coding tree unit (CTU) or a largest coding unit (LCU).
- QTBTTT Quad-tree binary-tree ternary-tree
- CTU coding tree unit
- LCU largest coding unit
- one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad tree structure, a binary tree structure, and/or a ternary structure.
- a quad tree structure may be applied first, and a binary tree structure and/or a ternary structure may be applied later.
- the binary tree structure may be applied first.
- the coding procedure according to this document may be performed based on the final coding unit that is no longer divided. In this case, based on the coding efficiency according to the image characteristics, the maximum coding unit can be directly used as the final coding unit, or if necessary, the coding unit is recursively divided into coding units of lower depth to be optimal. A coding unit of the size of may be used as the final coding unit.
- the coding procedure may include a procedure such as prediction, transformation, and restoration described later.
- the processing unit may further include a prediction unit (PU) or a transform unit (TU).
- the prediction unit and the transform unit may be divided or partitioned from the above-described final coding unit, respectively.
- the prediction unit may be a unit of sample prediction
- the transform unit may be a unit for inducing a transform coefficient and/or a unit for inducing a residual signal from the transform coefficient.
- the unit may be used interchangeably with terms such as a block or an area depending on the case.
- the MxN block may represent a set of samples or transform coefficients consisting of M columns and N rows.
- a sample may represent a pixel or a value of a pixel, may represent only a pixel/pixel value of a luminance component, or may represent only a pixel/pixel value of a saturation component.
- a sample may be used as a term corresponding to one picture (or image) as a pixel or pel.
- the encoding apparatus 200 subtracts the prediction signal (predicted block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from the input video signal (original block, original sample array) to make a residual.
- a signal residual signal, residual block, residual sample array
- a unit that subtracts the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) in the encoder 200 may be referred to as a subtraction unit 231.
- the prediction unit may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block.
- the prediction unit may determine whether intra prediction or inter prediction is applied in units of the current block or CU.
- the prediction unit may generate various information related to prediction, such as prediction mode information, as described later in the description of each prediction mode, and transmit it to the entropy encoding unit 240.
- the information on prediction may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
- the intra prediction unit 222 may predict the current block by referring to samples in the current picture.
- the referenced samples may be located in the vicinity of the current block or may be located apart according to the prediction mode.
- prediction modes may include a plurality of non-directional modes and a plurality of directional modes.
- the non-directional mode may include, for example, a DC mode and a planar mode (Planar mode).
- the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes according to a detailed degree of the prediction direction. However, this is an example, and more or less directional prediction modes may be used depending on the setting.
- the intra prediction unit 222 may determine a prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
- the inter prediction unit 221 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on the reference picture.
- motion information may be predicted in units of blocks, subblocks, or samples based on a correlation between motion information between a neighboring block and a current block.
- the motion information may include a motion vector and a reference picture index.
- the motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information.
- the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture.
- the reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different.
- the temporal neighboring block may be called a collocated reference block, a co-located CU (colCU), and the like, and a reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic).
- the inter prediction unit 221 constructs a motion information candidate list based on neighboring blocks, and provides information indicating which candidate is used to derive a motion vector and/or a reference picture index of the current block. Can be generated. Inter prediction may be performed based on various prediction modes.
- the inter prediction unit 221 may use motion information of a neighboring block as motion information of a current block.
- a residual signal may not be transmitted.
- MVP motion vector prediction
- the motion vector of the current block is calculated by using the motion vector of the neighboring block as a motion vector predictor and signaling a motion vector difference. I can instruct.
- the prediction unit 220 may generate a prediction signal based on various prediction methods to be described later.
- the prediction unit may apply intra prediction or inter prediction for prediction of one block, as well as simultaneously apply intra prediction and inter prediction. This can be called combined inter and intra prediction (CIIP).
- the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode to predict a block.
- IBC intra block copy
- the IBC prediction mode or the palette mode may be used for content image/video coding such as a game, for example, screen content coding (SCC).
- SCC screen content coding
- IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that it derives a reference block in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this document.
- the palette mode can be viewed as an example of intra coding or intra prediction. When the palette mode is applied, a sample value in a picture may be signaled based on information about a palette table and
- the prediction signal generated through the prediction unit may be used to generate a reconstructed signal or may be used to generate a residual signal.
- the transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal.
- the transformation technique uses at least one of DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen-Loeve Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform).
- DCT Discrete Cosine Transform
- DST Discrete Sine Transform
- KLT Kerhunen-Loeve Transform
- GBT Graph-Based Transform
- CNT Conditionally Non-linear Transform
- CNT refers to a transformation obtained based on generating a prediction signal using all previously reconstructed pixels.
- the conversion process may be applied to a pixel block having the same size of a square, or may be applied to a block having a variable size other than a square.
- the quantization unit 233 quantizes the transform coefficients and transmits it to the entropy encoding unit 240, and the entropy encoding unit 240 encodes the quantized signal (information on quantized transform coefficients) and outputs it as a bitstream. have.
- the information on the quantized transform coefficients may be called residual information.
- the quantization unit 233 may rearrange the quantized transform coefficients in the form of blocks into a one-dimensional vector form based on a coefficient scan order, and the quantized transform coefficients in the form of the one-dimensional vector It is also possible to generate information about transform coefficients.
- the entropy encoding unit 240 may perform various encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC).
- the entropy encoding unit 240 may encode together or separately information necessary for video/image reconstruction (eg, values of syntax elements) in addition to quantized transform coefficients.
- the encoded information (eg, encoded video/video information) may be transmitted or stored in a bitstream format in units of network abstraction layer (NAL) units.
- the video/video information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS).
- the video/video information may further include general constraint information.
- information and/or syntax elements transmitted/signaled from the encoding device to the decoding device may be included in the video/video information.
- the video/video information may be encoded through the above-described encoding procedure and included in the bitstream.
- the bitstream may be transmitted through a network or may be stored in a digital storage medium.
- the network may include a broadcasting network and/or a communication network
- the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.
- a transmission unit for transmitting and/or a storage unit (not shown) for storing may be configured as an internal/external element of the encoding apparatus 200, or the transmission unit It may be included in the entropy encoding unit 240.
- the quantized transform coefficients output from the quantization unit 233 may be used to generate a prediction signal.
- a residual signal residual block or residual samples
- the addition unit 250 adds the reconstructed residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222 to obtain a reconstructed signal (restored picture, reconstructed block, reconstructed sample array). Can be created.
- the predicted block may be used as a reconstructed block.
- the addition unit 250 may be referred to as a restoration unit or a restoration block generation unit.
- the generated reconstructed signal may be used for intra prediction of the next processing target block in the current picture, and may be used for inter prediction of the next picture through filtering as described later.
- LMCS luma mapping with chroma scaling
- the filtering unit 260 may improve subjective/objective image quality by applying filtering to the reconstructed signal.
- the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and the modified reconstructed picture may be converted to the memory 270, specifically, the DPB of the memory 270. Can be saved on.
- the various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, and the like.
- the filtering unit 260 may generate a variety of filtering information and transmit it to the entropy encoding unit 240 as described later in the description of each filtering method.
- the filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
- the modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter prediction unit 221.
- the encoding device may avoid prediction mismatch between the encoding device 200 and the decoding device 300 and improve encoding efficiency.
- the memory 270 DPB may store the modified reconstructed picture for use as a reference picture in the inter prediction unit 221.
- the memory 270 may store motion information of a block from which motion information in a current picture is derived (or encoded) and/or motion information of blocks in a picture that have already been reconstructed.
- the stored motion information may be transferred to the inter prediction unit 221 in order to be used as motion information of spatial neighboring blocks or motion information of temporal neighboring blocks.
- the memory 270 may store reconstructed samples of reconstructed blocks in the current picture, and may be transmitted to the intra prediction unit 222.
- FIG. 3 is a diagram schematically illustrating a configuration of a video/image decoding apparatus to which embodiments of the present document can be applied.
- the decoding apparatus 300 includes an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, and a filtering unit. It may be configured to include (filter, 350) and memory (memory, 360).
- the prediction unit 330 may include an inter prediction unit 331 and an intra prediction unit 332.
- the residual processing unit 320 may include a dequantizer 321 and an inverse transformer 322.
- the entropy decoding unit 310, the residual processing unit 320, the prediction unit 330, the addition unit 340, and the filtering unit 350 described above are one hardware component (for example, a decoder chipset or a processor). ) Can be configured.
- the memory 360 may include a decoded picture buffer (DPB), and may be configured by a digital storage medium.
- the hardware component may further include the memory 360 as an internal/external component.
- the decoding apparatus 300 may reconstruct an image in response to a process in which the video/image information is processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 may derive units/blocks based on block division related information obtained from the bitstream.
- the decoding device 300 may perform decoding using a processing unit applied in the encoding device.
- the processing unit of decoding may be, for example, a coding unit, and the coding unit may be divided from a coding tree unit or a maximum coding unit along a quad tree structure, a binary tree structure and/or a ternary tree structure.
- One or more transform units may be derived from the coding unit.
- the reconstructed image signal decoded and output through the decoding device 300 may be reproduced through the playback device.
- the decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal may be decoded through the entropy decoding unit 310.
- the entropy decoding unit 310 may parse the bitstream to derive information (eg, video/video information) necessary for image restoration (or picture restoration).
- the video/video information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS).
- the video/video information may further include general constraint information.
- the decoding apparatus may further decode the picture based on the information on the parameter set and/or the general restriction information.
- Signaled/received information and/or syntax elements described later in this document may be decoded through the decoding procedure and obtained from the bitstream.
- the entropy decoding unit 310 decodes information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and a value of a syntax element required for image restoration, a quantized value of a transform coefficient related to a residual. Can be printed.
- the CABAC entropy decoding method receives a bin corresponding to each syntax element in a bitstream, and includes information on a syntax element to be decoded and information on a neighboring and decoding target block or information on a symbol/bin decoded in a previous step.
- a context model is determined using the context model, and a symbol corresponding to the value of each syntax element can be generated by performing arithmetic decoding of the bin by predicting the probability of occurrence of a bin according to the determined context model.
- the CABAC entropy decoding method may update the context model using information of the decoded symbol/bin for the context model of the next symbol/bin after the context model is determined.
- information about prediction is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and entropy decoding is performed by the entropy decoding unit 310.
- the dual value that is, quantized transform coefficients and related parameter information may be input to the residual processing unit 320.
- the residual processing unit 320 may derive a residual signal (a residual block, residual samples, and a residual sample array).
- information about filtering among information decoded by the entropy decoding unit 310 may be provided to the filtering unit 350.
- a receiver (not shown) for receiving a signal output from the encoding device may be further configured as an inner/outer element of the decoding device 300, or the receiver may be a component of the entropy decoding unit 310.
- the decoding apparatus may be called a video/video/picture decoding apparatus, and the decoding apparatus can be divided into an information decoder (video/video/picture information decoder) and a sample decoder (video/video/picture sample decoder). May be.
- the information decoder may include the entropy decoding unit 310, and the sample decoder includes the inverse quantization unit 321, an inverse transform unit 322, an addition unit 340, a filtering unit 350, and a memory 360. ), an inter prediction unit 332 and an intra prediction unit 331 may be included.
- the inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output transform coefficients.
- the inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block shape. In this case, the rearrangement may be performed based on the coefficient scan order performed by the encoding device.
- the inverse quantization unit 321 may perform inverse quantization on quantized transform coefficients by using a quantization parameter (for example, quantization step size information) and obtain transform coefficients.
- a quantization parameter for example, quantization step size information
- the inverse transform unit 322 obtains a residual signal (residual block, residual sample array) by inverse transforming the transform coefficients.
- the prediction unit may perform prediction on the current block and generate a predicted block including prediction samples for the current block.
- the prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the information about the prediction output from the entropy decoding unit 310, and may determine a specific intra/inter prediction mode.
- the prediction unit 320 may generate a prediction signal based on various prediction methods to be described later.
- the prediction unit may apply intra prediction or inter prediction for prediction of one block, as well as simultaneously apply intra prediction and inter prediction. This can be called combined inter and intra prediction (CIIP).
- the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode to predict a block.
- IBC intra block copy
- the IBC prediction mode or the palette mode may be used for content image/video coding such as a game, for example, screen content coding (SCC).
- SCC screen content coding
- IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that it derives a reference block in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this document.
- the palette mode can be viewed as an example of intra coding or intra prediction. When the palette mode is applied, information about a palette table and a palette index may be included in the video/video information and signale
- the intra prediction unit 331 may predict the current block by referring to samples in the current picture.
- the referenced samples may be located in the vicinity of the current block or may be located apart according to the prediction mode.
- prediction modes may include a plurality of non-directional modes and a plurality of directional modes.
- the intra prediction unit 331 may determine a prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
- the inter prediction unit 332 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on the reference picture.
- motion information may be predicted in units of blocks, subblocks, or samples based on a correlation between motion information between a neighboring block and a current block.
- the motion information may include a motion vector and a reference picture index.
- the motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information.
- the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture.
- the inter prediction unit 332 may construct a motion information candidate list based on neighboring blocks, and derive a motion vector and/or a reference picture index of the current block based on the received candidate selection information.
- Inter prediction may be performed based on various prediction modes, and the information about the prediction may include information indicating a mode of inter prediction for the current block.
- the addition unit 340 is reconstructed by adding the obtained residual signal to the prediction signal (predicted block, prediction sample array) output from the prediction unit (including the inter prediction unit 332 and/or the intra prediction unit 331). Signals (restored pictures, reconstructed blocks, reconstructed sample arrays) can be generated. When there is no residual for a block to be processed, such as when the skip mode is applied, the predicted block may be used as a reconstructed block.
- the addition unit 340 may be referred to as a restoration unit or a restoration block generation unit.
- the generated reconstructed signal may be used for intra prediction of the next processing target block in the current picture, may be output through filtering as described later, or may be used for inter prediction of the next picture.
- LMCS luma mapping with chroma scaling
- the filtering unit 350 may improve subjective/objective image quality by applying filtering to the reconstructed signal.
- the filtering unit 350 may generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and the modified reconstructed picture may be converted to the memory 360, specifically, the DPB of the memory 360. Can be transferred to.
- the various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, and the like.
- the (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter prediction unit 332.
- the memory 360 may store motion information of a block from which motion information in a current picture is derived (or decoded) and/or motion information of blocks in a picture that have already been reconstructed.
- the stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block.
- the memory 360 may store reconstructed samples of reconstructed blocks in the current picture, and may be transmitted to the intra prediction unit 331.
- the embodiments described in the filtering unit 260, the inter prediction unit 221, and the intra prediction unit 222 of the encoding apparatus 200 are respectively the filtering unit 350 and the inter prediction of the decoding apparatus 300.
- the same or corresponding to the unit 332 and the intra prediction unit 331 may be applied.
- the encoding apparatus may perform various encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC).
- the decoding apparatus may decode information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output a value of a syntax element required for image restoration and quantized values of a transform coefficient for a residual. have.
- the above-described coding methods may be performed as described below.
- FIG. 4 exemplarily shows context-adaptive binary arithmetic coding (CABAC) for encoding a syntax element.
- CABAC context-adaptive binary arithmetic coding
- the encoding apparatus may convert the input signal into a binary value by binarizing the value of the input signal.
- the binarization may not be performed and may be bypassed.
- each binary number 0 or 1 constituting the binary value may be referred to as a bin.
- each of 1, 1, and 0 is referred to as one bin.
- the bin(s) for one syntax element may represent a value of the syntax element.
- the binarized bins of the syntax element may be input to a regular encoding engine or a bypass encoding engine.
- the regular encoding engine of the encoding device may allocate a context model that reflects a probability value to the corresponding bin, and encode the corresponding bin based on the allocated context model.
- the regular encoding engine of the encoding device may update the context model for the corresponding bin after encoding each bin. Bins encoded as described above may be referred to as context-coded bins.
- binarized bins of the syntax element when binarized bins of the syntax element are input to the bypass encoding engine, they may be coded as follows.
- the bypass encoding engine of the encoding device omits a procedure for estimating a probability for an input bin and a procedure for updating a probability model applied to the bin after encoding.
- the encoding apparatus may encode an input bin by applying a uniform probability distribution instead of allocating a context model, thereby improving an encoding speed.
- the bin encoded as described above may be referred to as a bypass bin.
- Entropy decoding may refer to a process of performing the same process as the above-described entropy encoding in reverse order.
- the decoding apparatus may receive a bin corresponding to the syntax element through a bitstream, and decoding information of the syntax element and a block to be decoded or a neighboring block or
- a context model can be determined using information of symbols/bins decoded in the previous step, and arithmetic decoding of bins by predicting the probability of occurrence of the received bin according to the determined context model
- the value of the syntax element may be derived by performing.
- the context model of the next decoded bin may be updated with the determined context model.
- the decoding apparatus may receive a bin corresponding to the syntax element through a bitstream, and may decode an input bin by applying a uniform probability distribution. .
- the decoding apparatus may omit the procedure of deriving the context model of the syntax element and the procedure of updating the context model applied to the bin after decoding.
- residual samples may be derived into quantized transform coefficients through a transform and quantization process.
- Quantized transform coefficients may also be called transform coefficients.
- the transform coefficients within the block may be signaled in the form of residual information.
- the residual information may include a residual coding syntax. That is, the encoding device may construct a residual coding syntax with residual information, encode it, and output it in the form of a bitstream, and the decoding device decodes the residual coding syntax from the bitstream to obtain residual (quantized) transform coefficients. Can be derived.
- the (quantized) transformation coefficients (that is, the residual information) syntax elements such as transform_skip_flag, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, coded_sub_block_flag, sig_coeff_flag, par_level_flag, abs_level_gt1_flag, abs_level_gt3_flag, abs_remainder, coeff_sign_flag, dec_abs_level, mts_idx It may be encoded and/or decoded based on syntax elements. Syntax elements related to residual data encoding/decoding can be represented as shown in the following table.
- transform_skip_flag indicates whether transformation is omitted in an associated block.
- the transform_skip_flag may be a syntax element of a transform skip flag.
- the associated block may be a coding block (CB) or a transform block (TB).
- CB and TB may be used interchangeably.
- CB and TB may be used interchangeably.
- Information eg, syntax elements
- Quantized transform coefficients can simply be called transform coefficients.
- the size of the CB may be the same as the size of the TB, and in this case, the target block to be transformed (and quantized) and residual coded may be referred to as CB or TB.
- the target block to be transformed (and quantized) and residual coded may be referred to as TB.
- the syntax elements related to residual coding are signaled in units of transform blocks (TB), but this is an example, as described above, that the TB can be mixed with the coding block (CB).
- syntax elements signaled after the transform skip flag is signaled may be the same as the syntax elements disclosed in Table 6 described later, and a detailed description of the syntax elements will be described later.
- a comparison between a scheme for signaling tu_mts_idx and a scheme for signaling tu_mts_idx in the existing VVC Draft 3 may be as follows.
- the MTS flag for the current block is first parsed, then the transform skip flag is parsed, and then coding for the MTS index may be performed.
- the coding for the MTS index may be performed through fixed-length binarization, and the fixed bit length for the MTS index may be 2.
- the transform skip flag and the MTS flag are not separately parsed and the MTS index may be coded, and truncated unary binarization may be used for the coding of the MTS index.
- the MTS index may indicate whether transformation is applied to the residual information of the current block, and may indicate whether the MTS is applied. That is, in the proposed scheme, a scheme of signaling the transform skip flag, the MTS flag, and the MTS index as one syntax element may be proposed.
- the first bin of the MTS index may indicate whether transformation is applied to the residual information of the current block, and the second bin of the MTS index indicates whether the MTS is applied and the applied transformation kernel. I can.
- the meaning and binarization value indicated by the MTS index value may be as shown in the following table.
- the MTS index may indicate that the transformation for the current block is applied, MTS is not applied, and the horizontal transformation kernel type and the vertical transformation kernel type are DCT-2. have.
- the MTS index may indicate that the transformation for the current block is not applied (that is, neither MTS is applied nor a transformation kernel type is indicated).
- the MTS index may indicate that the transform and MTS for the current block are applied, and the horizontal transform kernel type and the vertical transform kernel type are DST-7.
- the MTS index may indicate that the transformation and MTS for the current block are applied, the horizontal transformation kernel type is DCT-8, and the vertical transformation kernel type is DST-7.
- the MTS index may indicate that transformation and MTS for the current block are applied, a horizontal transformation kernel type is DST-7, and a vertical transformation kernel type is DCT-8.
- the MTS index may indicate that the transform and MTS for the current block are applied, and the horizontal transform kernel type and the vertical transform kernel type are DCT-8.
- the MTS index may indicate that the transformation for the current block is not applied (that is, neither MTS is applied nor a transformation kernel type is indicated).
- the MTS index may indicate that the transform for the current block is applied, the MTS is not applied, and the horizontal transform kernel type and the vertical transform kernel type are DCT-2.
- the MTS index may indicate that the transform and MTS for the current block are applied, and the horizontal transform kernel type and the vertical transform kernel type are DST-7.
- the MTS index may indicate that the transformation and MTS for the current block are applied, the horizontal transformation kernel type is DCT-8, and the vertical transformation kernel type is DST-7.
- the MTS index may indicate that transformation and MTS for the current block are applied, a horizontal transformation kernel type is DST-7, and a vertical transformation kernel type is DCT-8.
- the MTS index may indicate that the transform and MTS for the current block are applied, and the horizontal transform kernel type and the vertical transform kernel type are DCT-8.
- the number of context models may not be changed, and a method of designating the context index increment ctxInc for each bin of the tu_mts_idx may be as shown in the following table.
- the proposed MTS index may also be referred to as a unified MTS index.
- Syntax elements related to encoding/decoding residual data including the integrated MTS index may be represented as shown in the following table.
- the encoding device may encode (x, y) position information of the last non-zero transform coefficient in the transform block based on the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. More specifically, the last_sig_coeff_x_prefix represents the prefix of the column position of the last significant coefficient in the scanning order in the transform block, and the last_sig_coeff_y_prefix is within the transform block.
- the scan order may be an upward-right diagonal scan order.
- the scan order may be a horizontal scan order or a vertical scan order. The scan order may be determined based on whether intra/inter prediction is applied to a target block (CB or CB including TB) and/or a specific intra/inter prediction mode.
- the encoding apparatus divides the transform block into 4x4 sub-blocks, and then determines whether a non-zero coefficient exists in the current sub-block using a 1-bit syntax element coded_sub_block_flag for each 4x4 sub-block. Can be indicated.
- coded_sub_block_flag the encoding apparatus may end the encoding process for the current subblock. Conversely, if the value of coded_sub_block_flag is 1, the encoding device may continue to perform the encoding process for sig_coeff_flag.
- the coded_sub_block_flag is not coded and its value because the subblock containing the last non-zero coefficient does not require coding for coded_sub_block_flag, and the subblock containing the DC information of the transform block has a high probability of containing a non-zero coefficient. This can be assumed to be 1.
- the encoding apparatus may encode sig_coeff_flag having a binary value according to the reverse scan order.
- the encoding apparatus may encode a 1-bit syntax element sig_coeff_flag for each transform coefficient according to a scan order. If the value of the transform coefficient at the current scan position is not 0, the value of sig_coeff_flag may be 1.
- the encoding process for the sub-block may be omitted.
- Level information encoding may be performed only when sig_coeff_flag is 1, and four syntax elements may be used in the level information encoding process. More specifically, each sig_coeff_flag[xC][yC] may indicate whether the level (value) of the corresponding transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero (non-zero). In an embodiment, the sig_coeff_flag may correspond to an example of a syntax element of a significant coefficient flag indicating whether a quantized transform coefficient is a non-zero effective coefficient.
- the level value remaining after encoding for sig_coeff_flag may be derived as shown in the following equation. That is, the syntax element remAbsLevel representing the level value to be encoded can be derived with the following equation.
- coeff means an actual transform coefficient value
- abs_level_gt1_flag may indicate whether remAbsLevel' at the corresponding scanning position n is greater than 1. For example, if the value of abs_level_gt1_flag is 0, the absolute value of the transform coefficient at the corresponding location may be 1. In addition, when the value of abs_level_gt1_flag is 1, the remAbsLevel indicating a level value to be encoded later may be derived as shown in the following equation.
- Equation 2 the least significant coefficient (LSB) value of remAbsLevel described in Equation 2 may be encoded as Equation 3 below through par_level_flag.
- par_level_flag[n] may represent parity of the transform coefficient level (value) at the scanning position n.
- the transform coefficient level value remAbsLevel to be encoded may be updated as shown in the following equation.
- abs_level_gt3_flag may indicate whether remAbsLevel at the corresponding scanning position n is greater than 3. Encoding for abs_remainder may be performed only when rem_abs_gt3_flag is 1.
- the relationship between the actual transform coefficient value coeff and each syntax element may be as follows.
- represents a transform coefficient level (value), and may be expressed as AbsLevel for the transform coefficient.
- the sign of each coefficient may be encoded using a 1-bit symbol coeff_sign_flag.
- different residual syntax elements are different depending on whether or not transform skip is applied for residual coding, that is, different residual syntax elements according to whether or not transform skip is applied.
- An embodiment may be proposed for transmitting the data.
- Syntax elements for residual coding according to the above-described example may be represented as in the following tables.
- residual coding may be branched according to the value of the syntax element transform_skip_flag of the transform skip flag. That is, a different syntax element may be used for residual coding based on the value of the transform skip flag (based on whether or not to skip transform).
- the residual coding used when the transform skip is not applied i.e., when the transform is applied
- RRC regular residual coding
- TSRC Transform Skip Residual Coding
- Table 9 above may indicate the syntax element of residual coding when the value of transform_skip_flag is 0, that is, when transform is applied, and Table 10 shows the register when the value of transform_skip_flag is 1, that is, when the transform is not applied. It may represent a syntax element of dual coding.
- a transform skip flag indicating whether to skip transform of a transform block may be parsed, and whether the transform skip flag is 1 may be determined.
- the value of the transform skip flag is 1, as shown in Table 10, syntax elements sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag, and/or abs_remainder for the residual coefficient of the transform block may be parsed, and based on the syntax elements.
- the residual coefficient may be derived.
- the syntax elements may be sequentially parsed or the parsing order may be changed.
- abs_level_gtx_flag may represent abs_level_gt1_flag, abs_level_gt3_flag, abs_level_gt7_flag and/or abs_level_gt9_flag.
- abs_level_gtx_flag[n][j] indicates whether the absolute value of the transform coefficient level (or the transform coefficient level shifted by 1 to the right) at the scanning position n is greater than (j ⁇ 1)+1. It can be a flag.
- the (j ⁇ 1)+1 may be replaced by a predetermined threshold value, such as a first threshold value and a second threshold value, in some cases.
- syntax elements sig_coeff_flag, abs_level_gtx_flag, par_level_flag, abs_remainder, dec_abs_level, coeff_sign_flag may be parsed as shown in Table 9, and the syntax The residual coefficient may be derived based on the elements.
- the syntax elements may be sequentially parsed or the parsing order may be changed.
- the abs_level_gtx_flag may represent abs_level_gt1_flag and/or abs_level_gt3_flag.
- abs_level_gtx_flag[n][0] may be an example of a first transform coefficient level flag (abs_level_gt1_flag), and the abs_level_gtx_flag[n][1] is an example of a second transform coefficient level flag (abs_level_gt3_flag). I can.
- the syntax element par_level_flag may not be encoded and decoded.
- the level value of the residual coefficient is large, coding all of the syntax elements such as sig_coeff_flag, par_level_flag, and abs_level_gtx_flag for all residual coefficients transmits redundant information, compared to transmitting the level value of the residual coefficient as it is binarized. The possibility is high. Accordingly, in the present embodiment, when a transform skip, which may have a large residual coefficient level value, is applied, the syntax element par_level_flag may be omitted, thereby improving coding efficiency.
- CABAC provides high performance, but has a disadvantage of poor throughput performance. This is due to CABAC's regular encoding engine, and regular encoding (that is, encoding through CABAC's regular encoding engine) shows high data dependence because it uses the updated probability state and range through encoding of the previous bin. It can take a lot of time to read the probability interval and determine the current state.
- the throughput problem of CABAC can be solved by limiting the number of context-coded bins.
- the sum of bins used to express sig_coeff_flag, abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag as in Table 1, Table 6, Table 9 or Table 10 described above may be limited to the number according to the size of the corresponding block.
- the sum of bins for the sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag may be limited to 32.
- the sig_coeff_flag, abs_level_flag, par_level_flag, and par_level_flag may be limited to 8.
- the limited number of bins can be represented by remBinsPass1.
- the number of context coded bins may be limited for a block (CB or TB) including a CG to be coded.
- the number of context encoding bins may be limited in units of blocks (CBs or TBs). For example, if the size of the current block is 16x16, the number of context encoding bins for the current block may be limited to 1.75 times the number of pixels of the current block, that is, 448, regardless of the current CG.
- the encoding apparatus binarizes the remaining coefficients through a binarization method for the coefficients described later without using CABAC, and performs bypass encoding. I can. In other words, for example, if the number of context coded bins coded for 4x4 CG is 32, or the number of context coded bins coded for 2x2 CG is 8, then the context coded bins are no longer coded.
- sig_coeff_flag abs_level_gt1_flag, par_level_flag, abs_level_gt3_flag may not be encoded, and may be directly encoded as dec_abs_level as shown in Table 8 described later.
- the number of context coded bins coded for a 4x4 block is limited to 1.75 times the number of pixels of all blocks, that is, 28, sig_coeff_flag, abs_level_gt1_flag that are no longer coded as context coded bins , par_level_flag, and abs_level_gt3_flag may not be encoded, and may be directly encoded as dec_abs_level as shown in Table 8 described later.
- the coeff_sign_flag may represent a sign of a transform coefficient level at a corresponding scanning position n. That is, the coeff_sign_flag may represent the sign of the transform coefficient at the corresponding scanning position n.
- the mts_idx may represent transform kernels applied in a horizontal direction and a vertical direction to residual samples in a current transform block.
- FIG. 5 is a diagram illustrating an example of transform coefficients in a 4x4 block.
- the 4x4 block of FIG. 5 shows an example of quantized coefficients.
- the block shown in FIG. 5 may be a 4x4 transform block or a 4x4 sub-block of an 8x8, 16x16, 32x32, or 64x64 transform block.
- the 4x4 block of FIG. 5 may represent a luma block or a chroma block.
- encoding results of coefficients scanned inverse diagonally in FIG. 5 may be as shown in the following table.
- scan_pos indicates the position of the coefficient according to the inverse diagonal scan.
- scan_pos 15 may be the transform coefficient of the first scan, that is, the lower right corner, in the 4x4 block
- scan_pos 0 may be the transform coefficient of the last scan, that is, the upper left corner.
- the scan_pos may be referred to as a scan position.
- the scan_pos 0 may be referred to as a scan position 0.
- the encoding apparatus may convert the input signal into a binary value by binarizing the value of the input signal.
- the decoding apparatus may decode the syntax element to derive a binarized value (ie, binarized bin) of the syntax element, and inverse binarize the binarized value to derive the value of the syntax element.
- the binarization process is a Truncated Rice (TR) binarization process, a k-th order Exp-Golomb (EGk) binarization process, a k-order Limited Exp.
- -Golomb (Limited k-th order Exp-Golomb, Limited EGk), or a fixed-length (FL) binarization process, etc.
- the inverse binarization process may be performed based on the TR binarization process, the EGk binarization process, or the FL binarization process to derive a value of the syntax element.
- the TR binarization process may be performed as follows.
- the input of the TR binarization process may be a request for TR binarization and cMax and cRiceParam for a syntax element. Further, the output of the TR binarization process may be TR binarization for a value symbolVal corresponding to an empty string.
- the TR empty string for the syntax element when there is a suffix empty string for the syntax element, the TR empty string for the syntax element may be a concatenation of a prefix empty string and a suffix empty string, and the When the suffix bin string does not exist, the TR bin string for the syntax element may be the prefix bin string.
- the prefix empty string may be derived as described later.
- the prefix value of the symbolVal for the syntax element may be derived as follows.
- prefixVal may represent the prefix value of the symbolVal.
- a prefix (ie, prefix empty string) of the TR bin string of the syntax element may be derived as described later.
- the prefix bin string may be a bit string of length prefixVal + 1 indexed by binIdx. That is, when the prefixVal is smaller than cMax >> cRiceParam, the prefix empty string may be a bitstring of prefixVal + 1 bit number indicated by binIdx.
- the bin for binIdx less than prefixVal can be equal to 1. Also, a bin for binIdx that is identical to prefixVal may be equal to 0.
- an empty string derived by unary binarization for the prefixVal may be as shown in the following table.
- the prefix bean string may be a bit string having a length of cMax >> cRiceParam and all bins being 1.
- a suffix of the TR bin string may exist.
- the suffix bin string may be derived as described later.
- the suffix value of the symbolVal for the syntax element may be derived as the following equation.
- suffixVal may represent a suffix value of symbolVal.
- the suffix of the TR bean string (ie, the suffix bean string) may be derived based on the FL binarization process for suffixVal whose cMax value is (1 ⁇ cRiceParam)-1.
- the TR binarization may be precisely truncated unary binarization, and a cMax value equal to the maximum possible value of the syntax element to be always decoded may be used.
- the EGk binarization process may be performed as follows.
- the syntax element coded with ue(v) may be an Exp-Golomb coded syntax element.
- a 0-th order Exp-Golomb (EG0) binarization process may be performed as follows.
- the parsing process for the syntax element may be started by reading a bit including the first non-zero bit starting from the current position of the bitstream and counting the number of preceding bits equal to 0. have.
- the process can be expressed as shown in the following table.
- variable codeNum can be derived as the following equation.
- the value returned from read_bits(leadingZeroBits), that is, the value indicated by read_bits(leadingZeroBits), is a binary representation of an unsigned integer for the most significant bit recorded first. Can be interpreted.
- the "prefix” bit may be a bit parsed as described above for calculating the leadingZeroBits, and may be represented as 0 or 1 of the bit string in Table 15. That is, the bit string disclosed by 0 or 1 in Table 15 described above may represent a prefix bit string.
- the "suffix” bit may be a bit parsed in the calculation of codeNum, and may be indicated by xi in Table 15 described above. That is, the bit string disclosed by xi in Table 15 may represent a suffix bit string.
- i may be a value in the range of 0 to LeadingZeroBits-1.
- each xi may be equal to 0 or 1.
- the bit string allocated to the codeNum may be as shown in the following table.
- the value of the syntax element may be the same as codeNum.
- the EGk binarization process may be performed as follows.
- An input of the EGk binarization process may be a request for EGk binarization.
- an output of the EGk binarization process may be EGk binarization for a value symbolVal corresponding to an empty string.
- bit string of the EGk binarization process for symbolVal can be derived as follows.
- a binary value X may be added to the end of an empty string through each call of put(X).
- X may be 0 or 1.
- the Limited EGk binarization process may be performed as follows.
- the input of the Limited EGk binarization process may be a request for Limited EGk binarization and a Rice parameter riceParam, log2TransformRange, a variable representing the maximum binary logarithm, and maxPreExtLen, a variable representing the maximum prefix extension length.
- the output of the Limited EGk binarization process may be Limited EGk binarization for a value symbolVal corresponding to an empty string.
- bit string of the Limited EGk binarization process for symbolVal can be derived as follows.
- the FL binarization process may be performed as follows.
- An input of the FL binarization process may be a request for FL binarization and cMax for the syntax element.
- an output of the FL binarization process may be FL binarization for a value symbolVal corresponding to an empty string.
- FL binarization can be constructed using a bit string having a fixed number of bits of the symbol value symbolVal.
- the fixed length bit may be an unsigned integer bit string. That is, a bit string for the symbol value symbolVal may be derived through FL binarization, and the bit length (ie, the number of bits) of the bitstring may be a fixed length.
- the fixed length may be derived as follows.
- the indexing of bins for FL binarization may be a method of using a value increasing from the most significant bit to the least significant bit.
- the binarization process for the syntax element abs_remainder among the residual information may be performed as follows.
- the input of the binarization process for abs_remainder may be a request for binarization of the syntax element abs_remainder[n], a color component cIdx, and a luma position (x0, y0).
- the luma position (x0, y0) may indicate an upper left sample of the current luma transform block based on the upper left luma sample of the picture.
- the output of the binarization process for the abs_remainder may be the binarization of the abs_remainder (ie, the binarized bin string of the abs_remainder).
- Usable bin strings for the abs_remainder may be derived through the binarization process.
- lastAbsRemainder and lastRiceParam for abs_remainder[n] can be derived as follows.
- the lastAbsRemainder may indicate a value of abs_remainder derived before abs_remainder[n]
- the lastRiceParam may indicate a Rice parameter cRiceParam for abs_remainder derived before abs_remainder[n].
- both the lastAbsRemainder and the lastRiceParam may be set to 0.
- the lastAbsRemainder and the lastRiceParam are set equal to the values of abs_remainder[n] and cRiceParam derived from each last call.
- the lastAbsRemainder may be derived with the same value as abs_remainder[n] coded before abs_remainder[n] currently coded
- the lastRiceParam is cRiceParam for abs_remainder[n] coded before abs_remainder[n] currently coded
- a Rice parameter cRiceParam for abs_remainder[n] that is currently coded may be derived based on the lastAbsRemainder and the lastRiceParam.
- the Rice parameter cRiceParam for abs_remainder[n] that is currently coded may be derived as the following equation.
- cMax for abs_remainder[n] currently coded may be derived based on the Rice parameter cRiceParam.
- the cMax can be derived as the following equation.
- the Rice parameter cRiceParam may be determined based on whether the current block is skipped. That is, when transformation is not applied to the current TB including the current CG, that is, when transform skip is applied to the current TB including the current CG, the Rice parameter cRiceParam is 1 Can be derived. Or, when transformation is applied to the current TB including the current CG, that is, when transformation skip is not applied to the current TB including the current CG, the currently coded abs_remainder[n
- the Rice parameter cRiceParam for] can be derived with the same value as cRiceParam for abs_remainder[n] coded previously.
- the binarization for abs_remainder that is, the empty string for abs_remainder may be a concatenation of a prefix empty string and a suffix empty string when a suffix empty string exists.
- the empty string for abs_remainder may be the prefix empty string.
- the prefix empty string may be derived as described later.
- the prefixVal of the abs_remainder[n] may be derived as the following equation.
- the prefix of the empty string of abs_remainder[n] (that is, the prefix empty string) may be derived through the TR binarization process for the prefixVal using the cMax and cRiceParam as inputs.
- a suffix bin string of the bin string of abs_remainder[n] may exist and may be derived as described later.
- the suffix value suffixVal of the abs_remainder may be derived by the following equation.
- the empty string suffix of the empty string of abs_remainder is k is set to cRiceParam+1, riceParam is set to cRiceParam, log2TransformRange is set to 15, and maxPreExtLen is set to 11 through the Limited EGk binarization process for the suffixVal. Can be derived.
- the binarization process for the syntax element dec_abs_level among the residual information may be performed as follows.
- the input of the binarization process for the dec_abs_level is a request for binarization of the syntax element dec_abs_level[n], a color component cIdx, a luma position (x0, y0), a current coefficient scan position (xC, yC), and a transform block. It may be log2TbWidth, which is the binary logarithm of the width, and log2TbHeight, which is the binary logarithm of the height of the transform block.
- the luma position (x0, y0) may indicate an upper left sample of the current luma transform block based on the upper left luma sample of the picture.
- the output of the binarization process for the dec_abs_level may be the binarization of the dec_abs_level (ie, the binarized bin string of the dec_abs_level). Usable bin strings for the dec_abs_level may be derived through the binarization process.
- Rice parameter cRiceParam for the dec_abs_level[n] is the color component cIdx and luma position (x0, y0), the current coefficient scan position (xC, yC), log2TbWidth which is the binary logarithm of the width of the transform block, and the binary of the height of the transform block. It can be derived through a rice parameter derivation process performed by inputting log2TbHeight, which is an algebraic number. A detailed description of the process of deriving the rice parameter will be described later.
- cMax for the dec_abs_level[n] may be derived based on the Rice parameter cRiceParam.
- the cMax can be derived as the following equation.
- binarization of the dec_abs_level[n] that is, the empty string for the dec_abs_level[n] is a concatenation of a prefix empty string and a suffix empty string if there is a suffix empty string. I can.
- the bin string for dec_abs_level[n] may be the prefix bin string.
- the prefix empty string may be derived as described later.
- the prefixVal of the dec_abs_level[n] may be derived as the following equation.
- the prefix of the empty string of dec_abs_level[n] (that is, the prefix empty string) may be derived through a TR binarization process for the prefixVal using the cMax and cRiceParam as inputs.
- a suffix bin string of the bin string of dec_abs_level[n] may exist and may be derived as described later.
- a process of deriving a Rice parameter for dec_abs_level[n] may be as follows.
- the input of the Rice parameter derivation process includes a color component index cIdx, a luma position (x0, y0), a current count scan position (xC, yC), log2TbWidth, which is a binary logarithm of the width of a transform block, and It may be log2TbHeight, which is the binary logarithm of the height of the transform block.
- the luma position (x0, y0) may indicate an upper left sample of the current luma transform block based on the upper left luma sample of the picture.
- the output of the rice parameter derivation process may be the rice parameter cRiceParam.
- variable locSumAbs is It can be derived as a pseudo code disclosed in the following table.
- the Rice parameter cRiceParam may be derived as follows.
- the Rice parameter cRiceParam may be derived based on the derived variable locSumAbs and the variable s.
- the variable s may be set to Max(0, QState-1). That is, the s may be set to a maximum value of 0 and QState-1.
- the Rice parameters cRiceParam and ZeroPos[n] derived based on the variable locSumAbs and the variable s may be as shown in the following table.
- the cRiceParam when the locSumAbs is 6 or less, the cRiceParam may be set to 0, and when the locSumAbs is 7 or more and 13 or less, the cRiceParam may be set to 1, and the locSumAbs When is 14 or more and 27 or less, the cRiceParam may be set to 2, and when the locSumAbs is 28 or more, the cRiceParam may be set to 3.
- ZeroPos[n] when s is 0 and locSumAbs is 4 or less, ZeroPos[n] may be set to 0, and when s is 0 and locSumAbs is 5, the ZeroPos [n] may be set to 1, and when s is 0 and locSumAbs is 6 or more and 11 or less, ZeroPos[n] may be set to 2, s is 0, and locSumAbs is 12 If it is greater than or equal to 22, the ZeroPos[n] may be set to 4, and if the s is 0 and the locSumAbs is greater than or equal to 23 and less than or equal to 27, the ZeroPos[n] may be set to 8, and the s When is 0 and the locSumAbs is 28 or more, the ZeroPos[n] may be set to 16.
- ZeroPos[n] when s is 1 and locSumAbs is 3 or less, ZeroPos[n] may be set to 1, and when s is 1 and locSumAbs is 4, the ZeroPos [n] may be set to 2, and when s is 1 and locSumAbs is 5, ZeroPos[n] may be set to 3, s is 1, and locSumAbs is 6 or more and 8 In the following cases, the ZeroPos[n] may be set to 4, the s is 1, and the locSumAbs is 9 or more and 11 or less, the ZeroPos[n] may be set to 6, and the s is 1 , When the locSumAbs is 12 or more and 15 or less, the ZeroPos[n] may be set to 8, and when s is 1 and the locSumAbs is 16 or more and 17 or less, the ZeroPos[n] is set to 4 In the case where s is 1 and locSumAbs is 18 or more and 25 or less, ZeroP
- ZeroPos[n] when s is 2 and locSumAbs is 1 or less, ZeroPos[n] may be set to 1, s is 2, and locSumAbs is 2 or more and 4 or less.
- the ZeroPos[n] may be set to 2, the s is 2, and the locSumAbs is 5, the ZeroPos[n] may be set to 3, the s is 2, and the locSumAbs is 6 If it is greater than or equal to 8, the ZeroPos[n] may be set to 4, and if the s is 2 and the locSumAbs is greater than or equal to 9 and less than or equal to 11, the ZeroPos[n] may be set to 6, and the s Is 2, the locSumAbs is 12 or more and 17 or less, the ZeroPos[n] may be set to 8, and when s is 2 and the locSumAbs is 18 or more and 24 or less, the ZeroPos[n] is 12 When s is 2 and locSumAbs, the
- ZeroPos[n] may be derived as the following equation, where cRiceParam included in the equation to be described later may be derived with reference to Table 20.
- suffix value suffixVal of the dec_abs_level[n] may be derived as the following equation.
- the empty string k is set to cRiceParam+1
- riceParam is set to cRiceParam
- log2TransformRange is set to 15
- maxPreExtLen is set to 11 Limited EGk binarization for the suffixVal. It can be derived through the process.
- the transform skip level i.e., the residual in the spatial domain
- the contents described later in the existing residual coding scheme are modified. Suggest a plan.
- the scanning order of the sub-block in the TB block and the residual coefficient in the sub-block may be a diagonal scan order moving from the lower right to the upper left. That is, the scanning order of the sub-block in the TB block and the residual coefficient in the sub-block may be a diagonal scan order of scanning from the lower right to the upper left.
- the scanning order of the sub-block in the TB block and the residual coefficient in the sub-block may be a diagonal scan order moving from the upper left to the lower right. That is, the scanning order of the sub-block in the TB block and the residual coefficient in the sub-block may be a diagonal scan order of scanning from the upper left to the lower right.
- No last non-zero transform coefficient position Since the residual signal (i.e., residual sample) reflects the spatial residual after prediction, and energy compression by transform is not performed by transform skip , A high probability for a trailing zero or an insignificant level in the lower right corner of the transform block may no longer occur. Accordingly, in this case, signaling information on the scanning position of the last non-zero transform coefficient may be omitted. Instead, the first sub-block to be coded first may be the upper left sub-block in the transform block. Meanwhile, the non-zero transform coefficient may be expressed as a significant coefficient.
- Subblock CBF Transform skip is applied to the absence of signaling information on the scanning position of the last non-zero transform coefficient, and CBF signaling of a subblock having coded_sub_block_flag should be modified as follows.
- coded_sub_block_flag for a sub-block (top left sub-block) for a DC frequency position may indicate a special case.
- the coded_sub_block_flag for the upper left subblock is not signaled and is always equal to 1.
- the scanning position of the last non-zero transform coefficient is located in a subblock other than the upper left subblock, it may indicate that there is at least one significant level outside the DC subblock (ie, the upper left subblock).
- the coded_sub_block_flag for the DC subblock is 1, but only the 0/non-significant level may be included.
- a coded_sub_block_flag for each sub-block may be signaled.
- a coded_sub_block_flag for a DC sub-block may also be included except when the coded_sub_block_flag for all sub-blocks other than the DC sub-block is already 0.
- the coded_sub_block_flag for the DC subblock is equal to 1.
- context modeling of coded_sub_block_flag may be changed.
- the context model index may be calculated as a sum of the coded_sub_block_flag of the left sub-block of the current sub-block and the coded_sub_block_flag of the upper sub-block of the current sub-block, and logical separation of the coded_sub_block_flags.
- sig_coeff_flag context modeling The local template of sig_coeff_flag context modeling may be modified to include only the left position NB0 and the upper position NB1 of the current scanning position.
- the context model offset may be derived by the number of sig_coeff_flag [NB0] + sig_coeff_flag [NB1] of the effective surrounding location.
- abs_level_gt1_flag and par_level_flag context modeling A single context model can be used for abs_level_gt1_flag and par_level_flag.
- abs_remainder coding The empirical distribution of the transform skip residual absolute level still fits the Laplacian or geometric distribution, but there may be greater instability than the transform coefficient absolute level. In particular, the variance within the window of successive realization can be higher for the residual absolute level. Accordingly, the binarization and context modeling of abs_remainder can be modified as follows.
- a higher cutoff value can be used for binarization of abs_remainder.
- higher compression efficiency can be provided to a conversion point from coding using sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag to rice code for abs_remainder and a dedicated context model for each bin location.
- Increasing the cutoff may cause more flags "greater than X" (eg, abs_level_gt5_flag, abs_level_gt7_flag, etc.) to occur until the cutoff is reached.
- the template for deriving rice parameters may be modified. That is, only the right peripheral position and the lower peripheral position of the current scanning position may be considered as a local template for sig_coeff_flag context modeling.
- coeff_sign_flag Context Modeling Instability inside the sign sequence and prediction residuals are often biased, so even when the global empirical distribution is almost uniformly distributed, the context model is used for sign-related information. Can be coded by A single-only context model may be used for coding the code related information, and the code related information may be parsed after sig_coeff_flag and maintained together with all context coded bins.
- CCBs context coded bins per sample
- the reduction of CCB can be derived by designating an invalid mode when CCB> k.
- k may be a positive integer.
- k 2 may be used.
- the above limitation may correspond to a reduction in quantization space.
- a context index (ctxIdx) indicating a context model of a syntax element coded based on a context included in the above-described residual information may be derived as described below.
- the input of the process of deriving the context index for the syntax element may be binIdx indicating the position of the current bin in the bin string for the syntax element, and ctxTable, ctxIdx, and bypassFlag may be derived as outputs.
- ctxInc for the current bin for the syntax element may be derived. That is, ctxInc may be derived based on binIdx indicating the location of the current bin for the syntax element.
- the ctxInc may be expressed as a context increment parameter.
- CtxInc derived according to binIdx for the syntax element may be as shown in the following table.
- CtxInc for the current bin of the syntax element may be derived as a value designated as an item for the current bin in Table 22.
- the ctxInc may be derived through the process of clauses in parentheses in the item. The above clause may mean a clause disclosed in the VVC standard.
- the variable ctxIdxOffset may be designated as the lowest value of ctxIdx according to the current value of initType.
- the context index (ctxIdx) for the current bin of the syntax element may be set equal to the sum of ctxInc and ctxIdxOffset. That is, the context index may be set as the sum of ctxInc and ctxIdxOffset.
- bypassFlag can be set to 0.
- the context index of the bin may be derived as follows.
- ctxTable for the current bin may be set to 0.
- the context index (ctxIdx) for the current bin may be set to 0.
- bypassFlag may be set to 1.
- the context index of the bean may be derived as follows.
- ctxTable for the current bin may be set to 0.
- the context index (ctxIdx) for the current bin may be set to 0.
- bypassFlag can be set to 0.
- the syntax elements for the bean that is, the context index of for the bean may be derived as follows. For example, ctxIdx, ctxTable, and/or bypassFlag for the current bin may not occur.
- the process of deriving ctxInc according to Section 9.5.4.2.4 may be as shown in the following table.
- the process of deriving ctxInc according to Section 9.5.4.2.5 may be as shown in the following table.
- a block that does not perform transform encoding that is, a transform block including residual coefficients to which transform is not applied, has different characteristics of residual information from a block in which normal transform encoding has been performed.
- the transform skip flag indicating whether to apply the transform may be transmitted in units of transform blocks, and the size of the transform block is not limited in this document.
- the transform skip flag indicates that transform is not applied to the current block (transform is skipped)
- the residual information encoding/decoding scheme in the transform skip mode disclosed in Table 10 or Table 21 may be performed. .
- a transform coefficient may be derived as a residual sample. Therefore, the residual sample at the time of skipping the transform may be referred to as a coefficient or a residual coefficient.
- a significant coefficient flag, a first transform coefficient level flag, a parity level flag, and a second transform coefficient level flag may be encoded/decoded for residual encoding/decoding.
- the syntax element for the re-main level value that is, abs_remainder or dec_abs_level may be encoded/decoded, and then a sign flag for each residual coefficient may be encoded/decoded.
- the significant coefficient flag may be sig_coeff_flag
- the parity level flag may be par_level_flag
- the first transform coefficient level flag may be abs_level_gt1_flag
- the second transform coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
- the sign flag may be the coeff_sign_flag described above.
- the sign flag may be encoded/decoded in the same manner as described in the description of Table 21.
- the sign flag is bypass-coded, and may be encoded/decoded based on a context model.
- a residual coefficient in the transform skip block has a high probability of having a code similar to the residual coefficient in the vicinity.
- the present embodiment of the present document provides a context table (ctxTable) of a sine flag of a residual coefficient of a transform skipped residual signal, that is, a transform skipped block, and a sine flag of a neighboring residual coefficient adjacent to the residual coefficient. It is determined based on the context table, and a method of context-coding the sign flag of the residual coefficient is proposed. That is, in the present embodiment, the context model for the sine flag of the residual coefficient of the current block is determined by using the sine flag of the residual coefficient surrounding the residual coefficient among the residual coefficients coded before the residual coefficient in the current block. We propose a method of coding a sign flag based on the determined context model.
- the sign flag can be context encoded/decoded to improve compression performance.
- the CG may also be referred to as a sub-block.
- the sign flag encoding/decoding disclosed in Table 21 uses only one context model, in this embodiment, a context determined based on a sign flag of a residual coefficient coded before the residual coefficient among a plurality of context models There is a difference in coding using the model.
- a sign flag may be coded in consideration of a high correlation with adjacent residual coefficients.
- the sine flags of adjacent residual coefficients in the transform skip block tend to have similar values.
- the sine flags of the residual coefficients in the current sub-block are encoded/
- decoding a method of selecting two context models (or context tables) based on a value (eg, 0 or 1) of a sign flag of a neighboring residual coefficient adjacent to the residual coefficient is proposed.
- the context model for the sign flag of the residual coefficient is a predefined context model (e.g., context Model 0).
- context Model 0 e.g., context Model 0
- the context model may be indicated based on ctxIdx or ctxInc, and the ctxIdx may be derived based on the ctxInc.
- the context model for the sine flag of the current residual is derived as one of three context models based on the sign flags of two residual coefficients encoded/decoded before the current residual coefficient in the current subblock.
- the context model for the sign flag of the current residual is one of six context models based on the sign flags of two residual coefficients encoded/decoded before the current residual coefficient in the current sub-block. It can be derived as one.
- the context model for the sine flag of the current residual is 3 based on the sine flag of the residual coefficient around the left side of the current residual coefficient and the sine flag of the residual coefficient around the upper side of the current residual coefficient. It can be derived from one of two context models.
- the context model for the sine flag of the current residual is 6 based on the sine flag of the residual coefficient around the left of the current residual coefficient and the sine flag of the residual coefficient above the current residual coefficient. It can be derived from one of two context models.
- the context model for the sign flag of the residual coefficient is a predefined context model (e.g., context Model 0).
- an embodiment for deriving a context model of a sign flag proposed in this document may be defined as shown in the following table.
- a context model for the bin of the syntax element coeff_sign_flag (ie, a sign flag) for the current residual coefficient may be determined based on neighbourSignflag.
- the context model for the bin of the syntax element coeff_sign_flag for the current residual coefficient may be determined based on ctxInc, and the ctxInc is 0 when the value of neighbourSignflag is 0, and 1 when the value of neighbourSignflag is 1 Can be derived.
- neighbourSignflag may be the same as a value of a sign flag for a residual residual coefficient of a current residual coefficient in the current block.
- the peripheral residual coefficient may be a peripheral residual coefficient adjacent to at least one of the residual coefficients encoded/decoded before the current residual coefficient according to the coefficient scan order.
- the residual coefficients in the decoding process will be sequentially scanned along a diagonal line in a downward-left direction starting from the lower right of the CG in the reverse direction and reaching the upper left. I can.
- a value of the sine flag of the right peripheral residual coefficient and/or the lower peripheral residual coefficient of the current residual coefficient may be derived as the neighbourSignFlag.
- the residual coefficients in the decoding process start from the upper left corner of the CG in the reverse direction and sequentially follow a diagonal line in the upward direction until reaching the lower right corner.
- a value of a sine flag of a left peripheral residual coefficient and/or an upper peripheral residual coefficient of the current residual coefficient may be derived as the neighbourSignFlag.
- the neighborSignFlag may be set to 0. That is, the initial value of the neighbourSignFlag may be set to 0.
- the context for the bin of coeff_sign_flag of the current residual coefficient based on the value of coeff_sign_flag of the residual coefficient encoded/decoded before the current residual coefficient in the coefficient scanning order among residual coefficients in the current CG.
- a model may be adaptively determined, and through this, a bin of coeff_sign_flag of the current residual coefficient may be decoded, and a value of coeff_sign_flag of the current residual coefficient may be derived. Through this, correlation between adjacent residual coefficients can be considered, and coding gain can be increased.
- the sign of the current residual sample can be derived using the value of coeff_sign_flag of the current residual coefficient.
- the process of deriving a context model based on the ctxInc may be as described above.
- ctxIdxOffset for the sign flag may be derived as the smallest value among values that ctxIdx for the sign flag may have.
- ctxIdx (context model index indicating the context model) may be derived as a value of 0 (ie, context model 0) or 1 (ie, context model 1), so the ctxIdxOffset is 0 Can be derived.
- ctxIdx for the sign flag may be derived as a sum of ctxIdxOffset and ctxInc.
- ctxIdx for the sign flag may be the same as ctxInc.
- ctxIdx context model index indicating a context model
- the sign flag may be derived as 0.
- ctxIdx for the sign flag may be derived as a sum of ctxIdxOffset and ctxInc. Since the ctxIdxOffset is derived as 0, ctxIdx for the sign flag may be the same as ctxInc.
- N may be 2 or 5.
- the above-described embodiments can be applied to all transform skip blocks.
- the sine flag is encoded/decoded only for non-zero residual coefficients, it would be more advantageous to apply the above-described embodiments only when the number of non-zero residual coefficients to be subjected to sine flag encoding/decoding is more than a certain number. May be. Accordingly, when the residual coding method described in Table 1 or Table 6 is used, the number of previously coded non-zero residual coefficients can be derived, and a sine flag is context according to the number of non-zero residual coefficients. Whether to code or bypass coding can be determined.
- the sign flag may be coded based on a context model, and the number of non-zero residual coefficients of the current sub-block If is less than a specific value, the sign flag may be bypass coded.
- the specific value may be 5.
- the sign flag may be coded based on the context model, and the number of non-zero residual coefficients of the current sub-block If is less than 5, the sign flag can be bypass coded.
- the number of the non-zero residual coefficients may be one of 0 to 16, and when the current sub-block is a 2x2 size block, the non-zero residual The number of dual coefficients may be one of 0 to 4. This document does not limit the order in which the sign flags are coded, and can be applied at any stage after determining whether there is a non-zero residual coefficient of the current sub-block or the number of non-zero residual coefficients.
- the number of non-zero residual coefficients used as a threshold may be one of a number from 0 to the number of samples of the current block (block including the current sub-block), Alternatively, it is controlled in a sub-block unit and may be one of 0 to 16 in the case of a 4x4 sub-block, and one of 0 to 4 in the case of a 2x2 sub-block.
- a specific value may be derived based on the size of the current block or the current sub-block, and if the number of non-zero residual coefficients of the current sub-block is greater than or equal to the specific value, the sign flag is based on a context model. It may be coded, and if the number of non-zero residual coefficients of the current subblock is less than the specific value, the sign flag may be bypass coded.
- the specific value may be derived as 5, and if the number of non-zero residual coefficients of the current subblock is 5 or more, the sign flag is based on the context model. It may be coded, and if the number of non-zero residual coefficients of the current subblock is less than 5, the sign flag may be bypass coded.
- the specific value can be derived as 4, and when the number of non-zero residual coefficients of the current subblock is 4 or more, the sign flag is coded based on a context model. If the number of non-zero residual coefficients of the current subblock is less than 4, the sign flag may be bypass coded.
- context coding/bypass coding of a sign flag is determined based on a specific value derived according to the size of the current block, the position of the current subblock, and the number of non-zero residual coefficients may be proposed.
- the number of non-zero residual coefficients used as a threshold may be one of a number from 0 to the number of samples of the current block (block including the current sub-block), Alternatively, it is controlled in a sub-block unit and may be one of 0 to 16 in the case of a 4x4 sub-block, and one of 0 to 4 in the case of a 2x2 sub-block.
- a specific value may be derived based on the size of the current block or the current sub-block and the position of the current sub-block, and if the number of non-zero residual coefficients of the current sub-block is greater than or equal to the specific value, the sign flag May be coded based on a context model, and if the number of non-zero residual coefficients of the current subblock is less than the specific value, the sign flag may be bypass coded.
- the specific value may be derived as 5
- the sign flag may be coded based on the context model. If the number of non-zero residual coefficients of the current sub-block is less than 5, the sign The flag can be bypass coded.
- the third CG may be a lower right sub-block.
- the sign is irrespective of the number of non-zero residual coefficients of the current subblock. Flags can be coded based on the context model. That is, the specific value may be derived as 0.
- the 0th CG may be an upper left sub-block.
- the number of non-zero residual coefficients used as a threshold may be one of a number from 0 to the number of samples of the current block (block including the current sub-block), Alternatively, it is controlled in a sub-block unit and may be one of 0 to 16 in the case of a 4x4 sub-block, and one of 0 to 4 in the case of a 2x2 sub-block.
- a specific value may be derived based on the size of the current block or the current sub-block, the position of the current sub-block, and the prediction mode of the current block, and the number of non-zero residual coefficients of the current sub-block is the If the value is greater than or equal to a specific value, the sign flag may be coded based on a context model, and if the number of non-zero residual coefficients of the current sub-block is less than the specific value, the sign flag may be bypass coded.
- the current subblock is the first CG encoded in the order determined by the diagonal scan order, and the prediction mode of the current block is the intra prediction mode
- the specific value may be derived as 5, and if the number of non-zero residual coefficients of the current sub-block is 5 or more, the sign flag may be coded based on a context model, and the non- If the number of zero residual coefficients is less than 5, the sine flag may be bypass coded.
- the third CG may be a lower right sub-block.
- the sign flag will be coded based on the context model regardless of the number of non-zero residual coefficients of the current sub-block. I can. That is, the specific value may be derived as 0.
- the 0th CG may be an upper left sub-block.
- FIG. 6 shows an example of determining a context model of a sign flag of a current residual coefficient according to the present embodiment.
- the encoding device/decoding device may determine whether the current residual coefficient is a residual coefficient that is first encoded/decoded in the current CG scan order of the current block (S610).
- the current residual coefficient may represent a residual coefficient that is a current encoding/decoding target among residual coefficients in the current block.
- the encoding device/decoding device may derive a variable neighbourSignFlag for the sign flag of the current residual coefficient as 0 (S620). .
- a variable neighbourSignFlag for the sign flag of the current residual coefficient may be derived as the context model 0.
- ctxIdc for the sign flag of the current residual coefficient may be derived as 0, and since ctxIdxOffset for the sign flag is derived as 0, the sign flag CtxIdx for may be derived as 0 (ie, derived as context model 0).
- the encoding device/decoding device may determine whether a value of a residual residual coefficient surrounding the current residual coefficient is 0. (S630).
- the peripheral residual coefficient may include at least one of a left peripheral residual coefficient and an upper peripheral residual coefficient of the current residual coefficient.
- the peripheral residual coefficient may include at least one of a right peripheral residual coefficient and a lower peripheral residual coefficient of the current residual coefficient.
- the encoding device/decoding device determines whether the value of the peripheral residual coefficient of the current residual coefficient is less than 0, that is, a negative number (negative number). value) can be determined (S640). Whether the peripheral residual coefficient is negative may be derived based on a sine flag of the peripheral residual coefficient. For example, when the value of the sine flag of the peripheral residual coefficient is 0, the sine flag may indicate that the peripheral residual coefficient is a positive value, and the value of the sine flag of the peripheral residual coefficient is When 1, the sign flag may indicate that the peripheral residual coefficient is a negative value.
- the encoding device/decoding device may derive a variable neighbourSignFlag for the sine flag of the current residual coefficient as 0 (S620). .
- the encoding device/decoding device may derive a variable neighbourSignFlag for the sign flag of the current residual coefficient as 1 (S650).
- the encoding device/decoding device may derive a context model for a sign flag of the current residual coefficient based on the neighbourSignFlag as shown in Table 30 above. For example, when the neighbourSignFlag is 0, a context model for the sign flag may be derived as a context model 0, and when the neighbourSignFlag is 1, a context model for the sign flag may be derived as a context model 1. have.
- a context model of the current residual coefficient may be derived based on a neighboring residual coefficient as described later.
- the neighbourSignFlag of the current residual coefficient may be derived based on a sine flag of the neighboring residual coefficient of the current residual coefficient.
- the neighborSignFlag may be derived based on a sign flag of a residual coefficient around an upper side of the current residual coefficient.
- the neighbourSignFlag may be derived as a value of a sign flag of the residual coefficient around the upper side.
- the context model for the sign flag may be derived as a context model 0 and when the neighbourSignFlag is 1, the context model for the sign flag is derived as a context model 1. Can be.
- the neighborSignFlag may be derived based on a sign flag of a residual coefficient around the left of the current residual coefficient.
- the neighbourSignFlag may be derived as a value of a sign flag of the left peripheral residual coefficient.
- the context model for the sign flag may be derived as a context model 0 and when the neighbourSignFlag is 1, the context model for the sign flag is derived as a context model 1. Can be.
- the neighborSignFlag may be derived based on a sine flag of an upper peripheral residual coefficient of the current residual coefficient and a sine flag of a left peripheral residual coefficient of the current residual coefficient.
- the neighbourSignFlag may be derived based on a value of a sine flag of an upper peripheral residual coefficient and a value of a sine flag of the left peripheral residual coefficient.
- the neighborSignFlag may be derived as 0, and the context model for the sine flag of the current residual coefficient is derived as a context model 0 Can be.
- the neighborSignFlag may be derived as 1, and ,
- the context model for the sign flag of the current residual coefficient may be derived as context model 1.
- the neighbourSignFlag may be derived as 2
- the context model for the sign flag of the current residual coefficient may be derived as a context model 2.
- the sign of the left peripheral residual coefficient may be derived as a positive number, and when the value of the sine flag of the left peripheral residual coefficient is 1, The sign of the residual coefficient around the left side may be derived as a negative number.
- the sign of the left peripheral residual coefficient may be derived as 0.
- the sign of the upper peripheral residual coefficient may be derived as a positive number, and when the value of the sine flag of the upper peripheral residual coefficient is 1, The sign of the residual coefficient around the upper side may be derived as a negative number.
- the sign of the upper peripheral residual coefficient may be derived as 0.
- the neighbourSignFlag may be derived based on a sign flag of a residual coefficient around a lower side of the current residual coefficient.
- the neighbourSignFlag may be derived as a value of a sign flag of the lower peripheral residual coefficient.
- the context model for the sign flag may be derived as a context model 0 and when the neighbourSignFlag is 1, the context model for the sign flag is derived as a context model 1. Can be.
- the neighborSignFlag may be derived based on a sign flag of a residual coefficient around the right side of the current residual coefficient.
- the neighbourSignFlag may be derived as a value of a sign flag of the residual coefficient around the right.
- the context model for the sign flag may be derived as a context model 0 and when the neighbourSignFlag is 1, the context model for the sign flag is derived as a context model 1. Can be.
- the neighbourSignFlag may be derived based on a sine flag of a lower peripheral residual coefficient of the current residual coefficient and a sine flag of a right peripheral residual coefficient.
- the neighbourSignFlag may be derived based on a value of a sine flag of a lower peripheral residual coefficient and a value of a sine flag of the right peripheral residual coefficient.
- the neighborSignFlag may be derived as 0, and the context model for the sine flag of the current residual coefficient is derived as a context model 0 Can be.
- the neighborSignFlag may be derived as 1, and ,
- the context model for the sign flag of the current residual coefficient may be derived as context model 1.
- the neighbourSignFlag may be derived as 2
- the context model for the sign flag of the current residual coefficient may be derived as a context model 2.
- the sign of the right peripheral residual coefficient may be derived as a positive number, and when the value of the sine flag of the right peripheral residual coefficient is 1, The sign of the residual coefficient around the right side may be derived as a negative number.
- the sign of the right peripheral residual coefficient may be derived as 0.
- the sign of the lower peripheral residual coefficient may be derived as a positive number, and when the value of the sine flag of the lower peripheral residual coefficient is 1, The sign of the lower peripheral residual coefficient may be derived as a negative number.
- the sign of the lower peripheral residual coefficient may be derived as 0.
- FIG. 7 exemplarily shows an encoding apparatus and a decoding apparatus for coding a sign flag of a current residual coefficient based on whether or not a transform of the current block is applied and a sign of a neighboring residual coefficient.
- FIG. 7A exemplarily shows an encoding apparatus encoding a sign flag of a current residual coefficient based on whether or not a transform of the current block is applied and a sign of a neighboring residual coefficient.
- the encoding device may determine whether or not transformation is applied to the current block, and when transformation is not applied to the current block, the vicinity of the current residual coefficient to be encoded
- the context model of the sign flag of the current residual coefficient may be derived based on the sign of the residual coefficient.
- the peripheral residual coefficient may include at least one of an upper peripheral residual coefficient and a left peripheral residual coefficient of the current residual coefficient.
- the peripheral residual coefficient may include at least one of a lower peripheral residual coefficient and a right peripheral residual coefficient of the current residual coefficient.
- the encoding apparatus may context-encode the sign flag of the current residual coefficient based on the determined context model, and transmit a bitstream including the encoded sign flag.
- (b) of FIG. 7 exemplarily shows a decoding apparatus for decoding a sign flag of a current residual coefficient based on whether or not a transform of the current block is applied and a sign of a neighboring residual coefficient.
- the decoding apparatus may derive whether or not transformation is applied to the current block based on the transformation skip flag of the current block.
- the decoding target A context model of a sine flag of the current residual coefficient may be derived based on the sign of the neighboring residual coefficient of the current residual coefficient.
- the peripheral residual coefficient may include at least one of an upper peripheral residual coefficient and a left peripheral residual coefficient of the current residual coefficient.
- the peripheral residual coefficient may include at least one of a lower peripheral residual coefficient and a right peripheral residual coefficient of the current residual coefficient.
- the decoding apparatus may context-decode the sign flag of the current residual coefficient based on the determined context model, and may derive the current residual coefficient based on the decoded sign flag.
- FIG. 8 schematically shows an image encoding method by the encoding apparatus according to this document.
- the method disclosed in FIG. 8 may be performed by the encoding apparatus disclosed in FIG. 2.
- S810 of FIG. 8 may be performed by the residual processing unit of the encoding device
- S820 to S840 may be performed by the entropy encoding unit of the encoding device.
- the process of deriving a prediction sample may be performed by the prediction unit of the encoding device, and a residual sample for the current block is derived based on the original sample and the prediction sample for the current block.
- the process of generating a reconstructed sample and a reconstructed picture for the current block based on a residual sample and a prediction sample for the current block may be performed by a subtraction unit of the encoding device. It can be done by wealth.
- the encoding apparatus derives a current residual coefficient of the current block (S810).
- the encoding apparatus may determine whether to perform inter prediction or intra prediction on the current block, and may determine a specific inter prediction mode or a specific intra prediction mode based on RD cost. Depending on the determined mode, the encoding apparatus may derive a prediction sample for the current block, and may derive the residual sample by subtracting the original sample for the current block and the prediction sample.
- the encoding device may determine whether or not transformation is applied to the current block. That is, the encoding device may determine whether or not the transformation is applied to the residual sample of the current block.
- the encoding apparatus may determine whether to apply the transform to the current block in consideration of coding efficiency. For example, the encoding device may determine that the transformation is not applied to the current block.
- the encoding apparatus may derive the derived residual sample as the current residual coefficient.
- the encoding apparatus performs transformation on the derived residual sample to derive the current residual coefficient.
- the current residual coefficient may be included in the current subblock of the current block.
- the current sub-block may be called a current coefficient croup (CG).
- the size of the current subblock of the current block may be a 4x4 size or a 2x2 size. That is, the current sub-block of the current block may include a maximum of 16 non-zero residual coefficients or a maximum of 4 non-zero residual coefficients.
- the encoding apparatus may generate and encode a transform skip flag indicating whether to apply transform of residual coefficients of the current block.
- the residual information may include a transform skip flag for the current block.
- the transform skip flag may indicate whether to apply transform of residual coefficients of the current block. That is, the transform skip flag may indicate whether a transform is applied to the residual coefficients.
- the syntax element representing the transform skip flag may be transform_skip_flag described above.
- the encoding device derives a context model for the sign flag of the current residual coefficient (S820).
- the encoding apparatus may derive a context model for the sign flag of the current residual coefficient from among a plurality of context models.
- the context model for the sign flag may be derived based on a sign flag of a neighboring residual coefficient of the current residual coefficient encoded before the current residual coefficient in the current block. That is, it may be derived based on a sign flag of a residual coefficient surrounding the current residual coefficient among residual coefficients encoded (or scanned) before the current residual coefficient in the coefficient scanning order for the current block. .
- the context model for the sign flag may be derived based on a sign of an upper peripheral residual coefficient of the current residual coefficient and a sign of a left peripheral residual coefficient.
- the sign of the upper peripheral residual coefficient may be derived based on the sine flag of the upper peripheral residual coefficient
- the sign of the left peripheral residual coefficient may be derived based on the sine flag of the left peripheral residual coefficient.
- the context model for the sine flag may be derived based on a sine flag of an upper peripheral residual coefficient of the current residual coefficient and a sine flag of a left peripheral residual coefficient.
- the sign of the left peripheral residual coefficient when the value of the sine flag of the left peripheral residual coefficient is 0, the sign of the left peripheral residual coefficient may be derived as 1, and the value of the sine flag of the left peripheral residual coefficient is In the case of 1, the sign of the left peripheral residual coefficient can be derived as -1, and when the (level) value of the left peripheral residual coefficient is 0, the sign of the left peripheral residual coefficient is derived as 0. I can.
- the sign of 1 may represent a positive value
- the sign of -1 may represent a negative value.
- the sign of the upper peripheral residual coefficient may be derived as 1, and the value of the sine flag of the upper peripheral residual coefficient is In the case of 1, the sign of the upper peripheral residual coefficient can be derived as -1, and when the (level) value of the upper peripheral residual coefficient is 0, the sign of the upper peripheral residual coefficient is 0. I can.
- the context model for the sine flag is one of six context models based on a sign of an upper peripheral residual coefficient of the current residual coefficient and a sign of a left peripheral residual coefficient.
- the context model for the sign flag may be derived as one of three context models based on the sign of the upper peripheral residual coefficient of the current residual coefficient and the sign of the left peripheral residual coefficient. I can.
- the context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient is context It can be derived as model 1.
- the context model for the sign flag of the current residual coefficient may be derived as context model 2.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient is derived as context model 1. I can.
- the context model for the sign flag of the current residual coefficient may be derived as context model 2.
- the context model for the sign flag may be derived based on a sign of a residual coefficient around an upper side of the current residual coefficient.
- the sign of the upper peripheral residual coefficient may be derived based on a sine flag of the upper peripheral residual coefficient. That is, the context model for the sine flag may be derived based on a sine flag of a residual coefficient around an upper side of the current residual coefficient.
- the sign of the upper peripheral residual coefficient when the value of the sine flag of the upper peripheral residual coefficient is 0, the sign of the upper peripheral residual coefficient may be derived as 1, and the value of the sine flag of the upper peripheral residual coefficient is In the case of 1, the sign of the upper peripheral residual coefficient can be derived as -1, and when the (level) value of the upper peripheral residual coefficient is 0, the sign of the upper peripheral residual coefficient is 0. I can.
- the sign of 1 may represent a positive value
- the sign of -1 may represent a negative value.
- the context model for the sign flag may be derived as one of three context models based on a sign of a residual coefficient around an upper side of the current residual coefficient.
- the context model for the sign flag may be derived as one of two context models based on a sign of a residual coefficient around an upper side of the current residual coefficient.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient may be derived as context model 1.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- a context model for the sine flag of the current residual coefficient may be derived as a context model 1.
- the context model for the sign flag may be derived based on a sign of a residual coefficient around the left of the current residual coefficient.
- the sign of the left peripheral residual coefficient may be derived based on a sine flag of the left peripheral residual coefficient. That is, the context model for the sine flag may be derived based on a sine flag of a residual coefficient around the left of the current residual coefficient.
- the sign of the left peripheral residual coefficient when the value of the sine flag of the left peripheral residual coefficient is 0, the sign of the left peripheral residual coefficient may be derived as 1, and the value of the sine flag of the left peripheral residual coefficient is In the case of 1, the sign of the left peripheral residual coefficient can be derived as -1, and when the (level) value of the left peripheral residual coefficient is 0, the sign of the left peripheral residual coefficient is derived as 0. I can.
- the sign of 1 may represent a positive value
- the sign of -1 may represent a negative value.
- the context model for the sign flag may be derived as one of three context models based on a sign of a residual coefficient around the left of the current residual coefficient.
- the context model for the sign flag may be derived as one of two context models based on a sign of a residual coefficient around the left of the current residual coefficient.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient may be derived as context model 1.
- the context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient may be derived as context model 1.
- the context model for the sine flag may be derived based on a sign of a lower peripheral residual coefficient of the current residual coefficient and a sign of a right peripheral residual coefficient.
- the sign of the lower peripheral residual coefficient may be derived based on a sine flag of the lower peripheral residual coefficient
- the sign of the right peripheral residual coefficient may be derived based on the sine flag of the right peripheral residual coefficient.
- the context model for the sine flag may be derived based on a sine flag of a lower peripheral residual coefficient of the current residual coefficient and a sine flag of a right peripheral residual coefficient.
- the sign of the right peripheral residual coefficient when the value of the sine flag of the right peripheral residual coefficient is 0, the sign of the right peripheral residual coefficient may be derived as 1, and the value of the sine flag of the right peripheral residual coefficient is When 1, the sign of the right peripheral residual coefficient can be derived as -1, and when the (level) value of the right peripheral residual coefficient is 0, the sign of the right peripheral residual coefficient is 0. I can.
- the sign of 1 may represent a positive value, and the sign of -1 may represent a negative value.
- the sign of the lower peripheral residual coefficient may be derived as 1, and the value of the sine flag of the lower peripheral residual coefficient is In the case of 1, the sign of the lower peripheral residual coefficient can be derived as -1, and when the (level) value of the lower peripheral residual coefficient is 0, the sign of the lower peripheral residual coefficient is 0. I can.
- the context model for the sine flag is one of six context models based on the sign of the lower peripheral residual coefficient of the current residual coefficient and the sign of the right peripheral residual coefficient. Can be derived. Or, for example, the context model for the sine flag may be derived as one of three context models based on the sign of the lower peripheral residual coefficient of the current residual coefficient and the sign of the right peripheral residual coefficient. I can.
- the context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the sign of the right peripheral residual coefficient and the sign of the lower peripheral residual coefficient are 0 or more (i.e., 0 or 1)
- the sign of the current residual coefficient The context model for the flag can be derived as context model 1.
- the context model for the sign flag of the current residual coefficient may be derived as context model 2.
- the context model for the sign flag may be derived based on a sign of a residual coefficient around a lower side of the current residual coefficient.
- the sign of the lower peripheral residual coefficient may be derived based on a sine flag of the lower peripheral residual coefficient. That is, the context model for the sine flag may be derived based on a sine flag of a residual coefficient around a lower side of the current residual coefficient.
- the sign of the lower peripheral residual coefficient when the value of the sine flag of the lower peripheral residual coefficient is 0, the sign of the lower peripheral residual coefficient may be derived as 1, and the value of the sine flag of the lower peripheral residual coefficient is In the case of 1, the sign of the lower peripheral residual coefficient can be derived as -1, and when the (level) value of the lower peripheral residual coefficient is 0, the sign of the lower peripheral residual coefficient is 0. I can.
- the sign of 1 may represent a positive value
- the sign of -1 may represent a negative value.
- the context model for the sign flag may be derived as one of three context models based on a sign of a residual coefficient around a lower side of the current residual coefficient.
- the context model for the sign flag may be derived as one of two context models based on a sign of a residual coefficient around a lower side of the current residual coefficient.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient may be derived as context model 1.
- the context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 1.
- the context model for the sign flag may be derived based on a sign of a residual coefficient around the right side of the current residual coefficient.
- the sign of the right peripheral residual coefficient may be derived based on a sine flag of the right peripheral residual coefficient. That is, the context model for the sine flag may be derived based on a sine flag of a residual coefficient around the right side of the current residual coefficient.
- the sign of the right peripheral residual coefficient when the value of the sine flag of the right peripheral residual coefficient is 0, the sign of the right peripheral residual coefficient may be derived as 1, and the value of the sine flag of the right peripheral residual coefficient is When 1, the sign of the right peripheral residual coefficient can be derived as -1, and when the (level) value of the right peripheral residual coefficient is 0, the sign of the right peripheral residual coefficient is 0.
- the sign of 1 may represent a positive value
- the sign of -1 may represent a negative value.
- the context model for the sign flag may be derived as one of three context models based on the sign of the residual coefficient around the right side of the current residual coefficient.
- the context model for the sign flag may be derived as one of two context models based on the sign of the residual coefficient around the right side of the current residual coefficient.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient may be derived as context model 1.
- the context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- a context model for the sine flag of the current residual coefficient may be derived as a context model 1.
- the context of the sign flag of the current residual coefficient can be derived as 0. That is, for example, when the current residual coefficient is a residual coefficient that is first encoded in the current subblock, a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the encoding device may determine whether the sign flag is encoded based on the context model, and when the sign flag determines that the flag is encoded based on the context model, the context for the sign flag You can also derive a model.
- the encoding device may determine whether the sign flag is encoded based on the context model based on the transform skip flag for the current block. That is, the encoding device may determine whether the sign flag is encoded based on the context model based on whether or not the current block is transformed.
- the transform skip flag may indicate whether transform is applied to the current block. That is, the transform skip flag may indicate whether or not transform is applied to residual coefficients of the current block.
- the residual information for the current block may include the transform skip flag.
- the sign flag may not be encoded based on the context model (that is, the sign flag may be bypass encoded), and the value of the transform skip flag is 1 In this case, the sign flag may be encoded based on the context model.
- the encoding device may derive the context model for the sign flag, and the context The sign flag can be encoded based on the model.
- the encoding device may determine whether the sign flag is encoded based on the context model by comparing the number of non-zero residual coefficients in the current sub-block with a specific value.
- the current sub-block may mean a sub-block of the current block including the current residual coefficient.
- the sign flag may not be encoded based on the context model (ie, the sign flag may be bypass encoded), and the non- When the number of zero residual coefficients is greater than or equal to the specific value, the sign flag may be encoded based on the context model.
- the encoding device may determine that the sign flag is encoded based on the context model, and the encoding device may determine that the context for the sign flag is A model can be derived, and the sign flag can be encoded based on the context model.
- the specific value may also be expressed as a threshold.
- the specific value may be one of 0 to the number of samples of the current block.
- the specific value may be one of 0 to 64.
- the specific value may be one of 0 to the number of samples of the current sub-block. That is, for example, when the size of the current sub-block is a size of 4x4, the specific value may be one of 0 to 16, and when the size of the current sub-block is a size of 2x2, the specific value is 0 to 4 It can be one of.
- the specific value may be 5.
- the specific value may be derived based on the size of the current block. For example, when the size of the current block is 8x8, the specific value may be derived as 5, and when the size of the current block is 4x4, the specific value may be derived as 4.
- the specific value may be derived based on the size of the current block and the location of the current sub-block in the current block.
- the specific value may be derived as 5.
- the lower right sub-block may be sub-block 3 (ie, CG 3) of the order determined by a diagonal scan order.
- the specific value may be derived as 4.
- the upper left sub-block may be sub-block 0 (or CG 0) among the order determined by a diagonal scan order.
- the specific value may be derived based on the size of the current block, the position of the sub-block in the current block, and a prediction mode of the current block.
- the specific value is derived as 5.
- the specific value when the size of the current block is 8x8, the current sub-block is a sub-block on the lower right of the current block, and the prediction mode applied to the current block is the intra prediction mode, the specific value will be derived as 5. I can.
- the specific value Can be derived as zero. That is, when the size of the current block is 8x8, the current subblock is the upper left subblock of the current block, and the prediction mode applied to the current block is the intra prediction mode, the specific value is derived as 0. I can. Accordingly, it may be determined that the sign flag is encoded based on the context model regardless of the number of the non-zero residual coefficients.
- the encoding device encodes the sign flag based on the context model (S830).
- the encoding device may encode the sign flag based on the context model. That is, the encoding device may encode the sign flag based on the context based on the context model.
- the sign flag may indicate a sign of the current residual coefficient. When the value of the sign flag is 0, the sign flag may indicate that the current residual coefficient is a positive value (ie, the sign flag may indicate that the sign of the current residual coefficient is 1) , When the value of the sign flag is 1, the sign flag may indicate that the current residual coefficient is a negative value (that is, the sign flag may indicate that the sign of the current residual coefficient is -1. have). That is, when the value of the sine flag is 0, the current residual coefficient may be a positive value, and when the value of the sine flag is 1, the current residual coefficient may be a negative value. have.
- the encoding device may encode residual information for the current block.
- the residual information may include syntax elements for a residual coefficient in a current subblock of the current block.
- the residual information may include syntax elements for a current residual coefficient in a current subblock of the current block.
- the syntax elements may include context-based coded syntax elements and bypass coded syntax elements (ie, syntax elements coded based on a uniform probability distribution).
- the residual information is to include the syntax elements such as transform_skip_flag, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, coded_sub_block_flag, sig_coeff_flag, par_level_flag, abs_level_gt1_flag, abs_level_gtX_flag, abs_remainder, coeff_sign_flag, dec_abs_level and / or mts_idx (syntax elements) I can.
- the residual information may include a transform skip flag for the current block.
- the transform skip flag may indicate whether to apply the transform of the current block. That is, the transform skip flag may indicate whether transform is applied to the residual coefficients of the current block.
- the syntax element representing the transform skip flag may be transform_skip_flag described above.
- the residual information may include position information indicating the position of the last non-zero residual coefficient in the residual coefficient array of the current block. That is, the residual information may include position information indicating the position of the last non-zero residual coefficient in the scanning order of the current block.
- the position information is information indicating a prefix of a column position of the last non-zero residual coefficient, and indicating a prefix of a row position of the last non-zero residual coefficient.
- Information, information indicating a suffix of the column position of the last non-zero residual coefficient, information indicating a suffix of the row position of the last non-zero residual coefficient May contain information.
- Syntax elements for the location information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. Meanwhile, the non-zero residual coefficient may be referred to as a significant coefficient.
- the residual information may include syntax elements coded based on a context for a current residual coefficient in a current subblock of the current block.
- the syntax elements include a valid coefficient flag indicating whether the current residual coefficient is a non-zero residual coefficient, a parity level flag for parity of the coefficient level for the current residual coefficient, and the A first coefficient level flag indicating whether the coefficient level is greater than a first threshold value, and a second coefficient level flag indicating whether the coefficient level of the current residual coefficient is greater than a second threshold value.
- the significant coefficient flag may be sig_coeff_flag
- the parity level flag may be par_level_flag
- the first coefficient level flag may be abs_level_gt1_flag
- the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
- syntax elements coded based on a context for a current residual coefficient may include a sign flag indicating a sign of the current residual coefficient.
- the context-based coded syntax elements may include the sign flag. That is, when the transformation is not applied to the current block (ie, when the value of the transformation skip flag is 1), the sign flag may be encoded based on a context model.
- the residual information may include a syntax element coded based on a bypass for a current residual coefficient in the current subblock of the current block.
- the bypass-coded syntax element may include coefficient value related information on the value of the current residual coefficient.
- the coefficient value related information may be abs_remainder and/or dec_abs_level.
- the bypass-coded syntax element may include the sign flag. That is, when a transform is applied to the current block (i.e., if the value of the transform skip flag is 0), the sine flag may be bypass encoded (i.e., the sine flag is encoded based on a uniform probability distribution) have.
- the encoding device generates a bitstream including the sign flag (S840).
- the encoding device may output image information including residual information including the sign flag as a bitstream.
- the bitstream may include the residual information.
- the bitstream may include prediction information on the current block.
- the prediction information may include information on an inter prediction mode or an intra prediction mode performed on the current block.
- the encoding device may generate and encode prediction information for the current block.
- the bitstream may be transmitted to a decoding device through a network or a (digital) storage medium.
- the network may include a broadcasting network and/or a communication network
- the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.
- FIG. 9 schematically shows an encoding apparatus that performs an image encoding method according to this document.
- the method disclosed in FIG. 8 may be performed by the encoding apparatus disclosed in FIG. 9.
- the residual processing unit of the encoding device of FIG. 9 may perform S810 of FIG. 8
- the entropy encoding unit of the encoding device of FIG. 9 may perform S820 to S840 of FIG. 8.
- the process of deriving a prediction sample may be performed by the prediction unit of the encoding device, and a reconstructed sample for the current block is derived based on a residual sample and a prediction sample for the current block.
- the process may be performed by an adder of the encoding device, and a process of encoding prediction information for the current block may be performed by an entropy encoding unit of the encoding device.
- FIG. 10 schematically shows an image decoding method by a decoding apparatus according to this document.
- the method disclosed in FIG. 10 may be performed by the decoding apparatus disclosed in FIG. 3.
- S1010 to S1040 of FIG. 10 may be performed by an entropy decoding unit of the decoding device
- S1050 may be performed by a residual processing unit of the decoding device
- S1060 is an addition of the decoding device. It can be done by wealth.
- a process of deriving a prediction sample may be performed by a prediction unit of the decoding apparatus.
- the decoding apparatus receives residual information for the current block (S1010).
- the decoding apparatus may receive image information including residual information on the current block through a bitstream.
- the current block may be a coding block (CB) or a transform block (TB).
- the residual information may include syntax elements for a residual coefficient in a current subblock of the current block.
- the residual information may include syntax elements for a current residual coefficient in a current subblock of the current block.
- the syntax elements may include context-based coded syntax elements and bypass coded syntax elements (ie, syntax elements coded based on a uniform probability distribution).
- the residual information is to include the syntax elements such as transform_skip_flag, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, coded_sub_block_flag, sig_coeff_flag, par_level_flag, abs_level_gt1_flag, abs_level_gtX_flag, abs_remainder, coeff_sign_flag, dec_abs_level and / or mts_idx (syntax elements) I can.
- the residual information may include a transform skip flag for the current block.
- the transform skip flag may indicate whether to apply the transform of the current block. That is, the transform skip flag may indicate whether transform is applied to the residual coefficients of the current block.
- the syntax element representing the transform skip flag may be transform_skip_flag described above.
- the residual information may include position information indicating the position of the last non-zero residual coefficient in the residual coefficient array of the current block. That is, the residual information may include position information indicating the position of the last non-zero residual coefficient in the scanning order of the current block.
- the position information is information indicating a prefix of a column position of the last non-zero residual coefficient, and indicating a prefix of a row position of the last non-zero residual coefficient.
- Information, information indicating a suffix of the column position of the last non-zero residual coefficient, information indicating a suffix of the row position of the last non-zero residual coefficient May contain information.
- Syntax elements for the location information may be last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. Meanwhile, the non-zero residual coefficient may be referred to as a significant coefficient.
- the residual information may include syntax elements coded based on a context for a current residual coefficient in a current subblock of the current block.
- the syntax elements include a valid coefficient flag indicating whether the current residual coefficient is a non-zero residual coefficient, a parity level flag for parity of the coefficient level for the current residual coefficient, and the A first coefficient level flag indicating whether the coefficient level is greater than a first threshold value, and a second coefficient level flag indicating whether the coefficient level of the current residual coefficient is greater than a second threshold value.
- the significant coefficient flag may be sig_coeff_flag
- the parity level flag may be par_level_flag
- the first coefficient level flag may be abs_level_gt1_flag
- the second coefficient level flag may be abs_level_gt3_flag or abs_level_gtx_flag.
- syntax elements coded based on a context for a current residual coefficient may include a sign flag indicating a sign of the current residual coefficient.
- the context-based coded syntax elements may include the sign flag. That is, when the transform is not applied to the current block (ie, the value of the transform skip flag is 1), the sign flag may be decoded based on a context model.
- the residual information may include a syntax element coded based on a bypass for a current residual coefficient in the current subblock of the current block.
- the bypass-coded syntax element may include coefficient value related information on the value of the current residual coefficient.
- the coefficient value related information may be abs_remainder and/or dec_abs_level.
- the bypass-coded syntax element may include the sign flag. That is, when a transform is applied to the current block (i.e., when the value of the transform skip flag is 0), the sine flag can be bypass decoded (i.e., the sine flag is decoded based on a uniform probability distribution). have.
- the bitstream may include prediction information on the current block.
- the prediction information may include information on an inter prediction mode or an intra prediction mode performed on the current block.
- the decoding apparatus may perform inter prediction or intra prediction on the current block based on the prediction information received through the bitstream, and may derive prediction samples of the current block.
- the decoding apparatus derives a context model for a sign flag of the current residual coefficient of the current block (S1020).
- the decoding apparatus may derive a context model for the sign flag of the current residual coefficient from among a plurality of context models.
- the context model for the sign flag may be derived based on a sign flag of a neighboring residual coefficient of the current residual coefficient decoded before the current residual coefficient in the current block. That is, it may be derived based on a sign flag of a residual coefficient surrounding the current residual coefficient among residual coefficients decoded (or scanned) before the current residual coefficient in the coefficient scanning order for the current block. .
- the context model for the sign flag may be derived based on a sign of an upper peripheral residual coefficient of the current residual coefficient and a sign of a left peripheral residual coefficient.
- the sign of the upper peripheral residual coefficient may be derived based on the sine flag of the upper peripheral residual coefficient
- the sign of the left peripheral residual coefficient may be derived based on the sine flag of the left peripheral residual coefficient.
- the context model for the sine flag may be derived based on a sine flag of an upper peripheral residual coefficient of the current residual coefficient and a sine flag of a left peripheral residual coefficient.
- the sign of the left peripheral residual coefficient when the value of the sine flag of the left peripheral residual coefficient is 0, the sign of the left peripheral residual coefficient may be derived as 1, and the value of the sine flag of the left peripheral residual coefficient is In the case of 1, the sign of the left peripheral residual coefficient can be derived as -1, and when the (level) value of the left peripheral residual coefficient is 0, the sign of the left peripheral residual coefficient is derived as 0. I can.
- the sign of 1 may represent a positive value
- the sign of -1 may represent a negative value.
- the sign of the upper peripheral residual coefficient may be derived as 1, and the value of the sine flag of the upper peripheral residual coefficient is In the case of 1, the sign of the upper peripheral residual coefficient can be derived as -1, and when the (level) value of the upper peripheral residual coefficient is 0, the sign of the upper peripheral residual coefficient is 0. I can.
- the context model for the sine flag is one of six context models based on a sign of an upper peripheral residual coefficient of the current residual coefficient and a sign of a left peripheral residual coefficient.
- the context model for the sign flag may be derived as one of three context models based on the sign of the upper peripheral residual coefficient of the current residual coefficient and the sign of the left peripheral residual coefficient. I can.
- the context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the sign of the left peripheral residual coefficient and the sign of the upper peripheral residual coefficient are 0 or more (i.e., 0 or 1)
- the sign of the current residual coefficient The context model for the flag can be derived as context model 1.
- the context model for the sign flag of the current residual coefficient may be derived as context model 2.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient is derived as context model 1. I can.
- the context model for the sign flag of the current residual coefficient may be derived as context model 2.
- the context model for the sign flag may be derived based on a sign of a residual coefficient around an upper side of the current residual coefficient.
- the sign of the upper peripheral residual coefficient may be derived based on a sine flag of the upper peripheral residual coefficient. That is, the context model for the sine flag may be derived based on a sine flag of a residual coefficient around an upper side of the current residual coefficient.
- the sign of the upper peripheral residual coefficient when the value of the sine flag of the upper peripheral residual coefficient is 0, the sign of the upper peripheral residual coefficient may be derived as 1, and the value of the sine flag of the upper peripheral residual coefficient is In the case of 1, the sign of the upper peripheral residual coefficient can be derived as -1, and when the (level) value of the upper peripheral residual coefficient is 0, the sign of the upper peripheral residual coefficient is 0. I can.
- the sign of 1 may represent a positive value
- the sign of -1 may represent a negative value.
- the context model for the sign flag may be derived as one of three context models based on a sign of a residual coefficient around an upper side of the current residual coefficient.
- the context model for the sign flag may be derived as one of two context models based on a sign of a residual coefficient around an upper side of the current residual coefficient.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient may be derived as context model 1.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- a context model for the sine flag of the current residual coefficient may be derived as a context model 1.
- the context model for the sign flag may be derived based on a sign of a residual coefficient around the left of the current residual coefficient.
- the sign of the left peripheral residual coefficient may be derived based on a sine flag of the left peripheral residual coefficient. That is, the context model for the sine flag may be derived based on a sine flag of a residual coefficient around the left of the current residual coefficient.
- the sign of the left peripheral residual coefficient when the value of the sine flag of the left peripheral residual coefficient is 0, the sign of the left peripheral residual coefficient may be derived as 1, and the value of the sine flag of the left peripheral residual coefficient is In the case of 1, the sign of the left peripheral residual coefficient can be derived as -1, and when the (level) value of the left peripheral residual coefficient is 0, the sign of the left peripheral residual coefficient is derived as 0. I can.
- the sign of 1 may represent a positive value
- the sign of -1 may represent a negative value.
- the context model for the sign flag may be derived as one of three context models based on a sign of a residual coefficient around the left of the current residual coefficient.
- the context model for the sign flag may be derived as one of two context models based on a sign of a residual coefficient around the left of the current residual coefficient.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient may be derived as context model 1.
- the context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient may be derived as context model 1.
- the context model for the sine flag may be derived based on a sign of a lower peripheral residual coefficient of the current residual coefficient and a sign of a right peripheral residual coefficient.
- the sign of the lower peripheral residual coefficient may be derived based on a sine flag of the lower peripheral residual coefficient
- the sign of the right peripheral residual coefficient may be derived based on the sine flag of the right peripheral residual coefficient.
- the context model for the sine flag may be derived based on a sine flag of a lower peripheral residual coefficient of the current residual coefficient and a sine flag of a right peripheral residual coefficient.
- the sign of the right peripheral residual coefficient when the value of the sine flag of the right peripheral residual coefficient is 0, the sign of the right peripheral residual coefficient may be derived as 1, and the value of the sine flag of the right peripheral residual coefficient is In the case of 1, the sign of the right peripheral residual coefficient can be derived as -1, and when the (level) value of the right peripheral residual coefficient is 0, the sign of the right peripheral residual coefficient is 0. I can.
- the sign of 1 may represent a positive value
- the sign of -1 may represent a negative value.
- the sign of the lower peripheral residual coefficient may be derived as 1, and the value of the sine flag of the lower peripheral residual coefficient is In the case of 1, the sign of the lower peripheral residual coefficient can be derived as -1, and when the (level) value of the lower peripheral residual coefficient is 0, the sign of the lower peripheral residual coefficient is 0. I can.
- the context model for the sine flag is one of six context models based on the sign of the lower peripheral residual coefficient of the current residual coefficient and the sign of the right peripheral residual coefficient. Can be derived. Or, for example, the context model for the sine flag may be derived as one of three context models based on the sign of the lower peripheral residual coefficient of the current residual coefficient and the sign of the right peripheral residual coefficient. I can.
- the context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient is context It can be derived as model 1.
- the context model for the sign flag of the current residual coefficient may be derived as context model 2.
- the context model for the sign flag may be derived based on a sign of a residual coefficient around a lower side of the current residual coefficient.
- the sign of the lower peripheral residual coefficient may be derived based on a sine flag of the lower peripheral residual coefficient. That is, the context model for the sine flag may be derived based on a sine flag of a residual coefficient around a lower side of the current residual coefficient.
- the sign of the lower peripheral residual coefficient when the value of the sine flag of the lower peripheral residual coefficient is 0, the sign of the lower peripheral residual coefficient may be derived as 1, and the value of the sine flag of the lower peripheral residual coefficient is In the case of 1, the sign of the lower peripheral residual coefficient can be derived as -1, and when the (level) value of the lower peripheral residual coefficient is 0, the sign of the lower peripheral residual coefficient is 0. I can.
- the sign of 1 may represent a positive value
- the sign of -1 may represent a negative value.
- the context model for the sign flag may be derived as one of three context models based on a sign of a residual coefficient around a lower side of the current residual coefficient.
- the context model for the sign flag may be derived as one of two context models based on a sign of a residual coefficient around a lower side of the current residual coefficient.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient may be derived as context model 1.
- the context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 1.
- the context model for the sign flag may be derived based on a sign of a residual coefficient around the right side of the current residual coefficient.
- the sign of the right peripheral residual coefficient may be derived based on a sine flag of the right peripheral residual coefficient. That is, the context model for the sine flag may be derived based on a sine flag of a residual coefficient around the right side of the current residual coefficient.
- the sign of the right peripheral residual coefficient when the value of the sine flag of the right peripheral residual coefficient is 0, the sign of the right peripheral residual coefficient may be derived as 1, and the value of the sine flag of the right peripheral residual coefficient is When 1, the sign of the right peripheral residual coefficient can be derived as -1, and when the (level) value of the right peripheral residual coefficient is 0, the sign of the right peripheral residual coefficient is 0.
- the sign of 1 may represent a positive value
- the sign of -1 may represent a negative value.
- the context model for the sign flag may be derived as one of three context models based on the sign of the residual coefficient around the right side of the current residual coefficient.
- the context model for the sign flag may be derived as one of two context models based on the sign of the residual coefficient around the right side of the current residual coefficient.
- a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the context model for the sign flag of the current residual coefficient may be derived as context model 1.
- the context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- a context model for the sine flag of the current residual coefficient may be derived as a context model 1.
- the context of the sign flag of the current residual coefficient can be derived as 0. That is, for example, when the current residual coefficient is a residual coefficient first decoded in the current subblock, a context model for the sign flag of the current residual coefficient may be derived as a context model 0.
- the decoding apparatus may determine whether the sign flag is decoded based on the context model, and when the sign flag determines that the flag is decoded based on the context model, the context for the sign flag You can also derive a model.
- the decoding apparatus may determine whether the sign flag is decoded based on the context model based on the transform skip flag for the current block. That is, the decoding apparatus may determine whether the sign flag is decoded based on the context model based on whether or not the current block has been transformed.
- the transform skip flag may indicate whether transform is applied to the current block. That is, the transform skip flag may indicate whether or not transform is applied to residual coefficients of the current block.
- the residual information for the current block may include the transform skip flag.
- the sign flag may not be decoded based on the context model (that is, the sign flag may be bypass decoded), and the value of the transform skip flag is 1 In this case, the sign flag may be decoded based on the context model.
- the decoding apparatus may derive the context model for the sign flag, and the context The sign flag can be decoded based on the model.
- the decoding apparatus may determine whether the sign flag is decoded based on the context model by comparing the number of non-zero residual coefficients in the current subblock with a specific value.
- the current sub-block may mean a sub-block of the current block including the current residual coefficient.
- the sign flag may not be decoded based on the context model (ie, the sign flag may be bypass decoded), and the non- When the number of zero residual coefficients is greater than or equal to the specific value, the sign flag may be decoded based on the context model.
- the decoding device may determine that the sign flag is decoded based on the context model, and the decoding device A model can be derived, and the sign flag can be decoded based on the context model.
- the specific value may also be expressed as a threshold.
- the specific value may be one of 0 to the number of samples of the current block.
- the specific value may be one of 0 to 64.
- the specific value may be one of 0 to the number of samples of the current sub-block. That is, for example, when the size of the current sub-block is a size of 4x4, the specific value may be one of 0 to 16, and when the size of the current sub-block is a size of 2x2, the specific value is 0 to 4 It can be one of.
- the specific value may be 5.
- the specific value may be derived based on the size of the current block. For example, when the size of the current block is 8x8, the specific value may be derived as 5, and when the size of the current block is 4x4, the specific value may be derived as 4.
- the specific value may be derived based on the size of the current block and the location of the current sub-block in the current block.
- the specific value may be derived as 5.
- the lower right sub-block may be sub-block 3 (ie, CG 3) of the order determined by a diagonal scan order.
- the specific value may be derived as 4.
- the upper left sub-block may be sub-block 0 (or CG 0) among the order determined by a diagonal scan order.
- the specific value may be derived based on the size of the current block, the position of the sub-block in the current block, and a prediction mode of the current block.
- the specific value is derived as 5.
- the specific value when the size of the current block is 8x8, the current sub-block is a sub-block on the lower right of the current block, and the prediction mode applied to the current block is the intra prediction mode, the specific value will be derived as 5. I can.
- the specific value Can be derived as zero. That is, when the size of the current block is 8x8, the current subblock is the upper left subblock of the current block, and the prediction mode applied to the current block is the intra prediction mode, the specific value is derived as 0. I can. Accordingly, it may be determined that the sign flag is decoded based on the context model regardless of the number of the non-zero residual coefficients.
- the decoding apparatus decodes the sign flag based on the context model (S1030).
- the decoding apparatus may decode the sign flag based on the context model.
- the sign flag may indicate a sign of the current residual coefficient. When the value of the sign flag is 0, the sign flag may indicate that the current residual coefficient is a positive value (ie, the sign flag may indicate that the sign of the current residual coefficient is 1) , When the value of the sign flag is 1, the sign flag may indicate that the current residual coefficient is a negative value (that is, the sign flag may indicate that the sign of the current residual coefficient is -1. have). That is, when the value of the sine flag is 0, the current residual coefficient may be a positive value, and when the value of the sine flag is 1, the current residual coefficient may be a negative value. have.
- the decoding apparatus derives the current residual coefficient based on the sign flag (S1040).
- the decoding apparatus may derive the size (i.e., level value) of the current residual coefficient based on the residual information (eg, information related to the size of the current residual coefficient), and based on the sign flag
- the current residual coefficient of the current block may be derived from the sign of the current residual coefficient derived by and the size of the current residual coefficient. That is, the decoding apparatus may derive the current residual coefficient of the current block based on a sign flag for the current residual coefficient and the residual information (syntax elements for the current residual coefficient).
- the decoding apparatus derives a residual sample based on the current residual coefficient (S1050).
- the decoding apparatus may derive a residual sample of the current block based on the current residual coefficient. That is, the decoding apparatus may derive a residual sample of the current block based on the current residual coefficient.
- the decoding apparatus determines the current residual coefficient to the current block. Can be derived from the residual sample of. Or, for example, when it is derived that the transform is not applied to the current block based on the transform skip flag, that is, if the value of the transform skip flag is 1, the decoding apparatus calculates the current residual coefficient.
- the residual sample of the current block may be derived.
- the decoding apparatus when it is derived that the transform is applied to the current block based on the transform skip flag, that is, if the value of the transform skip flag is 0, the decoding apparatus inversely transforms the current residual coefficient.
- the residual sample of the current block can be derived.
- the decoding apparatus when it is derived that transformation is applied to the current block based on the transformation skip flag, that is, when the value of the transformation skip flag is 0, the decoding apparatus inverse quantizes the current residual coefficient. Then, the residual sample of the current block may be derived by inverse transforming the inverse quantized coefficient.
- the decoding apparatus generates a reconstructed picture based on the residual sample (S1060).
- the decoding apparatus may derive a prediction sample by performing an inter prediction mode or an intra prediction mode for the current block based on prediction information received through a bitstream, and the prediction sample and the residual sample The reconstructed picture may be generated through addition.
- the prediction information may include information indicating an intra prediction mode of the current block.
- the decoding apparatus may derive the intra prediction mode of the current block based on information indicating the intra prediction mode of the current block, and predict the current block based on reference samples of the current block and the intra prediction mode. Samples can be derived.
- the reference samples may include upper reference samples and left reference samples of the current block.
- the left reference samples are p[-1][0 ] To p[-1][2N-1]
- the upper reference samples may be p[0][-1] to p[2N-1][-1].
- an in-loop filtering procedure such as deblocking filtering, SAO and/or ALF procedure can be applied to the reconstructed picture in order to improve subjective/objective image quality as needed.
- FIG. 11 schematically shows a decoding apparatus that performs an image decoding method according to this document.
- the method disclosed in FIG. 10 may be performed by the decoding apparatus disclosed in FIG. 11.
- the entropy decoding unit of the decoding apparatus of FIG. 11 may perform S1010 to S1040 of FIG. 10
- the residual processing unit of the decoding apparatus of FIG. 11 may perform S1050 of FIG. 10
- FIG. The adder of the decoding apparatus of 11 may perform S1060 of FIG. 10.
- the process of deriving the prediction sample may be performed by the prediction unit of the decoding apparatus of FIG. 11.
- the efficiency of residual coding can be improved.
- a sign flag indicating the sign of the residual coefficient is coded based on the context model, and through this, the amount of bits allocated to the sign flag for the residual coefficient is saved, and overall residual coding efficiency Can improve.
- a context model for a sine flag indicating a sign of a residual coefficient is derived based on the sign of a neighboring residual coefficient adjacent to the residual coefficient, and through this, correlation between adjacent residual coefficients.
- the sign flag may be coded in consideration of, saving the amount of bits allocated to the sign flag, and improving overall residual coding efficiency.
- the embodiments described in this document may be implemented and performed on a processor, microprocessor, controller, or chip.
- the functional units illustrated in each drawing may be implemented and executed on a computer, processor, microprocessor, controller, or chip.
- information for implementation (ex. information on instructions) or an algorithm may be stored in a digital storage medium.
- the decoding device and the encoding device to which the embodiments of the present document are applied include a multimedia broadcasting transmission/reception device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video chat device, and a real-time communication device such as video communication.
- Mobile streaming device storage medium, camcorder, video-on-demand (VoD) service provider, OTT video (Over the top video) device, Internet streaming service provider, three-dimensional (3D) video device, video telephony video device, vehicle It may be included in a terminal (ex. a vehicle terminal, an airplane terminal, a ship terminal, etc.) and a medical video device, and may be used to process a video signal or a data signal.
- an OTT video (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, and a digital video recorder (DVR).
- DVR digital video recorder
- the processing method to which the embodiments of the present document are applied may be produced in the form of a program executed by a computer, and may be stored in a computer-readable recording medium.
- Multimedia data having the data structure according to this document can also be stored in a computer-readable recording medium.
- the computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored.
- the computer-readable recording medium includes, for example, Blu-ray disk (BD), universal serial bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical It may include a data storage device.
- the computer-readable recording medium includes media implemented in the form of a carrier wave (for example, transmission through the Internet).
- the bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted through a wired or wireless communication network.
- an embodiment of this document may be implemented as a computer program product using a program code, and the program code may be executed in a computer according to the embodiment of this document.
- the program code may be stored on a carrier readable by a computer.
- FIG. 12 is an exemplary structural diagram of a content streaming system to which embodiments of the present document are applied.
- the content streaming system to which the embodiments of this document are applied may largely include an encoding server, a streaming server, a web server, a media storage device, a user device, and a multimedia input device.
- the encoding server serves to generate a bitstream by compressing content input from multimedia input devices such as smartphones, cameras, camcorders, etc. into digital data, and transmits it to the streaming server.
- multimedia input devices such as smartphones, cameras, camcorders, etc. directly generate bitstreams
- the encoding server may be omitted.
- the bitstream may be generated by an encoding method or a bitstream generation method to which the embodiments of the present document are applied, and the streaming server may temporarily store the bitstream while transmitting or receiving the bitstream.
- the streaming server transmits multimedia data to a user device based on a user request through a web server, and the web server serves as an intermediary for notifying the user of a service.
- the web server transmits it to the streaming server, and the streaming server transmits multimedia data to the user.
- the content streaming system may include a separate control server, and in this case, the control server serves to control commands/responses between devices in the content streaming system.
- the streaming server may receive content from a media storage and/or encoding server. For example, when content is received from the encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream for a predetermined time.
- Examples of the user device include a mobile phone, a smart phone, a laptop computer, a digital broadcasting terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), a navigation system, a slate PC, and Tablet PC, ultrabook, wearable device, for example, smartwatch, smart glass, head mounted display (HMD)), digital TV, desktop There may be computers, digital signage, etc.
- Each server in the content streaming system may be operated as a distributed server, and in this case, data received from each server may be distributedly processed.
- the claims set forth herein may be combined in a variety of ways.
- the technical features of the method claims of the present specification may be combined to be implemented as a device, and the technical features of the device claims of the present specification may be combined to be implemented by a method.
- the technical characteristics of the method claim of the present specification and the technical characteristics of the device claim may be combined to be implemented as a device, and the technical characteristics of the method claim of the present specification and the technical characteristics of the device claim may be combined to be implemented by a method.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Discrete Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
L'invention concerne un procédé de décodage d'image mis en œuvre par un dispositif de décodage comprenant les étapes consistant : à recevoir des informations résiduelles pour un bloc courant ; à déterminer un modèle de contexte pour un indicateur de signe d'un coefficient résiduel courant du bloc courant ; à décoder l'indicateur de signe sur la base du modèle de contexte ; à déterminer le coefficient résiduel courant sur la base de l'indicateur de signe ; à déterminer un échantillon résiduel sur la base du coefficient résiduel courant ; et à générer une image reconstruite sur la base de l'échantillon résiduel, le modèle de contexte de l'indicateur de signe étant déterminé sur la base d'un signe d'un coefficient résiduel périphérique gauche et d'un signe d'un coefficient résiduel périphérique supérieur du coefficient résiduel courant.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US201962809733P | 2019-02-24 | 2019-02-24 | |
US62/809,733 | 2019-02-24 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020171668A1 true WO2020171668A1 (fr) | 2020-08-27 |
Family
ID=72144697
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/KR2020/002597 WO2020171668A1 (fr) | 2019-02-24 | 2020-02-24 | Procédé et dispositif de décodage d'image à l'aide d'informations résiduelles comprenant des informations de signes codés selon le contexte dans un système de codage d'image |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2020171668A1 (fr) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116527904A (zh) * | 2023-07-03 | 2023-08-01 | 鹏城实验室 | 熵编码方法、熵解码方法及相关装置 |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170142448A1 (en) * | 2015-11-13 | 2017-05-18 | Qualcomm Incorporated | Coding sign information of video data |
-
2020
- 2020-02-24 WO PCT/KR2020/002597 patent/WO2020171668A1/fr active Application Filing
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170142448A1 (en) * | 2015-11-13 | 2017-05-18 | Qualcomm Incorporated | Coding sign information of video data |
Non-Patent Citations (4)
Title |
---|
BROSS, B. ET AL.: "Non-CE8: Unified Transform Type Signalling and Residual Coding for Transform Skip JVET-M0464-v4", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11 13TH MEETING, 15 January 2019 (2019-01-15), Marrakech, XP030202238, Retrieved from the Internet <URL:http://phenix.it-sudparis.eu/jvet/doc_end_user/current_document.php?id=5273> [retrieved on 20200512] * |
GAO, MIN ET AL.: "CE7-related: Reduced context models for transform coefficients coding. JVET-L0316-v2", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU -T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11 12TH MEETING, 5 October 2018 (2018-10-05), Macao, XP030194958, Retrieved from the Internet <URL:http://phenix.it-sudparis.eu/jvet/doc_end_user/current_document.php?id=4411> [retrieved on 20200512] * |
XU, MENG ET AL.: "CE8-related: BDPCM entropy coding with reduced number of context coded bins. JVET-M0449-v1", JOINT VIDEO EXPERTS TEAM (JVET) OF [TU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11 13TH MEETING, 3 January 2019 (2019-01-03), Marrakech, XP030200498, Retrieved from the Internet <URL:http://phenix.it-sudparis.eu/jvet/doc_end_user/currentdocument.php?id=5258> [retrieved on 20200512] * |
YOO, SUNMI ET AL.: "Non-CE7: Sign coding for transform skip. JVET-M0279-v1", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11 13TH MEETING, 2 January 2019 (2019-01-02), Marrakech, XP030200254, Retrieved from the Internet <URL:http://phenix.it-sudparis,eu/jvet/doc_end_user/current_document.php?id=5086> [retrieved on 20200512] * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116527904A (zh) * | 2023-07-03 | 2023-08-01 | 鹏城实验室 | 熵编码方法、熵解码方法及相关装置 |
CN116527904B (zh) * | 2023-07-03 | 2023-09-12 | 鹏城实验室 | 熵编码方法、熵解码方法及相关装置 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020149648A1 (fr) | Procédé et dispositif de codage d'images utilisant un drapeau de saut de transformation | |
WO2020180102A1 (fr) | Procédé de décodage d'image à l'aide de drapeau de signe codé de contexte dans un système de codage d'image et appareil associé | |
WO2020171592A1 (fr) | Procédé de décodage vidéo à l'aide d'informations résiduelles dans un système de codage vidéo, et dispositif associé | |
WO2020149608A1 (fr) | Procédé de décodage vidéo à l'aide d'informations résiduelles dans un système de codage vidéo et dispositif associé | |
WO2021172912A1 (fr) | Procédé et appareil pour décoder une imagerie se rapportant au masquage de données de signe | |
WO2021096290A1 (fr) | Procédé de codage d'image basé sur une transformée et dispositif associé | |
WO2021172914A1 (fr) | Procédé de décodage d'image pour un codage résiduel et dispositif associé | |
WO2020145795A1 (fr) | Procédé de décodage d'image à l'aide d'informations résiduelles dans un système de codage d'image et dispositif associé | |
WO2021040487A1 (fr) | Procédé de décodage d'image pour codage de données résiduelles dans un système de codage d'image, et appareil associé | |
WO2020251278A1 (fr) | Procédé de décodage d'image basé sur des données de paramètre de quantification de chrominance, et appareil associé | |
WO2021040410A1 (fr) | Procédé de décodage vidéo pour codage résiduel et dispositif associé | |
WO2021006700A1 (fr) | Procédé de décodage d'image faisant appel à un fanion servant à un procédé de codage résiduel dans un système de codage d'image, et dispositif associé | |
WO2021054787A1 (fr) | Procédé de codage d'image basé sur une transformée et dispositif associé | |
WO2021006698A1 (fr) | Procédé et dispositif de codage d'image dans un système de codage d'image | |
WO2021006697A1 (fr) | Procédé de décodage d'image pour un codage résiduel et appareil associé | |
WO2021054783A1 (fr) | Procédé de codage d'image sur la base d'une transformée, et appareil associé | |
WO2021010680A1 (fr) | Procédé de codage d'image basé sur une transformée, et dispositif associé | |
WO2021201549A1 (fr) | Procédé de décodage d'image de codage résiduel et dispositif associé | |
WO2020171668A1 (fr) | Procédé et dispositif de décodage d'image à l'aide d'informations résiduelles comprenant des informations de signes codés selon le contexte dans un système de codage d'image | |
WO2021172916A1 (fr) | Procédé de décodage d'image et appareil associé | |
WO2021158048A1 (fr) | Procédé de décodage d'image associé à la signalisation d'un drapeau indiquant si tsrc est disponible, et dispositif associé | |
WO2021172907A1 (fr) | Procédé de décodage d'image et appareil associé | |
WO2021137556A1 (fr) | Procédé de codage d'image reposant sur une transformée et dispositif associé | |
WO2021040486A1 (fr) | Procédé de décodage d'image et dispositif associé | |
WO2021040406A1 (fr) | Procédé de codage de vidéo ou d'image et dispositif associé |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20759139 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20759139 Country of ref document: EP Kind code of ref document: A1 |