[go: up one dir, main page]

CN107277518A - CABAC coding/decoding methods - Google Patents

CABAC coding/decoding methods Download PDF

Info

Publication number
CN107277518A
CN107277518A CN201710550901.1A CN201710550901A CN107277518A CN 107277518 A CN107277518 A CN 107277518A CN 201710550901 A CN201710550901 A CN 201710550901A CN 107277518 A CN107277518 A CN 107277518A
Authority
CN
China
Prior art keywords
value
decoding
decoded
fiducial
sequence
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.)
Granted
Application number
CN201710550901.1A
Other languages
Chinese (zh)
Other versions
CN107277518B (en
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.)
Zhuhai Jieli Technology Co Ltd
Original Assignee
Zhuhai Jieli 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 Zhuhai Jieli Technology Co Ltd filed Critical Zhuhai Jieli Technology Co Ltd
Priority to CN201710550901.1A priority Critical patent/CN107277518B/en
Publication of CN107277518A publication Critical patent/CN107277518A/en
Application granted granted Critical
Publication of CN107277518B publication Critical patent/CN107277518B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The present invention relates to a kind of CABAC coding/decoding methods, including:Current sequence to be decoded is moved to left two in a decoding periods, the low two of the current sequence to be decoded that dibit is placed in after moving to left is read in from bit stream to be decoded, the first sequence to be decoded is obtained;First sequence to be decoded is compared with the first decoding interval value, the first fiducial value is obtained;First decoding interval value moves to left a corresponding value for current decoding interval value;First sequence to be decoded is compared with the second decoding interval value, the second fiducial value is obtained;Second decoding interval value is current decoding interval value and the first decoding interval value sum;The decoding return value of prefix part and the decoding return value of information suffix are determined according to first fiducial value and the second fiducial value, bit stream to be decoded is decoded according to the decoding return value of the decoding return value of the prefix part and information suffix.

Description

