[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2022193386A1 - Procédé et dispositif de codage de coefficient, procédé et dispositif de décodage de coefficient, terminal et support de stockage - Google Patents

Procédé et dispositif de codage de coefficient, procédé et dispositif de décodage de coefficient, terminal et support de stockage Download PDF

Info

Publication number
WO2022193386A1
WO2022193386A1 PCT/CN2021/086671 CN2021086671W WO2022193386A1 WO 2022193386 A1 WO2022193386 A1 WO 2022193386A1 CN 2021086671 W CN2021086671 W CN 2021086671W WO 2022193386 A1 WO2022193386 A1 WO 2022193386A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
flag
coefficient
absolute value
decoded
Prior art date
Application number
PCT/CN2021/086671
Other languages
English (en)
Chinese (zh)
Inventor
黄航
王凡
谢志煌
袁锜超
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to CN202180095621.0A priority Critical patent/CN116982314A/zh
Publication of WO2022193386A1 publication Critical patent/WO2022193386A1/fr

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the embodiments of the present disclosure relate to, but are not limited to, video encoding and decoding technologies, and in particular, relate to a coefficient encoding and decoding method, encoding and decoding device, terminal, and storage medium.
  • Digital video compression technology mainly compresses huge digital video and video data to facilitate transmission and storage.
  • Digital video compression standards can save a lot of video data, it is still necessary to pursue better digital video compression technology to reduce digital video data. Bandwidth and traffic pressure for video transmission.
  • An embodiment of the present disclosure provides a coefficient decoding method, including:
  • the syntax elements include: non-zero flags, M absolute values greater than X flags, residual value flags and symbol flags; M and X are positive integers, and each absolute value of the M absolute values greater than X flags is greater than X flags The value of X is different;
  • the decoding of the syntax elements of the coefficients to be decoded includes: parsing the syntax elements of at least some of the coefficients to be decoded in the current coding block except for the residual value flag and the symbol flag, and analyzing the syntax elements of the at least part of the coefficients to be decoded according to the parsing result. decoding the residual value flags; and decoding the sign flags of the at least part of the coefficients to be decoded.
  • An embodiment of the present disclosure provides a coefficient encoding method, including:
  • Generate a coefficient block based on the residual block scan the coefficients to be coded in the coefficient block, generate syntax elements corresponding to the coefficients to be coded, and encode the syntax elements of the coefficients to be coded;
  • the syntax elements include: non-zero flags, M absolute values greater than X flags, residual value flags and symbol flags; M and X are positive integers, and each absolute value of the M absolute values greater than X flags is greater than X flags The value of X is different;
  • the coding of the syntax elements of the coefficients to be coded includes: coding other syntax elements except the residual value flag and the symbol flag of at least some of the coefficients to be coded in the coefficient block, and coding the at least some of the coefficients to be coded according to the coding result encoding the remaining value flags of the coefficients; and encoding the sign flags of the at least coefficients to be encoded.
  • An embodiment of the present disclosure provides a decoder, comprising: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the above-mentioned coefficient decoding method when executing the computer program .
  • An embodiment of the present disclosure provides an encoder, including: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the above-mentioned coefficient encoding method when executing the computer program .
  • An embodiment of the present disclosure provides a terminal, including: a video decoder, where the video decoder includes the above-mentioned decoder and/or the above-mentioned encoder.
  • An embodiment of the present disclosure provides an encoding and decoding system, including the above-mentioned decoder, and/or the above-mentioned encoder.
  • Embodiments of the present disclosure provide a non-transitory computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, wherein, when the computer program is executed by a processor, the above-mentioned coefficient decoding method is implemented, or the The above-mentioned coefficient coding method.
  • Fig. 1 is a kind of frame schematic diagram of video compression coding
  • Fig. 2 is a kind of schematic diagram of reverse zig-zag scanning
  • FIG. 3 is a schematic diagram of a coefficient absolute value encoding method
  • FIG. 4 is a schematic flowchart of a coefficient decoding method according to an embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of a coefficient encoding method according to an embodiment of the present disclosure
  • FIG. 6 is a schematic flowchart of a coefficient decoding method according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic flowchart of a coefficient encoding method according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic flowchart of a coefficient decoding method according to an exemplary embodiment of the present disclosure.
  • FIG. 9 is a schematic flowchart of a coefficient encoding method according to an exemplary embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a decoding device according to an embodiment of the present disclosure.
  • FIG. 11 is a structural block diagram of a video decoder in an exemplary embodiment of the disclosure.
  • FIG. 12 is a schematic structural diagram of an encoding device according to an exemplary embodiment of the disclosure.
  • FIG. 13 is a structural block diagram of a video encoder in an exemplary embodiment of the disclosure.
  • Video codec standards include H.264/Advanced Video Coding (Advanced Video Coding, AVC), H.265/High Efficiency Video Coding (High Efficiency Video Coding, HEVC), H.266/Versatile Video Coding (Multifunctional Video Coding, VVC) ) and extensions of these standards, MPEG (Moving Picture Experts Group, Moving Picture Experts Group), AOM (Alliance for Open Media) or any other custom standards, which reduce data transmission and The amount of data stored to achieve more efficient video codec and transmission storage.
  • AVC Advanced Video Coding
  • H.265/High Efficiency Video Coding High Efficiency Video Coding
  • H.266/Versatile Video Coding Multifunctional Video Coding
  • MPEG Moving Picture Experts Group, Moving Picture Experts Group
  • AOM Alliance for Open Media
  • Video compression includes intra-frame prediction (spatial domain) and/or inter-frame prediction (temporal domain) for reducing or removing redundancy within the video, transforming, quantizing, and inverse quantizing and inverse transforming residual information, and improving the quality of subjective and objective reconstruction.
  • Multiple modules such as path filtering and entropy coding.
  • Figure 1 is a schematic diagram of a video compression coding framework, as shown in Figure 1, including: intra-frame prediction, motion estimation/compensation, transform/quantization, inverse transform/inverse quantization, loop filtering, entropy coding and other modules.
  • Video compression standards are block-based compression techniques. For example, a video slice, a frame of pictures or a series of pictures can be divided into coding tree units CTU (Coding Tree Unit), and then the coding tree unit CTU can be divided into image blocks with CU (Coding Unit) as the basic unit.
  • Intra-frame prediction refers to predicting by using the surrounding pixels of the block as a reference
  • inter-frame prediction refers to referencing adjacent block information in space and reference information in other frames for prediction.
  • the prediction block The residual information represents the pixel difference between the original CU to be encoded and the predicted CU, also known as the residual block.
  • the residual block can be transformed, quantized and entropy encoded into a code stream to carry out
  • the residual information can be transformed from the pixel domain to the transform domain, resulting in residual coefficients, which can then quantize the two-dimensional array into a one-dimensional vector in coefficient scan order,
  • the transformed and quantized coefficients can be applied to entropy coding to achieve more compression.
  • the coding unit CU (Coding Unit) is a basic unit for performing various types of coding operations or decoding operations in the video coding and decoding process, such as CU-based prediction, transformation, entropy coding and other operations.
  • CU refers to a two-dimensional sampling point array, which can be a square array or a rectangular array.
  • a 4x8 CU can be regarded as a 4x8 square sampling point array consisting of a total of 32 sampling points.
  • a CU may also be referred to as a tile.
  • the current coding unit CU refers to the coding unit currently being processed, and may also be referred to as the current block.
  • the current CU refers to the CU currently being encoded; in decoding, the current CU refers to the CU currently being decoded.
  • Reference CU refers to a CU that provides a reference signal for the current CU, and may also be referred to as a reference block. Wherein, the pixels of the reference CU refer to the pixels included in the reference CU.
  • Prediction CU refers to the CU that provides prediction for the current CU, and may also be called a prediction block (PU, prediction unit). Each CU may contain one or more PUs.
  • a PU may include pixel data in a spatial domain (which may be referred to as a pixel domain).
  • Residual block refers to the residual image block formed by subtracting the prediction block from the current block to be encoded after the prediction block of the current block is generated by inter-frame prediction and/or intra-frame prediction, which may also be called residual poor data.
  • the transform unit TU refers to a block that presents residual (Residual) or coefficients (Transform Coefficients) obtained by transforming residual data, and may also be called a transform block.
  • Each CU may contain one or more TUs.
  • transforms such as discrete cosine transforms, integer transforms, wavelet transforms, or similar transforms may be used to transform residual data into coefficients, ie, transform the residual data from the pixel domain to the transform domain.
  • the coefficient block includes transforming the residual block to obtain a transform block containing transform coefficients, or not transforming the residual block, including the residual block containing residual data (residual signal).
  • encoding includes encoding at the encoder side and decoding at the decoder side.
  • the coefficients include coefficients of a transform block obtained by transforming the residual block, or the coefficients of the residual block, and entropy encoding the coefficients includes entropy encoding after quantizing the coefficients of the transform block, or, if not Applying a transform to the residual data includes quantizing and entropy encoding the coefficients of the residual block.
  • the untransformed residual signal and the transformed residual signal may also be collectively referred to as coefficients.
  • the general coefficients need to be quantized.
  • the quantized coefficients can also become levels.
  • Quantization is often used to reduce the dynamic range of the coefficients, thereby expressing the video with fewer codewords.
  • the quantized value is often referred to as a level.
  • the quantization operation usually divides the coefficient by the quantization step size, which is determined by the quantization factor passed in the code stream. Inverse quantization is done by multiplying the level by the quantization step size. For a block of NxM size, coefficient quantization can be done independently. This technique is widely used in many international video compression standards, such as H.264, HEVC, etc. In the international video compression standard, the quantization operation can use the correlation between coefficients, and use the characteristics of the quantized coefficients to select a better quantization method, so as to achieve the purpose of optimizing the quantization.
  • the non-binarized level is further binarized to obtain bins, and the binarized level is subjected to a model-based binarization arithmetic encoder to generate the final code stream.
  • CABAC Context-Based Adaptive Binary Arithmetic Coding
  • CABAC is a typical entropy coding technique, which is supported in some coding standards.
  • CABAC may involve several stages, including binarization, context model selection, and binary arithmetic coding, among others.
  • binarization non-binary symbols can be mapped to binary sequences.
  • context modeling model probability distributions can be assigned to the elements being encoded. Then, in a subsequent binary arithmetic encoding stage, encoding may be performed using the assigned probability distribution model to generate bit sequences that form encoded representations of elements encoded according to the assigned model probability distribution.
  • encoding data symbols using CABAC includes one or more of the following steps:
  • Binarization If the symbol to be encoded is not a binary value, it is mapped to a series of so-called “binary numbers”. Each binary number can have a value of "0" or "1”, commonly referred to as a bin.
  • Context modeling determination of context index:
  • the data to be encoded has context dependencies, and the context information provided by the encoded data is used to select an appropriate probability model for the data to be encoded, which is context modeling.
  • the basic probability model can adapt to the statistical characteristics that change with the video image, reduce the redundancy between data, and reduce the computational cost.
  • Each different character indexes its own probability lookup table according to the corresponding context model. That is, after receiving a character, first find the serial number CtxIdx of the context model corresponding to the character, and then find its corresponding probability lookup table according to CtxIdx.
  • Binary number coding The probability estimation method of the probability model found by context modeling constitutes an adaptive binary arithmetic coder.
  • the arithmetic encoder needs to take as input the probability of the value of the bin (ie the probability that the value of the binary number is equal to "0” and the probability that the value of the binary number is equal to "1").
  • the principle is the same as the general arithmetic coding, the difference is that the binary arithmetic coding sequence has only two symbols "0" and "1", and the probabilities involved are only P(0) and P(1).
  • the bypass mode is selected during encoding and decoding, which can avoid context modeling and improve the speed of encoding and decoding.
  • the coefficients to be coded can be limited within a range by the SRCC technology.
  • the coefficient scanning method is to start from the lower right corner of the range, and scan in the reverse zig-zag order until the last DC coefficient in the upper left corner ends.
  • the following possible syntax elements may be encoded into the code stream to indicate the level, including sig_flag to indicate whether the level is non-zero, coeff_abs_level_greater1_flag to indicate whether the absolute value of the level is greater than 1, and coeff_abs_level_greater2_flag to indicate the absolute level Whether the value is greater than 2, the value corresponding to coeff_abs_level_remaining is the absolute value of the level minus 3, and coeff_sign indicates the positive or negative of the non-zero coefficient.
  • the residual value of the absolute value of the coefficient and the sign flag bit can be coded using the bypass coding mode, and the other flags can be coded using the context-based adaptive binary arithmetic coding mode.
  • SCC sequences and non-SCC sequences can use the same SRCC coefficient coding scheme, considering that for SCC sequences, in scenarios where transform skipping can be used, the absolute value of the coefficients of the coding blocks in transform skip mode 1 and 2 are relatively less concentrated.
  • An improved SRCC coefficient coding method in the transform skip usage scenario can be proposed.
  • For the coefficient encoding method in the transform skip usage scenario when the transform skip mode related image header is turned on, Add two flags coeff_abs_level_greater4_flag(gt4) and coeff_abs_level_greater8_flag(gt8).
  • the context model of these two flags is determined in the same way as gt1 and gt2, and when the absolute value of the coefficient is greater than 2 and less than or equal to 4, rem uses a one-bit fixed-length encoding. When the absolute value of the coefficient is greater than 4 and less than or equal to 8, the two-bit fixed-length encoding is used. When the absolute value of the coefficient is greater than 8, the original scheme remains unchanged.
  • the bypass encoding mode is used to parse the code stream in the form of a fixed-length code, and the absolute value of the coefficient is reconstructed to be 3 or 4. If gt4 is 1, continue to parse gt8; if gt8 is 0, use bypass encoding mode to parse the code stream in the form of a two-bit fixed-length code, and reconstruct the absolute value of the coefficient to 5, 6, 7, or 8. If gt8 is 1, the absolute value of the current coefficient is greater than 8, and the next coefficient is scanned.
  • the coefficient flag bit After the coefficient flag bit is parsed, enter the bypass mode to analyze the residual value of the absolute value of the coefficient. For the coefficient whose absolute value of the coefficient is greater than 8, the code stream is analyzed according to the 0-order exponential Golomb code, and the complete absolute value of the coefficient is reconstructed.
  • the transform coefficient entropy coding method still has a lot of room for improvement.
  • An embodiment of the present disclosure provides a coefficient decoding method, as shown in FIG. 4 , including:
  • Step 401 parse the obtained code stream, and decode the syntax element of the coefficient to be decoded
  • Step 402 determining the value of the coefficient to be decoded according to the syntax element obtained by decoding
  • the syntax elements include: a non-zero flag, an absolute value greater than 1 flag, an absolute value greater than 2 flag, an absolute value greater than 4 flag, an absolute value greater than 8 flag, a residual value flag and a symbol flag;
  • the absolute value of the coefficient to be decoded The value is the sum value obtained by adding the basic value of the coefficient to be decoded to the encoded value of the residual value flag;
  • the value of the coefficient to be decoded is the absolute value of the coefficient to be decoded and the symbol sign indicating the positive and negative The corresponding value;
  • the base value corresponds to the encoded value of at least one of the absolute values greater than 1 mark, the absolute value greater than 2 marks, the absolute value greater than 4 marks, and the absolute value greater than 8 marks;
  • the decoding of the residual value flag of the coefficient to be decoded further includes: determining a decoding mode of the residual value flag according to the basic value, and analyzing the residual value flag according to the determined decoding mode.
  • the method further includes:
  • the corresponding basic value is 2, and the corresponding decoding method is to skip the parsing of the remaining value flag;
  • the corresponding basic value is 3
  • the corresponding decoding method is to parse the encoding value of the remaining value mark according to a fixed-length code
  • the corresponding basic value is 5
  • the corresponding decoding method is to parse the encoding value of the remaining value mark according to the two-bit fixed-length code
  • the corresponding decoding method is to parse the coding value of the residual value flag according to the 0-order or 1-order exponential Golomb code.
  • the method further includes:
  • Parse the absolute value of the coefficient is greater than 1 flag, when the absolute value is greater than 1 flag is 0, skip parsing the absolute value of the coefficient is greater than 2 flag, the absolute value is greater than 4 flag, the absolute value is greater than 8 flag;
  • the flag When the absolute value is greater than 1, the flag is 1, and the absolute value of the coefficient is greater than 2; when the absolute value is greater than 2, the flag is 0, skip the analysis of the coefficient whose absolute value is greater than 4, and the absolute value is greater than 8; When the value is greater than 2, the flag is 1, and the absolute value of the analytical coefficient is greater than 4;
  • the coded value of the residual value flag is parsed according to the 0-order or 1-order exponential Golomb code.
  • the method further includes:
  • the basic value of the coefficient to be decoded is added to the encoded value of the residual value mark, and the obtained sum value is used as the absolute value of the coefficient to be decoded;
  • the encoding value of the residual value flag when the basic value is 1, the encoding value of the residual value flag is set to 0, or the absolute value of the coefficient to be decoded is determined to be 1; when the basic value is 2, the residual value flag is set to 0. The encoding value is set to 0, or the absolute value of the coefficient to be decoded is determined to be 2;
  • the method further includes:
  • An embodiment of the present disclosure provides a coefficient encoding method, as shown in FIG. 5 , including:
  • Step 501 generating a coefficient block based on the residual block, scanning the coefficients in the coefficient block, and encoding the syntax elements of the coefficients to be encoded;
  • Step 502 write the codeword generated by encoding into the code stream
  • the syntax elements include: non-zero flag, absolute value greater than 1 flag, absolute value greater than 2 flag, absolute value greater than 4 flag, absolute value greater than 8 flag, residual value flag and symbol flag;
  • the value of the coefficient to be encoded is the value corresponding to the absolute value of the coefficient to be encoded and the sign indicating positive and negative;
  • the encoding of the residual value flag of the coefficient to be decoded further includes: determining an encoding mode of the residual value flag according to the basic value, encoding the residual value flag according to the determined encoding mode, and the encoding value of the residual value flag A value obtained by subtracting the base value from the absolute value of the coefficient to be decoded.
  • the corresponding basic value is 1, and the corresponding coding mode is to skip the coding of the remaining value flag;
  • the corresponding basic value is 3
  • the corresponding coding mode is to encode the coding value of the remaining value mark according to a fixed-length code
  • the corresponding basic value is 5
  • the corresponding coding mode is the coding value of the remaining value mark according to the two-bit fixed-length code coding
  • the corresponding basic value is 9
  • the corresponding coding mode is to encode the coding value of the residual value flag according to the 0-order or 1-order exponential Golomb code.
  • the method further includes:
  • the to-be-coded coefficients whose non-zero flags are coded as 1 form the first to-be-coded coefficient group;
  • the absolute value of the coefficient When the absolute value of the coefficient is greater than 1, the absolute value of the coefficient is greater than 1. When the absolute value of the coefficient is not greater than 1, the absolute value of the coefficient is greater than 1. When the absolute value of the coefficient is greater than 1, the absolute value of the coefficient is greater than 1. When the absolute value is greater than 1, the code is 0, skip the encoding of the absolute value greater than 2, the absolute value greater than 4, and the absolute value greater than 8;
  • the code When the absolute value of the coefficient is greater than 1, the code is 1, and the absolute value of the coefficient is greater than 2. When the absolute value of the coefficient is not greater than 2, the absolute value of the coefficient is greater than 2. When the absolute value is greater than 2, the absolute value of the coefficient is greater than 2. Encode the absolute value greater than 2 flag as 1; when the absolute value greater than 2 flag is encoded as 0, skip the encoding of the absolute value greater than 4 flag and the absolute value greater than 8 flag;
  • the code is 1, and the absolute value of the coefficient is greater than 4.
  • the absolute value of the coefficient is not greater than 4, the absolute value of the coefficient is greater than 4.
  • the absolute value of the coefficient is greater than 4.
  • encode the absolute value greater than 4 as 1; when the absolute value greater than 4 is encoded as 0, skip the encoding of the absolute value greater than 8;
  • the code is 1, and the absolute value of the coefficient is greater than 8.
  • the absolute value of the coefficient is not greater than 8, the absolute value of the coefficient is greater than 8.
  • the absolute value of the coefficient is greater than 8.
  • the coded value of the remaining value mark is coded according to a fixed-length code
  • the coded value of the remaining value mark is coded according to the two-bit fixed-length code
  • the coded value of the residual value flag is coded according to the 0th-order or 1st-order exponential Golomb code.
  • the method when encoding the residual value flag, the method further comprises:
  • the absolute value of the coefficient to be decoded is subtracted from the base value of the coefficient to be decoded, and the difference obtained is used as the encoded value of the residual value flag.
  • the method further includes:
  • the encoding of the absolute value greater than 1 flag, the absolute value greater than 2 flag, the absolute value greater than 4 flag, the absolute value greater than 8 flag, the residual value flag and the sign flag is skipped.
  • An embodiment of the present disclosure provides a coefficient decoding method, as shown in FIG. 6 , including:
  • Step 601 parse the obtained code stream, and decode the syntax element of the coefficient to be decoded
  • Step 602 determining the value of the coefficient to be decoded according to the syntax element obtained by decoding
  • the syntax elements include: a non-zero flag, M absolute values greater than X flags, a residual value flag and a symbol flag;
  • the absolute value of the coefficient to be decoded is a base value of the coefficient to be decoded plus a residual value flag
  • the encoded value of the obtained sum value;
  • the value of the coefficient to be decoded is the value corresponding to the absolute value of the coefficient to be decoded and the sign indicating positive and negative;
  • the basic value is different from the absolute value of the M
  • At least one absolute value of the value greater than the X mark corresponds to the encoded value greater than the X mark, and each of the M absolute values greater than the X mark is greater than the X value in the X mark is different;
  • the decoding of the residual value flag of the coefficient to be decoded further includes: determining a decoding mode of the residual value flag according to the basic value, and analyzing the residual value flag according to the determined decoding mode.
  • the method further includes:
  • the residual value flag of the coefficient is parsed according to the decoding method preset for the base value of the coefficient.
  • the method further includes:
  • the base value corresponding to the encoding value whose absolute value is greater than the X flag, and the decoding method corresponding to the base value are preset.
  • M 4
  • the 4 different absolute values greater than X flags include: an absolute value greater than 1 flag, an absolute value greater than 2 flags, an absolute value greater than 4 flags, and an absolute value greater than 8 flags;
  • the corresponding basic value is 2, and the corresponding decoding method is to skip the parsing of the remaining value flag;
  • the corresponding basic value is 3
  • the corresponding decoding method is to parse the coded value of the remaining value flag according to a fixed-length code
  • the corresponding basic value is 5, and the corresponding decoding method is to parse the coded value of the remaining value mark according to the two-bit fixed-length code;
  • the corresponding basic value is 9
  • the corresponding decoding method is to parse the coded value of the residual value flag according to the 0-order or 1-order exponential Golomb code.
  • the method further includes:
  • the basic value of the coefficient to be decoded is added to the encoded value of the residual value mark, and the obtained sum value is used as the absolute value of the coefficient to be decoded;
  • the encoding value of the residual value flag when the basic value is 1, the encoding value of the residual value flag is set to 0, or the absolute value of the coefficient to be decoded is determined to be 1; when the basic value is 2, the residual value flag is set to 0. The encoding value is set to 0, or the absolute value of the coefficient to be decoded is determined to be 2;
  • the method further includes:
  • the parsing of the M absolute values greater than X flag, the residual value flag and the symbol flag is skipped, and the value of the to-be-decoded coefficient is determined to be 0.
  • An embodiment of the present disclosure provides a coefficient encoding method, as shown in FIG. 7 , including:
  • Step 701 generating a coefficient block based on the residual block, scanning the coefficients in the coefficient block, and encoding the syntax element of the coefficient to be encoded;
  • Step 702 write the codeword generated by encoding into the code stream
  • the syntax elements include: non-zero flags, M absolute values greater than X flags, remaining value flags, and sign flags;
  • the value of the coefficient to be encoded is the sum of the absolute value of the coefficient to be encoded and indicates positive and negative The value corresponding to the symbol mark;
  • the base value corresponds to the encoded value of the M different absolute values greater than the X mark, at least one absolute value is greater than the X mark, M, X are positive integers, and M absolute values are greater than the X mark in the Each absolute value greater than the X value in the X flag is different;
  • the encoding of the residual value flag of the coefficient to be decoded further includes: determining an encoding mode of the residual value flag according to the basic value, encoding the residual value flag according to the determined encoding mode, and the encoding value of the residual value flag A value obtained by subtracting the base value from the absolute value of the coefficient to be decoded.
  • the method further includes:
  • the to-be-coded coefficients whose non-zero flags are coded as 1 form the first to-be-coded coefficient group;
  • the M absolute values of the encoded coefficient are greater than the X mark, when the absolute value of the coefficient is Q, the absolute value of X greater than Q is greater than the X mark is encoded as 0, and the subsequent encoding of the absolute value greater than the X mark is skipped; If the absolute value of Q is greater than X, the flag is coded as 1;
  • the encoding value of the residual value flag is encoded according to the encoding mode corresponding to the basic value.
  • the method further includes:
  • the base value corresponding to the encoding value whose absolute value is greater than the X mark, and the encoding mode corresponding to the base value are preset.
  • M 4
  • the 4 different absolute values greater than X flags include: an absolute value greater than 1 flag, an absolute value greater than 2 flags, an absolute value greater than 4 flags, and an absolute value greater than 8 flags;
  • the corresponding basic value is 3
  • the corresponding coding mode is to encode the coded value of the remaining value mark according to a fixed-length code
  • the corresponding base value is 5
  • the corresponding coding mode is the coded value of the residual value mark according to the two-bit fixed-length code coding
  • the corresponding basic value is 9
  • the corresponding coding mode is to encode the coding value of the residual value flag according to the 0-order or 1-order exponential Golomb code.
  • the method further includes: subtracting the absolute value of the coefficient to be decoded from the base value of the coefficient to be decoded, and the obtained difference is used as the The encoded value of the remaining value flag.
  • the method further includes:
  • the syntax element of the coefficient includes four parts: a non-zero flag sig, an absolute value greater than X flag (gtx), a residual value flag rem, and a sign flag coeff_sign.
  • the non-zero flag sig is used to indicate whether the coefficient is a non-zero coefficient.
  • the absolute value is greater than the X flag gtx, which is used to indicate whether the absolute value of the coefficient is greater than X.
  • the absolute value greater than X flag gtx may be one or more, and when there are more than one, each absolute value greater than X value of X in the flag is different.
  • the coefficient absolute value greater than X flag gtx includes: absolute value greater than 1 flag (gt1), absolute value greater than 2 flag (gt2), absolute value greater than 4 flag (gt4), absolute value greater than 8 flag (gt8).
  • the coefficient absolute value greater than X flag gtx includes an absolute value greater than 1 flag (gt1), an absolute value greater than 2 flag (gt2), an absolute value greater than 4 flag (gt4).
  • the coefficient absolute value greater than X flag gtx includes an absolute value greater than 1 flag (gt1), an absolute value greater than 2 flag (gt2), an absolute value greater than 8 flag (gt8).
  • the coefficient absolute value greater than X flag gtx includes: absolute value greater than 1 flag (gt1), absolute value greater than 2 flag (gt2), absolute value greater than 3 flag (gt3), absolute value greater than 7 flag (gt7) .
  • the coefficient absolute value greater than X flag gtx includes: absolute value greater than 1 flag (gt1), absolute value greater than 2 flag (gt2), absolute value greater than 3 flag (gt3), absolute value greater than 7 flag (gt7) .
  • the coefficient absolute value greater than X flag gtx includes an absolute value greater than 1 flag (gt1), an absolute value greater than 2 flag (gt2), an absolute value greater than 7 flag (gt7).
  • gt1 an absolute value greater than 1 flag
  • gt2 an absolute value greater than 2 flag
  • gt7 an absolute value greater than 7 flag
  • the remaining value flag rem completes the encoding of the remaining value flag according to the setting method.
  • the residual value flag can be encoded by selecting a fixed-length encoding method or an exponential Golomb code method according to a value other than gt1 and gt2 whose absolute value is greater than the X flag.
  • a fixed-length encoding method or an exponential Golomb code method can be used to encode the remaining value flag.
  • the coded value of the residual value flag rem may be a value obtained by subtracting the base value from the absolute value of the coefficient.
  • a coefficient absolute value reconstruction base value base_level (referred to as a base value in this embodiment) corresponding to an encoded value whose absolute value is greater than the X flag may be preset before encoding.
  • the sign flag coeff_sign is used to indicate the positive or negative of the coefficient. For example, when the value of the coefficient is positive, the sign flag coeff_sign is encoded as 0, and when the value of the coefficient is negative, the sign flag coeff_sign is encoded as 1.
  • the syntax elements of the coefficients include a non-zero flag sig, an absolute value greater than 1 flag gt1, an absolute value greater than 2 flag gt2, an absolute value greater than 4 flag gt4, an absolute value greater than 8 flag gt8, a residual value flag rem, sign sign coeff_sign.
  • This exemplary embodiment provides a coefficient decoding method, as shown in FIG. 8 , including:
  • Step 801 parse the obtained code stream, and determine the position of the coefficient to be decoded according to the preset coefficient scanning order;
  • the coefficient decoding method may be performed by a decoding end or a decoder.
  • the method further includes: acquiring code stream information, parsing the current coding block, and analyzing the position of each coefficient in the current coding block according to a preset coefficient scanning order; Decoding coefficients. For example, if the preset coefficient scanning order is the zigzag scanning order, the decoded position of each coefficient in the current coding block is determined according to the zigzag scanning order, and the coefficients to be decoded are decoded in sequence according to the positions.
  • Step 802 parse the non-zero flags of all coefficients in the coefficient block to be decoded, and form the coefficients whose non-zero flags are 1 into a first to-be-decoded coefficient group;
  • the method further includes: presetting the coding value of the flag whose absolute value is greater than 1 to 0, the corresponding basic value is 1, and the corresponding decoding method is skipping the parsing of the remaining value flag; When the coding value of the flag whose absolute value is greater than 2 is set to 0, the corresponding basic value is 2, and the corresponding decoding method is to skip the analysis of the remaining value flag; when the coding value of the flag whose absolute value is greater than 4 is preset, the coding value is 0.
  • the corresponding basic value is 3, and the corresponding decoding method is to parse the encoded value of the remaining value flag according to a fixed-length code; when the predetermined absolute value is greater than 8, the encoded value of the flag is 0, the corresponding basic value is 5 , the corresponding decoding method is to parse the encoded value of the remaining value flag according to the two-bit fixed-length code; when the encoding value of the preset absolute value greater than 8 flag is 1, the corresponding basic value is 9, and the corresponding decoding method is according to An exponential Golomb code of order 0 or 1 parses the encoded value of the residual value flag.
  • the method further includes: when the non-zero flag of the decoding coefficient resolves to 0, skipping the flags for absolute value greater than 1 flag, absolute value greater than 2 flag, absolute value greater than 4 flag, absolute value greater than 8 flag , the analysis of the residual value flag and the symbol flag, and it is determined that the value of the coefficient to be decoded is 0.
  • Step 803 according to the scanning order, for each coefficient in the first to-be-decoded coefficient group, respectively perform the following operations:
  • Step 8031 parse the absolute value of the coefficient is greater than 1 flag, when the absolute value is greater than 1, the flag is decoded as 0, skip to step 8035; when the absolute value is greater than 1, the flag is decoded as 1, execute step 8032;
  • Step 8032 analysing the absolute value of the coefficient is greater than 2, when the absolute value is greater than 2, the symbol is decoded as 0, skip to step 8035; when the absolute value is greater than 2, the symbol is decoded as 1, execute step 8033;
  • Step 8033 parse the absolute value of the coefficient is greater than 4, when the absolute value is greater than 4, the symbol is decoded as 0, skip to step 8035; when the absolute value is greater than 4, the symbol is decoded as 1, execute step 8034;
  • Step 8034 analyze the absolute value of the coefficient is greater than 8 flag, when the absolute value is greater than 8 flag decoded as 0 or 1, skip to step 8035;
  • Step 8035 judging whether the coefficient is the last coefficient in the first to-be-decoded coefficient group, if so, go to step 804, if not, go to step 8031 for the next coefficient;
  • Step 804 according to the scanning order, for each coefficient in the first to-be-decoded coefficient group, respectively perform the following operations:
  • Step 8041 when the absolute value of the coefficient is greater than 1, the flag is 0, skip the analysis of the remaining value flag; when the absolute value of the coefficient is greater than 2, the flag is 0, skip the analysis of the remaining value flag; when the coefficient When the absolute value of the coefficient is greater than 4 and the flag is 0, the coded value of the residual value flag is parsed according to a one-bit fixed-length code; when the absolute value of the coefficient is greater than 8 and the flag is 0, the residual value is analyzed according to the two-digit fixed-length code.
  • Step 8042 adding the encoded value of the residual value flag to the basic value of the coefficient, and the obtained sum value is used as the absolute value of the coefficient to be decoded;
  • the encoding value of the residual value flag when the basic value is 1, the encoding value of the residual value flag is set to 0, or the absolute value of the coefficient to be decoded is determined to be 1; when the basic value is 2, the residual value flag is set to 0.
  • the encoding value is set to 0, or the absolute value of the coefficient to be decoded is determined to be 2; for example, when the absolute value of the coefficient is greater than 1 and the flag is 0, the encoding value rem of the residual value flag is set to 0 in advance,
  • the absolute value of the coefficient when the absolute value of the coefficient is greater than 1, the flag is 0, the absolute value of the coefficient is directly
  • Step 8043 determine whether the coefficient is the last coefficient in the first to-be-decoded coefficient group, if yes, jump to the next decoding operation, if not, perform step 8041 on the next coefficient.
  • the next decoding operation includes operations such as decoding or inverse quantization and inverse transformation of the next unit to be decoded.
  • the method further includes: parsing the sign flag, when the sign flag is 0, the value of the coefficient to be decoded is positive, and when the sign flag is 1, the value of the coefficient to be decoded is negative.
  • the syntax elements of the coefficients include a non-zero flag sig, an absolute value greater than 1 flag gt1, an absolute value greater than 2 flag gt2, an absolute value greater than 4 flag gt4, an absolute value greater than 8 flag gt8, a residual value flag rem, sign sign coeff_sign.
  • This exemplary embodiment provides a coefficient encoding method, as shown in FIG. 9 , including:
  • Step 901 scan the coefficient block according to a preset scanning order
  • the method further includes: the current coding block is subjected to a prediction part, or by inter-frame prediction, or by means of intra-frame prediction, etc., predicting the current block to obtain the current prediction block; taking the coordinates of the original image and the current prediction block, etc.
  • the image block at the corresponding position is compared with the current prediction block to obtain the residual block of the current coding unit; then the residual block is two-dimensionally transformed or not transformed, and the transformed block or non-transformed coefficients containing the transformed coefficients can be obtained.
  • block collectively referred to herein as a coefficient block; the coefficient block is then quantized.
  • Step 902 according to the scanning order, traverse all coefficients in the coefficient block, encode the non-zero flags of zero coefficients to be encoded as 0, and encode the non-zero flags of non-zero coefficients to be encoded as 1;
  • the method further includes:
  • the encoding of the absolute value greater than 1 flag, the absolute value greater than 2 flag, the absolute value greater than 4 flag, the absolute value greater than 8 flag, the residual value flag and the sign flag is skipped.
  • the method further includes: when the coding value of the flag whose absolute value is greater than 1 is preset as 0, the corresponding basic value is 1, and the corresponding coding mode is skipping the parsing of the remaining value flag; When the coding value of the flag whose absolute value is greater than 2 is set to 0, the corresponding basic value is 2, and the corresponding coding method is to skip the parsing of the remaining value flag; when the coding value of the flag whose absolute value is greater than 4 is preset, the coding value is 0.
  • the corresponding basic value is 3, and the corresponding encoding method is to parse the encoding value of the remaining value flag according to a fixed-length code; when the predetermined absolute value is greater than 8, the encoding value of the flag is 0, the corresponding basic value is 5 , the corresponding encoding method is to parse the encoding value of the remaining value mark according to the two-bit fixed-length code; when the encoding value of the preset absolute value greater than 8 marks is 1, the corresponding basic value is 9, and the corresponding encoding method is according to An exponential Golomb code of order 0 or 1 parses the encoded value of the residual value flag.
  • Step 903 the to-be-encoded coefficients whose non-zero flags are encoded as 1 are formed into a first to-be-encoded coefficient group;
  • Step 904 according to the scanning order, for each coefficient in the first to-be-coded coefficient group, respectively perform the following operations:
  • Step 9041 encode the absolute value of the coefficient greater than 1 flag, when the absolute value of the coefficient is not greater than 1, encode the absolute value greater than 1 flag as 0, when the absolute value of the coefficient is greater than 1, encode the absolute value greater than 1 flag as 1; when the absolute value is greater than 1 and the flag is encoded as 0, skip the encoding of the absolute value greater than 2, the absolute value greater than 4, and the absolute value greater than 8, and skip to step 9045;
  • Step 9042 when the absolute value of the coefficient is greater than 1, the flag is encoded as 1, and the absolute value of the coefficient is encoded as greater than 2. When the absolute value of the coefficient is not greater than 2, the absolute value of the coefficient is greater than 2. The flag is encoded as 0, and when the absolute value of the coefficient is greater than When the absolute value is greater than 2, the flag is encoded as 1; when the absolute value is greater than 2, the flag is encoded as 0, skip the encoding of the absolute value greater than 4 and the absolute value greater than 8, and skip to step 9045;
  • Step 9043 when the absolute value of the coefficient is greater than 2, the flag is encoded as 1, and the absolute value of the coefficient is encoded as greater than 4.
  • the absolute value of the coefficient is not greater than 4, the absolute value of the coefficient is greater than 4.
  • the flag is encoded as 0.
  • the absolute value is greater than 4 and the flag is encoded as 1;
  • the flag is encoded as 0, skip the encoding of the absolute value greater than 8, and skip to step 9045;
  • Step 9044 when the absolute value of the coefficient is greater than 4, the flag is encoded as 1, and the absolute value of the encoded coefficient is greater than 8. When the absolute value of the coefficient is not greater than 8, the absolute value of the coefficient is greater than 8. The flag is encoded as 0, when the absolute value of the coefficient is greater than 8. When it is greater than 8, encode the absolute value greater than 8 flag as 1;
  • Step 9045 determine whether the coefficient is the last coefficient in the first to-be-coded coefficient group, if so, jump to step 905, and if not, perform step 9041 on the next coefficient;
  • Step 905 according to the scanning order, for each coefficient in the first to-be-coded coefficient group, respectively perform the following operations:
  • Step 9051 when the coding value of the absolute value greater than 1 flag is 0, skip the coding of the remaining value flag; when the coding value of the absolute value greater than 2 flag is 0, skip the coding of the remaining value flag;
  • the coding value greater than 4 marks is 0, the coding value of the residual value mark is coded according to a fixed-length code; when the coding value of the absolute value is greater than 8 marks, the residual value is coded according to two fixed-length codes
  • the absolute value of the to-be-decoded coefficient is subtracted from the basic value of the to-be-decoded coefficient, and the difference obtained is used as the encoded value of the residual value flag
  • the base value is 3
  • the coded value of the remaining value mark the absolute value of the coefficient to be decoded-3
  • the coded value is 0.
  • Step 9052 determine whether the coefficient is the last coefficient in the first to-be-encoded coefficient group, if yes, jump to the next encoding operation, if not, perform step 9051 on the next coefficient.
  • the next encoding operation includes an encoding operation for the next unit block to be encoded, or operations such as writing a code stream.
  • the method further includes: encoding a sign flag, when the value of the coefficient to be encoded is positive, when the sign flag is encoded as 0, and when the value of the coefficient to be encoded is negative, when the sign flag is encoded is 1.
  • the syntax elements of the coefficients include a non-zero flag sig, an absolute value greater than 1 flag gt1, an absolute value greater than 2 flag gt2, an absolute value greater than 4 flag gt4, an absolute value greater than 8 flag gt8, a residual value flag rem, sign sign coeff_sign.
  • different coefficient absolute values are set according to the first decoded coefficient absolute value flag bit which is 0 to reconstruct the base value base_level (which may also be a value of the base level).
  • This exemplary embodiment provides a coefficient decoding method, including:
  • the decoding end obtains the code stream information, parses the current coding block, and parses the coefficients according to the preset coefficient scanning order;
  • the decoder After the decoder determines the position of the current decoded coefficient, it starts to decode the current coefficient.
  • the method also includes:
  • Step 1 first, according to the coefficient scanning order, analyze the non-zero flag bits sig of all coefficients in the coefficient group, and form a sig_map for the coefficients whose sig is 1 (ie, non-zero coefficients);
  • Step 2 analyze the flag bits of each coefficient in the sig_map according to the coefficient scanning order
  • Step 3 the absolute value of the parsing level is greater than the flag bit gt1 of 1.
  • Step 4 if gt1 is 1, skip to step 5; otherwise, set base_level to 1, and skip to step 11;
  • Step 5 the absolute value of the parsing level is greater than the 2 flag bit gt2;
  • Step 6 if gt2 is 1, skip to step 7; otherwise, set base_level to 2, and skip to step 11;
  • Step 7 the absolute value of the parsing level is greater than the 4 flag bit gt4;
  • Step 8 if gt4 is 1, skip to step 9; otherwise, set base_level to 3, and skip to step 11;
  • Step 9 the absolute value of the parsing level is greater than the 8 flag bit gt8;
  • Step 10 if gt8 is 1, set base_level to 9, otherwise, set base_level to 5;
  • Step 11 if all the coefficients are scanned, go to step 12, if not all scanned, go to step 2;
  • Step 12 according to the coefficient scanning order, analyze the remaining value rem of each coefficient in the sig_map
  • Step 13 if the base_level of the current coefficient is equal to 9, parse the value of rem according to the 0-order exponential Golomb code; if the base_level of the current coefficient is equal to 5, parse the value of rem according to the two-digit fixed-length code; if the base_level of the current coefficient is equal to 3, according to A fixed-length code parses the value of rem; if it is not satisfied, the value of rem is 0;
  • Step 14 Deriving the absolute value of the coefficient according to the above decoding result, the value of which is equal to base_level+rem. If the scanning of the coefficients is completed, jump to the next decoding step; if the scanning is not completed, determine the position of the next coefficient according to the scanning order, and jump to step 13 .
  • is reconstructed according to the following formula (1).
  • the syntax elements of the coefficients include a non-zero flag sig, an absolute value greater than 1 flag gt1, an absolute value greater than 2 flag gt2, an absolute value greater than 4 flag gt4, an absolute value greater than 8 flag gt8, a residual value flag rem, sign sign coeff_sign.
  • This exemplary embodiment provides a coefficient encoding method, including:
  • the current coded block is predicted by the prediction part, or through inter-frame prediction, or through intra-frame prediction, etc., to predict the current block to obtain the current predicted block;
  • the residual block of the current coding unit is obtained by making a difference in the block; then the residual block is two-dimensionally transformed or not transformed, and a transformed block or a non-transformed coefficient block containing the transformed coefficients can be obtained, which are collectively referred to here as coefficient blocks;
  • the coefficient block is quantized; the quantized coefficients are written into the code stream according to the coefficient scanning order.
  • the method also includes:
  • Step 1 First, according to the coefficient scanning order, traverse whether all the coefficients in the coefficient group are non-zero coefficients.
  • the zero coefficients will encode sig as 0, and the non-zero coefficients will be encoded as 1; for the coefficients whose sig is 1 (ie, non-zero coefficients) make up sig_map;
  • Step 2 encode other flag bits of each coefficient in the sig_map according to the coefficient scanning order
  • Step 3 the absolute value of the encoding level is greater than 1 flag bit gt1;
  • Step 4 if the absolute value of the coefficient is greater than 1, the encoding gt1 is 1, and skip to step 5; otherwise, the encoding gt1 is 0, set base_level to 1, and skip to step 11;
  • Step 5 the absolute value of the encoding level is greater than 2 flag bit gt2;
  • Step 6 if the absolute value of the coefficient is greater than 2, the encoding gt2 is 1, and skip to step 7; otherwise, the encoding gt2 is 0, set base_level to 2, and skip to step 11;
  • Step 7 the absolute value of the coding level is greater than the 4 flag bit gt4;
  • Step 8 if the absolute value of the coefficient is greater than 4, the encoding gt4 is 1, and skip to step 9; otherwise, the encoding gt4 is 0, set the base_level to 3, and skip to step 11;
  • Step 9 the absolute value of the coding level is greater than the 8 flag bit gt8;
  • Step 10 if the absolute value of the coefficient is greater than 8, the encoding gt8 is 1, and the base_level is set to 9; otherwise, the encoding gt8 is 0, and the base_level is set to 5;
  • Step 11 if all the coefficients are scanned, go to step 12, if not all scanned, go to step 2;
  • Step 12 according to the coefficient scanning order, encode the remaining value rem of each coefficient in the sig_map
  • Step 13 if the base_level of the current coefficient is equal to 9, encode the value of rem according to the 0-order exponential Golomb code; if the base_level of the current coefficient is equal to 5, encode the value of rem according to the two-digit fixed-length code; if the base_level of the current coefficient is equal to 3, according to The value of rem encoded by a fixed-length code; if it is not satisfied, the rem value is 0;
  • the value of rem is the absolute value of the coefficient minus base_level.
  • Step 14 if the scanning of the coefficients is completed, jump to the next step; if the scanning is not completed, determine the position of the next coefficient according to the scanning order, and transfer to step 13 .
  • An embodiment of the present disclosure provides a coefficient decoding method, including:
  • the syntax elements include: non-zero flags, M absolute values greater than X flags, residual value flags and symbol flags; M and X are positive integers, and each absolute value of the M absolute values greater than X flags is greater than X flags The value of X is different;
  • the decoding of the syntax elements of the coefficients to be decoded includes: parsing the syntax elements of at least some of the coefficients to be decoded in the current coding block except for the residual value flag and the symbol flag, and analyzing the syntax elements of the at least part of the coefficients to be decoded according to the parsing result. decoding the residual value flags; and decoding the sign flags of the at least part of the coefficients to be decoded.
  • the method further includes:
  • M 4
  • the 4 absolute values greater than X flags include: an absolute value greater than 1 flag, an absolute value greater than 2 flags, an absolute value greater than 4 flags, and an absolute value greater than 8 flags;
  • the decoding method of the remaining value flag is to skip the parsing of the remaining value flag
  • the decoding method of the residual value marks is to skip the parsing of the residual value marks;
  • the decoding method of the residual value mark is to parse the encoded value of the residual value mark according to a fixed-length code
  • the decoding mode of the residual value mark is to parse the encoded value of the residual value mark according to the two-bit fixed-length code
  • the decoding method of the residual value flag is to parse the encoded value of the residual value flag according to the 0-order or 1-order exponential Golomb code.
  • the method further includes:
  • Parsing the absolute value of the coefficient to be decoded is greater than 1 flag, when the absolute value is greater than 1 flag is 0, skip parsing the absolute value of the to-be-decoded coefficient greater than 2 flag, absolute value greater than 4 flag, absolute value greater than 8 flag;
  • the flag When the absolute value is greater than 1, the flag is 1, the absolute value of the coefficient to be decoded is greater than 2; when the absolute value is greater than 2, the flag is 0, skip the parsing of the coefficient to be decoded.
  • the absolute value of the coefficient is greater than 4, and the absolute value is greater than 8 flag; when the absolute value is greater than 2, the flag is 1, and the absolute value of the coefficient to be decoded is analyzed to be greater than 4;
  • the method further includes:
  • the coded value of the remaining value flag of the coefficient to be decoded is parsed according to the 0-order or 1-order exponential Golomb code.
  • the method further includes:
  • the preset basic value when the coding value of the absolute value greater than 1 is 0, the preset basic value is 1; when the absolute value is greater than 2, the coding value of the flag is 0, the preset basic value is 2; When the coding value greater than 4 marks is 0, the preset base value is 3; when the absolute value is greater than 8 marks, the coding value is 0, the preset base value is 5; when the absolute value is greater than 8 marks When the coding value is 1, the preset base value is 9;
  • the encoded value of the residual value flag when the base value is 1, the encoded value of the residual value flag is set to 0, or the absolute value of the coefficient to be decoded is preset to 1; when the base value is 2, the residual value is set to 1.
  • the encoded value of the flag is set to 0, or the absolute value of the coefficient to be decoded is preset to 2.
  • At least part of the coefficients to be decoded of the current coding block includes all or part of the coefficients to be decoded of the current coding block.
  • the method further includes:
  • the value of the to-be-decoded coefficient is determined according to the absolute value of the to-be-decoded coefficient and the sign flag.
  • the method further includes:
  • An embodiment of the present disclosure provides a coefficient encoding method, including:
  • Generate a coefficient block based on the residual block scan the coefficients to be coded in the coefficient block, generate syntax elements corresponding to the coefficients to be coded, and encode the syntax elements of the coefficients to be coded;
  • the syntax elements include: non-zero flags, M absolute values greater than X flags, residual value flags and symbol flags; M and X are positive integers, and each absolute value of the M absolute values greater than X flags is greater than X flags The value of X is different;
  • the coding of the syntax elements of the coefficients to be coded includes: coding other syntax elements except the residual value flag and the symbol flag of at least some of the coefficients to be coded in the coefficient block, and coding the at least some of the coefficients to be coded according to the coding result encoding the remaining value flags of the coefficients; and encoding the sign flags of the at least coefficients to be encoded.
  • the method further includes:
  • M 4
  • the 4 absolute values greater than X flags include: an absolute value greater than 1 flag, an absolute value greater than 2 flags, an absolute value greater than 4 flags, and an absolute value greater than 8 flags;
  • the coding mode of the remaining value flag is to skip the coding of the remaining value flag
  • the coding mode of the remaining value marks is to skip the coding of the remaining value marks
  • the encoding mode of the residual value mark is to encode the residual value mark according to a fixed-length code
  • the encoding mode of the residual value mark is to encode the residual value mark according to the two-bit fixed-length code
  • the coding mode of the residual value flag is to encode the residual value flag according to the 0-order or 1-order exponential Golomb code.
  • the method further includes:
  • the absolute value of the coefficient to be coded when the absolute value of the coefficient to be coded is not greater than 1, the absolute value of the coefficient to be coded is greater than 1.
  • the absolute value of the coefficient to be coded when the absolute value of the coefficient to be coded is greater than 1, the absolute value When the absolute value is greater than 1, the code is 1; when the absolute value is greater than 1, the code is 0, skip the coding of the absolute value greater than 2, the absolute value greater than 4, and the absolute value greater than 8;
  • the flag When the absolute value of the coefficient to be encoded is greater than 1, the flag is encoded as 1, and the absolute value of the coefficient to be encoded is greater than 2. When the absolute value of the coefficient to be encoded is not greater than 2, the absolute value of the coefficient to be encoded is greater than 2. The flag is encoded as 0. When the absolute value of the coefficient is greater than 2, the absolute value greater than 2 flag is encoded as 1; when the absolute value greater than 2 flag is encoded as 0, the coding of the absolute value greater than 4 flag and the absolute value greater than 8 flag is skipped;
  • the flag is encoded as 1, and the absolute value of the coefficient to be encoded is greater than 4.
  • the absolute value of the coefficient to be encoded is not greater than 4, the absolute value of the coefficient to be encoded is greater than 4.
  • the flag is encoded as 0.
  • the absolute value of the coding coefficient is greater than 4, the absolute value greater than 4 flag is encoded as 1; when the absolute value greater than 4 flag is encoded as 0, the encoding of the absolute value greater than 8 flag is skipped;
  • the flag is encoded as 1, and the absolute value of the coefficient to be encoded is greater than 8.
  • the absolute value of the coefficient to be encoded is encoded as 0.
  • the flag whose absolute value is greater than 8 is coded as 1.
  • the method further includes:
  • the flag is 1, and the remaining value flag of the coefficient to be encoded is encoded according to the 0-order or 1-order exponential Golomb code.
  • the method when the residual value flag is encoded, the method further includes: a difference obtained by subtracting the absolute value of the to-be-encoded coefficient from the basic value of the to-be-encoded coefficient as the residual value the encoded value of the flag;
  • the preset basic value when the coding value of the absolute value greater than 1 is 0, the preset basic value is 1; when the absolute value is greater than 2, the coding value of the flag is 0, the preset basic value is 2; When the coding value greater than 4 marks is 0, the preset base value is 3; when the absolute value is greater than 8 marks, the coding value is 0, the preset base value is 5; when the absolute value is greater than 8 marks When the code value is 1, the preset base value is 9.
  • At least part of the coefficients to be coded of the coefficient block includes all or part of the coefficients to be coded of the coefficient block.
  • the method further includes:
  • the decoding of the syntax elements of the coefficients to be decoded may be to first decode other syntax elements except the residual value flag and the symbol flag of multiple coefficients of the current coding block, and then decode the syntax elements according to the decoding result.
  • Decoding the residual value flags of the plurality of coefficients may then further include decoding the sign flags of the plurality of coefficients.
  • the coding of the syntax elements of the coefficients to be coded may be to first encode other syntax elements of the multiple coefficients except the residual value flag and the symbol flag, and then encode the residual value flags of the multiple coefficients according to the coding result. , and then may further include encoding the sign flags of the plurality of coefficients.
  • the plurality of coefficients may be all or part of the coefficients in the current coding block.
  • the non-zero flag, the absolute value greater than X flag, the residual value flag, and the sign flag of a plurality of coefficients are decoded or encoded separately for each type of flag according to the flag type, and the context encoding and decoding mode can be It is enabled independently from the bypass codec mode, which improves the encoding performance while maintaining the consistency of standard operations.
  • An embodiment of the present disclosure further provides a code stream, which is a code stream generated according to any one of the coefficient encoding methods described above, wherein the code stream includes syntax elements corresponding to the encoded coefficients;
  • the syntax elements include: non-zero flags, M absolute values greater than X flags, residual value flags and symbol flags; M and X are positive integers, and each of the M absolute values greater than X flags is greater than X in the X flag. The value is different.
  • M 4
  • the 4 absolute value greater than X flags include: absolute value greater than 1 flag, absolute value greater than 2 flag, absolute value greater than 4 flag, absolute value greater than 8 flag.
  • An embodiment of the present disclosure further provides a decoder, as shown in FIG. 10 , comprising: a processor and a memory storing a computer program executable on the processor, wherein the processor executes the computer program When implementing the coefficient decoding method described in any one of the above.
  • FIG. 11 is a structural block diagram of a video decoder.
  • the video decoder 30 includes a video data memory 78 , an entropy decoding unit 80 , a prediction processing unit 81 , and an inverse quantization unit 86 . , an inverse transform processing unit 88 , a summer 90 , a wave filter unit 92 and a DPB 94 .
  • the prediction processing unit 81 includes an MCU 82 intra-frame prediction processing unit 84 and an IBC unit 85 .
  • video decoder 30 may perform a decoding process that is substantially reciprocal to the encoding process described with respect to video encoder 20 from FIG. 13 .
  • An embodiment of the present disclosure further provides an encoder, as shown in FIG. 12 , comprising: a processor and a memory storing a computer program executable on the processor, wherein the processor executes the computer program When implementing the coefficient encoding method described in any one of the above.
  • FIG. 13 is a structural block diagram of a video encoder.
  • the video encoder 20 includes a video data memory 33, a division unit 35, a prediction processing unit 41, a summer 50, Transform processing unit 52 , quantification unit 54 , entropy encoding unit 56 .
  • Prediction processing unit 41 includes a motion estimation unit (MEU) 42 , a motion compensation unit (MCU) 44 , an intra-prediction processing unit 46 , and an intra-block copy (IBC) unit 48 .
  • MEU 42, MCU 44, intra-prediction processing unit 46, and IBC unit 48 may actually be highly integrated.
  • video encoder 20 also includes inverse quantization unit 58 , inverse transform processing unit 60 , summer 62 , filter unit 64 , and decoded picture buffer (DPB) 66 .
  • DPB decoded picture buffer
  • the coefficient decoding method described in any of the above embodiments may be performed by a video decoder.
  • An embodiment of the present disclosure further provides a terminal, including: a video decoder, where the video decoder includes the above-mentioned decoding device and/or the above-mentioned encoding device.
  • Embodiments of the present disclosure also provide an encoding and decoding system, including the above-mentioned decoder, and/or the above-mentioned encoder.
  • Embodiments of the present disclosure further provide a non-transitory computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, wherein, when the computer program is executed by a processor, any one of the above-mentioned methods is implemented.
  • the context encoding and decoding mode and the bypass encoding and decoding mode are separated and independently enabled.
  • the technical solutions provided by the above embodiments of the present disclosure are not specific to a specific video coding standard, but are a generalized coefficient entropy coding method. Can be extended to multiple standards, such as AVS, MPEG, AOM or any custom transform coefficient entropy coding method.
  • the decoding described in the embodiments of the present disclosure may be interpreted as including a decoding operation, or as including an encoding operation and a decoding operation.
  • the encoding described in the embodiments of the present disclosure may be interpreted as including an encoding operation, or as including an encoding operation and a decoding operation.
  • decoded values described in the embodiments of the present disclosure may also be referred to as encoded values, and the encoded values may also be referred to as decoded values, which are the same.
  • the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit.
  • Computer-readable media may include computer-readable storage media corresponding to tangible media, such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another, eg, according to a communication protocol.
  • a computer-readable medium may generally correspond to a non-transitory, tangible computer-readable storage medium or a communication medium such as a signal or carrier wave.
  • Data storage media can be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and/or data structures for implementing the techniques described in this disclosure.
  • the computer program product may comprise a computer-readable medium.
  • such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, flash memory, or may be used to store instructions or data Any other medium in the form of a structure that stores the desired program code and that can be accessed by a computer.
  • any connection is also termed a computer-readable medium if, for example, a connection is made from a website, server, or other remote sources transmit instructions, coaxial cable, fiber optic cable, twine, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium.
  • computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory (transitory) media, but are instead directed to non-transitory, tangible storage media.
  • magnetic disks and optical disks include compact disks (CDs), laser disks, optical disks, digital versatile disks (DVDs), floppy disks, or Blu-ray disks, etc., where disks typically reproduce data magnetically, while optical disks use lasers to Optically reproduce data. Combinations of the above should also be included within the scope of computer-readable media.
  • processors such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs) field programmable logic arrays (FPGAs) or other equivalent integrated or discrete logic circuits.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGAs field programmable logic arrays
  • processors may refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein.
  • the functionality described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or incorporated in a combined codec. Also, the techniques may be fully implemented in one or more circuits or logic elements.
  • the technical solutions of the embodiments of the present disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (eg, a chip set).
  • IC integrated circuit
  • Various components, modules, or units are described in the disclosed embodiments to emphasize functional aspects of devices configured to perform the described techniques, but do not necessarily require realization by different hardware units. Rather, as described above, the various units may be combined in codec hardware units or provided by a collection of interoperating hardware units (including one or more processors as described above) in conjunction with suitable software and/or firmware.
  • Computer storage media includes both volatile and nonvolatile implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules or other data flexible, removable and non-removable media.
  • Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices, or may Any other medium used to store desired information and which can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery media, as is well known to those of ordinary skill in the art .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Les modes de réalisation de la présente invention concernent un procédé et un dispositif de codage de coefficient, un procédé et un dispositif de décodage de coefficient, un terminal et un support de stockage. Le procédé de décodage de coefficient comprend : l'analyse d'un flux binaire acquis et le décodage d'un élément de syntaxe d'un coefficient à décoder ; et la détermination d'une valeur dudit coefficient selon l'élément de syntaxe obtenu par décodage.
PCT/CN2021/086671 2021-03-17 2021-04-12 Procédé et dispositif de codage de coefficient, procédé et dispositif de décodage de coefficient, terminal et support de stockage WO2022193386A1 (fr)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202180095621.0A CN116982314A (zh) 2021-03-17 2021-04-12 系数编解码方法、编解码设备、终端及存储介质

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110287920 2021-03-17
CN202110287920.6 2021-03-17

Publications (1)

Publication Number Publication Date
WO2022193386A1 true WO2022193386A1 (fr) 2022-09-22

Family

ID=83321870

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/086671 WO2022193386A1 (fr) 2021-03-17 2021-04-12 Procédé et dispositif de codage de coefficient, procédé et dispositif de décodage de coefficient, terminal et support de stockage

Country Status (2)

Country Link
CN (1) CN116982314A (fr)
WO (1) WO2022193386A1 (fr)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104205832A (zh) * 2012-04-14 2014-12-10 高通股份有限公司 用于视频译码的变换系数译码中的群组旗标
CN105191307A (zh) * 2013-04-12 2015-12-23 高通股份有限公司 在视频译码过程中用于系数级别译码的莱斯参数更新
WO2020243555A1 (fr) * 2019-05-31 2020-12-03 Qualcomm Incorporated Codage de coefficient pour mode de saut de transformée dans un codage vidéo
WO2021006700A1 (fr) * 2019-07-10 2021-01-14 엘지전자 주식회사 Procédé de décodage d'image faisant appel à un fanion servant à un procédé de codage résiduel dans un système de codage d'image, et dispositif associé

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104205832A (zh) * 2012-04-14 2014-12-10 高通股份有限公司 用于视频译码的变换系数译码中的群组旗标
CN105191307A (zh) * 2013-04-12 2015-12-23 高通股份有限公司 在视频译码过程中用于系数级别译码的莱斯参数更新
WO2020243555A1 (fr) * 2019-05-31 2020-12-03 Qualcomm Incorporated Codage de coefficient pour mode de saut de transformée dans un codage vidéo
WO2021006700A1 (fr) * 2019-07-10 2021-01-14 엘지전자 주식회사 Procédé de décodage d'image faisant appel à un fanion servant à un procédé de codage résiduel dans un système de codage d'image, et dispositif associé

Also Published As

Publication number Publication date
CN116982314A (zh) 2023-10-31

Similar Documents

Publication Publication Date Title
US11750841B2 (en) Methods and apparatuses for coding transform blocks
KR102683408B1 (ko) 적응적 트리 선택을 사용한 이진 집합의 비디오 인코딩 및 디코딩을 위한 방법 및 장치
CN112272298B (zh) 转换系数编解码的方法及装置
KR101356733B1 (ko) 컨텍스트 기반 적응적 이진 산술 부호화, 복호화 방법 및장치
CN108419084B (zh) 改进熵编码和解码的方法、装置及存储介质
TWI662830B (zh) 資料編碼與解碼
CN102783035B (zh) 并行熵编码方法和设备
KR101571618B1 (ko) 마지막 유효 계수의 위치를 코딩 및 디코딩하는 방법 및 장치
TWI750624B (zh) 編解碼變換係數的方法及裝置
JP2021520087A (ja) Cabacのニューラルネットワーク実装に基づくビデオの符号化及び復号のための方法及び機器
EP2754293A1 (fr) Codage s'adaptant au contexte de données vidéo
EP2533538A2 (fr) Procédé et système permettant de réduire la surcharge de modélisation pour la compression de données
CN104618731A (zh) 用于对视频数据进行熵编码和熵解码的方法和设备
CN114615504B (zh) 视频解码方法、视频编码方法、装置及设备
KR101739603B1 (ko) 2진 세트들을 인코딩 및 디코딩하기 위해 트리 구조들을 재이용하는 방법 및 장치
US10070127B2 (en) Method and apparatus for arithmetic coding and termination
CN116095329A (zh) 视频编解码方法、装置、计算机可读介质及电子设备
WO2023272533A1 (fr) Procédé de codage et de décodage, codeur, décodeur et support de stockage
WO2022193386A1 (fr) Procédé et dispositif de codage de coefficient, procédé et dispositif de décodage de coefficient, terminal et support de stockage
CN116982317A (zh) 系数的编解码方法、编码器、解码器及计算机存储介质
WO2022188186A1 (fr) Procédé de codage de coefficient, procédé de décodage de coefficient, dispositif de codage, dispositif de décodage et support de stockage
US20240114140A1 (en) Video decoding and encoding method, device and storage medium
CN114979656B (zh) 视频编解码方法、装置、计算机可读介质及电子设备
CN113141505B (zh) 一种视频数据编码方法以及装置
WO2023051222A1 (fr) Procédé et appareil de filtrage, procédé et appareil de codage, procédé et appareil de décodage, support lisible par ordinateur et dispositif électronique

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21930974

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180095621.0

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21930974

Country of ref document: EP

Kind code of ref document: A1