CN113225567A - Method and device for encoding and decoding residual error coefficients of video data and electronic equipment - Google Patents

Method and device for encoding and decoding residual error coefficients of video data and electronic equipment Download PDF

Info

Publication number
CN113225567A
CN113225567A CN202011546358.6A CN202011546358A CN113225567A CN 113225567 A CN113225567 A CN 113225567A CN 202011546358 A CN202011546358 A CN 202011546358A CN 113225567 A CN113225567 A CN 113225567A
Authority
CN
China
Prior art keywords
residual
code
coding
decoding
syntax element
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202011546358.6A
Other languages
Chinese (zh)
Inventor
朱弘正
陈漪纹
修晓宇
马宗全
王祥林
于冰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Publication of CN113225567A publication Critical patent/CN113225567A/en
Pending legal-status Critical Current

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Landscapes

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

Abstract

The disclosure relates to a method, a device and an electronic device for encoding and decoding residual coefficients of video data, wherein the method comprises the following steps: performing multi-round decoding on the code stream of the residual error coefficient in the received residual error image code stream; when a first appointed syntax element is decoded, determining that a group of appointed code words are adopted for decoding, or determining a group of code words which are adopted for decoding according to appointed coding information corresponding to the residual image, wherein the first appointed syntax element is a syntax element of a bypass coding mode which does not depend on a probability model; and obtaining the coding value corresponding to the code stream of the first appointed syntax element according to the coding values corresponding to different code words in the group of code words. The method and the device change the dependency on adjacent positions when the first appointed syntax element is coded and decoded, do not need additional complex logic to determine corresponding code words, and improve the coding and decoding efficiency.

Description