CABAC coding/decoding methods
Technical field
The present invention relates to video coding and decoding technology field, more particularly to a kind of CABAC coding/decoding methods.
Background technology
H.264 it is that the video encoding standard formulated is combined by ISO/IEC and ITU-T Liang great International Standards Organization.With it is conventional Video standard compare, it have higher compression ratio, more preferable network compatibility and channel adaptability, while having stronger Anti- error code capacity, disclosure satisfy that business demand widely.CABAC(Context-based Adaptive Binary Arithmetic Coding) it is a kind of adaptive binary arithmetic coding based on context, it is the entropy that H.264 standard is proposed One of coding mode.CABAC can take into full account and using the contextual information of video flowing, and be capable of adaptive video stream Statistical property, therefore, it is possible to bring high video compress ratio.
CABAC is decoded to some syntactic elements, and when particularly being decoded to Exp- Golomb, side need to be typically called repeatedly Road decoding functions, and 1 bit can only once be decoded by bypassing decoding, and the decoding of last bits will be relied on after current bit decoding more New information, this will reduce the flowing water efficiency of hardware CABAC decodings.Particularly between big resolution video frame and frame when Between correlation it is poor when, the negative effect that above mentioned problem is brought is more obvious.
In summary, the decoding process decoding efficiency that tradition is encoded to CABAC is relatively low.
The content of the invention
Based on this, it is necessary to for decoding efficiency it is relatively low the problem of there is provided a kind of CABAC coding/decoding methods.
A kind of CABAC coding/decoding methods, comprise the following steps:
Current sequence to be decoded is moved to left two in a decoding periods, and dibit is read in from bit stream to be decoded The current sequence to be decoded being placed in after moving to left it is low two, obtain the first sequence to be decoded;
First sequence to be decoded is compared with the first decoding interval value, according to the first sequence to be decoded and the first decoding The fiducial value of acquiring size first of interval value;Wherein, the first decoding interval value for current decoding interval value move to left one it is corresponding Value;
First sequence to be decoded is compared with the second decoding interval value, it is to be decoded according to the first fiducial value and first Sequence and the fiducial value of acquiring size second of the second decoding interval value;Wherein, the second decoding interval value is current decoding interval value With the first decoding interval value sum;
The decoding return value of prefix part and the solution of information suffix are determined according to first fiducial value and the second fiducial value Code return value, is carried out according to the decoding return value of the prefix part and the decoding return value of information suffix to bit stream to be decoded Decoding.
Above-mentioned CABAC coding/decoding methods, once read in dibit data to be decoded, and to dibit data to be decoded Parallel decoding is carried out, decoding efficiency is improved.Especially, in above-mentioned decoding process the first fiducial value and the second fiducial value output It can be learnt, so hardware is during to dibit parallel decoding, quickly decoding sequence can be carried out more with look-ahead Newly, so that subsequent bits decoding is used, it is to avoid the dependence decoded in original bypass decoding scheme between bit, further increase The flowing water efficiency of decoding.
Brief description of the drawings
Fig. 1 is the decoding process figure of the CABAC of one embodiment ue parts;
Fig. 2 is the CABAC of one embodiment bypass decoding process figure;
Fig. 3 bypasses decoding process figure for the CABAC of one embodiment many bin;
Fig. 4 is the CABAC of one embodiment many bin decoding processes figures in ue parts;
Fig. 5 bypasses decoded output result figure for the ue prefix parts of one embodiment by once many bin;
Fig. 6 bypasses decoded output result figure for the ue information suffix of one embodiment by once many bin;
Fig. 7 solves the module map of code system for the CABAC of one embodiment.
Embodiment
Technical scheme is illustrated below in conjunction with the accompanying drawings.
CABAC entirely encodes flow and mainly includes following steps:The binarization of syntactic element, context probability mould The selection and renewal of type, binary arithmetic coding.Wherein binary arithmetic coding includes two kinds of sides of conventional coding and bypass coding Formula.Bypass code branch, the suitable bit position of " 0 " and " 1 " probability in bit stream mainly after syntactic element binaryzation, coding During the probability of " 0 " and " 1 " be fixed as 1/2, arithmetic coding is carried out with the distribution of this fixation probability.To the binary system of syntactic element Change, be the important prerequisite of CABAC codings.Every kind of syntactic element selects binarization method according to respective probability density characteristicses. Exp-Golomb coding (Exp-Golomb) is a kind of mode of syntactic element binarization.Exp-Golomb is divided into no symbol again Exp-Golomb coding ue (v), there is symbol index Columbus to encode se (v), block exp-Golomb coding te (v) and mapping refers to Number Columbus coding me (v).Any syntax element value x will first be converted into code index value before Columbus's coding is carried out CodeNum:
ue(v):Conversion formula from syntax element value x to CodeNum is:CodeNum=x;
se(v):Conversion formula from syntax element value x to CodeNum is:CodeNum=2x -1 (x>0), CodeNum =-2x (x≤0);
te(v):Transformation rule from syntax element value x to CodeNum is:The digit scope v of x values is first determined whether, if v More than 1, then x to CodeNum transfer process and ue (v) are identical;If v is equal to 1, x and is equal to 0 or 1, now CodeNum and x The identical but final encoded radio of value be CodeNum values of the inverted;
me(v):Conversion from syntax element value x to CodeNum is using H.264 defined mapping mode.
The formula of K rank exp-Golomb codings is as follows:M=floor (log2 (CodeNum+2k)), INFO=CodeNum+ 2k-2M.The structure of k rank Exp- Golombs can be expressed as [M-K 0] [1] [M INFO], i.e., the prefix part of code word is by M-K Position 0 is constituted, and information suffix is made up of the information (INFO) of M, and center section is the 1 of 1 bit.When practice, k ranks The structure type of Exp- Golomb can also be that [M-K 1] [0] [M INFO], i.e. prefix of code word part are M-K positions 1, information Suffix is the INFO of M, and interposition is 0.In one embodiment, for convenience of description, below in a second form exemplified by Technical scheme is illustrated, but those skilled in the art are it is recognised that in actual applications, the invention is not restricted to This form, it would however also be possible to employ the first form.
Syntactic element mvd (motion vector residual error) absolute value is more than 9 part in CABAC codings, and its binarization is adopted Encoded with 3 rank ue;Syntactic element coeff_abs_level_minus1 (residual absolute value subtracts 1 value) is more than 14 portion Point, its binarization employs 0 rank ue codings.The present invention is with syntactic element coeff_abs_level_minus1 ue parts Exemplified by decoding, a kind of many bin coding/decoding methods of CABAC for ue are proposed.
When CABAC is decoded to k ranks ue, the position where first zero bit is found first from bit stream, and will The number of bits that the prefix part found connects " 1 " is designated as leadingBits, then:CodeNum=2leadingBits+k-2k+ Value, wherein value are the value of (leadingBits+k) individual bit after first zero bit.According to ue coding rule, then Corresponding syntax element value is mapped as by CodeNum is counter.
The decoding process of syntactic element coeff_abs_level_minus1 ue parts is as shown in figure 1, be divided into three ranks Section, the first stage is the number cnt for asking for prefix bits " 1 ", and second stage decodes ue information suffix value level_ according to cnt Minus1, the phase III determines the residual values level of decoding according to level_minus1.Wherein, the first two stage all passes through CABAC bypass decoding functions decode_bypass () is called to realize repeatedly.Bypass decoding flow as shown in Fig. 2 Its method is the magnitude relationship according to CodIOffset (current sequence to be decoded) and CodIRange (decoding interval value), it is determined that The subinterval that CodIOffset value is fallen into, and then export the binary character of " 0 " and " 1 ".The subinterval fallen into is just used as down Probability interval used in one-step decoding process, if CodIOffset value falls in maximum probability symbol (More probable Symbol, MPS) coding it is interval, then CodIOffset value is constant;If CodIOffset value falls in small probability symbol The coding of (Less probable symbol, LPS) is interval, then CodIOffset will subtract the interval length of MPS codings. CodIOffset value often decodes a bit it is necessary to be updated to CodIOffset from the bit stream of coding generation, side Method is that CodIOffset moves to left 1 (removal highest order), and 1 bit is then read from data to decode by read_bit (1) It is used as the lowest order of CodIOffset binary forms.
By analysis above, it can be seen that CABAC has problems with to the k ranks ue flows decoded:First stage obtains The process that the number cnt and second stage of prefix bits " 1 " ask for information suffix level_minus1 is all by calling repeatedly Decoding functions decode_bypass () is bypassed to realize, and 1 bit can only once be decoded by bypassing to decode, and last bits Decoding will rely on the information CodIOffset updated after current bit decoding, and this will reduce the flowing water effect of hardware CABAC decodings Rate.Especially, when the temporal correlation between big resolution video frame and frame is poor, the negative effect that above mentioned problem is brought It can increase therewith.
In order to overcome the defect and deficiency that prior art is present.It is an object of the invention to provide a kind of CABAC coding/decoding methods, Specifically, it is a kind of many bin coding/decoding methods of index Columbus (Exp-Golomb) for H.264 middle CABAC, to avoid ratio The problem of flowing water efficiency that the dependence decoded between spy is brought is low, including many bin of ue prefix parts decode many with information suffix Bin is decoded.Many bin of the present invention decode relied on bypass decoding, and dibit is decoded every time.
Elaboration behind for convenience, the implication of the several variables used in this illustratively decoding process, a_eat: During to the first bit of flag decoding, if needs a new byte data is re-read in bit stream to be decoded, it is necessary to when a_ Eat=1, otherwise a_eat=0.Here illustratively, before bypass decoding, a byte data is read from bit stream to be decoded first C_data, as soon as then often decoding bit, reads the low level that a bit is placed in CodIOffset, when the one of c_data from c_data Byte decoding invests c_data after finishing it is necessary to read a new byte data from bit stream to be decoded;b_eat:To indicate When decoding the second bit, if need to re-read a new byte data inside the bit stream to be decoded, it is necessary to when b_eat=1, Otherwise b_eat=0;a_flag:That is the first fiducial value, represents CodIOffset1 and (CodIRange<<1) ratio of magnitude relationship Relatively result;b_flag:That is the second fiducial value, represents CodIOffset1 and ((CodIRange<<1)+CodIRange) size pass The comparative result of system.CodIRange<<1:I.e. first decoding interval value, represents that CodIRange moves to left a corresponding value, CodIRange represents currently to decode interval value;CodIOffset1:I.e. current sequence C odIOffset to be decoded moves to left two, and The sequence that low two of the current sequence to be decoded that reading dibit is placed in after moving to left from bit stream to be decoded obtain; (CodIRange<<1)+CodIRange, i.e., the second decoding interval value represents that first decodes interval value and current decoding interval value Sum;Cnt represents the bit number of prefix part;Level_minus1 represents to decode obtained information suffix value;Level represents solution Code residual values;Ret_pre is the decoding return value of prefix part;Ret_suf is the decoding return value of information suffix; CodIOffset2 is the updated value of current sequence to be decoded.Binval is the return value of CABAC bypass 1 bits of decoding.
The CABAC coding/decoding methods of the present invention may include following steps:
Step 1:Current sequence to be decoded is moved to left two in a decoding periods, and read in from bit stream to be decoded The current sequence to be decoded that dibit is placed in after moving to left it is low two, obtain the first sequence to be decoded;
In one embodiment, current sequence to be decoded is expressed as CodIOffset, the first sequence to be decoded is represented For CodIOffset1.Such as many bins bypass decoding process figures of the Fig. 3 for CABAC of the present invention.After bypass decoding starts, CodIOffset is continuously moved to left twice, by calling read_bit (1) twice, is read in dibit to be decoded, is placed in CodIOffset's is low two, obtains CodIOffset1, and respectively obtain a_eat and b_eat value.
Step 2:First sequence to be decoded is compared with the first decoding interval value, according to the first sequence to be decoded and the The fiducial value of acquiring size first of one decoding interval value;Wherein, the first decoding interval value moves to left one for current decoding interval value Corresponding value;
In one embodiment, current decoding interval value is expressed as CodIRange, the first decoding interval value is expressed as CodIRange1.In this step, CodIOffset1 and (CodIRange are compared<<1) magnitude relationship, specifically, if CodIOffset1≥(CodIRange<<1), a_flag=1;Otherwise, a_flag=0.
Step 3:First sequence to be decoded is compared with the second decoding interval value, according to the first fiducial value and first Sequence to be decoded and the fiducial value of acquiring size second of the second decoding interval value;Wherein, the second decoding interval value is current decoding Interval value and the first decoding interval value sum;
In this step, according to a_flag value condition, further to CodIOffset1 and CodIRange relation Make comparisons.Specifically, in the case of a_flag=1, CodIOffset1 and ((CodIRange are compared<<1)+CodIRange) Magnitude relationship, if CodIOffset1 >=((CodIRange<<1)+CodIRange), b_flag=1;Otherwise b_flag= 0.In the case of a_flag=0, compare CodIOffset1 and CodIRange magnitude relationship, if CodIOffset1 >= CodIRange, b_flag=1;Otherwise b_flag=0.
Step 4:After decoding return value and information that prefix part is determined according to first fiducial value and the second fiducial value The decoding return value sewed, according to the decoding return value of the prefix part and the decoding return value of information suffix to position to be decoded Stream is decoded.
In this step, according to a_eat, b_eat, a_flag, b_flag value condition determine dibit bypass decoding The decoding return value ret_suf of decoding return value ret_pre and ue the information suffix of ue prefix parts afterwards.Then according to prefix portion The decoding return value ret_pre and the decoding return value ret_suf of information suffix divided is decoded to bit stream to be decoded.Specifically Ground, the bit number cnt of prefix part is determined according to return value ret_pre;Wherein, after the bit number and information of the prefix part The bit number sewed is equal;Information suffix value is obtained according to cnt and return value ret_suf decodings;After the information obtained according to decoding Sew value and calculate decoded residual value;Bit stream to be decoded is decoded according to the decoded residual value.
In one embodiment, if being currently at the CABAC decodings of ue prefix parts, dibit bypasses decoded solution Code return value ret_pre is defined below:If a_flag=1 and b_flag=1, decoding return value ret_pre is 2;If A_flag=1 and b_flag=0, then it is 1 to decode return value ret_pre, and now ue prefix parts decoding terminates;If a_flag =0, no matter b_flag value is how many, and decoding return value ret_pre is 0.In this case, a_flag=0 means first After the completion of bit decoding, the decoding of ue prefix parts is actual to be over, and the second bit belongs to a bit of extra many decodings, Therefore the second bit decoded more is reduced according to a_eat and b_eat value condition.Further, will be other every time The decoded return value ret_pre in road is added up, and obtains the number cnt that no symbol Columbus code prefix part connects " 1 ".Due to The bit number of the prefix part of Columbus's code is identical with the bit number of information suffix, therefore, it can obtain the bit of information suffix Number cnt.
In one embodiment, if being currently at the CABAC decodings of ue information suffix, the decoding of dibit bypass decoding Return value ret_suf is defined below:If a_flag=1 and b_flag=1, decoding return value ret_suf is 3;If a_ Flag=1 and b_flag=0, then it is 2 to decode return value ret_suf;If a_flag=0 and b_flag=1, decoding is returned Value ret_suf is 1;If a_flag=0 and b_flag=0, decoding return value ret_suf is 0.Further, often call Once bypass decoding, cnt value subtracts 2, until cnt is equal to 0, the decoding of information suffix is finished, by the return value of each bypass decoding Ret_suf does cumulative, obtains level_minus1.
Especially, when being decoded to ue information suffix, there are following several considerations:(1) when ue prefix parts are decoded When the cnt arrived is even number, directly tired out according to the decoding rule of above- mentioned information suffix to decoding return value ret_suf each time Plus, using accumulated result as level_minus1 value;(2) when ue prefix parts decode obtained cnt=0, after information Sew without carrying out bypass decoding again, directly obtain level_minus1=0;(3) when the cnt that the decoding of ue prefix parts is obtained is strange During number, because cnt often will subtract 2 by once bypass decoding, so the mark that iterative decoding is finished, which is cnt values, is decremented to -1. But when cnt values are equal to 0, the decoding of information suffix is actual to be over.Now, be according to a_eat and b_eat value to many solutions One bit of code is reduced, and the return value ret_suf decoded each time then is done into cumulative, level_minus1 is obtained.
Finally, the level_minus1 obtained after being decoded to information suffix is performed:Level_minus1+1+14, can obtain Decoded residual value level absolute value, i.e., | level |=level_minus1+1+14.
Above-mentioned CABAC coding/decoding methods, CodIOffset moves to left two first in a decoding periods, and to be decoded Dibit is read in bit stream and is placed in the low two of CodIOffset, CodIOffset1 is obtained.Then judge respectively CodIOffset1 and (CodIRange<<1) magnitude relationship A, CodIOffset1 and ((CodIRange<<1)+ CodIRange magnitude relationship B).It is according to the relation A and relation B various combination after determination, and according to residing for ue decodings Prefix part stage or information suffix stage, many bin bypasses decoding return values are obtained, are returned further according to many bin bypass decodings It is worth to the decoded syntax element values of CABAC.
The beneficial effects of the invention are as follows:Carried out in the ue parts to syntactic element coeff_abs_level_minus1 When CABAC is decoded, ue is decoded to relied on bypass decoded portion, dibit is once read in, and dibit is solved parallel Code, improves the flowing water efficiency of hardware.
Further, can also according to the relation A and relation B various combination after determination, to update CodIOffset values, So that subsequent bits decoding is used.Especially, because the combined situation of relation A and relation B in above-mentioned decoding process can shift to an earlier date Prediction is learnt, so hardware is during to dibit parallel decoding, value that can be quickly to CodIOffset is updated, So that subsequent bits decoding is used, it is to avoid the dependence decoded in original bypass decoding scheme between bit, ue is further increased The flowing water efficiency of decoding.
Wherein, if be currently at ue prefix parts CABAC decoding, dibit bypass decoding after CodIOffset more New value is defined below:If a_flag=1 and b_flag=1, CodIOffset2=CodIOffset1- (CodIRange<< 1)-CodIRange;If a_flag=1 and b_flag=0, CodIOffset2=CodIOffset1- (CodIRange<< 1), now ue prefix parts decoding terminates;If a_flag=0, no matter b_flag value is how many, CodIOffset2= CodIOffset1>>1.In this case, after the completion of a_flag=0 means that the first bit is decoded, the decoding of ue prefix parts Actually it is over, and the second bit belongs to a bits of much more extra decoding, therefore will be according to a_eat and b_eat value feelings Condition is reduced to the second bit decoded more.
Wherein, if being currently at the CABAC decodings of ue information suffix, dibit bypass decoding CodIOffset renewal Value is defined below:If a_flag=1 and b_flag=1, CodIOffset2=CodIOffset1- (CodIRange<< 1)-CodIRange;If a_flag=1 and b_flag=0, CodIOffset2=CodIOffset1- (CodIRange<< 1);If a_flag=0 and b_flag=1, CodIOffset2=CodIOffset1-CodIRange;If a_flag= 0 and b_flag=0, CodIOffset1 is moved to left two corresponding sequences as CodIOffset updated value.
Many bin such as Fig. 4 for the present invention on syntactic element coeff_abs_level_minus1 CABAC ue parts Decoding process figure.The value condition in stage and a_eat, b_eat, a_flag, b_flag according to residing for being decoded ue, determines two CodIOffset updated value, the decoding return value ret_pre of prefix part after bit bypass decoding, and information suffix solution Code return value ret_suf, then obtains decoded syntax element value by subsequent treatment.Especially, it should be noted that, a_ The situation of flag and b_flag output combinations can be predicted before bypass decoding to be learnt, so hardware is when design, Updated value of the CodIOffset under various combination can be calculated in advance according to a_flag and b_flag various combination, this Sample is when many bin decodings are actually carried out advantageously in the flowing water of hardware.
Ue prefix parts bypass decoded output result figure and ue information suffix by once many by once many bin Bin bypasses decoded output result figure respectively as shown in Figure 5 and Figure 6.Above-mentioned CABAC coding/decoding methods, once read in dibit Data to be decoded, and parallel decoding is carried out to dibit data to be decoded, improve decoding efficiency.
As shown in fig. 7, the present invention also provides a kind of CABAC solutions code system, it may include:
Displacement module 10, for current sequence to be decoded to be moved to left into two in a decoding periods, and to be decoded The low two of the current sequence to be decoded that dibit is placed in after moving to left is read in bit stream, the first sequence to be decoded is obtained;
In one embodiment, current sequence to be decoded is expressed as CodIOffset, the first sequence to be decoded is represented For CodIOffset1.Such as many bins bypass decoding process figures of the Fig. 3 for CABAC of the present invention.After bypass decoding starts, CodIOffset is continuously moved to left twice, by calling read_bit (1) twice, is read in dibit to be decoded, is placed in CodIOffset's is low two, obtains CodIOffset1, and respectively obtain a_eat and b_eat value.
First comparison module 20, for the first sequence to be decoded to be compared with the first decoding interval value, according to first Sequence to be decoded and the fiducial value of acquiring size first of the first decoding interval value;Wherein, the first decoding interval value is current decoding Interval value moves to left a corresponding value;
In one embodiment, current decoding interval value is expressed as CodIRange, the first decoding interval value is expressed as CodIRange1.In this step, CodIOffset1 and (CodIRange are compared<<1) magnitude relationship, specifically, if CodIOffset1≥(CodIRange<<1), a_flag=1;Otherwise, a_flag=0.
Second comparison module 30, for the first sequence to be decoded to be compared with the second decoding interval value, according to first Fiducial value and the first sequence to be decoded and the fiducial value of acquiring size second of the second decoding interval value;Wherein, the second area decoder Between value decode interval value sum with first for current decoding interval value;
In this module, according to a_flag value condition, further to CodIOffset1 and CodIRange relation Make comparisons.Specifically, in the case of a_flag=1, CodIOffset1 and ((CodIRange are compared<<1)+CodIRange) Magnitude relationship, if CodIOffset1 >=((CodIRange<<1)+CodIRange), b_flag=1;Otherwise b_flag= 0.In the case of a_flag=0, compare CodIOffset1 and CodIRange magnitude relationship, if CodIOffset1 >= CodIRange, b_flag=1;Otherwise b_flag=0.
Decoder module 40, the decoding return value for determining prefix part according to first fiducial value and the second fiducial value With the decoding return value of information suffix, treated according to the decoding return value of the decoding return value of the prefix part and information suffix The bit stream of decoding is decoded.
In this module, according to a_eat, b_eat, a_flag, b_flag value condition determines dibit bypass decoding The decoding return value ret_suf of decoding return value ret_pre and ue the information suffix of ue prefix parts afterwards.Then according to prefix portion The decoding return value ret_pre and the decoding return value ret_suf of information suffix divided is decoded to bit stream to be decoded.Specifically Ground, the bit number cnt of prefix part is determined according to return value ret_pre;Wherein, after the bit number and information of the prefix part The bit number sewed is equal;Information suffix value is obtained according to cnt and return value ret_suf decodings;After the information obtained according to decoding Sew value and calculate decoded residual value;Bit stream to be decoded is decoded according to the decoded residual value.
In one embodiment, if being currently at the CABAC decodings of ue prefix parts, dibit bypasses decoded solution Code return value ret_pre is defined below:If a_flag=1 and b_flag=1, decoding return value ret_pre is 2;If A_flag=1 and b_flag=0, then it is 1 to decode return value ret_pre, and now ue prefix parts decoding terminates;If a_flag =0, no matter b_flag value is how many, and decoding return value ret_pre is 0.In this case, a_flag=0 means first After the completion of bit decoding, the decoding of ue prefix parts is actual to be over, and the second bit belongs to a bit of extra many decodings, Therefore the second bit decoded more is reduced according to a_eat and b_eat value condition.Further, will be other every time The decoded return value ret_pre in road is added up, and obtains the number cnt that no symbol Columbus code prefix part connects " 1 ".Due to The bit number of the prefix part of Columbus's code is identical with the bit number of information suffix, therefore, it can obtain the bit of information suffix Number cnt, then proceedes to decode cnt bit.
Wherein, if being currently at the CABAC decodings of ue information suffix, the decoding return value ret_ of dibit bypass decoding Suf is defined below:If a_flag=1 and b_flag=1, decoding return value ret_suf is 3;If a_flag=1 and b_ Flag=0, then it is 2 to decode return value ret_suf;If a_flag=0 and b_flag=1, decoding return value ret_suf is 1;If a_flag=0 and b_flag=0, decoding return value ret_suf is 0.Further, once bypass solution is often called Code, cnt value subtracts 2, until cnt is equal to 0, the decoding of information suffix is finished, and the return value ret_suf of each bypass decoding is done into tired Plus, obtain level_minus1.
Especially, when being decoded to ue information suffix, there are following several considerations:(1) when ue prefix parts are decoded When the cnt arrived is even number, directly tired out according to the decoding rule of above- mentioned information suffix to decoding return value ret_suf each time Plus, using accumulated result as level_minus1 value;(2) when ue prefix parts decode obtained cnt=0, after information Sew without carrying out bypass decoding again, directly obtain level_minus1=0;(3) when the cnt that the decoding of ue prefix parts is obtained is strange During number, because cnt often will subtract 2 by once bypass decoding, so the mark that iterative decoding is finished, which is cnt values, is decremented to -1. But when cnt values are equal to 0, the decoding of information suffix is actual to be over.Now, be according to a_eat and b_eat value to many solutions One bit of code is reduced, and the return value ret_suf decoded each time then is done into cumulative, level_minus1 is obtained.
Finally, the level_minus1 obtained after being decoded to information suffix is performed:Level_minus1+1+14, can obtain Decoded residual value level absolute value, i.e., | level |=level_minus1+1+14.
Above-mentioned CABAC solves code system, and CodIOffset moves to left two first in a decoding periods, and to be decoded Dibit is read in bit stream and is placed in the low two of CodIOffset, CodIOffset1 is obtained.Then judge respectively CodIOffset1 and (CodIRange<<1) magnitude relationship A, CodIOffset1 and ((CodIRange<<1)+ CodIRange magnitude relationship B).It is according to the relation A and relation B various combination after determination, and according to residing for ue decodings Prefix part stage or information suffix stage, many bin bypasses decoding return values are obtained, are returned further according to many bin bypass decodings It is worth to the decoded syntax element values of CABAC.
The beneficial effects of the invention are as follows:Carried out in the ue parts to syntactic element coeff_abs_level_minus1 When CABAC is decoded, ue is decoded to relied on bypass decoded portion, dibit is once read in, and dibit is solved parallel Code, improves the flowing water efficiency of hardware.
Further, can also according to the relation A and relation B various combination after determination, to update CodIOffset values, So that subsequent bits decoding is used.Especially, because the combined situation of relation A and relation B in above-mentioned decoding process can shift to an earlier date Prediction is learnt, so hardware is during to dibit parallel decoding, value that can be quickly to CodIOffset is updated, So that subsequent bits decoding is used, it is to avoid the dependence decoded in original bypass decoding scheme between bit, ue is further increased The flowing water efficiency of decoding.
Wherein, if be currently at ue prefix parts CABAC decoding, dibit bypass decoding after CodIOffset more New value is defined below:If a_flag=1 and b_flag=1, CodIOffset2=CodIOffset1- (CodIRange<< 1)-CodIRange;If a_flag=1 and b_flag=0, CodIOffset2=CodIOffset1- (CodIRange<< 1), now ue prefix parts decoding terminates;If a_flag=0, no matter b_flag value is how many, CodIOffset2= CodIOffset1>>1.In this case, after the completion of a_flag=0 means that the first bit is decoded, the decoding of ue prefix parts Actually it is over, and the second bit belongs to a bits of much more extra decoding, therefore will be according to a_eat and b_eat value feelings Condition is reduced to the second bit decoded more.
Wherein, if being currently at the CABAC decodings of ue information suffix, dibit bypass decoding CodIOffset renewal Value is defined below:If a_flag=1 and b_flag=1, CodIOffset2=CodIOffset1- (CodIRange<< 1)-CodIRange;If a_flag=1 and b_flag=0, CodIOffset2=CodIOffset1- (CodIRange<< 1);If a_flag=0 and b_flag=1, CodIOffset2=CodIOffset1-CodIRange;If a_flag= 0 and b_flag=0, CodIOffset1 is moved to left two corresponding sequences as CodIOffset updated value.
Many bin such as Fig. 4 for the present invention on syntactic element coeff_abs_level_minus1 CABAC ue parts Decoding process figure.The value condition in stage and a_eat, b_eat, a_flag, b_flag according to residing for being decoded ue, determines two CodIOffset updated value, the decoding return value ret_pre of prefix part after bit bypass decoding, and information suffix solution Code return value ret_suf, then obtains decoded syntax element value by subsequent treatment.Especially, it should be noted that, a_ The situation of flag and b_flag output combinations can be predicted before bypass decoding to be learnt, so hardware is when design, Updated value of the CodIOffset under various combination can be calculated in advance according to a_flag and b_flag various combination, this Sample is when many bin decodings are actually carried out advantageously in the flowing water of hardware.
Ue prefix parts bypass decoded output result figure and ue information suffix by once many by once many bin Bin bypasses decoded output result figure respectively as shown in Figure 5 and Figure 6.Above-mentioned CABAC solves code system, once reads in dibit Data to be decoded, and parallel decoding is carried out to dibit data to be decoded, improve decoding efficiency.
Represent in flow charts or logic and/or step described otherwise above herein, for example, being considered use In the order list for the executable instruction for realizing logic function, it may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system including the system of processor or other can be held from instruction The system of row system, device or equipment instruction fetch and execute instruction) use, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicate, propagate or pass Defeated program is for instruction execution system, device or equipment or the dress for combining these instruction execution systems, device or equipment and using Put.
The more specifically example (non-exhaustive list) of computer-readable medium includes following:With one or more wirings Electrical connection section (electronic installation), portable computer diskette box (magnetic device), random access memory (RAM), read-only storage (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device, and portable optic disk is read-only deposits Reservoir (CDROM).In addition, can even is that can be in the paper of printing described program thereon or other are suitable for computer-readable medium Medium, because can then enter edlin, interpretation or if necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned In embodiment, the software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage Or firmware is realized.If, and in another embodiment, can be with well known in the art for example, realized with hardware Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal Discrete logic, the application specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means to combine specific features, structure, material or the spy that the embodiment or example are described Point is contained at least one embodiment of the present invention or example.In this manual, to the schematic representation of above-mentioned term not Necessarily refer to identical embodiment or example.Moreover, specific features, structure, material or the feature of description can be any One or more embodiments or example in combine in an appropriate manner.
Each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not to above-mentioned reality Apply all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, the scope of this specification record is all considered to be.
Embodiment described above only expresses the several embodiments of the present invention, and it describes more specific and detailed, but simultaneously Can not therefore it be construed as limiting the scope of the patent.It should be pointed out that coming for one of ordinary skill in the art Say, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention Scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (10)

1. a kind of CABAC coding/decoding methods, it is characterised in that comprise the following steps:
Current sequence to be decoded is moved to left two in a decoding periods, and dibit is read in from bit stream to be decoded and is placed in Current sequence to be decoded after moving to left it is low two, obtain the first sequence to be decoded;
First sequence to be decoded is compared with the first decoding interval value, it is interval according to the first sequence to be decoded and the first decoding The fiducial value of acquiring size first of value;Wherein, the first decoding interval value moves to left a corresponding value for current decoding interval value;
First sequence to be decoded is compared with the second decoding interval value, according to the first fiducial value and the first sequence to be decoded With the fiducial value of acquiring size second of the second decoding interval value;Wherein, the second decoding interval value is current decoding interval value and the One decoding interval value sum;
Determine that the decoding of the decoding return value and information suffix of prefix part is returned according to first fiducial value and the second fiducial value Value is returned, bit stream to be decoded is solved according to the decoding return value of the decoding return value of the prefix part and information suffix Code.
2. CABAC coding/decoding methods according to claim 1, it is characterised in that returned according to the decoding of the prefix part The step of value and the decoding return value of information suffix are decoded to bit stream to be decoded includes:
The bit number of prefix part is determined according to the decoding return value of prefix part;Wherein, the bit number of the prefix part with The bit number of information suffix is equal;
The information suffix value that decoding is obtained is determined according to the bit number of the decoding return value of described information suffix and information suffix;
Decoded residual value is calculated according to the information suffix value that decoding is obtained;
Bit stream to be decoded is decoded according to the decoded residual value.
3. CABAC coding/decoding methods according to claim 2, it is characterised in that according to the first sequence to be decoded and the first solution The step of the first fiducial value of acquiring size of code interval value, includes:
If current sequence to be decoded is more than or equal to the first decoding interval value, first fiducial value takes 1;
Otherwise, first fiducial value takes 0.
4. CABAC coding/decoding methods according to claim 3, it is characterised in that wait to solve according to the first fiducial value and first The step of code sequence and the second fiducial value of acquiring size of the second decoding interval value, includes:
When first fiducial value takes 1, if the first sequence to be decoded is more than or equal to the second decoding interval value, described second Fiducial value takes 1, and otherwise second fiducial value takes 0;
When first fiducial value takes 0, if the first sequence to be decoded is more than or equal to current decoding interval value, described second Fiducial value takes 1, and otherwise second fiducial value takes 0.
5. CABAC coding/decoding methods according to claim 4, it is characterised in that compared according to first fiducial value and second The step of relatively decoding return value of value determination prefix part and the decoding return value of information suffix, includes:
If current decoding stage is in prefix part decoding stage, the decoding return value of prefix part is determined according to following manner:
If first fiducial value and second fiducial value are 1, the decoding return value of the prefix part takes 2;
If first fiducial value is 1, and second fiducial value is 0, and the decoding return value of the prefix part takes 1;
If first fiducial value is 0, the decoding return value of the prefix part takes 0.
6. CABAC coding/decoding methods according to claim 5, it is characterised in that compared according to first fiducial value and second The step of relatively decoding return value of value determination prefix part and the decoding return value of information suffix, also includes:
If current decoding stage is in information suffix decoding stage, the decoding return value of information suffix is determined according to following manner:
If first fiducial value and second fiducial value are 1, the decoding return value of described information suffix takes 3;
If first fiducial value is 1, and second fiducial value is 0, and the decoding return value of described information suffix takes 2;
If first fiducial value is 0, and second fiducial value is 1, and the decoding return value of described information suffix takes 1;
If first fiducial value is 0, and second fiducial value is 0, and the decoding return value of described information suffix takes 0.
7. CABAC coding/decoding methods according to claim 6, it is characterised in that true according to the decoding return value of information suffix The step of information suffix value that definite decoding is obtained, includes:
When the bit number for the prefix part that decoding is obtained is even number, to the decoding return value of the information suffix obtained by all previous decoding Added up, accumulation result is set to decode to obtained information suffix value;
When the bit number for the prefix part that decoding is obtained is 0, the information suffix value that decoding is obtained is set to 0;
When the bit number of prefix part that decoding is obtained is odd number, according to a_eat and b_eat value to the bit that decodes more Reduced, then the decoding return value for decoding obtained information suffix each time is added up, accumulation result is set to solution The information suffix value that code is obtained;
Wherein, when a_eat is used to the first bit of flag decoding, if needs re-read a new byte in bit stream to be decoded Data, when b_eat is used to the second bit of flag decoding, if needs re-read a new byte number in bit stream to be decoded According to.
8. CABAC coding/decoding methods according to claim 7, it is characterised in that the information suffix value meter obtained according to decoding The step of calculating decoded residual value includes:
Decoded residual value is calculated according to equation below:
| level |=level_minus1+1+14;
In formula, level is decoded residual value, the information suffix value that level_minus1 obtains for decoding.
9. CABAC coding/decoding methods according to claim 1, it is characterised in that if current decoding stage is in prefix part Decoding stage, it is further comprising the steps of after being decoded according to the decoded residual value to bit stream to be decoded:
If first fiducial value and second fiducial value are 1, current sequence to be decoded is obtained according to equation below Updated value:
CodIOffset2=CodIOffset1-CodIRange1-CodIRange;
If first fiducial value is 1, and second fiducial value is 0, and current sequence to be decoded is obtained according to equation below Updated value:
CodIOffset2=CodIOffset1-CodIRange1;
If first fiducial value is 0, the first sequence to be decoded is moved to right to a corresponding sequence as current sequence to be decoded The updated value of row;
In formula, CodIOffset2 is the updated value of current sequence to be decoded, and CodIOffset1 is the first sequence to be decoded, CodIRange1 is the first decoding interval value, and CodIRange is current decoding interval value.
10. CABAC coding/decoding methods according to claim 1, it is characterised in that if current decoding stage is in information suffix Decoding stage, it is further comprising the steps of after being decoded according to the decoded residual value to bit stream to be decoded:
If first fiducial value and second fiducial value are 1, current sequence to be decoded is obtained according to equation below Updated value:
CodIOffset2=CodIOffset1-CodIRange1-CodIRange;
If first fiducial value is 1, and second fiducial value is 0, and current sequence to be decoded is obtained according to equation below Updated value:
CodIOffset2=CodIOffset1-CodIRange1;
If first fiducial value is 0, and second fiducial value is 1, and current sequence to be decoded is obtained according to equation below Updated value:
CodIOffset2=CodIOffset1-CodIRange;
If first fiducial value be 0, and second fiducial value be 0, by the first sequence to be decoded move to left two it is corresponding Sequence as current sequence to be decoded updated value;
In formula, CodIOffset2 is the updated value of current sequence to be decoded, and CodIOffset1 is the first sequence to be decoded, CodIRange1 is the first decoding interval value, and CodIRange is current decoding interval value.
CN201710550901.1A 2017-07-07 2017-07-07 CABAC coding/decoding method Active CN107277518B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710550901.1A CN107277518B (en) 2017-07-07 2017-07-07 CABAC coding/decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710550901.1A CN107277518B (en) 2017-07-07 2017-07-07 CABAC coding/decoding method

Publications (2)

Publication Number Publication Date
CN107277518A true CN107277518A (en) 2017-10-20
CN107277518B CN107277518B (en) 2019-07-16

Family

ID=60072998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710550901.1A Active CN107277518B (en) 2017-07-07 2017-07-07 CABAC coding/decoding method

Country Status (1)

Country Link
CN (1) CN107277518B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112953682A (en) * 2021-02-20 2021-06-11 Tcl华星光电技术有限公司 Decoding method, decoding apparatus, and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1949873A (en) * 2005-10-12 2007-04-18 华为技术有限公司 CABAC decoding system and method
US7710296B2 (en) * 2007-09-19 2010-05-04 Texas Instruments Incorporated N-bin arithmetic coding for context adaptive binary arithmetic coding
US20130107951A1 (en) * 2011-10-27 2013-05-02 Qualcomm Incorporated Mapping states in binary arithmetic coder for video coding
US20130177069A1 (en) * 2012-01-09 2013-07-11 Texas Instruments Incorporated Context Adaptive Binary Arithmetic Coding (CABAC) with Scalable Throughput and Coding Efficiency
CN103931188A (en) * 2012-01-16 2014-07-16 联发科技(新加坡)私人有限公司 Method and apparatus for context-adaptive binary arithmetic coding of syntax elements

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1949873A (en) * 2005-10-12 2007-04-18 华为技术有限公司 CABAC decoding system and method
US7710296B2 (en) * 2007-09-19 2010-05-04 Texas Instruments Incorporated N-bin arithmetic coding for context adaptive binary arithmetic coding
US20130107951A1 (en) * 2011-10-27 2013-05-02 Qualcomm Incorporated Mapping states in binary arithmetic coder for video coding
US20130177069A1 (en) * 2012-01-09 2013-07-11 Texas Instruments Incorporated Context Adaptive Binary Arithmetic Coding (CABAC) with Scalable Throughput and Coding Efficiency
CN103931188A (en) * 2012-01-16 2014-07-16 联发科技(新加坡)私人有限公司 Method and apparatus for context-adaptive binary arithmetic coding of syntax elements

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112953682A (en) * 2021-02-20 2021-06-11 Tcl华星光电技术有限公司 Decoding method, decoding apparatus, and readable storage medium

Also Published As

Publication number Publication date
CN107277518B (en) 2019-07-16

Similar Documents

Publication Publication Date Title
TWI753356B (en) Method and apparatuses for coding transform blocks
US6894628B2 (en) Apparatus and methods for entropy-encoding or entropy-decoding using an initialization of context variables
US9450608B2 (en) Method and arrangement for coding transform coefficients in picture and/or video coders and decoders and a corresponding computer program and a corresponding computer-readable storage medium
KR102254000B1 (en) Entropy coding of motion vector differences
RU2679784C2 (en) Data encoding and decoding
JP5855013B2 (en) Video coding method and apparatus
US6697527B2 (en) Coding method and coding apparatus
US7385535B2 (en) Decoding system and method based on context-based adaptive binary arithmetic coding
CN108419084B (en) Method, apparatus and storage medium for improved entropy coding and decoding
KR20080082147A (en) Context-based Adaptive Binary Arithmetic Coding and Decoding Method and Apparatus
CN118354077A (en) Apparatus and method for decoding or encoding transform coefficients of a block
US20140286417A1 (en) Data encoding and decoding
US20070115154A1 (en) Method of decoding bin values using pipeline architecture and decoding device therefor
JP5264706B2 (en) Arithmetic decoding method and device
CN114615504B (en) Video decoding method, video encoding method, device and equipment
JP2009534886A5 (en)
KR20170075759A (en) Method and apparatus for entropy encoding or entropy decoding of a video signal for massively parallel processing
CN119420951A (en) Point cloud encoding and decoding method and device
CN107277518B (en) CABAC coding/decoding method
CN102355578A (en) Entropy decoding method and device
CN103024380B (en) A kind of entropy coding method of data and device
WO2010022023A1 (en) Combining transform coefficient decoding with variable length decoding
CN100527847C (en) Variable-length code decoding method based on zero-prefix code
WO2022193386A1 (en) Coefficient encoding method and device, coefficient decoding method and device, terminal and storage medium
KR20050066142A (en) Apparatus and method of context-based adaptive variable length decoding

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
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 519000 No. 333, Kexing Road, Xiangzhou District, Zhuhai City, Guangdong Province

Patentee after: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

Address before: Floor 1-107, building 904, ShiJiHua Road, Zhuhai City, Guangdong Province

Patentee before: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.