CN102263960A - Rapid context-adaptive variable-length coding (CAVLC) non-zero coefficient amplitude decoding method - Google Patents

Rapid context-adaptive variable-length coding (CAVLC) non-zero coefficient amplitude decoding method Download PDF

Info

Publication number
CN102263960A
CN102263960A CN2011102324868A CN201110232486A CN102263960A CN 102263960 A CN102263960 A CN 102263960A CN 2011102324868 A CN2011102324868 A CN 2011102324868A CN 201110232486 A CN201110232486 A CN 201110232486A CN 102263960 A CN102263960 A CN 102263960A
Authority
CN
China
Prior art keywords
amplitude
sign indicating
code word
indicating number
table number
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
CN2011102324868A
Other languages
Chinese (zh)
Other versions
CN102263960B (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.)
Fudan University
Original Assignee
Fudan University
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 Fudan University filed Critical Fudan University
Priority to CN2011102324868A priority Critical patent/CN102263960B/en
Publication of CN102263960A publication Critical patent/CN102263960A/en
Application granted granted Critical
Publication of CN102263960B publication Critical patent/CN102263960B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention belongs to the technical field of digital video signal coding and decoding, and particularly discloses a rapid context-adaptive variable-length coding (CAVLC) non-zero coefficient amplitude decoding method. In the method, the number of candidate code tables for decoding non-zero coefficient amplitudes is reduced from 7 to 2, and after the length of a first codeword is obtained, the computation of a second codeword can be started. When a second codeword of the non-zero coefficient amplitude is decoded, two possibly adopted code tables are computed at the same time by adopting a two-path parallel decoding method to obtain two possible decoding results. After the amplitude and code table information updating of the first codeword is finished, an accurate result can be selected from the two results. In such a way, a key path of a decoding flow can be shortened, thereby realizing the simultaneous decoding of two non-zero coefficient amplitudes within a clock cycle. Because the codeword of the non-zero coefficient amplitude is the most frequently occurring codeword in CAVLC, the data processing capability of a hardware decoder is greatly improved by the method.

Description

A kind of method of fast decoding CAVLC nonzero coefficient amplitude
Technical field
The invention belongs to digital video signal encoding and decoding technique field, be specifically related to a kind of method of the CAVLC of decoding nonzero coefficient amplitude.
Background technology
H.264/AVC (Advanced Video Coding) unites the international video encoding standard that formulation forms by international telecommunication tissue (ITU) and Motion Picture Experts Group (MPEG), obtained in the multimedia audio-video field at present using widely.H.264/AVC stipulate in that its entropy coding can adopt dual mode: hereinafter self-adapting changeable long codes (CAVLC) and context-adaptive arithmetic coding (CABAC).CABAC has higher code efficiency, but the complexity of encoding and decoding also increases greatly, and CAVLC has equilibrium preferably on code efficiency and complexity.With last generation video standard such as MPEG-1, MPEG-2 compares, and the code efficiency of CAVLC has remarkable lifting.
Video heads information in the video code flow and information of forecasting generally adopt the fixed length code or the index Columbus sign indicating number of lower complexity, and the information of residual error coefficient has occupied the overwhelming majority of video code flow, and the coding of this part information need adopt CAVLC coded system more efficiently.The code word of CAVLC always has 5 classes:
1. Coeff_token: this code word is represented the number of nonzero coefficient and the number (TrailingOnes) of hangover 1.
2. Sign_trail: this code word is the symbol of hangover 1.Each symbolic coding is a bit, positive 1,1 expression negative 1 of 0 expression.
3. Levels: the amplitude of the nonzero coefficient of other that this code word is meant that TrailingOnes is outer.
4. Total_zeros: the number of the total zero coefficient when it is coded in anti-Zig-Zag scanning sequency behind first nonzero coefficient.
5. Run_before: this code word is meant the number of zero before each nonzero coefficient.
For the hardware decoding, the amplitude of calculating nonzero coefficient is the most time-consuming process in the whole C AVLC decode procedure.For a length with highly all be the graph block of 4 pixels, if adopt the CAVLC coded system, some code word such as Coeff_token, sign_trial and Total_zero only need once decoding in decode procedure, and the code word of nonzero coefficient amplitude can reach 16 at most.Simultaneously, because CAVLC has introduced the coded system of context-adaptive, the amplitude of current nonzero coefficient not only depends on code word itself, the decoded result that also depends on previous code word, the code word of each nonzero coefficient amplitude of can only decoding successively in order during decoding can't promote decoding speed by simple increase hardware degree of parallelism.
Summary of the invention
The objective of the invention is to propose a kind of method of fast decoding CAVLC nonzero coefficient amplitude, be applicable to the H.264 CAVLC decode procedure of video specification defined, can in a clock cycle, finish the decoding of two nonzero coefficient amplitudes.Obtain the length of first code word in decoding after, the decode procedure of second code word just can begin, and needn't wait until that all information of first code word are all finished decoding.The input of decode procedure is the sign indicating number table number of using in video code flow to be decoded and the preceding once decoding, and output is the sign indicating number table number of amplitude, length and the use of two nonzero coefficients.Concrete decode procedure is as follows:
(1), calculates the code word size and the decoded value (value that is called for short the amplitude prefix) of its amplitude prefix at first code word;
(2) calculate the length of first code word;
(3) calculate the amplitude of first code word;
(4), calculate the code word size and the decoded value of its amplitude prefix at the second code word;
(5) calculating two kinds of second code word may length and amplitude;
(6) upgrade the sign indicating number table number that first code word is exported;
(7), select correct amplitude and length as output at second code word;
(8) upgrade the sign indicating number table number that second code word exported.
Among the present invention,, optimized the renewal process of sign indicating number table number, candidate's a sign indicating number table number has been reduced to 2 by 7 by analyzing H.264 video standard.H.264 CAVLC has stipulated 7 possible sign indicating number table numbers, is respectively 0,1,2,3,4,5,6.This method dopes the new sign indicating number table number that may be used for next codeword decoding according to current sign indicating number table number.If current sign indicating number table number is 0, so new sign indicating number table number is 1; If current sign indicating number table number is 1, new sign indicating number table number has two candidate values: 1,2; If current sign indicating number table number is 2, new sign indicating number table number has two candidate values: 2,3; If current sign indicating number table number is 3, new sign indicating number table number has two candidate values: 3,4; If current sign indicating number table number is 4, new sign indicating number table number has two candidate values: 4,5; If current sign indicating number table number is 5, new sign indicating number table number has two candidate values: 5,6; If current sign indicating number table number is 6, new sign indicating number table number is 6.
Among the present invention, the correlation of code word before and after having eliminated, when the amplitude of calculating second nonzero coefficient and code word size, adopt 2 tunnel parallel methods to begin decoding in advance, calculate the length and the amplitude of second code word in advance according to two different Candidate key table numbers, rather than first code word complete decoding just begins after finishing by the time, can shorten the critical path on the hardware time order like this, accelerates decoding process.
Beneficial effect of the present invention:
In a clock cycle, can only the decode amplitude of a nonzero coefficient of existing method, and the method for describing among the present invention can double speed, in a clock cycle, can decode and obtain the amplitude of two nonzero coefficients, thereby improve the decoding speed of CAVLC integral body.Be applicable to the various H.264 electronic equipments of video decode function that have.
Description of drawings
Fig. 1: amplitude suffix length calculation process.
Fig. 2: the entire block diagram of two CALVC nonzero coefficients of fast decoding amplitude.
Embodiment
The present invention will be further described below in conjunction with accompanying drawing.
The embodiment of fast decoding nonzero coefficient amplitude of the present invention is as follows:
(1) calculates the amplitude prefix (level_prefix) of first code word.The computational methods of amplitude prefix are as shown in table 1.The value of amplitude prefix can obtain the number that the value of amplitude prefix equals leading 0 by calculating in the current video code stream code stream leading 0 number.The value that the code word size of amplitude prefix equals the amplitude prefix adds 1 again.
(2) calculate the length of first code word.The length that the length of first code word equals amplitude suffix (level_suffix) adds the length of amplitude prefix.The process of decoding amplitude suffix as shown in Figure 1, the length of amplitude suffix is by amplitude prefix and the decision of current sign indicating number table number.When the amplitude prefix less than 14 the time, the length of amplitude suffix equals a yard table number, when the amplitude prefix equaled 14, the length of amplitude suffix was 4 bits, when the amplitude prefix greater than 14 the time, the value that the length of amplitude suffix equals the amplitude prefix subtracts 3.
(3) calculate the amplitude of first code word.The amplitude of first code word can be obtained through logical operation by amplitude prefix, amplitude suffix and sign indicating number table number, detailed process is by H.264 standard code, as shown in table 2, being explained as follows of each variable in the table: level represents the amplitude of current code word, level_prefix is the amplitude prefix, level_suffix is the amplitude suffix, the number of trailingone representative hangover 1, the current sign indicating number of suffixLength representative table number; And<<represent right-shift operation and shift left operation respectively, the operation that remainder is got in the % representative, the operation of absolute value is asked in abs () expression, and min () is illustrated in and selects a less conduct output , ﹠amp in two numbers; ﹠amp; Represent logical AND, || represent logic OR.
(4) the amplitude prefix of second code word of calculating.The same step of this step (1).
(5) length of second code word of calculating.Because the sign indicating number table number of second code word correspondence produces as yet, need calculate two kinds of possible length simultaneously, calculates the same step of concrete steps (2) of every kind of possibility length; Calculate the amplitude of second code word, in like manner, need calculate two kinds of possible amplitudes simultaneously, calculate the same step of concrete steps (3) of every kind of possibility length.
(6) upgrade the sign indicating number table number that first code word is exported.If the sign indicating number table number equals 6, so new sign indicating number table number is 6; If the sign indicating number table number is 0, so new sign indicating number table number is 1; Otherwise new sign indicating number table number will determine whether equaling current sign indicating number table number according to the size of code word amplitude still be that current sign indicating number table number adds 1.
(7) simultaneously, according to the new sign indicating number table number of first code word output, select correct amplitude and code word size decoded result in two candidate result that from step (5), obtain as second nonzero coefficient code word.
(8) upgrade the sign indicating number table number that second code word exported.Calculate earlier at two kinds of second code word possible new sign indicating number table numbers, the same step of computational methods (6), and then, select correct sign indicating number table number to export as final according to the sign indicating number table number that first code word is exported.
The overall flow of two CALVC nonzero coefficients of fast decoding amplitude is passed through above-mentioned steps as shown in Figure 2, and the size of two adjacent nonzero coefficient amplitudes and code word size just can obtain in a clock cycle, and a simultaneously up-to-date sign indicating number table number has also obtained renewal.
Table 1: the decoding code table of amplitude prefix
The value of amplitude prefix Video bit stream
0 1
1 01
2 001
3 0001
4 00001
5 000001
6 0000001
7 00000001
8 000000001
9 0000000001
10 00000000001
11 000000000001
12 0000000000001
13 00000000000001
14 000000000000001
15 0000000000000001
Table 2: the computational methods of nonzero coefficient amplitude
level = ( Min( 15, level_prefix ) << suffixLength )
if( suffixLength > 0 | | level_prefix >= 14 )
level = level +? level_suffix
if( level_prefix > = 15 && suffixLength = = 0 )
level = level + 15
if( level_prefix > = 16 )
level = level +? ( 1 << ( level_prefix – 3 ) ) – 4096
if( (i = = TrailingOnes) && (TrailingOnes < 3) )
level = level + 2
if( level % 2 = = 0 )
level = ( level + 2 ) >> 1
Else
level = ( –level – 1 ) >> 1
if( suffixLength = = 0 )
suffixLength = 1
if( Abs( level ) > ( 3 << ( suffixLength – 1 ) ) && suffixLength < 6 )
suffixLength=suffixLength+1

Claims (6)

1. the method for a fast decoding CAVLC nonzero coefficient amplitude is characterized in that concrete steps are as follows:
(1), calculates the code word size and the decoded value of its amplitude prefix at first code word;
(2) calculate the length of first code word;
(3) calculate the amplitude of first code word;
(4), calculate the code word size and the decoded value of its amplitude prefix at the second code word;
(5) calculating two kinds of second code word may length and amplitude;
(6) upgrade the sign indicating number table number that first code word is exported;
(7), select correct amplitude and length as output at second code word;
(8) upgrade the sign indicating number table number that second code word exported.
2. the method for fast decoding CAVLC nonzero coefficient amplitude according to claim 1 is characterized in that described renewal sign indicating number table number method is as follows:
According to 7 of the regulation of CAVLC H.264 possible sign indicating number table numbers: 0,1,2,3,4,5,6, dope the new sign indicating number table number that may be used for next codeword decoding according to current sign indicating number table number: if a current sign indicating number table number is 0, a so new sign indicating number table number is 1; If current sign indicating number table number is 1, new sign indicating number table number has two candidate values: 1,2; If current sign indicating number table number is 2, new sign indicating number table number has two candidate values: 2,3; If current sign indicating number table number is 3, new sign indicating number table number has two candidate values: 3,4; If current sign indicating number table number is 4, new sign indicating number table number has two candidate values: 4,5; If current sign indicating number table number is 5, new sign indicating number table number has two candidate values: 5,6; If current sign indicating number table number is 6, new sign indicating number table number is 6.
3. the method for fast decoding CAVLC nonzero coefficient amplitude according to claim 2, it is characterized in that when the amplitude of calculating second nonzero coefficient and code word size, adopt 2 tunnel parallel methods to begin decoding in advance, promptly calculate the length and the amplitude of second code word in advance according to two different Candidate key table numbers.
4. the method for fast decoding CAVLC nonzero coefficient amplitude according to claim 3, the value that it is characterized in that the amplitude prefix of first code word obtains the number that the value of amplitude prefix equals leading 0 by calculating in the current video code stream code stream leading 0 number; The value that the code word size of amplitude prefix equals the amplitude prefix adds 1 again.
5. the length that the method for fast decoding CAVLC nonzero coefficient amplitude according to claim 4, the length that it is characterized in that first code word equal the amplitude suffix adds the length of amplitude prefix; And the length of decoding amplitude suffix is by amplitude prefix and the decision of current sign indicating number table number: when the amplitude prefix less than 14 the time, the length of amplitude suffix equals a yard table number, when the amplitude prefix equals 14, the length of amplitude suffix is 4 bits, when the amplitude prefix greater than 14 the time, the value that the length of amplitude suffix equals the amplitude prefix subtracts 3.
6. the method for fast decoding CAVLC nonzero coefficient amplitude according to claim 5 is characterized in that described
The method of upgrading the sign indicating number table number of first code word output is: if the sign indicating number table number equals 6, so new sign indicating number table number is 6; If the sign indicating number table number is 0, so new sign indicating number table number is 1; Otherwise it still be that current yard table number adds 1 that new sign indicating number table number determines whether equaling current sign indicating number table number according to the size of code word amplitude; Simultaneously, according to the new sign indicating number table number of first code word output, select correct amplitude and code word size decoded result in two candidate result that from step (5), obtain as second nonzero coefficient code word.
CN2011102324868A 2011-08-15 2011-08-15 Rapid context-adaptive variable-length coding (CAVLC) non-zero coefficient amplitude decoding method Expired - Fee Related CN102263960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011102324868A CN102263960B (en) 2011-08-15 2011-08-15 Rapid context-adaptive variable-length coding (CAVLC) non-zero coefficient amplitude decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011102324868A CN102263960B (en) 2011-08-15 2011-08-15 Rapid context-adaptive variable-length coding (CAVLC) non-zero coefficient amplitude decoding method

Publications (2)

Publication Number Publication Date
CN102263960A true CN102263960A (en) 2011-11-30
CN102263960B CN102263960B (en) 2013-11-27

Family

ID=45010388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011102324868A Expired - Fee Related CN102263960B (en) 2011-08-15 2011-08-15 Rapid context-adaptive variable-length coding (CAVLC) non-zero coefficient amplitude decoding method

Country Status (1)

Country Link
CN (1) CN102263960B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050156761A1 (en) * 2003-12-18 2005-07-21 Lg Electronics Inc. Method and apparatus for CAVLC decoding
CN101309423A (en) * 2008-06-26 2008-11-19 四川虹微技术有限公司 Method for decoding number of non-zero coefficient and number tailing coefficient
CN101370138A (en) * 2007-08-17 2009-02-18 中国科学院计算技术研究所 Decoding method for H.264 standard CAVLC residual error coefficient

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050156761A1 (en) * 2003-12-18 2005-07-21 Lg Electronics Inc. Method and apparatus for CAVLC decoding
CN101370138A (en) * 2007-08-17 2009-02-18 中国科学院计算技术研究所 Decoding method for H.264 standard CAVLC residual error coefficient
CN101309423A (en) * 2008-06-26 2008-11-19 四川虹微技术有限公司 Method for decoding number of non-zero coefficient and number tailing coefficient

Also Published As

Publication number Publication date
CN102263960B (en) 2013-11-27

Similar Documents

Publication Publication Date Title
US11750826B2 (en) Context and bypass encoding video
US7079057B2 (en) Context-based adaptive binary arithmetic coding method and apparatus
JP5733590B2 (en) A context modeling technique for encoding transform coefficient levels.
AU2020280994A1 (en) Sample array coding for low-delay
US7501964B2 (en) Entropy coding for digital codecs
US7365660B2 (en) Method and device for decoding syntax element in CABAC decoder
KR100717055B1 (en) Method of decoding bin values using pipeline architecture, and decoding apparatus therefor
MX2013013523A (en) Method and apparatus for coding of intra prediction mode.
KR20130140190A (en) Methods and devices for coding and decoding the position of the last significant coefficient
US20120086587A1 (en) System and method for optimizing context-adaptive binary arithmetic coding
CN111614957A (en) Entropy coding and decoding method and device for image or video data
EP2599227A1 (en) Method and device for compression of binary sequences by grouping multiple symbols
US20090238270A1 (en) Apparatus and method for modifying predicted values, and decoding system
US20130243102A1 (en) Method and apparatus for arithmetic coding and termination
US20140023137A1 (en) Techniques for context-adaptive binary data arithmetic coding (cabac) decoding
CN100551064C (en) Variable length encoding method and device
KR20120105412A (en) Methods for arithmetic coding and decoding
CN102263960B (en) Rapid context-adaptive variable-length coding (CAVLC) non-zero coefficient amplitude decoding method
Lin et al. A branch selection multi-symbol high throughput CABAC decoder architecture for H. 264/AVC
CN112449201B (en) Decoding method, encoding method, corresponding devices, electronic equipment and storage medium
JP2013009167A (en) Entropy encoding apparatus, entropy decoding apparatus, entropy encoding method and entropy decoding method
CN102572437B (en) Hardware realization method for rapidly decoding CAVLC (context-adaptive variable-length coding) run_before code
He et al. Video coding technology proposal by RIM
US9973209B2 (en) Processor and data processing method thereof
JP6509916B2 (en) Method and apparatus for performing arithmetic coding based on concatenated ROM-RAM table

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20131127

Termination date: 20160815

CF01 Termination of patent right due to non-payment of annual fee