Method and device for encoding and decoding residual error coefficients of video data and electronic equipment
This application claims priority from U.S. patent office, U.S. patent application No. 62/954,402 entitled "identification and Coefficients Coding for Video Coding," filed on 27.12.2019, the entire contents of which are incorporated herein by reference.
Technical Field
The present disclosure relates to the field of video encoding and decoding technologies, and in particular, to a method and an apparatus for encoding and decoding residual coefficients of video data, and an electronic device.
Background
Various video encoding techniques may be used to compress video data when processing the video data. Video encoding is performed according to one or more video encoding standards. For example, Video Coding standards include multifunctional Video Coding (VVC), joint exploration test model (JEM), High Efficiency Video Coding (HEVC), Advanced Video Coding (AVC), Moving Picture Experts Group (MPEG) Coding, and the like. Video coding typically utilizes prediction methods such as inter prediction, intra prediction, etc., where there is redundancy in the video image or video sequence. An important goal of video coding techniques is to compress video data into a form that uses a lower bit rate while avoiding or minimizing degradation of video quality.
In video coding and decoding, a coding end adopts intra-frame/inter-frame prediction to code to obtain a prediction block, the prediction block is subtracted from a current video block to obtain a residual block, residual coefficients in the residual block are transformed and quantized, and the quantized residual coefficients are coded and transmitted to a decoding end; and the decoding end decodes the coded stream of the coded residual coefficient, inversely quantizes and inversely transforms the decoded residual coefficient to obtain a residual block, and reconstructs the video block by using the residual block and the prediction block obtained by decoding.
In the current scheme for coding and decoding the residual coefficients, coding and decoding are carried out on different residual coefficients in a residual block according to divided residual sub-blocks, and when certain conditions are met in the process of coding and decoding the residual coefficients in the residual sub-blocks, the current residual coefficients are mapped into corresponding absolute level grades according to a corresponding level mapping scheme.
When the residual coefficient of the residual sub-block is coded and decoded, a multi-round coding mode is adopted for coding and decoding, and syntax elements corresponding to the residual coefficient are coded and decoded in each round of coding and decoding. The encoding and decoding of syntax elements include two types: one is a context codec mode depending on the selection of the probability model, and the other is a bypass codec mode not depending on the probability model.
In the bypass encoding and decoding mode, when some syntax elements of the residual coefficients are encoded and decoded, table look-up parameters need to be determined according to the related information of adjacent positions of pixel positions of the encoded and decoded residual coefficients, the adopted encoding and decoding mode is determined by adopting a corresponding table look-up mode according to the determined table look-up parameters, a group of code words are determined by utilizing the corresponding encoding and decoding mode, and the code values of the syntax elements are obtained according to the code values corresponding to different code words in the group of code word sequences.
The above-mentioned method for determining the table lookup parameter by table lookup requires calculation of the related information of the adjacent position for each pixel point, the table lookup parameter is calculated through a complicated logic derivation process, and the adopted coding method is determined according to the table lookup parameter, so that extra logic is required to process the code word adaptability for residual coefficient coding, the steps of the algorithm are complicated, and the calculation amount of the algorithm is large.
Disclosure of Invention
The present disclosure provides a method and an apparatus for encoding and decoding residual coefficients of video data, and an electronic device, so as to at least solve the problem of low encoding and decoding efficiency caused by additional logic and derivation processes in encoding and decoding in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for coding and decoding residual coefficients of video data, including:
extracting a code stream of a residual sub-block in a residual image from a received residual image code stream, wherein the residual sub-block comprises a plurality of residual coefficients;
performing multi-round decoding on the code stream of each residual error coefficient, wherein each round of decoding mode is adopted to decode the code stream of the corresponding syntax element;
when a first appointed syntax element is decoded, determining that a group of appointed code words are adopted for decoding, or determining a group of code words which are adopted for decoding according to appointed coding information corresponding to the residual image, wherein the first appointed syntax element is a syntax element of a bypass coding mode which does not depend on a probability model;
and obtaining the coding value corresponding to the code stream of the first appointed syntax element according to the coding values corresponding to different code words in the group of code words.
In a possible implementation manner, when the residual coefficient is a regular transform coefficient, the first specified syntax element is a residual absolute value abs _ remaining or a level absolute value dec _ abs _ level that needs to be decoded in the second round of decoding;
when the residual coefficient is a skip transform coefficient, the first specified syntax element is a residual absolute value abs _ remaining that needs to be decoded in the third round of decoding;
when the residual coefficient is a residual coefficient in a palette mode, the first designated syntax element is a residual value palette _ escape _ val;
wherein, the abs _ remaining is a difference absolute value obtained by subtracting a set first basic level from a residual coefficient; the dec _ abs _ level is a difference absolute value obtained by subtracting a set second basic level from a residual coefficient; the palette _ escape _ val is a residual coefficient that is not mapped with an index value in the palette.
In a possible implementation manner, the value of the first base level is 4, and the value of the second base level is 0; or the first basic grade and the second basic grade have the same value, and the value is 0 or 4.
In one possible implementation, the method further includes:
for the residual error coefficient of the non-palette mode, selecting a code word corresponding to one edge as the specified group of code words from a plurality of groups of code word relations corresponding to predefined different table look-up parameters edge, or selecting a plurality of code words corresponding to the edge as code words corresponding to different specified coding information; or
For the residual error coefficient of the non-palette mode, selecting a code word corresponding to a rice from a plurality of groups of code word relations corresponding to predefined different table look-up parameters rice and adjusting the code word to be a preset length to be used as the appointed group of code words, or selecting a plurality of code words corresponding to the rice and respectively adjusting the code words to be the preset length to be used as the code words corresponding to different appointed coding information; or
For the residual error coefficient of the non-palette mode, determining multiple groups of code words corresponding to the rice which is smaller than a preset threshold value from the multiple groups of code word relations corresponding to different predefined lookup table parameters rice, and selecting one code word corresponding to the rice as the specified group of code words or selecting multiple code words corresponding to the rice as code words corresponding to different specified coding information;
for residual coefficients of the palette mode, selecting a codeword corresponding to one Exp-Golomb parameter as the specified group of codewords from a plurality of groups of codeword relations corresponding to different predefined Exp-Golomb parameters, or selecting codewords corresponding to a plurality of Exp-Golomb parameters as codewords corresponding to different specified coding information; or
For the residual error coefficient of the palette mode, selecting a code word corresponding to one Exp-Golomb parameter from a plurality of groups of code word relations corresponding to different predefined Exp-Golomb parameters and adjusting the code word to a preset length as the appointed group of code words, or selecting a plurality of code words corresponding to the Exp-Golomb parameters and adjusting the code words to the preset length as the code words corresponding to different appointed coding information;
the preset length is the length of the longest code word in the multiple code words, or the length obtained by subtracting a preset value from the length of the longest code word.
In one possible implementation, the method further includes:
when a second specified syntax element is decoded, determining that a specified probability model is adopted for decoding, wherein the second specified element is a syntax element of a context coding mode depending on the probability model;
and decoding the second specified syntax element by using the specified probability model to obtain a coded value corresponding to the binary-valued code stream of the second specified syntax element.
In one possible implementation, the residual coefficients include luma residual coefficients and chroma residual coefficients, where:
assigning a different set of codewords to the luma residual coefficient and chroma residual coefficient; or
And respectively appointing a plurality of groups of code words corresponding to different appointed coding information for the brightness residual error coefficient and the chroma residual error coefficient, wherein the plurality of groups of code words corresponding to the brightness residual error coefficient are not completely the same as the plurality of groups of code words corresponding to the chroma residual error coefficient.
In one possible implementation manner, the specific encoding information includes at least one of the following encoding parameters:
a quantization parameter QP associated with a transform block TB or a coding block CB or a slice;
a prediction mode of the coding unit CU;
a fragment type, the fragment type comprising an I fragment, a P fragment, or a B fragment.
In one possible implementation, the method further includes:
and establishing the mapping relation between the coding parameters of different threshold value ranges in the specified coding information and different groups of code words.
In one possible implementation, the method further includes:
receiving a signal notification sent by a coding end by adopting bit streams of different levels, and determining a coding parameter and a corresponding threshold value of the notified specified coding information;
the different levels include a sequence level, a picture level, a slice level, a coding tree unit CTU level, or a coding unit CU level.
In one possible implementation, the method further includes:
receiving a signal notification sent by a coding end by adopting bit streams of different levels, and determining a notified table look-up parameter rice or an Exp-Golomb parameter;
the different levels include a sequence level, a picture level, a slice level, a coding tree unit CTU level, or a coding unit CU level.
In one possible implementation, the bitstream at the sequence level is a bitstream of a sequence parameter set;
the bitstream at the picture level is a bitstream of a picture parameter set and/or a bitstream of a picture header;
the slice-level bitstream is a slice-header bitstream.
In one possible implementation, the method further includes:
when the residual coefficient is determined to be a regular transformation coefficient after level mapping, determining the absolute level grade of the residual coefficient before level mapping according to a first mapping level rule;
when the residual coefficient is determined to be the skip transform coefficient after level mapping, determining the absolute level grade of the residual coefficient before level mapping according to a second mapping level rule;
the first mapping level rule or the second mapping level rule is used for deducing a mapping position according to a deduction method and carrying out level mapping on the residual error coefficient based on the deduced mapping position by utilizing a mapping function;
the first mapping level rule and the second mapping level rule are the same, or the derivation methods of the mapping positions in the first mapping level rule and the second mapping level rule are the same, or the mapping functions in the first mapping level rule and the second mapping level rule are the same.
In a possible implementation manner, the first mapping level rule or the second mapping level rule is configured to derive a mapping position according to a derivation method when the residual coefficient satisfies a set level mapping condition, and perform level mapping on the residual coefficient based on the derived mapping position by using a mapping function.
According to a second aspect of the embodiments of the present disclosure, there is provided a residual coefficient coding and decoding method for video data, including:
extracting a code stream of a residual sub-block in a residual image from a received residual image code stream, wherein the residual sub-block comprises a plurality of residual coefficients;
performing multi-round decoding on the code stream of each residual error coefficient, wherein each round of decoding adopts the decoding mode of the round to decode the code stream of the corresponding syntax element;
when the first appointed syntax element is determined to be decoded, obtaining a table lookup parameter rice according to a second logic rule according to the absolute level AbsLevel of the residual coefficient at the adjacent position of the residual coefficient;
determining a group of code words corresponding to the calculated rice from a plurality of groups of code word relations corresponding to different predefined rice, and obtaining a coding value corresponding to a code stream of the first designated syntax element according to coding values corresponding to different code words in the group of code words;
the first designated syntax element is a syntax element of a bypass coding mode independent of a probability model, and the second logic rule is a rule obtained by changing a parameter used by the calculation of the rice and/or a logic calculation mode in the first logic rule.
In a possible implementation manner, the obtaining a rice according to the AbsLevel of the residual coefficient at the adjacent position of the residual coefficient according to the second logic rule includes any one of the following steps:
determining a level parameter locSumABs according to the AbsLevel of the residual error coefficient of the adjacent position, and obtaining rice by the determined locSumABs in a logic derivation mode, wherein n is a non-zero positive integer;
determining locSumABs according to the AbsLevel of residual error coefficients of N adjacent positions, and obtaining a table look-up parameter rice according to the determined locSumABs, wherein N is a positive integer less than 5;
summing the AbsLevel of the residual coefficients of the adjacent positions, subtracting m base Level, multiplying the obtained numerical value by a set coefficient alpha, then determining locSumABs after offsetting a set offset beta, and obtaining a table look-up parameter rice according to the determined locSumABs;
the baseLevel is the basic level of the residual error coefficient, and m is the number of the found adjacent positions.
In a possible implementation manner, the obtaining a table lookup parameter rice according to the AbsLevel of the residual coefficient at the adjacent position of the residual coefficient according to the second logic rule includes:
summing the abslevels of the residual coefficients of the adjacent positions and subtracting m baselevels, wherein the baselevels are the basic levels of the residual coefficients, and m is the number of the searched adjacent positions;
using the obtained values as locSumAbs, or only limiting the minimum value of the obtained values to be a lower limit value to obtain the locSumAbs; or only the maximum of the values obtained is the upper limit value to locSumAbs.
In a possible implementation manner, the obtaining a table lookup parameter rice according to the AbsLevel of the residual coefficient at the adjacent position of the residual coefficient according to the second logic rule includes:
the initial locSumABs are nonzero values, and the adjacent positions of residual error coefficients are searched;
when an adjacent position is found, adding the current locSumABs to the AbsLevel of the residual error coefficient of the adjacent position to obtain the updated current locSumABs;
when the searching of the adjacent positions is finished, subtracting m base levels from the current locSumABs to update the locSumABs, wherein m is the number of the searched adjacent positions;
and obtaining a table look-up parameter rice according to the current locSumAbs.
In a possible implementation manner, the obtaining a table lookup parameter rice according to the AbsLevel of the residual coefficient at the adjacent position of the residual coefficient according to the second logic rule includes:
initializing locSumAds, and searching adjacent positions of residual error coefficients;
determining a grade parameter locSumABs according to the maximum absolute grade of the residual error coefficient in the searched adjacent positions;
and obtaining a table look-up parameter rice according to the determined locSumAbs.
In a possible implementation manner, the obtaining a table lookup parameter rice according to an improved logic rule according to an absolute level of a residual coefficient at a position adjacent to the residual coefficient includes:
initializing locSumAds, and searching the adjacent positions of residual error coefficients;
determining a level parameter locSumABs according to the relative amplitude of the AbsLevel of the residual error coefficient at the searched adjacent position relative to the base level baseLevel of the residual error coefficient;
and obtaining a table look-up parameter rice according to the determined locSumAbs.
In a possible implementation manner, the determining, according to the relative amplitude of the AbsLevel of the residual coefficient at the searched adjacent position with respect to the base level baseLevel of the residual coefficient, the level parameter locSumAbs includes:
subtracting the baseLevel of the residual coefficient from the Abslevel of the residual coefficient of the searched adjacent position, and summing to determine a level parameter locSumABs; or
Determining a level parameter locSumAbs according to the number of adjacent positions of the residual coefficient with the AbsLevel larger than the baseLevel; or
And determining adjacent positions of residual coefficients with the AbsLevel being larger than the baseLevel, subtracting the baseLevel of the residual coefficients from the AbsLevel of the residual coefficients of the determined adjacent positions, summing the AbsLevel and the baseLevel, and determining a level parameter locSumAbs.
In a possible implementation manner, when determining an absolute level after the AbsLevel level of the residual coefficient is mapped, the method further includes:
directly displacing the table look-up parameter rice to the left to obtain a mapping position corresponding to the residual error coefficient, and determining the AbsLevel before level mapping by using a mapping function according to the mapping position; or
Determining a mapping position corresponding to the residual error coefficient according to locSumABs, and determining an AbsLevel before level mapping by using a mapping function according to the mapping position, wherein the locSumABs are level parameters determined according to the AbsLevel of the residual error coefficient of the adjacent position; or
Determining a mapping position corresponding to the residual error coefficient according to the AbsLevel of the residual error coefficient of the adjacent position, and determining the AbsLevel before level mapping by using a mapping function according to the mapping position; or alternatively.
In a possible implementation manner, determining a mapping position corresponding to the residual coefficient according to the AbsLevel of the residual coefficient of the adjacent position includes:
determining the maximum AbsLevel of residual error coefficients of adjacent positions, shifting the maximum AbsLevel to the right by preset bit positions, and determining the shifted numerical value as position data of a mapping position;
and determining the maximum AbsLevel of the residual coefficients of the adjacent positions, shifting the maximum AbsLevel to the right by preset bit positions, multiplying the shifted value by the set coefficient and adding the preset offset to obtain the position data of the mapping position.
According to a third aspect of the embodiments of the present disclosure, there is provided a method for coding and decoding residual parameters of video data, including:
carrying out predictive coding on an image to be transmitted, and obtaining a residual error image according to a difference value of the coded image and the image to be transmitted;
dividing the residual image into residual blocks, performing multi-round coding on residual coefficients in the residual blocks, and coding syntax elements corresponding to each round by adopting the coding mode of the round in each round to obtain code streams;
when a first appointed syntax element is coded, determining that a group of appointed code words are adopted for coding, or determining a group of code words adopted for coding according to appointed coding information corresponding to the residual error image, wherein the first appointed syntax element is a syntax element of a bypass coding mode independent of a probability model;
and obtaining a code stream corresponding to the code value of the first appointed syntax element according to the code values corresponding to different code words in the group of code words.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a method for coding and decoding residual parameters of video data, including:
carrying out predictive coding on an image to be transmitted, and obtaining a residual error image according to a difference value of the coded image and the image to be transmitted;
dividing the residual image into residual blocks, performing multi-round coding on residual coefficients in the residual blocks, and coding syntax elements corresponding to each round by adopting the coding mode of the round in each round to obtain code streams;
when the first appointed syntax element is coded, obtaining a table look-up parameter rice according to a second logic rule according to the absolute level AbsLevel of the residual error coefficient at the adjacent position of the residual error coefficient;
determining a group of code words corresponding to the calculated rice from a plurality of groups of code word relations corresponding to different predefined rice, and obtaining a code stream corresponding to the code value of the first designated syntax element according to the code values corresponding to different code words in the group of code words;
the first designated syntax element is a syntax element of a bypass coding mode independent of a probability model, and the second logic rule is a rule obtained by changing a parameter used by the calculation of the rice and/or a logic calculation mode in the first logic rule.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an apparatus for coding and decoding residual coefficients of video data, including:
a code stream receiving unit configured to extract a code stream of a residual sub-block in a residual image from a received residual image code stream, wherein the residual sub-block comprises a plurality of residual coefficients;
the multi-round decoding unit is configured to perform multi-round decoding on the code stream of each residual error coefficient, and each round of decoding adopts the decoding mode of the round to decode the code stream of the corresponding syntax element;
a code word determining unit configured to determine a set of code words to be used for decoding when a first specified syntax element is decoded, or determine a set of code words to be used for decoding according to specified coding information corresponding to the residual image, wherein the first specified syntax element is a syntax element of a bypass coding mode independent of a probability model;
and the code value determining unit is configured to execute a second method to obtain a code value corresponding to the code stream of the first specified syntax element according to the code values corresponding to different code words in the group of code words.
According to a sixth aspect of the embodiments of the present disclosure, there is provided an apparatus for coding and decoding residual coefficients of video data, including:
a code stream receiving unit configured to extract a code stream of a residual sub-block in a residual image from a received residual image code stream, the residual sub-block including a plurality of residual coefficients;
the multi-round decoding unit is configured to perform multi-round decoding on the code stream of each residual error coefficient, wherein each round of decoding adopts the decoding mode of the round to decode the code stream of the corresponding syntax element;
the table lookup parameter determining unit is configured to obtain a table lookup parameter rice according to a second logic rule according to the absolute level AbsLevel of the residual coefficient of the adjacent position of the residual coefficient when the decoding is determined to reach the first designated syntax element;
a code value determining unit, configured to determine a group of code words corresponding to the calculated rice from a plurality of groups of code word relationships corresponding to different predefined rice, and obtain a code value corresponding to a code stream of the first specified syntax element according to a code value corresponding to a different code word in the group of code words;
the first designated syntax element is a syntax element of a bypass coding mode independent of a probability model, and the second logic rule is a rule obtained by changing a parameter used by the calculation of the rice and/or a logic calculation mode in the first logic rule.
According to a seventh aspect of the embodiments of the present disclosure, there is provided an apparatus for coding and decoding residual coefficients of video data, including:
the residual image determining unit is configured to perform predictive coding on an image to be transmitted and obtain a residual image according to a difference value between the coded image and the image to be transmitted;
the multi-round coding unit is configured to perform division in a residual block on the residual image, perform multi-round coding on residual coefficients in the residual block, and obtain a code stream by coding syntax elements corresponding to each round in a coding mode of the round;
the code word determining unit is configured to determine that a set of code words are adopted for coding or determine a set of code words adopted for coding according to the specified coding information corresponding to the residual image when a first specified syntax element is coded, wherein the first specified syntax element is a syntax element of a bypass coding mode independent of a probability model;
and the code stream determining unit is configured to execute obtaining the code stream corresponding to the coding value of the first designated syntax element according to the coding values corresponding to different code words in the group of code words.
According to an eighth aspect of the embodiments of the present disclosure, there is provided an apparatus for encoding and decoding residual parameters of video data, including:
the residual image determining unit is configured to perform predictive coding on an image to be transmitted and obtain a residual image according to a difference value between the coded image and the image to be transmitted;
the multi-round coding unit is used for dividing the residual image into residual blocks, carrying out multi-round coding on residual coefficients in the residual blocks, and coding syntax elements corresponding to each round by adopting a coding mode of the round in each round to obtain a code stream;
the table lookup parameter determination unit is configured to obtain a table lookup parameter rice according to a second logic rule and an absolute level AbsLevel of a residual coefficient of a position adjacent to the residual coefficient when the first specified syntax element is coded;
a code stream determining unit, configured to determine a group of code words corresponding to the calculated rice from a plurality of groups of code word relationships corresponding to different predefined rice, and obtain a code stream corresponding to the code value of the first designated syntax element according to the code values corresponding to different code words in the group of code words;
the first designated syntax element is a syntax element of a bypass coding mode independent of a probability model, and the second logic rule is a rule obtained by changing a parameter used by the calculation of the rice and/or a logic calculation mode in the first logic rule.
According to a ninth aspect of embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of coding and decoding residual parameters of video data according to any of the above aspects.
According to a tenth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method for coding and decoding residual parameters of video data according to any one of the above aspects.
According to an eleventh aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer programs/instructions which, when executed by a processor, implement the method for coding and decoding residual parameters of video data according to any one of the above aspects.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the coding and decoding method for the residual parameters of the video data changes the complex logic derivation process when coding and decoding the corresponding syntax elements, provides a new coding and decoding mode, and improves the coding and decoding efficiency.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a flowchart illustrating a method for encoding and decoding with regular transform coefficients in the related art according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating a method for encoding and decoding using skip transform coefficients in the related art according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a residual coefficient coding method applied to video data at a decoding end according to an exemplary embodiment;
fig. 4 is a flowchart illustrating a residual coefficient coding and decoding method applied to video data at an encoding end according to an exemplary embodiment;
fig. 5 is a flowchart illustrating another residual coefficient coding method applied to video data at a decoding end according to an exemplary embodiment;
fig. 6 is a flowchart illustrating another residual coefficient coding and decoding method applied to video data at an encoding end according to an exemplary embodiment;
fig. 7 is a block diagram illustrating a residual coefficient coding and decoding apparatus for video data as a decoding side according to an exemplary embodiment;
fig. 8 is a block diagram illustrating a residual coefficient coding and decoding apparatus as video data at an encoding end according to an exemplary embodiment;
fig. 9 is a block diagram illustrating a residual coefficient coding and decoding apparatus for video data as a decoding side according to an exemplary embodiment;
fig. 10 is a block diagram illustrating a residual coefficient coding and decoding apparatus as video data at an encoding end according to an exemplary embodiment;
FIG. 11 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In video coding and decoding, a coding end adopts intra-frame/inter-frame prediction to code to obtain a prediction block, the prediction block is subtracted from a current video block to obtain a residual block, and coding residual coefficients in the residual block mainly comprises the following two types:
1) residual coefficient coding and decoding in non-palette mode
The type of residual coefficient coding and decoding does not need to use a palette, and is divided into the following two types according to whether the residual coefficient obtained in the residual block is transformed or not:
1.1) encoding and decoding of regular transform coefficients in regular transform mode
The method comprises the steps that an encoding end carries out encoding by adopting intra-frame/inter-frame prediction to obtain a prediction block, the prediction block is subtracted from a current video block to obtain a residual block, non-zero residual coefficients in the residual block are distributed in a discrete mode, in order to enable the non-zero residual coefficients to be distributed in a certain area in a concentrated mode, the residual coefficients are transformed to change the positions of the residual coefficients, then the residual coefficients are quantized to limit the value range of the residual coefficients to a certain range, the specific condition for judging whether the residual coefficients are transformed or not and the transformation mode are the prior art, the specific process for quantizing the residual coefficients is the prior art, and detailed description is omitted.
After the residual coefficients are transformed, the non-zero residual coefficients are distributed in a certain area in a centralized manner, and then the residual block is divided into residual sub-blocks according to the existing manner, which is also called a coefficient group CG in the embodiment of the present disclosure. The residual subblocks are divided differently according to coding standards, and in HEVC, each CG has a fixed size of 4x4, and in VVC, the CG size becomes dependent on the transform block TB size at the time of coding.
On the basis of the residual sub-blocks, the CG of the residual block and the residual coefficients within the CG are scanned according to a predetermined scanning order, and the residual block may be understood as a frame image in the embodiment of the present disclosure.
Fig. 1 is a schematic diagram of a specific process of encoding a regular transform coefficient in VVC, and the following method is mainly used for encoding and decoding the regular transform coefficient:
the maximum number of context coding bins CCB for a TB is derived using the area of the TB and the type of video component (e.g., luminance component or chrominance component).
In transform coefficient coding in VVC, the variable parameter remBinsPass1 is first set to the maximum number of allowed context coding boxes MCCB, resetting remBinsPass1 for each TB. In the process of coding and decoding, a multi-round coding and decoding mode is adopted to code and decode the corresponding syntax element of the residual coefficient C in the residual sub-block, the coding and decoding of the corresponding syntax element of the residual coefficient in the first round of a certain residual coefficient are executed, and the remBinsPass1 is reduced by 1.
Specifically, in the first round of residual coefficient coding, when remBinsPass1 is greater than or equal to 4, syntax elements sig _ coeff _ flag, abs _ level _ gt1_ flag, par _ level _ flag, and abs _ level _ gt3_ flag of each residual coefficient C in the residual sub-block are coded using a context coding method dependent on a probability model, where the context coding method dependent on the probability model is a method of selecting one probability from a plurality of probability models according to context (adjacent pixel position residual coefficient) information of the residual coefficient, and coding and decoding by using the selected probability model. The probability model selected depends on the sum of the absolute levels (or partially reconstructed absolute levels) in the local neighborhood and the number of absolute levels greater than 0 in the local neighborhood. sig _ coeff _ flag represents the significance of the residual coefficient, abs _ level _ gt1 represents whether the residual coefficient is greater than 1, par _ level _ flag represents the parity check result of the residual coefficient, and abs _ level _ gt3_ flag represents whether the residual coefficient is greater than 3. The above-mentioned syntax element content determination method is prior art and will not be described in detail here. After each complete coding of the first round of syntax elements for one residual coefficient, the number of rembinpass 1 is reduced by 1. When remBinsPass1 is smaller than 4, the first round of coding of syntax elements is not performed, and the second round of coding of syntax elements is performed directly.
In the second round of residual coefficient coding and decoding, when remBinsPass1 is equal to or greater than 4, a bypass coding method independent of the probability model is used for the syntax element abs _ remaining of each residual coefficient C in the residual sub-block, and when remBinsPass1 is smaller than 4, a bypass coding method independent of the probability model is used for the syntax element dec _ abs _ level of each residual coefficient C in the residual sub-block.
It should be noted that the residual error coefficient has a residual error coefficient absolute level AbsLevel, where the AbsLevel of the residual error coefficient at the initial time is an absolute value of the quantized residual error coefficient, and in the encoding process, when the residual error coefficient meets the level mapping condition, the absolute level AbsLevel of the residual error coefficient deduces a mapping position according to a derivation method according to a set level mapping scheme, and performs level mapping on the residual error coefficient based on the deduced mapping position by using a mapping function, so as to obtain the level-mapped AbsLevel.
The residual coefficients have a base level of residual coefficients, where the base level of the residual coefficient C encoding the syntax element abs _ remaining in the second round is 4, and the base level of the residual coefficient C encoding the syntax element dec _ abs _ level in the second round is 0. The abs _ remaining is a residual absolute value, and for example, when the quantized residual coefficient is 10, the residual abs _ remaining takes a value of 7 after encoding a portion of 1 or more than 3. dec _ abs _ level is a level absolute value, for example, a quantized residual coefficient is 3, and dec _ abs _ level takes a value of 3.
1.2) skip transform coefficient coding and decoding in skip transform mode
The difference between the skip transform mode and the regular transform mode is that the encoding end uses intra/inter prediction to encode and then obtains a prediction block, subtracts the prediction block from the current video block to obtain a residual block, and directly quantizes without performing transform on residual coefficients after obtaining the residual block.
As shown in fig. 2, which is a specific process diagram of skip transform coefficient coding in VVC, the variable parameter remBinsPass1 is first set to the maximum number of allowed context coding boxes (MCCBs), and remBinsPass1 is reset for each TB. In the process of coding and decoding, a multi-round coding and decoding mode is adopted to sequentially code and decode the residual coefficient C in the residual sub-blocks, after the coding and decoding of the first round of syntax elements of one residual coefficient are finished, the number of remBinsPass1 is reduced by 1, and after the coding and decoding of the context coding mode in the second round are finished, the number of remBinsPass1 is reduced by 1.
Specifically, in the first round of residual coefficient coding, for syntax elements sig _ coeff _ flag, coeff _ sign _ flag, abs _ level _ 1_ flag, and par _ level _ flag of each residual coefficient C in the residual sub-block, a probability-model-dependent context coding mode is used, the probability-model-dependent context coding mode is a mode of selecting a probability from a plurality of probability models according to context information of the residual coefficient, and the selected probability model is used for coding and decoding.
In the second round of residual coefficient encoding, when remBinsPass1 is not reduced to a set threshold, for syntax elements abs _ level _ gtx _ flag [1], abs _ level _ x _ flag [2], abs _ level _ gtx _ flag [3] and abs _ level _ x _ flag [4] of each residual coefficient C in a residual sub-block, encoding is performed by using a context encoding method dependent on a probability model, and when the residual coefficient is reduced to the set threshold, encoding is performed by using a bypass encoding method independent of the probability model.
In the third round of residual coefficient encoding, syntax element abs _ remaining is encoded using a bypass encoding method that does not depend on a probability model.
2) Residual coefficient coding and decoding of palette mode
The basic idea of the palette mode is to represent the residual coefficients in the residual block by component values in the palette. The palette comprises different residual coefficient values and corresponding index values thereof, so that the residual coefficients in the residual block that appear in the palette can be directly encoded by the corresponding index values in the palette, and the residual coefficients (residual samples) that do not appear in the palette are encoded and decoded by corresponding encoding and decoding processes. The encoding and decoding process is consistent with the basic idea of residual coefficient encoding and decoding, except that the first syntax element of bypass encoding is palette _ escape _ val.
When abs _ remaining or dec _ abs _ level is encoded in the related art, the current encoding mode is based on the sum of absolute levels of 5 residual coefficients adjacent to a pixel position where the residual coefficient is located and the base level of the residual coefficient, and a table lookup parameter rice (ricepara) is determined:
RicePara=RiceParTable[max(min(31,sumAbs–5*baseLevel),0)]
the above sumAbs represent the sum of absolute level AbsLevel of 5 residual coefficients adjacent to the pixel position where the residual coefficient is located, and the RiceParTable represents the table lookup operation. Currently, a table for looking up a numerical value obtained by [ max (min (31, sumAbs-5 base level),0) ] to obtain a rice is defined and defined in the VVC, specifically, the table 4 defined in the protocol defines, for the rice parameter obtained by looking up, rice parameters corresponding to multiple sets of code words of different encoding modes are defined.
The above process is a residual coefficient coding process of the VVC, and a basic process of an HEVC coding mode is substantially the same as the VVC, and is not repeated here.
When encoding palette _ escape _ val in the related technology, a derivation method of an Exp-Golomb parameter is given, and a corresponding group of binary code words is determined according to the derived Exp-Golomb parameter and a plurality of groups of code words corresponding to different Exp-Golomb parameters defined in a protocol. In the process of the Exp-Golomb parameter, calculation of related information of adjacent position points is needed for each pixel point, and the Exp-Golomb parameter is calculated through a complex logic derivation process.
In the above coding process, when the abs _ remaining or dec _ abs _ level is coded, the derivation process of the edge parameter is basically the same, except that the baseline of the abs _ remaining is 4, and the baseline of the dec _ abs _ level is 0, when the edge is determined, the calculation of the related information of the adjacent position point needs to be performed for each pixel point, the table lookup parameter is calculated through a complicated logical derivation process, and the adopted coding mode is determined according to the table lookup parameter. Similarly, the Exp-Golomb parameter also requires neighboring pixel location information to be derived through a complex logical derivation process. Therefore, it needs extra logic to deal with the codeword adaptability for residual coefficient coding, so the steps of the algorithm are complicated and the calculation amount of the algorithm is large.
Example 1
Fig. 3 is a flowchart illustrating a method for coding and decoding residual parameters of video data according to an exemplary embodiment, where the method, as shown in fig. 3, when applied to a decoding end, includes the following steps:
in step S301, extracting a code stream of a residual sub-block in a residual image from a received residual image code stream, where the residual sub-block includes a plurality of residual coefficients;
the coding end receives a video stream from the decoding end, the video stream comprises a code stream of residual coefficients of a plurality of frames of images, the residual image code stream of the embodiment of the disclosure is extracted according to image frames, after a code stream of a frame of residual image is extracted, a code stream of a residual sub-block can be further extracted, the extraction mode of the code stream is the prior art, which is not repeated here, and the code stream of the extracted residual sub-block comprises a code stream of a plurality of encoded residual coefficients.
In step S302, a code stream of each residual coefficient is subjected to multiple rounds of decoding, and each round of decoding employs a decoding manner of the round to decode a code stream of a corresponding syntax element;
according to the different encoding modes adopted by the encoding end, determining syntax elements which need to be decoded for performing multiple rounds of decoding on the residual coefficients and for each round of decoding, for example, for a regular transform coefficient decoding mode in the VVC, determining syntax elements for each round of decoding in a mode shown in fig. 1, and the specific mode refers to the above description, and is not repeated here. For the skip transform coefficient decoding mode in VVC, the syntax elements for each decoding pass are determined as shown in fig. 2, and the specific mode is referred to the above description, and will not be repeated here.
In step S303, when a first specified syntax element is decoded, determining that a specified group of code words is used for decoding, or determining a group of code words used for decoding according to specified coding information corresponding to the residual image, where the first specified syntax element is a syntax element of a bypass coding mode that does not depend on a probability model;
as described above, in the multi-pass encoding and decoding of residual coefficients, syntax elements adopting a context encoding mode and syntax elements adopting a bypass encoding mode are included, because the syntax elements adopting the bypass encoding mode need to refer to the absolute level AbsLevel of the residual coefficients at the positions of neighboring pixels to obtain a table lookup parameter rice, and a set of code words used are determined according to the rice, complex logic and derivation are needed, and the derivation of the Exp-Golomb parameter has the same problem.
As a possible implementation manner, a group of code words may be directly specified, and when the first specified syntax element is decoded in the decoding process, the binary code corresponding to the group of code words is uniformly used to decode the first specified syntax element.
As another optional implementation, multiple groups of code words may be directly specified, a mapping relationship between the multiple groups of code words and different pieces of specified coding information is pre-established, in the decoding process, when a first specified syntax element is decoded, specified coding information corresponding to the residual image is further obtained, and according to a group of code words corresponding to the obtained specified coding information, a binary code corresponding to the group of code words is used to decode the first specified syntax element.
In step S304, according to the coding values corresponding to different code words in the group of code words, a coding value corresponding to the code stream of the first specified syntax element is obtained.
The encoded value specifically refers to an original residual coefficient value before encoding of a first designated syntax element corresponding to a residual coefficient in the residual image, and the corresponding encoded value can be obtained by decoding according to the encoded value corresponding to different code words in the group of code words and the code words in the code stream of the first designated syntax element. Therefore, when multiple rounds of decoding are completed, the coded value of the residual coefficient can be obtained, the decoded residual image is obtained after the decoding of the residual coefficient of each residual sub-block in the residual image is completed, and the original image is reconstructed by using the predicted image obtained by decoding the video stream.
Fig. 4 is a flowchart illustrating a method for coding and decoding residual parameters of video data according to an exemplary embodiment, where the method, as shown in fig. 4, when applied to an encoding end, includes the following steps:
in step S401, predictive coding is performed on an image to be transmitted, and a residual image is obtained according to a difference between the coded image and the image to be transmitted;
in step S402, the residual image is divided into residual blocks, and residual coefficients in the residual blocks are subjected to multi-pass coding, and each pass uses the coding mode of the pass to code syntax elements corresponding to the pass to obtain a code stream;
in step 403, when a first specified syntax element is coded, determining that a specified group of code words is used for coding, or determining a group of code words used for coding according to specified coding information corresponding to the residual image, where the first specified syntax element is a syntax element of a bypass coding mode that does not depend on a probability model;
in step S404, a code stream corresponding to the code value of the first designated syntax element is obtained according to the code values corresponding to different code words in the group of code words.
The specific implementation process of the encoding end is basically the same as that of the encoding end, except that the encoding of the residual coefficient is realized, and also, the embodiment of the disclosure changes the determination mode of the rice parameter or the Exp-Golomb parameter, and the specific two implementation modes refer to the description of the decoding end, and are not repeated here.
In the following, possible implementations of the embodiments of the present disclosure for encoding and decoding the first specific syntax element are given in conjunction with differences of the encoded first specific syntax element.
Embodiment mode 1
In this embodiment, if the residual coefficient is a skip transform coefficient in the non-palette mode, the first syntax element is a residual absolute value abs _ remaining that needs to be decoded in the third decoding pass. Wherein abs _ remaining is the absolute value of the difference between the residual coefficient and the set first base level baseLevel. The value of the set first base level baseLevel is 4.
For abs _ remaining, the corresponding code group may be generated by any of the following methods:
1) selecting a code word corresponding to a rice as the appointed group of code words from a plurality of groups of code word relations corresponding to different predefined table look-up parameters rice;
at present, multiple groups of code words corresponding to different lookup table parameters rice are defined in the protocol, and a code word corresponding to a rice can be directly selected from the multiple groups of code word relations corresponding to different rice as a specified group of code words. Even though the same procedure is used for determining the abs _ remaining codeword in the current VVC, a fixed edge parameter, such as but not limited to a set of codewords corresponding to an edge value of 1 or 2 or 3, is always selected.
2) Selecting a code word corresponding to a rice from a plurality of groups of code word relations corresponding to different predefined table look-up parameters rice, and adjusting the code word to be the maximum length to be used as the specified group of code words;
according to the currently defined multiple groups of code words corresponding to different edges, the larger the edge is, the longer the length of the code word in the corresponding group of code words is, the embodiment of the present disclosure may select a code word corresponding to an edge and adjust the code word to the maximum length as a specified group of code word, where the maximum length is the maximum length of the code word in the group of code words corresponding to the multiple groups of edges.
3) Determining multiple groups of code words corresponding to the edge smaller than a preset threshold value from the multiple groups of code word relations corresponding to different predefined table look-up parameters edge, and selecting one code word corresponding to the edge as the specified group of code words;
according to the currently defined multiple groups of code words corresponding to different edges, the larger the edge is, the longer the length of the code word in the corresponding group of code words is, the embodiment of the present disclosure may limit the threshold value of the edge, and select a code word corresponding to the edge as the specified group of code words from the multiple groups of code words corresponding to the edge smaller than the threshold value.
4) Selecting a code word corresponding to a rice from a plurality of groups of code word relations corresponding to different predefined table look-up parameters rice, and adjusting the code word corresponding to the rice to a fixed length smaller than the maximum length to be used as a specified group of code words;
according to the currently defined multiple groups of code words corresponding to different edges, the larger the edge is, the longer the length of the code word in the corresponding group of code words is, and the embodiment of the present disclosure may select a code word corresponding to an edge and adjust the code word to a fixed length smaller than the maximum length.
In this embodiment, the residual coefficient may also be a residual coefficient after skip transform in a palette mode, multiple sets of codewords corresponding to different Exp-Golomb parameters are defined in an existing protocol, a derivation method of an Exp-Golomb parameter is provided when encoding and decoding are performed on a first specified syntax element palette _ escape _ val in the residual coefficient of the palette mode, and a corresponding set of binary code words is determined according to the derived Exp-Golomb parameter. The embodiment of the disclosure omits the derivation process of the Exp-Golomb parameter, and specifically, the adopted codeword can be determined by any one of the following methods:
1) directly selecting a code word corresponding to one Exp-Golomb parameter from a plurality of groups of code word relations corresponding to different predefined Exp-Golomb parameters as a group of appointed code words;
2) selecting a code word corresponding to one Exp-Golomb parameter from a plurality of groups of code word relations corresponding to different predefined Exp-Golomb parameters, and adjusting the code word to a preset length to serve as a designated group of code words;
according to the multiple groups of codewords corresponding to different Exp-Golomb parameters defined at present, the larger the Exp-Golomb parameter is, the longer the length of the codeword in the corresponding group of codewords is, the embodiment of the present disclosure may select and adjust a codeword corresponding to an Exp-Golomb to a maximum length as a specified group of codewords, where the maximum length is the maximum length of the codewords in the multiple codewords corresponding to the Exp-Golomb. Alternatively, a set of codewords corresponding to one Exp-Golomb parameter may be selected and adjusted to a fixed length less than the maximum length.
As an optional implementation manner, the decoding end may further receive a signaling sent by the encoding end by using bitstreams of different levels, and determine a notified lookup table parameter rice parameter or an Exp-Golomb parameter;
the different levels include a sequence level, a picture level, a slice level, a coding tree unit CTU level, or a coding unit CU level.
The picture level is a bit stream for one frame of picture, and the sequence level is a bit stream for more than one frame of picture.
A segment refers to a content containing more than one Coding unit tree (CTU). In video data compression, each graph is cut into multiple CTUs for coding and decoding. Each CTU may contain one coding unit CU or be recursively divided into smaller CUs until a predefined minimum CU size is reached. Each CU may then choose to perform intra prediction or inter prediction for compression.
In one example, the rice parameter used to determine the codeword used to encode the abs _ remaining syntax in transform skip residual coding is signaled in a slice header, a Picture Parameter Set (PPS), and/or a Sequence Parameter Set (SPS). When a CU is coded as a skip transform mode and the CU is associated with a slice header, picture header, PPS and/or SPS, etc., as described above, the signaled rice parameter is used to determine the codeword used to encode the syntax abs _ remaining.
Embodiment mode 2
In this embodiment, if the residual coefficient is a regular transform coefficient in the non-palette mode, the first syntax element is a residual absolute value abs _ remaining or a level absolute value dec _ abs _ level that needs to be decoded in the second round of decoding.
Wherein abs _ remaining is a difference absolute value obtained by subtracting a set first basic level from a residual coefficient; dec _ abs _ level is the absolute value of the difference between the residual coefficient and the second base level.
As an optional implementation manner, the first base level baseLevel takes a value of 4, and the second base level baseLevel takes a value of 0.
As another optional implementation manner, the first base level baseLevel and the second base level baseLevel have the same value, and the value is 0 or 4.
For abs _ remaining or dec _ abs _ level, any one of the modes 1) to 4) given in embodiment 1 may be specifically adopted to generate a corresponding group of codewords.
In this embodiment, the residual coefficient may also be a residual coefficient after regular transformation in the palette mode, the first designated syntax element is palette _ escape _ val, multiple sets of codewords corresponding to different Exp-Golomb parameters are defined in the existing protocol, when encoding and decoding are performed on the first designated syntax element palette _ escape _ val in the residual coefficient in the palette mode, a derivation method of the Exp-Golomb parameter is provided, and a corresponding set of binary codewords is determined according to the derived Exp-Golomb parameter. The embodiment of the disclosure omits a derivation process of an Exp-Golomb parameter, and specifically, any one of the modes 1) to 2) given in the mode 1 may be used to generate a corresponding group of codewords.
Embodiment 3
Currently, when coding or decoding a syntax element (e.g., abs _ level _ gtx _ flag) using a context coding scheme, a probability model needs to be selected from a plurality of probability models, and the selection of the current probability model depends on level information of residual coefficient levels of neighboring pixel positions, which requires additional logic and additional context models.
When a second specified syntax element is decoded, the second specified syntax element is determined to adopt a specified probability model for decoding, so that context selection based on adjacent decoded level information can be eliminated, wherein the second specified element is a syntax element of a context coding mode depending on the probability model;
and decoding the second specified syntax element by using the specified probability model to obtain a coded value corresponding to the binary-valued code stream of the second specified syntax element.
It should be noted that this embodiment can be implemented separately, and the specific decoding process is as follows: extracting a code stream of a residual sub-block in a residual image from a received residual image code stream, wherein the residual sub-block comprises a plurality of residual coefficients; performing multi-round decoding on the code stream of each residual error coefficient, wherein each round of decoding mode is adopted to decode the code stream of the corresponding syntax element; and when a second specified syntax element is decoded, decoding the second specified syntax element by using a specified probability model to obtain a code stream corresponding to the binary value of the second specified syntax element. The specific encoding process is as follows: extracting a code stream of a residual sub-block in a residual image from a received residual image code stream, wherein the residual sub-block comprises a plurality of residual coefficients; performing multi-round decoding on the code stream of each residual error coefficient, wherein each round of decoding adopts the decoding mode of the round to decode the code stream of the corresponding syntax element; and when the first appointed syntactic element is determined to be coded, coding the second appointed syntactic element by utilizing an appointed probability model to obtain a code stream corresponding to the second appointed syntactic element.
Embodiment 4
In this embodiment, if the residual coefficient is a skip transform coefficient in the non-palette mode, the first syntax element is a residual absolute value abs _ remaining that needs to be decoded in the third decoding pass. Wherein abs _ remaining is the absolute value of the difference between the residual coefficient and the set first base level baseLevel. The value of the set first base level baseLevel is 4.
For abs _ remaining, the corresponding code group may be generated by any of the following methods:
1) selecting code words corresponding to a plurality of rice as the appointed code word group from a plurality of groups of code word relations corresponding to different predefined table look-up parameters rice, and determining a group of code words used for decoding according to appointed coding information corresponding to the residual image;
the specific encoding information includes at least one of the following encoding parameters:
a quantization parameter QP associated with a transform block TB or a coding block CB or a slice;
a prediction mode of the coding unit CU, for example, such as IBC mode or intra prediction mode or inter prediction mode;
a fragment type, the fragment type comprising an I fragment, a P fragment, or a B fragment.
The transform block here is the size of a transform block for coefficient-transforming a residual image, and the coding block CB may be for a residual image or for a predicted image.
A segment refers to a content comprising more than one coding tree unit CTU. In video data compression, each graph is cut into multiple CTUs for coding and decoding. Each CTU may contain one Coding Unit (CU) or be recursively divided into smaller CUs until a predefined minimum CU size is reached. Each Coding Unit (CU) may select a different prediction mode.
Each CU may then choose to perform intra or inter prediction for compression.
Inter prediction can be classified as uni-directional prediction coding or bi-directional prediction coding. I-slice refers to the coding units in the included slice using only intra prediction. P-slices refer to coding units in the included slices that are coded using only intra prediction or uni-directional prediction. B-slice refers to coding units in the included slices using intra prediction, uni-directional prediction, or bi-directional prediction coding.
2) Selecting a plurality of code words corresponding to the rice from a plurality of groups of code word relations corresponding to different predefined table look-up parameters rice, adjusting the code words to the maximum length, and determining a group of code words used for decoding according to the specified coding information corresponding to the residual image;
3) determining multiple groups of code words corresponding to the edge smaller than a preset threshold value from the predefined multiple groups of code word relations corresponding to different table look-up parameters edge, selecting code words corresponding to multiple edges, and determining a group of code words to be used for decoding according to the specified coding information corresponding to the residual image;
4) selecting a plurality of code words corresponding to the rice from a plurality of groups of code word relations corresponding to different predefined table look-up parameters rice, adjusting the code words corresponding to the rice to be a fixed length less than the maximum length, and determining a group of code words used for decoding according to the specified coding information corresponding to the residual image.
In this embodiment, the residual coefficient may also be a residual coefficient after skip transform in the palette mode, the first designated syntax element is palette _ escape _ val, multiple sets of codewords corresponding to different Exp-Golomb parameters are defined in the existing protocol, when encoding and decoding are performed on the first designated syntax element palette _ escape _ val in the residual coefficient in the palette mode, a derivation method of the Exp-Golomb parameter is provided, and a corresponding set of binary codewords is determined according to the derived Exp-Golomb parameter. The embodiment of the disclosure omits the derivation process of the Exp-Golomb parameter, and specifically, the adopted codeword can be determined by any one of the following methods:
1) directly selecting a plurality of code words corresponding to Exp-Golomb from a plurality of groups of predefined code word relations corresponding to different Exp-Golomb parameters as code words corresponding to different specified coding information, and determining a group of code words adopted for decoding according to the specified coding information corresponding to the residual image;
2) selecting a plurality of code words corresponding to Exp-Golomb parameters from a plurality of groups of code word relations corresponding to different predefined Exp-Golomb parameters, adjusting the code words to be preset lengths, and determining a group of code words used for decoding according to specified coding information corresponding to a residual image.
As an alternative, a mapping relationship between coding parameters specifying different threshold ranges in the coding information and different groups of code words is established. One specific example is shown in table 1, where TH 1-TH 4 are predetermined thresholds that satisfy TH1< TH2< TH3< TH4, and K0-K4 are predetermined rice parameters.
TABLE 1. determination of rice parameter based on QP value
Figure BDA0002856415830000261
The encoding end adopts the bit streams of different levels to send the signaling to inform the decoding end of the encoding parameters and the corresponding threshold of the appointed encoding information, and the decoding end further receives the signaling sent by the bit streams of different levels by the encoding end to determine the encoding parameters and the corresponding threshold of the appointed encoding information.
The different levels include a sequence level (e.g., sequence, parameter set), a picture level (e.g., picture parameter set, and/or picture header), a slice level (e.g., slice header), a coding tree unit CTU level, or a coding unit CU level.
Wherein the picture parameters may include, but are not limited to: whether it is a GDR or IRAP picture; whether it can be a reference picture; whether inter prediction can be used; number of picture level reference set; picture order numbers, etc.
It should be noted that the coding parameters and corresponding thresholds for the specific coding information may be a full set or a subset of all the coding parameters and thresholds associated with codeword determination for syntax elements. The set of parameters and/or thresholds may be signaled at different levels in the video bitstream.
Embodiment 5
In this embodiment, if the residual coefficient is a regular transform coefficient in the non-palette mode, the first syntax element is a residual absolute value abs _ remaining or a level absolute value dec _ abs _ level that needs to be decoded in the second round of decoding.
The syntax element abs _ remaining or dec _ abs _ level of the regular transform coefficient may be encoded in any one of the manners 1) to 4) as exemplified in embodiment 4.
In this embodiment, the residual coefficient may also be a residual coefficient after regular transformation in the palette mode, the first designated syntax element is palette _ escape _ val, multiple sets of codewords corresponding to different Exp-Golomb parameters are defined in the existing protocol, when encoding and decoding are performed on the first designated syntax element palette _ escape _ val in the residual coefficient in the palette mode, a derivation method of the Exp-Golomb parameter is provided, and a corresponding set of binary codewords is determined according to the derived Exp-Golomb parameter. The embodiment of the disclosure omits a derivation process of the Exp-Golomb parameter, and specifically may adopt a mode of determining the codeword for the Exp-Golomb parameter in 1) to 2) in the embodiment 4.
As an optional implementation manner, a mapping relationship between coding parameters in different threshold ranges in the specified coding information and different groups of code words is established, the coding end uses different levels of bit streams to send signaling to notify the decoding end of the coding parameters and corresponding thresholds of the specified coding information, and the decoding end further receives the signaling sent by the coding end using different levels of bit streams to determine the coding parameters and corresponding thresholds of the specified coding information. The bit stream of the sequence level is the bit stream of the sequence parameter set; the bitstream at the picture level is a bitstream of a picture parameter set and/or a bitstream of a picture header; the slice-level bitstream is a slice-header bitstream.
It should be noted that the coding parameters and corresponding thresholds for the specific coding information may be a full set or a subset of all the coding parameters and thresholds associated with codeword determination for syntax elements. The set of parameters and/or thresholds may be signaled at different levels in the video bitstream.
Embodiment 6
In this embodiment, the residual coefficients include a luminance residual coefficient and a chrominance residual coefficient, and different code groups are used for distinguishing the luminance residual coefficient from the chrominance residual coefficient, and specifically, any one of the following modes may be adopted:
1) assigning a different set of codewords to the luma residual coefficient and chroma residual coefficient;
2) and respectively appointing a plurality of groups of code words corresponding to different appointed coding information for the brightness residual error coefficient and the chroma residual error coefficient, wherein the plurality of groups of code words corresponding to the brightness residual error coefficient are not completely the same as the plurality of groups of code words corresponding to the chroma residual error coefficient.
In one example, the codewords for abs _ remaining used in the current VVC associated with transform residual coding are used for both luma and chroma blocks, but luma and chroma blocks use different fixed rice parameters respectively (e.g., K1 for luma blocks, K2 for chroma blocks, where K1 and K2 are integers).
Embodiment 7
In the present disclosure, in addition to embodiment 6, a signaling transmitted by the encoding side using bit streams of different levels is received, the encoding parameters and corresponding thresholds of the specified encoding information to be notified are determined, and different groups are signaled for the luminance block and the chrominance block. When the syntax element is encoded by an entropy encoder, e.g. arithmetic coding, the determined codeword is used as a binarized codeword.
The above method is also applicable to the encoding of residual values in palette mode, such as palette _ escape _ val.
Embodiment 8
The disclosed embodiments use different k-th level Exp-Golomb binarization to derive different sets of binary codewords in palette mode for encoding residual values. In one example, for a given block of residual samples, the Exp-Golomb parameter used, i.e., the value of k, is determined from the QP value of the block represented by the QPCU. The example shown in table 1 may be used to derive the value of parameter k based on a given QP value for a block as well. Although in this example four different thresholds are listed (from TH1 to TH4) and five different K-values can be derived based on these thresholds and the QPCU (from K0 to K4), it is worth mentioning that the number of thresholds is for illustration purposes only. In an implementation, different numbers of thresholds may be used to partition the entire QP value range into different numbers of QP value segments, for each QP value segment, different values of k may be used to derive a corresponding binary codeword for encoding a residual value for a block encoded in palette mode.
Embodiment 9
This embodiment is based on embodiment 8, wherein a set of parameters and/or thresholds associated with codeword determination for syntax elements of residual samples is signaled in the bitstream. When the syntax elements of the residual samples are encoded by an entropy encoder, e.g. arithmetic coding, the determined codeword is used as a binarized codeword.
It is noted that the set of parameters and/or thresholds may be a full set or a subset of all parameters and thresholds associated with codeword determination for syntax elements. The set of parameters and/or thresholds may be signaled at different levels in the video bitstream. For example, these parameters and/or thresholds may be signaled at the sequence level (e.g., sequence parameter set), picture level (e.g., picture parameter set, and/or picture header), slice level (e.g., slice header), Coding Tree Unit (CTU) level, or Coding Unit (CU) level.
In one example, the k-th level of Exp-Golomb binarization is used to determine the codeword in palette mode used to encode the palette _ escape _ val syntax, and to signal the value of k to the decoder in the bitstream. The value of k may be signaled at different levels, e.g., may be signaled in a slice header, a picture header, a PPS, and/or an SPS, etc. When a CU is coded as a palette mode and the CU is associated with a slice header, picture header, PPS and/or SPS, etc., as described above, the signaled Exp-Golomb parameter is used to determine the codeword for the coding syntax palette _ escape _ val.
Embodiment 10
As described above, the residual coefficients have the residual coefficient absolute level AbsLevel, the AbsLevel of the residual coefficients at the initial time is the value of the quantized residual coefficients, in the encoding process, when the residual coefficients meet the level mapping condition, the mapping positions are derived according to the derivation method according to the set level mapping scheme according to the absolute level AbsLevel of the residual coefficients, and the mapping functions are used for performing level mapping on the residual coefficients based on the derived mapping positions, so as to obtain the abslevels after the level mapping. The purpose of level mapping is to predict residual coefficient values with higher probability and needing to be binarized, so that the residual coefficient values need less bits after being subjected to level mapping and binarized.
In this embodiment, when determining that the residual coefficient is a regular transform coefficient after level mapping, determining an absolute level of the residual coefficient before level mapping according to a first mapping level rule; and when the residual coefficient is determined to be the jump transformation coefficient after the level mapping, determining the absolute level grade of the residual coefficient before the level mapping according to a second mapping level rule.
The first mapping level rule or the second mapping level rule is used for deducing a mapping position according to a deduction method and carrying out level mapping on the residual coefficient based on the deduced mapping position by using a mapping function.
In the disclosed embodiment, the first mapping level rule and the second mapping level rule are the same, and the application of the level mapping after the Context Coding Box (CCB) exceeds the limit value is no longer restricted. In one example, it is proposed to apply level mapping before a Context Coding Box (CCB) exceeds a limit for both skip and regular transform modes.
Embodiment 11
In this embodiment, when determining that the residual coefficient is a regular transform coefficient after level mapping, determining an absolute level of the residual coefficient before level mapping according to a first mapping level rule; and when the residual coefficient is determined to be the skip transform coefficient after the level mapping, determining the absolute level of the residual coefficient before the level mapping according to a second mapping level rule, wherein the derivation methods of the mapping positions in the first mapping level rule and the second mapping level rule are the same.
The present embodiment proposes to use the same method for deriving the mapping position in the level mapping for both the skip transform mode and the regular transform mode. In one example, it is proposed to apply the derivation method of the mapping position in the level mapping used in the skip transform mode also to the regular transform mode. In another example, it is proposed to apply the derivation method of the mapping position in the level mapping used in the regular transformation mode also to the skip transformation mode.
Embodiment 12
In this embodiment, when determining that the residual coefficient is a regular transform coefficient after level mapping, determining an absolute level of the residual coefficient before level mapping according to a first mapping level rule; and when the residual coefficient is determined to be the jump transformation coefficient after the level mapping, determining the absolute level of the residual coefficient before the level mapping according to a second mapping level rule, wherein the mapping functions in the first mapping level rule and the second mapping level rule are the same.
This embodiment applies the same level mapping method to the skip transform mode and the regular transform mode. In one example, it is proposed that the level mapping function used in the skip transform mode is also applied to the regular transform mode. In another example, it is proposed that the level mapping function used in the regular transformation mode is also applied to the skip transformation mode.
Example 2
Fig. 5 is a flowchart illustrating another method for coding and decoding residual parameters of video data according to an exemplary embodiment, and when the method is applied to an encoding end, as shown in fig. 5, the method includes the following steps:
in step S501, extracting a code stream of a residual sub-block in a residual image from a received residual image code stream, where the residual sub-block includes a plurality of residual coefficients;
the coding end receives a video stream from the decoding end, the video stream comprises a code stream of residual coefficients of a plurality of frames of images, the residual image code stream of the embodiment of the disclosure is extracted according to image frames, after a code stream of a frame of residual image is extracted, a code stream of a residual sub-block can be further extracted, the extraction mode of the code stream is the prior art, and is not repeated here, and the code stream of the extracted residual sub-block comprises the code stream of a plurality of residual coefficients after being encoded.
In step S502, performing multiple rounds of decoding on the code stream of each residual coefficient, where each round of decoding employs the decoding manner of the round to decode the code stream of the corresponding syntax element;
according to the different encoding modes adopted by the encoding end, determining syntax elements which need to be decoded for performing multiple rounds of decoding on the residual coefficients and for each round of decoding, for example, for a regular transform coefficient decoding mode in the VVC, determining syntax elements for each round of decoding in a mode shown in fig. 1, and the specific mode refers to the above description, and is not repeated here. For the skip transform coefficient decoding mode in VVC, the syntax elements for each decoding pass are determined as shown in fig. 2, and the specific mode is referred to the above description, and will not be repeated here.
In step S503, when it is determined that a first specified syntax element is decoded, obtaining a table lookup parameter rice according to a second logic rule according to an absolute level AbsLevel of a residual coefficient at a position adjacent to the residual coefficient, where the first specified syntax element is a syntax element of a bypass coding mode independent of a probability model, and the second logic rule is a rule obtained by changing a parameter used for computing rice in the first logic rule and/or a logic computation mode;
the first logic rule is a rule for calculating the rice defined in the related art, and the second logic rule in the embodiment of the disclosure is a rule obtained by changing a parameter used by the calculated rice in the first logic rule and/or a logic calculation mode, so that a derivation process of the rice parameter is simplified or accurate.
In step S504, a group of codewords corresponding to the calculated edge is determined from a plurality of groups of predefined codeword relationships corresponding to different edges, and a coding value corresponding to the code stream of the first designated syntax element is obtained according to coding values corresponding to different codewords in the group of codewords;
the multiple groups of code words corresponding to different rice can use the corresponding relationship defined in the prior art to search a corresponding group of code words according to the rice, and obtain the coding value corresponding to the code stream of the first designated syntax element according to the coding value corresponding to different code words in the group of code words. Therefore, when multiple rounds of decoding are completed, the coded value of the residual coefficient can be obtained, the decoded residual image is obtained after the decoding of the residual coefficient of each residual sub-block in the residual image is completed, and the original image is reconstructed by using the predicted image obtained by decoding the video stream.
Fig. 6 is a flowchart illustrating another method for coding and decoding residual parameters of video data according to an exemplary embodiment, where the method, as shown in fig. 6, when applied to a decoding end, includes the following steps:
in step S601, predictive coding is performed on an image to be transmitted, and a residual image is obtained according to a difference between the coded image and the image to be transmitted;
in step S602, the residual image is divided into residual blocks, and residual coefficients in the residual blocks are subjected to multi-pass coding, and each pass uses a coding mode of the pass to code syntax elements corresponding to the pass to obtain a code stream;
in step S603, when the first designated syntax element is encoded, a table lookup parameter rice is obtained according to a second logic rule according to the absolute level AbsLevel of the residual coefficient at the position adjacent to the residual coefficient;
in step S604, a group of code words corresponding to the calculated rice is determined from a plurality of groups of code word relationships corresponding to different predefined rice, and a code stream corresponding to the code value of the first designated syntax element is obtained according to the code values corresponding to different code words in the group of code words;
the first designated syntax element is a syntax element of a bypass coding mode independent of a probability model, and the second logic rule is a rule obtained by changing a parameter used by the calculation of the rice and/or a logic calculation mode in the first logic rule.
In a possible implementation manner, when the residual coefficient is a regular transform coefficient, the first specified syntax element is a residual absolute value abs _ remaining or a level absolute value dec _ abs _ level that needs to be decoded in the second round of decoding;
when the residual coefficient is a skip transform coefficient, the first designated syntax element is a residual absolute value abs _ remaining that needs to be decoded in the third round of decoding;
wherein, the abs _ remaining is a difference absolute value obtained by subtracting a set first basic level from a residual coefficient; dec _ abs _ level is the absolute value of the difference between the residual coefficient and the second base level.
The first logic rule is a rule for calculating the rice defined in the related art, and the following rule is specifically adopted to output a table look-up parameter rice (criceparam) assuming the current coefficient scanning position (xC, yC):
locSumAbs=0
if(xC<(1<<log2TbWidth)-1){
locSumAbs+=AbsLevel[xC+1][yC]
if(xC<(1<<log2TbWidth)-2)
locSumAbs+=AbsLevel[xC+2][yC]
if(yC<(1<<log2TbHeight)-1)
locSumAbs+=AbsLevel[xC+1][yC+1]
}
if(yC<(1<<log2TbHeight)-1){
locSumAbs+=AbsLevel[xC][yC+1]
if(yC<(1<<log2TbHeight)-2)
locSumAbs+=AbsLevel[xC][yC+2]
}
locSumAbs=Clip3(0,31,locSumAbs-baseLevel*5)
given the variable locSumAbs, the Rice parameter cRiceParam is derived as shown in table 4 using the existing protocol definitions.
Wherein: the baseLevel is the basic level of the current residual coefficient, the log2TbWidth is the base-2 logarithm of the width of the transformation block, and the log2TbHeight is the base-2 logarithm of the height of the transformation block.
That is, the first logic rule may be described as:
the initial locSumABs are zero values, and 5 adjacent positions of the residual error coefficient are sequentially searched;
adding the current locSumABs to the AbsLevel of the residual error coefficient of the adjacent position to obtain the updated current locSumABs when one adjacent position is found;
when the search of 5 adjacent positions is finished, subtracting 5 × baseLevel from the current locSumAbs to update the locSumAbs, limiting the minimum value of the updated locSumAbs to be 0, and limiting the maximum value of the updated locSumAbs to be 31; given the variable locSumAbs, the Rice parameter cRiceParam is found by table 4 defined by the existing protocol.
In the embodiment of the present disclosure, the derivation or the accurate rice derivation is simplified by changing the relevant parameter or logic derivation process in the foregoing process, and any of the following embodiments may be specifically adopted.
Embodiment mode 1
Determining a level parameter locSumABs according to the AbsLevel of residual coefficients of adjacent positions, and obtaining the rice by adopting a logic derivation mode for the determined locSumABs, wherein n is a non-zero positive integer. In one example, the Rice parameter cRiceParam is derived as follows:
cRiceParam ═ (locSumAbs > > n) where n is a positive number, e.g. 3.
Implementations may use different logic to achieve the same result, such as a divide operation by the power n of 2. An example of the output Rice parameter cRiceParam of a corresponding decoding process based on VVC drafts is shown below.
locSumAbs=0
if(xC<(1<<log2TbWidth)-1){
locSumAbs+=AbsLevel[xC+1][yC]
if(xC<(1<<log2TbWidth)-2)
locSumAbs+=AbsLevel[xC+2][yC]
if(yC<(1<<log2TbHeight)-1)
locSumAbs+=AbsLevel[xC+1][yC+1]
}
if(yC<(1<<log2TbHeight)-1){
locSumAbs+=AbsLevel[xC][yC+1]
if(yC<(1<<log2TbHeight)-2)
locSumAbs+=AbsLevel[xC][yC+2]
}
locSumAbs=Clip3(0,31,locSumAbs-baseLevel*5)
Figure BDA0002856415830000351
Given the variable locSumAbs, the Rice parameter cRiceParam is derived as follows:
cRiceParam=(locSumAbs>>3)
compared with the existing logic derivation process, the table lookup operation (the part indicated by the above strikethrough) is omitted, and the rice parameter is obtained by a shift operation (the part indicated by the above underline) which shifts locSumAbs by 3 bits to the right.
Embodiment mode 2
Determining locSumABs according to the AbsLevel of the residual error coefficients of the N adjacent positions, and obtaining a table look-up parameter rice according to the determined locSumABs, wherein N is a positive integer less than 5. In the method, the locSumABs are determined by using less AbsLevel of residual error coefficients of adjacent positions, and the table look-up parameter rice is obtained according to the determined locSumABs.
The following example gives a specific procedure for deriving a rice parameter using only 2 neighboring positions when coding the syntax element dec _ abs _ level/dec _ abs _ level:
locSumAbs=0
if(xC<(1<<log2TbWidth)-1){
locSumAbs+=AbsLevel[xC+1][yC]
Figure BDA0002856415830000361
Figure BDA0002856415830000362
Figure BDA0002856415830000363
Figure BDA0002856415830000364
}
if(yC<(1<<log2TbHeight)-1){
locSumAbs+=AbsLevel[xC][yC+1]
Figure BDA0002856415830000365
Figure BDA0002856415830000366
}
locSumAbs=Clip3(0,31,locSumAbs-baseLevel*52)
specific in error! No reference source is found. .
Compared with the prior art, the calculation of the AbsLevel of the residual coefficients of 3 adjacent positions is reduced (the deleted line represents a part), and the coefficient of baseLevel is modified into 2.
In another example, a specific procedure is given for deriving the rice parameter using only 1 neighboring position when coding the syntax element dec _ abs _ level/dec _ abs _ level:
locSumAbs=0
if(xC<(1<<log2TbWidth)-1){
locSumAbs+=AbsLevel[xC+1][yC]
Figure BDA0002856415830000367
Figure BDA0002856415830000368
Figure BDA0002856415830000369
Figure BDA00028564158300003610
}
Figure BDA00028564158300003611
Figure BDA0002856415830000371
Figure BDA0002856415830000372
Figure BDA0002856415830000373
Figure BDA0002856415830000374
locSumAbs=Clip3(0,31,locSumAbs-baseLevel
Figure BDA0002856415830000375
)
specific in error! No reference source is found. .
Compared with the prior art, the calculation of the AbsLevel of residual coefficients of 4 adjacent positions is reduced (the deleted line represents a part), and the coefficient of baseLevel is modified to be 1.
Embodiment 3
Summing the AbsLevel of the residual coefficients of adjacent positions, subtracting m baseLevel, multiplying the obtained numerical value by a set coefficient alpha, then determining locSumABs after offsetting a set offset beta, obtaining a table look-up parameter rice according to the determined locSumABs, wherein the baseLevel is the basic level of the residual coefficients, and m is the number of the searched adjacent positions.
Taking an alpha value of 1.5 and a beta value of 1 as an example, a specific process for deriving the rice parameter is given as follows:
locSumAbs=0
if(xC<(1<<log2TbWidth)-1){
locSumAbs+=AbsLevel[xC+1][yC]
if(xC<(1<<log2TbWidth)-2)
locSumAbs+=AbsLevel[xC+2][yC]
if(yC<(1<<log2TbHeight)-1)
locSumAbs+=AbsLevel[xC+1][yC+1]
}
if(yC<(1<<log2TbHeight)-1){
locSumAbs+=AbsLevel[xC][yC+1]
if(yC<(1<<log2TbHeight)-2)
locSumAbs+=AbsLevel[xC][yC+2]
}
locSumAbs=Clip3(0,31,(locSumAbs-baseLevel*5)*1.5+1)
specific in error! No reference source is found. .
Embodiment 4
Summing the AbsLevel of the residual error coefficients of the adjacent positions and subtracting m baseLevel, wherein the baseLevel is the basic level of the residual error coefficients, and m is the number of the searched adjacent positions; and directly taking the obtained numerical value as locSumAbs, and obtaining a table look-up parameter rice according to the determined locSumAbs. In the method, in the process of coding and decoding syntax elements abs _ remaining/dec _ abs _ leve, the clipping operation Clip3 is removed when deriving the rice parameter.
Further, this embodiment mode can be implemented in combination with embodiment mode 1.
In the following example, a specific process of deriving the rice parameter when coding/decoding syntax elements dec _ abs _ level is given:
locSumAbs=0
if(xC<(1<<log2TbWidth)-1){
locSumAbs+=AbsLevel[xC+1][yC]
if(xC<(1<<log2TbWidth)-2)
locSumAbs+=AbsLevel[xC+2][yC]
if(yC<(1<<log2TbHeight)-1)
locSumAbs+=AbsLevel[xC+1][yC+1]
}
if(yC<(1<<log2TbHeight)-1){
locSumAbs+=AbsLevel[xC][yC+1]
if(yC<(1<<log2TbHeight)-2)
locSumAbs+=AbsLevel[xC][yC+2]
}
locSumAbs=
Figure BDA0002856415830000381
locSumAbs-baseLevel*5
Figure BDA0002856415830000382
given the variable locSumAbs, the Rice parameter cRiceParam is derived as follows:
cRiceParam=(locSumAbs>>3)
in the existing derivation process, the Clip3 is used to limit the minimum value of locSumAbs-base level 5 to 0 and the maximum value to 31, the embodiment of the present disclosure deletes the operation of the Clip3, and directly takes locSumAbs-base level 5 as the final locSumAbs value.
In another example, the abslevels of the residual coefficients of adjacent positions are summed and subtracted by m baselevels, where the baselevels are the basic levels of the residual coefficients and m is the number of found adjacent positions; only the minimum of the obtained values is limited to the lower limit to obtain locSumAbs, or only the maximum of the obtained values is limited to the upper limit to obtain locSumAbs.
The following example gives a specific procedure for deriving a rice parameter when coding/decoding a syntax element dec _ abs _ level/dec _ abs _ level:
locSumAbs=0
if(xC<(1<<log2TbWidth)-1){
locSumAbs+=AbsLevel[xC+1][yC]
if(xC<(1<<log2TbWidth)-2)
locSumAbs+=AbsLevel[xC+2][yC]
if(yC<(1<<log2TbHeight)-1)
locSumAbs+=AbsLevel[xC+1][yC+1]
}
if(yC<(1<<log2TbHeight)-1){
locSumAbs+=AbsLevel[xC][yC+1]
if(yC<(1<<log2TbHeight)-2)
locSumAbs+=AbsLevel[xC][yC+2]
}
locSumAbs=
Figure BDA0002856415830000391
Min(
Figure BDA0002856415830000392
31,locSumAbs-baseLevel*5)
specific in error! No reference source is found. .
Embodiment 5
In this embodiment, obtaining the table lookup parameter rice according to the AbsLevel of the residual coefficient at the position adjacent to the residual coefficient according to the second logic rule includes:
the initial locSumABs are nonzero values, and the adjacent positions of residual error coefficients are searched;
when an adjacent position is found, adding the current locSumABs to the AbsLevel of the residual error coefficient of the adjacent position to obtain the updated current locSumABs;
when the searching of the adjacent positions is finished, subtracting m base levels from the current locSumABs to update the locSumABs, wherein m is the number of the searched adjacent positions;
and obtaining a table look-up parameter rice according to the current locSumAbs.
The embodiment of the disclosure provides that in the coding and decoding process of the syntax element abs _ remaining/dec _ abs _ leave, the initial value of locSumAbs is changed from 0 to a non-zero integer when deriving the rice parameter. The following example gives a specific procedure for deriving the rice parameter when locSumAbs initial value is 1:
locSumAbs=01
if(xC<(1<<log2TbWidth)-1){
locSumAbs+=AbsLevel[xC+1][yC]
if(xC<(1<<log2TbWidth)-2)
locSumAbs+=AbsLevel[xC+2][yC]
if(yC<(1<<log2TbHeight)-1)
locSumAbs+=AbsLevel[xC+1][yC+1]
}
if(yC<(1<<log2TbHeight)-1){
locSumAbs+=AbsLevel[xC][yC+1]
if(yC<(1<<log2TbHeight)-2)
locSumAbs+=AbsLevel[xC][yC+2]
}
locSumAbs=Clip3(0,31,locSumAbs-baseLevel*5)
specific in error! No reference source is found. .
The specific derivation of locSumAbs to be initialized to other non-zero values is as above and will not be repeated here.
Embodiment 6
In this embodiment, obtaining the table lookup parameter rice according to the AbsLevel of the residual coefficient at the position adjacent to the residual coefficient according to the second logic rule includes:
initializing locSumAds, and searching adjacent positions of residual error coefficients;
determining a grade parameter locSumABs according to the maximum absolute grade of the residual error coefficient in the searched adjacent positions;
and obtaining a table look-up parameter rice according to the determined locSumAbs.
As a possible implementation, the level parameter locSumAbs may be determined by using the largest absolute level of residual coefficient in the searched neighboring locations, instead of the sum of the absolute levels of the neighboring locations, and the following example gives a specific process of deriving the rice parameter:
locSumAbs=0
if(xC<(1<<log2TbWidth)-1){
Figure BDA0002856415830000411
if(xC<(1<<log2TbWidth)-2)
Figure BDA0002856415830000412
if(yC<(1<<log2TbHeight)-1)
Figure BDA0002856415830000413
}
if(yC<(1<<log2TbHeight)-1){
Figure BDA0002856415830000414
if(yC<(1<<log2TbHeight)-2)
Figure BDA0002856415830000415
}
locSumAbs=Clip3(0,31,locSumAbs-baseLevel
Figure BDA0002856415830000416
)
specific in error! No reference source is found. .
In the derivation process, the locSumAds is initialized, then the adjacent positions are searched, when one adjacent position is searched, the locSumAds is updated to be the absolute level of the residual coefficient of the adjacent position when the absolute level of the residual coefficient of the adjacent position is determined to be larger than the locSumAds, otherwise, the value of the locSumAds is kept unchanged, after the position of the adjacent position is searched, the baseLevel of the residual coefficient is subtracted from the current locSumAds, and the value range is limited to 0-31, so that the final locSumAds is obtained.
Embodiment 7
In this embodiment, obtaining the table lookup parameter rice according to the improved logic rule according to the absolute level of the residual coefficient at the adjacent position of the residual coefficient includes:
initializing locSumAds, and searching the adjacent positions of residual error coefficients;
determining a level parameter locSumAbs according to the relative amplitude of the AbsLevel of the residual error coefficient at the searched adjacent position relative to the base level baseLevel of the residual error coefficient, and according to the relative amplitude and the base level of the residual error coefficient;
and obtaining a table look-up parameter rice according to the determined locSumAbs.
In one example, the level parameter locSumAbs is determined according to the number of neighboring positions where the AbsLevel of the residual coefficient is greater than the baseLevel, i.e. the rice parameter is derived based on how many AbsLevel values at neighboring positions are greater than the base level baseLevel, and the following example gives a specific process of deriving the rice parameter:
locSumAbs=0
if(xC<(1<<log2TbWidth)-1){
locSumAbs+=(AbsLevel[xC+1][yC]>baseLevel1:0)
if(xC<(1<<log2TbWidth)-2)
locSumAbs+=(AbsLevel[xC+2][yC]>baseLevel1:0)
if(yC<(1<<log2TbHeight)-1)
locSumAbs+=(AbsLevel[xC+1][yC+1]>baseLevel1:0)
}
if(yC<(1<<log2TbHeight)-1){
locSumAbs+=(AbsLevel[xC][yC+1]>baseLevel1:0)
if(yC<(1<<log2TbHeight)-2)
locSumAbs+=(AbsLevel[xC][yC+2]>baseLevel1:0)
}
Figure BDA0002856415830000421
given the variable locSumAbs, the Rice parameter cRiceParam is derived as follows:
cRiceParam=locSumAbs
in the derivation process, initializing locSumABs, searching for adjacent positions, judging whether the absolute level grade of a residual coefficient of the adjacent positions is greater than baseLevel or not every time one adjacent position is searched, if so, adding 1 to the locSumABs, otherwise, keeping the value of the locSumABs unchanged, obtaining final locSumABs after the position of the adjacent position is searched, and directly taking the locSumABs as the cRiceParam.
In another example, neighboring positions of residual coefficients having an AbsLevel greater than a baseLevel are determined, and the baselevels of the residual coefficients are subtracted from the abslevels of the residual coefficients of the determined neighboring positions and summed to determine a level parameter locSumAbs. The following example gives a specific procedure for deriving the rice parameter:
locSumAbs=0
if(xC<(1<<log2TbWidth)-1){
locSumAbs+=Max(0,AbsLevel[xC+1][yC]-baseLevel)
if(xC<(1<<log2TbWidth)-2)
locSumAbs+=Max(0,AbsLevel[xC+2][yC]-baseLevel)
if(yC<(1<<log2TbHeight)-1)
locSumAbs+=Max(0,AbsLevel[xC+1][yC+1]-baseLevel)
}
if(yC<(1<<log2TbHeight)-1){
locSumAbs+=Max(0,AbsLevel[xC][yC+1]-baseLevel)
if(yC<(1<<log2TbHeight)-2)
locSumAbs+=Max(0,AbsLevel[xC][yC+2]-baseLevel)
}
locSumAbs=
Figure BDA0002856415830000431
Min(
Figure BDA0002856415830000432
31,locSumAbs
Figure BDA0002856415830000433
)
specific in error! No reference source is found. .
In the derivation process, initializing locSumABs, searching adjacent positions, subtracting baseLevel from absolute level of residual coefficient of the adjacent positions every time one adjacent position is searched, judging whether the difference value is greater than 0, if so, adding the difference value to the locSumABs for updating, otherwise, keeping the value of the locSumABs unchanged, obtaining final locSumABs after the adjacent position is searched, limiting the maximum value to 31, and then obtaining the corresponding rice parameter by using table lookup operation.
In another example, the AbsLevel of the residual coefficients of the found neighboring positions is subtracted by the baseLevel of the residual coefficients and summed to determine the level parameter locSumAbs. The following example gives a specific procedure for deriving the rice parameter:
locSumAbs=0
if(xC<(1<<log2TbWidth)-1){
locSumAbs+=AbsLevel[xC+1][yC]–baseLevel
if(xC<(1<<log2TbWidth)-2)
locSumAbs+=AbsLevel[xC+2][yC]–baseLevel
if(yC<(1<<log2TbHeight)-1)
locSumAbs+=AbsLevel[xC+1][yC+1]–baseLevel
}
if(yC<(1<<log2TbHeight)-1){
locSumAbs+=AbsLevel[xC][yC+1]–baseLevel
if(yC<(1<<log2TbHeight)-2)
locSumAbs+=AbsLevel[xC][yC+2]–baseLevel
}
locSumAbs=Clip3(0,31,locSumAbs
Figure BDA0002856415830000441
)
specific in error! No reference source is found. .
In the derivation process, the locSumAbs are initialized, then the adjacent positions are searched, every time one adjacent position is searched, the baseLevel is subtracted from the absolute level of the residual coefficient of the adjacent position, the locSumAbs are updated by adding the difference, after the position of the adjacent position is searched, the final locSumAbs are obtained, the maximum value of the locSumAbs is limited to 31, the minimum value of the locSumAbs is limited to 0, and then the table lookup operation is utilized to obtain the corresponding rice parameter.
Example 3
The residual coefficient has a residual coefficient absolute level AbsLevel, the AbsLevel of the residual coefficient at the initial time is the value of the quantized residual coefficient, in the encoding process, when the residual coefficient meets the level mapping condition, a mapping position is deduced according to a deduction method according to a set level mapping scheme according to the absolute level AbsLevel of the residual coefficient, and the mapping function is used for carrying out level mapping on the residual coefficient based on the deduced mapping position to obtain the AbsLevel after the level mapping.
According to the related art, when the baseLevel of the residual coefficient is equal to 0, the variable ZeroPos [ n ] for determining the mapping position is derived as follows:
ZeroPos[n]=(QState<21:2)<<cRiceParam
the above equation indicates whether the state parameter of the quantizer is less than 2, if less than 2, the 1 is left shifted by cRiceParam bits to obtain ZeroPos [ n ], otherwise, the 2 is left shifted by cRiceParam bits to obtain ZeroPos [ n ]. The prior art defines the quantization states of a plurality of state parameters, and after the ZeroPos [ n ] is obtained, the process of deriving the mapping position based on the ZeroPos [ n ] is the prior art and is not repeated here.
As a possible implementation manner, the embodiment of the present disclosure further changes a determination manner of ZeroPos [ n ], and specifically, when determining an absolute level after AbsLevel level mapping of the residual coefficient, may determine ZeroPos [ n ] in any one of the following manners:
1) for a decoding end, directly displacing a table lookup parameter rice to the left to obtain a mapping position corresponding to the residual coefficient, and determining an AbsLevel before level mapping by using a mapping function according to the mapping position;
and for the encoding end, directly displacing the table lookup parameter rice to the left to obtain a mapping position corresponding to the residual coefficient, and determining the AbsLevel after level mapping by using a mapping function according to the mapping position.
This approach proposes to remove the QState operation from the derivation of ZeroPos [ n ], so that ZeroPos [ n ] is derived only from cRiceParam, in particular the following procedure:
when baseLevel is equal to 0, the variable ZeroPos [ n ] is derived as follows:
ZeroPos[n]=2
Figure BDA0002856415830000451
<<cRiceParam
the above-mentioned strikethrough indicates the removal of the QState operation.
It should be noted that the cRiceParam herein may be determined in the existing manner, or may be determined in the manner proposed in embodiment 1 or embodiment 2 of the present disclosure.
2) For a decoding end, determining a mapping position corresponding to the residual error coefficient according to locSumABs, determining an AbsLevel before level mapping by using a mapping function according to the mapping position, wherein the locSumABs are level parameters determined according to the AbsLevel of the residual error coefficient of the adjacent position;
and for the encoding end, determining a mapping position corresponding to the residual error coefficient according to locSumAbs, and determining the AbsLevel after level mapping by using a mapping function according to the mapping position.
The method proposes to derive ZeroPos [ n ] based on the value of locSumAbs, specifically as follows:
when baseLevel is equal to 0, the variable ZeroPos [ n ] is derived as follows:
ZeroPos[n]=locSumAbs
Figure BDA0002856415830000461
the above deletion indicates that the variant zeroPos [ n ] is no longer deduced using cRiceParam, and the value of locSumAbs is taken directly as zeroPos [ n ].
3) At a decoding end, determining a mapping position corresponding to a residual error coefficient according to the AbsLevel of the residual error coefficient at an adjacent position, and determining the AbsLevel before level mapping by using a mapping function according to the mapping position;
at a coding end, determining a mapping position corresponding to a residual error coefficient according to the AbsLevel of the residual error coefficient at an adjacent position, and determining the AbsLevel after level mapping by using a mapping function according to the mapping position.
The method proposes to derive ZeroPos [ n ] based on the values of abslevels of adjacent positions, wherein a possible implementation manner is to determine the maximum AbsLevel of residual coefficients of the adjacent positions, shift the maximum AbsLevel to the right by a preset bit, and then determine the shifted value as position data of a mapping position, specifically the following process: in one example, ZeroPos [ n ] is derived based on the maximum of AbsLevel [ xC +1] [ yC ] and AbsLevel [ xC ] [ yC +1 ].
locSumAbs=0
ZeroPos[n]=1
if(xC<(1<<log2TbWidth)-1){
locSumAbs+=AbsLevel[xC+1][yC]
ZeroPos[n]=Max(AbsLevel[xC+1][yC],ZeroPos[n])
if(xC<(1<<log2TbWidth)-2)
locSumAbs+=AbsLevel[xC+2][yC]
if(yC<(1<<log2TbHeight)-1)
locSumAbs+=AbsLevel[xC+1][yC+1](1494)
}
if(yC<(1<<log2TbHeight)-1){
locSumAbs+=AbsLevel[xC][yC+1]
ZeroPos[n]=Max(AbsLevel[xC][yC+1],ZeroPos[n])
if(yC<(1<<log2TbHeight)-2)
locSumAbs+=AbsLevel[xC][yC+2]
}
locSumAbs=Clip3(0,31,locSumAbs-baseLevel*5)
Given the variable locSumAbs, the Rice parameter cRiceParam was derived as shown in table 4.
When baseLevel is equal to 0, the variable ZeroPos [ n ] is derived as follows:
ZeroPos[n]=ZeroPos[n]*1.25+1
Figure BDA0002856415830000471
another possible implementation manner is to determine the maximum AbsLevel of the residual coefficients of adjacent positions, shift the maximum AbsLevel to the right by a preset bit, and then multiply the shifted value by the set coefficient plus a preset offset to obtain the position data of the mapping position. It is proposed to derive cRiceParam and ZeroPos [ n ] based on the maximum of all AbsLevel values for neighboring locations, in particular as follows:
locSumAbs=0
if(xC<(1<<log2TbWidth)-1){
locSumAbs=Max(AbsLevel[xC+1][yC],locSumAbs)
if(xC<(1<<log2TbWidth)-2)
locSumAbs=Max(AbsLevel[xC+2][yC],locSumAbs)
if(yC<(1<<log2TbHeight)-1)
locSumAbs=Max(AbsLevel[xC+1][yC+1],locSumAbs)(1494)
}
if(yC<(1<<log2TbHeight)-1){
locSumAbs=Max(AbsLevel[xC][yC+1],locSumAbs)
if(yC<(1<<log2TbHeight)-2)
locSumAbs=Max(AbsLevel[xC][yC+2],locSumAbs)
}
locSumAbs=
Figure BDA0002856415830000472
Max(0,
Figure BDA0002856415830000473
locSumAbs-baseLevel
Figure BDA0002856415830000474
)
given the variable locSumAbs, the Rice parameter cRiceParam is derived as follows:
cRiceParam=Min((locSumAbs>>2),3)
when baseLevel is equal to 0, the variable ZeroPos [ n ] is derived as follows:
ZeroPos[n]=locSumAbs
Figure BDA0002856415830000475
the method described in the above aspect is equally applicable to the derivation of the prediction residual coefficient predCoeff in residual coding for the transform skip mode. In one possible embodiment, the maximum value of the residual coefficients (absLeftCoeff, absarbovecoeff) of adjacent positions is taken, and a preset offset is added to obtain the predicted residual coefficients. The method comprises the following steps:
predCoeff=Max(absLeftCoeff,absAboveCoeff)+1
the addition of predCoeff plus 1 is added (underlined above) over the existing logical derivation process.
Example 4
Fig. 7 is a block diagram of an apparatus for encoding and decoding residual coefficients of video data according to an exemplary embodiment. Referring to fig. 7, the apparatus includes a code stream receiving unit 701, a multi-pass decoding unit 702, a code word determining unit 703, and a code value determining unit 704, where:
a code stream receiving unit configured to extract a code stream of a residual sub-block in a residual image from a received residual image code stream, wherein the residual sub-block comprises a plurality of residual coefficients;
the multi-round decoding unit is configured to perform multi-round decoding on the code stream of each residual error coefficient, and each round of decoding adopts the decoding mode of the round to decode the code stream of the corresponding syntax element;
a code word determining unit configured to determine a set of code words to be used for decoding when a first specified syntax element is decoded, or determine a set of code words to be used for decoding according to specified coding information corresponding to the residual image, wherein the first specified syntax element is a syntax element of a bypass coding mode independent of a probability model;
and the code value determining unit is configured to execute a second method to obtain a code value corresponding to the code stream of the first specified syntax element according to the code values corresponding to different code words in the group of code words.
When the residual coefficient is a regular transform coefficient, the first designated syntax element is a residual absolute value abs _ remaining or a level absolute value dec _ abs _ level which needs to be decoded in the second round of decoding;
when the residual coefficient is a skip transform coefficient, the first specified syntax element is a residual absolute value abs _ remaining that needs to be decoded in the third round of decoding;
when the residual coefficient is a residual coefficient in a palette mode, the first designated syntax element is a residual value palette _ escape _ val;
wherein, the abs _ remaining is a difference absolute value obtained by subtracting a set first basic level from a residual coefficient; the dec _ abs _ level is a difference absolute value obtained by subtracting a set second basic level from a residual coefficient; the palette _ escape _ val is a residual coefficient that is not mapped with an index value in the palette.
In a possible embodiment, the value of the first base level is 4, and the value of the second base level is 0; or
The first basic grade and the second basic grade have the same value, and the value is 0 or 4.
In one possible embodiment, the apparatus further comprises:
a first codeword selection unit configured to perform, for residual coefficients of a non-palette mode, selecting, from a plurality of sets of codeword relationships corresponding to predefined different lookup table parameters rice, a codeword corresponding to the rice as the specified set of codeword, or selecting codewords corresponding to a plurality of the rice as codewords corresponding to different specified coding information; or
A second codeword selection unit configured to perform, for residual coefficients of a non-palette mode, selecting a codeword corresponding to a rice from a plurality of sets of codeword relationships corresponding to predefined different lookup table parameters rice and adjusting the selected codeword to a preset length as the specified set of codewords, or selecting codewords corresponding to a plurality of rice and adjusting the selected codewords to preset lengths respectively as codewords corresponding to different specified coding information; or
A third code word selecting unit, configured to execute, for a residual coefficient of the non-palette mode, determining multiple sets of code words corresponding to the rice smaller than a preset threshold value from multiple sets of code word relationships corresponding to different predefined lookup table parameters rice, and selecting one code word corresponding to the rice as the specified set of code word, or selecting multiple code words corresponding to the rice as code words corresponding to different specified coding information;
a fourth codeword selection unit configured to perform selecting, for residual coefficients of the palette mode, a codeword corresponding to one Exp-Golomb parameter as the specified set of codewords from a plurality of sets of predefined codeword relationships corresponding to different Exp-Golomb parameters, or selecting codewords corresponding to a plurality of Exp-Golomb parameters as codewords corresponding to different specified coding information; or
A fourth codeword selection unit configured to perform, for the residual coefficients of the palette mode, selecting and adjusting a codeword corresponding to one Exp-Golomb parameter to a preset length as the specified set of codewords from a plurality of sets of codeword relationships corresponding to predefined different Exp-Golomb parameters, or selecting and adjusting codewords corresponding to a plurality of Exp-Golomb parameters to a preset length as codewords corresponding to different specified coding information;
the preset length is the length of the longest code word in the multiple code words, or the length obtained by subtracting a preset value from the length of the longest code word.
In one possible embodiment, the apparatus further comprises:
a probability model determining unit configured to determine that a designated one of the probability models is adopted for decoding when decoding to a second designated syntax element, wherein the second designated element is a syntax element of a context coding mode depending on the probability model;
the code value determining unit is further configured to decode the second specified syntax element by using the specified one probability model, so as to obtain a coded value corresponding to the binary code stream of the second specified syntax element.
In a possible embodiment, the residual coefficients comprise luminance residual coefficients and chrominance residual coefficients, and the codeword determination unit is specifically configured to perform:
assigning a different set of codewords to the luma residual coefficient and chroma residual coefficient; or
And respectively appointing a plurality of groups of code words corresponding to different appointed coding information for the brightness residual error coefficient and the chroma residual error coefficient, wherein the plurality of groups of code words corresponding to the brightness residual error coefficient are not completely the same as the plurality of groups of code words corresponding to the chroma residual error coefficient.
In a possible implementation, the specific coding information includes at least one of the following coding parameters:
a quantization parameter QP associated with a transform block TB or a coding block CB or a slice;
a prediction mode of the coding unit CU;
a fragment type, the fragment type comprising an I fragment, a P fragment, or a B fragment.
In one possible embodiment, the apparatus further comprises:
and the mapping relation establishing unit is configured to execute the establishment of the mapping relation between the coding parameters of different threshold value ranges in the specified coding information and different groups of code words.
In one possible embodiment, the apparatus further comprises:
a first notification receiving unit configured to perform receiving signaling sent by an encoding end by using different levels of bit streams, and determine encoding parameters and corresponding thresholds of the notified specified encoding information;
the different levels include a sequence level, a picture level, a slice level, a coding tree unit CTU level, or a coding unit CU level.
In one possible embodiment, the apparatus further comprises:
a second notification receiving unit configured to perform receiving signaling sent by the encoding end by using bit streams of different levels, and determine a notified table lookup parameter rice or an Exp-Golomb parameter;
the different levels include a sequence level, a picture level, a slice level, a coding tree unit CTU level, or a coding unit CU level.
In a possible embodiment, the bitstream at the sequence level is a bitstream of a sequence parameter set;
the bitstream at the picture level is a bitstream of a picture parameter set and/or a bitstream of a picture header;
the slice-level bitstream is a slice-header bitstream.
In one possible embodiment, the method further comprises:
a first level mapping unit configured to determine an absolute level of the residual coefficient before level mapping according to a first mapping level rule when determining that the residual coefficient is a regular transform coefficient after level mapping;
a second level mapping unit configured to determine an absolute level of the residual coefficient before level mapping according to a second mapping level rule when determining that the residual coefficient is a skip transform coefficient after level mapping;
the first mapping level rule or the second mapping level rule is used for deducing a mapping position according to a deduction method and carrying out level mapping on the residual error coefficient based on the deduced mapping position by utilizing a mapping function;
the first mapping level rule and the second mapping level rule are the same, or the derivation methods of the mapping positions in the first mapping level rule and the second mapping level rule are the same, or the mapping functions in the first mapping level rule and the second mapping level rule are the same.
In a possible embodiment, the first mapping level rule or the second mapping level rule is configured to derive a mapping position according to a derivation method when the residual coefficient satisfies a set level mapping condition, and perform level mapping on the residual coefficient based on the derived mapping position by using a mapping function.
Fig. 8 is a block diagram of an apparatus for encoding and decoding residual coefficients of video data according to an exemplary embodiment. Referring to fig. 8, the apparatus includes a code stream receiving unit 801, a multi-pass decoding unit 802, a table lookup parameter determination unit 803, and a code value determination unit 804, in which:
a code stream receiving unit configured to extract a code stream of a residual sub-block in a residual image from a received residual image code stream, the residual sub-block including a plurality of residual coefficients;
the multi-round decoding unit is configured to perform multi-round decoding on the code stream of each residual error coefficient, wherein each round of decoding adopts the decoding mode of the round to decode the code stream of the corresponding syntax element;
the table lookup parameter determining unit is configured to obtain a table lookup parameter rice according to a second logic rule according to the absolute level AbsLevel of the residual coefficient of the adjacent position of the residual coefficient when the decoding is determined to reach the first designated syntax element;
a code value determining unit, configured to determine a group of code words corresponding to the calculated rice from a plurality of groups of code word relationships corresponding to different predefined rice, and obtain a code value corresponding to a code stream of the first specified syntax element according to a code value corresponding to a different code word in the group of code words;
the first designated syntax element is a syntax element of a bypass coding mode independent of a probability model, and the second logic rule is a rule obtained by changing a parameter used by the calculation of the rice and/or a logic calculation mode in the first logic rule.
In a possible embodiment, the table lookup parameter determining unit obtains the rice according to the AbsLevel of the residual coefficients at the adjacent positions of the residual coefficients according to a second logic rule, and includes any one of the following steps:
determining a level parameter locSumABs according to the AbsLevel of the residual error coefficient of the adjacent position, and obtaining rice by the determined locSumABs in a logic derivation mode, wherein n is a non-zero positive integer;
determining locSumABs according to the AbsLevel of residual error coefficients of N adjacent positions, and obtaining a table look-up parameter rice according to the determined locSumABs, wherein N is a positive integer less than 5;
summing the AbsLevel of the residual coefficients of the adjacent positions, subtracting m base Level, multiplying the obtained numerical value by a set coefficient alpha, then determining locSumABs after offsetting a set offset beta, and obtaining a table look-up parameter rice according to the determined locSumABs;
the baseLevel is the basic level of the residual error coefficient, and m is the number of the found adjacent positions.
In a possible embodiment, the table lookup parameter determining unit obtains a table lookup parameter rice according to a second logic rule and according to AbsLevel of a residual coefficient of a position adjacent to the residual coefficient, and includes:
summing the abslevels of the residual coefficients of the adjacent positions and subtracting m baselevels, wherein the baselevels are the basic levels of the residual coefficients, and m is the number of the searched adjacent positions;
using the obtained values as locSumAbs, or only limiting the minimum value of the obtained values to be a lower limit value to obtain the locSumAbs; or only the maximum of the values obtained is the upper limit value to locSumAbs.
In a possible embodiment, the table lookup parameter determining unit obtains a table lookup parameter rice according to a second logic rule and according to AbsLevel of a residual coefficient of a position adjacent to the residual coefficient, and includes:
the initial locSumABs are nonzero values, and the adjacent positions of residual error coefficients are searched;
when an adjacent position is found, adding the current locSumABs to the AbsLevel of the residual error coefficient of the adjacent position to obtain the updated current locSumABs;
when the searching of the adjacent positions is finished, subtracting m base levels from the current locSumABs to update the locSumABs, wherein m is the number of the searched adjacent positions;
and obtaining a table look-up parameter rice according to the current locSumAbs.
In a possible embodiment, the table lookup parameter determining unit obtains a table lookup parameter rice according to a second logic rule and according to AbsLevel of a residual coefficient of a position adjacent to the residual coefficient, and includes:
initializing locSumAds, and searching adjacent positions of residual error coefficients;
determining a grade parameter locSumABs according to the maximum absolute grade of the residual error coefficient in the searched adjacent positions;
and obtaining a table look-up parameter rice according to the determined locSumAbs.
In a possible embodiment, the table lookup parameter determining unit obtains the table lookup parameter rice according to the improved logic rule and the absolute level of the residual coefficient at the adjacent position of the residual coefficient, and includes:
initializing locSumAds, and searching the adjacent positions of residual error coefficients;
determining a level parameter locSumABs according to the relative amplitude of the AbsLevel of the residual error coefficient at the searched adjacent position relative to the base level baseLevel of the residual error coefficient;
and obtaining a table look-up parameter rice according to the determined locSumAbs.
In a possible implementation manner, the table lookup parameter determining unit determines the level parameter locSumAbs according to a relative amplitude of AbsLevel of the residual coefficient of the searched neighboring location with respect to a base level baseLevel of the residual coefficient, including:
subtracting the baseLevel of the residual coefficient from the Abslevel of the residual coefficient of the searched adjacent position, and summing to determine a level parameter locSumABs; or
Determining a level parameter locSumAbs according to the number of adjacent positions of the residual coefficient with the AbsLevel larger than the baseLevel; or
And determining adjacent positions of residual coefficients with the AbsLevel being larger than the baseLevel, subtracting the baseLevel of the residual coefficients from the AbsLevel of the residual coefficients of the determined adjacent positions, summing the AbsLevel and the baseLevel, and determining a level parameter locSumAbs.
In one possible embodiment, the apparatus further comprises:
the level mapping unit is configured to directly shift the table lookup parameter rice to the left when determining the absolute level after the AbsLevel level of the residual error coefficient is mapped, obtain a mapping position corresponding to the residual error coefficient, and determine the AbsLevel before level mapping by using a mapping function according to the mapping position; or
Determining a mapping position corresponding to the residual error coefficient according to locSumABs, and determining an AbsLevel before level mapping by using a mapping function according to the mapping position, wherein the locSumABs are level parameters determined according to the AbsLevel of the residual error coefficient of the adjacent position; or
Determining a mapping position corresponding to the residual error coefficient according to the AbsLevel of the residual error coefficient of the adjacent position, and determining the AbsLevel before level mapping by using a mapping function according to the mapping position; or alternatively.
In one possible implementation manner, the determining, by the level mapping unit, a mapping position corresponding to the residual coefficient according to the AbsLevel of the residual coefficient of the neighboring position includes:
determining the maximum AbsLevel of residual error coefficients of adjacent positions, shifting the maximum AbsLevel to the right by preset bit positions, and determining the shifted numerical value as position data of a mapping position;
and determining the maximum AbsLevel of the residual coefficients of the adjacent positions, shifting the maximum AbsLevel to the right by preset bit positions, multiplying the shifted value by the set coefficient and adding the preset offset to obtain the position data of the mapping position.
Fig. 9 is a block diagram of an apparatus for encoding and decoding residual coefficients of video data according to an exemplary embodiment. Referring to fig. 9, the apparatus includes a residual image determining unit 901, a multi-pass encoding unit 902, a codeword determining unit 903, and a code stream determining unit 904, wherein:
the residual image determining unit is configured to perform predictive coding on an image to be transmitted and obtain a residual image according to a difference value between the coded image and the image to be transmitted;
the multi-round coding unit is configured to perform division in a residual block on the residual image, perform multi-round coding on residual coefficients in the residual block, and obtain a code stream by coding syntax elements corresponding to each round in a coding mode of the round;
the code word determining unit is configured to determine that a set of code words are adopted for coding or determine a set of code words adopted for coding according to the specified coding information corresponding to the residual image when a first specified syntax element is coded, wherein the first specified syntax element is a syntax element of a bypass coding mode independent of a probability model;
and the code stream determining unit is configured to execute obtaining the code stream corresponding to the coding value of the first designated syntax element according to the coding values corresponding to different code words in the group of code words.
Fig. 10 is a block diagram of an apparatus for encoding and decoding residual coefficients of video data according to an exemplary embodiment. Referring to fig. 10, the apparatus includes a residual image determination unit 1001, a multi-pass encoding unit 1002, a table lookup parameter determination unit 1003, and a code stream determination unit 1004, in which:
the residual image determining unit is configured to perform predictive coding on an image to be transmitted and obtain a residual image according to a difference value between the coded image and the image to be transmitted;
the multi-round coding unit is used for dividing the residual image into residual blocks, carrying out multi-round coding on residual coefficients in the residual blocks, and coding syntax elements corresponding to each round by adopting a coding mode of the round in each round to obtain a code stream;
the table lookup parameter determination unit is configured to obtain a table lookup parameter rice according to a second logic rule and an absolute level AbsLevel of a residual coefficient of a position adjacent to the residual coefficient when the first specified syntax element is coded;
a code stream determining unit, configured to determine a group of code words corresponding to the calculated rice from a plurality of groups of code word relationships corresponding to different predefined rice, and obtain a code stream corresponding to the code value of the first designated syntax element according to the code values corresponding to different code words in the group of code words;
the first designated syntax element is a syntax element of a bypass coding mode independent of a probability model, and the second logic rule is a rule obtained by changing a parameter used by the calculation of the rice and/or a logic calculation mode in the first logic rule.
With regard to the apparatus in the above-described embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
Fig. 11 is a block diagram of an electronic device 130 according to an exemplary embodiment, and fig. 11 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 11, the electronic device 130 is represented in the form of a general electronic device. The components of the electronic device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 that connects the various system components (including the memory 132 and the processor 131). The memory stores the processor-executable instructions, and the processor is configured to execute the instructions to implement the method for coding and decoding residual parameters of video data provided by any of the above embodiments.
Bus 133 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The memory 132 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.
Memory 132 may also include a program/utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with the electronic device 130, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 130 to communicate with one or more other electronic devices. Such communication may occur via input/output (I/O) interfaces 135. Also, the electronic device 130 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 136. As shown, network adapter 136 communicates with other modules for electronic device 130 over bus 133. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, the aspects of a method for coding and decoding residual coefficients of video data provided by the present application may also be implemented in the form of a program product comprising program code means for causing a computer device to carry out the steps of a method for coding and decoding residual coefficients of video data according to various exemplary embodiments of the present application described above in this specification, when the program product is run on a computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for monitoring of the embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device and partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., through the internet using an internet service provider).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for coding and decoding residual coefficients of video data, comprising:
extracting a code stream of a residual sub-block in a residual image from a received residual image code stream, wherein the residual sub-block comprises a plurality of residual coefficients;
performing multi-round decoding on the code stream of each residual error coefficient, wherein each round of decoding mode is adopted to decode the code stream of the corresponding syntax element;
when a first appointed syntax element is decoded, determining that a group of appointed code words are adopted for decoding, or determining a group of code words which are adopted for decoding according to appointed coding information corresponding to the residual image, wherein the first appointed syntax element is a syntax element of a bypass coding mode which does not depend on a probability model;
and obtaining the coding value corresponding to the code stream of the first appointed syntax element according to the coding values corresponding to different code words in the group of code words.
2. The method of claim 1,
when the residual coefficient is a regular transform coefficient, the first designated syntax element is a residual absolute value abs _ remaining or a level absolute value dec _ abs _ level which needs to be decoded in the second round of decoding;
when the residual coefficient is a skip transform coefficient, the first specified syntax element is a residual absolute value abs _ remaining that needs to be decoded in the third round of decoding;
when the residual coefficient is a residual coefficient in a palette mode, the first designated syntax element is a residual value palette _ escape _ val;
wherein, the abs _ remaining is a difference absolute value obtained by subtracting a set first basic level from a residual coefficient; the dec _ abs _ level is a difference absolute value obtained by subtracting a set second basic level from a residual coefficient; the palette _ escape _ val is a residual coefficient that is not mapped with an index value in the palette.
3. The method of claim 1, further comprising:
for the residual error coefficient of the non-palette mode, selecting a code word corresponding to one edge as the specified group of code words from a plurality of groups of code word relations corresponding to predefined different table look-up parameters edge, or selecting a plurality of code words corresponding to the edge as code words corresponding to different specified coding information; or
For the residual error coefficient of the non-palette mode, selecting a code word corresponding to a rice from a plurality of groups of code word relations corresponding to predefined different table look-up parameters rice and adjusting the code word to be a preset length to be used as the appointed group of code words, or selecting a plurality of code words corresponding to the rice and respectively adjusting the code words to be the preset length to be used as the code words corresponding to different appointed coding information; or
For the residual error coefficient of the non-palette mode, determining multiple groups of code words corresponding to the rice which is smaller than a preset threshold value from the multiple groups of code word relations corresponding to different predefined lookup table parameters rice, and selecting one code word corresponding to the rice as the specified group of code words or selecting multiple code words corresponding to the rice as code words corresponding to different specified coding information;
for residual coefficients of the palette mode, selecting a codeword corresponding to one Exp-Golomb parameter as the specified group of codewords from a plurality of groups of codeword relations corresponding to different predefined Exp-Golomb parameters, or selecting codewords corresponding to a plurality of Exp-Golomb parameters as codewords corresponding to different specified coding information; or
For the residual error coefficient of the palette mode, selecting a code word corresponding to one Exp-Golomb parameter from a plurality of groups of code word relations corresponding to different predefined Exp-Golomb parameters and adjusting the code word to a preset length as the appointed group of code words, or selecting a plurality of code words corresponding to the Exp-Golomb parameters and adjusting the code words to the preset length as the code words corresponding to different appointed coding information;
the preset length is the length of the longest code word in the multiple code words, or the length obtained by subtracting a preset value from the length of the longest code word.
4. The method of claim 1, further comprising:
when a second specified syntax element is decoded, determining that a specified probability model is adopted for decoding, wherein the second specified element is a syntax element of a context coding mode depending on the probability model;
and decoding the second specified syntax element by using the specified probability model to obtain a coded value corresponding to the binary-valued code stream of the second specified syntax element.
5. The method of claim 1, wherein the residual coefficients comprise luma residual coefficients and chroma residual coefficients, wherein:
assigning a different set of codewords to the luma residual coefficient and chroma residual coefficient; or
And respectively appointing a plurality of groups of code words corresponding to different appointed coding information for the brightness residual error coefficient and the chroma residual error coefficient, wherein the plurality of groups of code words corresponding to the brightness residual error coefficient are not completely the same as the plurality of groups of code words corresponding to the chroma residual error coefficient.
6. A method for coding and decoding residual coefficients of video data, comprising:
extracting a code stream of a residual sub-block in a residual image from a received residual image code stream, wherein the residual sub-block comprises a plurality of residual coefficients;
performing multi-round decoding on the code stream of each residual error coefficient, wherein each round of decoding adopts the decoding mode of the round to decode the code stream of the corresponding syntax element;
when the first appointed syntax element is determined to be decoded, obtaining a table lookup parameter rice according to a second logic rule according to the absolute level AbsLevel of the residual coefficient at the adjacent position of the residual coefficient;
determining a group of code words corresponding to the calculated rice from a plurality of groups of code word relations corresponding to different predefined rice, and obtaining a coding value corresponding to a code stream of the first designated syntax element according to coding values corresponding to different code words in the group of code words;
the first designated syntax element is a syntax element of a bypass coding mode independent of a probability model, and the second logic rule is a rule obtained by changing a parameter used by the calculation of the rice and/or a logic calculation mode in the first logic rule.
7. A method for encoding and decoding residual parameters of video data, comprising:
carrying out predictive coding on an image to be transmitted, and obtaining a residual error image according to a difference value of the coded image and the image to be transmitted;
dividing the residual image into residual blocks, performing multi-round coding on residual coefficients in the residual blocks, and coding syntax elements corresponding to each round by adopting the coding mode of the round in each round to obtain code streams;
when a first appointed syntax element is coded, determining that a group of appointed code words are adopted for coding, or determining a group of code words adopted for coding according to appointed coding information corresponding to the residual error image, wherein the first appointed syntax element is a syntax element of a bypass coding mode independent of a probability model;
and obtaining a code stream corresponding to the code value of the first appointed syntax element according to the code values corresponding to different code words in the group of code words.
8. A method for encoding and decoding residual parameters of video data, comprising:
carrying out predictive coding on an image to be transmitted, and obtaining a residual error image according to a difference value of the coded image and the image to be transmitted;
dividing the residual image into residual blocks, performing multi-round coding on residual coefficients in the residual blocks, and coding syntax elements corresponding to each round by adopting the coding mode of the round in each round to obtain code streams;
when the first appointed syntax element is coded, obtaining a table look-up parameter rice according to a second logic rule according to the absolute level AbsLevel of the residual error coefficient at the adjacent position of the residual error coefficient;
determining a group of code words corresponding to the calculated rice from a plurality of groups of code word relations corresponding to different predefined rice, and obtaining a code stream corresponding to the code value of the first designated syntax element according to the code values corresponding to different code words in the group of code words;
the first designated syntax element is a syntax element of a bypass coding mode independent of a probability model, and the second logic rule is a rule obtained by changing a parameter used by the calculation of the rice and/or a logic calculation mode in the first logic rule.
9. An apparatus for coding and decoding residual coefficients of video data, comprising:
a code stream receiving unit configured to extract a code stream of a residual sub-block in a residual image from a received residual image code stream, wherein the residual sub-block comprises a plurality of residual coefficients;
the multi-round decoding unit is configured to perform multi-round decoding on the code stream of each residual error coefficient, and each round of decoding adopts the decoding mode of the round to decode the code stream of the corresponding syntax element;
a code word determining unit configured to determine a set of code words to be used for decoding when a first specified syntax element is decoded, or determine a set of code words to be used for decoding according to specified coding information corresponding to the residual image, wherein the first specified syntax element is a syntax element of a bypass coding mode independent of a probability model;
and the code value determining unit is configured to execute a second method to obtain a code value corresponding to the code stream of the first specified syntax element according to the code values corresponding to different code words in the group of code words.
10. An apparatus for coding and decoding residual coefficients of video data, comprising:
a code stream receiving unit configured to extract a code stream of a residual sub-block in a residual image from a received residual image code stream, the residual sub-block including a plurality of residual coefficients;
the multi-round decoding unit is configured to perform multi-round decoding on the code stream of each residual error coefficient, wherein each round of decoding adopts the decoding mode of the round to decode the code stream of the corresponding syntax element;
the table lookup parameter determining unit is configured to obtain a table lookup parameter rice according to a second logic rule according to the absolute level AbsLevel of the residual coefficient of the adjacent position of the residual coefficient when the decoding is determined to reach the first designated syntax element;
a code value determining unit, configured to determine a group of code words corresponding to the calculated rice from a plurality of groups of code word relationships corresponding to different predefined rice, and obtain a code value corresponding to a code stream of the first specified syntax element according to a code value corresponding to a different code word in the group of code words;
the first designated syntax element is a syntax element of a bypass coding mode independent of a probability model, and the second logic rule is a rule obtained by changing a parameter used by the calculation of the rice and/or a logic calculation mode in the first logic rule.
CN202011546358.6A 2019-12-27 2020-12-24 Method and device for encoding and decoding residual error coefficients of video data and electronic equipment Pending CN113225567A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201962954402P 2019-12-27 2019-12-27
US62/954,402 2019-12-27

