CN103384329A - CAVLC decoding method based on no code table lookup - Google Patents
CAVLC decoding method based on no code table lookup Download PDFInfo
- Publication number
- CN103384329A CN103384329A CN2013101643206A CN201310164320A CN103384329A CN 103384329 A CN103384329 A CN 103384329A CN 2013101643206 A CN2013101643206 A CN 2013101643206A CN 201310164320 A CN201310164320 A CN 201310164320A CN 103384329 A CN103384329 A CN 103384329A
- Authority
- CN
- China
- Prior art keywords
- code word
- code
- suffix
- value
- program
- 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
Links
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
The invention relates to a CAVLC decoding method based on no code table lookup. The method includes the steps of selecting a variable length code table corresponding to a Coeff-token element according to a value of NC, reading an input code stream, calculating the number of continuous prefixes 0 in the input code stream, taking the number as the first level of a program skip statement entry, obtaining the corresponding code word length according to the number of code word prefixes 0, confirming the lengths of code word postfixes according to the relation between the code word length and the number of the code word prefixes 0, reading the code word postfixes in the input code stream according to the lengths of the code word postfixes, judging and reading values of the code word postfixes, taking the values of the code word postfixes as the second level of the program skip statement entry, and obtaining a corresponding decoding code word according to execution of a program in the first level and the second level of a skip statement. The method has the advantages of greatly saving time for searching of a code table, positioning of the code word, judging and processing, and improving standard CAVLC decoding performance.
Description
Technical field
The present invention relates to the video image encoding and decoding technical field, particularly a kind of based on without Codebook Lookup CAVLC coding/decoding method.
Background technology
H.264/AVC be the common video compression coding international standard of formulating of ITU-VCEG (Video Coding Experts Group) and ISO MPEG (Moving Picture Experts Group).Because high compression coding efficient, friendly network-oriented interface and the characteristics that provide high quality graphic to transmit on lower bandwidth are provided for it, obtained using more and more widely at Digital Video Communication and field of storage, be generally considered the most influential industry standard.The adaptive Variable Length Code of CAVLC(based on the context) be the most common a kind of coded system of entropy coding in standard H.264/AVC, owing to switching dynamically in its can group structures many according to not coexisting of video flowing different code table, can greatly improve Video coding efficient and video quality.Yet CAVLC is when improving Video coding efficient and video quality, and because its complex calculation amount increases the required power consumption of encoding and decoding video greatly, H.264/AVC high performance acquisition is that to increase the power consumption of its encoding and decoding be cost.
Codebook Lookup is a very operation of consumed power.Because adopting, standard CAVLC decoding look-up method searches continuously code table (TLSS) mode, until find the expection code word, thereby it has consumed the power consumption of a large amount of decoders of video.According to statistics, Codebook Lookup has consumed the above power consumption of internal memory of Video Decoder 60% and has spent approximately 70% decode time, is a principal element that has a strong impact on the CAVLC decoding performance, is also one and hinders the H.264/AVC important bottleneck of standard technique development.In the CAVLC decode procedure of standard H.264/AVC, need to relate to the decoding (Coeff_token of five elements due to the CAVLC decode procedure, T1s, Level, Run_before and Total_zeros), the Coeff_token that wherein decodes, three elements of Run_before and Total_zeros need to utilize a large amount of variable length code table decodings, are therefore consuming the H.264/AVC a large amount of power consumptions of Video Decoder and time.Become so how to go to reduce the time of searching the variable length code table during when searching the variable length code table, memory consumption is decoded with minimizing CAVLC in the CAVLC decoding subject matter that our current research is paid close attention to.
Summary of the invention
Main purpose of the present invention is, for above-mentioned deficiency of the prior art, provide a kind of based on without Codebook Lookup CAVLC coding/decoding method, the method has adopted the mode of program code to remove to have replaced H.264/AVC the continuous lookup method of code table in standard, saved due to the caused memory consumption of Codebook Lookup, improved H.264/AVC middle CAVLC decoding performance.
The present invention solves the technical scheme that the prior art problem adopts: a kind of based on without Codebook Lookup CAVLC coding/decoding method, it comprises the following steps:
S1, according to the value of NC, choose variable length code table corresponding to Coeff-token element;
S2, read input code flow, calculate in input code flow the number of prefix 0 continuously, with the first order of this number as program skip instruction entrance;
S3, the number by prefix of code word 0 obtain corresponding code word size, determine the length of code word suffix according to the number Relations Among of described code word size and prefix of code word 0;
S4, read the code word suffix according to the length of described code word suffix from described input code flow;
The value of S5, the described code word suffix of interpretation, and with the value of the described code word suffix second level as program skip instruction entrance;
S6, according to the execution of described program in the skip instruction first order and the second level, can obtain corresponding decodes codeword.
The below further sets forth technique scheme: further, in described step S3, when there are two probable values in code word size corresponding to the number of described prefix of code word 0, need judge whether first of code word suffix is " 0 ";
If first of described code word suffix is " 0 ", determines that described code word size is in two kinds of probable values, then continue step S4 and subsequent step;
If first of described code word suffix is " 1 ", search corresponding decodes codeword, not redirect.
Further, in described step S5, when the value of described code word suffix is 0, search the code word corresponding with the value 0 of described code word suffix, when the value of described code word suffix is 1, search the code word corresponding with the value 1 of described code word suffix.
Further, in described input code flow continuously the number of prefix 0 be n, the selection skip instruction of the first order be labeled as Case n, in step 1, program jumps to the selection skip instruction Case n place execution of the first order.
The invention has the beneficial effects as follows: provided by the invention a kind of based on without Codebook Lookup CAVLC coding/decoding method, adopted the method that replaces Codebook Lookup based on the mode of program code, realize standard CAVLC decoding table lookup operation, can greatly save searching code table, the location of code word, judgement and processing time, having overcome when in current standard CAVLC decoding, the TLSS method is tabled look-up exists the committed memory of tabling look-up large, consumption time of tabling look-up is long, occupy the large shortcoming of code table memory space, greatly improved the standard CAVLC decoding performance.
Description of drawings
Fig. 1 is the flow chart of method of the present invention;
Fig. 2 is that the inventive method and other several common methods Codebook Lookup when the different images sequence consume internal memory comparison diagram 1;
Fig. 3 is that the inventive method and other several common methods Codebook Lookup when test different images sequence consume internal memory comparison diagram 2;
Fig. 4 is that the inventive method consumes Codebook Lookup time comparison diagram with other several common methods commonly used when decoding the different images sequence;
Fig. 5 is that the inventive method and standard TLSS method consume comparison diagram aspect the code table memory space.
The realization of the object of the invention, functional characteristics and advantage are described further with reference to accompanying drawing in connection with embodiment.
Embodiment
Describe technical scheme of the present invention in detail below with reference to drawings and the specific embodiments, so as clearer, understand invention essence of the present invention intuitively.
The present invention exists committed memory large mainly for continuous code table lookup method (TLSS) in current standard CAVLC decoding when decoding is tabled look-up, spend the time of tabling look-up long, consume the large problem of code table memory space, provide a kind of based on without Codebook Lookup CAVLC coding/decoding method, the service routine code is carried out and is removed to realize Codebook Lookup, improved the CAVLC decoding Codebook Lookup process of standard, expanded existing CAVLC decoding look up table technique, to improve the decoding capability of CAVLC decoding on data flow H.264/AVC.
With reference to shown in Figure 1, the method specifically comprises the following steps:
S1, according to the value of NC, choose variable length code table corresponding to Coeff-token element; In this step, the Coeff_token element needs to choose different variable length code tables according to the value of different N C to three variable length code tables should be arranged.
S2, read input code flow, calculate the number of continuous prefix 0 in input code flow, with the first order of this number as program skip instruction entrance, for example, in described input code flow, the number of continuous prefix 0 is n, the selection skip instruction of the first order be labeled as Case n, in step 1, the selection skip instruction Case n place that program jumps to the first order carries out.
S3, the number by prefix of code word 0 obtain corresponding code word size, determine the length of code word suffix according to the number Relations Among of described code word size and prefix of code word 0; Concrete,
When there are two probable values in code word size corresponding to the number of described prefix of code word 0, need judge whether first of code word suffix is " 0 ";
If first of described code word suffix is " 0 ", determines that described code word size is in two kinds of probable values, then continue step S4 and subsequent step;
If first of described code word suffix is " 1 ", search corresponding decodes codeword, not redirect.
S4, read the code word suffix according to the length of described code word suffix from described input code flow;
The value of S5, the described code word suffix of interpretation, and with the value of the described code word suffix second level as program skip instruction entrance; In this step, the value of described code word suffix may be 0 or 1, when the value of this suffix is 0, searches the code word corresponding with the value 0 of described code word suffix, when the value of described code word suffix is 1, searches the code word corresponding with the value 1 of described code word suffix.
S6, according to the execution of described program in the skip instruction first order and the second level, can obtain corresponding decodes codeword.
Suppose that the NC value is 0≤NC<2 o'clock, the decoding input code flow is 0000100011 ... under, take decoding Coeff_token as example, method of the present invention can be completed by following steps:
The first step: according to value 0≤NC of NC<2, choose the variable length code table 0 of Coeff_ token as program entry;
Second step: read input code flow, the number of calculating the continuous prefix 0 of code word in input code flow 0000100011 is 4, and program jumps to the selection skip instruction Case 4 places execution of the first order;
The 3rd step: can obtain code word size according to number 4 and the code length corresponding relation of prefix of code word 0 is 6 or 7; Because the code word size of number 4 correspondences of prefix of code word 0 has two probable values 6 or 7, to be 0 by the 1st of further judgement code word suffix, the code word size that can obtain number 4 correspondences of prefix of code word 0 is 7, then can to get code word suffix length according to prefix of code word 0 number and code length relation be 2;
The 4th step: read 2 bit word suffix values according to the length 2 of code word suffix from code stream, and judge that whether its value is 0 to judge the skip instruction entrance second level as program;
By the execution of said procedure at skip instruction one secondary, can find corresponding decodes codeword 0x65.
Its subprogram code is as follows:
Case 4: the number of // prefix of code word 0.---first order judgement skip instruction program
Codesuff=1; First of // code word suffix
Codesuffword=ShowBits(buf, frame-bitoffset, BitstreamLengthInBits, 1); First of // code word suffix
If(codesuffword) // code word suffix the first place value is 1
Cod=0x64; // code word
else
{
Codesuff=2; // code word suffix length is 2;
codesuffword=ShowBits(buf,frame-bitoffset,BitstreamLengthInBits,2);
If(codesuffword=00) // judge whether code word suffix value is 0,--second level judgement skip instruction program
Cod=0x64; // code word
else if(codesuffword=01)
Cod=0x43; // code word
else
cod=“decoding error”
}
Other Run_before is identical with the Coeff_token coding/decoding method with Total_zeros element decoded method, is not repeated.
Fig. 2 and Fig. 3 are respectively that the inventive method consumes the internal memory comparison diagram with other several common methods commonly used Codebook Lookup when testing the image sequence of different parameters; Wherein Fig. 2 is arranging Frame=60, records code table memory consumption comparison diagram under the image sequence of QP=28, and Fig. 3 is arranging Frame=120, records code table memory consumption comparison diagram under the image sequence of QP=32.As can be seen from Figures 2 and 3, aspect the saving of searching the code table memory consumption, the method that we carry can reach 100% and save Codebook Lookup EMS memory occupation and consumption higher than other all methods.Save reason and mainly be, our institute's extracting method has adopted the mode of program code to remove to have replaced H.264/AVC the continuous lookup method of code table in standard, can save due to the caused memory consumption of Codebook Lookup, improved H.264/AVC in the CAVLC decoding performance.From Fig. 2, Fig. 3 it can also be seen that, the Kim method is compared TLBS and Moon method and can be obtained better internal memory and save characteristic.The TLBS method is occupied larger internal memory saving when larger QP value superior, and Moon can obtain reasonable internal memory and save effect when lower QP value.
Fig. 4 is that the inventive method consumes Codebook Lookup time comparison diagram with other several common methods commonly used when decoding the different images sequence.As can be seen from Figure 5, the TLSS method of comparison with standard, the inventive method can improve approximately 45% Codebook Lookup speed, higher than other algorithm of tabling look-up commonly used.Analyze its main cause and be that our institute extracting method adopts the mode of program code to remove to realize Codebook Lookup, can greatly save to the searching of code table the location of code word, judgement and processing time.
Fig. 5 is that the inventive method and standard TLSS method consume comparison diagram aspect the code table memory space.As can be seen from Figure 5, the TLSS method of comparison with standard, the inventive method can be saved the code table memory space of 2320 bytes, the saving main cause is that our institute's extracting method adopts program code means to remove to replace code table, can save the code table memory space, those limited small sizes of storage resources under mobile environment have been improved, the embedded device memory space utilance of low energy-consumption electronic device.
In sum, provided by the invention a kind of based on without Codebook Lookup CAVLC coding/decoding method, adopt the method that replaces Codebook Lookup based on the mode of program code, realized standard CAVLC decoding table lookup operation, can greatly save searching code table, the location of code word, judgement and processing time have overcome when in the decoding of current standard CAVLC, the TLSS method is tabled look-up and exist the committed memory of tabling look-up large, consume the time of tabling look-up long, occupy the large shortcoming of code table memory space, greatly improved the standard CAVLC decoding performance.
The above is only the preferred embodiments of the present invention; not thereby limit its scope of the claims; every equivalent structure or equivalent flow process conversion that utilizes specification of the present invention and accompanying drawing content to do; directly or indirectly be used in other relevant technical fields, all in like manner be included in scope of patent protection of the present invention.
Claims (4)
1. one kind based on without Codebook Lookup CAVLC coding/decoding method, and it is characterized in that: it comprises the following steps
S1, according to the value of NC, choose variable length code table corresponding to Coeff-token element;
S2, read input code flow, calculate in input code flow the number of prefix 0 continuously, with the first order of this number as program skip instruction entrance;
S3, the number by prefix of code word 0 obtain corresponding code word size, determine the length of code word suffix according to the number Relations Among of described code word size and prefix of code word 0;
S4, read the code word suffix according to the length of described code word suffix from described input code flow;
The value of S5, the described code word suffix of interpretation, and with the value of the described code word suffix second level as program skip instruction entrance;
S6, according to the execution of described program in the skip instruction first order and the second level, can obtain corresponding decodes codeword.
2. according to claim 1 based on without Codebook Lookup CAVLC coding/decoding method, it is characterized in that: in described step S3, when there are two probable values in code word size corresponding to the number of described prefix of code word 0, need judge whether first of code word suffix is " 0 ";
If first of described code word suffix is " 0 ", determines that described code word size is in two kinds of probable values, then continue step S4 and subsequent step;
If first of described code word suffix is " 1 ", search corresponding decodes codeword, not redirect.
3. according to claim 1 based on without Codebook Lookup CAVLC coding/decoding method, it is characterized in that: in described step S5, when the value of described code word suffix is 0, search the code word corresponding with the value 0 of described code word suffix, when the value of described code word suffix is 1, search the code word corresponding with the value 1 of described code word suffix.
4. according to claim 1 based on without Codebook Lookup CAVLC coding/decoding method, it is characterized in that: in described input code flow, the number of continuous prefix 0 is n, the selection skip instruction of the first order be labeled as Case n, in step 1, program jumps to selection skip instruction Case n place's execution of the first order.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013101643206A CN103384329A (en) | 2013-05-07 | 2013-05-07 | CAVLC decoding method based on no code table lookup |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013101643206A CN103384329A (en) | 2013-05-07 | 2013-05-07 | CAVLC decoding method based on no code table lookup |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103384329A true CN103384329A (en) | 2013-11-06 |
Family
ID=49492015
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013101643206A Pending CN103384329A (en) | 2013-05-07 | 2013-05-07 | CAVLC decoding method based on no code table lookup |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103384329A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1913638A (en) * | 2005-08-09 | 2007-02-14 | C&S技术有限公司 | H.264 decoding method for fast CAVLC |
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 |
CN102355578A (en) * | 2011-05-25 | 2012-02-15 | 深圳市融创天下科技股份有限公司 | Entropy decoding method and device |
-
2013
- 2013-05-07 CN CN2013101643206A patent/CN103384329A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1913638A (en) * | 2005-08-09 | 2007-02-14 | C&S技术有限公司 | H.264 decoding method for fast CAVLC |
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 |
CN102355578A (en) * | 2011-05-25 | 2012-02-15 | 深圳市融创天下科技股份有限公司 | Entropy decoding method and device |
Non-Patent Citations (2)
Title |
---|
宋娜: "一种改进的CAVLC解码优化算法", 《莆田学院学报》 * |
黄明政: "一种基于CAVLC解码的快速码表查找算法", 《计算机工程》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2586639C2 (en) | Method and apparatus encoding or decoding | |
CN102132565B (en) | decoding system and method | |
US7592937B1 (en) | CABAC decoding unit and method | |
US7286066B1 (en) | Acceleration of bitstream decoding | |
US7557740B1 (en) | Context-based adaptive binary arithmetic coding (CABAC) decoding apparatus and decoding method thereof | |
EP2191650A1 (en) | Architecture for multi-stage decoding of a cabac bitstream | |
US10110896B2 (en) | Adaptive motion JPEG encoding method and system | |
CN103369315A (en) | Coding and decoding methods, equipment and system of intra-frame chroma prediction modes | |
CN108965878A (en) | A kind of entropy decoding method and device | |
CN103384329A (en) | CAVLC decoding method based on no code table lookup | |
CN115334313A (en) | Video decoding method, device, equipment and storage medium | |
US9154158B2 (en) | Macro-block encoding of skipped video frames | |
CN101267559A (en) | Universal entropy decoding method and device for video decoder | |
CN101895767B (en) | Method for storing and updating AVS inter-frame predicated reference pixel | |
Li et al. | Hybrid pixel encoding: An effective display frame compression algorithm for HD video decoder | |
CN102148971A (en) | Method of designing high-performance low-power consumption CAVLC decoder | |
CN101707484B (en) | Fast exp-Golomb decoding method suitable to be implemented by hardware | |
CN104159106A (en) | Video encoding method and device, and video decoding method and device | |
TWI323130B (en) | Device for video decoding | |
WO2023185806A9 (en) | Image coding method and apparatus, image decoding method and apparatus, and electronic device and storage medium | |
Liu et al. | A Research on Improving of Adaptive Binary Arithmetic Coding Algorithm in H. 264 | |
CN104717499B (en) | A kind of storage method of huffman table and the Hofmann decoding method for JPEG | |
Junior et al. | A Fast and Memory Efficient Huffman Decoding Method for the MPEG-4 AAC Standard | |
CN103533360B (en) | A kind of AVS coding chip is optimized the method that code table stores | |
CN103260022A (en) | Low-power-consumption video decoding method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20131106 |