The present disclosure relates to a transform coefficient coding method and apparatus therefor of an image coding system.
Recently, the demand for high resolution, high quality image/video such as 4K, 8K or more Ultra High Definition (UHD) image/video is increasing in various fields. As the image/video resolution or quality becomes higher, relatively more amount of information or bits are transmitted than for conventional image/video data. Therefore, if image/video data are transmitted via a medium such as an existing wired/wireless broadband line or stored in a legacy storage medium, costs for transmission and storage are readily increased.
Moreover, interests and demand are growing for virtual reality (VR) and artificial reality (AR) contents, and immersive media such as hologram; and broadcasting of images/videos exhibiting image/video characteristics different from those of an actual image/video, such as game images/videos, are also growing.
Therefore, a highly efficient image/video compression technique is required to effectively compress and transmit, store, or play high resolution, high quality images/videos showing various characteristics as described above.
The present disclosure is to provide a method and apparatus for improving image coding efficiency.
The present disclosure is also to provide a method and apparatus for improving efficiency of residual coding.
The present disclosure is still also to provide a method and apparatus for improving efficiency of transform coefficient level coding.
The present disclosure is still also to provide a method and apparatus for performing residual coding in units of not sub-blocks, but transform blocks.
The present disclosure is still also to provide a method and apparatus which can improve coding efficiency by determining (or changing) the decoding order of a parity level flag for a parity of a transform coefficient level for a quantized transform coefficient, and a first transform coefficient level flag related to whether or not a transform coefficient level is greater than the first threshold value.
The present disclosure is still also to provide a method and apparatus which improve coding efficiency by limiting to a predetermined maximum value or less, the sum of the number of significant coefficient flags for quantized transform coefficients within a current block, the number of first transform coefficient level flags, the number of parity level flags, and the number of second transform coefficient level flags included in the residual information.
The present disclosure is still also to provide a method and apparatus which reduce data to be context-based coded by limiting to a predetermined maximum value or less, the sum of the number of significant coefficient flags for quantized transform coefficients within a current block, the number of first transform coefficient level flags, the number of parity level flags, and the number of second transform coefficient level flags included in the residual information.
According to an embodiment of the present disclosure, an image decoding method performed by a decoding apparatus is provided. The method includes receiving a bitstream including residual information; deriving a quantized transform coefficient for a current block based on the residual information included in the bitstream; deriving a residual sample for the current block based on the quantized transform coefficient; and generating a reconstructed picture based on the residual sample for the current block, wherein the residual information includes a context-based coded context syntax element, wherein the deriving the quantized transform coefficient decodes the context syntax element based on a contex and based on a predetermined maximum value for the context syntax element, and wherein the maximum value is determined by a unit of a transform block.
According to another embodiment of the present disclosure, a decoding apparatus for performing image decoding is provided. The decoding apparatus includes an entropy decoder which receives a bitstream including residual information, and derives a quantized transform coefficient for a current block based on the residual information included in the bitstream; an inverse transformer which derives a residual sample for the current block based on the quantized transform coefficient; and an adder which generates a reconstructed picture based on the residual sample for the current block, wherein the residual information includes a context-based coded context syntax element, wherein the deriving the quantized transform coefficient performed by the entropy decoder decodes the context syntax element based on a contex and based on a predetermined maximum value for the context syntax element, and wherein the maximum value is determined by a unit of a transform block.
According to still another embodiment of the disclosure, there is provided an image encoding method performed by an encoding apparatus. The method includes deriving a residual sample for a current block; deriving a quantized transform coefficient based on the residual sample for the current block; and encoding residual information including information on the quantized transform coefficient, wherein the residual information includes a context-based coded context syntax element, wherein the deriving the quantized transform coefficient encodes the context syntax element based on a contex and based on a predetermined maximum value for the context syntax element, and wherein the maximum value is determined by a unit of a transform block.
According to still another embodiment of the present disclosure, there is provided an encoding apparatus for performing image encoding. The encoding apparatus includes a subtractor which derives a residual sample for a current block, a quantizer which derives a quantized transform coefficient based on the residual sample for the current block; and an entropy encoder which encodes residual information including information on the quantized transform coefficient, wherein the deriving the quantized transform coefficient performed by the entropy encoder encodes the context syntax element based on a contex and based on a predetermined maximum value for the context syntax element, and wherein the maximum value is determined by a unit of a transform block.
According to still another embodiment of the present disclosure, there is provided a decoder-readable storage medium which stores information on instructions that cause a video decoding apparatus to perform decoding methods according to some embodiments.
According to still another embodiment of the present disclosure, there is provided a decoder-readable storage medium which stores information on instructions that cause a video decoding apparatus to perform a decoding method according to an embodiment.
According to the present disclosure, it is possible to improve overall image/video compression efficiency.
According to the present disclosure, it is possible to improve overall image/video compression efficiency.
According to the present disclosure, it is possible to improve efficiency of residual coding.
According to the present disclosure, residual coding may be performed in units of not sub-blocks, but transform blocks.
According to the present disclosure, it is possible to improve the efficiency of transform coefficient level coding.
According to the present disclosure, by determining (or changing) the decoding order of the parity level flag for the parity of the transform coefficient level for the quantized transform coefficient, and the first transform coefficient level flag related to whether or not the transform coefficient level is greater than the first threshold value, coding efficiency can be improved.
The present disclosure can improve coding efficiency by limiting to a predetermined maximum value or less, the sum of the number of significant coefficient flags for quantized transform coefficients within a current block, the number of first transform coefficient level flags, the number of parity level flags, and the number of second transform coefficient level flags included in the residual information.
The present disclosure can reduce data to be context-based coded by limiting to a predetermined maximum value or less, the sum of the number of significant coefficient flags for quantized transform coefficients within a current block, the number of first transform coefficient level flags, the number of parity level flags, and the number of second transform coefficient level flags included in the residual information.
An exemplary embodiment of the present disclosure provides an image information decoding method performed by a decoding apparatus. The method includes: decoding a non-separable secondary transform (NSST) index from a bitstream, if an NSST is applied to a target block, decoding information about transform coefficients for the target block from the bitstream, based on the decoded NSST index, and deriving the transform coefficients for the target block based on the decoded information about the transform coefficients, in which the NSST index is decoded prior to the information about the transform coefficients for the target block.
The present disclosure may be modified in various forms, and specific embodiments thereof will be described and illustrated in the drawings. However, the embodiments are not intended for limiting the disclosure. The terms used in the following description are used to merely describe specific embodiments, but are not intended to limit the disclosure. An expression of a singular number includes an expression of the plural number, so long as it is clearly read differently. The terms such as “include” and “have” are intended to indicate that features, numbers, steps, operations, elements, components, or combinations thereof used in the following description exist and it should be thus understood that the possibility of existence or addition of one or more different features, numbers, steps, operations, elements, components, or combinations thereof is not excluded.
Hereinafter, examples of the present embodiment will be described in detail with reference to the accompanying drawings. In addition, like reference numerals are used to indicate like elements throughout the drawings, and the same descriptions on the like elements will be omitted.
This disclosure relates to video/image coding. For example, a method/embodiment disclosed in the present disclosure may be applied to a method disclosed in the versatile video coding (VVC) standard, the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd generation of audio video coding standard (AVS2) or the next generation video/image coding standard (e.g., H.267, H.268, or the like).
This disclosure suggests various embodiments of video/image coding, and the above embodiments may also be performed in combination with each other unless otherwise specified.
In the present disclosure, a video may refer to a series of images over time. A picture generally refers to the unit representing one image at a particular time frame, and a slice/tile refers to the unit constituting a part of the picture in terms of coding. A slice/tile may include one or more coding tree units (CTUs). One picture may consist of one or more 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 brick may represent a rectangular region of CTU rows within a tile in a picture). A tile may be partitioned into a multiple bricks, each of which may be constructed with one or more CTU rows within the tile (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 also be referred to as a brick. A brick scan may represent a specific sequential ordering of CTUs partitioning a picture, wherein the CTUs may be ordered in a CTU raster scan within a brick, and bricks within a tile may be ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture may be ordered consecutively in a 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, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture). A tile is a particular tile column and a rectangular region of CTUs within a particular tile column (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, which has a height equal to the height of the picture and a width that may be specified by syntax elements in the 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, which has a width specified by syntax elements in the picture parameter set and a height that may be equal to 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 partitioning a picture, and the CTUs may be ordered consecutively in a CTU raster scan in a tile, and tiles in a picture may be ordered consecutively 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 a single 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 be constructed with multiple complete tiles, or may be a consecutive sequence of complete bricks of one tile (A slice may consists of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile). In the present disclosure, a tile group and a slice may be used in place of each other. For example, in the present disclosure, a tile group/tile group header may be referred to as a slice/slice header.
A pixel or a pel may mean a smallest unit constituting one picture (or image). Also, ‘sample’ may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a value of a pixel, and may represent only a pixel/pixel value of a luma component or 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 region of the picture and information related to the region. One unit may include one luma block and two chroma (ex. cb, cr) blocks. The unit may be used interchangeably with terms such as block or area in some cases. In a general case, an M×N block may include samples (or sample arrays) or a set (or array) of transform coefficients of M columns and N rows.
In the present disclosure, the symbol “/” and “,” should be interpreted as “and/or.” For example, the expression “A/B” is interpreted as “A and/or B”, and the expression “A, B” is interpreted as “A and/or B.” Additionally, the expression “A/B/C” means “at least one of A, B, and/or C.” Further, the expression “A, B, C” also means “at least one of A, B, and/or C.” (In the present disclosure, the term “/” and “,” should be interpreted to indicate “and/or.” For instance, the expression “A/B” may mean “A and/or B.” Further, “A, B” may mean “A and/or B.” Further, “A/B/C” may mean “at least one of A, B, and/or C.” Also, “A/B/C” may mean “at least one of A, B, and/or C.”)
Additionally, in the present disclosure, the term “or” should be interpreted as “and/or.” For example, the expression “A or B” may mean 1) only “A”, 2) only “B”, and/or 3) “both A and B.” In other words, the term “or” in the present disclosure may mean “additionally or alternatively.” (Further, in the disclosure, the term “or” should be interpreted to indicate “and/or.” For instance, the expression “A or B” may comprise 1) only A, 2) only B, and/or 3) both A and B. In other words, the term “or” in the present disclosure should be interpreted to indicate “additionally or alternatively.”)
Referring to
The source device may include a video source, an encoding apparatus, and a transmitter. The receiving device may include a receiver, a decoding apparatus, and a renderer. The encoding apparatus may be called a video/image encoding apparatus, and the decoding apparatus may be called a video/image decoding apparatus. The transmitter may be included in the encoding apparatus. The receiver may be included in the decoding apparatus. The renderer may include a display, and the display may be configured as a separate device or an external component.
The video source may acquire video/image through a process of capturing, synthesizing, or generating the video/image. The video source may include a video/image capture device and/or a video/image generating device. The video/image capture device may include, for example, one or more cameras, video/image archives including previously captured video/images, and the like. The video/image generating device may include, for example, computers, tablets and smartphones, and may (electronically) generate video/images. For example, a virtual video/image may be generated through a computer or the like. In this case, the video/image capturing process may be replaced by a process of generating related data.
The encoding apparatus may encode input video/image. The encoding apparatus may perform a series of processes such as prediction, transform, and quantization for compaction and coding efficiency. The encoded data (encoded video/image information) may be output in the form of a bitstream.
The transmitter may transmit the encoded image/image information or data output in the form of a bitstream to the receiver of the receiving device through a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage mediums such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, and the like. The transmitter 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 the received bitstream to the decoding apparatus.
The decoding apparatus may decode the video/image by performing a series of processes such as dequantization, inverse transform, and prediction corresponding to the operation of the encoding apparatus.
The renderer may render the decoded video/image. The rendered video/image may be displayed through the display.
Referring to
The image partitioner 210 may split an input image (or, picture, frame) input to the encoding apparatus 200 into one or more processing units. As an example, the processing unit may be called a coding unit (CU). In this case, the coding unit may be recursively split according to a Quad-tree binary-tree ternary-tree (QTBTTT) structure from a coding tree unit (CTU) or the largest coding unit (LCU). For example, one coding unit may be split into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary-tree structure, and/or a ternary-tree structure. In this case, for example, the quad-tree structure is first applied and the binary-tree structure and/or the ternary-tree structure may be later applied. Alternatively, the binary-tree structure may also be first applied. A coding process according to the present disclosure may be performed based on a final coding unit which is not split any more. In this case, based on coding efficiency according to image characteristics or the like, the maximum coding unit may be directly used as the final coding unit, or as necessary, the coding unit may be recursively split into coding units of a deeper depth, such that a coding unit having an optimal size may be used as the final coding unit. Here, the coding process may include a process such as prediction, transform, and reconstruction to be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, each of the prediction unit and the transform unit may be split or partitioned from the aforementioned final coding unit. The prediction unit may be a unit of sample prediction, and 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 interchangeably used with the term such as a block or an area in some cases. Generally, an M×N block may represent samples composed of M columns and N rows or a group of transform coefficients. The sample may generally represent a pixel or a value of the pixel, and may also represent only the pixel/pixel value of a luma component, and also represent only the pixel/pixel value of a chroma component. The sample may be used as the term corresponding to a pixel or a pel configuring one picture (or image).
The encoding apparatus 200 may generate a residual signal (residual block, residual sample array) by subtracting a predicted signal (predicted block, prediction sample array) output from the inter predictor 221 or the intra predictor 222 from the input image signal (original block, original sample array), and the generated residual signal is transmitted to the transformer 232. In this case, as illustrated, the unit for subtracting the predicted signal (predicted block, prediction sample array) from the input image signal (original block, original sample array) within an encoder 200 may be called the subtractor 231. The predictor may perform prediction for a block to be processed (hereinafter, referred to as a current block), and generate a predicted block including prediction samples of the current block. The predictor may determine whether intra prediction is applied or inter prediction is applied in units of the current block or the CU. The predictor may generate various information about prediction, such as prediction mode information, to transfer the generated information to the entropy encoder 240 as described later in the description of each prediction mode. The information about prediction may be encoded by the entropy encoder 240 to be output in a form of the bitstream.
The intra predictor 222 may predict a current block with reference to samples within a current picture. The referenced samples may be located neighboring to the current block, or may also be located away from the current block according to the prediction mode. The prediction modes in the intra prediction 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 or a planar mode. The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes according to the fine degree of the prediction direction. However, this is illustrative and the directional prediction modes which are more or less than the above number may be used according to the setting. The intra predictor 222 may also determine the prediction mode applied to the current block using the prediction mode applied to the neighboring block.
The inter predictor 221 may induce a predicted block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to decrease the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, a sub-blocks, or samples based on the correlation of the motion information between the neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, or the like) information. In the case of the inter prediction, the neighboring block may include a spatial neighboring block existing within 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 also be the same as each other, and may also be different from each other. The temporal neighboring block may be called the name such as a collocated reference block, a collocated CU (colCU), or the like, and the reference picture including the temporal neighboring block may also be called a collocated picture (colPic). For example, the inter predictor 221 may configure a motion information candidate list based on the neighboring blocks, and generate information indicating what candidate is used to derive the motion vector and/or the reference picture index of the current block. The inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, the inter predictor 221 may use the motion information of the neighboring block as the motion information of the current block. In the case of the skip mode, the residual signal may not be transmitted unlike the merge mode. A motion vector prediction (MVP) mode may indicate the motion vector of the current block by using the motion vector of the neighboring block as a motion vector predictor, and signaling a motion vector difference.
The predictor 200 may generate a predicted signal based on various prediction methods to be described later. For example, the predictor may not only apply the intra prediction or the inter prediction for predicting one block, but also simultaneously apply the intra prediction and the inter prediction. This may be called a combined inter and intra prediction (CIIP). Further, the predictor may be based on an intra block copy (IBC) prediction mode, or a palette mode in order to perform prediction on a block. The IBC prediction mode or palette mode may be used for content image/video coding of a game or the like, such as screen content coding (SCC). The IBC basically performs prediction in a current picture, but it may be performed similarly to inter prediction in that it derives a reference block in a current picture. That is, the IBC may use at least one of inter prediction techniques described in the present disclosure. The palette mode may be regarded 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 on a palette index and a palette table.
The predicted signal generated through the predictor (including the inter predictor 221 and/or the intra predictor 222) may be used to generate a reconstructed signal or used to generate a residual signal. The transformer 232 may generate transform coefficients by applying the transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loève transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, when the relationship information between pixels is illustrated as a graph, the GBT means the transform obtained from the graph. The CNT means the transform which is acquired based on a predicted signal generated by using all previously reconstructed pixels. In addition, the transform process may also be applied to a pixel block having the same size of the square, and may also be applied to the block having a variable size rather than the square.
The quantizer 233 may quantize the transform coefficients to transmit the quantized transform coefficients to the entropy encoder 240, and the entropy encoder 240 may encode the quantized signal (information about the quantized transform coefficients) to the encoded quantized signal to the bitstream. The information about the quantized transform coefficients may be called residual information. The quantizer 233 may rearrange the quantized transform coefficients having a block form in a one-dimensional vector form based on a coefficient scan order, and also generate the information about the quantized transform coefficients based on the quantized transform coefficients of the one dimensional vector form. The entropy encoder 240 may perform various encoding methods, for example, such as an exponential Golomb coding, a context-adaptive variable length coding (CAVLC), and a context-adaptive binary arithmetic coding (CABAC). The entropy encoder 240 may also encode information (e.g., values of syntax elements and the like) necessary for reconstructing video/image other than the quantized transform coefficients together or separately. The encoded information (e.g., encoded video/image information) may be transmitted or stored in units of network abstraction layer (NAL) unit in a form of the bitstream. The video/image information may further include information about various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video/image information may further include general constraint information. The signaled/transmitted information and/or syntax elements to be described later in the present disclosure may be encoded through the aforementioned encoding process and thus included in the bitstream. The bitstream may be transmitted through a network, or stored in a digital storage medium. Here, the network may include a broadcasting network and/or a communication network, or the like, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blue-ray, HDD, and SSD. A transmitter (not illustrated) for transmitting the signal output from the entropy encoder 240 and/or a storage (not illustrated) for storing the signal may be configured as the internal/external elements of the encoding apparatus 200, or the transmitter may also be included in the entropy encoder 240.
The quantized transform coefficients output from the quantizer 233 may be used to generate a predicted signal. For example, the dequantizer 234 and the inverse transformer 235 apply dequantization and inverse transform to the quantized transform coefficients, such that the residual signal (residual block or residual samples) may be reconstructed. The adder 250 adds the reconstructed residual signal to the predicted signal output from the inter predictor 221 or the intra predictor 222, such that the reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) may be generated. As in the case where the skip mode is applied, if there is no residual for the block to be processed, the predicted block may be used as the reconstructed block. The adder 250 may be called a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for the intra prediction of the next block to be processed within the current picture, and as described later, also used for the inter prediction of the next picture through filtering.
Meanwhile, a luma mapping with chroma scaling (LMCS) may also be applied in a picture encoding and/or reconstruction process.
The filter 260 may apply filtering to the reconstructed signal, thereby improving subjective/objective image qualities. For example, the filter 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and store the modified reconstructed picture in the memory 270, specifically, the DPB of the memory 270. Various filtering methods may include, for example, a deblocking filtering, a sample adaptive offset, an adaptive loop filter, a bilateral filter, and the like. The filter 260 may generate various filtering-related information to transfer the generated information to the entropy encoder 240, as described later in the description of each filtering method. The filtering-related information may be encoded by the entropy encoder 240 to be output in a form of the bitstream.
The modified reconstructed picture transmitted to the memory 270 may be used as the reference picture in the inter predictor 221. If the inter prediction is applied by the inter predictor, the encoding apparatus may avoid the prediction mismatch between the encoding apparatus 200 and the decoding apparatus, and also improve coding efficiency.
The DPB of the memory 270 may store the modified reconstructed picture to be used as the reference picture in the inter predictor 221. The memory 270 may store motion information of the block in which the motion information within the current picture is derived (or encoded) and/or motion information of the blocks within the previously reconstructed picture. The stored motion information may be transferred to the inter predictor 221 to be utilized as motion information of the spatial neighboring block or motion information of the temporal neighboring block. The memory 270 may store the reconstructed samples of the reconstructed blocks within the current picture, and transfer the reconstructed samples to the intra predictor 222.
Referring to
When the bitstream including the video/image information is input, the decoding apparatus 300 may reconstruct the image in response to a process in which the video/image information is processed in the encoding apparatus illustrated in
The decoding apparatus 300 may receive the signal output from the encoding apparatus illustrated in
The dequantizer 321 may dequantize the quantized transform coefficients to output the transform coefficients. The dequantizer 321 may rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the rearrangement may be performed based on a coefficient scan order performed by the encoding apparatus. The dequantizer 321 may perform dequantization for the quantized transform coefficients using a quantization parameter (e.g., quantization step size information), and acquire the transform coefficients.
The inverse transformer 322 inversely transforms the transform coefficients to acquire the residual signal (residual block, residual sample array).
The predictor 330 may perform the prediction of the current block, and generate a predicted block including the prediction samples of the current block. The predictor may determine whether the intra prediction is applied or the inter prediction is applied to the current block based on the information about prediction output from the entropy decoder 310, and determine a specific intra/inter prediction mode.
The predictor may generate the predicted signal based on various prediction methods to be described later. For example, the predictor may not only apply the intra prediction or the inter prediction for the prediction of one block, but also apply the intra prediction and the inter prediction at the same time. This may be called a combined inter and intra prediction (CIIP). Further, the predictor may be based on an intra block copy (IBC) prediction mode, or a palette mode in order to perform prediction on a block. The IBC prediction mode or palette mode may be used for content image/video coding of a game or the like, such as screen content coding (SCC). The IBC basically performs prediction in a current picture, but it may be performed similarly to inter prediction in that it derives a reference block in a current picture. That is, the IBC may use at least one of inter prediction techniques described in the present disclosure. The palette mode may be regarded as an example of intra coding or intra prediction. When the palette mode is applied, information on a palette table and a palette index may be included in the video/image information and signaled.
The intra predictor 331 may predict the current block with reference to the samples within the current picture. The referenced samples may be located neighboring to the current block according to the prediction mode, or may also be located away from the current block. The prediction modes in the intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The intra predictor 331 may also determine the prediction mode applied to the current block using the prediction mode applied to the neighboring block.
The inter predictor 332 may induce the predicted block of the current block based on the reference block (reference sample array) specified by the motion vector on the reference picture. At this time, in order to decrease the amount of the motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, a sub-blocks, or samples based on the correlation of the motion information between the neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, or the like) information. In the case of the inter prediction, the neighboring block may include a spatial neighboring block existing within the current picture and a temporal neighboring block existing in the reference picture. For example, the inter predictor 332 may configure a motion information candidate list based on the neighboring blocks, and derive the motion vector and/or the reference picture index of the current block based on received candidate selection information. The inter prediction may be performed based on various prediction modes, and the information about the prediction may include information indicating the mode of the inter prediction of the current block.
The adder 340 may add the acquired residual signal to the predicted signal (predicted block, prediction sample array) output from the predictor (including the inter predictor 332 and/or the intra predictor 331) to generate the reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). As in the case where the skip mode is applied, if there is no residual for the block to be processed, the predicted block may be used as the reconstructed block.
The adder 340 may be called a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for the intra prediction of a next block to be processed within the current picture, and as described later, may also be output through filtering or may also be used for the inter prediction of a next picture.
Meanwhile, a luma mapping with chroma scaling (LMCS) may also be applied in the picture decoding process.
The filter 350 may apply filtering to the reconstructed signal, thereby improving the subjective/objective image qualities. For example, the filter 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and transmit the modified reconstructed picture to the memory 360, specifically, the DPB of the memory 360. Various filtering methods may include, for example, a deblocking filtering, a sample adaptive offset, an adaptive loop filter, a bidirectional filter, and the like.
The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as the reference picture in the inter predictor 332. The memory 360 may store motion information of the block in which the motion information within the current picture is derived (decoded) and/or motion information of the blocks within the previously reconstructed picture. The stored motion information may be transferred to the inter predictor 260 to be utilized as motion information of the spatial neighboring block or motion information of the temporal neighboring block. The memory 360 may store the reconstructed samples of the reconstructed blocks within the current picture, and transfer the stored reconstructed samples to the intra predictor 331.
In the present specification, the exemplary embodiments described in the filter 260, the inter predictor 221, and the intra predictor 222 of the encoding apparatus 200 may be applied equally to or to correspond to the filter 350, the inter predictor 332, and the intra predictor 331 of the decoding apparatus 300, respectively.
Meanwhile, as described above, in performing video coding, prediction is performed to improve compression efficiency. Through this, a predicted block including prediction samples for a current block as a block to be coded (i.e., a coding target block) may be generated. Here, the predicted block includes prediction samples in a spatial domain (or pixel domain). The predicted block is derived in the same manner in an encoding apparatus and a decoding apparatus, and the encoding apparatus may signal information (residual information) on residual between the original block and the predicted block, rather than an original sample value of an original block, to the decoding apparatus, thereby increasing image coding efficiency. The decoding apparatus may derive a residual block including residual samples based on the residual information, add the residual block and the predicted block to generate reconstructed blocks including reconstructed samples, and generate a reconstructed picture including the reconstructed blocks.
The residual information may be generated through a transform and quantization process. For example, the encoding apparatus may derive a residual block between the original block and the predicted block, perform a transform process on residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization process on the transform coefficients to derive quantized transform coefficients, and signal related residual information to the decoding apparatus (through a bit stream). Here, the residual information may include value information of the quantized transform coefficients, position information, a transform technique, a transform kernel, a quantization parameter, and the like. The decoding apparatus may perform dequantization/inverse transform process based on the residual information and derive residual samples (or residual blocks). The decoding apparatus may generate a reconstructed picture based on the predicted block and the residual block. Also, for reference for inter prediction of a picture afterward, the encoding apparatus may also dequantize/inverse-transform the quantized transform coefficients to derive a residual block and generate a reconstructed picture based thereon.
In a case where an input signal is a non-binarized syntax element, an encoding process of the CABAC first converts the input signal into a binarized value through binarization. In a case where an input signal is already a binarized value, the input signal bypasses the binarization without being subject to it, and input to an encoding engine. Here, each binary number 0 or 1 constituting the binary value is referred to as a bin. For example, in a case where a binary string after the binarization is ‘110’, each of 1, 1, and 0 is referred to as a bin. The bin(s) for a syntax element may be a value of the syntax element.
Binarized bins are input to a regular encoding engine or a bypass encoding engine.
The regular encoding engine assigns to a corresponding bin a context model reflecting a probability value, and encodes the bin based on the assigned context model. After performing the encoding on each bin, the regular encoding engine may update a probability model for the bin. The thus encoded bins are referred to as context-encoded bins.
The bypass encoding engine omits a process of estimating a probability for an input bin, and a process of updating the probability model which has been applied to the bin, after the encoding. The bypass encoding engine improves an encoding speed by encoding bins being input thereto while applying uniform probability distribution instead of assigning a context. The thus encoded bins are referred to as bypass bins.
The entropy encoding may determine whether to perform the encoding through the regular encoding engine or through the bypass encoding engine, and switch an encoding path. The entropy decoding performs the same processes as those of the encoding in a reverse order.
Meanwhile, in an embodiment, a (quantized) transform coefficient is encoded and/or decoded based on syntax elements, such as transform_skip_flag, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, coded_sub_block_flag, sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, abs_remainder, coeff_sign_flag, mts_idx and the like. Table 1 below shows syntax elements related to the residual data encoding according to an example.
transform_skip_flag indicates whether or not a transform for an associated block is skipped. The associated block may be a coding block (CB) or a transform block (TB). In connection with the transform (and the quantization) and the residual coding process, the CB and the TB may be used interchangeably. For example, as described above, residual samples for the CB may be derived, and (quantized) transform coefficients may be derived through transform and quantization on the residual samples. And through the residual coding process, information (e.g., syntax elements) efficiently indicating positions, sizes, signs or the like of the (quantized) transform coefficients may be generated and signaled. The quantized transform coefficients may be simply called transform coefficients. Generally, in a case where the CB is not greater than a maximum TB, the size of the CB may be the same as that of the TB, and in this case, a target block to be transformed (and quantized) and residual-coded may be called the CB or the TB. Meanwhile, in a case where the CB is greater than the maximum TB, the target block to be transformed (and quantized) and residual-coded may be called the TB. While, hereinafter, syntax elements related to residual coding are described by way of example as being signaled in units of transform blocks (TBs), the TB and the coding block (CB) may be used interchangeably as described above.
In one embodiment, 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, the (x, y) position information of the last non-zero transform coefficient in the transform block may be encoded. More specifically, last_sig_coeff_x_prefix indicates a prefix of a column position of a last significant coefficient in a scanning order in a transform block; last_sig_coeff_y_prefix indicates a prefix of a row position of a last significant coefficient in the scanning order in the transform block; last_sig_coeff_x_suffix indicates a suffix of a column position of a last significant coefficient in the scanning order in the transform block; and last_sig_coeff_y_suffix indicates a suffix of a row position of a last significant coefficient in the scanning order in the transform block. Here, the significant coefficient may be the non-zero coefficient. The scanning order may be a right upward diagonal scanning order. Alternatively, the scanning order may be a horizontal scanning order, or a vertical scanning order. The scanning order may be determined based on whether or not the intra/inter prediction is applied to a target block (CB, or CB including TB), and/or a specific intra/inter prediction mode.
Next, after dividing a transform block into 4×4 sub-blocks, a one-bit syntax element for coded_sub_block_flag, may used for each 4×4 sub-block to indicate whether or not there is a non-zero coefficient in a current sub-block.
If the value of coded_sub_block_flag is 0, there is no more information to be transmitted, and therefore, the encoding process for the current sub-block may be terminated. Conversely, if the value of coded_sub_block_flag is 1, the encoding process for sig_coeff_flag may continue to be performed. Since the sub-block including the last non-zero coefficient does not require encoding of coded_sub_block_flag, and the sub-block including the DC information of the transform block has a high probability of including the non-zero coefficient, coded_sub_block_flag may be assumed to have a value of 1 without being encoded.
If it is determined that a non-zero coefficient exists in the current sub-block because the value of coded_sub_block_flag is 1, then, inversely, sig_coeff_flag having a binary value may be encoded according to the scan order. A 1-bit syntax element sig_coeff_flag may be encoded for each coefficient according to the scan order. If the value of the transform coefficient at the current scan position is not 0, the value of sig_coeff_flag may be 1. Here, in the case of a sub-block including the last non-zero coefficient, since sig_coeff_flag is not required to be encoded for the last non-zero coefficient, the encoding process for sig_coeff_flag may be omitted. Only when sig_coeff_flag is 1, level information encoding may be performed, and four syntax elements may be used in the level information encoding process. More specifically, each sig_coeff_flag[xC][yC] may indicate whether or not the level (value) of the corresponding transform coefficient at each transform coefficient position (xC, yC) in the current TB is non-zero. In an embodiment, the sig_coeff_flag may correspond to an example of a significant coefficient flag indicating whether or not a quantized transform coefficient is a non-zero effective coefficient.
The level value remaining after the encoding for sig_coeff_flag may be the same as in Equation 1 below. That is, the syntax element remAbsLevel indicating the level value to be encoded may be as shown in Equation 1 below. Here, coeff means an actual transform coefficient value.
Through par_level_flag, the least significant coefficient (LSB) value of remAbsLevel written in Equation 1 may be encoded as shown in Equation 2 below. Here, par_level_flag[n] may indicate a parity of a transform coefficient level (value) at a scanning position n. After par_leve_flag encoding, a transform coefficient level value remAbsLevel to be encoded may be updated as shown in Equation 3 below.
rem_abs_gt1_flag may indicate whether or not remAbsLevel′ at the corresponding scanning position n is greater than 1, and rem_abs_gt2_flag may indicate whether or not remAbsLevel′ at the corresponding scanning position n is greater than 2. Encoding for abs_remainder may be performed only when rem_abs_gt2_flag is 1. When the relationship between the actual transform coefficient value coeff and each syntax element is summarized, it may be, for example, as in Equation 4 below, and Table 2 below shows examples related to Equation 4. In addition, the sign of each coefficient may be encoded using a 1-bit symbol coeff_sign_flag. |coeff| may indicate a transform coefficient level (value), and may be expressed as AbsLevel for a transform coefficient.
Meanwhile, in an embodiment, the par_level_flag indicates an example of a parity level flag for parity of a transform coefficient level for the quantized transform coefficient, the rem_abs_gt1_flag indicates an example of a first transform coefficient level flag related to whether or not the transform coefficient level is greater than a first threshold value, and the rem_abs_gt2_flag may indicate an example of a second transform coefficient level flag related to whether or not the transform coefficient level is greater than a second threshold value.
In addition, in another embodiment, rem_abs_gt2_flag may be referred to as rem_abs_gt3_flag, and in another embodiment, rem_abs_gt1_flag and rem_abs_gt2_flag may be represented based on abs_level_gtx_flag[n][j]. abs_level_gtx_flag[n][j] may be a flag indicating whether or not the absolute value of the transform coefficient level at the scanning position n (or the transform coefficient level shifted by 1 to the right) is greater than (j<<1)+1. In one example, the rem_abs_gt1_flag may perform a function which is the same and/or similar function to abs_level_gtx_flag[n][0], and the rem_abs_gt2_flag may perform a function which is the same and/or similar to abs_level_gtx_flag[n][1]. That is, the abs_level_gtx_flag[n][0] may correspond to an example of the first transform coefficient level flag, and the abs_level_gtx_flag[n][1] may correspond to an example of the second transform coefficient level flag. The (j<<1)+1 may be replaced by a predetermined threshold value, such as a first threshold value and a second threshold value, according to circumstances.
The 4×4 block of
As described in Table 1, in an embodiment, the main syntax element of a 4×4 subblock unit may include sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, abs_remainder, coeff_sign_flag, and the like. Among them, sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag may be context-encoded bins encoded using a regular encoding engine, and abs_remainder and coeff_sign_flag may be bypass bins encoded using the bypass encoding engine.
The context-encoded bin may indicate high data dependence because it uses the updated probability state and range while processing the previous bin. That is, since the context-encoded bin can perform encoding/decoding of the next bin after all encoding/decoding of the current bin is performed, it may be difficult to be parallel processed. In addition, it may take a lot of time to read the probability interval and determine the current state. Accordingly, in an embodiment, a method of improving CABAC throughput by reducing the number of context-encoded bins and increasing the number of bypass bins may be proposed.
In an embodiment, coefficient level information may be encoded in an inverse scan order. That is, beginning with the coefficients at the bottom right of the unit block, it may be scanned and then encoded in the top left direction. In an example, the coefficient level scanned first in the inverse scan order may indicate a small value. Signaling par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag for the coefficients that are scanned first may reduce the length of binarization bins for indicating the coefficient level, and each syntax element may be efficiently encoded through arithmetic coding based on a previously encoded context using a predetermined context.
However, in the case of some coefficient levels having large values, that is, coefficient levels located at the top left of the unit block, signaling par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag may not help to improve compression performance. Using par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag may rather lower encoding efficiency.
In one embodiment, by quickly switching the syntax elements (par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag) encoded as context-encoded bins to the abs_remainder syntax elements encoded using the bypass encoding engine, that is, encoded as bypass bins, it is possible to reduce the number of context-encoded bins.
That is, according to embodiments of the present disclosure, the number of context-encoded bins may be limited, and when the number of context-encoded bins coded according to the (inverse) scan order within one sub-block reaches a limited value, then context encoding may be skipped for at least one of sig_coeff_flag, par_level_flag, rem_abs_gt1_flag and/or rem_abs_gt2_flag for the (current) quantized transform coefficient. In this case, the value of the quantized transform coefficient processed in the syntax element for which the context encoding is skipped may be included in the abs_remainder syntax element, and bypass-based coded. Through this, the throughput in residual coding may be improved. In the present disclosure, the number of context-encoded bins may be limited in units of sub-blocks within a transform block (TB) or a transform unit (TU), or limited in units of transform blocks (TBs) or transform units (TUs) including sub-blocks.
In an embodiment, the number of coefficients encoded with rem_abs_gt2_flag may be limited. The maximum number of explicitly encoded rem_abs_gt2_flag in a 4×4 block may be 16. That is, rem_abs_gt2_flag may be encoded for all coefficients whose absolute value is greater than 2, according to an embodiment, for the first N coefficients having an absolute value greater than 2 (ie, coefficients with rem_abs_gt1_flag which is equal to 1) according to the scan order, rem_abs_gt2_flag can be only coded. N may be selected by the encoding apparatus or may be set to an arbitrary value from 0 to 16. Table 4 shows an example of the above embodiment when N is 1. According to an embodiment, in a 4×4 block, the encoding number of rem_abs_gt2_flag may be reduced by the number indicated by X in Table 4 below, and thus the number of context-encoded bins may be reduced. When compared with Table 3, the value of abs_remainder of coefficients for scan positions where encoding for rem_abs_gt2_flag is not performed may be changed as shown in Table 4 below.
In an embodiment, the number of coefficients encoded with rem_abs_gt1_flag may be limited. The number of explicitly encoded rem_abs_gt2_flag in a 4×4 block may be up to 16. That is, rem_abs_gt1_flag may be encoded for all coefficients whose absolute value is greater than 0, according to one embodiment, for the first M coefficients having an absolute value greater than 0 (i.e., coefficients with sig_coeff_flag which is equal to 1) according to the scan order, rem_abs_gt1_flag can be encoded. M may be selected by the encoding apparatus or may be set to an arbitrary value from 0 to 16. Table 5 shows an example of the above embodiment when M is 4. If rem_abs_gt1_flag is not encoded, rem_abs_gt2_flag is also not encoded, so according to the embodiment, the number of encodings for rem_abs_gt1_flag and rem_abs_gt2_flag can be reduced by the number indicated by X in the 4×4 block, and thus the number of context-encoded bins can be reduced. When compared with Table 3, values of rem_abs_gt2_flag and abs_remainder of coefficients for scan positions where encoding for rem_abs_gt1_flag is not performed may be changed as shown in Table 6 below. Table 6 shows an applicable example of the embodiment when M is 8.
In one embodiment, the above-described embodiments respectively limiting the number of rem_abs_gt1_flag and rem_abs_gt2_flag, may be combined. Both M indicating the limit on the number of rem_abs_gt1_flag and N indicating the limit on the number of rem_abs_gt2_flag may have values from 0 to 16, but N may be the same as M or less than N. Table 7 shows an example of this embodiment when M is 8 and N is 1. Since encoding of the corresponding syntax element is not performed at positions marked with X, the number of context-coded bins can be reduced.
In an embodiment, the number of coefficients encoded with par_level_flag may be limited. The number of explicitly encoded par_level_flags in the 4×4 block may be a maximum of 16. That is, par_level_flag may be encoded for all coefficients whose absolute value is greater than 0. In one embodiment, for only the first L coefficients having an absolute value greater than 0 according to the scan order (that is, a coefficient with sig_coeff_flag equal to 1), par_level_flag can be coded. L may be selected by the encoding apparatus or may be set to an arbitrary value from 0 to 16. Table 8 shows an application example of the embodiment when L is 8. According to the above embodiment, the number of encodings for par_level_flag may be reduced by the number indicated by X in the 4×4 block, and thus, the number of context-coded bins may be reduced. When compared with Table 3, values of rem_abs_gt1_flag, rem_abs_gt2_flag, and abs_remainder of coefficients for scan positions where encoding for par_level_flag is not performed may be changed as shown in Table 8 below.
In one embodiment, the above-described embodiments, each limiting the number of par_level_flag and rem_abs_gt2_flag, may be combined. Both L indicating the limit on the number of par_level_flag and N indicating the limit on the number of rem_abs_gt2_flag may have values from 0 to 16. Table 9 shows an application example of this embodiment when L is 8 and N is 1. Since encoding of a corresponding syntax element is not performed at positions marked with X, the number of context-encoded bins can be reduced.
In one embodiment, the above-described embodiments, each limiting the number of par_level_flag and rem_abs_gt1_flag, may be combined. Both L indicating the limit on the number of par_level_flag and M indicating the limit on the number of rem_abs_gt1_flag may have values from 0 to 16. Table 10 shows an application example of this embodiment when L is 8 and M is 8. Since encoding of a corresponding syntax element is not performed at positions marked with X, the number of context-encoded bins can be reduced.
In one embodiment, the above-described embodiments, each limiting the number of par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag, may be combined. L indicating the limit on the number of par_level_flag, M indicating the limit on the number of rem_abs_gt1_flag, and N indicating the limit on the number of rem_abs_gt2_flag may all have values from 0 to 16, but N may be the same as M or smaller than M. Table 11 shows an application example of this embodiment when L is 8, M is 8, and N is 1. Since encoding of a corresponding syntax element is not performed at positions marked with X, the number of context-encoded bins can be reduced.
In one embodiment, a method of limiting the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag may be proposed. Assuming that the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag is limited to K, K may have a value from 0 to 48. In the present embodiment, when the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag exceeds K and sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag are not encoded, rem_abs_gt2_flag may not be encoded. Table 12 shows the case where K is limited to 30.
In an embodiment, a method of limiting the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag may be combined with a method of limiting the number of rem_abs_gt2_flag described above. Assuming that the sum of the numbers of sig_coeff_flag, par_level_flag, and rem_abs_gt1_flag is limited to K and the number of rem_abs_gt2_flag is limited to N, K may have a value from 0 to 48, and N may have a value from 0 to 16. Table 13 shows the case where K is limited to 30 and N is limited to 2.
In an embodiment, encoding may be performed in the order of par_level_flag and rem_abs_gt1_flag, but in this embodiment, encoding may be performed in the order of rem_abs_gt1_flag and par_level_flag by changing the encoding order. If the encoding order of par_level_flag and rem_abs_gt1_flag is changed in this way, rem_abs_gt1_flag is encoded after sig_coeff_flag is encoded, and par_level_flag can be encoded only when rem_abs_gt1_flag is 1. Accordingly, the relationship between the actual transform coefficient value coeff and each of syntax elements may be changed as shown in Equation 5 below. Table 14 below shows an example of a case in which the encoding order of par_level_flag and rem_abs_gt1_flag is changed. Compared with Table 2, in Table 14 below, par_leve_flag is not encoded when |coeff| is 1, so there may be an advantage aspect of throughput and encoding. Of course, in Table 14, when |coeff| is 2, unlike Table 2, rem_abs_gt2_flag should be encoded and when |coeff| is 4, abs_remainder should be encoded unlike Table 2. But because |coeff| equals 1 can occur more often than |coeff| equals 2 or 4, when according to Table 14 higher throughput and encoding performance may be exhibited compared to Table 2. The result of encoding the 4×4 sub-block in
In one embodiment, the encoding order of par_level_flag and rem_abs_gt1_flag is changed, thus when the encoding is performed in the order of sig_coeff_flag, rem_abs_gt1_flag, par_level_flag, rem_abs_gt2_flag, abs_remainder, coeff_sign_flag, a method of limiting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag par_level_flag may be proposed. That is, in this embodiment, by changing the encoding order, encoding may be performed in the order of rem_abs_gt1_flag and par_level_flag, and when the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag and par_level_flag is limited to K, K may have a value from 0 to 48. In this embodiment, when sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag are no longer coded, rem_abs_gt2_flag may also not be coded. Table 16 shows the case where K is limited to 25.
In an embodiment, sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag may be encoded in one ‘for loop’ in the (residual) syntax. The coding can be stopped at the same scan position even if the sum of the numbers of three syntax elements (sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag) does not exceed K and the sum of the three syntax elements is not exactly K. Table 17 below shows a case where K is limited to 27. When encoding is performed up to scan position 3, the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag is 25. While it is a value that does not exceed K, because the encoding apparatus at this time does not know the value of the coefficient level of scan_pos 2, it is not known which value from 1 to 3 the number of context-encoded bins in scan_pos 2 will be. Accordingly, the encoding apparatus may encode up to scan_pos 3 and terminate the encoding. Although the K value is different, the encoding result may be the same in Table 16 and Table 17 below.
In one embodiment, a method of changing the encoding order of par_level_flag and rem_abs_gt1_flag, and limiting the number of rem_abs_gt2_flag may be proposed. That is, encoding is performed in the order of sig_coeff_flag, rem_abs_gt1_flag, par_level_flag, rem_abs_gt2_flag, abs_remainder, coeff_sign_flag, and the number of coefficients encoded with rem_abs_gt2_flag may be limited.
The maximum number of rem_abs_gt2_flag explicitly encoded in the 4×4 block is 16. That is, rem_abs_gt2_flag may be encoded for all coefficients having an absolute value greater than 2. In contrast, in the present embodiment, rem_abs_gt2_flag may be encoded only for the first N coefficients having an absolute value greater than 2 (ie, coefficients having rem_abs_gt1_flag equal to 1) according to the scan order. N may be selectable by the encoding apparatus, or may be set to an arbitrary value from 0 to 16. Table 18 below shows an example of application of this embodiment when N is 1. In the 4×4 block, the number of encodings for rem_abs_gt2_flag can be reduced by the number indicated by X, and thus the number of context-encoded bins can be reduced. The value of abs_remainder of coefficients for scan positions where encoding for rem_abs_gt2_flag is not performed may be changed as shown in Table 18 below compared to Table 15.
In an embodiment, a method of changing the encoding order of par_level_flag and rem_abs_gt1_flag, and limiting the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag and the number of rem_abs_gt2_flag, respectively, may be proposed. In one example, when encoding is performed in the order of sig_coeff_flag, rem_abs_gt1_flag, par_level_flag, rem_abs_gt2_flag, abs_remainder, coeff_sign_flag, the method of limiting the sum of the numbers of sig_coeff_flag, rem_abs_gt1 and par_level_flag, and the method of limiting the number of rem_abs_gt1_gt2 above-described may be combined. Assuming that the sum of the numbers of sig_coeff_flag, rem_abs_gt1_flag, and par_level_flag is limited to K and the number of rem_abs_gt2_flag is limited to N, K may have a value from 0 to 48, and N may have a value from 0 to 16. Table 19 shows a case where K is limited to 25 and N is limited to 2.
Hereinafter, a method of controlling the number of context-encoded bins in units of transform blocks
Transform coefficient information in a transform block may be encoded in units of 4×4 or 2×2 sub-blocks. In this embodiment, the number of context-encoded bins is controlled in units of not sub-blocks, but transform blocks. As described above, the context-encoded syntax element may include at least one of said sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and/or rem_abs_gt2_flag. In addition, hereinafter, the context-encoded bin may indicate a context-encoded bin for at least one of said sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and/or rem_abs_gt2_flag.
In
For example, the maximum number of context-encoded bins indicated by NumSblkRegBin may limit the number of context-coded bins for all of sig_coeff_flag, par_level_flag, rem_abs_gt1_flag and rem_abs_gt2_flag. As another example, the maximum number of context-encoded bins indicated by NumSblkRegBin may limit the number of context-coded bins for some of the syntax elements sig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and rem_abs_gt2_flag.
When the number of context-encoded bins encoded in one sub-block encoding is less than the predetermined NumSblkRegBin, NumSblkRegBin for next sub-block encoding may be increased by the difference value. Through this, if necessary, the restriction on the number of context-encoded bins in the next sub-block encoding can be alleviate.
According to the present embodiment, since the characteristics of the transform coefficients in each sub-block are reflected and a variable NumSblkRegBin can be applied for each sub-block, compared to a technique for limiting the number of context-encoded bins in units of only sub-blocks, the number of context encoding bins may be more limited, and encoding performance may not be significantly degraded.
That is, according to the present embodiment, the maximum number of context-encoded bins is limited to a threshold value, but the number of context-encoded bins saved in a block having many (quantized) transform coefficients having a zero value, such as a right or lower subblock, may be reflect in the next subblock. Therefore, a relatively large number of context encodings can be performed in sub-blocks located at the upper left and neighboring of the upper left (low frequency region.
Through this, it is possible to maintain the number of the context encoding performed in the overall transform blocks, and improve the overall throughput while adaptively improving the coding gain in the low frequency region of the transform block.
NumSblkRegBin may have the same value in the entire encoding, or may have various values according to the size of a transform block. Moreover, NumSblkRegBin may be determined by the encoding apparatus and signaled to the decoding apparatus. In addition, when a technique for limiting the number of context-encoded bins in units of sub-blocks is applied, the number of NumSblkRegBin may be limited to a value equal to or smaller than the limit value of the number of context-encoded bins limited by the technology
Referring to
First, the maximum number of context-encoded bins (NumSblkRegBin) that can be used in one sub-block is set (S600).
Then, a coder loads the first sub-block, that is, the first sub-block data (S610), and encodes the sub-block based on NumSblkRegBin (S620).
Thereafter, a value obtained by subtracting the number of encoded context-encoded bins from NumSblkRegBin is updated to NumSblkRegBin for the next subblock (S630).
In this way, all sub-blocks in the transform block can be coded in a certain coding direction.
If it is not the last sub-block (S640), data of the next sub-block is uploaded (S650), and the uploaded sub-block may be encoded based on NumSblkRegBin.
The encoding apparatus according to
Each step disclosed in
As shown in
In the encoding apparatus according to an embodiment, each of the subtractor 231, the transformer 232, the quantizer 233, and the entropy encoder 240 may be embodied by a separate chip, or at least two or more components may be embodied through a single chip.
The encoding apparatus according to an embodiment may derive a residual sample for a current block (S700). More specifically, the subtractor 231 of the encoding apparatus may derive a residual sample for a current block.
The encoding apparatus according to an embodiment may derive a quantized transform coefficient based on the residual sample for the current block (S710). More specifically, the quantizer 233 of the encoding apparatus may derive a quantized transform coefficient based on the residual sample for the current block.
The encoding apparatus according to an embodiment may encode residual information including information on the quantized transform coefficient (S720). More specifically, the entropy encoder 240 of the encoding apparatus may encode residual information including information on the quantized transform coefficient.
In one embodiment, the residual information may include a parity level flag for a parity of a transform coefficient level for the quantized transform coefficient and a first transform coefficient level flag related to whether or not the transform coefficient level is greater than a first threshold value. In one example, the parity level flag may indicate par_level_flag, the first transform coefficient level flag may indicate rem_abs_gt1_flag or abs_level_gtx_flag[n][0], and the second transform coefficient level flag may indicate rem_abs_gt2_flag, or abs_level_gtx_flag[n][1].
In an embodiment, the encoding the residual information includes deriving a value of the parity level flag and a value of the first transform coefficient level flag based on the quantized transform coefficient, and encoding the first transform coefficient level flag and encoding the parity level flag.
In an embodiment, the encoding the first transform coefficient level flag may be performed prior to the encoding the parity level flag. For example, the encoding apparatus may perform encoding for rem_abs_gt1_flag or abs_level_gtx_flag[n][0] prior to encoding for par_level_flag.
In an embodiment, the residual information may further include a significant coefficient flag indicating whether or not the quantized transform coefficient is a non-zero significant coefficient, and a second transform coefficient level flag related to whether or not the transform coefficient level for the quantized transform coefficient is greater than a second threshold value. In one example, the significant coefficient flag may indicate sig_coeff_flag.
The residual information may include a context-based coded context syntax element, and the context syntax element may include the significant coefficient flag, the parity level flag, the first transform coefficient level flag, and the second transform coefficient level flag.
In an embodiment, the deriving the quantized transform coefficient may context-based encode the context syntax element based on a predetermined maximum value for the context syntax element.
In other words, the sum of the number of the significant coefficient flags for quantized transform coefficients within the current block, the number of the first transform coefficient level flags, the number of the parity level flags, and the number of the second transform coefficient level flags included in the residual information may be less than or equal to a predetermined maximum value.
This maximum value may be the maximum value of the sum of the number of the significant coefficient flags for the quantized transform coefficients related to the current sub-block within the current block, the number of the first transform coefficient level flags, the number of the parity level flags, and the number of the second transform coefficient level flags.
In an embodiment, the maximum value may be determined in units of transform blocks. The current block may be a sub-block within a transform block, which is a transform unit, encoding of a quantized transform coefficient is performed in units of sub-blocks, and a context syntax element among residual information may be encoded based on a maximum value determined in units of transform blocks at the time of encoding of a quantized transform coefficient in units of sub-blocks.
In an embodiment, this threshold value may be determined based on the size of the current block (or a current sub-block within the current block). If the current block is a transform block, the threshold value may be determined based on the size of the transform block.
According to another embodiment, the current block may be a sub-block within a transform block, and the threshold value may be controlled in units of sub-blocks. For example, at the time of coding a sub-block, an allowable threshold value may be determined, and when encoding a context syntax element, a context syntax element may be encoded according to a threshold value corresponding to the sub-block.
In an embodiment, when the sum of the number of the significant coefficient flags, the number of the first transform coefficient level flags, the number of the parity level flags, and the number of the second transform coefficient level flags derived based on a 0th quantized transform coefficient to an nth quantized transform coefficient determined by a coefficient scan order reaches the predetermined maximum value, then explicit signaling of a significant coefficient flag, a first transform coefficient level flag, a parity level flag, and a second transform coefficient level flag may be omitted for a (n+1)th quantized transform coefficient determined by the coefficient scan order, and a value of the (n+1)th quantized transform coefficient may be derived based on a value of coefficient level information included in the residual information.
For example, when the sum of the number of sig_coeff_flag, the number of rem_abs_gt1_flag (or abs_level_gtx_flag[n][0]), the number of par_level_flags, and the number of rem_abs_gt2_flag (or abs_level_gtx_flag[n][1]) derived based on the 0th quantized transform coefficient (or the first quantized transform coefficient) to the nth quantized transform coefficient (or the nth quantized transform coefficient) determined by the coefficient scan order reaches the predetermined maximum value, then explicit signaling of sig_coeff_flag, rem_abs_gt1_flag (or abs_level_gtx_flag[n][0]), par_level_flag, abs_level_gtx_flag[n][1] and rem_abs_gt2_flag (or abs_level_gtx_flag[n][1]) may be omitted for a (n+1)th quantized transform coefficient determined by the coefficient scan order, and a value of the (n+1)th quantized transform coefficient may be derived based on the value of abs_remainder or dec_abs_level included in the residual information.
In an embodiment, the significant coefficient flags, the first transform coefficient level flags, the parity level flags, and the second transform coefficient level flags included in the residual information may be context-based coded, and the coefficient level information may be bypass-based coded.
According to the encoding apparatus and the operation method of the encoding apparatus of
Each of steps disclosed in
As shown in
In the decoding apparatus according to an embodiment, each of the entropy decoder 310, the dequantizer 321, the inverse transformer 322, and the adder 340 may be embodied by a separate chip, or at least two or more components may be embodied through a single chip.
The decoding apparatus according to an embodiment may receive a bitstream including residual information (S900). More specifically, the entropy decoder 310 of the decoding apparatus may receive a bitstream including residual information.
The decoding apparatus according to an embodiment may derive a quantized transform coefficient for a current block based on the residual information included in a bitstream (S910). More specifically, the entropy decoder 310 of the decoding apparatus may derive the quantized transform coefficient for the current block based on the residual information included in the bitstream.
The decoding apparatus according to an embodiment may derive a residual sample for the current block based on the quantized transform coefficient (S920). More specifically, the dequantizer 321 of the decoding apparatus may derive the transform coefficient from the quantized transform coefficient based on the dequantization process, and the inverse transformer 322 of the decoding apparatus may inverse transform the transform coefficient, and derive the residual sample for the current block.
The decoding apparatus according to an embodiment may generate a reconstructed picture based on the residual sample for the current block (S930). More specifically, the adder 340 of the decoding apparatus may generate the reconstructed picture based on the residual sample for the current block.
In one embodiment, the residual information may include a parity level flag for a parity of a transform coefficient level for the quantized transform coefficient and a first transform coefficient level flag related to whether or not the transform coefficient level is greater than a first threshold value. In one example, the parity level flag may indicate par_level_flag, the first transform coefficient level flag may indicate rem_abs_gt1_flag or abs_level_gtx_flag[n][0], and the second transform coefficient level flag may indicate rem_abs_gt2_flag, or abs_level_gtx_flag[n][1].
In an embodiment, the deriving the residual information includes deriving a value of the parity level flag and a value of the first transform coefficient level flag based on the quantized transform coefficient, and encoding the first transform coefficient level flag and decoding the parity level flag.
In an embodiment, the decoding the first transform coefficient level flag may be performed prior to the decoding the parity level flag. For example, the decoding apparatus may perform decoding for rem_abs_gt1_flag or abs_level_gtx_flag[n][0] prior to decoding for par_level_flag.
In an embodiment, the residual information may further include a significant coefficient flag indicating whether or not the quantized transform coefficient is a non-zero significant coefficient, and a second transform coefficient level flag related to whether or not the transform coefficient level for the quantized transform coefficient is greater than a second threshold value. In one example, the significant coefficient flag may indicate sig_coeff_flag.
The residual information may include a context-based coded context syntax element, and the context syntax element may include the significant coefficient flag, the parity level flag, the first transform coefficient level flag, and the second transform coefficient level flag.
In an embodiment, the deriving the quantized transform coefficient may context-based decode the context syntax element based on a predetermined maximum value for the context syntax element.
In other words, the sum of the number of the significant coefficient flags for quantized transform coefficients within the current block, the number of the first transform coefficient level flags, the number of the parity level flags, and the number of the second transform coefficient level flags included in the residual information may be less than or equal to a predetermined maximum value.
This maximum value may be the maximum value of the sum of the number of the significant coefficient flags for the quantized transform coefficients related to the current sub-block within the current block, the number of the first transform coefficient level flags, the number of the parity level flags, and the number of the second transform coefficient level flags.
In an embodiment, the maximum value may be determined in units of transform blocks. The current block may be a sub-block within a transform block, which is a transform unit, encoding of a quantized transform coefficient may be performed in units of sub-blocks, and a context syntax element among residual information may be decoded based on a maximum value determined in units of transform blocks at the time of encoding of a quantized transform coefficient in units of sub-blocks.
In an embodiment, this threshold value may be determined based on the size of the current block (or a current sub-block within the current block). If the current block is a transform block, the threshold value may be determined based on the size of the transform block.
According to another embodiment, the current block may be a sub-block within a transform block, and the threshold value may be controlled in units of sub-blocks. For example, at the time of decoding a sub-block, an allowable threshold value may be determined, and when decoding a context syntax element, a context syntax element may be decoded according to a threshold value corresponding to the sub-block.
In an embodiment, when the sum of the number of the significant coefficient flags, the number of the first transform coefficient level flags, the number of the parity level flags, and the number of the second transform coefficient level flags derived based on a 0th quantized transform coefficient to an nth quantized transform coefficient determined by a coefficient scan order reaches the predetermined maximum value, then explicit signaling of a significant coefficient flag, a first transform coefficient level flag, a parity level flag, and a second transform coefficient level flag may be omitted for a (n+1)th quantized transform coefficient determined by the coefficient scan order, and a value of the (n+1)th quantized transform coefficient may be derived based on a value of coefficient level information included in the residual information.
For example, when the sum of the number of sig_coeff_flag, the number of rem_abs_gt1_flag (or abs_level_gtx_flag[n][0]), the number of par_level_flags, and the number of rem_abs_gt2_flag (or abs_level_gtx_flag[n][1]) derived based on the 0th quantized transform coefficient (or the first quantized transform coefficient) to the nth quantized transform coefficient (or the nth quantized transform coefficient) determined by the coefficient scan order reaches the predetermined maximum value, then explicit signaling of sig_coeff_flag, rem_abs_gt1_flag (or abs_level_gtx_flag[n][0]), par_level_flag, abs_level_gtx_flag[n][1] and rem_abs_gt2_flag (or abs_level_gtx_flag[n][1]) may be omitted for a (n+1)th quantized transform coefficient determined by the coefficient scan order, and a value of the (n+1)th quantized transform coefficient may be derived based on the value of abs_remainder or dec_abs_level included in the residual information.
In an embodiment, the significant coefficient flags, the first transform coefficient level flags, the parity level flags, and the second transform coefficient level flags included in the residual information may be context-based coded, and the coefficient level information may be bypass-based coded.
According to the decoding apparatus and the operation method of the decoding apparatus shown in
While in the above-described embodiments, the methods are described based on the flowchart having a series of steps or blocks, the present disclosure is not limited to the above-described order of the steps or blocks, and a certain step may occur simultaneously with other step or in a different order from that described above. Further, it may be understood by a person having ordinary skill in the art that the steps shown in a flowchart is not exhaustive, and that another step may be incorporated or one or more steps of the flowchart may be removed without affecting the scope of the present disclosure.
The foregoing methods according to the present disclosure may be implemented in a software form, and the encoding apparatus and/or decoding apparatus according to the disclosure may be included in an apparatus for performing image processing of, for example, a TV, a computer, a smartphone, a set-top box, and a display device.
When embodiments in the present disclosure are implemented in software, the above-described methods may be embodied as modules (processes, functions or the like) for performing the above-described functions. The modules may be stored in a memory and may be executed by a processor. The memory may be inside or outside the processor and may be connected to the processor in various well-known means. The processor may include an application-specific integrated circuit (ASIC), a different chipset, a logic circuit, and/or a data processor. The memory may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium, and/or another storage device. That is, embodiments described in the present disclosure may be embodied and performed on a processor, a microprocessor, a controller or a chip. For example, functional units shown in each drawing may be embodied and performed on a computer, a processor, a microprocessor, a controller or a chip. In this case, information (e.g., information on instructions) or algorithm for embodiment may be stored in a digital storage medium.
Further, the decoding apparatus and the encoding apparatus to which the present disclosure is applied may be included in a multimedia broadcasting transceiver, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video chat device, a real time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a video on demand (VoD) service providing device, an over the top (OTT) video device, an internet streaming service providing device, a three-dimensional (3D) video device, a virtual reality device, an augmented reality (argument reality) device, a video telephony video device, a transportation means terminal (e.g., a vehicle (including an autonomous vehicle) terminal, an aircraft terminal, a ship terminal, etc.) and a medical video device, and may be used to process a video signal or a data signal. For example, the over the top (OTT) video device may include a game console, a Blu-ray player, an Internet access TV, a Home theater system, a smartphone, a Tablet PC, a digital video recorder (DVR) and the like.
In addition, the processing method to which the present disclosure is applied may be produced in the form of a program executed by a computer, and be stored in a computer-readable recording medium. Multimedia data having a data structure according to the present disclosure may be also 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 are stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. Further, the computer-readable recording medium includes media embodied in the form of a carrier wave (for example, transmission over the Internet). In addition, a bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted through a wired or wireless communication network.
Additionally, the embodiments of the present disclosure may be embodied as a computer program product by program codes, and the program codes may be performed in a computer by the embodiment of the disclosure. The program codes may be stored on a computer-readable carrier.
Referring to
The encoding server functions to compress to digital data the contents input from the multimedia input devices, such as the smart phone, the camera, the camcorder and the like, to generate a bitstream, and to transmit it to the streaming server. As another example, in a case where the multimedia input device, such as, the smart phone, the camera, the camcorder or the like, directly generates a bitstream, the encoding server may be omitted.
The bitstream may be generated by an encoding method or a bitstream generation method to which the present disclosure is applied. And the streaming server may temporarily store the bitstream in a process of transmitting or receiving the bitstream.
The streaming server transmits multimedia data to the user equipment on the basis of a user's request through the web server, which functions as an instrument that informs a user of what service there is. When the user requests a service which the user wants, the web server transfers the request to the streaming server, and the streaming server transmits multimedia data to the user. In this regard, the contents streaming system may include a separate control server, and in this case, the control server functions to control commands/responses between respective equipments in the content streaming system.
The streaming server may receive contents from the media storage and/or the encoding server. For example, in a case the contents are received from the encoding server, the contents may be received in real time. In this case, the streaming server may store the bitstream for a predetermined period of time to provide the streaming service smoothly.
For example, the user equipment may 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, a slate PC, a tablet PC, an ultrabook, a wearable device (e.g., a watch-type terminal (smart watch), a glass-type terminal (smart glass), a head mounted display (HMD)), a digital TV, a desktop computer, a digital signage or the like.
Each of servers in the contents streaming system may be operated as a distributed server, and in this case, data received by each server may be processed in distributed manner.
This application is a continuation application of U.S. application Ser. No. 17/563,776, filed Dec. 28, 2021, which is a continuation of Ser. No. 17/217,739, filed Mar. 30, 2021, now U.S. Pat. No. 11,245,904, issued Feb. 8, 2022, which is a continuation of International Application PCT/KR2019/012996, filed on Oct. 4, 2019, which claims the benefit of U.S. Provisional Patent Application No. 62/741,548, filed on Oct. 5, 2018, the contents of which are hereby incorporated by reference herein in its entirety.
Number | Date | Country | |
---|---|---|---|
62741548 | Oct 2018 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 17563776 | Dec 2021 | US |
Child | 18778196 | US | |
Parent | 17217739 | Mar 2021 | US |
Child | 17563776 | US | |
Parent | PCT/KR2019/012996 | Oct 2019 | WO |
Child | 17217739 | US |