Publications (1)

Publication Number Publication Date
CN113225567A true CN113225567A (en) 2021-08-06

Family

ID=77085888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011546358.6A Pending CN113225567A (en) 2019-12-27 2020-12-24 Method and device for encoding and decoding residual error coefficients of video data and electronic equipment

Country Status (1)

Country Link
CN (1) CN113225567A (en)

Similar Documents

Publication Publication Date Title
US11750841B2 (en) Methods and apparatuses for coding transform blocks
US9877029B2 (en) Palette index binarization for palette-based video coding
US9161046B2 (en) Determining quantization parameters for deblocking filtering for video coding
CN113382253B (en) Encoding and decoding method, device, equipment and storage medium
TWI624172B (en) Palette-based video coding
CN104054342B (en) Method and apparatus for high throughput coding of CABAC in HEVC
CN115361561B (en) Method and device for coding and decoding residual error and coefficient
TW201513639A (en) RICE parameter initialization for coefficient level coding in video coding process
JP2015508617A (en) Coding of coefficients in video coding
JP2015508953A (en) Residual quadtree (RQT) coding for video coding
CN111316642B (en) Method and apparatus for signaling image coding and decoding partition information
KR101975254B1 (en) Method and apparatus for parallel entropy encoding/decoding
CN113170137A (en) Residual coding to reduce use of local neighborhood
CN116095311A (en) Encoding and decoding method, device and equipment thereof
CN113225567A (en) Method and device for encoding and decoding residual error coefficients of video data and electronic equipment
WO2021130071A1 (en) Residual processing for video encoding and decoding
KR20210133978A (en) Flexible Allocation of Normal Bins in Residual Coding for Video Coding
CN117426090A (en) Video decoding and encoding method and device and storage medium
WO2021207035A1 (en) Methods and apparatus on transform and coefficient signaling
CN116965033A (en) Residual and coefficient coding for video coding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination