Coding and decoding method of coefficient, encoder, decoder and computer storage medium

By adopting adaptive aptive binary arithmetic coding mode and context model in video encoding and decoding technology, combined with the target order of exponential Columbus code, the problem of failing to fully utilize the statistical characteristics of quantized coefficients in the existing technology is solved, and more efficient code rate saving and codec performance improvement is achieved.

CN119728975AActive Publication Date: 2025-03-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411882794.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2021-03-17
Filing Date
2021-04-15
Publication Date
2025-03-28
Estimated Expiration
2041-04-15

AI Technical Summary

Technical Problem

The existing video encoding and decoding technology fails to fully utilize the statistical characteristics between quantization coefficients during the encoding process, resulting in poor encoding performance.

Method used

Adaptive binary arithmetic encoding mode is adopted, based on the quantization coefficient position to be decoded, the code stream is analyzed using the first and second context models to obtain the values ​​of the non-zero identification information and preset identification information, and when necessary, encode it using the target order of the exponential Columbus code.

Benefits of technology

By fully utilizing the statistical characteristics between quantization coefficients, the adaptive encoding characteristics in the encoding and decoding process are improved, the code rate is saved, and the encoding and decoding performance is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728975A_ABST
    Figure CN119728975A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a coefficient encoding and decoding method, an encoder, a decoder and a computer storage medium, the method is applied to the decoder, and the method comprises the following steps: based on the position of a quantization coefficient to be decoded, analyzing a code stream by using an adaptive binary arithmetic encoding mode of a first context model, and obtaining a value of non-zero identification information; under the condition that the value of the non-zero identification information is a first value, analyzing the code stream by utilizing a self-adaptive binary arithmetic coding mode of a second context model, and obtaining values of X pieces of preset identification information; under the condition that the value of the Xth preset identification information is a first value, determining a target order of an exponential-Golomb code, and analyzing the code stream by using an exponential-Golomb decoding algorithm of the target order to obtain a residual value of an absolute value of a reconstruction quantization coefficient; and determining a reconstructed quantization coefficient absolute value corresponding to the quantization coefficient position according to the value of the non-zero identification information, the values of the X pieces of preset identification information and the residual value of the reconstructed quantization coefficient absolute value.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is a divisional application of the PCT international patent application PCT / CN2021 / 087499 with an application date of April 15, 2021, which entered the Chinese national phase with application number 202180095577.3 and invention name “Coefficient encoding and decoding method, encoder, decoder and computer storage medium”. Technical Field

[0003] The present application relates to the technical field of video coding and decoding, and in particular to a coefficient coding and decoding method, an encoder, a decoder and a computer storage medium. Background Art

[0004] As people's requirements for video display quality increase, computer vision-related fields have received more and more attention. In recent years, image processing technology has been successfully applied in various industries. For the encoding and decoding process of video images, at the encoding end, the image data to be encoded will be compressed and encoded by the entropy coding unit after transformation and quantization, and the bit stream generated after entropy coding will be transmitted to the decoding end; then the bit stream is parsed, and after inverse quantization and inverse transformation, the original input image data can be restored.

[0005] In related technologies, in order to further compress, the encoder can transform the residual data from the pixel domain to the transform domain to obtain transform coefficients, which can be quantized from a two-dimensional array according to the coefficient scanning order to generate quantized coefficients of a one-dimensional vector to achieve more compression. However, there are many statistical characteristics between the quantized coefficients at various positions on the scan line, but the current encoding method is relatively simple and does not make full use of these statistical characteristics, resulting in poor encoding performance. Summary of the invention

[0006] The present application proposes a coefficient encoding and decoding method, an encoder, a decoder and a computer storage medium, which can save bit rate and thus improve encoding and decoding performance.

[0007] To achieve the above purpose, the technical solution of this application is implemented as follows:

[0008] In a first aspect, an embodiment of the present application provides a coefficient decoding method, which is applied to a decoder, and the method includes:

[0009] Based on the position of the quantized coefficient to be decoded, the bit stream is parsed using the adaptive binary arithmetic coding mode of the first context model to obtain the value of the non-zero identification information;

[0010] When the value of the non-zero identification information is the first value, the bitstream is parsed using the adaptive binary arithmetic coding mode of the second context model to obtain values ​​of X preset identification information; wherein X is a natural number greater than zero;

[0011] When the value of the Xth preset identification information is the first value, determine a target order of the exponential Golomb code, and parse the bitstream using the exponential Golomb decoding algorithm of the target order to obtain a residual value of the absolute value of the reconstructed quantization coefficient; wherein the target order is an integer greater than zero;

[0012] The reconstructed quantization coefficient absolute value corresponding to the quantization coefficient position is determined according to the value of the non-zero identification information, the values ​​of the X preset identification information and the remaining value of the reconstructed quantization coefficient absolute value.

[0013] In a second aspect, an embodiment of the present application provides a coefficient encoding method, which is applied to an encoder, and the method includes:

[0014] Determining quantized coefficients to be encoded;

[0015] Determine a value of the non-zero identification information according to the quantization coefficient, and perform entropy coding on the value of the non-zero identification information using an adaptive binary arithmetic coding mode of a first context model;

[0016] When the value of the non-zero identification information is the first value, determine the values ​​of X preset identification information according to the quantization coefficient, and perform entropy coding on the values ​​of the X preset identification information in sequence using the adaptive binary arithmetic coding mode of the second context model; wherein X is a natural number greater than zero;

[0017] When the value of the Xth preset identification information is the first value, determining the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code, and performing entropy coding on the absolute value residual value of the quantization coefficient using the exponential Golomb coding algorithm of the target order;

[0018] The encoded bit information is written into the bit stream.

[0019] In a third aspect, an embodiment of the present application provides an encoder, the encoder comprising a first determining unit, an entropy encoding unit and a writing unit; wherein,

[0020] A first determining unit, configured to determine a quantization coefficient to be encoded;

[0021] an entropy coding unit, configured to determine a value of non-zero identification information according to the quantization coefficient, and perform entropy coding on the value of the non-zero identification information using an adaptive binary arithmetic coding mode of a first context model; and when the value of the non-zero identification information is a first value, determine values ​​of X preset identification information according to the quantization coefficient, and perform entropy coding on the values ​​of the X preset identification information in sequence using an adaptive binary arithmetic coding mode of a second context model; wherein X is a natural number greater than zero;

[0022] The entropy coding unit is further configured to determine, when the value of the Xth preset identification information is the first value, the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code, and perform entropy coding on the absolute value residual value of the quantization coefficient using the exponential Golomb coding algorithm of the target order;

[0023] The writing unit is configured to write the bit information obtained after encoding into the bit stream.

[0024] In a fourth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first memory and a first processor; wherein:

[0025] A first memory, used to store a computer program that can be run on the first processor;

[0026] The first processor is used to execute the method described in the second aspect when running the computer program.

[0027] In a fifth aspect, an embodiment of the present application provides a decoder, the decoder comprising a parsing unit and a second determining unit; wherein:

[0028] A parsing unit configured to parse the bit stream based on the position of the quantization coefficient to be decoded and to obtain the value of the non-zero identification information by using the adaptive binary arithmetic coding mode of the first context model;

[0029] The parsing unit is further configured to, when the value of the non-zero identification information is a first value, parse the bitstream using the adaptive binary arithmetic coding mode of the second context model to obtain values ​​of X preset identification information; wherein X is a natural number greater than zero; and when the value of the X-th preset identification information is the first value, determine a target order of the exponential Golomb code, and parse the bitstream using the exponential Golomb decoding algorithm of the target order to obtain a residual value of the absolute value of the reconstructed quantization coefficient; wherein the target order is an integer greater than zero;

[0030] The second determining unit is configured to determine the reconstructed quantization coefficient absolute value corresponding to the quantization coefficient position according to the value of the non-zero identification information, the values ​​of the X preset identification information and the remaining value of the reconstructed quantization coefficient absolute value.

[0031] In a sixth aspect, an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein:

[0032] A second memory, used for storing a computer program that can be run on the second processor;

[0033] The second processor is used to execute the method described in the first aspect when running the computer program.

[0034] In a seventh aspect, an embodiment of the present application provides a computer storage medium storing a computer program, wherein the computer program, when executed, implements the method described in the first aspect, or implements the method described in the second aspect.

[0035] The embodiment of the present application provides a coefficient encoding and decoding method, an encoder, a decoder and a computer storage medium. On the encoder side, first, a quantization coefficient to be encoded is determined; then, a value of non-zero identification information is determined according to the quantization coefficient, and the value of the non-zero identification information is entropy encoded using an adaptive binary arithmetic coding mode of a first context model; when the value of the non-zero identification information is a first value, values ​​of X preset identification information are determined according to the quantization coefficient, and the values ​​of the X preset identification information are entropy encoded in sequence using an adaptive binary arithmetic coding mode of a second context model; wherein X is a natural number greater than zero; when the value of the Xth preset identification information is a first value, an absolute value residual value of the quantization coefficient and a target order of an exponential Golomb code are determined, and the absolute value residual value of the quantization coefficient is entropy encoded using an exponential Golomb coding algorithm of the target order; finally, the bit information obtained after encoding is written into a bit stream. At the decoder side, firstly, based on the position of the quantization coefficient to be decoded, the adaptive binary arithmetic coding mode of the first context model is used to parse the bitstream to obtain the value of the non-zero identification information; then, when the value of the non-zero identification information is the first value, the adaptive binary arithmetic coding mode of the second context model is used to parse the bitstream to obtain the values ​​of X preset identification information; wherein X is a natural number greater than zero; when the value of the Xth preset identification information is the first value, the target order of the exponential Golomb code is determined, and the exponential Golomb decoding algorithm of the target order is used to parse the bitstream to obtain the residual value of the absolute value of the reconstructed quantization coefficient; wherein the target order is an integer greater than zero; finally, according to the value of the non-zero identification information, the values ​​of the X preset identification information and the residual value of the absolute value of the reconstructed quantization coefficient, the absolute value of the reconstructed quantization coefficient corresponding to the quantization coefficient position is determined. In this way, since the statistical characteristics between the quantization coefficients at each position are fully utilized, not only the newly introduced preset identification information is entropy encoded through the context model, but also the coding mode is adjusted for the absolute value residual value of the quantization coefficient, so that the adaptive coding characteristics can be better utilized in the encoding and decoding process, thereby saving the bit rate and improving the encoding and decoding performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of an application of a coding framework provided for related technologies;

[0037] Figure 2 A schematic diagram of the system composition of an encoder provided in an embodiment of the present application;

[0038] Figure 3 A schematic diagram of the system composition of a decoder provided in an embodiment of the present application;

[0039] Figure 4 A schematic diagram of a flow chart of a coefficient decoding method provided in an embodiment of the present application;

[0040] Figure 5 A schematic diagram of a coefficient scanning sequence provided for related technologies;

[0041] Figure 6 A structural diagram of another coefficient scanning order provided for the related art;

[0042] Figure 7 A schematic diagram of a flow chart of a coefficient encoding method provided in an embodiment of the present application;

[0043] Figure 8 A schematic diagram of the structure of an encoder provided in an embodiment of the present application;

[0044] Fig. 9 A schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;

[0045] Fig.10 A schematic diagram of the structure of a decoder provided in an embodiment of the present application;

[0046] Fig.11 A schematic diagram of the specific hardware structure of a decoder provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0049] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. It should also be noted that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first\second\third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0050] In a video image, a first image component, a second image component, and a third image component are generally used to represent a coding block (CB). The three image components are a brightness component, a blue chroma component, and a red chroma component. Specifically, the brightness component is usually represented by the symbol Y, the blue chroma component is usually represented by the symbol Cb or U, and the red chroma component is usually represented by the symbol Cr or V; thus, the video image can be represented in the YCbCr format or the YUV format.

[0051] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are described first. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations:

[0052] Moving Picture Experts Group (MPEG)

[0053] International Standardization Organization (ISO)

[0054] International Electrotechnical Commission (IEC)

[0055] Joint Video Experts Team (JVET)

[0056] Alliance for Open Media (AOM)

[0057] Next-generation video coding standard H.266 / Versatile Video Coding (VVC)

[0058] VVC Test Model (VTM)

[0059] Audio Video Standard (AVS)

[0060] AVS High-Performance Model (HPM)

[0061] Transform coefficients

[0062] Quantization Parameter

[0063] Context-based Adaptive Variable-Length Code (CAVLC)

[0064] Context-based Adaptive BinaryArithmetic Coding (CABAC)

[0065] Scan Region based Coefficient Coding (SRCC)

[0066] It is understandable that digital video compression technology is mainly used to compress huge digital video data for transmission and storage. With the surge in Internet videos and people's increasing demand for video clarity, although the existing digital video compression standards can save a lot of video data, there is still a need to pursue better digital video compression technology to reduce the bandwidth and traffic pressure of digital video transmission.

[0067] Among them, video compression includes intra-frame prediction (spatial domain) and / or inter-frame prediction (temporal domain) for reducing or removing the inherent redundancy of the video, transformation / quantization and dequantization / inverse transformation of residual information, loop filtering and entropy coding to improve the quality of subjective and objective reconstruction, etc. Figure 1 As shown. The mainstream video compression standards basically describe block-based compression technology. A video slice, a frame or a series of pictures will be divided into basic units based on the coding tree unit (CTU), which is further divided into blocks based on the coding unit (CU). Intra-frame blocks are predicted by using the pixels around the block as references, while inter-frame blocks refer to the information of neighboring blocks in space and reference information in other frames. Compared with the prediction signal, the residual information is transformed, quantized and entropy encoded in blocks to generate a bitstream. These technologies are described in the standards and implemented in various fields related to video compression. Internationally, the mainstream standards include H.264 / Advanced Video Coding (AVC) standard, H.265 / High Efficiency Video Coding (HEVC) standard, H.266 / Versatile Video Coding (VVC) standard and the extensions of these standards. Video devices can achieve more efficient video encoding and decoding and transmission and storage by implementing these technologies.

[0068] Spatial or temporal prediction obtains a predicted block of the block to be decoded. The residual data represents the pixel difference between the original block to be decoded and the predicted block. For further compression, the residual data can be transformed from the pixel domain to the transform domain to obtain residual transform coefficients, which can then be quantized in a two-dimensional array according to the coefficient scanning order to produce a one-dimensional vector of quantized coefficients, which can be entropy coded to achieve more compression. Here, the block to be decoded can refer to the block to be encoded or the block to be decoded.

[0069] Specifically, on the encoder side, a transform unit and a quantization unit may be included. First, the block to be decoded, such as the prediction residual (which can be represented by residual), is transformed by the transform unit to obtain a transform coefficient matrix (or "transform block"), and then the transform coefficient matrix is ​​quantized by the quantization unit, and the final quantized coefficient is written into the video bitstream.

[0070] On the decoder side, it can include an inverse quantization unit and an inverse transform unit. First, by parsing the bitstream, the quantization coefficients corresponding to the transform coefficient matrix can be obtained. The inverse quantization unit performs inverse quantization processing on the quantization coefficients (also called "scaling") to obtain the reconstructed values ​​of the transform coefficient matrix, and then obtains the coefficient matrix; then the inverse transform unit performs an inverse transform on the coefficient matrix corresponding to the encoder side transform unit, and finally obtains the residual reconstructed block.

