WO2024060099A1 - 编解码方法、码流、编码器、解码器以及存储介质 - Google Patents

编解码方法、码流、编码器、解码器以及存储介质 Download PDF

Info

Publication number
WO2024060099A1
WO2024060099A1 PCT/CN2022/120361 CN2022120361W WO2024060099A1 WO 2024060099 A1 WO2024060099 A1 WO 2024060099A1 CN 2022120361 W CN2022120361 W CN 2022120361W WO 2024060099 A1 WO2024060099 A1 WO 2024060099A1
Authority
WO
WIPO (PCT)
Prior art keywords
syntax element
current block
element information
level
quantization coefficient
Prior art date
Application number
PCT/CN2022/120361
Other languages
English (en)
French (fr)
Inventor
徐陆航
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2022/120361 priority Critical patent/WO2024060099A1/zh
Publication of WO2024060099A1 publication Critical patent/WO2024060099A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Definitions

  • the embodiments of the present application relate to the technical field of video coding and decoding, and in particular, to a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium.
  • the image data to be encoded will be compressed and encoded through the entropy coding unit after transformation and quantization processing, and the code stream generated after the entropy encoding processing will be transmitted to Decoding end:
  • the decoding end analyzes the code stream, and after inverse quantization and inverse transformation, the original input image data can be restored.
  • these non-zero quantized coefficients can be positive or negative.
  • the positive and negative sign identification information of the non-zero quantized coefficients needs to be encoded and decoded, which causes the problem of excessive bit rate and poor encoding and decoding performance.
  • Embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder and a storage medium, which can control whether parity concealment technology can be used through high-level syntax analysis depending on whether lossless coding is used, thereby improving usage
  • the applicability of parity hiding technology, through the application of parity hiding technology can hide the identification information of non-zero quantized coefficients, saving code rate and improving encoding and decoding performance.
  • embodiments of the present application provide a decoding method, which is applied to a decoder.
  • the method includes:
  • variable information In the case where the first syntax element information indicates that the sequence is allowed to use parity hiding technology, obtain variable information
  • variable information indicates that there is a segment in the current frame that satisfies the first preset encoding method, determine the second syntax element information
  • the absolute value of the quantization coefficient of the current block is determined.
  • inventions of the present application provide an encoding method, which is applied to an encoder.
  • the method includes:
  • variable information In the case where the first syntax element information indicates that the sequence is allowed to use parity hiding technology, obtain variable information
  • variable information indicates that there is a segment in the current frame that satisfies the first preset encoding method, determine the second syntax element information
  • the absolute value of the quantization coefficient of the current block is encoded.
  • embodiments of the present application provide a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following:
  • the first syntax element information is used to indicate whether the sequence uses parity hiding technology
  • the second syntax element information is used to indicate whether the frame level or segment level uses parity hiding technology
  • the third syntax element information is used to indicate block level Whether to use parity hiding technology
  • the preset parameter value includes at least one of the following: a quantity threshold, a preset component, and a preset transformation type.
  • embodiments of the present application provide a decoder, including:
  • the decoding part is configured to parse the code stream and determine the first syntax element information
  • a first determining part configured to obtain variable information when the first syntax element information indicates that the sequence is allowed to use parity concealment technology
  • the decoding part is also configured to determine the second syntax element information when the variable information indicates that there is a segment that satisfies the first preset encoding method in the current frame; and, based on the second syntax element information, If it is determined that there is a hidden quantization coefficient in the current block, the absolute value of the quantization coefficient of the current block is determined.
  • an embodiment of the present application provides a decoder, the decoder comprising: a first memory and a first processor; wherein:
  • the first memory is used to store a computer program that can be run on the first processor
  • the first processor is configured to execute the decoding method described in the first aspect when running the computer program.
  • an encoder including:
  • the second determination part is configured to determine the first syntax element information; when the first syntax element information indicates that the sequence is allowed to use the parity concealment technology, obtain variable information; and when the variable information indicates that the current frame satisfies the In the case of fragments of the first preset encoding method, determine the second syntax element information;
  • the encoding part is configured to encode the absolute value of the quantization coefficient of the current block based on the second syntax element information.
  • embodiments of the present application provide an encoder, which includes a second memory and a second processor; wherein,
  • the second memory is used to store a computer program capable of running on the second processor
  • the second processor is configured to execute the encoding method described in the second aspect when running the computer program.
  • embodiments of the present application provide a computer storage medium that stores a computer program.
  • the computer program is executed by a first processor, the decoding method described in the first aspect is implemented, or, The encoding method described in the second aspect when the computer program is executed by the second processor.
  • Embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium.
  • the coding end or the decoding end it is determined through the first syntax element information that parity concealment technology is allowed to be used at the sequence level.
  • the codec uses the parity concealment technology, it takes into account that when the first preset encoding method is adopted, the parity concealment technology is used to encode and decode the absolute value of the quantization coefficient of the current block by determining the second syntax element information. , effectively controlling the encoding and decoding process using parity hiding technology by depending on the high-level syntax (i.e., the second syntax element information) of whether lossy coding is used (that is, it can also be understood as whether lossless coding is used).
  • the high-level syntax i.e., the second syntax element information
  • parity hiding technology is improved, and then through the better applicability of parity hiding technology, parity hiding technology is applied in the process of encoding and decoding, which reduces the code rate of encoding and decoding. It also improves encoding and decoding efficiency and performance.
  • Figure 1 is a schematic diagram of a block-based coding framework
  • FIG2A is a schematic diagram of a system composition block diagram of an encoder provided in an embodiment of the present application.
  • Figure 2B is a schematic block diagram of a system composition of a decoder provided by an embodiment of the present application.
  • Figure 3 is a schematic flow chart of a decoding method provided by an embodiment of the present application.
  • Figure 4A is an exemplary Zig-Zag scan sequence diagram provided by the embodiment of the present application.
  • Figure 4B is an exemplary Diagonal scan sequence diagram provided by the embodiment of the present application.
  • Figure 4C is a schematic diagram of an exemplary column scan sequence provided by the embodiment of the present application.
  • Figure 4D is a schematic diagram of an exemplary row scan sequence provided by an embodiment of the present application.
  • FIG5 is a schematic diagram of an exemplary 8 ⁇ 8 transform block of a reverse Zig-Zag scan provided in an embodiment of the present application
  • Figure 6A is an exemplary BR part for qIdx provided by the embodiment of the present application, a schematic diagram of the five positions of the referenced codec level during Zig-Zag scan/Diagonal scan;
  • Figure 6B is an exemplary BR part for qIdx provided by the embodiment of the present application, a schematic diagram of the five positions of the referenced encoded and decoded levels during column scan;
  • Figure 6C is an exemplary BR part for qIdx provided by the embodiment of the present application, and a schematic diagram of the five positions of the referenced encoded and decoded levels during row scan;
  • Figure 7A is an exemplary LR part for qIdx provided by the embodiment of the present application, a schematic diagram of three positions of the referenced codec level during Zig-Zag scan/Diagonal scan;
  • Figure 7B is an exemplary LR part of qIdx provided by the embodiment of the present application, and a schematic diagram of three positions of the referenced encoded and decoded levels during column scan;
  • Figure 7C is an exemplary LR part of qIdx provided by the embodiment of the present application, and a schematic diagram of the five positions of the referenced encoded and decoded levels during row scan;
  • Figure 8 is a schematic flow chart of an encoding method provided by an embodiment of the present application.
  • Figure 9 is a schematic structural diagram of a decoder provided by an embodiment of the present application.
  • Figure 10 is a schematic diagram of the specific hardware structure of a decoder provided by an embodiment of the present application.
  • Figure 11 is a schematic structural diagram of an encoder provided by an embodiment of the present application.
  • Figure 12 is a schematic diagram of the specific hardware structure of an encoder provided by an embodiment of the present application.
  • Figure 13 is a schematic structural diagram of a coding and decoding system provided by an embodiment of the present application.
  • VVC Very Video Coding
  • CU Coding Unit
  • CTU Coding Tree Unit
  • LCU Largest Coding Unit
  • DCT Discrete Cosine Transform
  • AOM video compression reference software (AOMedia Video Model, AVM);
  • RDOQ Rate-Distortion Optimization Quantization
  • each frame in the video image is divided into square LCUs of the same size (such as 128 ⁇ 128, 64 ⁇ 64, etc.).
  • Each LCU can also be divided into rectangular CUs according to rules; and the CU may also be divided into smaller ones.
  • the coding framework can include steps such as Prediction, Transform, Quantization, Entropy Coding, and In Loop Filter.
  • prediction can be divided into intra prediction (Intra Prediction) and inter prediction (Inter Prediction).
  • Inter prediction can include motion estimation (Motion Estimation) and motion compensation (Motion Compensation).
  • intra-frame prediction in video encoding and decoding technology can eliminate the spatial redundancy between adjacent pixels; however, due to the There is also a strong similarity between frames.
  • inter-frame prediction is used to eliminate temporal redundancy between adjacent frames, thereby improving encoding and decoding efficiency.
  • the basic process is as follows: in the encoder, divide a frame of image into blocks, use intra-frame prediction or inter-frame prediction for the current block to generate the predicted block of the current block, subtract the predicted block from the original block of the current block block to obtain a residual block, transform and quantize the residual block to obtain a quantized coefficient matrix, entropy encode the quantized coefficient matrix and output it to the code stream.
  • intra prediction or inter prediction is used for the current block to generate the prediction block of the current block.
  • the code stream is decoded to obtain the quantization coefficient matrix, and the quantization coefficient matrix is inversely quantized and inversely transformed to obtain the residual block.
  • the prediction block and the residual block are added to obtain the reconstructed block.
  • Reconstruction blocks form a reconstructed image, and loop filtering is performed on the reconstructed image based on images or blocks to obtain a decoded image.
  • the encoder also needs similar operations as the decoder to obtain the decoded image.
  • the decoded image can be used as a reference frame for inter-frame prediction for subsequent frames.
  • the block division information, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information determined by the encoder need to be output to the code stream if necessary; then the decoder determines and The same block division information, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information of the encoder ensures that the decoded image obtained by the encoder is the same as the decoded image obtained by the decoder.
  • the decoded image obtained by the encoder is often also called a reconstructed image.
  • the current block may be divided into prediction units during prediction, and the current block may be divided into transformation units during transformation. The divisions of prediction units and transformation units may be different.
  • the current block may be the current coding unit (CU), the current prediction unit (PU), or the current transform block (TU or TB), etc., which is not limited in the embodiment of the present application.
  • AOM's reference software is based on the AV1 standard and is an exploration and research on the possible standardization of AV2 encoding tools. Similar to most mainstream video encoding and decoding standards, AOM's reference software (i.e. AVM) is also based on traditional block-based encoding and decoding. It includes multiple parts, such as: block division, intra-frame prediction, inter-frame prediction, Transformation, quantization, entropy coding, loop and post-processing filtering, unique coding of screen content, etc.
  • the embodiments of this application do not limit the use of traditional coding and decoding frameworks.
  • the embodiments of this application mainly improve the transformation/quantization and inverse quantization/inverse transformation parts to improve the coding performance of AVM.
  • the quantization and inverse quantization parts are closely related to the coefficient encoding part.
  • the purpose of quantization is to reduce the dynamic range of the transform coefficients, thereby reducing the number of bits consumed when encoding coefficients.
  • the process of quantization and inverse quantization is as follows:
  • t i is the transformation coefficient
  • qstep is the quantization step size (related to the quantization parameters set in the configuration file)
  • q i is the quantization coefficient
  • round() is the rounding process, which is not limited to upper rounding or lower rounding, etc.
  • the quantization process is controlled by the encoder.
  • t′ i is the reconstruction transformation coefficient. Due to the accuracy loss caused by the rounding process, t′ i and t i are different.
  • B(q i ) is the calculation process of the encoder estimating the bits consumed in encoding q i ; J is the rate distortion cost; ⁇ is the preset coefficient; and D is the loss value in the encoding process.
  • the encoder determines the value of q i , the inverse quantization process at the decoder remains unchanged, so the encoder can decide q i more freely. Normally, the encoder will optimize each q i based on the principle of minimizing the total cost of the current block. This process is called rate-distortion quantization, and is also widely used in video coding.
  • a multi-symbol arithmetic coding method is used in AVM to encode/decode the quantized coefficients, and each quantized coefficient can be identified by one or more multi-symbol identifiers.
  • each quantized coefficient can be segmented and represented by the following multi-symbol identifiers, as follows:
  • -Identification 1 represents the part from 0 to 3, a total of 4 symbols (0, 1, 2, 3). When the symbol of identification 1 is 3, further encoding/decoding of identification 2 is required;
  • -Identification 2 represents the part from 3 to 6, with a total of 4 symbols (0, 1, 2, 3). When the symbol of identification 2 is 3, further encoding/decoding of identification 3 is required;
  • Identifier 3 represents the part from 6 to 9, with a total of 4 symbols (0, 1, 2, 3). When the symbol of identifier 3 is 3, it is necessary to further encode/decode identifier 4;
  • Identifier 4 represents the part from 9 to 12, with a total of 4 symbols (0, 1, 2, 3). When the symbol of identifier 4 is 3, it is necessary to further encode/decode identifier 5;
  • -Identification 5 indicates the part from 12 to 15, with a total of 4 symbols (0, 1, 2, 3). When the symbol of identification 5 is 3, it is necessary to further encode/decode the part greater than or equal to 15.
  • the part greater than or equal to 15 uses the bypass model, such as exponential Golomb encoding/decoding; while the identifiers 1 to 5 use the context model, where identifier 1 has a separate set of context models. Identifiers 2 to 5 share a set of context models.
  • the current quantization coefficient is a non-zero coefficient, the sign needs to be encoded/decoded.
  • the encoding/decoding process of each identifier in the current block is divided into the following two loop processes:
  • Loop 1 First, encode/decode identifiers 1 to 5 in the scanning order from the last non-zero coefficient to the upper left corner of the current block.
  • the coefficient part represented by the identifier 1 is called the Base Range (BR)
  • the coefficient portion represented by the identifiers 2-5 is called the Lower Range (LR)
  • the portion greater than or equal to 15 is called the Higher Range (HR).
  • the absolute value of the sum of the identifiers 1-5 of the decoded quantization coefficient index qIdx can also be written as the following formula (4):
  • the ⁇ LR identifier is used here to sum up the identifiers 2-5.
  • Loop 2 Then according to the scanning order from the upper left corner of the current block to the last non-zero coefficient, encode/decode the sign of the non-zero coefficient and the part exceeding 15. Among them, if the coefficient in the upper left corner is a non-zero coefficient, The encoding/decoding of the positive and negative signs adopts the context model, and the encoding/decoding of the non-zero coefficients in the remaining positions adopts the bypass model (specifically, it can also be called the "equal probability model").
  • S() is multi-symbol context model encoding/decoding
  • L(1) is bypass model encoding/decoding
  • each frame of image can include multiple segments (segments), up to 8, and these segments can independently use lossless compression (lossless encoding) or lossy compression (encoding).
  • lossless encoding lossless encoding
  • lossy compression encoding
  • the parity hiding technology the change in the adjusted quantization coefficient value cannot be used in lossless compression.
  • Such a change in the quantization coefficient value cannot be used in lossless compression and near-lossless encoding, resulting in the use of parity hiding technology.
  • the performance is low, so for lossless encoded fragments, the parity concealment technology should be turned off.
  • embodiments of the present application provide a decoding method that determines the first syntax element information by parsing the code stream; when the first syntax element information indicates that the sequence is allowed to use parity concealment technology, obtain the variable information; in the variable information If it indicates that there is a segment that satisfies the first preset coding method in the current frame, determine the second syntax element information; if it is determined that there is a hidden quantization coefficient in the current block based on the second syntax element information, determine the quantization coefficient of the current block. Absolute value.
  • the embodiment of the present application provides a coding method by determining the first syntax element information; when the first syntax element information indicates that the sequence is allowed to use the parity concealment technology, obtain the variable information; when the variable information indicates that there is a presence in the current frame that satisfies the third
  • the second syntax element information is determined; based on the second syntax element information, the absolute value of the quantization coefficient of the current block is encoded.
  • the encoding end or the decoding end determines through the first syntax element information that the parity hiding technology is allowed to be used at the sequence level, it is judged whether to determine the third step based on the variable information and the first preset encoding method (lossy encoding).
  • the second syntax element information wherein the representation of the second syntax element information is based on frame level or segment level, allows the use of parity concealment technology. In this way, when the codec uses the parity concealment technology, it takes into account that when the first preset encoding method is used, the parity concealment technology is used to encode the absolute value of the quantization coefficient of the current block by determining the second syntax element information.
  • the encoding and decoding process using parity concealment technology is controlled by relying on the high-level syntax (ie, the second syntax element information) of whether lossy coding is used (that is, it can also be understood as whether lossless coding is used). Therefore, in the process of encoding and decoding, the applicability of using parity hiding technology is improved, and then through the better applicability of parity hiding technology, parity hiding technology is applied in the process of encoding and decoding, which reduces the code rate of encoding and decoding. It also improves encoding and decoding efficiency and performance.
  • the high-level syntax ie, the second syntax element information
  • 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, an inverse quantization unit 110, an inverse transform unit 111, a second adder 112, Filtering unit 113, decoded picture buffer (Decoded Picture Buffer, DPB) unit 114 and entropy coding unit 115.
  • a segmentation unit 101 may include: a segmentation unit 101, a prediction unit 102, a first adder 107, a transform unit 108, a quantization unit 109, an inverse quantization unit 110, an inverse transform unit 111, a second adder 112, Filtering unit 113, decoded picture buffer (Decoded Picture Buffer, DPB) unit 114 and entropy coding unit 115.
  • DPB decoded Picture Buffer
  • the input of the encoder 100 can be a video composed of a series of pictures or a static picture
  • the output of the encoder 100 can be a bit stream (also called a "code stream") used to represent a compressed version of the input video. .
  • the segmentation unit 101 segments the pictures in the input video into one or more coding tree units (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 (bricks).
  • a tile or a brick can include one or more complete and/or partial CTUs.
  • the segmentation unit 101 may form one or more slices, where one 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 may also form one or more sub-pictures, where one sub-picture may include one or more slices, tiles or bricks.
  • the segmentation unit 101 transfers the CTU to the prediction unit 102.
  • the prediction unit 102 may be composed of a block segmentation unit 103, a motion estimation (Motion Estimation, ME) unit 104, a motion compensation (Motion Compensation, MC) unit 105, and an intra prediction unit 106.
  • the block partitioning unit 103 iteratively uses quadtree partitioning, binary tree partitioning, and ternary tree partitioning to further divide the input CTU into smaller coding units (CUs).
  • Prediction unit 102 may use ME unit 104 and MC unit 105 to obtain the inter prediction block of the CU.
  • Intra-prediction unit 106 may obtain intra-prediction blocks for a CU using various intra-prediction modes.
  • the rate-distortion optimized motion estimation method may be invoked by the ME unit 104 and the MC unit 105 to obtain the inter-prediction block
  • the rate-distortion optimized mode determination method may be invoked by the intra-prediction unit 106 to obtain the intra-prediction block.
  • the prediction unit 102 outputs the prediction block of the CU
  • the first adder 107 calculates the difference between the CU in the output of the partitioning unit 101 and the prediction block of the CU, that is, the residual CU.
  • 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 quantized coefficients (ie, levels).
  • the inverse quantization unit 110 performs a scaling operation on the quantized coefficients to output reconstruction coefficients.
  • the inverse transform unit 111 performs one or more inverse transforms corresponding to the transform in the transform unit 108 and outputs a reconstruction residual.
  • the second adder 112 calculates the reconstructed CU by adding the reconstruction 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 prediction reference.
  • the filtering unit 113 performs loop filtering on the reconstructed picture or sub-picture.
  • the filtering unit 113 includes one or more filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, a neural network-based filter, etc.
  • the filtering unit 113 determines that the CU is not used as a reference when encoding other CUs, the filtering unit 113 performs loop filtering on one or more target pixels in the CU.
  • the output of the filtering unit 113 is decoded pictures or sub-pictures, and these decoded pictures or sub-pictures are buffered to the DPB unit 114 .
  • the DPB unit 114 outputs decoded pictures or sub-pictures according to timing and control information.
  • the picture stored in the DPB unit 114 may also be used as a reference for the prediction unit 102 to perform inter prediction or intra prediction.
  • the entropy encoding unit 115 converts the parameters necessary for decoding the picture from the encoder 100 (such as control parameters and supplementary information, etc.) into binary form, and writes such binary form into the code stream according to the syntax structure of each data unit. , that is, the encoder 100 finally outputs a code stream.
  • the encoder 100 may have a second processor and a second memory recording the computer program. When the second processor reads and runs the computer program, the encoder 100 reads the input video and generates a corresponding code stream. Additionally, the encoder 100 may also be a computing device having one or more chips. These units implemented as integrated circuits on the chip have similar connection and data exchange functions as the corresponding units in Figure 2A.
  • 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 filter unit 208 and a decoded picture buffer unit 209 .
  • the input of the decoder 200 is a bit stream representing a compressed version of a video or a still picture
  • the output of the decoder 200 may be a decoded video composed of a series of pictures or a decoded still picture.
  • the input code stream of the decoder 200 may be the 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 elements into digital values and sends the digital values to the unit in the decoder 200 to obtain one or more decoded pictures.
  • the parsing unit 201 may also parse one or more syntax elements from the input code stream to display the decoded picture.
  • the parsing unit 201 sends the value of the syntax element and one or more variables set or determined according to the value of the syntax element for obtaining one or more decoded pictures to the decoder 200. unit.
  • Prediction unit 202 determines a prediction block for the current decoding block (eg, CU).
  • the prediction unit 202 may include a motion compensation unit 203 and an intra prediction unit 204.
  • 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 is indicated,
  • the prediction unit 202 transmits the relevant parameters from the parsing unit 201 to the intra prediction unit 204 to obtain the intra prediction block.
  • 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 (i.e., levels) from the parsing unit 201 to obtain reconstruction coefficients.
  • 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, the inverse operation of one or more transform operations performed by the inverse transform unit 111 in the encoder 100) to obtain the reconstruction residual.
  • the adder 207 performs an addition operation on its inputs (the prediction block from the prediction unit 202 and the reconstruction residual from the inverse transform unit 206) to obtain the reconstruction block of the current decoding block.
  • the reconstructed block is also sent to prediction unit 202 for use as a reference for other blocks encoded in intra prediction mode.
  • filtering unit 208 After all CUs in the picture or sub-picture are reconstructed, 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, a neural network-based filter, and the like.
  • filtering unit 208 determines that the reconstructed block is not used as a reference when decoding other blocks, filtering unit 208 performs loop filtering on one or more target pixels in the reconstructed block.
  • the output of the filtering unit 208 is a decoded picture or sub-picture, and the decoded picture or sub-picture is buffered to the DPB unit 209.
  • the DPB unit 209 outputs decoded pictures or sub-pictures according to timing and control information.
  • the picture stored in the DPB unit 209 may also be used as a reference to perform inter prediction or intra prediction by the prediction unit 202.
  • the decoder 200 may be a first memory having a first processor and recording a computer program. When the first processor reads and runs the computer program, the decoder 200 reads the input code stream and generates a corresponding decoded video. Additionally, the decoder 200 may also be a computing device having one or more chips. These units implemented as integrated circuits on the chip have similar connection and data exchange functions as the corresponding units in Figure 2B.
  • the "current block” specifically refers to the block currently to be encoded in the video image
  • the “current block” Specifically refers to the current block to be decoded in the video image.
  • the current block here may be the current coding unit, the current prediction unit, or the current transformation block, etc., and this embodiment of the present application does not make any limitation.
  • FIG. 3 shows a schematic flowchart of a decoding method provided by an embodiment of the present application.
  • the method may include:
  • the decoding method provided in the embodiment of this application is applied to decoders, especially to decoders in AVM.
  • the decoding method can be a decoding method related to the design of syntax elements.
  • the parity hiding technology is mainly used for the current block, depending on whether lossy coding or lossless coding is used to design high-level syntax and determine the parity hiding technology identification.
  • the parity hiding technology is applied in the encoding and decoding process, reducing the encoding and decoding code rate, and also Improved encoding and decoding efficiency and performance.
  • a video sequence when encoding and decoding a video sequence, may include multiple frame images, each frame image may include multiple segments, and each segment may include many blocks.
  • blocks are The unit describes the encoding and decoding process.
  • the decoder when the encoder transmits the code stream to the decoder, the decoder will decode in the order of parsing sequence level information - frame level information - fragment level information - block level information.
  • the encoder can use parity concealment technology to encode the current block to reduce the encoding rate and improve encoding performance.
  • the decoder also needs to use different decoding methods to perform targeted decoding on whether the current block uses parity concealment technology. Therefore, for parity hiding technology, when the decoder parses the code stream, it will first parse out the sequence-level information, such as the first syntax element information, by parsing a series of sequence header information sets.
  • the first syntax element information represents a sequence-level identifier.
  • the first syntax element information can be an example of a sequence-level parity hiding technology identifier.
  • the first syntax element information represents whether the current video sequence allows the sequence to use parity hiding technology.
  • the first syntax element information may be a first value or a second value. If the value of the first syntax element information is the first value, it is determined that the first syntax element information (i.e., the sequence-level parity concealment technology identifier) indicates that the current video sequence to be processed turns on the parity concealment technology; if the value of the first syntax element information is If the value is the second value, it is determined that the first syntax element information indicates that the parity concealment technology is not enabled for the current video sequence to be processed.
  • the first syntax element information i.e., the sequence-level parity concealment technology identifier
  • the first value and the second value are different, and the first value and the second value may be in parameter form or in numerical form.
  • the first syntax element information may be a parameter written in the profile, or may be the value of a flag, which is not specifically limited here.
  • enable flag bit (enable_flag) and disable flag bit (disable_flag).
  • the value of the enabled flag bit is the first value
  • the value of the non-enabled flag bit is the second value
  • the first value can be set to 1
  • the second value can be Set to 0; or, the first value can also be set to true (true), and the second value can also be set to false (false); however, the embodiment of the present application does not specifically limit it.
  • the first syntax element information may be expressed as enable_ph.
  • enable_ph to represent the sequence-level parity hiding technology flag.
  • the decoder determines whether it needs to continue parsing the lower-level syntax element information (lower-level parity hiding technology identification, that is, the third 2 syntax element identification information).
  • variable information may include: frame-level variable information and segment-level variable information.
  • the variable information represents whether lossy coding (i.e., the first preset coding method) is used.
  • the frame-level variable information represents whether lossy coding is used in the current frame, and the segment-level variable information represents whether lossy coding is used in the current segment. The way.
  • variable information can be directly obtained from other information in the decoding process, which is not limited by the embodiment of the present application.
  • variable information indicates that there is a segment that satisfies the first preset encoding method in the current frame, determine the second syntax element information.
  • the decoder after the decoder obtains the variable information, since the variable information can determine the encoding method of the fragment in the current frame, the decoder indicates that the variable information satisfies the first preset encoding method in the current frame. In the case of fragments, the second syntax element information is parsed.
  • the first preset encoding mode may be a lossy encoding mode
  • the second preset encoding mode may be a lossless encoding mode or a near-lossless encoding mode
  • the decoder can control whether the second syntax element information needs to be parsed depending on whether the segment in the current frame has a lossy encoding method, so as to determine whether it is needed when decoding the current block through the second syntax element information.
  • the second syntax element information represents a frame-level identification or a segment-level identification.
  • the second syntax element information represents whether the segment in the current frame allows the sequence to use parity concealment technology.
  • the second syntax element information may be, for example, a frame-level parity hiding technology identifier or a segment-level parity hiding technology identifier.
  • the frame-level parity hiding technology flag indicates whether the current frame allows the sequence to use the parity hiding technology
  • the segment-level parity hiding technology flag indicates whether the current segment allows the sequence to use the parity hiding technology.
  • the second syntax element information may be a first value or a second value. If the value of the second syntax element information is the first value, then it is determined that the second syntax element information indicates that the current frame or current segment to be processed uses the parity concealment technology; if the value of the second syntax element information is the second value, then It is determined that the second syntax element information indicates that the current frame or current segment to be processed does not use the parity concealment technique.
  • the first value and the second value are different, and the first value and the second value may be in parameter form or in numerical form.
  • the second syntax element information may be a parameter written in the profile, or may be the value of a flag, which is not specifically limited here.
  • enable flag bit (enable_flag) and disable flag bit (disable_flag).
  • the value of the enabled flag bit is the first value
  • the value of the non-enabled flag bit is the second value
  • the first value can be set to 1
  • the second value can be Set to 0; or, the first value can also be set to true (true), and the second value can also be set to false (false); however, the embodiment of the present application does not specifically limit it.
  • the second syntax element information when the second syntax element information is a frame-level parity hiding technology identifier, it can be expressed as allow_ph; when the second syntax element information is a segment-level parity hiding technology identifier, it can be expressed as allow_ph_seg.
  • variable information indicates that there is no segment in the current frame that satisfies the first preset encoding method, it indicates that the current block does not use parity concealment technology, the current block is decoded, and the absolute quantization coefficient is determined. value.
  • the decoder's determination or parsing of the second syntax element information depends on whether the encoding method adopted by the current frame to be processed or the current segment in the current frame is the first preset encoding method. When the first preset encoding method is satisfied, In the case of encoding mode, the second syntax element information is determined. This is because, if the encoding method adopted by the current frame or the current segment in the current frame is the second default encoding method, then the parity hiding technology will not be used, and there is no need to determine the second syntax element information.
  • the decoder can already make it clear that the current frame or the current segment in the current frame does not need to be considered when decoding parity hiding technology, so there is no need to spend time parsing the second syntax element information, which can effectively improve decoding efficiency and improve decoding performance.
  • the decoder when the decoder parses or determines the second syntax element information, it can learn whether the current frame or the fragments in the current frame adopt the parity concealment technology. After the current frame or the fragments of the current frame adopt the parity concealment technology, , sometimes it is necessary to continue to make further judgments to further determine whether the current block adopts parity hiding technology. Therefore, when the decoder determines that there is a hidden quantization coefficient in the current block based on the second syntax element information, it can continue to decode the current block and determine the absolute value of the quantization coefficient of the current block.
  • the decoder determines that there is a hidden quantization coefficient in the current block, that is, the parity concealment technique is used in the current block.
  • the current block may include multiple transformation blocks, and each transformation block may be divided into one or more regions.
  • each transformation block may be divided into one or more regions.
  • the current area when scanning the absolute value of the quantization coefficient of the current block according to the preset scanning order, first determine whether there is a hidden quantization coefficient with a hidden identifier in the current area. If it is determined that there is a hidden quantization coefficient in the current area, then it is necessary Hide the identification information corresponding to the hidden quantization coefficient, that is, no longer encode/decode the identification information corresponding to the hidden quantization coefficient, and subsequently determine the hidden quantization coefficient directly based on the relevant characteristics of the absolute value of the non-zero quantization coefficient included in the current area. Corresponding identification information. That is to say, when decoding, the decoder needs to use the correlation characteristics of the absolute value of the non-zero quantization coefficient to solve the identification information corresponding to the hidden quantization coefficient, and then determine the absolute value of the hidden quantization coefficient.
  • the current block may be divided into one or more regions, each region contains at least one absolute value of the quantization coefficient, and there may be a hidden quantization with a hidden identifier in each region.
  • Coefficient that is, there may be a hidden quantized coefficient in each region that does not require coding/decoding identification information.
  • the preset scanning order may be diagonal, Zigzag scan, Diagonal scan, horizontal scan (row scan), vertical scan (column scan), 4 ⁇ 4 sub-block scan or any Other scanning sequences are not limited here.
  • the area division of the current block may include: in the preset scanning order, the current block is divided into areas according to the preset size value, and at least one area is determined; wherein the current area is at least The currently decoded region within a region.
  • the size of the at least one area can be the same or different.
  • the preset size value is the size of each area that is preset.
  • the preset size value may be a fixed value, or a variable value or a fixed value written in the code stream.
  • the value of the preset size value may be set to 16.
  • the preset size value when written into the code stream, it can be encoded in the sequence header, image header, etc., without any limitation here.
  • the current block includes 2 M pixel values, and each of the multiple divided regions is 2 N pixel values.
  • 2 M divided by 2 N is a positive integer.
  • the 2 N pixel values are 2 N consecutive coefficients in the preset scanning order. These coefficients may include zero or non-zero coefficients (herein referred to as quantization coefficients).
  • quantization coefficients may include zero or non-zero coefficients (herein referred to as quantization coefficients).
  • the sizes of the multiple areas can be the same, that is, each area includes 2 N pixel values; or the sizes of the multiple areas can also be different, that is, the current block can also be divided into multiple areas. Areas that are consecutive in the preset scanning order but have different numbers of pixels in the area.
  • the steps for determining whether there is a hidden quantization coefficient of a hidden identifier for each region and how to determine the identification information corresponding to the hidden quantization coefficient are the same.
  • only the current region is used Take an example to describe it.
  • determining the absolute value of the quantization coefficient of the current block includes:
  • the decoder determines that there is a hidden quantization coefficient in the current block according to at least one of the number of decoded non-zero quantization coefficients, the color component of the current block and the transform type of the current block, and the second syntax element information, determine the current The absolute value of the quantization coefficient of the block.
  • the decoder determines that there is a hidden quantization coefficient in the current block, it can be determined based on the second syntax element information and the number of decoded non-zero quantization coefficients, or it can be determined based on the second syntax element information and the color component of the current block. It can also be determined based on the second syntax element information and the transformation type of the current block, and it can be determined based on the second syntax element information, the number of decoded non-zero quantization coefficients, and the color component of the current block, and it can be determined based on the second syntax element information.
  • the number of decoded non-zero quantization coefficients and the transform type of the current block are judged, and the judgment can be based on the second syntax element information, the color component of the current block, and the transform type of the current block, and the judgment can be based on the second syntax element information, the transformed type of the current block.
  • the number of decoded non-zero quantization coefficients, the color component of the current block, and the transformation type judgment of the current block are not limited by this embodiment of the application.
  • the decoder when the decoder parses out the second syntax element information indicating the use of parity concealment technology, the decoder scans the decoded quantization coefficient absolute values in the current area of the current block according to the preset scanning order. , determine the number of decoded non-zero quantization coefficients in the current area; determine whether there is a hidden quantization coefficient with a hidden identifier in the current area based on the number of non-zero quantization coefficients.
  • the number of non-zero quantization coefficients is greater than the quantity threshold, it is determined that there is a hidden quantization coefficient in the current area; if the number of non-zero quantization coefficients is less than or equal to the quantity threshold, it is determined that there is no hidden quantization coefficient in the current area.
  • the judgment based on the second syntax element information, the number of decoded non-zero quantized coefficients, the color component of the current block, and the transform type of the current block includes: in the number of decoded non-zero quantized coefficients It is determined that there is hidden quantization in the current block when it is greater than or equal to the quantity threshold, the color component of the current block is a preset component, the transformation type of the current block is a preset transformation type, and the second syntax element information indicates that the parity and even concealment technology is allowed to be used. Coefficient; if there is a hidden quantization coefficient in the current block, determine the absolute value of the quantization coefficient of the current block.
  • the second syntax element information indicates that the use of parity concealment technology is allowed, at least one of the following is combined: the number of decoded non-zero quantization coefficients is greater than or equal to the quantity threshold, the color component of the current block is a preset component, The transform type of the current block is a preset transform type to determine that there is a hidden quantization coefficient in the current block; otherwise, it is determined that there is no hidden quantization coefficient in the current block.
  • whether the parity hiding technology is used for different color components can be set, which is not limited by the embodiment of the present application.
  • the color component may include at least one of the following: a first color component, a second color component, and a third color component.
  • the first color component may be a brightness color component
  • the second color component and the third color component may be a chroma color component (for example, the second color component is a blue chroma color component, and the third color component is a red chroma color component. component; alternatively, the second color component is a red chroma color component and the third color component is a blue chroma color component).
  • the preset component may be the first color component.
  • the quantity threshold can be 4, which is not limited in the embodiment of this application, but it needs to be non-zero.
  • the number of non-zero quantization coefficients is greater than 3, or the number of non-zero quantization coefficients is greater than or equal to 4.
  • different coefficient encoding orders are selected according to different selected transformation modes.
  • the transformation may include the following 16 types. The embodiments of this application do not limit. Taking these 16 types as an example, the correspondence between the 16 transformations and the scanning order is shown in Table 2 below.
  • the scanning method of 1D Tansform Type is divided into row scanning and column scanning according to the horizontal and vertical directions.
  • 2D Transform Type can also be divided into Zig-Zag scan and Diagonal scan.
  • the Zig-Zag scan scan method sequence is shown in Figure 4A
  • the Diagonal scan scan method sequence is shown in Figure 4B
  • the column scan scan method sequence is shown in Figure 4C.
  • the order of row scan scanning methods is shown in Figure 4D. If it is a forward sequence, it is scanned from position 0 to position 15. If it is a reverse sequence, it is scanned from position 15 to position 0.
  • each transform block is divided into multiple regions, each region can hide the parity of a quantization coefficient, and different groups of context models can be used to decode the quantization coefficients with hidden parity and the quantization coefficients without hidden parity.
  • qIdx is the sum of BR, ⁇ LR and HR
  • Parity is the hidden parity value.
  • the absolute value of the quantization coefficient without hiding the parity is equal to the decoded qIdx.
  • the preset transformation type may be a non-Identity type in Table 2, which is not limited in the embodiment of this application.
  • the color component of the current block is a preset component
  • the transform type of the current block is a preset transform type
  • the second syntax element information indicates that the use is allowed
  • the number of decoded non-zero quantization coefficients is expressed as num_nz
  • PHTHRESH is the quantity threshold
  • condition can be expressed as the second syntax element information indicating that the parity hiding technology is allowed
  • the color component of the current block is expressed as plane_type
  • the brightness color component is expressed as PLANE_TYPE_Y
  • the transform type of the current block is expressed as primary_tx_type
  • the preset transform type is expressed as ⁇ IDTX.
  • the transformation block can be divided into a region every 16 positions according to the scanning order, and the last position in the scanning order of each region is a possible hidden parity
  • a specified number threshold for example, 3
  • the scanning order is from 63 to 0.
  • the transform block can be divided into four areas, namely scanning indexes 48-63, 32-47, 16-31, and 0-15. Among them, the coefficients at the four positions of index 48, 32, 16, and 0 may hide parity. Among them, index 21 is the last non-zero coefficient in the transform block. The coefficient encoding and decoding will skip the positions with indices greater than 21 and default them to zero, and the context model identification bits and the equal probability identification bits will be encoded and decoded in the order of 21, 20, ..., 0.
  • the parity of the 16th position is represented by the parity of the BR+ ⁇ LR sum at each position. If there are more than three non-zero coefficients from position 15 to position 1, the parity of the 0th position is represented by the parity of the BR+ ⁇ LR sum at each position.
  • the initial value of the context model of the AOM is divided into four types according to the different quantization parameters QP.
  • Figure 6A shows the five positions of the codec level that need to be referenced when using Zig-Zag/Diagonal scanning.
  • Figure 6B shows the five positions of the encoded and decoded levels that need to be referenced when scanning using column scan.
  • Figure 6C shows the five positions of the encoded and decoded levels that need to be referenced when using row scan.
  • the position where 0 is located represents the current block, and the position where 1 is located is the position of the absolute value of the surrounding encoded and decoded quantization coefficients of the reference.
  • Figure 7A shows the three positions of the codec level that need to be referenced when using Zig-Zag/Diagonal scanning.
  • Figure 7B shows the three positions of the encoded and decoded levels that need to be referenced when scanning using column scan.
  • Figure 7C shows the three positions of the encoded and decoded levels that need to be referenced when using row scan.
  • the position where 0 is located represents the current block, and the position where 1 is located is the position of the absolute value of the surrounding encoded and decoded quantization coefficients of the reference.
  • the codec when encoding and decoding the current area of the current block, the codec will refer to the values of several positions that have been encoded and decoded to determine the encoding and decoding hidden quantization coefficients of different color components of the current block.
  • the context model index value used. The context model index values are different for the DC coefficient positions and non-DC coefficient positions of different color components, as well as the differences between BR and LR.
  • the index value of the context model used is Index of context model.
  • is the five positions around the current position in several scanning modes in Figure 5
  • is the three positions around the current position in several scanning modes in Figure 6.
  • context models can be used for encoding and decoding for hidden quantization coefficients and non-hidden quantization coefficients, and different context models can also be used for encoding different parts of the hidden quantization coefficients at different types of coefficient positions of different color components.
  • Decoding can improve the diversity of encoding and decoding.
  • the decoder decodes to obtain the absolute value of the quantization coefficient of the current block.
  • the absolute value of each quantization coefficient may be represented by one or more multi-symbol identification information. Specifically, according to the size of the absolute value of the quantization coefficient, it can be represented by several types of multi-symbol identification information such as first identification information, second identification information, third identification information, fourth identification information and fifth identification information.
  • the process by which the decoder determines the absolute value of the quantization coefficient of a current block of the current region may include:
  • the absolute value of the quantization coefficient of the current block satisfies one of the following: 0, 1, 2, or greater than or equal to 3;
  • the absolute value of the quantization coefficient of the current block satisfies one of the following: 3, 4, 5, or greater than or equal to 6;
  • the absolute value of the quantization coefficient of the current block satisfies one of the following: 6, 7, 8, or greater than or equal to 9;
  • the absolute value of the quantization coefficient of the current block satisfies one of the following: 9, 10, 11, or greater than or equal to 12;
  • the absolute value of the quantization coefficient of the current block satisfies one of the following: 12, 13, 14, or greater than or equal to 15;
  • each identification information can include multiple symbols, specifically four symbols (0, 1, 2, 3).
  • the first identification information can be used to decode the part where the absolute value of the quantization coefficient of the current block is 0-3, the second identification information can be used to decode the part where the absolute value of the quantization coefficient of the current block is 3-6, and the third identification information It can be used to decode the absolute value part of the quantization coefficient of the current block whose absolute value of the quantization coefficient is 6 to 9.
  • the fourth identification information can be used to decode the part of the current block whose absolute value of the quantization coefficient is 9 to 12.
  • the fifth identification information The information can be used to decode the part where the absolute value of the quantization coefficient of the current block is 12 to 15.
  • the first identification information represents the part where the absolute value of the quantization coefficient is 0 to 3, with a total of 4 symbols (0, 1, 2, 3).
  • the second identification information represents the part where the absolute value of the quantization coefficient is 3 to 6, with a total of 4 symbols (0, 1, 2, 3).
  • the third identification information represents the part where the absolute value of the quantization coefficient is 6 to 9, with a total of 4 symbols (0, 1, 2, 3).
  • the fourth identification information represents the part where the absolute value of the quantization coefficient is 9 to 12, with a total of 4 symbols (0, 1, 2, 3).
  • the symbol of the fourth identification information is 3, Then it is necessary to further decode the fifth identification information; the fifth identification information represents the part where the absolute value of the quantization coefficient is 12 to 15, with a total of 4 symbols (0, 1, 2, 3).
  • the symbol of the fifth identification information is 3, Then it is necessary to further decode the part where the absolute value of the quantization coefficient is greater than or equal to 15.
  • the first identification information if the sign of the first identification information is 0, it means that the absolute value of the quantization coefficient of the current block is 0; if the sign of the first identification information is 1, it means that the quantization coefficient of the current block is 0.
  • the absolute value of the coefficient is 1; if the sign of the first identification information is 2, it means that the absolute value of the quantization coefficient of the current block is 2; if the sign of the first identification information is 3, it means that the absolute value of the quantization coefficient of the current block is is greater than or equal to 3, at this time, it is necessary to decode to obtain the second identification information; for the second identification information, if the symbol of the second identification information is 0, it means that the absolute value of the quantization coefficient of the current block is 3; if the second identification information If the sign is 1, it means that the absolute value of the quantization coefficient of the current block is 4; if the sign of the second identification information is 2, it means that the absolute value of the quantization coefficient of the current block is 5; if the sign of the second identification information is
  • the fifth identification information if the fifth identification information If the sign is 0, it means that the absolute value of the quantization coefficient of the current block is 12; if the sign of the fifth identification information is 1, it means that the absolute value of the quantization coefficient of the current block is 13; if the sign of the fifth identification information is 2, Then it means that the absolute value of the quantization coefficient of the current block is 14; if the sign of the fifth identification information is 3, it means that the absolute value of the quantization coefficient of the current block is greater than or equal to 15; when it is determined that the absolute value of the quantization coefficient of the current block is greater than or equals 15, continue to parse the code stream, and further determine the absolute value of the quantization coefficient of the current block.
  • the method may also include:
  • the bypass model is used to analyze the code stream and the absolute value of the quantization coefficient of the current block is determined.
  • the part greater than or equal to 15 can be decoded using the bypass model (such as exponential Golomb decoding); and the part less than 15, the first identification information, the second identification information, the third identification information, the fourth identification information and the fifth identification information (i.e., identification 1 to 5) can be decoded using the context model.
  • the first identification information i.e., identification 1
  • the remaining four identification information i.e., identification 2 to 5
  • decoding the absolute value of the quantization coefficient of the current block may include two loop processes.
  • the method may also include:
  • the second syntax element information indicates that the use of parity concealment technology is allowed
  • the bitstream is parsed according to the second loop sequence to determine the absolute value of the quantization coefficient of the current block.
  • the part of the absolute value of the quantization coefficient that is less than 15 can be determined according to the first loop sequence decoding, and then the part of the absolute value of the quantization coefficient greater than or equal to 15 can be determined according to the second loop sequence decoding.
  • both the first loop order and the second loop order are the order from the last non-zero quantized coefficient of the current block to the upper left position of the current block; or,
  • the first loop order is the order from the last non-zero quantized coefficient of the current block to the upper left position of the current block
  • the second loop order is the order from the upper left position of the current block to the last non-zero quantized coefficient of the current block.
  • first decode identifiers 1 to 5 in a cyclic order from the last non-zero quantized coefficient of the current block to the upper left position (i.e., the upper left corner); and then in a cyclic order from the upper left corner of the current block to the last In the cyclic sequence of non-zero quantized coefficients, decode the portion of the quantized coefficient whose absolute value is greater than or equal to 15 to determine the absolute value of the quantized coefficient of the current block.
  • the parts whose absolute value of the quantization coefficient is greater than or equal to 15 are decoded to determine the absolute value of the quantization coefficient of the current block.
  • the decoding end when it is judged through the first syntax element information that the parity concealment technology is allowed to be used at the sequence level, it is judged whether to determine the second encoding method based on the variable information and the first preset encoding method (lossy encoding).
  • the syntax element information wherein the second syntax element information representation is based on the frame level or the segment level, allows the use of parity concealment technology.
  • the decoder uses the parity concealment technology, it takes into account that when the first preset encoding method is used, the parity concealment technology is used to decode the absolute value of the quantization coefficient of the current block by determining the second syntax element information, which is effective
  • the decoding process using parity concealment technology is controlled by relying on the high-level syntax (i.e., the second syntax element information) of whether lossy coding is used (that is, it can also be understood as whether lossless coding is used).
  • the applicability of the parity hiding technology is improved, and through the better applicability of the parity hiding technology, the parity hiding technology is applied in the decoding process, which reduces the decoding code rate and also improves the decoding rate. Decoding efficiency and performance.
  • a transformation block (such as the current block, that is, when a block has an area and a position to hide parity) can no longer hide the parity of multiple coefficients, but hide the parity in the transformation block.
  • the parity of a coefficient usually this coefficient is the coefficient in the upper left corner of the transform block, such as a DC coefficient, is not limited in this embodiment of the application.
  • the parity of this coefficient will be determined based on the parity of the sum of absolute values or the sum of partial absolute values of other coefficients in the transform block under the current color component, and whether the coefficient contains hidden parity depends on whether the current transform block contains more than A certain number of non-zero coefficients (e.g. 3).
  • variable information includes: frame level variable information; the second syntax element information includes: frame level syntax element information; the frame level syntax element information indicates whether the parity concealment technology is allowed to be used at the frame level.
  • the embodiment of this application provides another decoding method, including:
  • the first syntax element information is represented as enable_ph; the logic of decoding to obtain the sequence-level parity hiding technology identifier is as follows:
  • sequence_header_obu is a collection of parsed sequence header information
  • enable_ph is the sequence-level parity hiding technology identifier. If it is 1, it means that the current video sequence can use the parity hiding technology, and if it is 0, it means that the current video sequence does not use the hiding technology.
  • f(1) means using an equal-probability binary identifier.
  • the difference is that the decoder obtains frame-level variable information.
  • the frame-level variable information can be expressed as CodedLossless.
  • CodedLossless can be the first value or the second value. If the value of CodedLossless is the first value, it is determined that all fragments in the current frame use the second preset encoding method, that is, lossless coding; if the value of CodedLossless is the second value, it is determined that there is at least one fragment in the current frame that uses The first default encoding method is selected, which is lossy encoding.
  • the first value and the second value are different, and the first value and the second value may be in parameter form or in numerical form.
  • CodedLossless can be a parameter written in the profile, which is not specifically limited here.
  • the first value can be set to 1, and the second value can be set to 0, which is not limited by the embodiment of this application.
  • the frame-level variable information indicates that there is at least one segment using the first preset encoding method in the current frame, determine the frame-level syntax element information.
  • the decoder after the decoder obtains the frame-level variable information, since the frame-level variable information can determine the encoding method of the fragment in the current frame, the decoder indicates that the frame-level variable information in the current frame satisfies the In the case of at least one segment of a preset encoding method, frame-level syntax element information is parsed.
  • enable_ph the first syntax element information, that is, the sequence-level parity hiding technology identification
  • the frame-level variable information CodedLossless is 0 (that is, at least one segment uses lossy coding)
  • determine the frame-level syntax element information allow_ph which is the frame-level parity hiding technology identifier.
  • the code logic identifier is as follows:
  • CodedLossless is 1, which means that all blocks of all segments of the current frame are lossless coding
  • CodedLossless is 0, which means that at least one segment of the current frame is lossy coding. Therefore, the frame-level parity concealment technology identifier allow_ph is in the current frame. It is not lossless compression, that is, CodedLossless is not 1, but 0, and the sequence-level parity hiding technology flag is 1 when parsed.
  • a frame-level parity hiding technology flag allow_ph of 1 indicates that the current frame can use the parity hiding technology, and a value of 0 indicates that the parity hiding technology cannot be used.
  • the value of allow_ph is set to 0.
  • the second syntax element information is the frame-level syntax element information, which will not be described again here.
  • enable_ph and allow_ph are both 1, but the current fragment is lossless encoding. Therefore, in this case, when deciding whether to use parity hiding technology for each block, you need to consider that allow_ph is 1, and it needs to be non-lossless encoding. Only when there are no other conditions can you determine whether to use parity hiding technology on the current block. .
  • the decoder needs to combine other Constraint conditions to determine whether there are hidden quantization coefficients in the current block.
  • the decoder needs to indicate in the frame-level syntax element information that the current frame allows the use of parity concealment technology (allow_ph is 1), and the current segment where the current block is located adopts the first preset encoding method (lossy encoding) In this case, if other constraints are not combined, it is determined that there is a hidden quantization coefficient in the current block.
  • the decoder needs to meet other restrictions when the frame-level syntax element information indicates that the current frame allows the use of parity concealment technology (allow_ph is 1), and the current segment where the current block is located adopts the first preset encoding method (lossy encoding). Conditions (current color component, current transformation type, or transformation block size, etc.), it is determined that there is a hidden quantization coefficient in the current block.
  • the frame-level syntax element information indicates that the current frame allows the use of parity concealment technology (allow_ph is 1), and the current segment where the current block is located adopts the second preset encoding method (lossless encoding) , or when the frame-level syntax element information indicates that the current frame does not allow the use of parity concealment technology (allow_ph is 0), it is determined that there is no hidden quantization coefficient in the current block, that is, no parity concealment technology is used.
  • the frame-level parity concealment technology identifier is obtained through conditional decoding of the sequence-level identifier, as shown in Table 4:
  • the decoder determines that the parity concealment technology is allowed to be used at the sequence level through the sequence-level parity concealment technology identification, it can determine whether to determine the frame-level parity concealment technology identification based on the frame-level variable information and the lossy encoding method. In this way, when the decoder uses the parity hiding technology, it takes into account the case where the lossy encoding method is used, determines the frame-level parity hiding technology identifier, and then uses the parity when combined with the frame-level variable information indicating that the encoding method of the current segment is lossy.
  • the concealment technology decodes the absolute value of the quantization coefficient of the current block, effectively controlling the decoding process using parity concealment technology by relying on the high-level syntax of whether lossy coding is used (that is, it can also be understood as whether lossless coding is used). Therefore, in the decoding process, the applicability of the parity hiding technology is improved, and through the better applicability of the parity hiding technology, the parity hiding technology is applied in the decoding process, which reduces the decoding code rate and also improves the decoding rate. Decoding efficiency and performance.
  • the variable information includes: segment-level variable information; the second syntax element information includes: frame-level syntax element information; the frame-level syntax element information indicates whether the parity concealment technology is allowed to be used at the frame level.
  • the embodiment of the present application provides yet another decoding method, including:
  • the difference is that the decoder obtains segment-level variable information.
  • segment-level variable information can be expressed as SegLossless.
  • the SegLossless variable information indicates whether any fragments of the current frame use lossless encoding.
  • code logic is as follows:
  • SegLossless can be the first value or the second value. If the value of SegLossless is the first value, it is determined that there is at least one segment in the current frame that adopts the second preset encoding method, that is, lossless encoding; if the value of SegLossless is the second value, it is determined that all segments in the current frame adopt the The first default encoding method is lossy encoding.
  • the first value and the second value are different, and the first value and the second value can be in parameter form or in digital form.
  • SegLossless can be a parameter written in the profile, which is not specifically limited here.
  • the first value can be set to 1, and the second value can be set to 0, which is not limited by the embodiment of this application.
  • the decoder uses the segment-level variable information to indicate that all segments in the current frame use In the case of the first default encoding mode, frame-level syntax element information is parsed.
  • the decoder's enable_ph (the first syntax element information, that is, the sequence-level parity hiding technology identification) is 1 (that is, allowed), and the segment-level variable information SegLossless is 0 (that is, all segments of the current frame are lossy encoded).
  • the frame-level syntax element information allow_ph determines the frame-level parity hiding technology identifier.
  • the code logic identifier is as follows:
  • the SegLossless variable information indicates whether there is a segment in the current frame that uses lossless coding.
  • SegLossless is 0, which means that all blocks of all segments of the current frame are lossy encoded
  • SegLossless is 1, which means that at least one segment of the current frame is lossless encoding. Therefore, the frame-level parity concealment technology identifier allow_ph is in the current frame.
  • the fragments are all lossy compression, that is, SegLossless is 0, and the sequence-level parity hiding technology flag is 1 when parsed.
  • the second syntax element information is the frame-level syntax element information, which will not be described again here.
  • the decoder can directly determine whether there is a hidden quantization coefficient in the current block in combination with other constraints when the frame-level syntax element information indicates that the current frame allows the use of parity hiding techniques. That is, when determining whether parity hiding technology can be used for each block, it is no longer necessary to confirm whether the current segment is lossless. If no other restrictions are combined, it is directly determined based on the value of allow_ph whether parity hiding technology can be used.
  • the decoder needs to directly determine that there is a hidden quantization coefficient in the current block if the frame-level syntax element information indicates that the current frame allows the use of parity concealment technology (allow_ph is 1), unless other restrictions are combined. .
  • the decoder needs to determine the current frame if other constraints (current color component, current transform type, or transform block size, etc.) are met when the frame-level syntax element information indicates that the current frame allows the use of parity concealment technology (allow_ph is 1). There are hidden quantization coefficients in the block.
  • the frame-level syntax element information indicates that the current frame does not allow the use of parity hiding technology (allow_ph is 0)
  • the frame-level parity concealment technology identifier is obtained through conditional decoding of the sequence-level identifier, as shown in Table 5:
  • the decoder can determine whether to determine the frame-level parity concealment technology identification based on the frame-level variable information and the lossy encoding method when it determines that the parity concealment technology is allowed to be used at the sequence level through the sequence-level parity concealment technology identification.
  • the decoder uses the parity hiding technology, it takes into account that when the fragments are all lossy encoding, determine the frame-level parity hiding technology identifier, and use the parity hiding technology to decode the absolute value of the quantization coefficient of the current block, effectively passing
  • the high-level syntax controls the decoding process using parity concealment technology.
  • the applicability of the parity hiding technology is improved, and through the better applicability of the parity hiding technology, the parity hiding technology is applied in the decoding process, which reduces the decoding code rate and also improves the decoding rate. Decoding efficiency and performance.
  • variable information includes: slice-level variable information; the second syntax element information includes: slice-level syntax element information; the slice-level syntax element information indicates whether parity hiding technology is allowed to be used at the slice level.
  • the embodiment of the present application provides yet another decoding method, including:
  • the difference is that the variable information is different.
  • the segment-level variable information here corresponds to one of its own for each segment, which is different from the segment-level variable information in S402 that represents the entire segment.
  • the segment-level variable information represents the encoding method used for a segment.
  • segment-level variable information can be expressed as LosslessArray[segmentId].
  • LosslessArray[segmentId] can be the first value or the second value. If the value of LosslessArray[segmentId] is the first value, it is determined that the current segment adopts the second default encoding method, that is, lossless encoding; if the value of LosslessArray[segmentId] is the second value, it is determined that the current segment adopts the first
  • the default encoding method is lossy encoding.
  • the decoder can obtain the segment-level variable information corresponding to each segment of the current frame.
  • the decoder traverses the segments of the current frame, and for each segment, the segment-level variable information is used to determine the encoding method of the current segment, so that Determine whether to parse the fragment-level syntax element information corresponding to the fragment.
  • segment-level variable information corresponding to each segment indicates that the current segment adopts the first preset encoding method
  • segment-level syntax element information of the current segment is parsed, and the segment-level syntax element information is used to further determine whether the current block adopts parity concealment.
  • the segment-level variable information corresponding to each segment indicates that the current segment uses the second preset encoding method, it means that the segment does not use parity hiding technology, that is, the blocks in the current segment do not use parity hiding technology, that is, allow_ph_seg The value is 0.
  • the decoder when the decoder traverses the segments of the current frame, if the segment-level variable information corresponding to each segment indicates that the current segment adopts the first preset encoding method, the segment-level syntax elements of the current segment are parsed. information.
  • segment-level syntax element information may be a segment-level parity hiding technology identifier, expressed as allow_ph_seg.
  • allow_ph_seg indicates whether the current segment uses the parity hiding technology. Allow_ph_seg is 1, which indicates that the current segment can use the parity hiding technology, and allow_ph_seg is 0, which indicates that the parity hiding technology cannot be used.
  • allow_ph_seg can be obtained through PhArray[], which is a variable that stores the value of each segment.
  • a PhArray[] value of 1 indicates that the current fragment can use parity and even hiding techniques
  • a PhArray[] value of 0 indicates that the current fragment cannot use parity and even hiding techniques.
  • parity concealment technology whether parity concealment technology can be used for the transformation block depends on the value of PhArray[]. (In addition to being based on allow_ph_seg conditions, each block can also have other restrictions such as transformation type, transformation block size, color component of the current block, etc.)
  • code logic is as follows:
  • the decoder when the segment-level syntax element information indicates that the current segment allows the use of parity concealment technology, that is, it has been determined that the current segments all adopt lossy coding, the decoder can perform the parity concealment technology. Therefore, the decoder can directly determine whether there is a hidden quantization coefficient in the current block when the segment-level syntax element information indicates that the current segment allows the use of parity and even concealment techniques, combined with other constraints. That is, when determining whether each block can use parity hiding technology, it is no longer necessary to confirm whether the current segment is lossless, unless other restrictions are combined, but directly determine whether the current block can use parity hiding technology based on the value of allow_ph_seg.
  • the decoder when the segment-level syntax element information indicates that the current segment allows the use of parity concealment technology (allow_ph_seg is 1), the decoder needs to directly determine that there is a hidden quantization coefficient in the current block without combining other restrictions. .
  • the decoder needs to determine the current segment if other constraints (current color component, current transform type, or transform block size, etc.) are met when the segment-level syntax element information indicates that the current segment allows the use of parity hiding technology (allow_ph_seg is 1). There are hidden quantization coefficients in the block.
  • segment-level syntax element information indicates that the current segment does not allow the use of parity hiding technology (allow_ph_seg is 0), or if PhArray[] is 0, it is determined that there is no presence in the current block.
  • Hidden quantization coefficients that is, no parity hiding technology is used.
  • the decoder can determine whether to determine the segment-level parity hiding technology identifier based on the segment-level variable information and the lossy encoding method when the sequence-level parity hiding technology is allowed to be used.
  • the decoder uses the parity hiding technology, it takes into account that the current segment uses lossy encoding, determines the segment-level parity hiding technology identifier, and uses the parity hiding technology to decode the absolute value of the quantization coefficient of the current block, effectively passing Depends on whether lossy coding is used (that is, it can also be understood as whether lossless coding is used) high-level syntax to control the decoding process using parity concealment technology.
  • the applicability of the parity hiding technology is improved, and through the better applicability of the parity hiding technology, the parity hiding technology is applied in the decoding process, which reduces the decoding code rate and also improves the decoding rate. Decoding efficiency and performance.
  • the frame-level parity concealment technology identification can reduce the decoded transmission code stream compared with the segment-level parity concealment technology identification.
  • the decoder can determine the third syntax element of the current block based on the second syntax element information; the third syntax element represents whether the block level is allowed Use parity hiding technology; when the third syntax element information indicates that the current block allows the use of parity hiding technology, determine that there is a hidden quantization coefficient in the current block; when there is a hidden quantization coefficient in the current block, determine the absolute quantization coefficient of the current block value.
  • the third syntax element may be a block-level parity hiding technology identifier.
  • the second syntax element information may indicate that the second syntax element information is allowed in the current frame.
  • the fragment uses the parity concealment technology
  • the third syntax element of the current block is further parsed.
  • the third syntax element information indicates that the current block allows the use of the parity concealment technology, it is determined that there must be a hidden quantization coefficient in the current block. If there is a hidden quantization coefficient in the current block, determine the absolute value of the quantization coefficient of the current block.
  • the third syntax element information may be a first value or a second value. If the value of the third syntax element information is the first value, it is determined that the current block uses the parity hiding technology; if the value of the third syntax element information is the second value, it is determined that the current block does not use the parity hiding technology.
  • the block-level parity hiding technology identifier can be further used to accurately determine whether the current block hides the quantization coefficient, thereby improving the determination accuracy.
  • whether the transform block uses parity hiding technology is also based on the example of whether the current transform block hides the parity of the upper left corner coefficient when the current transform block is a luminance component and the transform mode is not a consistent transform (Identity Transform) in the horizontal and vertical directions, and the number of non-zero coefficients except the upper left corner coefficient is greater than or equal to PHTHRESH (4).
  • the actual process of decoding the coefficients is shown in Table 7 below.
  • isHidePar is the condition of whether the current block has an upper-left coefficient that hides parity and evenness, and the condition therein can replace the information in the above embodiment. as follows:
  • LosslessArray[segmentId] that is, the current frame can use parity hiding technology and the current segment is not lossless encoding.
  • the current segment can use the parity hiding technology.
  • FIG. 8 shows a schematic flowchart of an encoding method provided by an embodiment of the present application. As shown in Figure 8, the method may include:
  • the embodiment of the present application uses the parity or other characteristics of the absolute value of the non-zero quantization coefficient included in the current area to hide the identification information corresponding to a certain non-zero quantization coefficient in AVM, which can be used to further improve encoding and decoding.
  • syntax elements are designed to improve the applicability of parity hiding technology.
  • parity hiding technology Through the application of parity hiding technology, the identification information of non-zero quantization coefficients is hidden, which saves bit rate and improves encoding and decoding performance.
  • the encoder Before the encoder encodes the current video sequence to be processed, it can first determine whether the parity hiding technology is enabled, that is, determine the first syntax element information and the sequence-level parity hiding technology identifier.
  • the first syntax element information represents a sequence-level identifier.
  • the first syntax element information can be an example of a sequence-level parity hiding technology identifier.
  • the first syntax element information represents whether the current video sequence allows the sequence to use parity hiding technology.
  • the first syntax element information may be a first value or a second value. If the value of the first syntax element information is the first value, it is determined that the first syntax element information (i.e., the sequence-level parity concealment technology identifier) indicates that the current video sequence to be processed turns on the parity concealment technology; if the value of the first syntax element information is If the value is the second value, it is determined that the first syntax element information indicates that the parity concealment technology is not enabled for the current video sequence to be processed.
  • the first syntax element information i.e., the sequence-level parity concealment technology identifier
  • the encoder determines whether it is necessary to generate lower-level syntax element information (lower-level parity hiding technology identification, that is, the second Syntax element identification information).
  • variable information may include: frame-level variable information and segment-level variable information.
  • the variable information represents whether lossy coding (i.e., the first preset coding method) is used.
  • the frame-level variable information represents whether lossy coding is used in the current frame, and the segment-level variable information represents whether lossy coding is used in the current segment. The way.
  • variable information can be directly obtained through other information in the decoding process, which is not limited by the embodiment of the present application.
  • variable information indicates that there is a segment that satisfies the first preset encoding method in the current frame, determine the second syntax element information.
  • the encoder determines the second syntax element information when the variable information indicates that there is a segment in the current frame that satisfies the first preset encoding method. In the case of fragments with a default encoding method, the second syntax element information is generated, not parsed.
  • the second syntax element information represents a frame-level identifier or a segment-level identifier.
  • the first default encoding method is a lossy encoding method.
  • the encoder generates the second syntax element information depending on whether the encoding method used by the current frame to be processed or the current segment in the current frame is the first preset encoding method.
  • the second syntax element information is generated when the first preset encoding method is adopted. This is because if the encoding method used by the current frame or the current segment in the current frame is the second preset encoding method, then the parity hiding technology will not be used, and there is no need to generate the second syntax element information.
  • the encoder can clearly understand that the parity hiding technology does not need to be considered when decoding the current frame or the current segment in the current frame, and there is no need to spend time generating the second syntax element information to inform the decoder to parse it, which can effectively improve the decoding efficiency, reduce the bit rate, and thus improve the encoding performance.
  • the encoder learns whether the current frame or the fragments in the current frame adopts the parity concealment technology, and generates the second syntax element information; and after the current frame or the fragments of the current frame adopt the parity concealment technology, it is sometimes necessary to Continue to make further judgments to further determine whether the current block uses parity hiding technology. Therefore, when the decoder determines that there is a hidden quantization coefficient in the current block based on the second syntax element information, the decoder encodes the absolute value of the quantization coefficient of the current block.
  • the encoder determines that there is a hidden quantization coefficient in the current block, that is, the encoding in the current block uses a parity concealment technique.
  • the current block may include multiple transformation blocks, and each transformation block may be divided into one or more regions.
  • each transformation block may be divided into one or more regions.
  • the current area when scanning the absolute value of the quantization coefficient of the current block according to the preset scanning order, first determine whether there is a hidden quantization coefficient with a hidden identifier in the current area. If it is determined that there is a hidden quantization coefficient in the current area, then it is necessary Hide the identification information corresponding to the hidden quantization coefficient, that is, no longer encode/decode the identification information corresponding to the hidden quantization coefficient, and subsequently determine the hidden quantization coefficient directly based on the relevant characteristics of the absolute value of the non-zero quantization coefficient included in the current area. Corresponding identification information. In other words, when encoding, the encoder needs to encode the identification information corresponding to the hidden quantization coefficient through the correlation characteristics of the absolute value of the non-zero quantization coefficient.
  • the steps of determining whether there is a hidden quantization coefficient with a hidden identifier and how to determine the identifier information corresponding to the hidden quantization coefficient are the same for each region, and the following description is only made by taking the current region as an example.
  • the absolute value of the quantization coefficient of the current block is encoded based on the second syntax element information, including: the encoder determines that there are hidden quantization coefficients in the current block based on the number of encoded non-zero quantization coefficients, the color components of the current block and at least one of the transform type of the current block, and the second syntax element information, and then encodes the absolute value of the quantization coefficient of the current block.
  • the encoder determines that there is a hidden quantization coefficient in the current block, it can be determined based on the second syntax element information and the number of encoded non-zero quantization coefficients, or it can be determined based on the second syntax element information and the color component of the current block. It can also be determined based on the second syntax element information and the transformation type of the current block, and it can be determined based on the second syntax element information, the number of encoded non-zero quantization coefficients, and the color component of the current block, and it can be determined based on the second syntax element information.
  • the number of encoded non-zero quantization coefficients and the transform type of the current block are judged, and the judgment can be based on the second syntax element information, the color component of the current block, and the transform type of the current block, and the judgment can be based on the second syntax element information, the current block's transform type
  • the number of encoded non-zero quantization coefficients, the color component of the current block, and the transformation type of the current block are not limited in this embodiment of the application.
  • the encoder when the encoder generates the second syntax element information indicating the use of parity concealment technology, scan the absolute value of the encoded quantization coefficient in the current area of the current block according to the preset scanning order to determine The number of non-zero quantization coefficients that have been encoded in the current area; based on the number of non-zero quantization coefficients, determine whether there is a hidden quantization coefficient with hidden identification in the current area.
  • the number of non-zero quantization coefficients is greater than the quantity threshold, it is determined that there is a hidden quantization coefficient in the current area; if the number of non-zero quantization coefficients is less than or equal to the quantity threshold, it is determined that there is no hidden quantization coefficient in the current area.
  • the encoder operates when the number of encoded non-zero quantized coefficients is greater than or equal to the number threshold, the color component of the current block is a preset component, the transform type of the current block is a preset transform type, and the third
  • the second syntax element information indicates that when the parity concealment technology is allowed to be used, it is determined that a hidden quantization coefficient exists in the current block; when a hidden quantization coefficient exists in the current block, the absolute value of the quantization coefficient of the current block is encoded.
  • the second syntax element information indicates that the parity hiding technology is allowed, it is determined whether there are hidden quantization coefficients in the current block in combination with at least one of the following: the number of encoded non-zero quantization coefficients is greater than or equal to the quantity threshold, the color component of the current block is a preset component, and the transform type of the current block is a preset transform type; otherwise, it is determined that there are no hidden quantization coefficients in the current block.
  • the encoder writes the first syntax element information and the second syntax element information into the code stream.
  • each absolute value of the quantization coefficient may be represented by one or more multi-symbol identification information.
  • the size of the absolute value of the quantization coefficient it can be represented by several types of multi-symbol identification information such as first identification information, second identification information, third identification information, fourth identification information and fifth identification information.
  • the method may further include:
  • the absolute value of the quantization coefficient of the current block satisfies one of the following: 0, 1, 2, or greater than or equal to 3, determining the first identification information, encoding the first identification information, and writing the obtained encoding bits into the bitstream;
  • the method may also include:
  • the bypass model is used to encode the absolute value of the quantization coefficient of the current block, and the resulting coded bits are written into the code stream.
  • the part greater than or equal to 15 can be encoded using the bypass model (such as Exponential Golomb coding); and the part less than 15, the first identification information, the second identification information, the third identification information, the fourth identification information and the fifth identification information (i.e., identification 1 to 5) can be encoded using the context model.
  • the first identification information i.e., identification 1
  • the remaining four identification information i.e., identification 2 to 5
  • encoding the absolute value of the quantization coefficient of the current block may include two cyclic processes: encoding the identifiers 1 to 5 according to the first cyclic sequence, and then encoding the absolute value of the quantization coefficient greater than or equal to 1 in the second cyclic sequence according to the second cyclic sequence. or part equal to 15.
  • the encoding end determines through the first syntax element information that the parity hiding technology is allowed to be used at the sequence level, it will determine whether to generate the second syntax based on the variable information and the first preset encoding method (lossy encoding).
  • the element information wherein the second syntax element information representation is based on frame level or segment level, allows the use of parity hiding technology.
  • the encoder uses the parity concealment technology, it takes into account that when the first preset encoding method is used, the parity concealment technology is used to encode the absolute value of the quantization coefficient of the current block by determining the second syntax element information, which is effective
  • the encoding process using parity concealment technology is controlled by relying on the high-level syntax (i.e., the second syntax element information) of whether lossy coding is used (that is, it can also be understood as whether lossless coding is used).
  • the applicability of the parity hiding technology is improved, and through the better applicability of the parity hiding technology, the parity hiding technology is applied in the encoding and decoding process, which reduces the encoding code rate and improves the encoding rate. Improve coding efficiency and performance.
  • a transformation block (such as the current block, that is, when a block has an area and a position to hide parity) can no longer hide the parity of multiple coefficients, but hide the parity in the transformation block.
  • the parity of a coefficient usually the coefficient in the upper left corner of the transform block, such as a DC coefficient, is not limited in this embodiment of the application. The parity of this coefficient will be determined based on the parity of the sum of absolute values or the sum of partial absolute values of other coefficients in the transform block under the current color component, and whether the coefficient contains hidden parity depends on whether the current transform block contains more than A certain number of non-zero coefficients (e.g. 3).
  • variable information includes: frame level variable information; the second syntax element information includes: frame level syntax element information; the frame level syntax element information indicates whether the parity concealment technology is allowed to be used at the frame level.
  • the embodiment of this application provides another encoding method, including:
  • the frame-level variable information indicates that there is at least one segment using the first preset encoding method in the current frame, determine the frame-level syntax element information.
  • the decoder determines the absolute value of the quantized coefficient by decoding, while the encoder encodes the absolute value of the quantized coefficient.
  • the process of the encoder determining the syntax elements is to determine the sequence level and frame level during the encoding process and allow the use of parity concealment technology.
  • the generated sequence level identifier and frame level identifier are then used as the first syntax element information and the second The syntax element information is written into the code stream.
  • the encoder can determine whether to determine the frame-level parity concealment technology identification based on the frame-level variable information and the lossy encoding method when the sequence level allows the use of parity concealment technology through the sequence-level parity concealment technology identification. In this way, when the encoder uses the parity hiding technology, it takes into account the case where the lossy encoding method is used, determines the frame-level parity hiding technology identifier, and then uses the parity when combined with the frame-level variable information indicating that the encoding method of the current segment is lossy.
  • the hiding technology encodes the absolute value of the quantization coefficient of the current block, effectively controlling the encoding process using the parity hiding technology by relying on the high-level syntax of whether lossy coding is used (that is, it can also be understood as whether lossless coding is used). Therefore, in the encoding process, the applicability of the parity hiding technology is improved, and through the better applicability of the parity hiding technology, the parity hiding technology is applied in the encoding process, which reduces the encoding code rate and also improves the coding rate. Coding efficiency and performance.
  • the variable information includes: segment-level variable information; the second syntax element information includes: frame-level syntax element information; the frame-level syntax element information indicates whether the parity concealment technology is allowed to be used at the frame level.
  • the embodiment of the present application provides yet another encoding method, including:
  • the decoder determines the absolute value of the quantized coefficient by decoding, while the encoder encodes the absolute value of the quantized coefficient.
  • the process of the encoder determining the syntax element is to determine the sequence-level identifier and frame-level identifier during the encoding process and allow the use of parity concealment technology.
  • the generated sequence-level identifier and frame-level identifier are then used as the first syntax element information and The form of the second syntax element information is written into the code stream.
  • the encoder can determine whether to determine the frame-level parity concealment technology identification based on the frame-level variable information and the lossy encoding method when the sequence level allows the use of parity concealment technology through the sequence-level parity concealment technology identification.
  • the encoder uses the parity hiding technology, it takes into account that when all the clips use lossy encoding, it determines the frame-level parity hiding technology identifier, and uses the parity hiding technology to encode the absolute value of the quantization coefficient of the current block, effectively passing
  • the high-level syntax controls the encoding process using parity concealment technology.
  • the applicability of the parity hiding technology is improved, and through the better applicability of the parity hiding technology, the parity hiding technology is applied in the encoding process, which reduces the encoding code rate and also improves the coding rate. Coding efficiency and performance.
  • variable information includes: slice-level variable information; the second syntax element information includes: slice-level syntax element information; the slice-level syntax element information indicates whether parity hiding technology is allowed to be used at the slice level.
  • the embodiment of the present application provides yet another encoding method, including:
  • segment-level syntax element information indicates that the current segment allows the use of parity hiding technology, determine whether there is a hidden quantization coefficient in the current block;
  • the decoder decodes and determines the absolute value of the quantization coefficient, while the encoder encodes the absolute value of the quantization coefficient.
  • the process of determining the syntax element by the encoder is to determine the sequence level identifier and the fragment level identifier in the encoding process, and the sequence level identifier and the fragment level identifier are generated when the parity hiding technology is allowed to be used, and then written into the bitstream in the form of the first syntax element information and the second syntax element information.
  • the encoder can determine whether to determine the segment-level parity hiding technology identifier based on the segment-level variable information and the lossy encoding method when the sequence level allows the use of parity hiding technology through the sequence-level parity hiding technology identifier.
  • the encoder uses the parity hiding technology, it takes into account that the current segment uses lossy encoding, determines the segment-level parity hiding technology identifier, and uses the parity hiding technology to encode the absolute value of the quantization coefficient of the current block, effectively passing
  • the high-level syntax controls the encoding process using parity concealment technology.
  • the applicability of the parity hiding technology is improved, and through the better applicability of the parity hiding technology, the parity hiding technology is applied in the encoding process, which reduces the encoding code rate and also improves the coding rate. Coding efficiency and performance.
  • the frame-level parity concealment technology identification can reduce the encoded transmission code stream compared with the segment-level parity concealment technology identification.
  • the encoder can determine the third syntax element of the current block based on the second syntax element information; the third syntax element represents whether the block level is allowed Use parity hiding technology; when the third syntax element information indicates that the current block allows the use of parity hiding technology, determine that there is a hidden quantization coefficient in the current block; when there is a hidden quantization coefficient in the current block, the quantization coefficient of the current block is absolute The value is encoded.
  • the third syntax element may be a block-level parity hiding technology identifier.
  • the second syntax element information may indicate that the segment in the current frame is allowed to be used.
  • the third syntax element of the current block is further determined. If the third syntax element information indicates that the current block allows the use of parity concealment technology, it is determined that there must be a hidden quantization coefficient in the current block. If there is a hidden quantization coefficient in the current block, determine the absolute value of the quantization coefficient of the current block.
  • the third syntax element information may be a first value or a second value. If the value of the third syntax element information is the first value, it is determined that the current block uses the parity hiding technology; if the value of the third syntax element information is the second value, it is determined that the current block does not use the parity hiding technology.
  • the method further includes: writing the third syntax element information into the bitstream so that the decoder can use it during decoding.
  • the block-level parity concealment technology identification can be further used to accurately determine whether the current block hides the quantization coefficient, which can improve the judgment accuracy.
  • the embodiment of the present application further provides a code stream, which is generated by bit encoding according to the information to be encoded, and the information to be encoded includes at least one of the following:
  • the first syntax element information is used to indicate whether the sequence uses parity hiding technology
  • the second syntax element information is used to indicate whether the frame level or segment level uses parity hiding technology
  • the third syntax element information is used to indicate block level Whether to use parity hiding technology
  • the preset parameter value includes at least one of the following: a quantity threshold, a preset component, and a preset transformation type.
  • the bit stream is transmitted from the encoding end to the decoding end; then at the decoding end, by parsing the bit stream, it can be determined whether the current block uses the identification hiding technology; and by parsing the bit stream, the quantity threshold, preset components and preset transformation type, etc. can be determined; and by parsing the bit stream, the absolute value of the quantization coefficient of the current block can also be determined.
  • FIG. 9 shows a schematic structural diagram of a decoder 1 provided by an embodiment of the present application.
  • the decoder 1 may include:
  • the decoding part 10 is configured to parse the code stream and determine the first syntax element information
  • the first determining part 11 is configured to obtain variable information when the first syntax element information indicates that the sequence is allowed to use parity concealment technology
  • the decoding part 10 is further configured to determine the second syntax element information when the variable information indicates that there is a segment that satisfies the first preset encoding method in the current frame; and, based on the second syntax element information , when it is determined that there is a hidden quantization coefficient in the current block, determine the absolute value of the quantization coefficient of the current block.
  • variable information includes: frame-level variable information;
  • second syntax element information includes: frame-level syntax element information;
  • frame-level syntax element information represents whether parity concealment is allowed to be used at the frame level technology;
  • the first determining part 11 is further configured to determine the frame-level syntax element information when the frame-level variable information indicates that there is at least one segment using the first preset encoding method in the current frame.
  • the decoding part 10 is further configured to indicate in the frame-level syntax element information that the current frame allows the use of parity concealment technology, and the current segment where the current block is located adopts the In the case of the first preset encoding method, determine whether there is a hidden quantization coefficient in the current block; if there is a hidden quantization coefficient in the current block, determine the absolute value of the quantization coefficient of the current block.
  • variable information includes: segment-level variable information; the second syntax element information includes: frame-level syntax element information; the frame-level syntax element information represents whether parity concealment is allowed to be used at the frame level technology;
  • the first determining part 11 is further configured to determine the frame-level syntax element information when the segment-level variable information indicates that the segments in the current frame all adopt the first preset encoding method.
  • the decoding part 10 is further configured to determine whether there is concealment in the current block when the frame-level syntax element information indicates that the current frame allows the use of parity concealment technology.
  • Quantization coefficient if there is a hidden quantization coefficient in the current block, determine the absolute value of the quantization coefficient of the current block.
  • variable information includes: segment-level variable information;
  • second syntax element information includes: segment-level syntax element information;
  • segment-level syntax element information indicates whether parity concealment is allowed to be used at the segment level technology;
  • the first determining part 11 is also configured to traverse the segments of the current frame, and determine the current segment when the segment-level variable information indicates that the current segment in the current frame adopts the first preset encoding method.
  • the fragment-level syntax element information is also configured to traverse the segments of the current frame, and determine the current segment when the segment-level variable information indicates that the current segment in the current frame adopts the first preset encoding method.
  • the decoding part 10 is further configured to determine whether there is concealment in the current block when the segment-level syntax element information indicates that the current segment allows the use of parity concealment technology.
  • Quantization coefficient if there is a hidden quantization coefficient in the current block, determine the absolute value of the quantization coefficient of the current block.
  • the decoding part 10 is further configured to determine the third syntax element of the current block based on the second syntax element information; the third syntax element represents whether the block level is allowed Use parity concealment technology; when the third syntax element information indicates that the current block allows the use of parity concealment technology, determine that there is a hidden quantization coefficient in the current block; when there is a hidden quantization coefficient in the current block , determine the absolute value of the quantization coefficient of the current block.
  • the decoding part 10 is further configured to determine the number of decoded non-zero quantized coefficients according to at least one of the color component of the current block and the transform type of the current block, and the first Two syntax element information: when it is determined that there is a hidden quantization coefficient in the current block, determine the absolute value of the quantization coefficient of the current block.
  • the decoding part 10 is further configured to operate when the number of decoded non-zero quantized coefficients is greater than or equal to a quantity threshold, the color component of the current block is a preset component, and the When the transform type of the current block is a preset transform type, and the second syntax element information indicates that parity concealment technology is allowed to be used, it is determined that there is a hidden quantization coefficient in the current block; there is hidden quantization in the current block In the case of coefficients, the absolute value of the quantization coefficient of the current block is determined.
  • the first preset encoding method is a lossy encoding method.
  • the first syntax element information represents a sequence-level identifier
  • the second syntax element information represents a frame-level identifier or a segment-level identifier.
  • the decoder may include: a first communication interface 1001, a first memory 1002, and a first processor 1003; the various components are coupled together through a first bus system 1004. It can be understood that the first bus system 1004 is used to implement connection communication between these components. In addition to the data bus, the first bus system 1004 also includes a power bus, a control bus and a status signal bus. However, for the sake of clear explanation, various buses are labeled as the first bus system 1004 in FIG. 10 . in,
  • the first communication interface 1001 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • the first memory 1002 is used to store a computer program capable of running on the first processor 1003;
  • the first processor 1003 is configured to execute the decoding method implemented by the decoder when running the computer program.
  • the first memory 1002 in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be Random Access Memory (RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM DDRSDRAM
  • enhanced SDRAM ESDRAM
  • Synchlink DRAM SLDRAM
  • Direct Rambus RAM DRRAM
  • the first memory 1002 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
  • the first processor 1003 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the first processor 1003 .
  • the above-mentioned first processor 1003 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or a ready-made programmable gate array (Field Programmable Gate Array, FPGA). or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the steps of the method disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the first memory 1002.
  • the first processor 1003 reads the information in the first memory 1002 and completes the steps of the above method in combination with its hardware.
  • the processing unit can be implemented in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Device (DSP Device, DSPD), programmable Logic device (Programmable Logic Device, PLD), field-programmable gate array (Field-Programmable Gate Array, FPGA), general processor, controller, microcontroller, microprocessor, and other devices used to perform the functions described in this application electronic unit or combination thereof.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device Digital Signal Processing Device
  • DSPD Digital Signal Processing Device
  • PLD programmable Logic Device
  • FPGA field-programmable gate array
  • the technology described in this application can be implemented through modules (such as procedures, functions, etc.) that perform the functions described in this application.
  • Software code may be stored in memory and executed by a processor.
  • the memory can be implemented in the processor or external to the processor.
  • the decoding end when it is judged through the first syntax element information that the parity concealment technology is allowed to be used at the sequence level, it is judged whether to determine the second encoding method based on the variable information and the first preset encoding method (lossy encoding).
  • the syntax element information wherein the second syntax element information representation is based on the frame level or the segment level, allows the use of parity concealment technology.
  • the decoder uses the parity concealment technology, it takes into account that when the first preset encoding method is used, the parity concealment technology is used to decode the absolute value of the quantization coefficient of the current block by determining the second syntax element information, which is effective
  • the decoding process using parity concealment technology is controlled by relying on the high-level syntax (i.e., the second syntax element information) of whether lossy coding is used (that is, it can also be understood as whether lossless coding is used).
  • the applicability of the parity hiding technology is improved, and through the better applicability of the parity hiding technology, the parity hiding technology is applied in the decoding process, which reduces the decoding code rate and also improves the decoding rate. Decoding efficiency and performance.
  • FIG. 11 shows a schematic structural diagram of an encoder 2 provided by an embodiment of the present application.
  • the encoder 2 may include:
  • the second determining part 20 is configured to determine the first syntax element information; when the first syntax element information indicates that the sequence is allowed to use the parity concealment technology, obtain variable information; and when the variable information indicates that there is In the case of fragments that meet the first preset encoding method, determine the second syntax element information;
  • the encoding part 21 is configured to encode the absolute value of the quantization coefficient of the current block based on the second syntax element information.
  • variable information includes: frame-level variable information;
  • second syntax element information includes: frame-level syntax element information;
  • frame-level syntax element information represents whether parity concealment is allowed to be used at the frame level technology;
  • the second determining part 20 is further configured to determine the frame-level syntax element information when the frame-level variable information indicates that there is at least one segment using the first preset encoding method in the current frame.
  • the encoding part 21 is also configured to indicate in the frame-level syntax element information that the current frame allows the use of parity concealment technology, and the current segment where the current block is located adopts the In the case of the first preset encoding method, determine whether there is a hidden quantization coefficient in the current block;
  • the absolute value of the quantization coefficient of the current block is encoded.
  • variable information includes: segment-level variable information; the second syntax element information includes: frame-level syntax element information; the frame-level syntax element information represents whether parity concealment is allowed to be used at the frame level technology;
  • the second determining part 20 is further configured to determine the frame-level syntax element information when the segment-level variable information indicates that the segments in the current frame all adopt the first preset encoding method.
  • the encoding part 21 is also configured to determine whether there is hidden quantization in the current block when the frame-level syntax element information indicates that the current frame allows the use of parity concealment technology. coefficient;
  • the absolute value of the quantization coefficient of the current block is encoded.
  • variable information includes: segment-level variable information;
  • second syntax element information includes: segment-level syntax element information;
  • segment-level syntax element information indicates whether parity concealment is allowed to be used at the segment level technology;
  • the second determination part 20 is further configured to traverse the segments of the current frame, and determine the segment-level syntax element information of the current segment when the segment-level variable information indicates that the current segment in the current frame adopts the first preset encoding method.
  • the encoding part 21 is further configured to determine whether there is concealment in the current block when the segment-level syntax element information indicates that the current segment allows the use of parity concealment technology. Quantization coefficient;
  • the absolute value of the quantization coefficient of the current block is encoded.
  • the encoding part 21 is also configured to determine the third syntax element of the current block based on the second syntax element information; the third syntax element represents whether the block level is allowed Use odd-even concealment techniques;
  • the third syntax element information indicates that the current block allows the use of parity concealment technology, determining that a hidden quantization coefficient exists in the current block;
  • the absolute value of the quantization coefficient of the current block is encoded.
  • the encoding part 21 is further configured to determine the number of encoded non-zero quantized coefficients according to at least one of the color component of the current block and the transform type of the current block, and the third Two syntax element information: when it is determined that there is a hidden quantization coefficient in the current block, encode the absolute value of the quantization coefficient of the current block.
  • the encoding part 21 is also configured to operate when the number of encoded non-zero quantization coefficients is greater than or equal to the number threshold, the color component of the current block is a preset component, and the When the transform type of the current block is a preset transform type, and the second syntax element information indicates that parity concealment technology is allowed to be used, it is determined that there is a hidden quantization coefficient in the current block;
  • the absolute value of the quantization coefficient of the current block is encoded.
  • the encoder 2 further includes: a writing part 22;
  • the writing part is configured to write the first syntax element information and the second syntax element information into a code stream.
  • the encoder 2 further includes: a writing part 22;
  • the writing part is configured to write the third syntax element information into a code stream.
  • the first preset encoding method is a lossy encoding method.
  • the first syntax element information represents a sequence-level identifier
  • the second syntax element information represents a frame-level identifier or a segment-level identifier.
  • the encoder may include: a second communication interface 1201, a second memory 1202, and a second processor 1203; the various components are coupled together through a second bus system 1204.
  • the second bus system 1204 is used to implement connection communication between these components.
  • the second bus system 1204 also includes a power bus, a control bus and a status signal bus.
  • various buses are labeled as second bus system 1204 in FIG. 12 . in,
  • the second communication interface 1201 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • the second memory 1202 is used to store computer programs that can be run on the second processor 1203;
  • the second processor 1203 is configured to execute the encoding method implemented by the encoder when running the computer program.
  • the encoding end determines through the first syntax element information that the parity hiding technology is allowed to be used at the sequence level, it will determine whether to generate the second syntax based on the variable information and the first preset encoding method (lossy encoding).
  • the element information wherein the second syntax element information representation is based on frame level or segment level, allows the use of parity hiding technology.
  • the encoder uses the parity concealment technology, it takes into account that when the first preset encoding method is used, the parity concealment technology is used to encode the absolute value of the quantization coefficient of the current block by determining the second syntax element information, which is effective
  • the encoding process using parity concealment technology is controlled by relying on the high-level syntax (i.e., the second syntax element information) of whether lossy coding is used (that is, it can also be understood as whether lossless coding is used).
  • the applicability of the parity hiding technology is improved, and through the better applicability of the parity hiding technology, the parity hiding technology is applied in the encoding and decoding process, which reduces the encoding code rate and improves the encoding rate. Improve coding efficiency and performance.
  • the coding and decoding system 130 may include a coding device 1301 and a decoding device 1302.
  • the coding device 1301 may be the encoder described in any one of the aforementioned embodiments
  • the decoding device 1302 may be the decoder described in any one of the aforementioned embodiments.
  • the encoding device 1301 and the decoding device 1302 in the encoding and decoding system 130 can interact with each other.
  • the code stream generated by the encoding device 1301 can be transmitted to the decoding device 1302.
  • the variable information and the first preset encoding method Lossy coding
  • the encoder uses the parity concealment technology, it takes into account that when the first preset encoding method is used, the parity concealment technology is used to encode the absolute value of the quantization coefficient of the current block by determining the second syntax element information, which is effective
  • the encoding process using parity concealment technology is controlled by relying on the high-level syntax (i.e., the second syntax element information) of whether lossy coding is used (that is, it can also be understood as whether lossless coding is used).
  • the applicability of the parity hiding technology is improved, and through the better applicability of the parity hiding technology, the parity hiding technology is applied in the encoding and decoding process, which reduces the encoding code rate and improves the encoding rate. Improve coding efficiency and performance.
  • the variable information and the first preset encoding method are used. Determine whether to generate second syntax element information, wherein the second syntax element information represents the allowed use of parity hiding technology based on frame level or segment level.
  • the encoder uses the parity concealment technology, it takes into account that when the first preset encoding method is used, the parity concealment technology is used to encode the absolute value of the quantization coefficient of the current block by determining the second syntax element information, which is effective
  • the encoding process using parity concealment technology is controlled by relying on the high-level syntax (i.e., the second syntax element information) of whether lossy coding is used (that is, it can also be understood as whether lossless coding is used).
  • the applicability of the parity hiding technology is improved, and through the better applicability of the parity hiding technology, the parity hiding technology is applied in the encoding and decoding process, which reduces the encoding code rate and improves the encoding rate. Improve coding efficiency and performance.

Landscapes

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

Abstract

本申请实施例公开了一种编解码方法、码流、编码器、解码器以及存储介质,该方法包括:解析码流,确定第一语法元素信息;在第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;在变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;基于第二语法元素信息,确定当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。这样,能够通过高层语法的解析依赖于是否采用了无损编码,来控制是否可以使用奇偶隐藏技术,以此提高使用奇偶隐藏技术的适用性。

Description

编解码方法、码流、编码器、解码器以及存储介质 技术领域
本申请实施例涉及视频编解码技术领域,尤其涉及一种编解码方法、码流、编码器、解码器以及存储介质。
背景技术
随着人们对视频显示质量要求的提高,计算机视觉相关领域得到了越来越多的关注。近年来,图像处理技术在各行各业都取得了成功地应用。对于视频图像的编解码过程而言,在编码端,针对待编码的图像数据,在经过变换和量化处理之后将通过熵编码单元进行压缩编码,而熵编码处理后所生成的码流将传输到解码端;解码端解析码流,再经过反量化和逆变换处理之后,可以恢复出原始输入的图像数据。
然而,对于一个经过变换和量化处理得到的非零量化系数,这些非零量化系数可以是正值也可以是负值。在编解码过程中,还需对于非零量化系数的正负号标识信息的编解码,这样造成了码率过大,编解码性能较差的问题。
发明内容
本申请实施例提供一种编解码方法、码流、编码器、解码器以及存储介质,能够通过高层语法的解析依赖于是否采用了无损编码,来控制是否可以使用奇偶隐藏技术,以此提高使用奇偶隐藏技术的适用性,通过奇偶隐藏技术的适用,进行对非零量化系数的标识信息进行隐藏,节省了码率,提升编解码性能。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供了一种解码方法,应用于解码器,该方法包括:
解析码流,确定第一语法元素信息;
在所述第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;
在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;
基于所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
第二方面,本申请实施例提供了一种编码方法,应用于编码器,该方法包括:
确定第一语法元素信息;
在所述第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;
在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;
基于所述第二语法元素信息,对当前块的量化系数绝对值进行编码。
第三方面,本申请实施例提供了一种码流,该码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少之一:
第一语法元素信息、第二语法元素信息、第三语法元素信息、当前块的量化系数绝对值的编码信息以及预设参数值;
其中,所述第一语法元素信息用于指示序列是否使用奇偶隐藏技术,所述第二语法元素信息用于指示帧级或片段级是否使用奇偶隐藏技术;第三语法元素信息用于指示块级是否使用奇偶隐藏技术,所述预设参数值包括下述至少之一:数量阈值、预设分量和预设变换类型。
第四方面,本申请实施例提供了一种解码器,包括:
解码部分,被配置为解析码流,确定第一语法元素信息;
第一确定部分,被配置为在所述第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;
所述解码部分,还被配置为在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;以及,基于所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
第五方面,本申请实施例提供了一种解码器,该解码器包括:第一存储器和第一处理器;其中,
所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;
所述第一处理器,用于在运行所述计算机程序时,执行第一方面所述的解码方法。
第六方面,本申请实施例提供了一种编码器,包括:
第二确定部分,被配置为确定第一语法元素信息;在所述第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;以及在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;
编码部分,被配置为基于所述第二语法元素信息,对当前块的量化系数绝对值进行编码。
第七方面,本申请实施例提供了一种编码器,该编码器包括第二存储器和第二处理器;其中,
所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;
所述第二处理器,用于在运行所述计算机程序时,执行第二方面所述的编码方法。
第八方面,本申请实施例提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现第一方面所述的解码方法、或者,所述计算机程序被第二处理器执行时第二方面所述的编码方法。
本申请实施例提供了一种编解码方法、码流、编码器、解码器以及存储介质,在编码端或解码端,均通过第一语法元素信息判断出序列级允许使用奇偶隐藏技术的情况下,才依据变量信息和第一预设编码方式(有损编码)来判断是否确定第二语法元素信息,其中,第二语法元素信息表征基于帧级或片段级的允许使用奇偶隐藏技术。这样编解码器在使用奇偶隐藏技术时考虑到了在采用第一预设编码方式的情况下,通过确定第二语法元素信息的方式,来使用奇偶隐藏技术对当前块的量化系数绝对值进行编解码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法(即第二语法元素信息),来控制使用奇偶隐藏技术的编解码过程。因此,在编解码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于编解码的过程中,减少了编解码的码率,还提高了编解码效率和性能。
附图说明
图1为一种基于块的编码框架示意图;
图2A为本申请实施例提供的一种编码器的系统组成框图示意图;
图2B为本申请实施例提供的一种解码器的系统组成框图示意图;
图3为本申请实施例提供的一种解码方法的流程示意图;
图4A为本申请实施例提供的示例性的Zig-Zag scan顺序示意图;
图4B为本申请实施例提供的示例性的Diagonal scan顺序示意图;
图4C为本申请实施例提供的示例性的column scan顺序示意图;
图4D为本申请实施例提供的示例性的row scan顺序示意图;
图5为本申请实施例提供的示例性的一个反向Zig-Zag扫描的8x8变换块的示意图;
图6A为本申请实施例提供的示例性的针对qIdx的BR部分,Zig-Zag scan/Diagonal scan时的参考的已编解码level的5个位置示意图;
图6B为本申请实施例提供的示例性的针对qIdx的BR部分,column scan时的参考的已编解码level的5个位置示意图;
图6C为本申请实施例提供的示例性的针对qIdx的BR部分,row scan时的参考的已编解码level的5个位置示意图;
图7A为本申请实施例提供的示例性的针对qIdx的LR部分,Zig-Zag scan/Diagonal scan时的参考的已编解码level的3个位置示意图;
图7B为本申请实施例提供的示例性的针对qIdx的LR部分,column scan时的参考的已编解码level的3个位置示意图;
图7C为本申请实施例提供的示例性的针对qIdx的LR部分,row scan时的参考的已编解码level 的5个位置示意图;
图8为本申请实施例提供的一种编码方法的流程示意图;
图9为本申请实施例提供的一种解码器的组成结构示意图;
图10为本申请实施例提供的一种解码器的具体硬件结构示意图;
图11为本申请实施例提供的一种编码器的组成结构示意图;
图12为本申请实施例提供的一种编码器的具体硬件结构示意图;
图13为本申请实施例提供的一种编解码系统的组成结构示意图。
具体实施方式
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。
除非另有定义,本申请所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本申请中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。
对本申请实施例进行进一步详细说明之前,先对本申请实施例中涉及的名词和术语进行说明,本申请实施例中涉及的名词和术语适用于如下的解释:
新一代视频编码标准H.266/多功能视频编码(Versatile Video Coding,VVC);
编码单元(Coding Unit,CU);
编码树单元(Coding Tree Unit,CTU);
最大编码单元(Largest Coding Unit,LCU);
预测单元(Prediction Unit,PU);
变换单元(Transform Unit,TU);
变换块(Transform Block,TB);
离散余弦变换(Discrete Cosine Transform,DCT);
开放媒体联盟(Alliance for Open Media,AOM);
AOM的视频压缩参考软件(AOMedia Video Model,AVM);
率-失真优化量化(Rate-Distortion Optimization Quantization,RDOQ);
符号标识隐藏(Sign Data Hiding,SDH)。
可以理解,目前通用的视频编解码标准(如VVC)都采用基于块的混合编码框架。视频图像中的每一帧被分割成相同大小(如128×128,64×64等)正方形的LCU,每个LCU还可以根据规则划分成矩形的CU;而且CU可能还会划分成更小的PU、TU等。例如,如图1所示,该编码框架可以包括有预测(Prediction)、变换(Transform)、量化(Quantization)、熵编码(Entropy Coding)、环路滤波(In Loop Filter)等步骤。其中,预测又可以分为帧内预测(Intra Prediction)和帧间预测(Inter Prediction),帧间预测可以包括运动估计(Motion Estimation)和运动补偿(Motion Compensation)。由于视频图像的一个帧内相邻像素之间存在很强的相关性,在视频编解码技术中使用帧内预测方式能够消除相邻像素之间的空间冗余;但是由于视频图像中的相邻帧之间也存在着很强的相似性,在视频编解码技术中使用帧间预测方式消除相邻帧之间的时间冗余,从而能够提高编解码效率。
在视频编解码过程中,基本流程如下:在编码器中,将一帧图像划分成块,对当前块使用帧内预测或帧间预测产生当前块的预测块,当前块的原始块减去预测块得到残差块,对残差块进行变换、量化得到量化系数矩阵,对量化系数矩阵进行熵编码输出到码流中。在解码器中,对当前块使用帧内预测或帧间预测产生当前块的预测块,另一方面解码码流得到量化系数矩阵,对量化系数矩阵进行反量化、逆变换得到残差块,将预测块和残差块相加得到重建块。重建块组成重建图像,基于图像或基于块对重建图像进行环路滤波得到解码图像。编码器同样需要和解码器类似的操作获得解码图像。解码图像可以为后续的帧作为帧间预测的参考帧。编码器确定的块划分信息,预测、变换、 量化、熵编码、环路滤波等模式信息或者参数信息如果有必要需要输出到码流中;然后解码器通过解析及根据已有信息进行分析确定与编码器相同的块划分信息,预测、变换、量化、熵编码、环路滤波等模式信息或者参数信息,从而保证编码器获得的解码图像和解码器获得的解码图像相同。编码器获得的解码图像通常也叫做重建图像。在预测时可以将当前块划分成预测单元,在变换时可以将当前块划分成变换单元,预测单元和变换单元的划分可以不同。上述是基于块的混合编码框架下的视频编码器和解码器的基本流程,随着技术的发展,该框架或流程的一些模块或步骤可能会被优化,本申请实施例适用于该基于块的混合编码框架下的基本流程,但不限于该框架及流程。
在本申请实施例中,当前块(Current Block)可以是当前编码单元(CU)、当前预测单元(PU)、或者当前变换块(TU或TB)等,本申请实施例不作限制。
还可以理解,AOM的参考软件是基于AV1标准为基准,对可能进行标准化的AV2做编码工具的探索研究。与大多数主流的视频编解码标准类似,AOM的参考软件(即AVM)也是基于块为基础而进行的传统编解码,它包括多个部分,例如:块划分,帧内预测,帧间预测,变换,量化,熵编码,环路和后处理滤波,屏幕内容的特有编码等等,本申请实施例不限制其使用的传统编解码框架。本申请实施例主要是在变换/量化,以及反量化/逆变换部分进行改进,以提升AVM的编码性能。
其中,对于量化与反量化部分而言,其与系数编码部分关系紧密,量化的目的是将变换系数的动态范围减小,从而使得编码系数时消耗的比特数减少。在一种可能的实现方式中,量化与反量化的过程如下式所示:
Figure PCTCN2022120361-appb-000001
t′ i=q i·qstep         (2)
其中,t i为变换系数,qstep为量化步长(与配置文件中设置的量化参数相关),q i为量化系数,round()为取整过程,不限于上取整或下取整等,量化的过程受编码器控制。t′ i为重建变换系数,由于取整过程中造成的精度损失,t′ i与t i是不同的。
需要说明的是,量化会使得变换系数的精度降低,并且精度的损失是不可逆的。编码器通常通过率失真代价函数来衡量量化的代价。率失真代价函数如下所示:
J=D+λ·R=(t i-t′ i) 2+λ·B(q i)        (3)
其中,B(q i)为编码器估计编码q i所消耗的比特的计算过程;J为率失真代价;λ为预设系数;D为编码过程中的损失值。
在本申请实施例中,无论编码器如何决定q i的取值,解码端的反量化过程都是不变的,所以编码器可以更自由的决定q i。通常情况下,编码器会根据当前块的总代价最小为原则,对每一个q i进行最优化,这样的过程叫做率失真量化,也被广泛使用在视频编码中。
在一种可能的实施例中,对于AVM中的系数编码,AVM中使用多符号的算数编码(Multi-symbol arithmetic coding)方式对量化系数进行编码/解码,每个量化系数都可以由一个或多个多符号的标识来标识。示例性的,根据量化系数的大小,可分段由以下几种多符号的标识位表示,如下:
-标识1:表示0~3的部分,共4个符号(0,1,2,3),当标识1的符号为3时,则需要进一步编码/解码标识2;
-标识2:表示3~6的部分,共4个符号(0,1,2,3),当标识2的符号为3时,则需要进一步编码/解码标识3;
-标识3:表示6~9的部分,共4个符号(0,1,2,3),当标识3的符号为3时,则需要进一步编码/解码标识4;
-标识4:表示9~12的部分,共4个符号(0,1,2,3),当标识4的符号为3时,则需要进一步编码/解码标识5;
-标识5:表示12~15的部分,共4个符号(0,1,2,3),当标识5的符号为3时,则需要进一步编码/解码大于或等于15的部分。
需要说明的是,在本申请实施例中,大于或等于15的部分使用旁路模型,例如指数哥伦布编码/解码;而标识1~5则使用上下文模型,其中标识1有一套单独的上下文模型,标识2~5公用一套上下文模型。另外,若当前量化系数为非零系数时,还需要编码/解码正负号。各个标识在当前块中的编码/解码过程分为如下两个循环过程:
循环1:首先按照从最后一个非零系数至当前块左上角的扫描顺序,编码/解码标识1~5。
在本申请实施例中,标识1表示的系数部分称为Base Range(BR),标识2-5标识的系数部分称为Lower Range(LR),大于等于15的部分称为Higher Range(HR)。解码得到的量化系数索引qIdx的标识1-5的总和的绝对值,也可以写作如下公式(4)所示:
qIdx=∑(BR+∑LR)        (4)
其中,由于LR部分包括了标识2-5这4个标识,故这里用∑LR标识求和标识2-5。
需要说明的是,在没有引入奇偶隐藏技术时,量化系数的绝对值level=qIdx。
循环2:接着分别按照从当前块左上角到最后一个非零系数的扫描顺序,编码/解码非零系数的正负号和超过15的部分,其中,左上角处的系数若为非零系数,其正负号的编码/解码采用上下文模型,其余位置上的非零系数编码/解码采用旁路模型(具体也可称为“等概率模型”)。
在实现中,对于AVM中的系数编码,其代码描述如表1所示。
表1
for(c=eob-1;c>=0;c--){  
pos=scan[c]  
if(c==(eob-1)){  
coeff_base_eob S()
level=coeff_base_eob+1  
}else{  
coeff_base S()
level=coeff_base  
}  
   
if(level>NUM_BASE_LEVELS){  
for(idx=0;  
idx<COEFF_BASE_RANGE/(BR_CDF_SIZE-1);  
idx++){  
coeff_br S()
level+=coeff_br  
if(coeff_br<(BR_CDF_SIZE-1))  
break  
}  
}  
Quant[pos]=level  
}  
   
for(c=0;c<eob;c++){  
pos=scan[c]  
if(Quant[pos]!=0){  
if(c==0){  
dc_sign S()
sign=dc_sign  
}else{  
sign_bit L(1)
sign=sign_bit  
}  
}else{  
sign=0  
}  
if(Quant[pos]>  
(NUM_BASE_LEVELS+COEFF_BASE_RANGE)){  
length=0  
do{  
length++  
golomb_length_bit L(1)
}while(!golomb_length_bit)  
x=1  
for(i=length-2;i>=0;i--){  
golomb_data_bit L(1)
x=(x<<1)|golomb_data_bit  
}  
Quant[pos]=x+COEFF_BASE_RANGE+NUM_BASE_LEVELS  
}  
if(pos==0&&Quant[pos]>0){  
dcCategory=sign?1:2  
}  
Quant[pos]=Quant[pos]&0xFFFFF  
culLevel+=Quant[pos]  
if(sign)  
Quant[pos]=-Quant[pos]  
}  
其中,在表1中,S()为多符号的上下文模型编码/解码,L(1)为旁路模型编码/解码。
在相关技术中,在AOM的参考实现中,每一帧图像都可以包括多个片段(segment),最多8个,这些片段可以独立使用无损压缩(无损编码)或者有损压缩(编码)。针对片段中的一个变换块对应的经过变换和量化处理得到的非零量化系数,可以基于非零量化系数的数量确定是否可以进行该变换块的奇偶隐藏技术的使用。在奇偶性隐藏的技术中,调整后的量化系数值的改变无法在无损压缩时使用,这样的量化系数值的改变无法在无损压缩和接近无损编码等情况下使用,导致奇偶隐藏技术使用的适用性较低,所以对于无损编码的片段,应当关闭奇偶隐藏技术。
基于此,本申请实施例提供了一种解码方法,通过解析码流,确定第一语法元素信息;在第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;在变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;基于第二语法元素信息,确定当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
本申请实施例提供了一种编码方法,通过确定第一语法元素信息;在第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;在变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;基于第二语法元素信息,对当前块的量化系数绝对值进行编码。
这样,在编码端或解码端,均通过第一语法元素信息判断出序列级允许使用奇偶隐藏技术的情况下,才依据变量信息和第一预设编码方式(有损编码)来判断是否确定第二语法元素信息,其中,第二语法元素信息表征基于帧级或片段级的允许使用奇偶隐藏技术。这样编解码器在使用奇偶隐藏技术时考虑到了在采用第一预设编码方式的情况下,通过确定第二语法元素信息的方式,来使用奇偶隐藏技术对当前块的量化系数绝对值进行编码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法(即第二语法元素信息),来控制使用奇偶隐藏技术的编解码过程。因此,在编解码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于编解码的过程中,减少了编解码的码率,还提高了编解码效率和性能。
下面将结合附图对本申请各实施例进行清楚、完整的描述。
示例性的,参见图2A,其示出了本申请实施例提供的一种编码器的系统组成框图示意图。如图2A所示,编码器100可以包括:分割单元101、预测单元102、第一加法器107、变换单元108、量化单元109、反量化单元110、逆变换单元111、第二加法器112、滤波单元113、解码图片缓存(Decoded Picture Buffer,DPB)单元114和熵编码单元115。这里,编码器100的输入可以是由一系列图片或者一张静态图片组成的视频,编码器100的输出可以是用于表示输入视频的压缩版本的比特流(也 可以称为“码流”)。
其中,分割单元101将输入视频中的图片分割成一个或多个编码树单元(Coding Tree Units,CTUs)。分割单元101将图片分成多个图块(或称为瓦片,tiles),还可以进一步将一个tile分成一个或多个砖块(bricks),这里,一个tile或者一个brick中可以包括一个或多个完整的和/或部分的CTUs。另外,分割单元101可以形成一个或多个切片(slices),其中一个slice可以包括图片中按照栅格顺序排列的一个或多个tiles,或者覆盖图片中矩形区域的一个或多个tiles。分割单元101还可形成一个或多个子图片,其中,一个子图片可以包括一个或多个slices、tiles或bricks。
在编码器100的编码过程中,分割单元101将CTU传送到预测单元102。通常,预测单元102可以由块分割单元103、运动估计(Motion Estimation,ME)单元104、运动补偿(Motion Compensation,MC)单元105和帧内预测单元106组成。具体地,块分割单元103迭代地使用四叉树分割、二叉树分割和三叉树分割而进一步将输入CTU划分成更小的编码单元(Coding Units,CUs)。预测单元102可使用ME单元104和MC单元105获取CU的帧间预测块。帧内预测单元106可使用各种帧内预测模式来获取CU的帧内预测块。在示例中,率失真优化的运动估计方式可被ME单元104和MC单元105调用以获取帧间预测块,以及率失真优化的模式确定方式可被帧内预测单元106调用以获取帧内预测块。
在本申请实施例中,预测单元102输出CU的预测块,第一加法器107计算分割单元101的输出中的CU和CU的预测块之间的差值,即残差CU。变换单元108读取残差CU并对残差CU执行一个或多个变换操作以获取系数。量化单元109对系数进行量化并输出量化系数(即levels)。反量化单元110对量化系数执行缩放操作以输出重构系数。逆变换单元111执行对应于变换单元108中的变换的一个或多个逆变换并输出重构残差。第二加法器112通过使重构残差和来自预测单元102的CU的预测块相加而计算出重构CU。第二加法器112还将其输出发送到预测单元102以用作帧内预测参考。在图片或子图片中的所有CU被重构之后,滤波单元113对重构图片或子图片执行环路滤波。这里,滤波单元113包含一个或多个滤波器,例如去方块滤波器、采样自适应补偿(Sample Adaptive Offset,SAO)滤波器、基于神经网络的滤波器等。或者,当滤波单元113确定CU不用作其它CU编码时的参考时,滤波单元113对CU中的一个或多个目标像素执行环路滤波。
滤波单元113的输出是解码图片或子图片,这些解码图片或子图片缓存至DPB单元114。DPB单元114根据时序和控制信息输出解码图片或子图片。这里,存储在DPB单元114中的图片还可用作预测单元102执行帧间预测或帧内预测的参考。最后熵编码单元115将来自编码器100中解码图片所必需的参数(比如控制参数和补充信息等)转换成二进制形式,并根据每个数据单元的语法结构将这样的二进制形式写入码流中,即编码器100最终输出码流。
进一步地,编码器100可以是具有第二处理器和记录计算机程序的第二存储器。当第二处理器读取并运行计算机程序时,编码器100读取输入视频并生成对应的码流。另外,编码器100还可以是具有一个或多个芯片的计算设备。在芯片上实现为集成电路的这些单元具有与图2A中相应单元类似的连接和数据交换功能。
参见图2B,其示出了本申请实施例提供的一种解码器的系统组成框图示意图。如图2B所示,该解码器200可以包括:解析单元201、预测单元202、反量化单元205、逆变换单元206、加法器207、滤波单元208和解码图片缓存单元209。这里,解码器200的输入是用于表示视频或者一张静态图片的压缩版本的比特流,解码器200的输出可以是由一系列图片组成的解码视频或者一张解码的静态图片。
其中,解码器200的输入码流可以是编码器100所生成的码流。解析单元201对输入码流进行解析并从输入码流获取语法元素的值。解析单元201将语法元素的二进制表示转换成数字值并将数字值发送到解码器200中的单元以获取一个或多个解码图片。解析单元201还可从输入码流解析一个或多个语法元素以显示解码图片。
在解码器200的解码过程中,解析单元201将语法元素的值以及根据语法元素的值设置或确定的、用于获取一个或多个解码图片的一个或多个变量发送到解码器200中的单元。
预测单元202确定当前解码块(例如CU)的预测块。这里,预测单元202可以包括运动补偿单元203和帧内预测单元204。具体地,当指示帧间解码模式用于对当前解码块进行解码时,预测单元202将来自解析单元201的相关参数传递到运动补偿单元203以获取帧间预测块;当指示帧内预测模式用于对当前解码块进行解码时,预测单元202将来自解析单元201的相关参数传送到帧内预测单元204以获取帧内预测块。
反量化单元205具有与编码器100中的反量化单元110相同的功能。反量化单元205对来自解 析单元201的量化系数(即levels)执行缩放操作以获取重构系数。
逆变换单元206具有与编码器100中的逆变换单元111相同的功能。逆变换单元206执行一个或多个变换操作(即通过编码器100中的逆变换单元111执行的一个或多个变换操作的反操作)以获取重构残差。
加法器207对其输入(来自预测单元202的预测块和来自逆变换单元206的重构残差)执行相加操作以获取当前解码块的重构块。重构块还发送到预测单元202以用作在帧内预测模式下编码的其它块的参考。
在图片或子图片中的所有CU被重构之后,滤波单元208对重构图片或子图片执行环路滤波。滤波单元208包含一个或多个滤波器,例如去方块滤波器、采样自适应补偿滤波器、基于神经网络的滤波器等。或者,当滤波单元208确定重构块不用作对其它块解码时的参考时,滤波单元208对重构块中的一个或多个目标像素执行环路滤波。这里,滤波单元208的输出是解码图片或子图片,解码图片或子图片缓存至DPB单元209。DPB单元209根据时序和控制信息输出解码图片或子图片。存储在DPB单元209中的图片还可用作通过预测单元202执行帧间预测或帧内预测的参考。
进一步地,解码器200可以是具有第一处理器和记录计算机程序的第一存储器。当第一处理器读取并运行计算机程序时,解码器200读取输入码流并生成对应的解码视频。另外,解码器200还可以是具有一个或多个芯片的计算设备。在芯片上实现为集成电路的这些单元具有与图2B中相应单元类似的连接和数据交换功能。
还需要说明的是,当本申请实施例应用于编码器100时,“当前块”具体是指视频图像中的当前待编码的块;当本申请实施例应用于解码器200时,“当前块”具体是指视频图像中的当前待解码的块。另外,这里的当前块可以是当前编码单元、当前预测单元、或者当前变换块等等,本申请实施例并不作任何限定。
本申请的一实施例中,参见图3,其示出了本申请实施例提供的一种解码方法的流程示意图。如图3所示,该方法可以包括:
S101、解析码流,确定第一语法元素信息。
S102、在第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息。
在本申请实施例中提供的一种解码方法,应用于解码器,尤其是应用于AVM中的解码器。另外,该解码方法可以是一种关于语法元素设计的解码方法,这里主要是针对当前块使用奇偶隐藏技术,依赖是采用有损编码还是无损编码,来设计高层语法,确定奇偶隐藏技术标识的,以便在编解码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于编解码的过程中,减少了编解码的码率,还提高了编解码效率和性能。
在本申请实施例中,针对一个视频序列进行编解码时,一个视频序列可以包括多帧图像,每帧图像可以包括多个片段(segment),每个片段可以包括很多块,本申请以块为单位说明编解码过程。
在本申请实施例中,编码器传输至解码器的码流时,解码器会按照解析序列级信息-帧级信息-片段级信息-块级信息等顺序依次进行解码。
需要说明的是,编码器在编码时,可以采用奇偶隐藏技术对当前块进行编码,以减少编码码率,提升编码性能。那么相应的,在解码时,解码器也需要对当前块是否采用奇偶隐藏技术进行采用不同的解码方式针对性的解码。因此,针对奇偶隐藏技术时,解码器在解析码流时,会通过解析一系列序列头信息的集合,先解析出序列级信息,例如,第一语法元素信息。
其中,第一语法元素信息表征序列级标识,在本申请实施例中,在使用奇偶隐藏技术的场景中,第一语法元素信息示例性的可以为序列级奇偶隐藏技术标识。第一语法元素信息表征当前视频序列是否允许序列使用奇偶隐藏技术。
在本申请实施例中,第一语法元素信息可以为第一值,也可以为第二值。若第一语法元素信息的取值为第一值,则确定第一语法元素信息(即序列级奇偶隐藏技术标识)指示待处理的当前视频序列开启奇偶隐藏技术;若第一语法元素信息的取值为第二值,则确定第一语法元素信息指示待处理的当前视频序列未开启奇偶隐藏技术。
在本申请实施例中,第一值和第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第一语法元素信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。
示例性地,以flag为例,flag的设置有两种方式:使能标志位(enable_flag)和非使能标志位(disable_flag)。假定使能标志位的取值为第一值,非使能标志位的取值为第二值;那么对于第一值和第二值而言,第一值可以设置为1,第二值可以设置为0;或者,第一值还可以设置为真(true), 第二值还可以设置为假(false);但是本申请实施例并不作具体限定。
示例性的,第一语法元素信息可以表示为enable_ph。采用enable_ph表示序列级的奇偶隐藏技术标识位。
在本申请的一些实施例中,当第一语法元素信息表征允许使用奇偶隐藏技术时,解码器通过获取变量信息,来判断是否需要继续解析下级语法元素信息(下级奇偶隐藏技术标识,即,第二语法元素标识信息)。
需要说明的是,变量信息可以包括:帧级变量信息和片段级变量信息。变量信息表征是否采用有损编码(即第一预设编码方式)的方式,其中,帧级变量信息表征当前帧中是否采用有损编码的方式,片段级变量信息表征当前片段是否采用有损编码的方式。
在本申请实施例中,变量信息是可以直接通过解码过程中的其他信息获取的,本申请实施例不作限制。
S103、在变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息。
在本申请实施例中,解码器获取了变量信息后,由于变量信息可以判断出当前帧中的片段的编码方式,因此,解码器在变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,解析第二语法元素信息。
在本申请实施例中,第一预设编码方式可以为有损编码方式,第二预设编码方式可以为无损编码方式或者接近无损编码方式。
需要说明的是,解码器可以依赖于当前帧中的片段的是不是存在有损编码方式,来控制是否需要解析第二语法元素信息,以便通过第二语法元素信息判断在解码当前块时是否需要采用奇偶隐藏技术。
在本申请的一些实施例中,第二语法元素信息表征帧级标识或片段级标识。
在本申请实施例中,在使用奇偶隐藏技术的场景中,第二语法元素信息表征当前帧中的片段是否允许序列使用奇偶隐藏技术。第二语法元素信息示例性的可以为帧级奇偶隐藏技术标识或片段级奇偶隐藏技术标识。帧级奇偶隐藏技术标识表征当前帧是否允许序列使用奇偶隐藏技术,片段级奇偶隐藏技术标识表征当前片段是否允许序列使用奇偶隐藏技术。
在本申请实施例中,第二语法元素信息可以为第一值,也可以为第二值。若第二语法元素信息的取值为第一值,则确定第二语法元素信息指示待处理的当前帧或当前片段使用奇偶隐藏技术;若第二语法元素信息的取值为第二值,则确定第二语法元素信息指示待处理的当前帧或当前片段未使用奇偶隐藏技术。
在本申请实施例中,第一值和第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。第二语法元素信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。
示例性地,以flag为例,flag的设置有两种方式:使能标志位(enable_flag)和非使能标志位(disable_flag)。假定使能标志位的取值为第一值,非使能标志位的取值为第二值;那么对于第一值和第二值而言,第一值可以设置为1,第二值可以设置为0;或者,第一值还可以设置为真(true),第二值还可以设置为假(false);但是本申请实施例并不作具体限定。
示例性的,第二语法元素信息为帧级奇偶隐藏技术标识时,可以表示为allow_ph;第二语法元素信息为片段级奇偶隐藏技术标识时,可以表示为allow_ph_seg。
在本申请的一些实施例中,在变量信息指示当前帧中不存在满足第一预设编码方式的片段的情况下,表征当前块未采用奇偶隐藏技术,对当前块进行解码,确定量化系数绝对值。
可以理解的是,解码器确定或解析第二语法元素信息是依赖于待处理的当前帧或当前帧中的当前片段采用的编码方式是不是第一预设编码方式,在满足采用第一预设编码方式的情况下,确定第二语法元素信息。这是因为,若当前帧或当前帧中的当前片段采用的编码方式是第二预设编码方式,那么是不会采用奇偶隐藏技术的,也就不用去确定第二语法元素信息,此时,解码器已经可以明确当前帧或当前帧中的当前片段解码时不用考虑奇偶隐藏技术,也就不用花费时间进行第二语法元素信息的解析了,可以有效的提高解码效率,提升解码性能。
S104、基于第二语法元素信息,确定当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
在本申请的一些实施例中,解码器解析或确定第二语法元素信息时,可以获知当前帧或当前帧中的片段是否采用奇偶隐藏技术,而当前帧或当前帧的片段采用奇偶隐藏技术后,有时还需要继续 进行进一步的判断,进一步确定当前块是否采用了奇偶隐藏技术。因此,解码器在基于第二语法元素信息,确定当前块中存在隐藏量化系数的情况下,就可以对当前块进行继续解码,确定当前块的量化系数绝对值。
需要说明的是,解码器确定当前块中存在隐藏量化系数的情况,即当前块中使用了奇偶隐藏技术的情况。
在本申请的一些实施例中,当前块可以包括多个变换块,可以将每个变换块划分成1个或多个区域。以当前区域为例,在按照预设扫描顺序对当前块的量化系数绝对值进行扫描时,首先确定当前区域中是否存在隐藏标识的隐藏量化系数,如果确定当前区域中存在隐藏量化系数,那么需要隐藏该隐藏量化系数对应的标识信息,即不再对该隐藏量化系数对应的标识信息进行编码/解码,后续直接根据当前区域所包括的非零量化系数绝对值的相关特性来确定该隐藏量化系数对应的标识信息。也就是说,解码器在解码时,是需要通过非零量化系数绝对值的相关特性来解出隐藏量化系数对应的标识信息,进而确定出隐藏量化系数的绝对值。
需要说明的是,在本申请实施例中,当前块可划分为1个或多个区域,每一个区域中包含至少一个量化系数绝对值,而且在每一个区域中可能存在一个隐藏标识的隐藏量化系数,即每一个区域中可能存在一个不需要编码/解码标识信息的隐藏量化系数。
需要说明的是,在本申请实施例中,预设扫描顺序可以是对角线、Zigzag扫描、Diagonal扫描、水平扫描(row scan)、垂直扫描(column scan)、4×4子块扫描或者任何其它扫描顺序,这里不作任何限定。
可以理解地,对于当前块的区域划分,在一些实施例中,可以包括:在预设扫描顺序上,根据预设尺寸值对当前块进行区域划分,确定至少一个区域;其中,当前区域为至少一个区域中当前解码的区域。
在这里,这至少一个区域的大小可以相同,也可以不同。
需要说明的是,在本申请实施例中,预设尺寸值是预先设置的每一个区域的大小。其中,预设尺寸值可以是固定值,也可以是写入码流中的可变值或者固定值。在一种具体的实施例中,预设尺寸值的取值可以设置为16。另外,当预设尺寸值写入码流中时,可以编码在序列头中,图像头中等等,这里均不作任何限定。
这样,在AVM中,假定当前块包括2 M个像素值,划分的多个区域中每一个区域为2 N个像素值。其中,2 M除以2 N为正整数。2 N个像素值为预设扫描顺序上的连续2 N个系数,这些系数可以包括零或者非零的系数(这里指量化系数)。另外,如果当前块划分为多个区域,这多个区域的大小可以相同,即每一个区域包括2 N个像素值;或者这多个区域的大小也可以不同,即当前块也可以划分成多个预设扫描顺序上连续、但区域中像素个数不等的区域。
还可以理解地,在进行区域划分之后,对于得到的至少一个区域,每一个区域确定是否存在隐藏标识的隐藏量化系数以及如何确定该隐藏量化系数对应的标识信息的步骤相同,下面仅以当前区域为例进行相关描述。
在本申请的一些实施例中,基于第二语法元素信息,确定当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值,包括:
解码器根据已解码的非零量化系数的数量、当前块的颜色分量和当前块的变换类型中的至少一个,以及第二语法元素信息,确定当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
需要说明的是,解码器确定当前块中存在隐藏量化系数,可以第二语法元素信息和已解码的非零量化系数的数量判断,也可以根据第二语法元素信息和当前块的颜色分量判断,还可以根据第二语法元素信息和当前块的变换类型判断,以及可以根据第二语法元素信息、已解码的非零量化系数的数量和当前块的颜色分量判断,及可以根据第二语法元素信息、已解码的非零量化系数的数量和当前块的变换类型判断,及可以根据第二语法元素信息、当前块的颜色分量和当前块的变换类型判断,及可以根据第二语法元素信息、已解码的非零量化系数的数量、当前块的颜色分量和当前块的变换类型判断,本申请实施例不作限制。
示例性的,在本申请实施例中,解码器在解析出第二语法元素信息指示使用奇偶隐藏技术时,按照预设扫描顺序对当前块的当前区域中的已解码的量化系数绝对值进行扫描,确定当前区域已解码的非零量化系数个数;根据非零量化系数个数,确定当前区域中是否存在隐藏标识的隐藏量化系数。
在本申请实施例中,若非零量化系数个数大于数量阈值,则确定当前区域中存在隐藏量化系数; 若非零量化系数个数小于或等于数量阈值,则确定当前区域中不存在隐藏量化系数。
在本申请的一些实施例中,根据第二语法元素信息、已解码的非零量化系数的数量、当前块的颜色分量和当前块的变换类型判断包括:在已解码的非零量化系数的数量大于或等于数量阈值、当前块的颜色分量为预设分量、当前块的变换类型为预设变换类型,且第二语法元素信息指示允许使用奇偶隐藏技术的情况下,确定当前块中存在隐藏量化系数;在当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
需要说明的是,第二语法元素信息指示允许使用奇偶隐藏技术的情况下,结合以下至少一个:已解码的非零量化系数的数量大于或等于数量阈值、当前块的颜色分量为预设分量、当前块的变换类型为预设变换类型来确定当前块中存在隐藏量化系数;否则,确定当前块中不存在隐藏量化系数。
在本申请实施例中,不同的颜色分量可以设定是否采用奇偶隐藏技术,本申请实施例不作限制。
需要说明的是,颜色分量可以包括下述至少一项:第一颜色分量、第二颜色分量和第三颜色分量。其中,第一颜色分量可以为亮度颜色分量,第二颜色分量和第三颜色分量可以为色度颜色分量(例如,第二颜色分量为蓝色色度颜色分量,第三颜色分量为红色色度颜色分量;或者,第二颜色分量为红色色度颜色分量,第三颜色分量为蓝色色度颜色分量)。
示例性的,在本申请的一些实施例中,预设分量可以为第一颜色分量。数量阈值可以为4,本申请实施例不作限制,但需要非零。例如,非零量化系数的数量大于3,或者非零量化系数的数量大于或等于4。
在本申请的一些实施例中,在AVM编码量化系数时,会根据选中的变换模式不同而选择不同的系数编码顺序(扫描顺序),例如,变换可以包含了以下16种,本申请实施例不作限制。以这16种为例,16种变换与扫描顺序的对应关系如下表2所示。
表2
  Transform Type Vertical Mode Horizontal Mode
DCT_DCT 2D DCT DCT
ADST_DCT 2D ADST DCT
DCT_ADST 2D DCT ADST
ADST_ADST 2D ADST ADST
FLIPADST_DCT 2D Flipped ADST DCT
DCT_FLIPADST 2D DCT Flipped ADST
FLIPADST_FLIPADST 2D Flipped ADST Flipped ADST
ADST_FLIPADST 2D ADST Flipped ADST
FLIPADST_ADST 2D Flipped ADST ADST
IDTX 2D Identity Identity
V_DCT 1D DCT Identity
H_DCT 1D Identity DCT
V_ADST 1D ADST Identity
H_ADST 1D Identity ADST
V_FLIPADST 1D Flipped ADST Identity
H_FLIPADST 1D Identity Flipped ADST
其中,1D Tansform Type的扫描方式会根据水平和垂直的方向的不同分为行扫描和列扫描。2D Transform Type也可以分为Zig-Zag scan和Diagonal scan,Zig-Zag scan扫描方式顺序如图4A所示,Diagonal scan扫描方式顺序如图4B所示,column scan扫描方式顺序如图4C所示,row scan扫描方式顺序如图4D所示。如果是正向顺序则是从位置0按顺序扫描至15,如果是反向顺序则是从位置15扫描至位置0。
需要说明的是,每个变换块分割成多个区域,每个区域可以隐藏一个量化系数的奇偶性,对于隐藏奇偶性的隐藏量化系数与没有隐藏奇偶性的量化系数可以用不同组的上下文模型进行量化系数解码。
示例性的,隐藏奇偶性的量化系数绝对值level与解码得到qIdx对应关系如下公式(5)所示:
level=qIdx×2+Parity       (5)
其中,qIdx为BR,∑LR和HR的和,Parity为隐藏的奇偶值。不隐藏奇偶的量化系数绝对值与解码得到的qIdx则相等。
示例性的,预设变换类型可以为表2中的非Identity的类型,本申请实施例不作限制。
示例性的,在已解码的非零量化系数的数量大于或等于数量阈值、当前块的颜色分量为预设分量、当前块的变换类型为预设变换类型,且第二语法元素信息指示允许使用奇偶隐藏技术的情况下,确定当前块中存在隐藏量化系数的逻辑可以表示如下:
Figure PCTCN2022120361-appb-000002
其中,已解码的非零量化系数的数量表示为num_nz,PHTHRESH为数量阈值,condition可以表示为第二语法元素信息指示允许使用奇偶隐藏技术,当前块的颜色分量表示为plane_type,亮度颜色分量表示为PLANE_TYPE_Y,当前块的变换类型表示为primary_tx_type,预设变换类型表示为<IDTX。
示例性的,在第二语法元素信息指示允许使用奇偶隐藏技术的情况下,变换块可以按照扫描顺序被分为每16个位置一个区域,每个区域的扫描顺序上最后一个位置为可能隐藏奇偶性的位置,当这个区域的其它位置上有超过规定数量阈值的非零量化系数(例如3个)时,该可能隐藏奇偶性的位置上系数的奇偶将被隐藏。
如图5所示的一个反向Zig-Zag扫描的8x8变换块的具体例子,扫描顺序从63到0。该变换块可分为四个区域,分别是扫描索引48-63,32-47,16-31,0-15。其中,索引48,32,16,0四个位置上的系数可能隐藏奇偶。其中索引21为变换块中最后一个非零系数。系数编解码则会跳过索引比21大的位置并默认其为零,按照21,20,….,0的顺序进行上下文模型标识位的编解码和等概率标识位的编解码。若21位置到17位置有超过三个非零系数,则用每个位置上BR+∑LR和的奇偶表示第16位置的奇偶。若15位置到1位置有超过三个非零系数,则用每个位置上BR+∑LR和的奇偶表示第0位置的奇偶。
需要说明的是,由于隐藏与未隐藏奇偶的qIdx(量化系数索引)分布不同(隐藏奇偶qIdx的大小约为未隐藏的一半),所以编码和解码qIdx时使用不同的上下文模型可以提升编码性能。
在本申请的一些实施例中,AOM的上下文模型的初始值根据量化参数QP的不同会分为4种。示例性的,对于编码隐藏了奇偶的qIdx,编码BR和LR部分的标识共用到了额外新增的20x4=80组和28x4=112组上下文模型的初始值,上下文模型的索引与是否为DC位置的系数与当前编解码的qIdx位置周围已编解码的量化系数绝对值(level)值相关。
示例性的,编解码隐藏奇偶的qIdx的BR部分时,参考的周围已编解码的量化系数绝对值的位置(例如5个位置)的值进行编解码。如图6A所示为采用Zig-Zag/Diagonal扫描时需要参考的已编解码level的5个位置。如图6B所示为采用column scan扫描时需要参考的已编解码level的5个位置。如图6C所示为采用row scan扫描时需要参考的已编解码level的5个位置。其中,0所在的位置表征当前块,1所在的位置为参考的周围已编解码的量化系数绝对值的位置。
示例性的,编解码隐藏奇偶的qIdx的LR部分时,参考的周围已编解码的量化系数绝对值的位置(例如3个位置)的值进行编解码。如图7A所示为采用Zig-Zag/Diagonal扫描时需要参考的已编解码level的3个位置。如图7B所示为采用column scan扫描时需要参考的已编解码level的3个位置。如图7C所示为采用row scan扫描时需要参考的已编解码level的3个位置。其中,0所在的位置表征当前块,1所在的位置为参考的周围已编解码的量化系数绝对值的位置。
在本申请的一些实施例中,编解码器在对当前块的当前区域进行编解码时,会参考已编解码的几个位置的值,来确定当前块的不同颜色分量在编解码隐藏量化系数时,采用的上下文模型索引值。针对不同颜色分量的DC系数位置和非DC系数位置,以及BR和LR的不同,上下文模型索引值均不同。
示例性的,如表3所示,不同颜色分量在编解码隐藏量化系数时,采用的上下文模型索引值为Index of context model。
表3
Figure PCTCN2022120361-appb-000003
Figure PCTCN2022120361-appb-000004
其中,Θ为图5中几种扫描方式下当前位置周围的5个位置,Φ为图6中几种扫描方式下当前位置周围的3个位置。
可以理解的是,针对隐藏量化系数和非隐藏量化系数可以采用不同的上下文模型进行编解码,针对不同颜色分量的不同类型系数位置上的隐藏量化系数的不同部分也可以采用不同的上下文模型进行编解码,可以提高编解码的多样性。
在本申请的一些实施例中,解码器解码获得当前块的量化系数绝对值。其中,每一个量化系数绝对值可以由一个或多个多符号的标识信息来表示。具体地,根据量化系数绝对值的大小,可以分段由第一标识信息、第二标识信息、第三标识信息、第四标识信息和第五标识信息等几种多符号的标识信息来表示。
在本申请的一些实施例中,解码器确定当前区域的一个当前块的量化系数绝对值的过程可以包括:
解析码流,获得第一标识信息;
根据第一标识信息,确定当前块的量化系数绝对值满足下述其中之一:0、1、2或者大于或等于3;
若当前块的量化系数绝对值大于或等于3,则继续解析码流,获得第二标识信息;
根据第二标识信息,确定当前块的量化系数绝对值满足下述其中之一:3、4、5或者大于或等于6;
若当前块的量化系数绝对值大于或等于6,则继续解析码流,获得第三标识信息;
根据第三标识信息,确定当前块的量化系数绝对值满足下述其中之一:6、7、8或者大于或等于9;
基于第二语法元素信息,确定当前块中存在隐藏量化系数的情况下,
若当前块的量化系数绝对值大于或等于9,则继续解析码流,获得第四标识信息;
根据第四标识信息,确定当前块的量化系数绝对值满足下述其中之一:9、10、11或者大于或等于12;
若当前块的量化系数绝对值大于或等于12,则继续解析码流,获得第五标识信息;
根据第五标识信息,确定当前块的量化系数绝对值满足下述其中之一:12、13、14或者大于或等于15;
若当前块的量化系数绝对值大于或等于15,则继续解析码流,确定当前块的量化系数绝对值。
需要说明的是,在本申请实施例中,可以设置有五个标识信息,即第一标识信息(可以用标识1表示)、第二标识信息(可以用标识2表示)、第三标识信息(可以用标识3表示)、第四标识信息(可以用标识4表示)和第五标识信息(可以用标识5表示),而且每一个标识信息可以包括多个符号,具体为四个符号(0,1,2,3)。
其中,第一标识信息可以用于解码当前块的量化系数绝对值为0~3的部分,第二标识信息可以用于解码当前块的量化系数绝对值为3~6的部分,第三标识信息可以用于解码当前块的量化系数绝对值为6~9的当前块的量化系数绝对值部分,第四标识信息可以用于解码当前块的量化系数绝对值为9~12的部分,第五标识信息可以用于解码当前块的量化系数绝对值为12~15的部分。
在一种具体的实施例中,第一标识信息表示量化系数绝对值为0~3的部分,共4个符号(0,1,2,3),当第一标识信息的符号为3时,则需要进一步解码第二标识信息;第二标识信息表示量化系数绝对值为3~6的部分,共4个符号(0,1,2,3),当第二标识信息的符号为3时,则需要进一步解码第三标识信息;第三标识信息表示量化系数绝对值为6~9的部分,共4个符号(0,1,2,3),当第三标识信息的符号为3时,则需要进一步解码第四标识信息;第四标识信息表示量化系数绝对值为9~12的部分,共4个符号(0,1,2,3),当第四标识信息的符号为3时,则需要进一步解码第五标识信息;第五标识信息表示量化系数绝对值为12~15的部分,共4个符号(0,1,2,3),当第五标识信息的符号为3时,则需要进一步解码量化系数绝对值为大于或等于15的部分。
示例性地,对于第一标识信息,如果第一标识信息的符号为0,那么意味着当前块的量化系数绝对值为0;如果第一标识信息的符号为1,那么意味着当前块的量化系数绝对值为1;如果第一标识信息的符号为2,那么意味着当前块的量化系数绝对值为2;如果第一标识信息的符号为3,那么意味着当前块的量化系数绝对值为大于或等于3,这时候需要解码获得第二标识信息;对于第二标识信息,如果第二标识信息的符号为0,那么意味着当前块的量化系数绝对值为3;如果第二标识信息的符号为1,那么意味着当前块的量化系数绝对值为4;如果第二标识信息的符号为2,那么意味着当前块的量化系数绝对值为5;如果第二标识信息的符号为3,那么意味着当前块的量化系数绝对值为大于或等于6,这时候需要解码获得第三标识信息;以此类推,直至解码获得第五标识信息;对于第五标识信息,如果第五标识信息的符号为0,那么意味着当前块的量化系数绝对值为12;如果第五标识信息的符号为1,那么意味着当前块的量化系数绝对值为13;如果第五标识信息的符号为2,那么意味着当前块的量化系数绝对值为14;如果第五标识信息的符号为3,那么意味着当前块的量化系数绝对值为大于或等于15;当确定当前块的量化系数绝对值为大于或等于15时,继续解析码流,进一步确定出当前块的量化系数绝对值。
还需要说明的是,对于解码当前块的量化系数绝对值,在一些实施例中,该方法还可以包括:
在当前块的量化系数绝对值小于15时,使用上下文模型解析码流,确定当前块的量化系数绝对值;
在当前块的量化系数绝对值大于或等于15时,使用旁路模型解析码流,确定当前块的量化系数绝对值。
也就是说,大于或等于15的部分,可以使用旁路模型进行解码(例如指数哥伦布解码);而小于15的部分,第一标识信息、第二标识信息、第三标识信息、第四标识信息和第五标识信息(即标识1~5)可以使用上下文模型进行解码,其中,第一标识信息(即标识1)有一套单独的上下文模型,而剩余四个标识信息(即标识2~5)公用一套上下文模型。
还需要说明的是,在本申请实施例中,对于解码当前块的量化系数绝对值,可以包括两个循环过程。在一些实施例中,该方法还可以包括:
在当前块的量化系数绝对值小于15时,按照第一循环顺序解析码流,确定当前块的量化系数绝对值;
需要说明的是,按照第一循环顺序解析码流的过程中,在编解码器在进行当前块的编解码时,针对一个变换块的当前区域,在第二语法元素信息指示允许使用奇偶隐藏技术的情况下,可以先统计已编码或已解码的非零量化系数的个数(或其他条件等),在满足非零量化系数的个数大于数量阈值时,确定当前区域中的预设位置使用奇偶隐藏技术,这样就可以针对使用奇偶隐藏技术和其他未编解码且未使用奇偶隐藏技术,采用不同的上下文模型继续进行编解码。
在当前块的量化系数绝对值大于或等于15时,按照第二循环顺序解析码流,确定当前块的量化系数绝对值。
也就是说,对于当前块的量化系数绝对值,可以根据第一循环顺序解码确定量化系数绝对值中小于15的部分,再根据第二循环顺序解码确定量化系数绝对值中大于或等于15的部分。
在一些实施例中,第一循环顺序和第二循环顺序均为从当前块的最后一个非零量化系数向当前块的左上位置的顺序;或者,
第一循环顺序为从当前块的最后一个非零量化系数向当前块的左上位置的顺序,第二循环顺序为从当前块的左上位置向当前块的最后一个非零量化系数的顺序。
在一种可能的实现方式中,首先按照从当前块的最后一个非零量化系数至左上位置(即左上角)的循环顺序,解码标识1~5;接着按照从当前块的左上角至最后一个非零量化系数的循环顺序,解码量化系数绝对值大于或等于15的部分,以确定出当前块的量化系数绝对值。
在另一种可能的实现方式中,首先按照从当前块的最后一个非零量化系数至左上角的循环顺序,解码标识1~5;接着仍然按照从当前块的最后一个非零量化系数至左上角的循环顺序,解码量化系数绝对值大于或等于15的部分,以确定出当前块的量化系数绝对值。
可以理解的是,在解码端,通过第一语法元素信息判断出序列级允许使用奇偶隐藏技术的情况下,才依据变量信息和第一预设编码方式(有损编码)来判断是否确定第二语法元素信息,其中,第二语法元素信息表征基于帧级或片段级的允许使用奇偶隐藏技术。这样解码器在使用奇偶隐藏技术时考虑到了在采用第一预设编码方式的情况下,通过确定第二语法元素信息的方式,来使用奇偶隐藏技术对当前块的量化系数绝对值进行解码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法(即第二语法元素信息),来控制使用奇偶隐藏技术的解码过程。因此,在解码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于解码的过程中,减少了解码的码率,还提高了解码效率和性能。
下面通过其他实施例进行详细的说明。
在本申请的一些实施例中,一个变换块(例如当前块,即一个块有一个区域,有一个位置可以隐藏奇偶时)可以不再隐藏多个系数的奇偶性,而是隐藏变换块中的一个系数的奇偶性,通常这个系数是在变换块左上角的系数,例如DC系数,本申请实施例不作限制。这个系数的奇偶性将基于当前颜色分量下的变换块中其他系数的绝对值之和或部分绝对值之和的奇偶性而决定,而是否含有隐藏奇偶的系数取决于当前变换块中是否含有超过一定个数的非零系数(例如3个)。
在本申请实施例中,对于基于区域或基于整个变换块的奇偶性隐藏技术,是否含有被隐藏奇偶的系数不仅需要满足定义的范围内有超过一定个数的非零系数外,还可以设定额外的需要满足的限定条件(非必须),这些条件可以是序列(sequence)级的,帧(frame)级的,片(slice)级,块级的标识位,也可以是当前块的变换类型,大小或是颜色分量。
针对帧(frame)级,变量信息包括:帧级变量信息;第二语法元素信息包括:帧级语法元素信息;帧级语法元素信息表征帧级是否允许使用奇偶隐藏技术。
本申请实施例提供了另一个解码方法,包括:
S201、解析码流,确定第一语法元素信息。
需要说明的是,S201的过程描述与S101的过程描述相同,此处不再赘述。
示例性的,第一语法元素信息表示为enable_ph;解码获取序列级奇偶隐藏技术标识的逻辑如下:
sequence_header_obu(){
enable_ph
其中,sequence_header_obu为解析一系列序列头信息的集合,enable_ph为序列级奇偶隐藏技术标识,为1则代表当前视频序列可以使用奇偶隐藏技术,为0则表示当前视频序列不使用就隐藏技术。f(1)则表示使用一个等概率的二元标识。
S202、在第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取帧级变量信息。
需要说明的是,S202的过程描述与S102的过程描述相同,此处不再赘述。
不同的是,解码器获取的是帧级变量信息。
示例性的,帧级变量信息可以表示为CodedLossless。
其中,CodedLossless可以为第一值,也可以为第二值。若CodedLossless的取值为第一值,则确定当前帧中所有片段均采用第二预设编码方式,即无损编码;若CodedLossless的取值为第二值,则确定当前帧中存在至少一个片段采用了第一预设编码方式,即有损编码。
在本申请实施例中,第一值和第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。CodedLossless可以是写入在概述(profile)中的参数,这里对此不作具体限定。
示例性地,第一值可以设置为1,第二值可以设置为0,本申请实施例不作限制。
S203、在帧级变量信息指示当前帧中存在采用第一预设编码方式的至少一个片段的情况下,确定帧级语法元素信息。
在本申请实施例中,解码器获取了帧级变量信息后,由于帧级变量信息可以判断出当前帧中的片段的编码方式,因此,解码器在帧级变量信息指示当前帧中存在满足第一预设编码方式的至少一个片段的情况下,解析帧级语法元素信息。
示例性的,解码器在enable_ph(第一语法元素信息,即序列级奇偶隐藏技术标识)为1(即允许),帧级变量信息CodedLossless为0(即有至少一个片段采用了有损编码)的情况下,确定帧级语法元素信息allow_ph,即帧级奇偶隐藏技术标识,代码逻辑标识如下:
if(!CodedLossless&&enable_ph)
allow_ph
在本申请实施例中,CodedLossless为1表示当前帧所有片段的所有块都采用无损编码,CodedLossless为0表示当前帧至少有一个片段采用有损编码,因此,帧级奇偶隐藏技术标识allow_ph在当前帧不是无损压缩,即CodedLossless不为1,为0,且序列级奇偶隐藏技术标识是1时解析。
在本申请的一些实施例中,帧级奇偶隐藏技术标位allow_ph为1表示当前帧可以使用奇偶隐藏技术,为0表示不可以使用奇偶隐藏技术。当不存在allow_ph的解析时,allow_ph的值设置为0。
需要说明的是,S203的其他实现描述原理,与S103的描述原理一致,第二语法元素信息即为帧级语法元素信息,此处不再赘述。
S204、在帧级语法元素信息指示当前帧允许使用奇偶隐藏技术,且当前块所在的当前片段采用第一预设编码方式的情况下,确定当前块中是否存在隐藏量化系数。
在本申请实施例中,由于在不同的片段下,可能会出现enable_ph,allow_ph都是1,但当前片段为无损编码的情况。因此,针对这种情况,在每一个块是否使用奇偶隐藏技术时,需要考虑到allow_ph为1,且需要不是无损编码时,在无其他条件的情况下,才能确定在当前块上使用奇偶隐藏技术。即,解码器需要在帧级语法元素信息指示当前帧允许使用奇偶隐藏技术(allow_ph为1),且当前块所在的当前片段采用第一预设编码方式(有损编码)的情况下,结合其他限制条件,确定当前块中是否存在隐藏量化系数。
在本申请实施例中,解码器需要在帧级语法元素信息指示当前帧允许使用奇偶隐藏技术(allow_ph为1),且当前块所在的当前片段采用第一预设编码方式(有损编码)的情况下,若无结合其他限制条件,则确定当前块中存在隐藏量化系数。
解码器需要在帧级语法元素信息指示当前帧允许使用奇偶隐藏技术(allow_ph为1),且当前块所在的当前片段采用第一预设编码方式(有损编码)的情况下,若满足其他限制条件(当前颜色分量,当前变换类型,或者变换块大小等),则确定当前块中存在隐藏量化系数。
在本申请的一些实施例中,若在帧级语法元素信息指示当前帧允许使用奇偶隐藏技术(allow_ph为1),且当前块所在的当前片段采用第二预设编码方式(无损编码)的情况下,或者在帧级语法元素信息指示当前帧不允许使用奇偶隐藏技术(allow_ph为0)的情况下,确定当前块中不存在隐藏量化系数,即未采用奇偶隐藏技术。
S205、在当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
需要说明的是,S204-S205的其他关于量化系数绝对值的解码过程与S104中的实现原理一致,此处不再赘述。
示例性的,通过序列级标识有条件的解码获取帧级奇偶隐藏技术标识,如表4所示:
表4
Figure PCTCN2022120361-appb-000005
Figure PCTCN2022120361-appb-000006
可以理解是,解码器可以通过序列级奇偶隐藏技术标识判断出序列级允许使用奇偶隐藏技术的情况下,依据帧级变量信息和有损编码方式来判断是否确定帧级奇偶隐藏技术标识。这样解码器在使用奇偶隐藏技术时考虑到了在采用有损编码方式的情况下,确定帧级奇偶隐藏技术标识,再结合帧级变量信息指示的当前片段的编码方式是有损时,来使用奇偶隐藏技术对当前块的量化系数绝对值进行解码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法,来控制使用奇偶隐藏技术的解码过程。因此,在解码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于解码的过程中,减少了解码的码率,还提高了解码效率和性能。
针对帧(frame)级,变量信息包括:片段级变量信息;第二语法元素信息包括:帧级语法元素信息;帧级语法元素信息表征帧级是否允许使用奇偶隐藏技术。
本申请实施例提供了又一种解码方法,包括:
S301、解析码流,确定第一语法元素信息。
需要说明的是,S301的过程描述与S201的过程描述相同,此处不再赘述。
S302、在第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取片段级变量信息。
需要说明的是,S302的过程描述与S102的过程描述相同,此处不再赘述。
不同的是,解码器获取的是片段级变量信息。
示例性的,片段级变量信息可以表示为SegLossless。SegLossless变量信息表示当前帧是否有片段使用了无损编码。
在本申请的一些实施例中,代码逻辑如下:
if(LosslessArray[segmentId])
SegLossless=1
其中,SegLossless可以为第一值,也可以为第二值。若SegLossless的取值为第一值,则确定当前帧中存在至少一个片段采用第二预设编码方式,即无损编码;若SegLossless的取值为第二值,则确定当前帧中片段均采用了第一预设编码方式,即有损编码。
在本申请实施例中,第一值和第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。SegLossless可以是写入在概述(profile)中的参数,这里对此不作具体限定。
示例性地,第一值可以设置为1,第二值可以设置为0,本申请实施例不作限制。
S303、在片段级变量信息指示当前帧中的片段均采用第一预设编码方式的情况下,确定帧级语法元素信息。
在本申请实施例中,解码器获取了片段级变量信息后,由于片段级变量信息可以判断出当前帧的片段的编码方式,因此,解码器在片段级变量信息指示当前帧中的片段均采用第一预设编码方式的情况下,解析帧级语法元素信息。
示例性的,解码器在enable_ph(第一语法元素信息,即序列级奇偶隐藏技术标识)为1(即允许),片段级变量信息SegLossless为0(即当前帧的所有片段均采用了有损编码)的情况下,确定帧级语法元素信息allow_ph,即帧级奇偶隐藏技术标识,代码逻辑标识如下:
if(!SegLossless&&enable_ph)
allow_ph
在本申请实施例中,SegLossless变量信息表示当前帧是否有片段使用了无损编码,当当前视频序列可以使用奇偶隐藏技术且当前帧没有片段使用了无损编码时,解析帧级奇偶隐藏技术标识allow_ph。
在本申请实施例中,SegLossless为0表示当前帧所有片段的所有块都采用有损编码,SegLossless为1表示当前帧存在至少一个片段采用无损编码,因此,帧级奇偶隐藏技术标识allow_ph在当前帧的片段均为有损压缩,即SegLossless为0,且序列级奇偶隐藏技术标识是1时解析。
需要说明的是,S303的其他实现描述原理,与S103的描述原理一致,第二语法元素信息即为帧级语法元素信息,此处不再赘述。
S304、在帧级语法元素信息指示当前帧允许使用奇偶隐藏技术的情况下,确定当前块中是否存在隐藏量化系数。
在本申请实施例中,解码器在帧级语法元素信息指示当前帧允许使用奇偶隐藏技术的情况下,即已经确定所有片段均采用了有损编码,可以都进行奇偶隐藏技术,避免了在不同的片段下,可能会出现enable_ph,allow_ph都是1,但当前片段为无损编码的情况。因此,解码器可以直接在帧级语法元素信息指示当前帧允许使用奇偶隐藏技术的情况下,结合其他限制条件,确定当前块中是否存在隐藏量化系数。即,确定每个块是否能使用奇偶隐藏技术时,不在需要确认当前片段是否无损,若无结合其他限制条件,而是直接根据allow_ph的值确定是否可以使用奇偶隐藏技术。
在本申请实施例中,解码器需要在帧级语法元素信息指示当前帧允许使用奇偶隐藏技术(allow_ph为1)的情况下,若无结合其他限制条件,则直接确定当前块中存在隐藏量化系数。
解码器需要在帧级语法元素信息指示当前帧允许使用奇偶隐藏技术(allow_ph为1)的情况下,若满足其他限制条件(当前颜色分量,当前变换类型,或者变换块大小等),则确定当前块中存在隐藏量化系数。
在本申请的一些实施例中,若在帧级语法元素信息指示当前帧不允许使用奇偶隐藏技术(allow_ph为0)的情况下,确定当前块中不存在隐藏量化系数,即未采用奇偶隐藏技术。
S305、在当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
需要说明的是,S304-S305的其他关于量化系数绝对值的解码过程与S104中的实现原理一致,此处不再赘述。
示例性的,通过序列级标识有条件的解码获取帧级奇偶隐藏技术标识,如表5所示:
表5
Figure PCTCN2022120361-appb-000007
Figure PCTCN2022120361-appb-000008
可以理解的是,解码器可以通过序列级奇偶隐藏技术标识判断出序列级允许使用奇偶隐藏技术的情况下,依据帧级变量信息和有损编码方式来判断是否确定帧级奇偶隐藏技术标识。这样解码器在使用奇偶隐藏技术时考虑到了在片段均采用有损编码方式的情况下,确定帧级奇偶隐藏技术标识,来使用奇偶隐藏技术对当前块的量化系数绝对值进行解码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法,来控制使用奇偶隐藏技术的解码过程。因此,在解码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于解码的过程中,减少了解码的码率,还提高了解码效率和性能。
针对片段(slice)级,变量信息包括:片段级变量信息;第二语法元素信息包括:片段级语法元素信息;片段级语法元素信息表征片段级是否允许使用奇偶隐藏技术。
本申请实施例提供了再一种解码方法,包括:
S401、解析码流,确定第一语法元素信息。
需要说明的是,S401的过程描述与S201的过程描述相同,此处不再赘述。
S402、在第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取片段级变量信息。
需要说明的是,S402的过程描述与S102的过程描述相同,此处不再赘述。
不同的是,变量信息不同。这里的片段级变量信息为每个片段对应一个自己的,这与S402中的片段级变量信息表征整体片段的含义也不一样。
在本申请实施例中,片段级变量信息表征一个片段采用的编码方式。
示例性的,片段级变量信息可以表示为LosslessArray[segmentId]。
其中,LosslessArray[segmentId]可以为第一值,也可以为第二值。若LosslessArray[segmentId]的取值为第一值,则确定当前片段采用第二预设编码方式,即无损编码;若LosslessArray[segmentId]的取值为第二值,则确定当前片段采用了第一预设编码方式,即有损编码。
S403、遍历当前帧的片段,在片段级变量信息指示当前帧中的当前片段采用第一预设编码方式的情况下,确定当前片段的片段级语法元素信息。
在本申请实施例中,解码器可以获取当前帧的各个片段对应的片段级变量信息,解码器遍历当前帧的片段,针对每个片段,采用片段级变量信息判断出当前片段的编码方式,以便确定是否解析该片段对应的片段级语法元素信息。
需要说明的是,每个片段对应的片段级变量信息指示当前片段采用第一预设编码方式时,解析当前片段的片段级语法元素信息,通过片段级语法元素信息进一步进行当前块是否采用奇偶隐藏技术的判断;每个片段对应的片段级变量信息指示当前片段采用第二预设编码方式时,表示给片段未采用奇偶隐藏技术,即当前片段中的块也未采用奇偶隐藏技术,即allow_ph_seg的值为0。
在本申请的一些实施例中,解码器遍历当前帧的片段时,针对每个片段对应的片段级变量信息指示当前片段采用第一预设编码方式的情况下,解析当前片段的片段级语法元素信息。
示例性的,片段级语法元素信息可以为片段级奇偶隐藏技术标识,表示为allow_ph_seg。
在本申请实施例中,allow_ph_seg表示当前片段是否使用奇偶隐藏技术,allow_ph_seg为1表示当前片段可以使用奇偶隐藏技术,allow_ph_seg为0表示不可以使用奇偶隐藏技术。
需要说明的是,allow_ph_seg的取值可以通过PhArray[]获取,PhArray[]为存放每个片段值的变量。PhArray[]为1表示当前片段可以使用奇偶隐藏技术,PhArray[]为0表示当前片段不可以使用奇偶隐藏技术。
在本申请的一些实施例中,对于变换块是否可以使用奇偶隐藏技术,依赖于PhArray[]的取值。(每个块除了基于allow_ph_seg条件外,还可以有变换类型,变换块大小,当前块的颜色分量等别的限制条件。)
示例性的,代码逻辑如下:
Figure PCTCN2022120361-appb-000009
Figure PCTCN2022120361-appb-000010
S404、在片段级语法元素信息指示当前片段允许使用奇偶隐藏技术的情况下,确定当前块中是否存在隐藏量化系数。
在本申请实施例中,解码器在片段级语法元素信息指示当前片段允许使用奇偶隐藏技术的情况下,即已经确定当前片段均采用了有损编码,可以进行奇偶隐藏技术。因此,解码器可以直接在片段级语法元素信息指示当前片段允许使用奇偶隐藏技术的情况下,结合其他限制条件,确定当前块中是否存在隐藏量化系数。即,确定每个块是否能使用奇偶隐藏技术时,不在需要确认当前片段是否无损,若无结合其他限制条件,而是直接根据allow_ph_seg的值确定当前块是否可以使用奇偶隐藏技术。
在本申请实施例中,解码器需要在片段级语法元素信息指示当前片段允许使用奇偶隐藏技术(allow_ph_seg为1)的情况下,若无结合其他限制条件,则直接确定当前块中存在隐藏量化系数。
解码器需要在片段级语法元素信息指示当前片段允许使用奇偶隐藏技术(allow_ph_seg为1)的情况下,若满足其他限制条件(当前颜色分量,当前变换类型,或者变换块大小等),则确定当前块中存在隐藏量化系数。
在本申请的一些实施例中,若在片段级语法元素信息指示当前片段不允许使用奇偶隐藏技术(allow_ph_seg为0)的情况下,或者PhArray[]为0的情况下,确定当前块中不存在隐藏量化系数,即未采用奇偶隐藏技术。
S405、在当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
需要说明的是,S404-S405的其他关于量化系数绝对值的解码过程与S104中的实现原理一致,此处不再赘述。
示例性的,通过在帧级标识信息集合时,额外解析每个片段是否可以使用奇偶隐藏技术,解码获取片段级奇偶隐藏技术标识,如表6所示:
表6
Figure PCTCN2022120361-appb-000011
Figure PCTCN2022120361-appb-000012
可以理解的是,解码器可以通过序列级奇偶隐藏技术标识判断出序列级允许使用奇偶隐藏技术的情况下,依据片段级变量信息和有损编码方式来判断是否确定片段级奇偶隐藏技术标识。这样解码器在使用奇偶隐藏技术时考虑到了当前片段在采用有损编码方式的情况下,确定片段级奇偶隐藏技术标识,来使用奇偶隐藏技术对当前块的量化系数绝对值进行解码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法,来控制使用奇偶隐藏技术的解码过程。因此,在解码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于解码的过程中,减少了解码的码率,还提高了解码效率和性能。
其中,帧级奇偶隐藏技术标识相比片段级奇偶隐藏技术标识可以减少解码的传输码流。
在上述实施例的实现基础上,在本申请的一些实施例中,针对块级,解码器可以基于第二语法元素信息,确定当前块的第三语法元素;第三语法元素表征块级是否允许使用奇偶隐藏技术;在第三语法元素信息指示当前块允许使用奇偶隐藏技术的情况下,确定当前块中存在隐藏量化系数;当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
需要说明的是,第三语法元素可以为块级奇偶隐藏技术标识。
在本申请的一些实施例中,解码器在进行确定解析出第二语法元素信息后,不论第二语法元素信息是帧级还是片段级,均可以在第二语法元素信息指示允许当前帧中的片段使用奇偶隐藏技术的情况下,进一步解析当前块的第三语法元素,在第三语法元素信息指示当前块允许使用奇偶隐藏技 术的情况下,确定当前块中一定存在隐藏量化系数。当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
在本申请实施例中,第三语法元素信息可以为第一值,也可以为第二值。若第三语法元素信息的取值为第一值,则确定当前块使用奇偶隐藏技术;若第三语法元素信息的取值为第二值,则确定当前块不使用奇偶隐藏技术。
可以理解的是,在帧级奇偶隐藏技术标识或片段级奇偶隐藏技术标识的基础上,可以进一步的通过块级奇偶隐藏技术标识来准确的判断当前块是否隐藏量化系数,可以提高判断精度。
下面以一个例子说明整个解码流程。
示例性的,在解码块时,以变换块是否使用奇偶隐藏技术还基于当当前变换块为亮度分量,且变换模式为水平和竖直方向都不为一致变换(Identity Transform),且除左上角系数外,非零系数个数大于等于PHTHRESH(4)个为条件来判断当前块是否隐藏左上角系数奇偶的例子,实际解码系数的过程如下表7所示。
表7
Figure PCTCN2022120361-appb-000013
Figure PCTCN2022120361-appb-000014
Figure PCTCN2022120361-appb-000015
其中,isHidePar为当前块是否有隐藏了奇偶的左上系数的条件,其中的condition可以替换上述实施例中的信息。如下:
替换实施例中S201-205中的allow_ph&&!LosslessArray[segmentId],即当前帧可以使用奇偶隐藏技术且当前片段不是无损编码。
替换实施例中S301-305中的allow_ph,即当前帧可以使用奇偶隐藏技术,
替换实施例中S401-405中的PhArray[segmentId],即当前片段可以使用奇偶隐藏技术。
在本申请的另一实施例中,参见图8,其示出了本申请实施例提供的一种编码方法的流程示意图。如图8所示,该方法可以包括:
S501、确定第一语法元素信息。
S502、在第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息。
本申请实施例是在AVM中在一种利用当前区域所包括的非零量化系数绝对值的奇偶或别的特性来隐藏某个非零量化系数对应的标识信息,可以用于进一步利用提高编解码性能的场景下,设计语法元素来提高奇偶隐藏技术的适用性,通过奇偶隐藏技术的适用,进行对非零量化系数的标识信息进行隐藏,节省了码率,提升编解码性能。
在编码器对待处理的当前视频序列进行编码前,可以先确定是否开启了奇偶隐藏技术,即确定第一语法元素信息,序列级奇偶隐藏技术标识。
其中,第一语法元素信息表征序列级标识,在本申请实施例中,在使用奇偶隐藏技术的场景中,第一语法元素信息示例性的可以为序列级奇偶隐藏技术标识。第一语法元素信息表征当前视频序列是否允许序列使用奇偶隐藏技术。
在本申请实施例中,第一语法元素信息可以为第一值,也可以为第二值。若第一语法元素信息的取值为第一值,则确定第一语法元素信息(即序列级奇偶隐藏技术标识)指示待处理的当前视频序列开启奇偶隐藏技术;若第一语法元素信息的取值为第二值,则确定第一语法元素信息指示待处理的当前视频序列未开启奇偶隐藏技术。
在本申请的一些实施例中,当第一语法元素信息表征允许使用奇偶隐藏技术时,编码器通过获取变量信息,来判断是否需要生成下级语法元素信息(下级奇偶隐藏技术标识,即,第二语法元素标识信息)。
需要说明的是,变量信息可以包括:帧级变量信息和片段级变量信息。变量信息表征是否采用有损编码(即第一预设编码方式)的方式,其中,帧级变量信息表征当前帧中是否采用有损编码的方式,片段级变量信息表征当前片段是否采用有损编码的方式。
在本申请实施例中,变量信息是可以直接通过解码过程中的其他信息获取的,本申请实施例不 作限制。
S503、在变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息。
需要说明的是,S503的实现过程与S103的实现过程一致,此处不再赘述。
不同的是,编码器在变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息的方式是,编码器在变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,生成第二语法元素信息,并不是解析。
其中,第二语法元素信息表征帧级标识或片段级标识。第一预设编码方式为有损编码方式。
可以理解的是,编码器器生成第二语法元素信息是依赖于待处理的当前帧或当前帧中的当前片段采用的编码方式是不是第一预设编码方式,在满足采用第一预设编码方式的情况下,生成第二语法元素信息。这是因为,若当前帧或当前帧中的当前片段采用的编码方式是第二预设编码方式,那么是不会采用奇偶隐藏技术的,也就不用去生成第二语法元素信息,此时,编码器已经可以明确当前帧或当前帧中的当前片段解码时不用考虑奇偶隐藏技术,也就不用花费时间进行生成第二语法元素信息来告知解码器来解析了,可以有效的提高解码效率,减少码率,进而提升编码性能。
S504、基于第二语法元素信息,对当前块的量化系数绝对值进行编码。
在本申请的一些实施例中,编码器获知当前帧或当前帧中的片段是否采用奇偶隐藏技术,生成第二语法元素信息;而当前帧或当前帧的片段采用奇偶隐藏技术后,有时还需要继续进行进一步的判断,进一步确定当前块是否采用了奇偶隐藏技术。因此,解码器在基于第二语法元素信息,确定当前块中存在隐藏量化系数的情况下,对当前块的量化系数绝对值进行编码。
需要说明的是,编码器确定当前块中存在隐藏量化系数的情况,即当前块中编码使用奇偶隐藏技术的情况。
在本申请的一些实施例中,当前块可以包括多个变换块,可以将每个变换块划分成1个或多个区域。以当前区域为例,在按照预设扫描顺序对当前块的量化系数绝对值进行扫描时,首先确定当前区域中是否存在隐藏标识的隐藏量化系数,如果确定当前区域中存在隐藏量化系数,那么需要隐藏该隐藏量化系数对应的标识信息,即不再对该隐藏量化系数对应的标识信息进行编码/解码,后续直接根据当前区域所包括的非零量化系数绝对值的相关特性来确定该隐藏量化系数对应的标识信息。也就是说,编码器在编码时,是需要通过非零量化系数绝对值的相关特性来编码隐藏量化系数对应的标识信息的。
需要说明的是,关于区域划分和扫描方式等的描述与解码器侧的一致,此处不再赘述。
在进行区域划分之后,对于得到的至少一个区域,每一个区域确定是否存在隐藏标识的隐藏量化系数以及如何确定该隐藏量化系数对应的标识信息的步骤相同,下面仅以当前区域为例进行相关描述。
在本申请的一些实施例中,基于第二语法元素信息,对当前块的量化系数绝对值进行编码,包括:编码器根据已编码的非零量化系数的数量、当前块的颜色分量和当前块的变换类型中的至少一个,以及第二语法元素信息,确定当前块中存在隐藏量化系数的情况下,对当前块的量化系数绝对值进行编码。
需要说明的是,编码器确定当前块中存在隐藏量化系数,可以第二语法元素信息和已编码的非零量化系数的数量判断,也可以根据第二语法元素信息和当前块的颜色分量判断,还可以根据第二语法元素信息和当前块的变换类型判断,以及可以根据第二语法元素信息、已编码的非零量化系数的数量和当前块的颜色分量判断,及可以根据第二语法元素信息、已编码的非零量化系数的数量和当前块的变换类型判断,及可以根据第二语法元素信息、当前块的颜色分量和当前块的变换类型判断,及可以根据第二语法元素信息、已编码的非零量化系数的数量、当前块的颜色分量和当前块的变换类型判断,本申请实施例不作限制。
示例性的,在本申请实施例中,编码器生成第二语法元素信息指示使用奇偶隐藏技术时,按照预设扫描顺序对当前块的当前区域中的已编码的量化系数绝对值进行扫描,确定当前区域已编码的非零量化系数个数;根据非零量化系数个数,确定当前区域中是否存在隐藏标识的隐藏量化系数。
在本申请实施例中,若非零量化系数个数大于数量阈值,则确定当前区域中存在隐藏量化系数;若非零量化系数个数小于或等于数量阈值,则确定当前区域中不存在隐藏量化系数。
在本申请的一些实施例中,编码器在已编码的非零量化系数的数量大于或等于数量阈值、当前块的颜色分量为预设分量、当前块的变换类型为预设变换类型,且第二语法元素信息指示允许使用奇偶隐藏技术的情况下,确定当前块中存在隐藏量化系数;在当前块中存在隐藏量化系数的情况下, 对当前块的量化系数绝对值进行编码。
需要说明的是,第二语法元素信息指示允许使用奇偶隐藏技术的情况下,结合以下至少一个:已编码的非零量化系数的数量大于或等于数量阈值、当前块的颜色分量为预设分量、当前块的变换类型为预设变换类型来确定当前块中存在隐藏量化系数;否则,确定当前块中不存在隐藏量化系数。
需要说明的是,关于颜色分量、变换类型等描述,以及隐藏位置、上下文模型的选择过程等的说明与解码器的描述一致,此处不再赘述。
在本申请的一些实施例中,编码器将第一语法元素信息和第二语法元素信息写入码流。
在本申请的一些实施例中,编码器在编码当前块的量化系数绝对值时,每一个量化系数绝对值可以由一个或多个多符号的标识信息来表示。具体地,根据量化系数绝对值的大小,可以分段由第一标识信息、第二标识信息、第三标识信息、第四标识信息和第五标识信息等几种多符号的标识信息来表示。
进一步地,在确定当前块的量化系数绝对值之后,还需要对这些量化系数绝对值进行编码以写入码流中。因此,在一些实施例中,该方法还可以包括:
若当前块的量化系数绝对值满足下述其中之一:0、1、2或者大于或等于3,则确定第一标识信息,并对第一标识信息进行编码,将所得到的编码比特写入码流;
若当前块的量化系数绝对值满足下述其中之一:3、4、5或者大于或等于6,则继续确定第二标识信息,并对第二标识信息进行编码,将所得到的编码比特写入码流;
若当前块的量化系数绝对值满足下述其中之一:6、7、8或者大于或等于9,则继续确定第三标识信息,并对第三标识信息进行编码,将所得到的编码比特写入码流;
若当前块的量化系数绝对值满足下述其中之一:9、10、11或者大于或等于12,则继续确定第四标识信息,并对第四标识信息进行编码,将所得到的编码比特写入码流;
若当前块的量化系数绝对值满足下述其中之一:12、13、14或者大于或等于15,则继续确定第五标识信息,并对第五标识信息进行编码,将所得到的编码比特写入码流;
若当前块的量化系数绝对值大于或等于15,则继续对当前块的量化系数绝对值进行编码,将所得到的编码比特写入码流。
需要说明的是,关于标识信息的描述与解码器的描述一致,此处不再赘述。
需要说明的是,对于编码当前块的量化系数绝对值,在一些实施例中,该方法还可以包括:
在当前块的量化系数绝对值小于15时,按照第一循环顺序,使用上下文模型对第一标识信息、第二标识信息、第三标识信息、第四标识信息和第五标识信息进行编码,将所得到的编码比特写入码流;
在当前块的量化系数绝对值大于或等于15时,按照第二循环顺序,使用旁路模型对当前块的量化系数绝对值进行编码,将所得到的编码比特写入码流。
也就是说,大于或等于15的部分,可以使用旁路模型进行编码(例如指数哥伦布编码);而小于15的部分,第一标识信息、第二标识信息、第三标识信息、第四标识信息和第五标识信息(即标识1~5)可以使用上下文模型进行编码,其中,第一标识信息(即标识1)有一套单独的上下文模型,而剩余四个标识信息(即标识2~5)公用一套上下文模型。
另外,在本申请实施例中,对于编码当前块的量化系数绝对值,可以包括两个循环过程:根据第一循环顺序编码标识1~5,再根据第二循环顺序编码量化系数绝对值中大于或等于15的部分。
可以理解的是,在编码端通过第一语法元素信息判断出序列级允许使用奇偶隐藏技术的情况下,才依据变量信息和第一预设编码方式(有损编码)来判断是否生成第二语法元素信息,其中,第二语法元素信息表征基于帧级或片段级的允许使用奇偶隐藏技术。这样编码器在使用奇偶隐藏技术时考虑到了在采用第一预设编码方式的情况下,通过确定第二语法元素信息的方式,来使用奇偶隐藏技术对当前块的量化系数绝对值进行编码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法(即第二语法元素信息),来控制使用奇偶隐藏技术的编码过程。因此,在编码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于编解码的过程中,减少了编码的码率,还提高了编码效率和性能。
下面通过其他实施例进行详细的说明。
在本申请的一些实施例中,一个变换块(例如当前块,即一个块有一个区域,有一个位置可以隐藏奇偶时)可以不再隐藏多个系数的奇偶性,而是隐藏变换块中的一个系数的奇偶性,通常这个系数是在变换块左上角的系数,例如DC系数,本申请实施例不作限制。这个系数的奇偶性将基于当前颜色分量下的变换块中其他系数的绝对值之和或部分绝对值之和的奇偶性而决定,而是否含有 隐藏奇偶的系数取决于当前变换块中是否含有超过一定个数的非零系数(例如3个)。
在本申请实施例中,对于基于区域或基于整个变换块的奇偶性隐藏技术,是否含有被隐藏奇偶的系数不仅需要满足定义的范围内有超过一定个数的非零系数外,还可以设定额外的需要满足的限定条件(非必须),这些条件可以是序列(sequence)级的,帧(frame)级的,片(slice)级,块级的标识位,也可以是当前块的变换类型,大小或是颜色分量。
针对帧(frame)级,变量信息包括:帧级变量信息;第二语法元素信息包括:帧级语法元素信息;帧级语法元素信息表征帧级是否允许使用奇偶隐藏技术。
本申请实施例提供了另一个编码方法,包括:
S601、确定第一语法元素信息。
S602、在第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取帧级变量信息。
S603、在帧级变量信息指示当前帧中存在采用第一预设编码方式的至少一个片段的情况下,确定帧级语法元素信息。
S604、在帧级语法元素信息指示当前帧允许使用奇偶隐藏技术,且当前块所在的当前片段采用第一预设编码方式的情况下,确定当前块中是否存在隐藏量化系数;
S605、在当前块中存在隐藏量化系数的情况下,对当前块的量化系数绝对值进行编码。
需要说明的是,S601-S605的实现原理,与解码器侧的S201-S205的实现原理一致,此处不再赘述。
不同的是,解码器是对解码确定量化系数绝对值进行,而编码器则是对量化系数绝对值进行编码。以及,编码器确定语法元素的过程均是在编码过程中确定序列级、帧级允许使用奇偶隐藏技术的情况下,生成的序列级标识和帧级标识,然后以第一语法元素信息和第二语法元素信息的形式写入码流中的。
可以理解的是,编码器可以通过序列级奇偶隐藏技术标识判断出序列级允许使用奇偶隐藏技术的情况下,依据帧级变量信息和有损编码方式来判断是否确定帧级奇偶隐藏技术标识。这样编码器在使用奇偶隐藏技术时考虑到了在采用有损编码方式的情况下,确定帧级奇偶隐藏技术标识,再结合帧级变量信息指示的当前片段的编码方式是有损时,来使用奇偶隐藏技术对当前块的量化系数绝对值进行编码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法,来控制使用奇偶隐藏技术的编码过程。因此,在编码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于编码的过程中,减少了编码的码率,还提高了编码效率和性能。
针对帧(frame)级,变量信息包括:片段级变量信息;第二语法元素信息包括:帧级语法元素信息;帧级语法元素信息表征帧级是否允许使用奇偶隐藏技术。
本申请实施例提供了又一种编码方法,包括:
S701、确定第一语法元素信息。
S702、在第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取片段级变量信息。
S703、在片段级变量信息指示当前帧中的片段均采用第一预设编码方式的情况下,确定帧级语法元素信息。
S704、在帧级语法元素信息指示当前帧允许使用奇偶隐藏技术情况下,确定当前块中是否存在隐藏量化系数;
S705、在当前块中存在隐藏量化系数的情况下,对当前块的量化系数绝对值进行编码。
需要说明的是,S701-S705的实现原理,与解码器侧的S301-S305的实现原理一致,此处不再赘述。
不同的是,解码器是对解码确定量化系数绝对值进行,而编码器则是对量化系数绝对值进行编码。以及,编码器确定语法元素的过程均是在编码过程中确定序列级标识、帧级标识允许使用奇偶隐藏技术的情况下,生成的序列级标识和帧级标识,然后以第一语法元素信息和第二语法元素信息的形式写入码流中的。
可以理解的是,编码器可以通过序列级奇偶隐藏技术标识判断出序列级允许使用奇偶隐藏技术的情况下,依据帧级变量信息和有损编码方式来判断是否确定帧级奇偶隐藏技术标识。这样编码器在使用奇偶隐藏技术时考虑到了在片段均采用有损编码方式的情况下,确定帧级奇偶隐藏技术标识,来使用奇偶隐藏技术对当前块的量化系数绝对值进行编码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法,来控制使用奇偶隐藏技术的编码过程。因此,在编码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐 藏技术应用于编码的过程中,减少了编码的码率,还提高了编码效率和性能。
针对片段(slice)级,变量信息包括:片段级变量信息;第二语法元素信息包括:片段级语法元素信息;片段级语法元素信息表征片段级是否允许使用奇偶隐藏技术。
本申请实施例提供了再一种编码方法,包括:
S801、确定第一语法元素信息。
S802、在第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取片段级变量信息。
S803、遍历当前帧的片段,在片段级变量信息指示当前帧中的当前片段采用第一预设编码方式的情况下,确定当前片段的片段级语法元素信息。
S804、在片段级语法元素信息指示当前片段允许使用奇偶隐藏技术的情况下,确定当前块中是否存在隐藏量化系数;
S805、在当前块中存在隐藏量化系数的情况下,对当前块的量化系数绝对值进行编码。
需要说明的是,S801-S805的实现原理,与解码器侧的S401-S405的实现原理一致,此处不再赘述。
不同的是,解码器是对解码确定量化系数绝对值进行,而编码器则是对量化系数绝对值进行编码。以及,编码器确定语法元素的过程均是在编码过程中确定序列级标识、片段级标识允许使用奇偶隐藏技术的情况下,生成的序列级标识和片段级标识,然后以第一语法元素信息和第二语法元素信息的形式写入码流中的。
可以理解的是,编码器可以通过序列级奇偶隐藏技术标识判断出序列级允许使用奇偶隐藏技术的情况下,依据片段级变量信息和有损编码方式来判断是否确定片段级奇偶隐藏技术标识。这样编码器在使用奇偶隐藏技术时考虑到了当前片段在采用有损编码方式的情况下,确定片段级奇偶隐藏技术标识,来使用奇偶隐藏技术对当前块的量化系数绝对值进行编码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法,来控制使用奇偶隐藏技术的编码过程。因此,在编码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于编码的过程中,减少了编码的码率,还提高了编码效率和性能。
其中,帧级奇偶隐藏技术标识相比片段级奇偶隐藏技术标识可以减少编码的传输码流。
在上述实施例的实现基础上,在本申请的一些实施例中,针对块级,编码器可以基于第二语法元素信息,确定当前块的第三语法元素;第三语法元素表征块级是否允许使用奇偶隐藏技术;在第三语法元素信息指示当前块允许使用奇偶隐藏技术的情况下,确定当前块中存在隐藏量化系数;当前块中存在隐藏量化系数的情况下,对当前块的量化系数绝对值进行编码。
需要说明的是,第三语法元素可以为块级奇偶隐藏技术标识。
在本申请的一些实施例中,编码器在进行确定第二语法元素信息后,不论第二语法元素信息是帧级还是片段级,均可以在第二语法元素信息指示允许当前帧中的片段使用奇偶隐藏技术的情况下,进一步确定当前块的第三语法元素,在第三语法元素信息指示当前块允许使用奇偶隐藏技术的情况下,确定当前块中一定存在隐藏量化系数。当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
在本申请实施例中,第三语法元素信息可以为第一值,也可以为第二值。若第三语法元素信息的取值为第一值,则确定当前块使用奇偶隐藏技术;若第三语法元素信息的取值为第二值,则确定当前块不使用奇偶隐藏技术。
在本申请的一些实施例中,还包括:将第三语法元素信息写入码流,以便解码器在解码时使用。
可以理解的是,在帧级奇偶隐藏技术标识或片段级奇偶隐藏技术标识的基础上,可以进一步的通过块级奇偶隐藏技术标识来准确的判断当前块是否隐藏量化系数,可以提高判断精度。
在本申请的再一实施例中,本申请实施例还提供了一种码流,该码流是根据待编码信息进行比特编码生成的,待编码信息包括下述至少之一:
第一语法元素信息、第二语法元素信息、第三语法元素信息、当前块的量化系数绝对值的编码信息以及预设参数值;
其中,所述第一语法元素信息用于指示序列是否使用奇偶隐藏技术,所述第二语法元素信息用于指示帧级或片段级是否使用奇偶隐藏技术;第三语法元素信息用于指示块级是否使用奇偶隐藏技术,所述预设参数值包括下述至少之一:数量阈值、预设分量和预设变换类型。
可以理解的是,在将这些待编码信息进行比特编码生成码流之后,码流由编码端传输到解码端;然后在解码端,通过解析码流即可确定当前块是否使用标识隐藏技术;以及通过解析码流即可确定数量阈值、预设分量和预设变换类型等;以及通过解析码流还可以确定出当前块的量化系数绝对值。
本申请的再一实施例中,基于前述实施例相同的发明构思,参见图9,其示出了本申请实施例提供的一种解码器1的组成结构示意图。如图9所示,该解码器1可以包括:
解码部分10,被配置为解析码流,确定第一语法元素信息;
第一确定部分11,被配置为在所述第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;
所述解码部分10,还被配置为在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;以及,基于所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
在本申请的一些实施例中,所述变量信息包括:帧级变量信息;所述第二语法元素信息包括:帧级语法元素信息;所述帧级语法元素信息表征帧级是否允许使用奇偶隐藏技术;
所述第一确定部分11,还被配置为在所述帧级变量信息指示所述当前帧中存在采用第一预设编码方式的至少一个片段的情况下,确定所述帧级语法元素信息。
在本申请的一些实施例中,所述解码部分10,还被配置为在所述帧级语法元素信息指示所述当前帧允许使用奇偶隐藏技术,且所述当前块所在的当前片段采用所述第一预设编码方式的情况下,确定所述当前块中是否存在隐藏量化系数;在所述当前块中存在隐藏量化系数的情况下,确定所述当前块的所述量化系数绝对值。
在本申请的一些实施例中,所述变量信息包括:片段级变量信息;所述第二语法元素信息包括:帧级语法元素信息;所述帧级语法元素信息表征帧级是否允许使用奇偶隐藏技术;
所述第一确定部分11,还被配置为在所述片段级变量信息指示当前帧中的片段均采用第一预设编码方式的情况下,确定所述帧级语法元素信息。
在本申请的一些实施例中,所述解码部分10,还被配置为在所述帧级语法元素信息指示所述当前帧允许使用奇偶隐藏技术的情况下,确定所述当前块中是否存在隐藏量化系数;在所述当前块中存在隐藏量化系数的情况下,确定所述当前块的所述量化系数绝对值。
在本申请的一些实施例中,所述变量信息包括:片段级变量信息;所述第二语法元素信息包括:片段级语法元素信息;所述片段级语法元素信息表征片段级是否允许使用奇偶隐藏技术;
所述第一确定部分11,还被配置为遍历所述当前帧的片段,在所述片段级变量信息指示所述当前帧中的当前片段采用第一预设编码方式的情况下,确定当前片段的所述片段级语法元素信息。
在本申请的一些实施例中,所述解码部分10,还被配置为在所述片段级语法元素信息指示所述当前片段允许使用奇偶隐藏技术的情况下,确定所述当前块中是否存在隐藏量化系数;在所述当前块中存在隐藏量化系数的情况下,确定所述当前块的所述量化系数绝对值。
在本申请的一些实施例中,所述解码部分10,还被配置为基于所述第二语法元素信息,确定所述当前块的第三语法元素;所述第三语法元素表征块级是否允许使用奇偶隐藏技术;在所述第三语法元素信息指示所述当前块允许使用奇偶隐藏技术的情况下,确定所述当前块中存在隐藏量化系数;所述当前块中存在隐藏量化系数的情况下,确定所述当前块的所述量化系数绝对值。
在本申请的一些实施例中,所述解码部分10,还被配置为根据已解码的非零量化系数的数量、当前块的颜色分量和当前块的变换类型中的至少一个,以及所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
在本申请的一些实施例中,所述解码部分10,还被配置为在所述已解码的非零量化系数的数量大于或等于数量阈值、所述当前块的颜色分量为预设分量、所述当前块的变换类型为预设变换类型,且所述第二语法元素信息指示允许使用奇偶隐藏技术的情况下,确定所述当前块中存在隐藏量化系数;在所述当前块中存在隐藏量化系数的情况下,确定所述当前块的所述量化系数绝对值。
在本申请的一些实施例中,所述第一预设编码方式为有损编码方式。
在本申请的一些实施例中,所述第一语法元素信息表征序列级标识;
所述第二语法元素信息表征帧级标识或片段级标识。
基于上述解码器1的组成以及计算机存储介质,参见图10,其示出了本申请实施例提供的解码器的具体硬件结构示意图。如图10所示,解码器可以包括:第一通信接口1001、第一存储器1002和第一处理器1003;各个组件通过第一总线系统1004耦合在一起。可理解,第一总线系统1004用于实现这些组件之间的连接通信。第一总线系统1004除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图10中将各种总线都标为第一总线系统1004。其中,
第一通信接口1001,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
第一存储器1002,用于存储能够在第一处理器1003上运行的计算机程序;
第一处理器1003,用于在运行所述计算机程序时,执行解码器实现的解码方法。
可以理解,本申请实施例中的第一存储器1002可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器1002旨在包括但不限于这些和任意其它适合类型的存储器。
而第一处理器1003可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器1003中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器1003可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器1002,第一处理器1003读取第一存储器1002中的信息,结合其硬件完成上述方法的步骤。
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。
可以理解的是,在解码端,通过第一语法元素信息判断出序列级允许使用奇偶隐藏技术的情况下,才依据变量信息和第一预设编码方式(有损编码)来判断是否确定第二语法元素信息,其中,第二语法元素信息表征基于帧级或片段级的允许使用奇偶隐藏技术。这样解码器在使用奇偶隐藏技术时考虑到了在采用第一预设编码方式的情况下,通过确定第二语法元素信息的方式,来使用奇偶隐藏技术对当前块的量化系数绝对值进行解码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法(即第二语法元素信息),来控制使用奇偶隐藏技术的解码过程。因此,在解码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于解码的过程中,减少了解码的码率,还提高了解码效率和性能。
本申请的再一实施例中,基于前述实施例相同的发明构思,参见图11,其示出了本申请实施例提供的一种编码器2的组成结构示意图。如图11所示,该编码器2可以包括:
第二确定部分20,被配置为确定第一语法元素信息;在所述第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;以及在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;
编码部分21,被配置为基于所述第二语法元素信息,对当前块的量化系数绝对值进行编码。
在本申请的一些实施例中,所述变量信息包括:帧级变量信息;所述第二语法元素信息包括:帧级语法元素信息;所述帧级语法元素信息表征帧级是否允许使用奇偶隐藏技术;
所述第二确定部分20,还被配置为在所述帧级变量信息指示所述当前帧中存在采用第一预设编码方式的至少一个片段的情况下,确定所述帧级语法元素信息。
在本申请的一些实施例中,所述编码部分21,还被配置为在所述帧级语法元素信息指示所述当 前帧允许使用奇偶隐藏技术,且所述当前块所在的当前片段采用所述第一预设编码方式的情况下,确定所述当前块中是否存在隐藏量化系数;
在所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码。
在本申请的一些实施例中,所述变量信息包括:片段级变量信息;所述第二语法元素信息包括:帧级语法元素信息;所述帧级语法元素信息表征帧级是否允许使用奇偶隐藏技术;
所述第二确定部分20,还被配置为在所述片段级变量信息指示当前帧中的片段均采用第一预设编码方式的情况下,确定所述帧级语法元素信息。
在本申请的一些实施例中,所述编码部分21,还被配置为在所述帧级语法元素信息指示所述当前帧允许使用奇偶隐藏技术情况下,确定所述当前块中是否存在隐藏量化系数;
在所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码。
在本申请的一些实施例中,所述变量信息包括:片段级变量信息;所述第二语法元素信息包括:片段级语法元素信息;所述片段级语法元素信息表征片段级是否允许使用奇偶隐藏技术;
所述第二确定部分20,还被配置为遍历所述当前帧的片段,在所述片段级变量信息指示所述当前帧中的当前片段采用第一预设编码方式的情况下,确定当前片段的所述片段级语法元素信息。
在本申请的一些实施例中,所述编码部分21,还被配置为在所述片段级语法元素信息指示所述当前片段允许使用奇偶隐藏技术的情况下,确定所述当前块中是否存在隐藏量化系数;
在所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码。
在本申请的一些实施例中,所述编码部分21,还被配置为基于所述第二语法元素信息,确定所述当前块的第三语法元素;所述第三语法元素表征块级是否允许使用奇偶隐藏技术;
在所述第三语法元素信息指示所述当前块允许使用奇偶隐藏技术的情况下,确定所述当前块中存在隐藏量化系数;
在所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码。
在本申请的一些实施例中,所述编码部分21,还被配置为根据已编码的非零量化系数的数量、当前块的颜色分量和当前块的变换类型中的至少一个,以及所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码。
在本申请的一些实施例中,所述编码部分21,还被配置为在所述已编码的非零量化系数的数量大于或等于数量阈值、所述当前块的颜色分量为预设分量、所述当前块的变换类型为预设变换类型,且所述第二语法元素信息指示允许使用奇偶隐藏技术的情况下,确定所述当前块中存在隐藏量化系数;
在所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码。
在本申请的一些实施例中,所述编码器2还包括:写入部分22;
所述写入部分,被配置为将所述第一语法元素信息和所述第二语法元素信息写入码流。
在本申请的一些实施例中,所述编码器2还包括:写入部分22;
所述写入部分,被配置为将所述第三语法元素信息写入码流。
在本申请的一些实施例中,所述第一预设编码方式为有损编码方式。
在本申请的一些实施例中,所述第一语法元素信息表征序列级标识;
所述第二语法元素信息表征帧级标识或片段级标识。
基于上述编码器2的组成以及计算机存储介质,参见图12,其示出了本申请实施例提供的解码器的具体硬件结构示意图。如图12所示,编码器可以包括:第二通信接口1201、第二存储器1202和第二处理器1203;各个组件通过第二总线系统1204耦合在一起。可理解,第二总线系统1204用于实现这些组件之间的连接通信。第二总线系统1204除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图12中将各种总线都标为第二总线系统1204。其中,
第二通信接口1201,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
第二存储器1202,用于存储能够在第二处理器1203上运行的计算机程序;
第二处理器1203,用于在运行所述计算机程序时,执行编码器实现的编码方法。
可以理解的是,在编码端通过第一语法元素信息判断出序列级允许使用奇偶隐藏技术的情况下,才依据变量信息和第一预设编码方式(有损编码)来判断是否生成第二语法元素信息,其中,第二语法元素信息表征基于帧级或片段级的允许使用奇偶隐藏技术。这样编码器在使用奇偶隐藏技术时考虑到了在采用第一预设编码方式的情况下,通过确定第二语法元素信息的方式,来使用奇偶隐藏技术对当前块的量化系数绝对值进行编码,有效的通过依赖是否采用了有损编码(即也可以理解为 是否采用无损编码)的高层语法(即第二语法元素信息),来控制使用奇偶隐藏技术的编码过程。因此,在编码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于编解码的过程中,减少了编码的码率,还提高了编码效率和性能。
在本申请的再一实施例中,参见图13,其示出了本申请实施例提供的一种编解码系统的组成结构示意图。如图13所示,编解码系统130可以包括编码设备1301和解码设备1302。其中,编码设备1301可以为前述实施例中任一项所述的编码器,解码设备1302可以为前述实施例中任一项所述的解码器。
在本申请实施例中,该编解码系统130中的编码设备1301与解码设备1302可以进行信息交互,例如编码设备1301生成的码流可以传输到解码设备1302中。这样,对于该编解码系统130而言,在编码端或解码端,均通过第一语法元素信息判断出序列级允许使用奇偶隐藏技术的情况下,才依据变量信息和第一预设编码方式(有损编码)来判断是否生成第二语法元素信息,其中,第二语法元素信息表征基于帧级或片段级的允许使用奇偶隐藏技术。这样编码器在使用奇偶隐藏技术时考虑到了在采用第一预设编码方式的情况下,通过确定第二语法元素信息的方式,来使用奇偶隐藏技术对当前块的量化系数绝对值进行编码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法(即第二语法元素信息),来控制使用奇偶隐藏技术的编码过程。因此,在编码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于编解码的过程中,减少了编码的码率,还提高了编码效率和性能。
需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
工业实用性
本申请实施例中,在编码端或解码端,均通过第一语法元素信息判断出序列级允许使用奇偶隐藏技术的情况下,才依据变量信息和第一预设编码方式(有损编码)来判断是否生成第二语法元素信息,其中,第二语法元素信息表征基于帧级或片段级的允许使用奇偶隐藏技术。这样编码器在使用奇偶隐藏技术时考虑到了在采用第一预设编码方式的情况下,通过确定第二语法元素信息的方式,来使用奇偶隐藏技术对当前块的量化系数绝对值进行编码,有效的通过依赖是否采用了有损编码(即也可以理解为是否采用无损编码)的高层语法(即第二语法元素信息),来控制使用奇偶隐藏技术的编码过程。因此,在编码的过程中,提高使用奇偶隐藏技术的适用性,进而通过奇偶隐藏技术的更好的适用性,将奇偶隐藏技术应用于编解码的过程中,减少了编码的码率,还提高了编码效率和性能。

Claims (32)

  1. 一种解码方法,应用于解码器,所述方法包括:
    解析码流,确定第一语法元素信息;
    在所述第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;
    在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;
    基于所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
  2. 根据权利要求1所述的方法,其中,所述变量信息包括:帧级变量信息;所述第二语法元素信息包括:帧级语法元素信息;所述帧级语法元素信息表征帧级是否允许使用奇偶隐藏技术;
    在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息,包括:
    在所述帧级变量信息指示所述当前帧中存在采用第一预设编码方式的至少一个片段的情况下,确定所述帧级语法元素信息。
  3. 根据权利要求2所述的方法,其中,所述基于所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值,包括:
    在所述帧级语法元素信息指示所述当前帧允许使用奇偶隐藏技术,且所述当前块所在的当前片段采用所述第一预设编码方式的情况下,确定所述当前块中是否存在隐藏量化系数;
    在所述当前块中存在隐藏量化系数的情况下,确定所述当前块的所述量化系数绝对值。
  4. 根据权利要求1所述的方法,其中,所述变量信息包括:片段级变量信息;所述第二语法元素信息包括:帧级语法元素信息;所述帧级语法元素信息表征帧级是否允许使用奇偶隐藏技术;
    在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息,包括:
    在所述片段级变量信息指示当前帧中的片段均采用第一预设编码方式的情况下,确定所述帧级语法元素信息。
  5. 根据权利要求4所述的方法,其中,所述基于所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值,包括:
    在所述帧级语法元素信息指示所述当前帧允许使用奇偶隐藏技术的情况下,确定所述当前块中是否存在隐藏量化系数;
    在所述当前块中存在隐藏量化系数的情况下,确定所述当前块的所述量化系数绝对值。
  6. 根据权利要求1所述的方法,其中,所述变量信息包括:片段级变量信息;所述第二语法元素信息包括:片段级语法元素信息;所述片段级语法元素信息表征片段级是否允许使用奇偶隐藏技术;
    在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息,包括:
    遍历所述当前帧的片段,在所述片段级变量信息指示所述当前帧中的当前片段采用第一预设编码方式的情况下,确定当前片段的所述片段级语法元素信息。
  7. 根据权利要求6所述的方法,其中,所述基于所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值,包括:
    在所述片段级语法元素信息指示所述当前片段允许使用奇偶隐藏技术的情况下,确定所述当前块中是否存在隐藏量化系数;
    在所述当前块中存在隐藏量化系数的情况下,确定所述当前块的所述量化系数绝对值。
  8. 根据权利要求1-7任一项所述的方法,其中,所述基于所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值,包括:
    基于所述第二语法元素信息,确定所述当前块的第三语法元素;所述第三语法元素表征块级是否允许使用奇偶隐藏技术;
    在所述第三语法元素信息指示所述当前块允许使用奇偶隐藏技术的情况下,确定所述当前块中存在隐藏量化系数;
    所述当前块中存在隐藏量化系数的情况下,确定所述当前块的所述量化系数绝对值。
  9. 根据权利要求1-7任一项所述的方法,其中,所述基于所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值,包括:
    根据已解码的非零量化系数的数量、当前块的颜色分量和当前块的变换类型中的至少一个,以及所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
  10. 根据权利要求9所述的方法,其中,所述根据已解码的非零量化系数的数量、当前块的颜色分量和当前块的变换类型中的至少一个,以及所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值,包括:
    在所述已解码的非零量化系数的数量大于或等于数量阈值、所述当前块的颜色分量为预设分量、所述当前块的变换类型为预设变换类型,且所述第二语法元素信息指示允许使用奇偶隐藏技术的情况下,确定所述当前块中存在隐藏量化系数;
    在所述当前块中存在隐藏量化系数的情况下,确定所述当前块的所述量化系数绝对值。
  11. 根据权利要求1-7任一项所述的方法,其中,
    所述第一预设编码方式为有损编码方式。
  12. 根据权利要求1所述的方法,其中,
    所述第一语法元素信息表征序列级标识;
    所述第二语法元素信息表征帧级标识或片段级标识。
  13. 一种编码方法,应用于编码器,所述方法包括:
    确定第一语法元素信息;
    在所述第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;
    在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;
    基于所述第二语法元素信息,对当前块的量化系数绝对值进行编码。
  14. 根据权利要求13所述的方法,其中,所述变量信息包括:帧级变量信息;所述第二语法元素信息包括:帧级语法元素信息;所述帧级语法元素信息表征帧级是否允许使用奇偶隐藏技术;
    在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息,包括:
    在所述帧级变量信息指示所述当前帧中存在采用第一预设编码方式的至少一个片段的情况下,确定所述帧级语法元素信息。
  15. 根据权利要求14所述的方法,其中,所述基于所述第二语法元素信息,对当前块的量化系数绝对值进行编码,包括:
    在所述帧级语法元素信息指示所述当前帧允许使用奇偶隐藏技术,且所述当前块所在的当前片段采用所述第一预设编码方式的情况下,确定所述当前块中是否存在隐藏量化系数;
    在所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码。
  16. 根据权利要求13所述的方法,其中,所述变量信息包括:片段级变量信息;所述第二语法元素信息包括:帧级语法元素信息;所述帧级语法元素信息表征帧级是否允许使用奇偶隐藏技术;
    在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息,包括:
    在所述片段级变量信息指示当前帧中的片段均采用第一预设编码方式的情况下,确定所述帧级语法元素信息。
  17. 根据权利要求16所述的方法,其中,所述基于所述第二语法元素信息,对当前块的量化系数绝对值进行编码,包括:
    在所述帧级语法元素信息指示所述当前帧允许使用奇偶隐藏技术情况下,确定所述当前块中是否存在隐藏量化系数;
    在所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码。
  18. 根据权利要求13所述的方法,其中,所述变量信息包括:片段级变量信息;所述第二语法元素信息包括:片段级语法元素信息;所述片段级语法元素信息表征片段级是否允许使用奇偶隐藏技术;
    在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息,包括:
    遍历所述当前帧的片段,在所述片段级变量信息指示所述当前帧中的当前片段采用第一预设编 码方式的情况下,确定当前片段的所述片段级语法元素信息。
  19. 根据权利要求18所述的方法,其中,所述基于所述第二语法元素信息,对当前块的量化系数绝对值进行编码,包括:
    在所述片段级语法元素信息指示所述当前片段允许使用奇偶隐藏技术的情况下,确定所述当前块中是否存在隐藏量化系数;
    在所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码。
  20. 根据权利要求13-19任一项所述的方法,其中,所述基于所述第二语法元素信息,对当前块的量化系数绝对值进行编码,包括:
    基于所述第二语法元素信息,确定所述当前块的第三语法元素;所述第三语法元素表征块级是否允许使用奇偶隐藏技术;
    在所述第三语法元素信息指示所述当前块允许使用奇偶隐藏技术的情况下,确定所述当前块中存在隐藏量化系数;
    在所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码。
  21. 根据权利要求13-19任一项所述的方法,其中,所述基于所述第二语法元素信息,对当前块的量化系数绝对值进行编码,包括:
    根据已编码的非零量化系数的数量、当前块的颜色分量和当前块的变换类型中的至少一个,以及所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码。
  22. 根据权利要求21所述的方法,其中,所述根据已编码的非零量化系数的数量、当前块的颜色分量和当前块的变换类型中的至少一个,以及所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码,包括:
    在所述已编码的非零量化系数的数量大于或等于数量阈值、所述当前块的颜色分量为预设分量、所述当前块的变换类型为预设变换类型,且所述第二语法元素信息指示允许使用奇偶隐藏技术的情况下,确定所述当前块中存在隐藏量化系数;
    在所述当前块中存在隐藏量化系数的情况下,对所述当前块的所述量化系数绝对值进行编码。
  23. 根据权利要求13-19任一项所述的方法,其中,所述方法还包括:
    将所述第一语法元素信息和所述第二语法元素信息写入码流。
  24. 根据权利要求20所述的方法,其中,
    将所述第三语法元素信息写入码流。
  25. 根据权利要求13-19任一项所述的方法,其中,
    所述第一预设编码方式为有损编码方式。
  26. 根据权利要求13所述的方法,其中,
    所述第一语法元素信息表征序列级标识;
    所述第二语法元素信息表征帧级标识或片段级标识。
  27. 一种码流,所述码流是根据待编码信息进行比特编码生成的,所述待编码信息包括下述至少之一:
    第一语法元素信息、第二语法元素信息、第三语法元素信息、当前块的量化系数绝对值的编码信息以及预设参数值;
    其中,所述第一语法元素信息用于指示序列是否使用奇偶隐藏技术,所述第二语法元素信息用于指示帧级或片段级是否使用奇偶隐藏技术;第三语法元素信息用于指示块级是否使用奇偶隐藏技术,所述预设参数值包括下述至少之一:数量阈值、预设分量和预设变换类型。
  28. 一种解码器,包括:
    解码部分,被配置为解析码流,确定第一语法元素信息;
    第一确定部分,被配置为在所述第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;
    所述解码部分,还被配置为在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;以及,基于所述第二语法元素信息,确定所述当前块中存在隐藏量化系数的情况下,确定当前块的量化系数绝对值。
  29. 一种解码器,所述解码器包括:第一存储器和第一处理器;其中,
    所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;
    所述第一处理器,用于在运行所述计算机程序时,执行如权利要求1至12任一项所述的方法。
  30. 一种编码器,包括:
    第二确定部分,被配置为确定第一语法元素信息;在所述第一语法元素信息指示允许序列使用奇偶隐藏技术的情况下,获取变量信息;以及在所述变量信息指示当前帧中存在满足第一预设编码方式的片段的情况下,确定第二语法元素信息;
    编码部分,被配置为基于所述第二语法元素信息,对当前块的量化系数绝对值进行编码。
  31. 一种编码器,所述编码器包括:第二存储器和第二处理器;其中,
    所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;
    所述第二处理器,用于在运行所述计算机程序时,执行如权利要求13至26任一项所述的方法。
  32. 一种计算机存储介质,其中,所述计算机存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现如权利要求1至12任一项所述的方法、或者,所述计算机程序被第二处理器执行时实现如权利要求13至26任一项所述的方法。
PCT/CN2022/120361 2022-09-21 2022-09-21 编解码方法、码流、编码器、解码器以及存储介质 WO2024060099A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/120361 WO2024060099A1 (zh) 2022-09-21 2022-09-21 编解码方法、码流、编码器、解码器以及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/120361 WO2024060099A1 (zh) 2022-09-21 2022-09-21 编解码方法、码流、编码器、解码器以及存储介质

Publications (1)

Publication Number Publication Date
WO2024060099A1 true WO2024060099A1 (zh) 2024-03-28

Family

ID=90453567

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/120361 WO2024060099A1 (zh) 2022-09-21 2022-09-21 编解码方法、码流、编码器、解码器以及存储介质

Country Status (1)

Country Link
WO (1) WO2024060099A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2618572A1 (en) * 2012-01-20 2013-07-24 Research In Motion Limited Multiple sign bit hiding within a transform unit
US20130272424A1 (en) * 2012-04-16 2013-10-17 Qualcomm Incorporated Sign hiding techniques for quantized transform coefficients in video coding
WO2019135630A1 (ko) * 2018-01-05 2019-07-11 에스케이텔레콤 주식회사 변환 계수의 부호 데이터 은닉
WO2020243397A1 (en) * 2019-05-30 2020-12-03 Beijing Dajia Internet Information Technology Co., Ltd. Improving lossless coding efficiency in video coding
WO2021179034A1 (en) * 2020-03-10 2021-09-16 Canon Kabushiki Kaisha Method, apparatus and system for encoding and decoding a block of video samples
CN114930817A (zh) * 2020-01-10 2022-08-19 寰发股份有限公司 量化相关参数的传讯技术

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2618572A1 (en) * 2012-01-20 2013-07-24 Research In Motion Limited Multiple sign bit hiding within a transform unit
US20130272424A1 (en) * 2012-04-16 2013-10-17 Qualcomm Incorporated Sign hiding techniques for quantized transform coefficients in video coding
WO2019135630A1 (ko) * 2018-01-05 2019-07-11 에스케이텔레콤 주식회사 변환 계수의 부호 데이터 은닉
WO2020243397A1 (en) * 2019-05-30 2020-12-03 Beijing Dajia Internet Information Technology Co., Ltd. Improving lossless coding efficiency in video coding
CN114930817A (zh) * 2020-01-10 2022-08-19 寰发股份有限公司 量化相关参数的传讯技术
WO2021179034A1 (en) * 2020-03-10 2021-09-16 Canon Kabushiki Kaisha Method, apparatus and system for encoding and decoding a block of video samples

Similar Documents

Publication Publication Date Title
TWI815927B (zh) 視頻編解碼的塊尺寸限制
CN113711597B (zh) 上下文建模和多重变换矩阵的选择
US11778235B2 (en) Signaling coding of transform-skipped blocks
TWI822842B (zh) 擴展四叉樹的限制
CN113950829A (zh) 简化的变换编解码工具
CN110839160B (zh) 扩展四叉树分割的强制边界分割
AU2023229600A1 (en) Picture partitioning method and apparatus
TWI707576B (zh) 用於微塊的約束
WO2024060099A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2023193260A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2023236113A1 (zh) 视频编解码方法、装置、设备、系统及存储介质
WO2022193390A1 (zh) 视频编解码方法与系统、及视频编解码器
WO2022217447A1 (zh) 视频编解码方法与系统、及视频编解码器
WO2023184747A1 (zh) 视频编解码方法、装置、设备、系统及存储介质
WO2023272517A1 (zh) 编解码方法、码流、编码器、解码器及计算机存储介质
CN113728631B (zh) 帧内子块分割和多变换选择
WO2023173255A1 (zh) 图像编解码方法、装置、设备、系统、及存储介质
WO2022174475A1 (zh) 视频编解码方法与系统、及视频编码器与视频解码器
CN114598873B (zh) 量化参数的解码方法和装置
WO2023220946A1 (zh) 视频编解码方法、装置、设备、系统及存储介质
WO2022217417A1 (zh) 编解码方法、编码器、解码器以及存储介质
WO2022155922A1 (zh) 视频编解码方法与系统、及视频编码器与视频解码器
WO2022193389A1 (zh) 视频编解码方法与系统、及视频编解码器
WO2022116105A1 (zh) 视频编解码方法与系统、及视频编码器与视频解码器
WO2022188239A1 (zh) 系数的编解码方法、编码器、解码器及计算机存储介质

Legal Events

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

Ref document number: 22959109

Country of ref document: EP

Kind code of ref document: A1