Video decoding method and apparatus for performing prediction residual post-processing with multiple scheme switching
By employing multiple residual entropy encoding and decoding schemes and selecting appropriate encoding parameters and methods based on data characteristics, the problem of insufficient encoding efficiency in existing technologies has been solved, achieving more efficient data compression.
Patent Information
- Application Number
- CN202411561573.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-03-02
- Filing Date
- 2020-03-01
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2040-03-01
AI Technical Summary
Existing single binarization, debinarization, and entropy coding methods cannot meet the needs of diverse and differentiated data compression, especially in new application areas where the dynamic range and bit precision of data vary greatly and distortion requirements differ significantly, resulting in insufficient coding efficiency.
Multiple predetermined residual entropy encoding and decoding schemes are adopted. Based on the data's bit precision, distortion requirements, transformation size, quantization parameters, prediction method, and transformation method, appropriate encoding parameters and encoding methods are selected to perform entropy encoding and entropy decoding on the entire compression unit.
It improves the coding efficiency of data compression, adapts to diverse and differentiated data compression needs, and meets the coding requirements of different datasets.
Smart Images

Figure CN119402650B_ABST
Abstract
Description
[0001] This application is a divisional application of the following original application:
[0002] Original application filing date: 2020-03-01
[0003] Original application number: 202010133384X
[0004] Original application invention name: Data compression method and device for prediction residual entropy coding with multiple scheme switching TECHNICAL FIELD
[0005] The present invention relates to an encoding and decoding (also called coding) system for compressing data, in particular a method and device for entropy encoding and entropy decoding the prediction residual of data. BACKGROUND
[0006] With the human society entering the era of big data, artificial intelligence, cloud computing, mobile computing, cloud-mobile computing, ultra-high definition (4K) and super ultra-high definition (8K) video image resolution, 4G / 5G communication, virtual reality, it is necessary to compress various data, including big data, image data, video data, audio data, speech data, neural network data, and various new forms of data, with ultra-high compression ratio and extremely high quality. A new trend in the field of data compression is the diversification and differentiation of data, such as the continuous increase of dynamic range and bit precision of its representation form, and the increasing requirements for data compression, such as lossless, ultra-low distortion lossy, and low distortion lossy coding requirements.
[0007] A data set is a collection of data elements (e.g. bytes, bits, pixels, pixel components, spatial samples, transform domain coefficients). When encoding (and corresponding decoding) a data set arranged in a certain spatial (one-dimensional, two-dimensional, or multi-dimensional) shape (e.g. a one-dimensional data queue, a two-dimensional data file, an image, a video sequence, a transform domain, a transform block, multiple transform blocks, a three-dimensional scene, a sequence of continuously changing three-dimensional scenes), especially a two-dimensional or above data set, the data set is usually divided into a number of integral compression units with a predetermined shape and size (i.e. the number of elements), and the encoding or decoding is performed on an integral compression unit by integral compression unit. At any time, the integral compression unit being encoded or decoded is called the current integral compression unit. The data element (sometimes also referred to simply as element) being encoded or decoded is called the current data element, or simply the current element. An element is composed of N components (usually 1≤N≤5), so a data set and an integral compression unit are also composed of N components.
[0008] The encoding in data compression usually consists of part or all of the following stages:
[0009] 1) prediction, mainly including neighboring element (e.g. pixel) prediction, string prediction, block prediction, etc., to generate prediction residual, simply referred to as residual;
[0010] 2) transform, mainly to transform the prediction residual to generate transform coefficient, simply referred to as coefficient; when the transform is identity transform, i.e. no transform is actually performed, the coefficient is exactly equal to the residual;
[0011] 3) quantization, mainly to quantize the coefficient to generate quantized residual; when the quantization is identity quantization, i.e. no quantization is actually performed, the quantized residual is equal to the coefficient; when the transform is identity transform, the quantized residual is the result of quantizing the prediction residual; when the quantization is identity quantization and the transform is identity transform, the quantized residual is equal to the coefficient and also equal to the residual;
[0012] 4) entropy coding, mainly including entropy coding, at least including binarization, of the quantized residual to generate compressed data bitstream.
[0013] Decoding in data compression usually consists of part or all of the following stages:
[0014] 1) entropy decoding, mainly to parse the compressed data bitstream and to entropy decode, at least including de-binarization, to generate quantized residual;
[0015] 2) inverse quantization, mainly to inverse quantize the quantized residual to generate reconstructed coefficient; when the quantization is identity quantization, i.e. no quantization is actually performed, the inverse quantization is also identity inverse quantization, i.e. no inverse quantization is actually performed, so the reconstructed coefficient is equal to the quantized residual;
[0016] 3) inverse transform, mainly to inverse transform the reconstructed coefficient to generate reconstructed residual; when the transform is identity transform, i.e. no transform is actually performed, the inverse transform is also identity inverse transform, i.e. no inverse transform is actually performed, so the reconstructed residual is exactly equal to the reconstructed coefficient; when the quantization is identity quantization and the transform is identity transform, the inverse quantization is also identity inverse quantization and the inverse transform is also identity inverse transform, so the reconstructed residual is equal to the reconstructed coefficient and also equal to the quantized residual;
[0017] 4) prediction compensation, mainly including neighboring element (e.g. pixel) prediction compensation, string prediction compensation, block prediction compensation, etc., to generate reconstructed data, also referred to as reconstructed data or referred to as recovered data.
[0018] The prediction residual in the above encoding stages, the transform coefficient, the quantized residual, and the quantized residual in the decoding stages, the reconstructed coefficient, the reconstructed residual, are often collectively referred to as residual or referred to as residual data. Generally, the residual refers to the prediction residual and / or the transform coefficient and / or the quantized residual and / or the reconstructed coefficient and / or the reconstructed residual, depending on the context. If it cannot be determined from the context, the residual refers to the prediction residual and / or the transform coefficient and / or the quantized residual and / or the reconstructed coefficient and / or the reconstructed residual.
[0019] The individual data or data elements in the input data, original data, residual data and various intermediate data involved in each stage of coding and decoding are referred to as data samples, abbreviated as samples or called as sample values.
[0020] Both binarization and de-binarization are about one-to-one correspondence between a numerical value Val and a binary symbol string, i.e. a binary codeword Code, representing the numerical value Val. Such one-to-one correspondence is usually represented by a code table or equivalently by a calculation formula or equivalently by a pseudo code. Below are several commonly used binarization and de-binarization methods and the code tables representing their corresponding relationships:
[0021] 1) n-bit fixed-length code with maximum value X = 2 n -1, the correspondence between the numerical value Val and the codeword Code is shown in the following code table:
[0022]
[0023] 2) unary code, the correspondence between the numerical value Val and the codeword Code is shown in the following code table:
[0024]
[0025] 3) truncated unary code with maximum value X, the correspondence between the numerical value Val and the codeword Code is shown in the following code table:
[0026]
[0027] 4) k-th order exponential Golomb code, the correspondence between the numerical value Val and the codeword Code is shown in the following code table:
[0028] k = 0
[0029]
[0030] k = 1
[0031]
[0032] k = 2
[0033]
[0034] It is obvious that binarization is to obtain the corresponding codeword Code from the numerical value Val, and de-binarization is to obtain the corresponding numerical value Val from the codeword Code.
[0035] In the prior art, no matter what kind of prediction is adopted, what kind of transform is adopted, whether the transform is an identity transform, what kind of quantization is adopted, whether the quantization is an identity quantization, what is the dynamic range of the data, what is the bit precision of the data, what is the distortion requirement of the coding, and how to set the distortion control parameter of the coding, basically, the single binarization, de-binarization, entropy coding and entropy decoding mode is adopted for the quantized residual error, which is also the prediction residual error when the transform is an identity transform and the quantization is an identity quantization.
[0036] In the new application field of data compression, with the increasingly diversified and differentiated data, the diversified, differentiated and complicated prediction, transform and quantization technologies, the great difference in the dynamic range and bit precision of the data, and the different distortion requirements of the data compression, the single binarization, de-binarization, entropy coding and entropy decoding mode cannot meet the requirement of coding efficiency of these new applications. SUMMARY
[0037] In order to further greatly improve the coding efficiency of data compression under the new situation of increasingly diversified and differentiated data, the diversified, differentiated and complicated prediction, transform and quantization technologies, the great difference in the dynamic range and bit precision of the data, and the different distortion requirements of the data compression, the present application provides a data compression method and device, which sets the option of at least including the bit precision of the data and / or the distortion requirement of the data compression and / or the transform size and / or the quantization parameter and / or the prediction mode and / or the transform mode and / or the quantization mode, and accordingly selects one of the multiple sets of predetermined residual entropy coding schemes including binarization and / or entropy coding pre-processing to entropy code the residual error of an integral compression unit.
[0038] The primary technical feature of the present application is that it has multiple sets of predetermined residual entropy coding schemes and corresponding residual entropy decoding schemes; according to the setting of the option of at least including the bit precision of the data and / or the distortion requirement of the data compression and / or the transform size and / or the quantization parameter and / or the prediction mode and / or the transform mode and / or the quantization mode, one of the multiple sets of predetermined residual entropy coding schemes or one of the residual entropy decoding schemes is selected to entropy code or entropy decode the residual error of an integral compression unit.
[0039] The most basic technical feature of the encoding method and device of the present application is that A (2≤A≤5) sets of predetermined quantization residual entropy coding schemes are provided; each of several predetermined coding parameters and / or coding modes including bit precision of data and / or distortion requirement of data compression and / or transform size and / or quantization parameter and / or prediction mode and / or transform mode and / or quantization mode has a predetermined plurality of options; one of the plurality of options of the selected coding parameters and / or coding modes is selected as the corresponding option corresponding to an integral compression unit; the integral compression unit is subjected to coding operations including at least prediction and / or transform and / or quantization using the corresponding option; a corresponding quantization residual entropy coding scheme is determined from the corresponding option according to a predetermined rule, and the quantization residual of the integral compression unit is entropy coded using the corresponding quantization residual entropy coding scheme to generate a compressed data code stream containing at least part or all of the information required to represent the options of the coding parameters and / or coding modes and / or the quantization residual entropy coding scheme. Figure 1 is a schematic diagram of the encoding method or device of the present application.
[0040] The most basic technical feature of the decoding method and device of the present application is that A (2≤A≤5) sets of predetermined quantization residual entropy decoding schemes are provided; each of several predetermined coding parameters and / or decoding modes including bit precision of data and / or distortion requirement of data compression and / or transform size and / or quantization parameter and / or prediction compensation mode and / or inverse transform mode and / or inverse quantization mode has a predetermined plurality of options; the compressed data code stream is parsed to obtain the corresponding option of the coding parameters and / or decoding modes used by an integral compression unit; a corresponding quantization residual entropy decoding scheme is determined from the corresponding option according to a predetermined rule, and entropy decoding is performed using the corresponding residual entropy decoding scheme; the integral compression unit is subjected to decoding operations including at least inverse quantization and / or inverse transform and / or prediction compensation using the corresponding option to generate recovered data. Figure 2 is a schematic diagram of the decoding method or device of the present application.
[0041] According to a first aspect of the present application, an encoding method for compressing a data set and its data is provided, characterized in that,
[0042] at least A (2≤A≤5) sets of predetermined quantization residual entropy coding schemes; when the quantization is identity quantization, the quantization residual is equal to the coefficient; when the transform is identity transform, the quantization residual is the result of quantizing the prediction residual; when the quantization is identity quantization and the transform is identity transform, the quantization residual is equal to the prediction residual;
[0043] The predetermined coding parameters include at least bit precision of data and / or distortion requirement of data compression and / or transform size and / or quantization parameter, and the predetermined coding modes include at least prediction mode and / or transform mode and / or quantization mode.
[0044] When encoding an integral compression unit, the steps involved include at least the following steps:
[0045] 1) selecting one of the multiple options of the coding parameters and / or the coding modes as the corresponding option for the integral compression unit,
[0046] 2) performing at least prediction and / or transform and / or quantization encoding operation on the integral compression unit using at least the corresponding option,
[0047] 3) selecting one of the A sets of quantized residual entropy coding schemes as the corresponding residual entropy coding scheme for the integral compression unit according to predetermined rules based on at least the corresponding option,
[0048] 4) performing entropy coding on the prediction residual of the integral compression unit and / or entropy coding on the quantized residual of the integral compression unit using at least the corresponding residual entropy coding scheme,
[0049] 5) writing the encoding result into a compressed data bitstream, which at least includes part or all of the information required to indicate which option of the corresponding option is which option of the coding parameters and / or the coding modes and / or which set of the corresponding residual entropy coding scheme is which set of quantized residual entropy coding schemes.
[0050] According to a second aspect of the present application, an encoding device for compressing a data set and data thereof is provided, characterized in that,
[0051] The predetermined coding parameters include at least bit precision of data and / or distortion requirement of data compression and / or transform size and / or quantization parameter, and the predetermined coding modes include at least prediction mode and / or transform mode and / or quantization mode.
[0052] The predetermined coding parameters include at least bit precision of data and / or distortion requirement of data compression and / or transform size and / or quantization parameter, and the predetermined coding modes include at least prediction mode and / or transform mode and / or quantization mode.
[0053] When encoding an integral compression unit, the steps involved include at least the following steps:
[0054] coding parameter and / or coding mode selection module: selecting one of a plurality of options of the coding parameter and / or the coding mode as a corresponding option for the integral compression unit,
[0055] coding module: performing at least prediction and / or transform and / or quantization coding operation on the integral compression unit using at least the corresponding option,
[0056] residual entropy coding scheme selection module: selecting one of the A sets of quantized residual entropy coding schemes as a corresponding residual entropy coding scheme for the integral compression unit according to a predetermined rule at least according to the corresponding option,
[0057] entropy coding pre-processing and / or entropy coding module: performing entropy coding pre-processing on the prediction residual and / or entropy coding on the quantized residual of the integral compression unit using at least the corresponding residual entropy coding scheme,
[0058] compressed data bitstream generation module: writing the coding result into a compressed data bitstream, the compressed data bitstream at least including part or all of the information required to indicate which option of the corresponding option is which option of the coding parameter and / or the coding mode and / or which set of quantized residual entropy coding scheme is the corresponding residual entropy coding scheme,
[0059] According to a third aspect of the present application, a decoding method for compressing a data set and its data is provided, characterized in that,
[0060] at least including A (2≤A≤5) sets of predetermined quantized residual entropy decoding schemes; when the inverse quantization is the identity inverse quantization, the reconstructed coefficient is equal to the quantized residual; when the inverse transform is the identity inverse transform, the reconstructed residual is equal to the reconstructed coefficient; when the inverse quantization is the identity inverse quantization and the inverse transform is the identity inverse transform, the reconstructed residual is equal to the reconstructed coefficient and also equal to the quantized residual;
[0061] a plurality of predetermined coding parameters and / or decoding modes each having a predetermined plurality of options, the coding parameters at least including bit precision of data and / or distortion requirement of data compression and / or transform size and / or quantization parameter, the decoding modes at least including inverse quantization mode and / or inverse transform mode and / or prediction compensation mode;
[0062] When decoding an integral compression unit, the steps involved at least include the following steps:
[0063] 1) parsing the compressed data bitstream to obtain the corresponding option of the coding parameter and / or the decoding mode used by the integral compression unit, the corresponding option being one of the plurality of options of the coding parameter and / or the decoding mode,
[0064] 2) selecting one of the A sets of quantized residual entropy decoding schemes as the corresponding residual entropy decoding scheme for the whole compression unit according to a predetermined rule at least according to the corresponding options,
[0065] 3) entropy decoding the whole compression unit using at least the corresponding residual entropy decoding scheme to obtain at least quantized residuals and / or entropy decoding and post-processing residuals of the whole compression unit for prediction compensation to obtain at least reconstructed residuals,
[0066] 4) performing at least inverse quantization and / or inverse transform and / or prediction compensation decoding operation on the whole compression unit using at least the corresponding options.
[0067] According to a fourth aspect of the present application, a decoding device for compressing a data set and data thereof is provided, characterized in that,
[0068] at least A (2≤A≤5) sets of predetermined quantized residual entropy decoding schemes; when inverse quantization is identity inverse quantization, reconstructed coefficients are equal to quantized residuals; when inverse transform is identity inverse transform, reconstructed residuals are equal to reconstructed coefficients; when inverse quantization is identity inverse quantization and inverse transform is identity inverse transform, reconstructed residuals are equal to reconstructed coefficients and also equal to quantized residuals;
[0069] a plurality of predetermined encoding parameters and / or decoding manners each having a plurality of corresponding options, the encoding parameters at least including bit precision of data and / or distortion requirement of data compression and / or transform size and / or quantization parameter, the decoding manners at least including inverse quantization manner and / or inverse transform manner and / or prediction compensation manner;
[0070] when decoding a whole compression unit, the involved modules at least include the following modules:
[0071] a compressed data bitstream parsing module for parsing a compressed data bitstream to obtain corresponding options of encoding parameters and / or decoding manners used by the whole compression unit, the corresponding options being one of the plurality of options of the encoding parameters and / or the decoding manners,
[0072] a residual entropy decoding scheme selection module for selecting one of the A sets of quantized residual entropy decoding schemes as the corresponding residual entropy decoding scheme for the whole compression unit according to a predetermined rule at least according to the corresponding options,
[0073] an entropy decoding and / or entropy decoding post-processing module for entropy decoding the whole compression unit using at least the corresponding residual entropy decoding scheme to obtain at least quantized residuals and / or entropy decoding and post-processing residuals of the whole compression unit for prediction compensation to obtain at least reconstructed residuals,
[0074] Decoding module: at least dequantizing and / or inverse transforming and / or prediction compensation decoding the whole compressed unit using at least the corresponding option.
[0075] In the present invention, data comprises one of the following types of data or a combination thereof
[0076] 1) one-dimensional data;
[0077] 2) two-dimensional data;
[0078] 3) multi-dimensional data;
[0079] 4) graphs;
[0080] 5) fractal graphs;
[0081] 6) images;
[0082] 7) sequences of images;
[0083] 8) videos;
[0084] 9) audios;
[0085] 10) files;
[0086] 11) bytes;
[0087] 12) bits;
[0088] 13) pixels;
[0089] 14) three-dimensional scenes;
[0090] 15) sequences of three-dimensional scenes with continuous changes;
[0091] 16) scenes of virtual reality;
[0092] 17) sequences of scenes of virtual reality with continuous changes
[0093] 18) images in pixel form;
[0094] 19) transform domain data of images;
[0095] 20) sets of two-dimensional or more than two-dimensional bytes;
[0096] 21) sets of two-dimensional or more than two-dimensional bits;
[0097] 22) sets of pixels;
[0098] 23) sets of three-component pixels (R, G, B) or their variants;
[0099] 24) sets of three-component pixels (Y, U, V) or their variants;
[0100] 25) a set of three-component pixels (Y, Cb, Cr) or variants thereof;
[0101] 26) a set of three-component pixels (Y, Cg, Co) or variants thereof;
[0102] 27) a set of four-component pixels (C, M, Y, K) or variants thereof;
[0103] 28) a set of four-component pixels (R, G, B, A) or variants thereof;
[0104] 29) a set of four-component pixels (Y, U, V, A) or variants thereof;
[0105] 30) a set of four-component pixels (Y, Cb, Cr, A) or variants thereof;
[0106] 31) a set of four-component pixels (Y, Cg, Co, A) or variants thereof.
[0107] In the present application, in the case where the original data is an image, a sequence of images, a video, etc., the integral compression unit is one coding region or one decoding region of an image or a sequence, including the following cases: a sequence, a sequence of images, an image, a sub-image of an image, a slice, a tile, a macroblock, a largest coding unit (LCU), a coding tree unit (CTU), a coding unit (CU), a sub-region of a CU, a sub-coding unit (SubCU), a prediction block, a prediction unit (PU), a sub-region of a PU, a sub-prediction unit (SubPU), a transform block, a transform unit (TU), a sub-region of a TU, a sub-transform unit (SubTU).
[0108] The technical features of the present application are described above with several specific embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the present specification. The present application can also be implemented or applied by other different embodiments, and the details in the present specification can be modified or changed in various ways based on different views and applications without departing from the spirit of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0109] Figure 1 is a schematic diagram of the encoding method or apparatus of the present application.
[0110] Figure 2 is a schematic diagram of the decoding method or apparatus of the present application. DETAILED DESCRIPTION
[0111] The following are more implementation details of the present application.
[0112] Example 1
[0113] In the encoding method or apparatus or the decoding method or apparatus, the element of the data set is a byte or a bit or a pixel or an N (1≤N≤5) component pixel or one component of an N component pixel or a spatial sampling point or a transform domain coefficient.
[0114] Embodiment 2
[0115] In the encoding method or apparatus or the decoding method or apparatus, the multiple options of the distortion requirement of the data compression are two options of lossless compression and lossy compression.
[0116] Embodiment 3
[0117] In the encoding method or apparatus or the decoding method or apparatus, the multiple options of the bit precision of the data at least include the following options: 8bit, 10bit, 12bit, 16bit.
[0118] Embodiment 4
[0119] In the encoding method or apparatus or the decoding method or apparatus, the multiple options of the encoding mode or the decoding mode are two options of both transform and quantization being identity and neither transform nor quantization being identity or two equivalent options of both inverse transform and inverse quantization being identity and neither inverse transform nor inverse quantization being identity.
[0120] Embodiment 5
[0121] In the encoding method or apparatus or the decoding method or apparatus, the A set of quantized residual entropy coding schemes or entropy decoding schemes at least include the following 3 sets of schemes:
[0122] Scheme 1, at least including the following features: in the entropy coding or the entropy decoding, a syntax element coeff_level_minus1 which is symmetric to a non-zero quantized residual absolute value minus one adopts a first set of binarization or de-binarization;
[0123] Scheme 2, at least including the following features: in the entropy coding or the entropy decoding, a syntax element coeff_level_minus1 which is symmetric to a non-zero quantized residual absolute value minus one adopts a second set of binarization or de-binarization;
[0124] Scheme 3, at least including the following features: in the entropy coding or the entropy decoding, a syntax element coeff_level_minus1 which is symmetric to a non-zero quantized residual absolute value minus one adopts a third set of binarization or de-binarization.
[0125] Embodiment 6
[0126] In the encoding method or apparatus or the decoding method or apparatus of Embodiment 5,
[0127] The first set of binarization or de-binarization methods is: there is a predetermined threshold K1, if coeff_level_minus1 is less than K1, truncated unary code with maximum value of K1-1 is used for binarization or de-binarization, otherwise, 0th order Exp-Golomb code is used for binarization or de-binarization;
[0128] The second set of binarization or de-binarization methods is: there is a predetermined threshold K2, if coeff_level_minus1 is less than K2, truncated unary code with maximum value of K2-1 is used for binarization or de-binarization, otherwise, 0th order Exp-Golomb code is used for binarization or de-binarization;
[0129] The second set of binarization or de-binarization methods is: there is a predetermined threshold K3 = 2 n if coeff_level_minus1 is less than K3, n-bit fixed length code is used for binarization or de-binarization, otherwise, BitDepth-bit fixed length code is used for binarization or de-binarization, where BitDepth is the bit precision of the data.
[0130] Embodiment 7
[0131] In the encoding method or device or the decoding method or device of Embodiment 6,
[0132] The multiple options of distortion requirement of the data compression include lossless compression and lossy compression,
[0133] The multiple options of bit precision BitDepth of the data include at least the following options: 8bit, 10bit, 12bit, 16bit,
[0134] The predetermined rule for selecting the corresponding residual entropy coding scheme or the corresponding residual entropy decoding scheme according to the corresponding option is:
[0135] If the distortion requirement of the data compression is lossy compression, then,
[0136] The corresponding residual entropy coding scheme or the corresponding residual entropy decoding scheme is the scheme 1,
[0137] Otherwise,
[0138] If the bit precision BitDepth of the data is not 16bit, then
[0139] The corresponding residual entropy coding scheme or the corresponding residual entropy decoding scheme is the scheme 2,
[0140] Otherwise,
[0141] The corresponding residual entropy coding scheme or the corresponding residual entropy decoding scheme is the scheme 3.
[0142] Embodiment 8
[0143] In the encoding method or apparatus or the decoding method or apparatus of Embodiment 6,
[0144] The multiple options of the bit precision BitDepth of the data at least include the following options: 8bit, 10bit, 12bit, 16bit,
[0145] The multiple options of the encoding mode or the decoding mode are the following two options: the transform and the quantization are both identity, and the transform and the quantization are not both identity, or the following two equivalent options: the inverse transform and the inverse quantization are both identity, and the inverse transform and the inverse quantization are not both identity,
[0146] The predetermined rule of selecting the corresponding residual entropy coding scheme or the corresponding residual entropy decoding scheme according to the corresponding option is:
[0147] If the transform and the quantization are not both identity or equivalently the inverse transform and the inverse quantization are not both identity, then,
[0148] The corresponding residual entropy coding scheme or the corresponding residual entropy decoding scheme is the scheme 1,
[0149] Otherwise,
[0150] If the bit precision BitDepth of the data is not 16bit, then
[0151] The corresponding residual entropy coding scheme or the corresponding residual entropy decoding scheme is the scheme 2,
[0152] Otherwise,
[0153] The corresponding residual entropy coding scheme or the corresponding residual entropy decoding scheme is the scheme 3.
[0154] Embodiment 9
[0155] In the encoding method or apparatus or the decoding method or apparatus of Embodiment 7 or 8, K1=32, K2=2 BitDepth - 3 , K3=2 n =2048.
[0156] Embodiment 10
[0157] In the encoding method or apparatus or the decoding method or apparatus,
[0158] The multiple options of the encoding mode or the decoding mode are the following two options:
[0159] 1) the integral compression unit uses intra prediction for encoding or decoding,
[0160] 2) said integral compression unit does not use intra prediction for encoding or decoding;
[0161] said A set of quantized residual entropy coding schemes or entropy decoding schemes at least includes the following 2 sets of schemes:
[0162] Scheme 1, at least includes the following features: said entropy coding pre-processing or said entropy decoding post-processing respectively includes multiplying by a predetermined constant scaling factor a or -a or dividing by a predetermined constant scaling factor a or -a,
[0163] Scheme 2, at least includes the following features: said entropy coding pre-processing or said entropy decoding post-processing respectively includes multiplying by a predetermined constant scaling factor a or -a or b or -b or dividing by a predetermined constant scaling factor a or -a or b or -b,
[0164] wherein a and b are both positive numbers;
[0165] said predetermined rule for selecting a corresponding residual entropy coding scheme or a corresponding residual entropy decoding scheme according to said corresponding option is:
[0166] if said integral compression unit uses intra prediction for encoding or decoding, then,
[0167] a corresponding residual entropy coding scheme or a corresponding residual entropy decoding scheme is said Scheme 2,
[0168] otherwise,
[0169] a corresponding residual entropy coding scheme or a corresponding residual entropy decoding scheme is said Scheme 1.
[0170] Embodiment 11
[0171] in said encoding method or apparatus or said decoding method or apparatus of Embodiment 10, a = 1, b = 2.
[0172] Embodiment 12
[0173] in said encoding method or apparatus or said decoding method or apparatus of Embodiment 11, said operation of dividing by 2 is right shifting by one binary digit, and said operation of dividing by -2 is multiplying by -1 and then right shifting by one binary digit.
[0174] Embodiment 13
[0175] in said encoding method or apparatus or said decoding method or apparatus of Embodiment 10 or 11 or 12, there is information representing the sign of said predetermined constant scaling factor in one or several of the following places in said compressed data bitstream:
[0176] 1) picture parameter set;
[0177] 2) sequence header;
[0178] 3) slice header;
[0179] 4) picture header;
[0180] 5) CTU header;
[0181] 6) CU header;
[0182] 7) coded block header.
[0183] Embodiment 14
[0184] In the encoding method or apparatus or the decoding method or apparatus of Embodiment 13, the information is one or more directly existing syntax elements and / or one or more implicitly derived parameters; the directly existing syntax element is one or more bit strings (bit strings) in the compressed data code stream or a predetermined default value thereof; the implicitly derived parameter is a parameter derived from one or more other encoding parameters and / or coding variables and / or other syntax elements of the compressed data code stream or a predetermined default value thereof.
[0185] Embodiment 15
[0186] In the decoding method or apparatus of Embodiment 13, the information is the following syntax element in the picture parameter set or the picture header:
[0187] residual multiplier sign flag
[0188] The semantic description is: a binary variable; the value of '0' indicates that the sign of the predetermined constant scaling factor in the residual entropy decoding post-processing is positive; the value of '1' indicates that the sign of the predetermined constant scaling factor in the residual entropy decoding post-processing is negative; if the syntax element does not exist in the bit stream, it is equivalent to the value of the syntax element being the default value '0', i.e. the sign of the predetermined constant scaling factor in the residual entropy decoding post-processing is positive.
[0189] Embodiment 16
[0190] In the encoding method or apparatus or the decoding method or apparatus of Embodiment 10 or 11 or 12, the information indicating the absolute value of the predetermined constant scaling factor multiplied by or divided by exists in one or several of the following places in the compressed data code stream:
[0191] 1) picture parameter set;
[0192] 2) sequence header;
[0193] 3) slice header;
[0194] 4) picture header;
[0195] 5) CTU header;
[0196] 6) CU header;
[0197] 7) Coded block header.
[0198] Embodiment 17
[0199] In the encoding method or apparatus or the decoding method or apparatus of Embodiment 16, the information is one or more directly existing syntax elements and / or one or more implicitly derived parameters; the directly existing syntax elements are one or more bit strings (bit strings) in the compressed data code stream or their predetermined default values; the implicitly derived parameters are parameters derived from one or more other encoding parameters and / or coding variables and / or other syntax elements of the compressed data code stream or their predetermined default values.
[0200] Embodiment 18
[0201] In the decoding method or apparatus of Embodiment 16, the information is a parameter ResidualMultiplierMode derived from other encoding parameters and / or coding variables and / or other syntax elements of the compressed data code stream: when ResidualMultiplierMode takes the value 2, the absolute value of the predetermined constant scaling factor of the residual entropy decoding post-processing is a; when ResidualMultiplierMode takes the values 1 and 3, the absolute value of the predetermined constant scaling factor of the residual entropy decoding post-processing is b; when ResidualMultiplierMode takes the value 0, no residual entropy decoding post-processing is performed on the residual, i.e. the value of the predetermined constant scaling factor of the residual entropy decoding post-processing is 1.
[0202] Embodiment 19
[0203] In the encoding method or apparatus or the decoding method or apparatus, the following one or several places in the compressed data code stream exist part or all of the information required to indicate which option of the encoding parameter and / or the encoding mode or the decoding mode and / or which set of quantized residual entropy coding scheme or entropy decoding scheme the corresponding residual entropy coding scheme or decoding scheme is:
[0204] 1) Sequence parameter set;
[0205] 2) Picture parameter set;
[0206] 3) Sequence header;
[0207] 4) Slice header;
[0208] 5) Picture header;
[0209] 6) CTU header;
[0210] 7) CU header;
[0211] 8) Coded block header.
[0212] Embodiment 20
[0213] In the encoding method or apparatus or decoding method or apparatus of Embodiment 19, the partial or complete information is one or more directly existing syntax elements and / or one or more implicitly derived parameters; the directly existing syntax elements are one or more bit strings (bit strings) in the compressed data code stream or their predetermined default values; the implicitly derived parameters are parameters derived from one or more other encoding parameters and / or coding variables and / or other syntax elements of the compressed data code stream or their predetermined default values.
[0214] Embodiment 21
[0215] In the encoding method or apparatus or decoding method or apparatus, the entire compression unit is a sequence of sequences or images; the partial or complete information indicating the corresponding option required by the encoding parameter and / or the encoding mode or decoding mode is present in the sequence parameter set or sequence header of the compressed data code stream.
[0216] Embodiment 22
[0217] In the encoding method or apparatus or decoding method or apparatus, the entire compression unit is a sequence of sequences or images; the partial or complete information indicating the corresponding option required by the encoding parameter and / or the encoding mode or decoding mode is a profile_id present in the sequence parameter set or sequence header of the compressed data code stream.
[0218] Embodiment 23
[0219] In the encoding method or apparatus or decoding method or apparatus of Embodiment 22, the profile_id indicates two options of distortion requirements of the data compression, if the profile_id is equal to a predetermined value K, the distortion requirement of the data compression is lossless compression, otherwise, the distortion requirement of the data compression is lossy compression.
[0220] Embodiment 24
[0221] In the encoding method or apparatus or decoding method or apparatus, the entire compression unit is a CTU or CU; the partial or complete information indicating the corresponding option required by the encoding parameter and / or the encoding mode or decoding mode is a flag cu_transquant_bypass_flag present in the CTU header or CU header of the compressed data code stream.
[0222] Embodiment 25
[0223] In the encoding method or apparatus or the decoding method or apparatus of Embodiment 24, the flag cu_transquant_bypass_flag indicates two options of distortion requirement of the data compression, and if cu_transquant_bypass_flag is equal to 1, the distortion requirement of the data compression is lossless compression, otherwise, the distortion requirement of the data compression is lossy compression.
Claims
1. A method of decoding and post-processing residual errors of an image, a sequence of images, video data to be used for prediction compensation, characterized in that, two sets of residual decoding and post-processing schemes are included: Scheme 1, comprising the following features: the residual decoding and post-processing includes multiplying by a predetermined constant scaling factor a or -a, Scheme 2, comprising the following features: the residual decoding and post-processing includes multiplying by a predetermined constant scaling factor a or -a or b or -b, wherein a = 1, b = 1 / 2; the operation of multiplying by 1 / 2 is right shifting by one binary digit, and the operation of multiplying by -1 / 2 is multiplying by -1 and then right shifting by one binary digit; the step of decoding an integral compression unit includes at least the steps of: parsing the compressed data bitstream to obtain the prediction mode used by the integral compression unit, and selecting a residual decoding and post-processing scheme according to at least the following rules: if the integral compression unit uses intra prediction, then, the residual decoding and post-processing scheme is the scheme 2, otherwise, the residual decoding and post-processing scheme is the scheme 1; performing residual decoding and post-processing on the integral compression unit using at least the selected residual decoding and post-processing scheme.
2. The decoding and post-processing method according to claim 1, characterized in that: the integral compression unit is a decoded region of an image, a sequence of images, video, including the following cases: macroblock, largest coding unit LCU, coding tree unit CTU, coding unit CU, sub-region of CU, sub-coding unit SubCU, prediction block, prediction unit PU, sub-region of PU, sub-prediction unit SubPU, transform block, transform unit TU, sub-region of TU, sub-transform unit SubTU.
3. The decoding and post-processing method according to claim 1, characterized in that: information indicating the sign of the predetermined constant scaling factor is present at least one of the following places in the compressed data bitstream: 1) picture parameter set; 2) sequence header; 3) slice header; 4) picture header; 5) CTU header; 6) CU header; 7) coded block header.
4. The decoding and post-processing method according to claim 3, characterized in that: the information is one or more directly present syntax elements and / or one or more implicitly derived parameters; the directly present syntax elements are one or more bit strings in the compressed data bitstream or their predetermined default values; the implicitly derived parameters are parameters derived from one or more other coding parameters and / or coding variables and / or other syntax elements of the compressed data bitstream or their predetermined default values.
5. The decoding and post-processing method according to claim 3, characterized in that: the information is the following syntax element in the picture parameter set or picture header: residual scaling factor sign flag residual_multiplier_sign_flag. The semantic description is: binary variable; value '0' means the sign of the predetermined constant scaling factor of the residual decoding post-processing is positive; value '1' means the sign of the predetermined constant scaling factor of the residual decoding post-processing is negative; if the syntax element does not exist in the bitstream, it is equivalent to the value of the syntax element being the default value '0', i.e. the sign of the predetermined constant scaling factor of the residual decoding post-processing is positive.
6. The decoding post-processing method according to claim 1, characterized in that: The information indicating the absolute value of the predetermined constant scaling factor of multiplication exists at least one of the following places in the compressed data bitstream: 1) picture parameter set; 2) sequence header; 3) slice header; 4) picture header; 5) CTU header; 6) CU header; 7) coded block header.
7. The decoding post-processing method according to claim 6, characterized in that: The information is a parameter ResidualMultiplierMode derived from other coding parameters and / or coding variables and / or other syntax elements of the compressed data bitstream: when ResidualMultiplierMode takes the value 2, the absolute value of the predetermined constant scaling factor of the residual decoding post-processing is 1; when ResidualMultiplierMode takes the value 1 and 3, the absolute value of the predetermined constant scaling factor of the residual decoding post-processing is 1 / 2; when ResidualMultiplierMode takes the value 0, no residual decoding post-processing is performed on the residual, i.e. it is equivalent to the value of the predetermined constant scaling factor of the residual decoding post-processing being 1.
8. The decoding post-processing method according to claim 1, characterized in that: The partial or complete information required for the prediction mode and / or the residual decoding post-processing scheme exists at least one of the following places in the compressed data bitstream: 1) sequence parameter set; 2) picture parameter set; 3) sequence header; 4) slice header; 5) picture header; 6) CTU header; 7) CU header; 8) coded block header.
9. The decoding post-processing method according to claim 8, characterized in that: The partial or complete information is one or more directly existing syntax elements and / or one or more implicitly derived parameters; the directly existing syntax elements are one or more bit strings in the compressed data bitstream or their predetermined default values; the implicitly derived parameters are parameters derived from one or more other coding parameters and / or decoding variables and / or other syntax elements of the compressed data bitstream or their predetermined default values.
10. An apparatus for post-decoding processing of a residual to be used for prediction compensation of an image, a sequence of images, video data, characterized in that, A module for implementing a method for decoding post-processing the residual to be used for prediction compensation of an image, a sequence of images, video data according to any one of claims 1-9.
Citation Information
Patent Citations
Method and apparatus for adaptively selecting context model for entropy coding
CN1917647A
Color residual prediction for video coding
US20150124865A1