[0071] In the related art, quantization processing can utilize the correlation between coefficients and the characteristics of quantized coefficients to select a better quantization method, so as to achieve the purpose of optimizing quantization. To facilitate the formation of video bit rate, a specific scanning order can transform a two-dimensional coefficient block into a one-dimensional coefficient stream. Among them, the scanning order can be Zigzag, horizontal, vertical or any other scanning order. In most existing video coding standards, non-binarized quantized coefficients need to be further binarized to obtain bits (bins), and the binarized quantized coefficients are binarized and arithmetic coded based on the model to generate the final bit stream. However, due to the existence of many statistical characteristics between the quantized coefficients at various positions on the scan line, the current coding method is relatively simple, and the adaptive binary arithmetic coding based on the context model does not make full use of these statistical characteristics, resulting in poor coding performance.

[0072] The embodiment of the present application provides a coefficient encoding method, which is applied to an encoder. By determining a quantization coefficient to be encoded; determining the value of non-zero identification information according to the quantization coefficient, and entropy encoding the value of the non-zero identification information using the adaptive binary arithmetic coding mode of the first context model; when the value of the non-zero identification information is a first value, determining the values ​​of X preset identification information according to the quantization coefficient, and entropy encoding the values ​​of the X preset identification information in sequence using the adaptive binary arithmetic coding mode of the second context model; wherein X is a natural number greater than zero; when the value of the Xth preset identification information is a first value, determining the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code, and entropy encoding the absolute value residual value of the quantization coefficient using the exponential Golomb coding algorithm of the target order; and writing the bit information obtained after encoding into the bit stream.

[0073] The embodiment of the present application also provides a coefficient decoding method, which is applied to a decoder. Based on the position of the quantization coefficient to be decoded, the adaptive binary arithmetic coding mode of the first context model is used to parse the bitstream to obtain the value of the non-zero identification information; when the value of the non-zero identification information is the first value, the adaptive binary arithmetic coding mode of the second context model is used to parse the bitstream to obtain the values ​​of X preset identification information; wherein X is a natural number greater than zero; when the value of the Xth preset identification information is the first value, the target order of the exponential Golomb code is determined, and the exponential Golomb decoding algorithm of the target order is used to parse the bitstream to obtain the residual value of the absolute value of the reconstructed quantization coefficient; wherein the target order is an integer greater than zero; according to the value of the non-zero identification information, the values ​​of the X preset identification information and the residual value of the absolute value of the reconstructed quantization coefficient, the absolute value of the reconstructed quantization coefficient corresponding to the position of the quantization coefficient is determined.

[0074] In this way, since the statistical characteristics between the quantization coefficients at each position are fully utilized, not only the newly introduced preset identification information is entropy encoded through the context model, but also the encoding mode is adjusted according to the absolute residual value of the quantization coefficient. This can better utilize the adaptive coding characteristics in the encoding and decoding process, thereby saving bit rate and improving encoding and decoding performance.

[0075] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0076] See also Figure 2 , which shows an example of a system composition block diagram of an encoder provided in an embodiment of the present application. Figure 2As shown, the encoder 100 may include: a segmentation unit 101, a prediction unit 102, a first adder 107, a transform unit 108, a quantization unit 109, a dequantization unit 110, an inverse transform unit 111, a second adder 112, a filtering unit 113, a decoded picture buffer (DPB) unit 114 and an entropy coding unit 115. Here, the input of the encoder 100 may be a video consisting of a series of pictures or a static picture, and the output of the encoder 100 may be a bit stream (also referred to as a "code stream") for representing a compressed version of the input video.

[0077] Among them, the segmentation unit 101 segments the picture in the input video into one or more coding tree units (CTUs). The segmentation unit 101 divides the picture into multiple tiles (or tiles), and can further divide a tile into one or more bricks. Here, a tile or a brick may include one or more complete and / or partial CTUs. In addition, the segmentation unit 101 can form one or more slices, wherein a slice may include one or more tiles arranged in a grid order in the picture, or one or more tiles covering a rectangular area in the picture. The segmentation unit 101 can also form one or more sub-pictures, wherein a sub-picture may include one or more slices, tiles or bricks.

[0078] During the encoding process of the encoder 100, the segmentation unit 101 transmits the CTU to the prediction unit 102. Generally, the prediction unit 102 can be composed of a block segmentation unit 103, a motion estimation (ME) unit 104, a motion compensation (MC) unit 105, and an intra-frame prediction unit 106. Specifically, the block segmentation unit 103 iteratively uses quadtree segmentation, binary tree segmentation, and ternary tree segmentation to further divide the input CTU into smaller coding units (Coding Units, CUs). The prediction unit 102 can use the ME unit 104 and the MC unit 105 to obtain the inter-frame prediction block of the CU. The intra-frame prediction unit 106 can use various intra-frame prediction modes including the MIP mode to obtain the intra-frame prediction block of the CU. In the example, the rate-distortion optimized motion estimation method can be called by the ME unit 104 and the MC unit 105 to obtain the inter-frame prediction block, and the rate-distortion optimized mode determination method can be called by the intra-frame prediction unit 106 to obtain the intra-frame prediction block.

[0079] The prediction unit 102 outputs the prediction block of the CU, and the first adder 107 calculates the difference between the CU in the output of the segmentation unit 101 and the prediction block of the CU, that is, the residual CU. The transform unit 108 reads the residual CU and performs one or more transform operations on the residual CU to obtain coefficients. The quantization unit 109 quantizes the coefficients and outputs the quantized coefficients (i.e., levels). The dequantization unit 110 performs a scaling operation on the quantized coefficients to output the reconstructed coefficients. The inverse transform unit 111 performs one or more inverse transforms corresponding to the transform in the transform unit 108 and outputs the reconstructed residual. The second adder 112 calculates the reconstructed CU by adding the reconstructed residual and the prediction block of the CU from the prediction unit 102. The second adder 112 also sends its output to the prediction unit 102 for use as an intra-frame prediction reference. After all CUs in the picture or sub-picture are reconstructed, the filtering unit 113 performs loop filtering on the reconstructed picture or sub-picture. Here, the filtering unit 113 includes one or more filters, such as a deblocking filter, a sample adaptive offset (Sample Adaptive Offset, SAO) filter, an adaptive loop filter (AdaptiveLoop Filter, ALF), a luminance mapping and chroma scaling (Luma Mapping with Chroma Scaling, LMCS) filter, and a neural network-based filter, etc. Alternatively, when the filtering unit 113 determines that the CU is not used as a reference for encoding other CUs, the filtering unit 113 performs loop filtering on one or more target pixels in the CU.

[0080] The output of the filtering unit 113 is a decoded picture or sub-picture, which is cached to the DPB unit 114. The DPB unit 114 outputs the decoded picture or sub-picture according to the timing and control information. Here, the picture stored in the DPB unit 114 can also be used as a reference for the prediction unit 102 to perform inter-frame prediction or intra-frame prediction. Finally, the entropy coding unit 115 converts the parameters (such as control parameters and supplementary information, etc.) required for decoding the picture from the encoder 100 into a binary form, and writes such a binary form into the bitstream according to the grammatical structure of each data unit, that is, the encoder 100 finally outputs the bitstream.

[0081] Furthermore, the encoder 100 may be a first memory having a first processor and a computer program. When the first processor reads and runs the computer program, the encoder 100 reads the input video and generates a corresponding bitstream. In addition, the encoder 100 may also be a computing device having one or more chips. These units implemented as integrated circuits on the chip have the same Figure 2 Similar connection and data exchange functions to the corresponding units in the

[0082] See also Figure 3, which shows an example of a system composition block diagram of a decoder provided in an embodiment of the present application. Figure 3 As shown, the decoder 200 may include: a parsing unit 201, a prediction unit 202, an inverse quantization unit 205, an inverse transform unit 206, an adder 207, a filtering unit 208, and a decoded picture buffer unit 209. Here, the input of the decoder 200 is a bit stream for representing a compressed version of a video or a static picture, and the output of the decoder 200 may be a decoded video consisting of a series of pictures or a decoded static picture.

[0083] The input code stream of the decoder 200 may be a code stream generated by the encoder 100. The parsing unit 201 parses the input code stream and obtains the value of the syntax element from the input code stream. The parsing unit 201 converts the binary representation of the syntax element into a digital value and sends the digital value to the unit in the decoder 200 to obtain one or more decoded pictures. The parsing unit 201 can also parse one or more syntax elements from the input code stream to display the decoded picture.

[0084] During the decoding process of the decoder 200 , the parsing unit 201 sends the values ​​of the syntax elements and one or more variables set or determined according to the values ​​of the syntax elements and used to obtain one or more decoded pictures to the units in the decoder 200 .

[0085] The prediction unit 202 determines a prediction block of a current decoding block (e.g., CU). Here, the prediction unit 202 may include a motion compensation unit 203 and an intra prediction unit 204. Specifically, when the inter-frame decoding mode is indicated to be used for decoding the current decoding block, the prediction unit 202 passes the relevant parameters from the parsing unit 201 to the motion compensation unit 203 to obtain the inter-frame prediction block; when the intra-frame prediction mode (including the MIP mode indicated based on the MIP mode index value) is indicated to be used for decoding the current decoding block, the prediction unit 202 transmits the relevant parameters from the parsing unit 201 to the intra-frame prediction unit 204 to obtain the intra-frame prediction block.

[0086] The inverse quantization unit 205 has the same function as the inverse quantization unit 110 in the encoder 100. The inverse quantization unit 205 performs a scaling operation on the quantization coefficients (ie, levels) from the parsing unit 201 to obtain reconstructed coefficients.

[0087] The inverse transform unit 206 has the same function as the inverse transform unit 111 in the encoder 100. The inverse transform unit 206 performs one or more transform operations (ie, inverse operations of one or more transform operations performed by the inverse transform unit 111 in the encoder 100) to obtain a reconstructed residual.

[0088] The adder 207 performs an addition operation on its input (the prediction block from the prediction unit 202 and the reconstructed residual from the inverse transform unit 206) to obtain a reconstructed block of the current decoded block. The reconstructed block is also sent to the prediction unit 202 to be used as a reference for other blocks encoded in the intra prediction mode.

[0089] After all CUs in the picture or sub-picture are reconstructed, the filtering unit 208 performs loop filtering on the reconstructed picture or sub-picture. The filtering unit 208 includes one or more filters, such as a deblocking filter, a sampling adaptive compensation filter, an adaptive loop filter, a luminance mapping and chrominance scaling filter, and a filter based on a neural network. Alternatively, when the filtering unit 208 determines that the reconstructed block is not used as a reference for decoding other blocks, the filtering unit 208 performs loop filtering on one or more target pixels in the reconstructed block. Here, the output of the filtering unit 208 is a decoded picture or sub-picture, and the decoded picture or sub-picture is cached to the DPB unit 209. The DPB unit 209 outputs the decoded picture or sub-picture according to the timing and control information. The picture stored in the DPB unit 209 can also be used as a reference for performing inter-frame prediction or intra-frame prediction by the prediction unit 202.

[0090] Furthermore, the decoder 200 may be a second memory having a second processor and a computer program. When the second processor reads and runs the computer program, the decoder 200 reads the input bitstream and generates a corresponding decoded video. In addition, the decoder 200 may also be a computing device having one or more chips. These units implemented as integrated circuits on the chip have the same Figure 3 Similar connection and data exchange functions to the corresponding units in the

[0091] It should also be noted that when the embodiment of the present application is applied to the encoder 100, the "current block" specifically refers to the current block to be encoded in the video image (also referred to as the "encoding block"); when the embodiment of the present application is applied to the decoder 200, the "current block" specifically refers to the current block to be decoded in the video image (also referred to as the "decoding block").

[0092] In one embodiment of the present application, see Figure 4 , which shows a schematic flow chart of a coefficient decoding method provided by an embodiment of the present application. Figure 4 As shown, the method may include:

[0093] S401: Based on the position of the quantization coefficient to be decoded, the bit stream is parsed using the adaptive binary arithmetic coding mode of the first context model to obtain the value of the non-zero identification information.

[0094] S402: When the value of the non-zero identification information is the first value, parse the bitstream using the adaptive binary arithmetic coding mode of the second context model to obtain X values ​​of preset identification information; wherein X is a natural number greater than zero.

[0095] S403: When the value of the Xth preset identification information is the first value, determine the target order of the exponential Golomb code, and use the exponential Golomb decoding algorithm of the target order to parse the bit stream to obtain the residual value of the absolute value of the reconstructed quantization coefficient; wherein the target order is an integer greater than zero.

[0096] S404: Determine the reconstructed quantization coefficient absolute value corresponding to the quantization coefficient position according to the value of the non-zero identification information, the values ​​of the X preset identification information and the remaining value of the reconstructed quantization coefficient absolute value.

[0097] It should be noted that the decoding method in the embodiment of the present application is mainly applied to a decoder. Figure 3 The composition structure of the decoder 200 shown in the figure, the decoding method of the embodiment of the present application is mainly applied to the "parsing unit 201" part in the decoder 200. For the parsing unit 201, an adaptive binary arithmetic coding mode based on a context model can be used to decode to obtain the value of the preset identification information, and then the exponential Golomb decoding algorithm of the target order is used to decode to obtain the residual value of the absolute value, and then the reconstructed quantization coefficient can be obtained.

[0098] Specifically, in the embodiment of the present application, after the video signal is processed by intra-frame or inter-frame prediction, the residual of the block to be decoded can be obtained, and the residual signal may be further transformed to obtain the transform coefficient (also referred to as "coefficient", coefficient). For the convenience of description, the untransformed residual signal and the transformed residual signal can be collectively referred to as transform coefficients. In order to perform effective compression, the transform coefficients need to be quantized. Quantization is usually used to reduce the dynamic range of the transform coefficients, so as to achieve the purpose of expressing the video with fewer code words. The quantized value can be called a "quantization coefficient", which can also be usually referred to as a level, a quantization level or a quantization level. The quantization operation is usually to divide the transform coefficient by the quantization step size, and the quantization step size is determined by the quantization factor transmitted in the bitstream. Among them, in the encoder, the quantization coefficient also needs to be entropy encoded to be written into the bitstream; so in the decoder, it is necessary to parse the bitstream to obtain the reconstructed quantization coefficient. In this way, the inverse quantization operation is achieved by multiplying the reconstructed quantization coefficient by the quantization step size to obtain the reconstructed transform coefficient. For a block of size N×M, the quantization processing of all transform coefficients can be completed independently. This technology is also widely used in many international video compression standards, such as H.264 and HEVC.

[0099] It can be understood that in the latest international video compression standards, the quantization operation can use the correlation between the transform coefficients and the characteristics of the quantized coefficients to select a better quantization method, so as to achieve the purpose of optimizing quantization. To facilitate the formation of video bit rate, a specific scanning order can transform a two-dimensional coefficient block into a one-dimensional coefficient stream. The scanning order can be Zigzag, horizontal, vertical or any other scanning order. In most existing international standards for video coding, the non-binarized levels are further binarized to obtain bins, and the binarized levels are generated by a model-based binarization arithmetic encoder to produce the final bit stream.

[0100] In the related art, the current entropy coding methods of coefficients mainly include context-based adaptive variable length coding (CAVLC) and context-based adaptive binary arithmetic coding (CABAC). Among them, CABAC is a typical entropy coding technology, which is currently supported in some coding standards. CABAC can involve several stages, including binarization, context model selection and binary arithmetic coding. In binarization, any non-binary symbol is mapped to a binary sequence. In the context model, the model probability distribution is assigned to the element being encoded (also referred to as a "binary symbol"). Then, in the subsequent binary arithmetic coding stage, the assigned probability distribution model is used to perform encoding so as to generate a bit sequence of the encoded representation of the element encoded according to the assigned model probability distribution.

[0101] For the CABAC encoding process, encoding the data symbols using CABAC at this time involves one or more of the following steps:

[0102] (1) Binarization: If the data to be encoded is not a binary value, it needs to be mapped to a series of so-called "binary numbers." Each binary number can have a value of "0" or "1" and is usually called a bin.

[0103] (2) Context modeling (determining the index number of the context model): The data to be encoded has context relevance. Using the context information provided by the encoded data, a suitable probability model is selected for the data to be encoded. This is context modeling (i.e., determining the context model). By constructing the context model, the basic probability model can adapt to the statistical characteristics that change with the video image, reduce the redundancy between data, and reduce computing costs. There are usually many context models, each of which has its own context index number, represented by ctxIdx. Each different symbol indexes its own probability lookup table based on the corresponding context model. That is, after receiving the symbol, first find the index number (ctxIdx) of the context model corresponding to the symbol, and then find its corresponding probability lookup table based on ctxIdx.

[0104] (3) Binary number coding: The probability estimation method of the probability model found by context modeling constitutes an adaptive binary arithmetic encoder. The arithmetic encoder needs to take the probability of the value of the bin (i.e., 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") as input. Its principle is the same as that of general arithmetic coding, except that the binary arithmetic coding sequence only has two symbols, "0" and "1", and the probabilities involved are also only P(0) and P(1).

[0105] (4) State update: During the arithmetic coding process, although the context model is the same, the probability is not fixed. Each time a new symbol is input, the probability of the corresponding context model will change. In other words, the probability of the selected context model is updated based on the actual encoding value of the binary number (for example, if the binary value is "1", the probability of "1" is increased).

[0106] It should be noted that, for syntax elements that are approximately uniformly distributed, selecting a bypass mode during encoding and decoding can avoid context modeling and improve the encoding and decoding speed.

[0107] It should also be noted that Exponential-Golomb coding is a lossless data compression method. Among them, k-order Exp-Golomb coding is a variable-length prefix code, which is simple to implement in hardware and does not require the establishment and storage of code tables in advance. It can not only quickly generate code words through hardware calculations, but also flexibly adjust the order k according to the information source, thus achieving high coding efficiency.

[0108] Here, the k-order exponential Golomb code for representing non-negative integers can be generated according to the following steps:

[0109] (1) Write the number in binary form, remove the lowest k bits, and then add 1;

[0110] (2) Calculate the number of bits left and subtract one from it, which is the number of leading zeros that need to be added;

[0111] (3) Add the lowest k bits removed in the first step back to the end of the bit string.

[0112] In a specific implementation, taking VVC as an example, in VVC, the transform coefficients in a transform block can be divided into multiple non-overlapping coefficient groups. The size of the coefficient group depends on the size of the transform block, generally including 1×16, 2×8, 8×2, 2×4, 4×2, 16×1, etc. Figure 5 A schematic diagram of the structure of a coefficient scanning order provided by the related technology is given. Figure 5As shown, it gives an example of encoding the coefficient groups in the to-be-decoded block and the coefficients in the coefficient groups in a diagonal scanning order in a VVC.

[0113] exist Figure 5 In the VVC coefficient encoding, the first non-zero coefficient in the lower right corner is started, and the DC coefficient in the upper left corner is ended along the predetermined scanning order. For each position of the quantized coefficient, the following possible syntax elements may be written into the bitstream to represent the quantized coefficient, mainly including sig_coeff_flag, abs_level_gtx_flag[0], par_level_flag, abs_level_gtx_flag[1], abs_remainder, dec_abs_level, coeff_sign_flag and other syntax elements. Among them, coeff_sign_flag indicates whether the quantization coefficient is non-zero, abs_level_gtx_flag[0] indicates whether the absolute value of the quantization coefficient is greater than 1, par_level_flag indicates whether the quantization coefficient is an odd number or an even number, abs_level_gtx_flag[1] indicates whether the absolute value of the quantization coefficient is greater than 3, abs_remainder and dec_abs_level indicate the remaining value to be encoded in the absolute value of the quantization coefficient (here, for abs_remainder and dec_abs_level, either one is used; and "the remaining value to be encoded in the absolute value of the quantization coefficient" can be referred to as "the absolute value of the quantization coefficient Remaining value"), coeff_sign_flag indicates the positive or negative of the non-zero quantization coefficient. The specific encoding process is described as follows:

[0114] The first step is to encode the non-zero flag bit sig_coeff_flag. If the current quantization coefficient is 0, encode 0; if the current quantization coefficient is not 0, encode 1.

[0115] In the second step, if sig_coeff_flag is 0, jump to the fifth step below. If sig_coeff_flag is 1, encode abs_level_gtx_flag[0]; if the absolute value of the current quantization coefficient is 1, encode 0; if the absolute value of the current quantization coefficient is not 1, encode 1.

[0116] Step 3: If abs_level_gtx_flag[0] is 0, jump to step 5 below. If abs_level_gtx_flag[0] is 1, encode par_level_flag; if the current quantization coefficient is an even number, encode 0; if the current quantization coefficient is an odd number, encode 1. Then encode abs_level_gtx_flag[1]; if the absolute value of the current quantization coefficient is less than or equal to 3, encode 0; if the absolute value of the current quantization coefficient is greater than 3, encode 1.

[0117] Step 4: If abs_level_gtx_flag[1] is 0, the quantization coefficient at this position is encoded. If abs_level_gtx_flag[1] is 1, encode the absolute value of the current quantization coefficient, abs_remainder and dec_abs_level.

[0118] Step 5: If sig_coeff_flag is 0, the quantization coefficient at this position is encoded. If sig_coeff_flag is 1, the coefficient sign flag coeff_sign_flag is encoded according to the positive or negative nature of the current quantization coefficient. If the quantization coefficient is positive, 0 is encoded; if the quantization coefficient is negative, 1 is encoded.

[0119] The corresponding relationship between each flag bit (ie, syntax element) and the absolute value of the quantization coefficient is shown in Table 1 below.

[0120] Table 1

[0121]

[0122] In Table 1, |q k | represents the absolute value of the quantization coefficient, sig represents a non-zero flag, which is represented by the syntax element sig_coeff_flag; gt1 represents whether the absolute value of the quantization coefficient is greater than 1, which is represented by the syntax element abs_level_gtx_flag[0]; par represents whether the quantization coefficient is an odd number or an even number, which is represented by the syntax element par_level_flag; gt3 represents whether the absolute value of the quantization coefficient is greater than 3, which is represented by the syntax element abs_level_gtx_flag[1]; rem represents the absolute value remaining value of the quantization coefficient, which is represented by the syntax elements abs_remainder and dec_abs_level.

[0123] Among them, the absolute value of the quantization coefficient is calculated as: |q k|=sig+gt1+par+2×gt3+2×rem. When a flag does not exist, its value is treated as 0. It should also be noted that the absolute value remainder of the quantized coefficient (abs_remainder and dec_abs_level) and the sign flag (coeff_sign_flag) are entropy coded using the bypass mode, and all other flags are entropy coded using the context model-based adaptive coding method.

[0124] In another specific implementation, taking AVS as an example, in AVS3, the coefficients to be encoded are usually limited to a range through SRCC technology. The coefficient scanning method is to start from the lower right corner in the range and scan in the reverse Zigzag order until the DC coefficient in the upper left corner ends. The coefficient scanning order based on the scanning area is as follows: Figure 6 shown.

[0125] For the quantization coefficient at each position, the following possible syntax elements may be written into the bitstream to represent the quantization coefficient, mainly including sig_flag, coeff_abs_level_greater1_flag, coeff_abs_level_greater2_flag, coeff_abs_level_remaining, coeff_sign and other syntax elements. Among them, sig_flag indicates whether the quantization coefficient is non-zero, coeff_abs_level_greater1_flag indicates whether the absolute value of the quantization coefficient is greater than 1, coeff_abs_level_greater2_flag indicates whether the absolute value of the quantization coefficient is greater than 2, coeff_abs_level_remaining indicates that the absolute value of the quantization coefficient is greater than 2, and its value is the absolute value of the quantization coefficient minus 3; coeff_sign indicates the positive or negative of the non-zero quantization coefficient. The specific encoding process is described as follows:

[0126] The first step is to encode the non-zero flag bit sig_flag. If the current quantization coefficient is 0, encode 0; if the current quantization coefficient is not 0, encode 1.

[0127] In the second step, if sig_flag is 0, jump to the fifth step below. If sig_flag is 1, encode coeff_abs_level_greater1_flag; if the absolute value of the current quantization coefficient is 1, encode 0; if the absolute value of the current quantization coefficient is not 1, encode 1.

[0128] Step 3: If coeff_abs_level_greater1_flag is 0, jump to step 5 below. If coeff_abs_level_greater1_flag is 1, encode coeff_abs_level_greater2_flag; if the absolute value of the current quantization coefficient is 2, encode 0; if the absolute value of the current quantization coefficient is greater than 2, encode 1.

[0129] Step 4: If coeff_abs_level_greater2_flag is 0, the encoding of the quantization coefficient at this position is completed. If coeff_abs_level_greater2_flag is 1, the absolute value remaining value coeff_abs_level_remaining of the current quantization coefficient is encoded.

[0130] Step 5: If sig_flag is 0, the quantization coefficient at this position is encoded. If sig_flag is 1, the coefficient sign flag coeff_sign is encoded according to the positive or negative nature of the current quantization coefficient. If the quantization coefficient is positive, 0 is encoded; if the quantization coefficient is negative, 1 is encoded.

[0131] The corresponding relationship between each flag bit (ie, syntax element) and the absolute value of the quantization coefficient is shown in Table 2 below.

[0132] Table 2

[0133]

[0134] In Table 2, |q k | represents the absolute value of the quantization coefficient, sig represents a non-zero flag, which is represented by the syntax element sig_flag; gt1 represents whether the absolute value of the quantization coefficient is greater than 1, which is represented by the syntax element coeff_abs_level_greater1_flag; gt2 represents whether the absolute value of the quantization coefficient is greater than 2, which is represented by the syntax element coeff_abs_level_greater2_flag; rem represents the remaining value of the absolute value of the quantization coefficient, which is represented by the syntax element coeff_abs_level_remaining.

[0135] Among them, the absolute value of the quantization coefficient is calculated as: |q k|=sig+gt1+gt2+rem. When a flag does not exist, its value is treated as 0. It should also be noted that the absolute value remaining value (coeff_abs_level_remaining) of the quantized coefficient and the sign flag (coeff_sign) are entropy coded using the bypass mode, and all other flags are entropy coded using the adaptive binary arithmetic coding method based on the context model.

[0136] It should also be noted that video coding, which is usually referred to in video standards, may include two parts: encoding and decoding. Therefore, video coding includes an encoding method on the encoder side and a decoding method on the decoder side. The present application embodiment first describes the decoding method on the decoder side.

[0137] In the embodiment of the present application, a method for entropy coding the quantized coefficients obtained after quantization is mainly proposed. Here, there is no specific limitation on the scanning method of the quantized coefficients, for example, diagonal, zigzag, horizontal, vertical, 4x4 sub-block scanning or any other scanning are all valid scanning methods.

[0138] Specifically, for the current quantization coefficient position to be decoded, the adaptive binary arithmetic coding mode of the first context model can be used to parse the bitstream to obtain the value of the non-zero identification information. In some embodiments, after S401, the method may further include: when the value of the non-zero identification information is the second value, determining the reconstructed quantization coefficient corresponding to the quantization coefficient position according to the value of the non-zero identification information.

[0139] It should be noted that the non-zero flag information can be represented by the syntax element sig_coeff_flag, or by the syntax element sig_flag. Generally speaking, the non-zero flag information can also be referred to as sig.

[0140] It should also be noted that, in some embodiments, the method may further include: if the value of the non-zero identification information is a first value, determining that the reconstructed quantization coefficient is non-zero; if the value of the non-zero identification information is a second value, determining that the reconstructed quantization coefficient is zero.

[0141] In the embodiment of the present application, the first value may be 1, and the second value may be 0.

[0142] It should be noted that, in another specific example, the first value can be set to true, and the second value can be set to false. Even in another specific example, the first value can be set to 0, and the second value can be set to 1; or, the first value can be set to false, and the second value can be set to true. No specific limitation is made here.

[0143] That is to say, taking the first value as 1 and the second value as 0 as an example, if the value of the decoded non-zero identification information is 1, then it can be determined that the reconstructed quantization coefficient is non-zero, and the code stream needs to be further parsed. If the value of the decoded non-zero identification information is 0, then it can be determined that the reconstructed quantization coefficient is zero, and the position of the next quantization coefficient to be decoded can be determined.

[0144] It should also be noted that the values ​​of the X preset identification information can be represented by the i-th preset identification information, where i is a natural number greater than zero and less than or equal to X. Here, the i-th preset identification information can be represented by gti, and the i-th preset identification information is used to indicate whether the absolute value of the reconstructed quantization coefficient is greater than i. In some embodiments, the method may also include:

[0145] If the value of the i-th preset identification information is the first value, it is determined that the absolute value of the reconstructed quantization coefficient is greater than i;

[0146] If the value of the i-th preset identification information is the second value, it is determined that the absolute value of the reconstructed quantization coefficient is less than or equal to i.

[0147] That is to say, taking the first value as 1 and the second value as 0 as an example, if the value of the i-th preset identification information obtained by decoding is 1, then it can be determined that the absolute value of the reconstructed quantization coefficient is greater than i, and at this time it is necessary to continue parsing the bitstream to obtain the value of the i+1-th preset identification information. If the value of the i-th preset identification information obtained by decoding is 0, then it can be determined that the absolute value of the reconstructed quantization coefficient is less than or equal to i, and at this time the absolute value of the reconstructed quantization coefficient corresponding to the position of the quantization coefficient can be determined according to the decoding result.

[0148] Specifically, when i is equal to X, for the Xth preset identification information, the method may further include: if the value of the Xth preset identification information is a first value, determining that the absolute value of the reconstructed quantization coefficient is greater than X; if the value of the Xth preset identification information is a second value, determining that the absolute value of the reconstructed quantization coefficient is less than or equal to X.

[0149] Thus, after S402, that is, after obtaining the value of the Xth preset identification information, the method may further include:

[0150] When the value of the Xth preset identification information is the second value, the absolute value of the reconstructed quantization coefficient corresponding to the quantization coefficient position is determined according to the value of the non-zero identification information and the values ​​of the X preset identification information.

[0151] That is to say, taking the first value as 1 and the second value as 0 as an example, if the decoded value of the Xth preset identification information is 1, then it can be determined that the absolute value of the reconstructed quantization coefficient is greater than X. At this time, it is also necessary to determine the target order of the exponential Golomb code, so as to use the exponential Golomb decoding algorithm of the target order to parse the bit stream to obtain the residual value of the absolute value of the reconstructed quantization coefficient. On the contrary, if the decoded value of the Xth preset identification information is 0, then it can be determined that the absolute value of the reconstructed quantization coefficient is less than or equal to X. At this time, it is no longer necessary to decode to obtain the residual value of the absolute value of the reconstructed quantization coefficient. The absolute value of the reconstructed quantization coefficient corresponding to the position of the quantization coefficient can be determined directly according to the value of the non-zero identification information and the values ​​of the X preset identification information.

[0152] It should also be noted that, when the value of the Xth preset identification information is the first value, it is necessary to determine the target order of the exponential Golomb code. In a possible implementation, determining the target order of the exponential Golomb code may include: setting the value of the target order to a fixed constant greater than zero.

[0153] In a specific example, the value of the target order is set to 1.

[0154] It should be noted that, assuming that the target order can be represented by k, the exponential Golomb code of the target order can be marked as EGK(k), where k is an integer greater than 0. For example, for an exponential Golomb code of order 1, it can be represented by EGK(1).

[0155] In addition, as for the target order, in the related art, the target order is zero order. In the embodiment of the present application, the target order can be 1st order, 2nd order, 3rd order, etc. In other words, the value of the target order can be a preset fixed constant, such as 1, 2, 3, etc. Usually, the target order is 1st order, that is, the 1st order exponential Golomb decoding algorithm can be used for decoding, so as to obtain the residual value of the absolute value of the reconstructed quantization coefficient.

[0156] It should also be noted that the target order can also be flexibly adjusted during the encoding and decoding process. In another possible implementation, the determination of the target order of the exponential Golomb code may include:

[0157] Determining the mode identification information used for the position of the quantized coefficient to be decoded;

[0158] A target order of the exponential Golomb code is determined according to the mode identification information.

[0159] In a specific example, determining the target order of the exponential Golomb code according to the mode identification information may include:

[0160] If the mode identification information indicates that the transform skip mode is used, determining that the value of the target order is set to 1;

[0161] If the mode identification information indicates that the transform skip mode is not used, it is determined that the value of the target order is set to 0.

[0162] It should be noted that the target order can be determined based on other identification information, such as mode identification information. In the decoder, the mode identification information used by the quantization coefficient position to be decoded can be determined by parsing the bitstream; then, the target order of the exponential Golomb code can be determined based on the mode identification information.

[0163] Exemplarily, it is assumed that the mode identification information is used to indicate whether the transform skip mode is used. Thus, after determining the mode identification information used, if the mode identification information indicates that the transform skip mode is used, then it can be determined that the value of the target order is set to 1, that is, the 1st-order exponential Golomb decoding algorithm is used to parse the bitstream; if the mode identification information indicates that the transform skip mode is not used, then it can be determined that the value of the target order is set to 0, that is, the 0th-order exponential Golomb decoding algorithm is used to parse the bitstream, so that the residual value of the absolute value of the reconstructed quantization coefficient can be obtained.

[0164] In other words, the target order may be a preset fixed constant, or may be flexibly adjusted during the encoding and decoding process, such as determining how to adjust the target order based on other identification information; the embodiments of the present application do not make specific limitations.

[0165] In this way, after determining the target order of the exponential Golomb code, the exponential Golomb decoding algorithm of the target order is used to parse the bit stream, so that the residual value of the absolute value of the reconstructed quantization coefficient can be obtained; then, according to the value of the non-zero identification information, the values ​​of the X preset identification information and the residual value of the absolute value of the reconstructed quantization coefficient, the absolute value of the reconstructed quantization coefficient can be determined.

[0166] Further, in the embodiment of the present application, for X preset identification information, in a specific example, the value of X may be equal to 4. Thus, the four preset identification information may include: first preset identification information, second preset identification information, third preset identification information and fourth preset identification; wherein,

[0167] The first preset identification information is used to indicate whether the absolute value of the reconstructed quantization coefficient is greater than 1;

[0168] The second preset identification information is used to indicate whether the absolute value of the reconstructed quantization coefficient is greater than 2;

[0169] The third preset identification information is used to indicate whether the absolute value of the reconstructed quantization coefficient is greater than 3;

[0170] The fourth preset identification information is used to indicate whether the absolute value of the reconstructed quantization coefficient is greater than 4.

[0171] It should be noted that the first preset identification information can be represented by gt1, the second preset identification information can be represented by gt2, the third preset identification information can be represented by gt3, and the fourth preset identification information can be represented by gt4. Here, gt1, gt2, gt3, and gt4 can use the same set of context models, or gt1 and gt2 can use a set of context models, and gt3 and gt4 can use a set of context models; this embodiment of the application does not specifically limit this.

[0172] In some embodiments, if gt1, gt2, gt3, and gt4 can use the same context model (i.e., the second context model), then when the value of the non-zero identification information is the first value, the adaptive binary arithmetic coding mode of the second context model is used to parse the bitstream to obtain the values ​​of the X preset identification information, which may include:

[0173] Parsing the bit stream using the adaptive binary arithmetic coding mode of the second context model to obtain a value of the first preset identification information;

[0174] If the value of the first preset identification information is the first value, parsing the bitstream using the adaptive binary arithmetic coding mode of the second context model to obtain the value of the second preset identification information;

[0175] If the value of the second preset identification information is the first value, parsing the bitstream using the adaptive binary arithmetic coding mode of the second context model to obtain the value of the third preset identification information;

[0176] If the value of the third preset identification information is the first value, the bit stream is parsed using the adaptive binary arithmetic coding mode of the second context model to obtain the value of the fourth preset identification information.

[0177] In some embodiments, the second context model may include a second-first context model and a second-second context model. If gt1 and gt2 use a set of context models (i.e., the second-first context model) and gt3 and gt4 use a set of context models (i.e., the second-second context model), then when the value of the non-zero identification information is the first value, the adaptive binary arithmetic coding mode using the second context model to parse the bitstream and obtain the values ​​of the X preset identification information may include:

[0178] Parsing the bitstream using the adaptive binary arithmetic coding mode of the second context model to obtain a value of the first preset identification information;

[0179] If the value of the first preset identification information is the first value, parsing the bitstream using the adaptive binary arithmetic coding mode of the second-first context model to obtain the value of the second preset identification information;

[0180] If the value of the second preset identification information is the first value, parsing the bitstream using the adaptive binary arithmetic coding mode of the second second context model to obtain the value of the third preset identification information;

[0181] If the value of the third preset identification information is the first value, the bit stream is parsed using the adaptive binary arithmetic coding mode of the second second context model to obtain the value of the fourth preset identification information.

[0182] That is to say, in a specific example, the first context model, the second-first context model and the second-second context model are different. That is to say, the non-zero identification information can use a set of context models (i.e., the first context model), gt1 and gt2 share a set of context models (i.e., the second-first context model), and gt3 and gt4 share a set of context models (i.e., the second-second context model). Or, in another specific example, the second-first context model and the second-second context model are completely corresponding, that is, gt1, gt2, gt3 and gt4 can share a set of context models (i.e., the second context model).

[0183] It is particularly noted that the number of context models in each set is not specifically limited, and the method of determining the index number of the context model is also not specifically limited. In general, the index number of the context model can be determined by default using an existing solution in the relevant technology.

[0184] Further, if the value of gt4 is equal to 1, it means that the absolute value of the reconstructed quantization coefficient is greater than 4, and there must be a residual value of the absolute value of the reconstructed quantization coefficient. In some embodiments, when the value of the Xth preset identification information is the first value, determining the target order of the exponential Golomb code may include:

[0185] When the value of the fourth preset identification information is the first value, a target order of the exponential Golomb code is determined to perform the step of parsing the bit stream using the exponential Golomb decoding algorithm of the target order to obtain the residual value of the absolute value of the reconstructed quantization coefficient.

[0186] In a specific example, for S404, determining the reconstructed quantization coefficient absolute value corresponding to the quantization coefficient position according to the value of the non-zero identification information, the values ​​of the X preset identification information, and the remaining value of the reconstructed quantization coefficient absolute value may include:

[0187] The value of the non-zero identification information, the value of the first preset identification information, the value of the second preset identification information, the value of the third preset identification information, the value of the fourth preset identification information and the remaining value of the absolute value of the reconstructed quantization coefficient are added to obtain the absolute value of the reconstructed quantization coefficient corresponding to the quantization coefficient position.

[0188] It should be noted that, when the value of the fourth preset identification information is the first value, specifically, it means that the value of gt4 is equal to 1. At this time, the bit stream is parsed using the exponential Columbus decoding algorithm of the target order to obtain the residual value of the absolute value of the reconstructed quantization coefficient (expressed by rem); then the values ​​of sig, gt1, gt2, gt3, gt4 and rem are added together to obtain the absolute value of the reconstructed quantization coefficient corresponding to the position of the quantization coefficient.

[0189] Furthermore, after obtaining the absolute value of the reconstructed quantization coefficient, the value of the sign identification information can be further decoded to determine the positive and negative characteristics of the reconstructed quantization coefficient. In some embodiments, the method can also include:

[0190] Use bypass mode to parse the code stream and obtain the value of the symbol identification information;

[0191] The reconstructed quantization coefficient corresponding to the quantization coefficient position is determined according to the value of the sign identification information and the absolute value of the reconstructed quantization coefficient.

[0192] It should be noted that the bypass mode here refers to entropy decoding using an equal probability model. Wherein, for the positive and negative characteristics of the reconstructed quantization coefficient, in some embodiments, the method may further include: if the value of the sign identification information is a first value, determining that the reconstructed quantization coefficient is a negative value; if the value of the sign identification information is a second value, determining that the reconstructed quantization coefficient is a positive value.

[0193] That is to say, taking the first value as 1 and the second value as 0 as an example, if the value of the decoded symbol identification information is 1, then it can be determined that the reconstructed quantization coefficient is a negative value; if the value of the decoded symbol identification information is 0, then it can be determined that the reconstructed quantization coefficient is a positive value.

[0194] Furthermore, it should be noted that the order of the above decoding process is a relative order, and the actual situation can be adjusted according to specific standards. In a possible implementation, the method may also include:

[0195] Determining a coefficient block and a preset scanning order of the coefficient block; wherein the coefficient block includes at least one quantized coefficient position to be decoded;

[0196] According to a preset scanning order, the value of at least one non-zero identification information corresponding to the position of the quantized coefficient to be decoded and the values ​​of X preset identification information are obtained in sequence by parsing the bitstream;

[0197] According to a preset scanning order, by parsing the bitstream, sequentially obtaining residual values ​​of the absolute value of the reconstructed quantization coefficient corresponding to at least one quantization coefficient position to be decoded;

[0198] According to the value of the non-zero identification information, the values ​​of the X preset identification information and the remaining value of the absolute value of the reconstructed quantization coefficient, the absolute value of the reconstructed quantization coefficient corresponding to at least one quantization coefficient position to be decoded is determined.

[0199] It should be noted that the preset scanning order may be diagonal, zigzag, horizontal, vertical, 4×4 sub-block scanning or any other scanning order, and the embodiment of the present application does not specifically limit it.

[0200] It should also be noted that this implementation is based on the VVC standard as an example. In VVC, the decoding order in the related art is to first decode the sig, gt1, par, gt3 of each reconstructed quantization coefficient absolute value in sequence according to the preset scanning order; then decode the rem of each reconstructed quantization coefficient absolute value in sequence according to the preset scanning order. In the embodiment of the present application, the decoding order of the above process is to first decode the sig, gt1, gt2, gt3, gt4 of each reconstructed quantization coefficient absolute value in sequence according to the preset scanning order; then decode the rem of each reconstructed quantization coefficient absolute value in sequence according to the preset scanning order.

[0201] In another possible implementation, the method may further include:

[0202] Determining a coefficient block and a preset scanning order of the coefficient block; wherein the coefficient block includes at least one quantized coefficient position to be decoded;

[0203] According to a preset scanning order, the value of non-zero identification information corresponding to at least one quantization coefficient position to be decoded is obtained in sequence by parsing the bitstream;

[0204] According to a preset scanning order, by parsing the bitstream, sequentially obtaining values ​​of X preset identification information corresponding to at least one quantization coefficient position to be decoded;

[0205] According to a preset scanning order, by parsing the bitstream, sequentially obtaining residual values ​​of the absolute value of the reconstructed quantization coefficient corresponding to at least one quantization coefficient position to be decoded;

[0206] According to the value of the non-zero identification information, the values ​​of the X preset identification information and the remaining value of the absolute value of the reconstructed quantization coefficient, the absolute value of the reconstructed quantization coefficient corresponding to at least one quantization coefficient position to be decoded is determined.

[0207] It should be noted that this implementation method takes the AVS standard as an example. In AVS, the decoding order is to first decode the sig of each reconstructed quantization coefficient absolute value in sequence according to the preset scanning order, and then decode the gt1 and gt2 of each reconstructed quantization coefficient absolute value in sequence according to the preset scanning order, and finally decode the rem of each reconstructed quantization coefficient absolute value in sequence according to the preset scanning order. In the embodiment of the present application, the decoding order of the above process is to first decode the sig of each reconstructed quantization coefficient absolute value in sequence according to the preset scanning order, and then decode the gt1, gt2, gt3, and gt4 of each reconstructed quantization coefficient absolute value in sequence according to the preset scanning order, and finally decode the rem of each reconstructed quantization coefficient absolute value in sequence according to the preset scanning order.

[0208] In addition, in some embodiments, the method may further include:

[0209] After all the reconstructed quantized coefficients of the decoded block are inversely quantized, a reconstructed transform block is determined according to the obtained reconstructed transform coefficients;

[0210] An inverse transform process is performed on the reconstructed transform block to obtain a reconstructed residual block.

[0211] Furthermore, in some embodiments, the method may also include:

[0212] Parse the bitstream and obtain prediction mode parameters;

[0213] Performing prediction processing on the current block using the prediction mode parameters to obtain a prediction block of the decoded block;

[0214] A reconstructed block of the decoded block is determined according to the reconstructed residual block and the prediction block.

[0215] It should be noted that after all the reconstructed quantized coefficients of the decoded block are inversely quantized, the obtained reconstructed transform coefficients can be combined into a reconstructed transform block, whose size parameter is M. 1 ×M 2 Then, the reconstructed transform block is inversely transformed to obtain a reconstructed residual block. The inverse transform process is the inverse process of the transform process in the encoder. It should be noted that if some coefficients of the encoder are not transformed during the transform process, then these coefficients do not need to be inversely transformed.

[0216] In short, the level is referred to as the quantization coefficient below. The embodiment of the present application provides a new entropy coding method for the quantized level, which specifically improves the coding method for the quantized level. Here, the scanning method for the quantized level is not specifically limited, and diagonal, Zigzag, horizontal, vertical, 4×4 sub-block scanning or any other scanning are all valid scanning methods.

[0217] The level coding of the embodiment of the present application mainly includes the following four parts:

[0218] The first part is the non-zero flag of the level (represented by sig), which is used to indicate whether the level is a non-zero coefficient.

[0219] The second part is the level absolute value greater than X flag (expressed as gtx), which is used to indicate whether the level is greater than X, where X is a natural number greater than 0. This part contains at least one level absolute value greater than X flag; specifically, in the embodiment of the present application, it may include: a level absolute value greater than 1 flag (expressed as gt1), a level absolute value greater than 2 flag (expressed as gt2), a level absolute value greater than 3 flag (expressed as gt3), and a level absolute value greater than 4 flag (expressed as gt4).

[0220] The third part is the residual value of the absolute value of the level (rem), and the order k of the exponential Golomb code used to encode the residual value can be flexibly adjusted according to the level flag. In the embodiment of the present application, the value of k can be 1, that is, the first-order exponential Golomb code is used, represented by EGK(1).

[0221] The fourth part is the sign flag of the level (represented by coeff_sign), which is used to indicate the positive or negative nature of the level.

[0222] Furthermore, in the application embodiment, the encoding method of the absolute value of the level is shown in Table 3.

[0223] Table 3

[0224]

[0225] In Table 3, |q k | indicates the absolute value of the level, sig indicates the non-zero flag bit, i.e., non-zero identification information; gt1 indicates whether the absolute value of the level is greater than 1; gt2 indicates whether the absolute value of the level is greater than 2; gt3 indicates whether the absolute value of the level is greater than 3; gt4 indicates whether the absolute value of the level is greater than 4; rem indicates the remaining value of the absolute value of the level. The absolute value of the level is calculated as follows:

[0226] |q k |=sig+gt1+gt2+gt3+gt4+rem (1)

[0227] In the CABAC process, sig can use a set of context models alone, i.e., the first context model described in the embodiment of the present application, gt1 and gt2 can use a set of context models together, i.e., the second context model described in the embodiment of the present application, and gt3 and gt4 can use a set of context models together, i.e., the second context model described in the embodiment of the present application. Among them, the number of each set of context models is not specifically limited, and the method of determining the index number of the context model is not specifically limited. The embodiment of the present application defaults to determining the index number of the context model according to the existing scheme of the relevant technology.

[0228] In a specific example, the method of the embodiment of the present application is implemented in a decoder as follows:

[0229] First, the decoder obtains the bitstream information and parses the current decoding block. The levels are parsed according to the preset scanning order. Secondly, after the decoder determines the position of the current quantization coefficient to be decoded, it starts decoding the current coefficient. The specific process is as follows:

[0230] The first step is to parse the non-zero flag sig of the level. Select the first context model for decoding, and determine the index number of the context model according to the position of the coefficient and the previously decoded coefficient information. Determine the context model according to the index number, and then parse the bitstream according to the CABAC mode.

[0231] In the second step, if sig is 1, jump to the third step; otherwise, jump to the eleventh step.

[0232] Step 3: The absolute value of the parsing level is greater than 1, flag gt1. Select the second context model for decoding, determine the index number of the context model according to the position of the coefficient and the previously decoded coefficient information, determine the context model according to the index number, and parse the bitstream according to the CABAC mode.

[0233] Step 4: If gt1 is 1, jump to step 5; otherwise, jump to step 11.

[0234] Step 5: The absolute value of the parsing level is greater than 2, flag gt2. Select the second context model for decoding, determine the index number of the context model according to the position of the coefficient and the previously decoded coefficient information, determine the context model according to the index number, and parse the bitstream according to the CABAC mode.

[0235] Step 6: If gt2 is 1, jump to step 5; otherwise, jump to step 11.

[0236] Step 7: The absolute value of the parsing level is greater than 3, flag gt3. Select the second context model for decoding, determine the index number of the context model according to the position of the coefficient and the previously decoded coefficient information, determine the context model according to the index number, and parse the bitstream according to the CABAC mode.

[0237] Step 8. If gt3 is 1, jump to step 5; otherwise, jump to step 11.

[0238] Step 9: The absolute value of the parsing level is greater than 4, flag gt4. Select the second context model for decoding, determine the index number of the context model according to the position of the coefficient and the previously decoded coefficient information, determine the context model according to the index number, and parse the bitstream according to the CABAC mode.

[0239] Step 10. If gt4 is 1, parse the residual value rem of the absolute value of the level according to the 1st-order exponential Golomb decoding algorithm; otherwise, jump to step 11.

[0240] Step 11: Derivation of the absolute value of the level based on the above decoding result. Then, the position of the next quantized coefficient to be decoded is determined according to the scanning order.

[0241] It is particularly noted that the order of the above process is a relative order, and the actual situation is adjusted according to the specific standard. Specifically, in the VVC standard, the decoding order is to first decode the sig, gt1, par, gt3 of the absolute value of each level in sequence according to the scanning order; then decode the rem of the absolute value of each level in sequence according to the scanning order. At this time, the decoding order of the embodiment of the present application is to first decode the sig, gt1, gt2, gt3, gt4 of the absolute value of each level in sequence according to the scanning order; then decode the rem of the absolute value of each level in sequence according to the scanning order. In the AVS standard, the decoding order is to first decode the sig of the absolute value of each level in sequence according to the scanning order, and then decode the gt1 and gt2 of the absolute value of each level in sequence according to the scanning order; finally, decode the rem of the absolute value of each level in sequence according to the scanning order. At this time, the decoding order of the embodiment of the present application is to first decode the sig of the absolute value of each level in sequence according to the scanning order, and then decode the gt1, gt2, gt3, gt4 of the absolute value of each level in sequence according to the scanning order; finally, decode the rem of the absolute value of each level in sequence according to the scanning order.

[0242] It is also particularly noted that the second context model used by the above gt3 and gt4 can completely correspond to the second context model used by gt1 and gt2. In other words, at this time, gt1, gt2, gt3, and gt4 use the second context model together. In addition, the above-mentioned first-order exponential Golomb code can also be zero-order, second-order, third-order, etc., which can be pre-set or flexibly adjusted to other orders.

[0243] It should also be noted that the coefficient entropy coding of the embodiment of the present application is not specifically targeted at a particular video coding standard, but is a universal coefficient entropy coding method. In this way, due to the new coefficient entropy coding method provided by the embodiment of the present application, GT3 and GT4 identification information is introduced, and the corresponding context model is constructed, and the corresponding residual value encoding / decoding method is adjusted on this basis, thereby improving the original transform coefficient entropy coding method. It can better utilize the characteristics of adaptive coding, effectively save bit rate, and thus improve the overall encoding and decoding performance.

[0244] In addition, the technical solution of the embodiment of the present application can also be extended and applied to other standards, such as MPEG, AOM or any customized coefficient entropy coding method.

[0245] The embodiment of the present application provides a coefficient decoding method, which is applied to a decoder. Based on the position of the quantization coefficient to be decoded, the adaptive binary arithmetic coding mode of the first context model is used to parse the bitstream to obtain the value of the non-zero identification information; when the value of the non-zero identification information is the first value, the adaptive binary arithmetic coding mode of the second context model is used to parse the bitstream to obtain the values ​​of X preset identification information; wherein X is a natural number greater than zero; when the value of the Xth preset identification information is the first value, the target order of the exponential Golomb code is determined, and the exponential Golomb decoding algorithm of the target order is used to parse the bitstream to obtain the residual value of the absolute value of the reconstructed quantization coefficient; wherein the target order is an integer greater than zero; according to the value of the non-zero identification information, the values ​​of the X preset identification information and the residual value of the absolute value of the reconstructed quantization coefficient, the absolute value of the reconstructed quantization coefficient corresponding to the position of the quantization coefficient is determined. In this way, since the statistical characteristics between the quantization coefficients at each position are fully utilized, not only the newly introduced preset identification information is entropy encoded through the context model, but also the encoding mode is adjusted according to the absolute residual value of the quantization coefficient. This can better utilize the adaptive coding characteristics in the encoding and decoding process, thereby saving bit rate and improving encoding and decoding performance.

[0246] In another embodiment of the present application, see Figure 7 , which shows a schematic flow chart of a coefficient encoding method provided by an embodiment of the present application. Figure 7 As shown, the method may include:

[0247] S701: Determine quantization coefficients to be encoded.

[0248] S702: Determine a value of non-zero identification information according to the quantization coefficient, and perform entropy coding on the value of the non-zero identification information using an adaptive binary arithmetic coding mode of a first context model.

[0249] S703: When the value of the non-zero identification information is the first value, determine the values ​​of X preset identification information according to the quantization coefficient, and use the adaptive binary arithmetic coding mode of the second context model to entropy encode the values ​​of the X preset identification information in sequence; wherein X is a natural number greater than zero.

[0250] S704: When the value of the Xth preset identification information is the first value, determine the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code, and use the exponential Golomb coding algorithm of the target order to entropy encode the absolute value residual value of the quantization coefficient.

[0251] S705: Write the bit information obtained after encoding into the bit stream.

[0252] It should be noted that the encoding method in the embodiment of the present application is mainly applied to encoders. Figure 2 The composition structure of the encoder 100 is shown, and the encoding method of the embodiment of the present application is applied to the "entropy coding unit 115" part in the encoder 100. For the entropy coding unit 115, an adaptive binary arithmetic coding mode based on a context model can be used to entropy encode the quantization coefficient, and then the absolute value residual value of the quantization coefficient is entropy encoded using an exponential Golomb coding algorithm of a target order.

[0253] It should also be noted that the video coding generally referred to in the video standard may include two parts: encoding and decoding. Therefore, video coding includes an encoding method on the encoder side and a decoding method on the decoder side. The embodiment of the present application describes the encoding method on the encoder side.

[0254] In the embodiment of the present application, a method of entropy coding the quantized coefficients obtained after quantization is mainly proposed. Here, there is no specific limitation on the scanning method of the quantized coefficients, for example, diagonal, zigzag, horizontal, vertical, 4×4 sub-block scanning or any other scanning are all valid scanning methods.

[0255] Specifically, after the video signal is processed by intra-frame or inter-frame prediction, the residual of the block to be decoded can be obtained. The residual signal may be further transformed to obtain the transform coefficient (also referred to as "coefficient", coefficient). For the convenience of description, the untransformed residual signal and the transformed residual signal can be collectively referred to as transform coefficients. In order to perform effective compression, the transform coefficients also need to be quantized. Quantization is usually used to reduce the dynamic range of the transform coefficients, so as to achieve the purpose of expressing the video with fewer code words. The quantized value can be called a "quantization coefficient", which is also usually called a level, quantization level or quantization level. The quantization operation is usually performed by dividing the transform coefficient by the quantization step size, and the quantization step size is determined by the quantization factor transmitted in the bitstream.

[0256] In some embodiments, after determining the quantized coefficients to be encoded, the method may further include:

[0257] If the quantization coefficient is non-zero, determining that the value of the non-zero identification information is a first value;

[0258] If the quantization coefficient is zero, the value of the non-zero identification information is determined to be a second value.

[0259] In the embodiment of the present application, the first value may be 1, and the second value may be 0.

[0260] It should be noted that, in another specific example, the first value can be set to true, and the second value can be set to false. Even in another specific example, the first value can be set to 0, and the second value can be set to 1; or, the first value can be set to false, and the second value can be set to true. No specific limitation is made here.

[0261] Furthermore, the method may also include: when the value of the non-zero identification information is a second value, writing the bit information obtained after encoding into a bit stream.

[0262] That is to say, taking the first value as 1 and the second value as 0 as an example, if the quantization coefficient is non-zero, then it can be determined that the value of the non-zero identification information is 1, and at this time it is necessary to continue to determine other identification information (such as the values ​​of X preset identification information). If the quantization coefficient is zero, then it can be determined that the value of the non-zero identification information is 0, which means that the encoding of the quantization coefficient is completed. After the bit information obtained after encoding is written into the bit stream, the next quantization coefficient to be encoded can be determined.

[0263] It should also be noted that the values ​​of the X preset identification information can be represented by the i-th preset identification information, where i is a natural number greater than zero and less than or equal to X. Here, the i-th preset identification information can be represented by gti, and the i-th preset identification information is used to indicate whether the absolute value of the quantization coefficient is greater than i. In some embodiments, determining the values ​​of the X preset identification information according to the quantization coefficient may include:

[0264] If the absolute value of the quantization coefficient is greater than i, determining that the value of the i-th preset identification information is the first value;

[0265] If the absolute value of the quantization coefficient is less than or equal to i, the value of the i-th preset identification information is determined to be the second value.

[0266] That is to say, taking the first value as 1 and the second value as 0 as an example, if the absolute value of the quantization coefficient is greater than i, then it can be determined that the value of the i-th preset identification information is 1, and at this time, it is necessary to continue to determine the value of the i+1-th preset identification information. If the absolute value of the quantization coefficient is less than or equal to i, then it can be determined that the value of the i-th preset identification information is 0, and at this time, the value of the i+1-th preset identification information will no longer be determined.

[0267] Specifically, when i is equal to X, for the Xth preset identification information, determining the values ​​of the X preset identification information according to the quantization coefficient may include: if the absolute value of the quantization coefficient is greater than X, determining the value of the Xth preset identification information to be a first value; if the absolute value of the quantization coefficient is less than or equal to X, determining the value of the Xth preset identification information to be a second value.

[0268] Thus, in some embodiments, that is, after determining the value of the Xth preset identification information, the method may further include: when the value of the Xth preset identification information is the second value, writing the bit information obtained after encoding into the bit stream.

[0269] That is to say, taking the first value as 1 and the second value as 0 as an example, if the absolute value of the quantization coefficient is greater than X, then it can be determined that the value of the Xth preset identification information is 1, and at this time it is necessary to continue to determine the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code, so as to use the exponential Golomb coding algorithm of the target order to perform entropy coding on the absolute value residual value of the quantization coefficient. If the absolute value of the quantization coefficient is less than or equal to X, then it can be determined that the value of the Xth preset identification information is 0, which means that it is no longer necessary to determine the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code, and the encoding of the quantization coefficient is completed. After the bit information obtained after encoding is written into the bit stream, the next quantization coefficient to be encoded can be determined.

[0270] It should also be noted that, when the value of the Xth preset identification information is the first value, it is necessary to determine the target order of the exponential Golomb code. In a possible implementation, determining the target order of the exponential Golomb code may include: setting the value of the target order to a fixed constant greater than zero.

[0271] In a specific example, the value of the target order is set to 1.

[0272] It should be noted that, assuming that the target order can be represented by k, the exponential Golomb code of the target order can be marked as EGK(k), where k is an integer greater than 0. For example, for an exponential Golomb code of order 1, it can be represented by EGK(1).

[0273] In addition, as for the target order, in the related art, the target order is zero order. In the embodiment of the present application, the target order can be 1st order, 2nd order, 3rd order, etc. In other words, the value of the target order can be a preset fixed constant, such as 1, 2, 3, etc. Usually, the target order is 1st order, that is, the 1st order exponential Golomb coding algorithm can be used for entropy coding, so that the absolute value residual value of the quantization coefficient can be obtained.

[0274] It should also be noted that the target order can also be flexibly adjusted during the encoding and decoding process. In another possible implementation, the determination of the target order of the exponential Golomb code may include:

[0275] Determining mode identification information used by the quantization coefficients;

[0276] A target order of the exponential Golomb code is determined according to the mode identification information.

[0277] In a specific example, determining the target order of the exponential Golomb code according to the mode identification information may include:

[0278] If the mode identification information indicates that the transform skip mode is used, determining that the value of the target order is set to 1;

[0279] If the mode identification information indicates that the transform skip mode is not used, it is determined that the value of the target order is set to 0.

[0280] It should be noted that the target order can be determined based on other identification information, such as mode identification information. In the encoder, the mode identification information used by the quantized coefficients to be encoded can be determined based on the encoding block; then, the target order of the exponential Golomb code can be determined based on the mode identification information.

[0281] Exemplarily, it is assumed that the mode identification information is used to indicate whether the transform skip mode is used. Thus, after determining the mode identification information used, if the mode identification information indicates that the transform skip mode is used, it can be determined that the value of the target order is set to 1, that is, the absolute value residual value of the quantization coefficient is entropy encoded using the 1st-order exponential Golomb coding algorithm; if the mode identification information indicates that the transform skip mode is not used, it can be determined that the value of the target order is set to 0, that is, the absolute value residual value of the quantization coefficient is entropy encoded using the 0th-order exponential Golomb coding algorithm.

[0282] In other words, the target order may be a pre-set fixed constant, or may be flexibly adjusted during the encoding process, such as determining how to adjust the target order based on other identification information; the embodiments of the present application do not make specific limitations.

[0283] In this way, after determining the target order of the exponential Golomb code, the absolute value residual value of the quantization coefficient can be calculated according to the quantization coefficient, the value of the non-zero identification information and the values ​​of the X preset identification information, and then the absolute value residual value of the quantization coefficient is entropy encoded using the exponential Golomb coding algorithm of the target order.

[0284] Further, in the embodiment of the present application, for X preset identification information, in a specific example, the value of X may be equal to 4. Thus, the four preset identification information may include: first preset identification information, second preset identification information, third preset identification information and fourth preset identification; wherein,

[0285] The first preset identification information is used to indicate whether the absolute value of the quantization coefficient is greater than 1;

[0286] The second preset identification information is used to indicate whether the absolute value of the quantization coefficient is greater than 2;

[0287] The third preset identification information is used to indicate whether the absolute value of the quantization coefficient is greater than 3;

[0288] The fourth preset identification information is used to indicate whether the absolute value of the quantization coefficient is greater than 4.

[0289] In a specific example, determining the values ​​of the X preset identification information according to the quantization coefficient may include:

[0290] If the absolute value of the quantization coefficient is greater than 1, determining that the value of the first preset identification information is a first value;

[0291] If the absolute value of the quantization coefficient is less than or equal to 1, determining that the value of the first preset identification information is a second value; and

[0292] If the absolute value of the quantization coefficient is greater than 2, determining that the value of the second preset identification information is the first value;

[0293] If the absolute value of the quantization coefficient is less than or equal to 2, determining that the value of the second preset identification information is a second value; and

[0294] If the absolute value of the quantization coefficient is greater than 3, determining that the value of the third preset identification information is the first value;

[0295] If the absolute value of the quantization coefficient is less than or equal to 3, the value of the third preset identification information is determined to be the second value; and

[0296] If the absolute value of the quantization coefficient is greater than 4, determining that the value of the fourth preset identification information is the first value;

[0297] If the absolute value of the quantization coefficient is less than or equal to 4, the value of the fourth preset identification information is determined to be the second value.

[0298] It should be noted that the first preset identification information can be represented by gt1, the second preset identification information can be represented by gt2, the third preset identification information can be represented by gt3, and the fourth preset identification information can be represented by gt4.

[0299] It should also be noted that gt1, gt2, gt3, and gt4 can use the same set of context models, or gt1 and gt2 can share a set of context models, and gt3 and gt4 can share a set of context models; the embodiments of the present application do not make specific limitations.

[0300] In some embodiments, if gt1, gt2, gt3, and gt4 can use the same context model (i.e., the second context model), then the adaptive binary arithmetic coding mode using the second context model sequentially entropy codes the values ​​of the X preset identification information, which may include:

[0301] The adaptive binary arithmetic coding mode of the second context model is used to entropy encode the value of the first preset identification information, the value of the second preset identification information, the value of the third preset identification information and the value of the fourth preset identification information in sequence.

[0302] In some embodiments, the second context model may include a second-first context model and a second-second context model. If gt1 and gt2 use a set of context models (i.e., the second-first context model) and gt3 and gt4 use a set of context models (i.e., the second-second context model), then the adaptive binary arithmetic coding mode using the second context model sequentially entropy codes the values ​​of the X preset identification information, which may include:

[0303] Performing entropy coding on the value of the first preset identification information and the value of the second preset identification information in sequence using an adaptive binary arithmetic coding mode of a second context model;

[0304] The values ​​of the third preset identification information and the values ​​of the fourth preset identification information are entropy encoded in sequence using an adaptive binary arithmetic coding mode of a second context model.

[0305] That is to say, in a specific example, the first context model, the second-first context model and the second-second context model are different. That is to say, the non-zero identification information can use a set of context models (i.e., the first context model), gt1 and gt2 share a set of context models (i.e., the second-first context model), and gt3 and gt4 share a set of context models (i.e., the second-second context model). Or, in another specific example, the second-first context model and the second-second context model are completely corresponding, that is, gt1, gt2, gt3 and gt4 can share a set of context models (i.e., the second context model).

[0306] It is particularly noted that the number of context models in each set is not specifically limited, and the method of determining the index number of the context model is also not specifically limited. In general, the index number of the context model can be determined by default using an existing solution in the relevant technology.

[0307] Further, if the absolute value of the quantization coefficient is greater than 4, then on the one hand, it can be determined that the value of gt4 is equal to 1, and on the other hand, it can be determined that there must be an absolute value residual value of the quantization coefficient at this time. In some embodiments, when the value of the Xth preset identification information is the first value, determining the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code may include:

[0308] When the value of the fourth preset identification information is the first value, the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code are determined to execute the step of entropy encoding the absolute value residual value of the quantization coefficient using the exponential Golomb coding algorithm of the target order.

[0309] In a specific example, determining the absolute value residual value of the quantization coefficient may include:

[0310] The absolute value of the quantization coefficient is used to perform subtraction calculation on the value of the non-zero identification information, the value of the first preset identification information, the value of the second preset identification information, the value of the third preset identification information and the value of the fourth preset identification information to obtain the absolute value residual value of the quantization coefficient.

[0311] It should be noted that when the value of the fourth preset identification information is the first value, specifically, the value of gt4 is equal to 1. At this time, according to the absolute value of the quantization coefficient (expressed by |q k |), as well as the values ​​of sig, gt1, gt2, gt3 and gt4, the absolute value of the quantization coefficient (rem) can be determined by the following calculation method. The calculation method is as follows:

[0312] rem=|q k |-sig-gt1-gt2-gt3-gt4 (2)

[0313] Furthermore, the embodiment of the present application may also determine the value of the sign identification information according to the quantization coefficient, so as to determine the positive and negative characteristics of the quantization coefficient. In some embodiments, the method may also include:

[0314] Determining the value of the symbol identification information according to the quantization coefficient;

[0315] The absolute value residual of the quantization coefficient is entropy encoded using the bypass mode, and the bit information obtained after encoding is written into the bit stream.

[0316] In a specific example, determining the value of the symbol identification information according to the quantization coefficient may include:

[0317] If the quantization coefficient is a negative value, determining that the value of the sign identification information is a first value;

[0318] If the quantization coefficient is a positive value, the value of the sign identification information is determined to be a second value.

[0319] Here, taking the first value being 1 and the second value being 0 as an example, if the quantization coefficient is a negative value, then it can be determined that the value of the sign identification information is 1, and at this time, 1 is entropy encoded; if the quantization coefficient is a positive value, then it can be determined that the value of the sign identification information is 0, and at this time, 0 is entropy encoded.

[0320] Furthermore, the order of the above encoding process is a relative order, and the actual situation can be adjusted according to specific standards. In a possible implementation, the method may also include:

[0321] Determining a coefficient block and a preset scanning order of the coefficient block; wherein the coefficient block includes at least one quantized coefficient to be encoded;

[0322] According to the preset scanning order, entropy encoding is performed in sequence on the value of the non-zero identification information corresponding to the at least one quantized coefficient to be encoded and the values ​​of the X preset identification information;

[0323] According to the preset scanning order, entropy encoding is performed in sequence on the absolute value residual value corresponding to the at least one quantization coefficient to be encoded.

[0324] It should be noted that this implementation is based on the VVC standard as an example. In VVC, the coding order in the related art is to first entropy encode the sig, gt1, par, and gt3 corresponding to each quantization coefficient in accordance with the preset scanning order; then entropy encode the rem corresponding to each quantization coefficient in accordance with the preset scanning order. In the embodiment of the present application, the coding order of the above process is to first entropy encode the sig, gt1, gt2, gt3, and gt4 corresponding to each quantization coefficient in accordance with the preset scanning order; then entropy encode the rem corresponding to each quantization coefficient in accordance with the preset scanning order.

[0325] In another possible implementation, the method may further include:

[0326] Determining a coefficient block and a preset scanning order of the coefficient block; wherein the coefficient block includes at least one quantized coefficient to be encoded;

[0327] According to a preset scanning order, entropy encoding is sequentially performed on the values ​​of non-zero identification information corresponding to at least one quantized coefficient to be encoded;

[0328] According to a preset scanning order, entropy encoding is performed in sequence on the values ​​of X preset identification information corresponding to at least one quantization coefficient to be encoded;

[0329] According to a preset scanning order, entropy coding is performed in sequence on the absolute value residual value corresponding to at least one quantization coefficient to be encoded.

[0330] It should be noted that this implementation method takes the AVS standard as an example. In AVS, the coding order is to first entropy encode the sig corresponding to each quantization coefficient in accordance with the preset scanning order, and then entropy encode the gt1 and gt2 corresponding to each quantization coefficient in accordance with the preset scanning order, and finally entropy encode the rem corresponding to each quantization coefficient in accordance with the preset scanning order. In the embodiment of the present application, the coding order of the above process is to first entropy encode the sig corresponding to each quantization coefficient in accordance with the preset scanning order, and then entropy encode the gt1, gt2, gt3, and gt4 corresponding to each quantization coefficient in accordance with the preset scanning order, and finally entropy encode the rem corresponding to each quantization coefficient in accordance with the preset scanning order.

[0331] It should also be noted that the preset scanning order can be diagonal, zigzag, horizontal, vertical, 4×4 sub-block scanning or any other scanning order, and the embodiments of the present application do not specifically limit it.

[0332] The encoding of the quantization coefficients in the embodiment of the present application mainly includes the following four parts:

[0333] The first part is the non-zero flag of the quantization coefficient (represented by sig), which is used to indicate whether the quantization coefficient is a non-zero coefficient.

[0334] The second part is a flag that the absolute value of the quantization coefficient is greater than X (expressed as gtx), which is used to indicate whether the quantization coefficient is greater than X, where X is a natural number greater than 0. This part contains at least one flag that the absolute value of the quantization coefficient is greater than X; specifically, in the embodiment of the present application, it may include: a flag that the absolute value of the quantization coefficient is greater than 1 (expressed as gt1), a flag that the absolute value of the quantization coefficient is greater than 2 (expressed as gt2), a flag that the absolute value of the quantization coefficient is greater than 3 (expressed as gt3), and a flag that the absolute value of the quantization coefficient is greater than 4 (expressed as gt4).

[0335] The third part is the absolute value residual value of the quantization coefficient (represented by rem), and the order k of the exponential Golomb code used to encode the residual value can be flexibly adjusted according to the level flag. In the embodiment of the present application, the value of k can be 1, that is, the first-order exponential Golomb code is used, represented by EGK(1).

[0336] The fourth part is the sign flag of the quantization coefficient (represented by coeff_sign), which is used to indicate the positive or negative nature of the quantization coefficient.

[0337] Further, in the application embodiment, the absolute value encoding method of the quantization coefficient is shown in the above Table 3. It should be noted that the absolute value residual value (rem) of the quantization coefficient can be encoded using the exponential Golomb coding algorithm of the target order, the sign flag (coeff_sign) can be encoded using the bypass mode, and the other flags (such as sig, gt1, gt2, gt3, gt4, etc.) are all encoded using the adaptive binary arithmetic coding mode based on the context model.

[0338] In addition, in some embodiments, before S701, the method may further include:

[0339] Determining a coding block in a video image and prediction mode parameters of the coding block;

[0340] Performing prediction processing on the coding block using the prediction mode parameters to determine a prediction block of the coding block;

[0341] Obtaining a residual block of the coding block according to the coding block and the prediction block;

[0342] The residual block is transformed and quantized to obtain a coefficient block of the coding block; wherein the coefficient block includes at least one quantized coefficient.

[0343] In the embodiment of the present application, the method may further include: writing the prediction mode parameters into a bitstream.

[0344] It should be noted that the prediction mode parameters here are used to indicate the prediction mode adopted by the coding block, and different prediction modes correspond to different prediction mode parameters. Here, the prediction mode parameters can be determined according to the size of the distortion value, or according to the result of rate distortion optimization (RDO), and the embodiments of the present application do not impose any restrictions. Generally speaking, the prediction mode parameters of the coding block can be determined by RDO. Specifically, in some embodiments, determining the prediction mode parameters of the coding block may include: pre-encoding the coding block using multiple prediction modes, and obtaining rate distortion cost values ​​corresponding to the multiple prediction modes; selecting the optimal rate distortion cost value from the multiple rate distortion cost values ​​obtained, and determining the prediction mode corresponding to the optimal rate distortion cost value as the prediction mode parameter of the coding block.

[0345] That is to say, in the encoder, multiple prediction modes can be used to pre-encode the coding blocks respectively. Here, the multiple prediction modes generally include inter-frame prediction mode, traditional intra-frame prediction mode and non-traditional intra-frame prediction mode. Among them, the traditional intra-frame prediction mode may include direct current (DC) mode, plane (PLANAR) mode and angle intra-frame prediction mode. Non-traditional intra-frame prediction modes may include MIP mode, cross-component linear model prediction (CCLM) mode, intra-frame block copy (IBC) mode and PLT (Palette) mode. The inter-frame prediction mode may include traditional inter-frame prediction mode and inter-frame geometric partitioning prediction (GEO) mode.

[0346] Exemplarily, after pre-encoding the coding block using multiple prediction modes respectively, the rate-distortion cost values ​​corresponding to the multiple prediction modes can be obtained. Then, the optimal rate-distortion cost value is selected from the multiple rate-distortion cost values ​​obtained (usually, the minimum rate-distortion cost value is the optimal rate-distortion cost value), and the prediction mode corresponding to the optimal rate-distortion cost value is determined as the prediction mode parameter of the coding block. In this way, the encoder uses the prediction mode indicated by the prediction mode parameter to predict the coding block, which can make the prediction residual smaller and improve the coding efficiency. It should be noted that the prediction mode parameter needs to be written into the bitstream so that the decoder can obtain the prediction mode parameter by parsing the bitstream, and then obtain the corresponding prediction block through prediction processing.

[0347] In addition, the transform block for the coding block can be obtained by performing a subtraction operation on the current block and the prediction block obtained by using the prediction mode parameters, and then performing a transform process on the residual block after determining the residual block. Here, the residual block can be fully transformed in two dimensions, partially transformed in two dimensions, or even not transformed in two dimensions. In the embodiment of the present application, the blocks after the transformation or without the transformation of the residual block are collectively referred to as transform blocks. Then, the transform block is quantized to obtain the coefficient block of the coding block.

[0348] In this way, after the coefficient block of the coding block is obtained, entropy coding can be performed on the at least one quantized coefficient using a preset scanning order, and the bit information obtained after the coding is written into the bit stream.

[0349] It is also particularly noted that the second context model used by the above gt3 and gt4 can completely correspond to the second context model used by gt1 and gt2. In other words, at this time, gt1, gt2, gt3, and gt4 use the second context model together. In addition, the above-mentioned first-order exponential Golomb code can also be zero-order, second-order, third-order, etc., which can be pre-set or flexibly adjusted to other orders.

[0350] It should also be noted that the coefficient entropy coding of the embodiment of the present application is not specifically targeted at a particular video coding standard, but is a universal coefficient entropy coding method. In this way, since a new coefficient entropy coding method provided by the embodiment of the present application introduces gt3 and gt4 identification information, and constructs a corresponding context model, and adjusts the corresponding residual value coding method on this basis, the original transform coefficient entropy coding method can be improved, and the characteristics of adaptive coding can be better utilized, effectively saving bit rate, and thus the overall encoding and decoding performance can be improved.

[0351] In addition, the technical solution of the embodiment of the present application can also be extended and applied to other standards, such as MPEG, AOM or any customized coefficient entropy coding method.

[0352] Specifically, for the encoding of the absolute value residual value, it is necessary to determine the order of the exponential Golomb code encoding the absolute value residual value, and the order can be preset as a fixed constant, such as 1, 2, 3, ..., etc. Alternatively, the order of the exponential Golomb code encoding the absolute value residual value can also be flexibly adjusted during the encoding process, such as determining how to adjust the order based on other flag bits. A specific example is that if the current coding block uses the transform skip mode, the absolute value residual value can be executed according to the 1st order exponential Golomb coding algorithm; if the current coding block does not use the transform skip mode, the absolute value residual value can be executed according to the 0th order exponential Golomb coding algorithm.

[0353] The embodiment of the present application provides a coefficient encoding method, which is applied to an encoder. Determine a quantization coefficient to be encoded; determine the value of non-zero identification information according to the quantization coefficient, and use the adaptive binary arithmetic coding mode of the first context model to entropy encode the value of the non-zero identification information; when the value of the non-zero identification information is a first value, determine the values ​​of X preset identification information according to the quantization coefficient, and use the adaptive binary arithmetic coding mode of the second context model to entropy encode the values ​​of the X preset identification information in sequence; where X is a natural number greater than zero; when the value of the Xth preset identification information is a first value, determine the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code, and use the exponential Golomb coding algorithm of the target order to entropy encode the absolute value residual value of the quantization coefficient; write the bit information obtained after encoding into the bit stream. In this way, since the statistical characteristics between the quantization coefficients at each position are fully utilized, not only the newly introduced preset identification information is entropy encoded through the context model, but also the encoding mode is adjusted according to the absolute residual value of the quantization coefficient. This can better utilize the adaptive coding characteristics in the encoding and decoding process, thereby saving bit rate and improving encoding and decoding performance.

[0354] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see Figure 8 , which shows a schematic diagram of the structure of an encoder 80 provided in an embodiment of the present application. Figure 8 As shown, the encoder 80 may include: a first determining unit 801, an entropy encoding unit 802 and a writing unit 803; wherein,

[0355] A first determining unit 801 is configured to determine a quantization coefficient to be encoded;

[0356] The entropy coding unit 802 is configured to determine the value of the non-zero identification information according to the quantization coefficient, and perform entropy coding on the value of the non-zero identification information using the adaptive binary arithmetic coding mode of the first context model; and when the value of the non-zero identification information is the first value, determine the values ​​of X preset identification information according to the quantization coefficient, and perform entropy coding on the values ​​of the X preset identification information in sequence using the adaptive binary arithmetic coding mode of the second context model; wherein X is a natural number greater than zero;

[0357] The entropy coding unit 802 is further configured to determine, when the value of the Xth preset identification information is the first value, the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code, and perform entropy coding on the absolute value residual value of the quantization coefficient using the exponential Golomb coding algorithm of the target order;

[0358] The writing unit 803 is configured to write the bit information obtained after encoding into the bit stream.

[0359] In some embodiments, the first determination unit 801 is further configured to determine that the value of the non-zero identification information is a first value if the quantization coefficient is non-zero; and to determine that the value of the non-zero identification information is a second value if the quantization coefficient is zero.

[0360] In some embodiments, the writing unit 803 is further configured to write the bit information obtained after encoding into the bit stream when the value of the non-zero identification information is the second value.

[0361] In some embodiments, the writing unit 803 is further configured to write the bit information obtained after encoding into the bit stream when the value of the Xth preset identification information is the second value.

[0362] In some embodiments, the first value is 1 and the second value is 0.

[0363] In some embodiments, the first determining unit 801 is further configured to set the value of the target order to a fixed constant greater than zero.

[0364] In some embodiments, the value of the target order is set to 1.

[0365] In some embodiments, the first determining unit 801 is further configured to determine mode identification information used by the quantization coefficient; and determine a target order of the exponential Golomb code according to the mode identification information.

[0366] In some embodiments, the first determination unit 801 is further configured to determine that the value of the target order is set to 1 if the mode identification information indicates that the transform skip mode is used; if the mode identification information indicates that the transform skip mode is not used, determine that the value of the target order is set to 0.

[0367] In some embodiments, the first determination unit 801 is further configured to determine that the value of the Xth preset identification information is the first value if the absolute value of the quantization coefficient is greater than X; if the absolute value of the quantization coefficient is less than or equal to X, determine that the value of the Xth preset identification information is the second value.

[0368] In some embodiments, the value of X is equal to 4, and the four preset identification information include: first preset identification information, second preset identification information, third preset identification information and fourth preset identification; wherein the first preset identification information is used to indicate whether the absolute value of the quantization coefficient is greater than 1; the second preset identification information is used to indicate whether the absolute value of the quantization coefficient is greater than 2; the third preset identification information is used to indicate whether the absolute value of the quantization coefficient is greater than 3; the fourth preset identification information is used to indicate whether the absolute value of the quantization coefficient is greater than 4.

[0369] In some embodiments, the first determination unit 801 is further configured to, if the absolute value of the quantization coefficient is greater than 1, determine that the value of the first preset identification information is a first value; if the absolute value of the quantization coefficient is less than or equal to 1, determine that the value of the first preset identification information is a second value; and if the absolute value of the quantization coefficient is greater than 2, determine that the value of the second preset identification information is a first value; if the absolute value of the quantization coefficient is less than or equal to 2, determine that the value of the second preset identification information is a second value; and if the absolute value of the quantization coefficient is greater than 3, determine that the value of the third preset identification information is a first value; if the absolute value of the quantization coefficient is less than or equal to 3, determine that the value of the third preset identification information is a second value; and if the absolute value of the quantization coefficient is greater than 4, determine that the value of the fourth preset identification information is a first value; if the absolute value of the quantization coefficient is less than or equal to 4, determine that the value of the fourth preset identification information is a second value.

[0370] In some embodiments, the entropy coding unit 802 is further configured to perform entropy coding on the value of the first preset identification information, the value of the second preset identification information, the value of the third preset identification information, and the value of the fourth preset identification information in sequence using an adaptive binary arithmetic coding mode of a second context model.

[0371] In some embodiments, the second context model includes a second-first context model and a second-second context model; accordingly, the entropy coding unit 802 is also configured to use the adaptive binary arithmetic coding mode of the second-first context model to entropy encode the value of the first preset identification information and the value of the second preset identification information in sequence; and use the adaptive binary arithmetic coding mode of the second-second context model to entropy encode the value of the third preset identification information and the value of the fourth preset identification information in sequence.

[0372] In some embodiments, the first determination unit 801 is also configured to determine the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code when the value of the fourth preset identification information is the first value, so as to perform the step of entropy encoding the absolute value residual value of the quantization coefficient using the exponential Golomb coding algorithm of the target order.

[0373] In some embodiments, see Figure 8 The encoder 80 may also include a first calculation unit 804, configured to use the absolute value of the quantization coefficient to perform a subtraction calculation on the value of the non-zero identification information, the value of the first preset identification information, the value of the second preset identification information, the value of the third preset identification information and the value of the fourth preset identification information to obtain the absolute value residual value of the quantization coefficient.

[0374] In some embodiments, the first determining unit 801 is further configured to determine a value of the symbol identification information according to the quantization coefficient;

[0375] The entropy coding unit 802 is further configured to perform entropy coding on the absolute value residual of the quantized coefficient using a bypass mode;

[0376] The writing unit 803 is further configured to write the bit information obtained after encoding into the bit stream.

[0377] In some embodiments, the first determination unit 801 is further configured to determine that the value of the sign identification information is a first value if the quantization coefficient is a negative value; and to determine that the value of the sign identification information is a second value if the quantization coefficient is a positive value.

[0378] In some embodiments, the first determining unit 801 is further configured to determine a coefficient block and a preset scanning order of the coefficient block; wherein the coefficient block includes at least one quantized coefficient to be encoded;

[0379] The entropy coding unit 802 is further configured to, according to the preset scanning order, sequentially perform entropy coding on the value of the non-zero identification information corresponding to the at least one quantization coefficient to be encoded and the values ​​of the X preset identification information; and, according to the preset scanning order, sequentially perform entropy coding on the absolute value residual value corresponding to the at least one quantization coefficient to be encoded.

[0380] In some embodiments, the first determining unit 801 is further configured to determine a coefficient block and a preset scanning order of the coefficient block; wherein the coefficient block includes at least one quantized coefficient to be encoded;

[0381] The entropy coding unit 802 is further configured to, according to the preset scanning order, sequentially perform entropy coding on the values ​​of the non-zero identification information corresponding to the at least one quantized coefficient to be encoded; and, according to the preset scanning order, sequentially perform entropy coding on the values ​​of the X preset identification information corresponding to the at least one quantized coefficient to be encoded; and, according to the preset scanning order, sequentially perform entropy coding on the absolute value residual value corresponding to the at least one quantized coefficient to be encoded.

[0382] It is understandable that in the embodiments of the present application, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course, it may be a module, or it may be non-modular. Moreover, the components in the present embodiment may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional module.

[0383] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0384] Therefore, an embodiment of the present application provides a computer storage medium, which is applied to the encoder 80, and the computer storage medium stores a computer program, and when the computer program is executed by the first processor, the method described in any one of the aforementioned embodiments is implemented.

[0385] Based on the composition of the encoder 80 and the computer storage medium, see Fig. 9 , which shows a schematic diagram of the specific hardware structure of the encoder 80 provided in the embodiment of the present application. Fig. 9 As shown, it may include: a first communication interface 901, a first memory 902 and a first processor 903; each component is coupled together through a first bus system 904. It is understandable that the first bus system 904 is used to realize the connection and communication between these components. In addition to the data bus, the first bus system 904 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Fig. 9 In the figure, various buses are marked as the first bus system 904.

[0386] The first communication interface 901 is used to receive and send signals during the process of sending and receiving information with other external network elements;

[0387] A first memory 902, used to store a computer program that can be run on the first processor 903;

[0388] The first processor 903 is configured to execute, when running the computer program:

[0389] Determining quantized coefficients to be encoded;

[0390] Determine a value of the non-zero identification information according to the quantization coefficient, and perform entropy coding on the value of the non-zero identification information using an adaptive binary arithmetic coding mode of a first context model;

[0391] When the value of the non-zero identification information is the first value, determine the values ​​of X preset identification information according to the quantization coefficient, and perform entropy coding on the values ​​of the X preset identification information in sequence using an adaptive binary arithmetic coding mode of a second context model; wherein X is a natural number greater than zero;

[0392] When the value of the Xth preset identification information is the first value, determining the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code, and performing entropy coding on the absolute value residual value of the quantization coefficient using the exponential Golomb coding algorithm of the target order;

[0393] The encoded bit information is written into the bit stream.

[0394] It can be understood that the first memory 902 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM). The first memory 902 of the systems and methods described in the present application is intended to include, but is not limited to, these and any other suitable types of memory.

[0395] The first processor 903 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 903. The above-mentioned first processor 903 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the first memory 902, and the first processor 903 reads the information in the first memory 902 and completes the steps of the above method in combination with its hardware.

[0396] It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units or combinations thereof for performing functions described in the present application. For software implementation, the technology described in the present application can be implemented by a module (such as a process, function, etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in a processor or outside a processor.

[0397] Optionally, as another embodiment, the first processor 903 is further configured to execute the method described in any one of the aforementioned embodiments when running the computer program.

[0398] This embodiment provides an encoder, which may include a first determination unit, an entropy encoding unit, and a writing unit. In this way, since the statistical characteristics between the quantization coefficients at each position are fully utilized, not only the newly introduced preset identification information is entropy encoded through the context model, but also the encoding mode is adjusted according to the absolute value residual value of the quantization coefficient, so that the adaptive encoding characteristics can be better utilized in the encoding and decoding process, thereby saving the bit rate and improving the encoding and decoding performance.

[0399] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see Fig.10 , which shows a schematic diagram of the structure of a decoder 100 provided in an embodiment of the present application. Fig.10 As shown, the decoder 100 may include: a parsing unit 1001 and a second determining unit 1002; wherein,

[0400] The parsing unit 1001 is configured to parse the bitstream based on the position of the quantization coefficient to be decoded, using the adaptive binary arithmetic coding mode of the first context model, to obtain the value of the non-zero identification information;

[0401] The parsing unit 1001 is further configured to, when the value of the non-zero identification information is a first value, parse the bitstream using the adaptive binary arithmetic coding mode of the second context model to obtain values ​​of X preset identification information; wherein X is a natural number greater than zero; and when the value of the X-th preset identification information is the first value, determine a target order of the exponential Golomb code, and parse the bitstream using the exponential Golomb decoding algorithm of the target order to obtain a residual value of the absolute value of the reconstructed quantization coefficient; wherein the target order is an integer greater than zero;

[0402] The second determining unit 1002 is configured to determine the reconstructed quantization coefficient absolute value corresponding to the quantization coefficient position according to the value of the non-zero identification information, the values ​​of the X preset identification information and the remaining value of the reconstructed quantization coefficient absolute value.

[0403] In some embodiments, the second determination unit 1002 is further configured to determine the reconstructed quantization coefficient corresponding to the quantization coefficient position according to the value of the non-zero identification information when the value of the non-zero identification information is a second value.

[0404] In some embodiments, the second determination unit 1002 is further configured to determine the absolute value of the reconstructed quantization coefficient corresponding to the quantization coefficient position according to the value of the non-zero identification information and the values ​​of the X preset identification information when the value of the Xth preset identification information is a second value.

[0405] In some embodiments, the first value is 1 and the second value is 0.

[0406] In some embodiments, the second determining unit 1002 is further configured to set the value of the target order to a fixed constant greater than zero.

[0407] In some embodiments, the value of the target order is set to 1.

[0408] In some embodiments, the second determining unit 1002 is further configured to determine the mode identification information used by the position of the quantized coefficient to be decoded; and determine the target order of the exponential Golomb code according to the mode identification information.

[0409] In some embodiments, the second determination unit 1002 is further configured to determine that the value of the target order is set to 1 if the mode identification information indicates that the transform skip mode is used; and to determine that the value of the target order is set to 0 if the mode identification information indicates that the transform skip mode is not used.

[0410] In some embodiments, the value of X is equal to 4, and the four preset identification information include: first preset identification information, second preset identification information, third preset identification information and fourth preset identification; wherein,

[0411] The first preset identification information is used to indicate whether the absolute value of the reconstructed quantization coefficient is greater than 1;

[0412] The second preset identification information is used to indicate whether the absolute value of the reconstructed quantization coefficient is greater than 2;

[0413] The third preset identification information is used to indicate whether the absolute value of the reconstructed quantization coefficient is greater than 3;

[0414] The fourth preset identification information is used to indicate whether the absolute value of the reconstructed quantization coefficient is greater than 4.

[0415] In some embodiments, the parsing unit 1001 is further configured to parse the bitstream using the adaptive binary arithmetic coding mode of the second context model to obtain the value of the first preset identification information; and if the value of the first preset identification information is the first value, parse the bitstream using the adaptive binary arithmetic coding mode of the second context model to obtain the value of the second preset identification information; and if the value of the second preset identification information is the first value, parse the bitstream using the adaptive binary arithmetic coding mode of the second context model to obtain the value of the third preset identification information; and if the value of the third preset identification information is the first value, parse the bitstream using the adaptive binary arithmetic coding mode of the second context model to obtain the value of the fourth preset identification information.

[0416] In some embodiments, the second context model includes a second-first context model and a second-second context model. Accordingly, the parsing unit 1001 is further configured to parse the bitstream using an adaptive binary arithmetic coding mode of the second-first context model to obtain a value of the first preset identification information; and if the value of the first preset identification information is a first value, parse the bitstream using the adaptive binary arithmetic coding mode of the second-first context model to obtain a value of the second preset identification information; and if the value of the second preset identification information is a first value, parse the bitstream using the adaptive binary arithmetic coding mode of the second-second context model to obtain a value of the third preset identification information; and if the value of the third preset identification information is a first value, parse the bitstream using the adaptive binary arithmetic coding mode of the second-second context model to obtain a value of the fourth preset identification information.

[0417] In some embodiments, the second determination unit 1002 is further configured to determine the target order of the exponential Golomb code when the value of the fourth preset identification information is the first value, so as to execute the step of parsing the bit stream using the exponential Golomb decoding algorithm of the target order to obtain the residual value of the absolute value of the reconstructed quantization coefficient.

[0418] In some embodiments, see Fig.10 The decoder 100 may also include a second calculation unit 1003, configured to perform addition calculation on the value of the non-zero identification information, the value of the first preset identification information, the value of the second preset identification information, the value of the third preset identification information, the value of the fourth preset identification information and the remaining value of the absolute value of the reconstructed quantization coefficient to obtain the absolute value of the reconstructed quantization coefficient corresponding to the position of the quantization coefficient.

[0419] In some embodiments, the parsing unit 1001 is further configured to parse the code stream using the bypass mode to obtain the value of the symbol identification information;

[0420] The second determining unit 1002 is further configured to determine the reconstructed quantization coefficient corresponding to the quantization coefficient position according to the value of the sign identification information and the absolute value of the reconstructed quantization coefficient.

[0421] In some embodiments, the second determination unit 1002 is further configured to determine that the reconstructed quantization coefficient is a negative value if the value of the sign identification information is a first value; and to determine that the reconstructed quantization coefficient is a positive value if the value of the sign identification information is a second value.

[0422] In some embodiments, the second determination unit 1002 is further configured to determine that the absolute value of the reconstructed quantization coefficient is greater than X if the value of the Xth preset identification information is a first value; and to determine that the absolute value of the reconstructed quantization coefficient is less than or equal to X if the value of the Xth preset identification information is a second value.

[0423] In some embodiments, the second determining unit 1002 is further configured to determine a coefficient block and a preset scanning order of the coefficient block; wherein the coefficient block includes at least one quantized coefficient position to be decoded;

[0424] The parsing unit 1001 is further configured to sequentially obtain the value of the non-zero identification information corresponding to the at least one quantization coefficient position to be decoded and the values ​​of the X preset identification information by parsing the bitstream according to the preset scanning order; and sequentially obtain the residual value of the absolute value of the reconstructed quantization coefficient corresponding to the at least one quantization coefficient position to be decoded by parsing the bitstream according to the preset scanning order;

[0425] The second determining unit 1002 is further configured to determine the reconstructed quantization coefficient absolute value corresponding to at least one quantization coefficient position to be decoded according to the value of the non-zero identification information, the values ​​of the X preset identification information and the remaining value of the reconstructed quantization coefficient absolute value.

[0426] In some embodiments, the second determining unit 1002 is further configured to determine a coefficient block and a preset scanning order of the coefficient block; wherein the coefficient block includes at least one quantized coefficient position to be decoded;

[0427] The parsing unit 1001 is further configured to sequentially obtain the value of the non-zero identification information corresponding to the at least one quantization coefficient position to be decoded by parsing the bitstream according to the preset scanning order; and sequentially obtain the values ​​of the X preset identification information corresponding to the at least one quantization coefficient position to be decoded by parsing the bitstream according to the preset scanning order; and sequentially obtain the residual value of the absolute value of the reconstructed quantization coefficient corresponding to the at least one quantization coefficient position to be decoded by parsing the bitstream according to the preset scanning order;

[0428] The second determining unit 1002 is further configured to determine the reconstructed quantization coefficient absolute value corresponding to at least one quantization coefficient position to be decoded according to the value of the non-zero identification information, the values ​​of the X preset identification information and the remaining value of the reconstructed quantization coefficient absolute value.

[0429] It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module. If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, this embodiment provides a computer storage medium, which is applied to the decoder 100, and the computer storage medium stores a computer program, and when the computer program is executed by the second processor, the method described in any one of the above embodiments is implemented.

[0430] Based on the above-mentioned components of the decoder 100 and the computer storage medium, see Fig.11 , which shows a schematic diagram of the specific hardware structure of the decoder 100 provided in the embodiment of the present application. Fig.11 As shown, it may include: a second communication interface 1101, a second memory 1102, and a second processor 1103; each component is coupled together via a second bus system 1104. It is understood that the second bus system 1104 is used to realize the connection and communication between these components. In addition to the data bus, the second bus system 1104 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig.11 In the figure, various buses are marked as the second bus system 1104.

[0431] The second communication interface 1101 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;

[0432] The second memory 1102 is used to store a computer program that can be run on the second processor 1103;

[0433] The second processor 1103 is configured to execute, when running the computer program:

[0434] Based on the position of the quantized coefficient to be decoded, the bit stream is parsed using the adaptive binary arithmetic coding mode of the first context model to obtain the value of the non-zero identification information;

[0435] When the value of the non-zero identification information is the first value, the bitstream is parsed using the adaptive binary arithmetic coding mode of the second context model to obtain values ​​of X preset identification information; wherein X is a natural number greater than zero;

[0436] When the value of the Xth preset identification information is the first value, determine a target order of the exponential Golomb code, and parse the bitstream using the exponential Golomb decoding algorithm of the target order to obtain a residual value of the absolute value of the reconstructed quantization coefficient; wherein the target order is an integer greater than zero;

[0437] The reconstructed quantization coefficient absolute value corresponding to the quantization coefficient position is determined according to the value of the non-zero identification information, the values ​​of the X preset identification information and the remaining value of the reconstructed quantization coefficient absolute value.

[0438] Optionally, as another embodiment, the second processor 1103 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.

[0439] It can be understood that the hardware functions of the second memory 1102 and the first memory 902 are similar, and the hardware functions of the second processor 1103 and the first processor 903 are similar; they will not be described in detail here.

[0440] This embodiment provides a decoder, which may include a parsing unit and a second determining unit. In this way, since the statistical characteristics between the quantization coefficients at each position are fully utilized, not only the newly introduced preset identification information is entropy encoded through the context model, but also the encoding mode is adjusted according to the absolute value residual value of the quantization coefficient, so that the adaptive encoding characteristics can be better utilized in the encoding and decoding process, thereby saving the bit rate and improving the encoding and decoding performance.

[0441] It should be noted that, in this application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0442] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0443] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0444] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0445] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0446] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0447] Industrial Applicability

[0448] In the embodiment of the present application, on the encoder side, a quantization coefficient to be encoded is first determined; then, a value of non-zero identification information is determined according to the quantization coefficient, and the value of the non-zero identification information is entropy encoded using an adaptive binary arithmetic coding mode of a first context model; when the value of the non-zero identification information is a first value, values ​​of X preset identification information are determined according to the quantization coefficient, and the values ​​of the X preset identification information are entropy encoded in sequence using an adaptive binary arithmetic coding mode of a second context model; when the value of the Xth preset identification information is a first value, an absolute value residual value of the quantization coefficient and a target order of an exponential Golomb code are determined, and the absolute value residual value of the quantization coefficient is entropy encoded using an exponential Golomb coding algorithm of the target order; finally, the bit information obtained after encoding is written into a bit stream. At the decoder side, firstly, based on the position of the quantization coefficient to be decoded, the adaptive binary arithmetic coding mode of the first context model is used to parse the bitstream to obtain the value of the non-zero identification information; then, when the value of the non-zero identification information is the first value, the adaptive binary arithmetic coding mode of the second context model is used to parse the bitstream to obtain the values ​​of X preset identification information; when the value of the Xth preset identification information is the first value, the target order of the exponential Golomb code is determined, and the exponential Golomb decoding algorithm of the target order is used to parse the bitstream to obtain the residual value of the absolute value of the reconstructed quantization coefficient; finally, according to the value of the non-zero identification information, the values ​​of the X preset identification information and the residual value of the absolute value of the reconstructed quantization coefficient, the absolute value of the reconstructed quantization coefficient corresponding to the position of the quantization coefficient is determined. In this way, since the statistical characteristics between the quantization coefficients at each position are fully utilized, not only the newly introduced preset identification information is entropy encoded through the context model, but also the coding mode is adjusted according to the residual value of the absolute value of the quantization coefficient, so that the adaptive coding characteristics can be better utilized in the encoding and decoding process, thereby saving the bit rate and improving the encoding and decoding performance.

Claims

1. A coefficient decoding method, applied to a decoder, the method comprising: Based on the position of the quantized coefficient to be decoded, the bit stream is parsed using the adaptive binary arithmetic coding mode of the first context model to obtain the value of the non-zero identification information; When the value of the non-zero identification information is the first value, the bitstream is parsed using the adaptive binary arithmetic coding mode of the second context model to obtain values ​​of X preset identification information; wherein X is a natural number greater than zero; When the value of the Xth preset identification information is the first value, determine the target order of the exponential Golomb code, and parse the bitstream using the exponential Golomb decoding algorithm of the target order to obtain the residual value of the absolute value of the reconstructed quantization coefficient; wherein the target order is an integer greater than zero; The reconstructed quantization coefficient absolute value corresponding to the quantization coefficient position is determined according to the value of the non-zero identification information, the values ​​of the X preset identification information and the remaining value of the reconstructed quantization coefficient absolute value.

2. The method according to claim 1, wherein: The method further comprises: In a case where the value of the non-zero identification information is a second value, determining the reconstructed quantization coefficient corresponding to the quantization coefficient position according to the value of the non-zero identification information; or When the value of the X-th preset identification information is the second value, the absolute value of the reconstructed quantization coefficient corresponding to the quantization coefficient position is determined according to the value of the non-zero identification information and the values ​​of the X preset identification information.

3. The method according to claim 2, wherein: The first value is 1 and the second value is 0.

4. The method according to claim 1, wherein: The determining of the target order of the exponential Golomb code includes: setting the value of the target order to a fixed constant greater than zero.

5. The method according to claim 1, wherein: The step of determining a target order of an exponential Golomb code comprises: Determining the mode identification information used for the position of the quantized coefficient to be decoded; According to the mode identification information, determining the target order of the exponential Golomb code, The step of determining a target order of the exponential Golomb code according to the mode identification information includes: If the mode identification information indicates that the transform skip mode is used, determining that the value of the target order is set to 1; If the mode identification information indicates that the transform skip mode is not used, it is determined that the value of the target order is set to 0.

6. The method according to claim 1, wherein: The method further comprises: Use bypass mode to parse the code stream and obtain the value of the symbol identification information; Determine the reconstructed quantization coefficient corresponding to the position of the quantization coefficient according to the value of the sign identification information and the absolute value of the reconstructed quantization coefficient, Wherein, the method further comprises: If the value of the sign identification information is the first value, determining that the reconstructed quantization coefficient is a negative value; If the value of the sign identification information is the second value, it is determined that the reconstructed quantization coefficient is a positive value.

7. The method according to claim 1, wherein: The method further comprises: If the value of the Xth preset identification information is the first value, determining that the absolute value of the reconstructed quantization coefficient is greater than X; If the value of the Xth preset identification information is the second value, it is determined that the absolute value of the reconstructed quantization coefficient is less than or equal to X.

8. The method according to any one of claims 1 to 7, wherein: The method further comprises: Determining a coefficient block and a preset scanning order of the coefficient block; wherein the coefficient block includes at least one quantized coefficient position to be decoded; According to the preset scanning order, sequentially obtaining the value of the non-zero identification information corresponding to the position of the at least one quantization coefficient to be decoded and the values ​​of the X preset identification information by parsing the bitstream; According to the preset scanning order, sequentially obtaining residual values ​​of the absolute value of the reconstructed quantization coefficient corresponding to the at least one quantization coefficient position to be decoded by parsing the bitstream; The reconstructed quantization coefficient absolute value corresponding to the at least one quantization coefficient position to be decoded is determined according to the value of the non-zero identification information, the values ​​of the X preset identification information and the remaining value of the reconstructed quantization coefficient absolute value.

9. The method according to any one of claims 1 to 7, wherein: The method further comprises: Determining a coefficient block and a preset scanning order of the coefficient block; wherein the coefficient block includes at least one quantized coefficient position to be decoded; According to the preset scanning order, the value of the non-zero identification information corresponding to the position of the at least one quantization coefficient to be decoded is obtained in sequence by parsing the bitstream; According to the preset scanning order, sequentially obtaining the values ​​of the X preset identification information corresponding to the position of the at least one quantization coefficient to be decoded by parsing the bitstream; According to the preset scanning order, sequentially obtaining residual values ​​of the absolute value of the reconstructed quantization coefficient corresponding to the at least one quantization coefficient position to be decoded by parsing the bitstream; The reconstructed quantization coefficient absolute value corresponding to the at least one quantization coefficient position to be decoded is determined according to the value of the non-zero identification information, the values ​​of the X preset identification information and the remaining value of the reconstructed quantization coefficient absolute value.

10. A method for encoding a coefficient, applied to an encoder, the method comprising: Determining quantized coefficients to be encoded; Determine a value of non-zero identification information according to the quantization coefficient, and perform entropy coding on the value of the non-zero identification information using an adaptive binary arithmetic coding mode of a first context model; When the value of the non-zero identification information is the first value, determine the values ​​of X preset identification information according to the quantization coefficient, and perform entropy coding on the values ​​of the X preset identification information in sequence using an adaptive binary arithmetic coding mode of a second context model; wherein X is a natural number greater than zero; When the value of the Xth preset identification information is the first value, determining the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code, and performing entropy coding on the absolute value residual value of the quantization coefficient using the exponential Golomb coding algorithm of the target order; The encoded bit information is written into the bit stream.

11. An encoder, comprising a first determining unit, an entropy encoding unit and a writing unit; wherein: The first determining unit is configured to determine a quantization coefficient to be encoded; The entropy coding unit is configured to determine a value of the non-zero identification information according to the quantization coefficient, and perform entropy coding on the value of the non-zero identification information using an adaptive binary arithmetic coding mode of a first context model; and when the value of the non-zero identification information is the first value, determining the values ​​of X preset identification information according to the quantization coefficient, and sequentially performing entropy coding on the values ​​of the X preset identification information using an adaptive binary arithmetic coding mode of a second context model; wherein X is a natural number greater than zero; The entropy coding unit is further configured to determine, when the value of the Xth preset identification information is the first value, the absolute value residual value of the quantization coefficient and the target order of the exponential Golomb code, and perform entropy coding on the absolute value residual value of the quantization coefficient using the exponential Golomb coding algorithm of the target order; The writing unit is configured to write the bit information obtained after encoding into the bit stream.

Citation Information

Patent Citations

  • Image encoding method, image decoding method and image processing equipment

    CN106254878A

  • Coding and decoding method of coefficient, encoder, decoder and computer storage medium

    CN116982317A

  • Method and an apparatus for encoding / decoding residual coefficient

    US10356413B1

  • Regular coded bin reduction for coefficient coding

    US20200077117A1

  • Entropy coding of transform coefficients suitable for dependent scalar quantization

    WO2020007785A1