CN102545910A - Joint photographic experts group (JPEG) Huffman decoding circuit and method - Google Patents

Joint photographic experts group (JPEG) Huffman decoding circuit and method Download PDF

Info

Publication number
CN102545910A
CN102545910A CN2010106180029A CN201010618002A CN102545910A CN 102545910 A CN102545910 A CN 102545910A CN 2010106180029 A CN2010106180029 A CN 2010106180029A CN 201010618002 A CN201010618002 A CN 201010618002A CN 102545910 A CN102545910 A CN 102545910A
Authority
CN
China
Prior art keywords
length
word
huffman
code
bits
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
CN2010106180029A
Other languages
Chinese (zh)
Other versions
CN102545910B (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.)
CRM ICBG Wuxi Co Ltd
Original Assignee
Wuxi China Resources Semico 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 Wuxi China Resources Semico Co Ltd filed Critical Wuxi China Resources Semico Co Ltd
Priority to CN201010618002.9A priority Critical patent/CN102545910B/en
Publication of CN102545910A publication Critical patent/CN102545910A/en
Application granted granted Critical
Publication of CN102545910B publication Critical patent/CN102545910B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a joint photographic experts group (JPEG) Huffman decoding circuit and a decoding method thereof; in a JPEG file header Huffman mark decoding phase, the decoding method comprises the following steps that: (1) a Huffman minimal codeword table is established according to the number of Huffman codewords under different lengths, the bit widths of 16 codewords in the minimal codeword table are respectively 1 bit, 2 bits, 3 bits, 4 bits, 5 bits, 6 bits, 7 bits, 8 bits, 8 bits, 8 bits, 8 bits, 8 bits, 8 bits, 8 bits, 8 bits and 8 bits; (2) a Huffman minimal codeword address table is established according to the number of the Huffman codewords under different lengths; (3) the length of the current Huffman codeword is calculated according to sixteen comparison results which are in parallel and are smaller than a comparator, a run-length encoding value is worked out according to the minimum codeword address table and the decoding data is calculated, wherein the 16 bit widths which are smaller than the comparator are respectively 1 bit, 2 bits, 3 bits, 4 bits, 5 bits, 6 bits, 7 bits, 8 bits, 8 bits, 8 bits, 8 bits, 8 bits, 8 bits, 8 bits, 8 bits and 8 bits.

Description

A kind of jpeg huffman decoding circuit and coding/decoding method thereof
Technical field
The present invention relates to a kind of jpeg huffman decoding circuit and coding/decoding method thereof.
Background technology
Huffman coding is a kind of lossless compressiong based on probability statistics commonly used; It is encoded to the higher code word of probability of occurrence with long bit; Bit with short encodes to the lower code word of probability of occurrence, thereby reached very the compression ratio near theoretical limit.
Traditional Hofmann decoding is normally through relatively realizing by turn; This method at first need reconstruct the huffman code table that is used to decode according to coded message; This code table need take bigger memory space, and the typical code table length of example is about 4Kbit in the Joint Photographic Experts Group.Secondly, adopt the method that compares the by turn code word of decoding of a plurality of clock cycle of needs usually, the big limitations understanding of this method bit rate.
With the immediate prior art of the present invention be the patent application of publication number CN 101017574A; This patent discloses a kind of Hofmann decoding method of the JPEG of being suitable for code stream; This method is set up minimum word table and minimum word address table according to the code word number in the JPEG code stream; In the Hofmann decoding stage input code flow and minimum word table are walked abreast relatively then; Obtain code word size decodes the current Huffman code word afterwards again according to the minimum word address table address, obtain corresponding Huffman code word at last.
But since in the JPEG code stream Huffman code word length length be 16, the minimum word epi-position in the said method wide is 16, when input code flow and minimum word table compare in addition; Need be respectively 1,2,3 with 16 length; ..., 15,16 comparator just can decode current code word length; This will cause decoding speed to reduce, and increases the hardware cost of chip simultaneously.
In application-specific integrated circuit (ASIC) design, decoding speed and chip cost all are the key factors that the designer must consider, should adopt high speed cheaply the Hofmann decoding algorithm reduce the consumption of hardware resource.
Summary of the invention
Because there are the problems referred to above in prior art, the present invention proposes a kind of jpeg huffman decoding circuit and coding/decoding method thereof, and it can effectively solve the problem that prior art exists.
To achieve these goals, the present invention provides a kind of jpeg huffman coding/decoding method, at jpeg file head Huffman mark decode phase, comprises the steps:
Step 1. is set up Huffman minimum word table according to the Huffman code word number under the different length, and the bit wide of 16 code words is respectively 1 in the said minimum word table, and 2,3,4,5,6,7,8,8,8,8,8,8,8,8,8;
Step 2. is set up Huffman minimum word address table according to the Huffman code word number under the different length;
Step 3. calculates the length of current Huffman code word according to 16 parallel comparative results less than comparator, and obtains the Run-Length Coding value and calculate decoded data according to the minimum word address table, and wherein 16 bit wides less than comparator are respectively 1,2; 3,4,5,6,7; 8,8,8,8,8; 8,8,8,8.
Further, step 1 comprises the steps:
Step 1A; From length is that 1 minimum word begins; If code word number corresponding under the current length is 0; Then the minimum word value under this length equals 0, if corresponding code word number is 0 then repeats process 1A under the next length, if corresponding code word number is not 0 then execution in step 1B under the next length;
Step 1B calculates minimum word value corresponding under the current length through following formula:
Wherein, MinCode (i) is the minimum word value of current length when being i, and Num (i) is that length is the code word number of i;
If beginning to length from next length is that 16 pairing code word number all are 0 then carry out 1C, otherwise repeats process 1B.
Step 1C, beginning to length from current length is that 16 minimum word all equals 255, promptly 8 complete 1.
Further, step 2 is calculated the Huffman minimum word address table under the different length through following formula
Figure BDA0000041918940000031
Wherein, MinAddr (i) is the Huffman minimum word address table of length when being i, and Num (i) is that length is the code word number of i.
Further, step 3 comprises the steps:
Step 3A; Preceding 8 less than comparator in, effectively input code flow is preceding n bit data, the minimum word value when effective input code flow valuve and current length are n compares; The minimum word value when if effectively value is n less than current length before the input code flow; Then comparator output result is 0, otherwise comparator output result is 1, wherein 1≤n≤8;
Step 3B, back 8 less than comparator in, at first judge this code word and whether possibly be long code word according to input code flow, promptly whether code word size greater than 8, if current enter code word long code word certainly not, comparator output result directly is 0; It if possible is long code word;, effectively input code flow is ensuing 8 bit data afterwards of n-8 position before giving up, 8 minimum word values when then 8 effective input code flow valuves and current length being n compare; 8 minimum word values when if 8 effective input code flow valuves are n less than current length; Then comparator output result is 0, otherwise comparator output result is 1, wherein 9≤n≤16;
Step 3C obtains final code word size CodeLen through following formula with all comparative result additions:
CodeLen = Σ n = 1 16 Comp ( n ) 1≤n≤16, wherein Comp (n) is comparator output result;
Step 3D; Calculate the minimum word address min_adress:min_adress=MinAddr(CodeLen under this length according to the current code word size that decodes by following formula); Wherein
Figure BDA0000041918940000042
is that length is the Huffman minimum word address of CodeLen
Calculate minimum word value
Figure BDA0000041918940000043
min_code_value=MinCode (CodeLen) under this length according to the current code word size that decodes through following formula, wherein MinCode (CodeLen) is that length is the minimum word value of CodeLen;
Calculate the address value symbol_adress of current code word in huffman code table according to effective input code flow, minimum word value and minimum word address through following formula:
Symbol_adress=ValidData (CodeLen)+min_code_value-min_address, wherein
Figure BDA0000041918940000044
length is effective input code flow of CodeLen;
Search the Huffman code word table according to symbol_adress at last and just can obtain the corresponding Run-Length Coding value of current code word.
Wherein, Judging whether among the step 3B maybe be for long code word comprises the steps: if the highest order of input code flow is 1, and then this input code flow possibly be that length is 9 long code word, if the highest 2 of input code flow are 1 entirely; Then this input code flow possibly be that length is 10 long code word; By that analogy, if the most-significant byte of input code flow is 1 entirely, then this input code flow possibly be that length is 16 long code word.
Simultaneously, the invention also discloses a kind of jpeg huffman decoding circuit, comprise the minimum word table module of setting up Huffman minimum word table according to the Huffman code word number under the different length; Set up the minimum word address table module of Huffman minimum word address table according to the Huffman code word number under the different length; The Huffman code word table module of storage Huffman code word table; The comparator array module that comprises a plurality of comparators; Wherein the input of each comparator links to each other with current minimum word value with effective input code flow in the comparator array module, and output links to each other with the input of first adder respectively; The input of shift register links to each other with input code flow and first adder output respectively, and output links to each other with the input of second adder; The input of minimum word table module links to each other with the output of first adder, and output links to each other with the input of subtracter; The input of minimum word address table module links to each other with the output of first adder, and output links to each other with the input of subtracter; The output of subtracter links to each other with the input of second adder; The output of second adder links to each other with Huffman code word table module.
Further; The comparator array module also comprises 8 and door; Whether 8 possibly link to each other for the long code word of length 9 to 16 with output and current effective input code flow of the 9th to the 16 comparator respectively with the input of door successively; Output links to each other with the input of first adder, if wherein current effective input code flow is 1 to express possibility and be long code word, if be that 0 expression can not be long code word.
The jpeg huffman coding/decoding method that prior art provided needs bit wide to be respectively 1, and 2,3,4,5,6,7,8; 9,10,11,12,13,14,15,16 Huffman minimum word table and 16 bit wides are respectively 1; 2,3,4,5,6,7,8,9; 10,11,12,13,14,15,16 data comparator could be decoded to the current Huffman code word, and jpeg huffman decoding circuit provided by the present invention and coding/decoding method thereof only need bit wide to be respectively 1; 2,3,4,5,6,7,8,8; 8,8,8,8,8,8,8 Huffman minimum word table and 16 bit wides are respectively 1,2; 3,4,5,6,7,8,8,8; 8,8,8,8,8,8 data comparator just can be decoded to the current Huffman code word, can save minimum word table register resource and comparator resource in a large number like this, in high-speed decoding, has reduced the consumption of hardware resource effectively.
Description of drawings
Fig. 1 is the circuit diagram of jpeg huffman decoding of the present invention;
Fig. 2 is a minimum word table calculation flow chart of the present invention;
Fig. 3 is a minimum word address table calculation flow chart of the present invention;
Fig. 4 is that code word size of the present invention calculates sketch map.
Embodiment
For make above-mentioned purpose of the present invention, feature and advantage can be more obviously understandable, below in conjunction with accompanying drawing and embodiment the present invention done further detailed description.
As shown in Figure 1, the invention discloses a kind of jpeg huffman decoding circuit.This circuit comprises the minimum word table module of setting up Huffman minimum word table according to the Huffman code word number under the different length; Set up the minimum word address table module of Huffman minimum word address table according to the Huffman code word number under the different length; The Huffman code word table module of storage Huffman code word table; The comparator array module that comprises a plurality of comparators.
Wherein, the input of each comparator links to each other with current minimum word value with effective input code flow in the comparator array module, and output links to each other with the input of first adder respectively; The input of shift register links to each other with input code flow and first adder output respectively, and output links to each other with the input of second adder; The input of minimum word table module links to each other with the output of first adder, and output links to each other with the input of subtracter; The input of minimum word address table module links to each other with the output of first adder, and output links to each other with the input of subtracter; The output of subtracter links to each other with the input of second adder; The output of second adder links to each other with Huffman code word table module.
In addition; The comparator array module also comprises 8 and door; Whether 8 inputs with door possibly link to each other for the long code word (long_code_9 to long_code_15) of length 9 to 16 with output and current effective input code flow of the 9th to the 16 comparator respectively successively; Output links to each other with the input of first adder, if wherein current effective input code flow is 1 to express possibility and be long code word, if be that 0 expression can not be long code word.
As shown in Figure 1; Effective input data of intercepting are input to an end of 16 comparators respectively simultaneously in the code stream input data; Compare with corresponding minimum word; Wherein, The final output result of 16 comparators of the 9th comparator to the is only just effective when current effective input data maybe be for long code word; This partial function through with comparator results and long code word sign with realize; The final output of 16 comparators sum as a result is exactly the length of current Huffman code word, through the Huffman code word under the corresponding length in the current input code flow data of data shift device intercepting, according to current code word length from minimum word table finds out minimum word current length under simultaneously according to current code word length; Huffman code word under will the corresponding length of intercepting from current input code flow data is subtracted each other with corresponding minimum word and is added that current effective input code flow just can obtain the index address of Huffman code word table, can take out the corresponding Run-Length Coding value of current Huffman code word according to this address value.
According to the foregoing circuit design, the invention also discloses a kind of jpeg huffman coding/decoding method.
At first, the Huffman minimum word table that execution in step 1. is set up according to the Huffman code word number under the different length at jpeg file head Huffman mark decode phase, the bit wide of preceding 8 code words is respectively 1 in this minimum word table; 2,3,4; 5,6,7; 8, the bit wide of back 8 code words all is 8;
Suppose that length in the jpeg file head Huffman marker field is that the code word number of i is Num (i), wherein 1≤i≤16.As shown in Figure 2, corresponding Huffman minimum word table calculates through following process:
Step 1A; From length is that 1 minimum word begins; If code word number corresponding under the current length is 0, then the minimum word value MinCode (1) under this length equals 0, if corresponding code word number is 0 then repeats process 1A under the next length); If code word number corresponding under the next length is not 0, then carry out 1B);
Step 1B calculates minimum word value corresponding under the current length through following formula
Figure BDA0000041918940000081
If beginning to length from next length is that 16 pairing code word number all are 0, promptly Num (i) is 0 execution 1C to Num (16) entirely), otherwise repeat process 1B).Wherein, MinCode (1) equals 0 all the time by the decision of jpeg huffman coding character in the formula;
Step 1C, beginning to length from current length is that to be MinCode (i) all equal 255, promptly 8 complete 1 to MinCode (16-i) for 16 minimum word;
The bit wide of the MinCode that obtains in the aforementioned calculation process (1)~MinCode (16) is respectively 1, and 2,3,4,5,6,7,8,8,8,8,8,8,8,8,8.
Need to prove; Because the characteristic of huffman coding in the JPEG code stream; Can prove when code word size greater than 8 the time; All bits that are higher than the 8th of this code word are 1 entirely, get final product so when decoding compute codeword length is greater than 8 minimum word, only need preserve its least-significant byte, briefly introduce the proof procedure of above-mentioned Huffman code word characteristic below:
Code word size is that the minimum word of l can be calculated through following binary fraction formula:
Σ i = 1 l - 1 n i · 2 - i (formula one)
N wherein iBe that code word size is the code word number of i.
So that the figure place of the fractional part of this binary fraction equals code word size, the fractional part of this binary fraction is exactly corresponding with it Huffman code word string so in this binary fraction least significant bit zero padding (if needed).The length of the Huffman code word of using in the JPEG compression standard is 1~16, and according to kraft inequality, the summation that can obtain whole binary system Huffman code word tree equals 1:
Σ i = 1 16 n i · 2 - i = Σ i = 1 8 n i · 2 - i + Σ i = 9 16 n i · 2 - i = 1
N wherein iBe that code word size is the code word number of i.
Simultaneously again because
2 - 9 Σ i = 9 16 n i > Σ i = 9 16 n i · 2 - i
So
Σ i = 1 8 n i · 2 - i + 2 - 9 Σ i = 9 16 n i > Σ i = 1 8 n i · 2 - i + Σ i = 9 16 n i · 2 - i = 1
Promptly
Σ i = 1 8 n i · 2 - i > 1 - 2 - 9 Σ i = 9 16 n i
For any huffman code table in the JPEG compression standard:
&Sigma; i = 9 16 n i < 256
So
2 - 9 &Sigma; i = 9 16 n i < 0.5
Promptly
1 - 2 - 9 &Sigma; i = 9 16 n i > 0.5
So
&Sigma; i = 1 8 n i &CenterDot; 2 - i > 1 - 2 - 9 &Sigma; i = 9 16 n i > 0.5
In conjunction with formula one, can find out that from following formula the highest order of minimum word under 9 bit lengths is 1 certainly, for the longer code word of length, can prove out that all bits that are higher than the 8th of this code word are 1 entirely through identical method.
As shown in Figure 3, then execution in step 2. is calculated the Huffman minimum word address table under the different length through following formula when calculating Huffman minimum word table;
Figure BDA0000041918940000103
Following table has provided AC component code word number table in the real JPEG code stream, has also provided simultaneously the result of calculation of step 1 and step 2 in this specific embodiment;
Code word size Code word number Minimum word (binary system) The minimum word address
1 0 0 0
2 2 00 0
3 1 100 2
4 3 1010 3
5 3 11010 6
6 2 111010 9
7 4 1111000 11
8 3 11111000 15
9 5 11110110 18
10 5 11110110 23
11 4 11110110 28
12 4 11110000 32
13 0 11110100 36
14 0 11100000 36
15 1 11000000 36
16 125 10000010 37
As shown in Figure 4, then execution in step 3. the jpeg image Hofmann decoding stage according to 16 parallel comparative results less than comparator, calculate the length of current Huffman code word, and obtain Run-Length Coding value (RUN/SIZE) according to the minimum word address table.
Suppose that current 16 input code flows are 16 ' b1111111000111001 in the Hofmann decoding process, then concrete computational process is:
The comparative result of supposing 16 comparators is Comp (n), and will be stated to be effective input code flow ValidData (n) less than the fan-in that is connected with input code flow in the comparator, 1≤n≤16 wherein,
Step 3A, in preceding 8 comparators, ValidData (n) is n position before the input code flow; ValidData (n) and MinCode (n) are compared, if ValidData (n) less than MinCode (n), comparative result Comp (n)=0; Otherwise output Comp (n)=1, wherein 1≤n≤8;
Step 3B in back 8 comparators, at first judges this code word according to input code flow and whether possibly be long code word (whether code word size is greater than 8); If the highest order of input code flow is 1, then this input code flow possibly be that length is 9 long code word, if the highest 2 of input code flow are 1 entirely; Then this input code flow possibly be that length is 10 long code word; By that analogy, if the most-significant byte of input code flow is 1 entirely, then this input code flow possibly be that length is 16 long code word.
If current enter code word is not a long code word, comparator output result directly is 0; If long code word is given up input code flow height (n-8) position, ValidData (n) is ensuing 8 bit data in the input code flow; ValidData (n) and MinCode (n) are compared; If ValidData (n) is less than MinCode (n), comparative result Comp (n)=0, otherwise output Comp (n)=1; 9≤n≤16 wherein, following table has provided result of calculation in this specific embodiment:
Figure BDA0000041918940000121
Figure BDA0000041918940000131
Step 3C obtains final code word size CodeLen through following formula with all comparative result additions
CodeLen = &Sigma; n = 1 16 Comp ( n ) 1≤n≤16
From last table, can find out CodeLen=10 in the present embodiment.
Step 3D calculates the minimum word address min_adress under this length according to the current code word size that decodes through following formula:
min_adress=MinAddr(CodeLen)=MinAddr(10)=23;
Calculate the minimum word value min_code_value under this length according to the current code word size that decodes through following formula:
min_code_value=MinCode(CodeLen)=MinCode(10)=8′b11110110;
Calculate the address value symbol_adress of current code word in huffman code table according to effective input code flow, minimum word value and minimum word address through following formula:
symbol_adress=ValidData(CodeLen)+min_code_value-min_address
=8′b11111000-8′b11110110+23=25;
Search the Huffman code word table according to symbol_adress at last and just can obtain the corresponding Run-Length Coding value of current code word.
Though above-mentioned preferred embodiment has at large been explained method of the present invention, need to prove, the invention is not restricted to the preceding text preferred embodiment.Those skilled in the art should recognize under the situation that does not break away from given technical characterictic of technical scheme of the present invention and scope, and the increase that technical characterictic is done, with the replacement of some same contents of this area all should belong to protection scope of the present invention.

Claims (7)

1. a jpeg huffman coding/decoding method is characterized in that, at jpeg file head Huffman mark decode phase, comprises the steps:
Step 1. is set up Huffman minimum word table according to the Huffman code word number under the different length, and the bit wide of 16 code words is respectively 1 in the said minimum word table, and 2,3,4,5,6,7,8,8,8,8,8,8,8,8,8;
Step 2. is set up Huffman minimum word address table according to the Huffman code word number under the different length;
Step 3. calculates the length of current Huffman code word according to 16 parallel comparative results less than comparator, and obtains the Run-Length Coding value and calculate decoded data according to the minimum word address table, and wherein 16 bit wides less than comparator are respectively 1,2; 3,4,5,6,7; 8,8,8,8,8; 8,8,8,8.
2. jpeg huffman coding/decoding method according to claim 1 is characterized in that step 1 comprises the steps:
Step 1A; From length is that 1 minimum word begins; If code word number corresponding under the current length is 0; Then the minimum word value under this length equals 0, if corresponding code word number is 0 then repeats process 1A under the next length, if corresponding code word number is not 0 then execution in step 1B under the next length;
Step 1B calculates minimum word value corresponding under the current length through following formula:
Figure FDA0000041918930000011
Wherein, MinCode (i) is the minimum word value of current length when being i, and Num (i) is that length is the code word number of i;
If beginning to length from next length is that 16 pairing code word number all are 0 then carry out 1C, otherwise repeats process 1B.
Step 1C, beginning to length from current length is that 16 minimum word all equals 255, promptly 8 complete 1.
3. jpeg huffman coding/decoding method according to claim 1 is characterized in that, step 2 is calculated the Huffman minimum word address table under the different length through following formula
Figure FDA0000041918930000021
Wherein, MinAddr (i) is the Huffman minimum word address table of length when being i, and Num (i) is that length is the code word number of i.
4. jpeg huffman coding/decoding method according to claim 1 is characterized in that step 3 comprises the steps:
Step 3A; Preceding 8 less than comparator in, effectively input code flow is preceding n bit data, the minimum word value when effective input code flow valuve and current length are n compares; The minimum word value when if effectively value is n less than current length before the input code flow; Then comparator output result is 0, otherwise comparator output result is 1, wherein 1≤n≤8;
Step 3B, back 8 less than comparator in, at first judge this code word and whether possibly be long code word according to input code flow, promptly whether code word size greater than 8, if current enter code word long code word certainly not, comparator output result directly is 0; It if possible is long code word; Effectively input code flow is ensuing 8 bit data after the n-8 position before giving up; 8 minimum word values when then 8 effective input code flow valuves and current length being n compare, if 8 minimum word values when 8 effective input code flow valuves are n less than current length, then comparator output result is 0; Otherwise comparator output result is 1, wherein 9≤n≤16;
Step 3C obtains final code word size CodeLen through following formula with all comparative result additions:
CodeLen = &Sigma; n = 1 16 Comp ( n ) 1≤n≤16, wherein Comp (n) is comparator output result;
Step 3D; Calculate the minimum word address min_adress:min_adress=MinAddr(CodeLen under this length according to the current code word size that decodes by following formula); Wherein
Figure FDA0000041918930000032
is that length is the Huffman minimum word address of CodeLen
Calculate minimum word value min_code_value=MinCode (CodeLen) under this length according to the current code word size that decodes through following formula, wherein MinCode (CodeLen) is that length is the minimum word value of CodeLen;
Calculate the address value symbol_adress of current code word in huffman code table according to effective input code flow, minimum word value and minimum word address through following formula:
Symbol_adress=ValidData (CodeLen)+min_code_value-min_address, wherein
Figure FDA0000041918930000034
length is effective input code flow of CodeLen;
Search the Huffman code word table according to symbol_adress at last and just can obtain the corresponding Run-Length Coding value of current code word.
5. jpeg huffman coding/decoding method according to claim 4 is characterized in that, judges whether among the step 3B to comprise the steps: if the highest order of input code flow is 1 for long code word; Then this input code flow possibly be that length is 9 long code word; If the highest 2 of input code flow is 1 entirely, then this input code flow possibly be that length is 10 long code word, by that analogy; If the most-significant byte of input code flow is 1 entirely, then this input code flow possibly be that length is 16 long code word.
6. a jpeg huffman decoding circuit is characterized in that: comprise
Set up the minimum word table module of Huffman minimum word table according to the Huffman code word number under the different length;
Set up the minimum word address table module of Huffman minimum word address table according to the Huffman code word number under the different length;
The Huffman code word table module of storage Huffman code word table;
The comparator array module that comprises a plurality of comparators; Wherein
The input of each comparator links to each other with current minimum word value with effective input code flow in the comparator array module, and output links to each other with the input of first adder respectively;
The input of shift register links to each other with input code flow and first adder output respectively, and output links to each other with the input of second adder;
The input of minimum word table module links to each other with the output of first adder, and output links to each other with the input of subtracter;
The input of minimum word address table module links to each other with the output of first adder, and output links to each other with the input of subtracter;
The output of subtracter links to each other with the input of second adder;
The output of second adder links to each other with Huffman code word table module.
7. jpeg huffman decoding circuit according to claim 6; It is characterized in that; The comparator array module also comprise 8 with door, whether 8 possibly link to each other for the long code word of length 9 to 16 with output and current effective input code flow of the 9th to the 16 comparator respectively with the input of door successively, output links to each other with the input of first adder; If wherein current effective input code flow is 1 to express possibility and be long code word, if be that 0 expression can not be long code word.
CN201010618002.9A 2010-12-30 2010-12-30 A kind of jpeg huffman decoding circuit and coding/decoding method thereof Active CN102545910B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010618002.9A CN102545910B (en) 2010-12-30 2010-12-30 A kind of jpeg huffman decoding circuit and coding/decoding method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010618002.9A CN102545910B (en) 2010-12-30 2010-12-30 A kind of jpeg huffman decoding circuit and coding/decoding method thereof

Publications (2)

Publication Number Publication Date
CN102545910A true CN102545910A (en) 2012-07-04
CN102545910B CN102545910B (en) 2015-10-28

Family

ID=46351980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010618002.9A Active CN102545910B (en) 2010-12-30 2010-12-30 A kind of jpeg huffman decoding circuit and coding/decoding method thereof

Country Status (1)

Country Link
CN (1) CN102545910B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547906A (en) * 2017-08-29 2018-01-05 郑州云海信息技术有限公司 A kind of method and apparatus of jpeg image decoding
WO2023109019A1 (en) * 2021-12-17 2023-06-22 苏州浪潮智能科技有限公司 Dynamic code table generation device and method based on deflate huffman coding

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5208593A (en) * 1991-07-30 1993-05-04 Lsi Logic Corporation Method and structure for decoding Huffman codes using leading ones detection
CN101017574A (en) * 2007-02-16 2007-08-15 上海广电集成电路有限公司 Huffman decoding method suitable for JPEG code stream
CN101147325A (en) * 2004-12-31 2008-03-19 英特尔公司 Fast compact decoder for Huffman codes
CN101394564A (en) * 2007-09-17 2009-03-25 辉达公司 Decoding variable lenght codes in jpeg applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5208593A (en) * 1991-07-30 1993-05-04 Lsi Logic Corporation Method and structure for decoding Huffman codes using leading ones detection
CN101147325A (en) * 2004-12-31 2008-03-19 英特尔公司 Fast compact decoder for Huffman codes
CN101017574A (en) * 2007-02-16 2007-08-15 上海广电集成电路有限公司 Huffman decoding method suitable for JPEG code stream
CN101394564A (en) * 2007-09-17 2009-03-25 辉达公司 Decoding variable lenght codes in jpeg applications

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
董培良 等: "一种快速霍夫曼解码算法及其软硬件实现", 《复旦学报(自然科学版)》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547906A (en) * 2017-08-29 2018-01-05 郑州云海信息技术有限公司 A kind of method and apparatus of jpeg image decoding
CN107547906B (en) * 2017-08-29 2020-02-21 郑州云海信息技术有限公司 JPEG image decoding method and device
WO2023109019A1 (en) * 2021-12-17 2023-06-22 苏州浪潮智能科技有限公司 Dynamic code table generation device and method based on deflate huffman coding

Also Published As

Publication number Publication date
CN102545910B (en) 2015-10-28

Similar Documents

Publication Publication Date Title
US9454552B2 (en) Entropy coding and decoding using polar codes
CN101017574A (en) Huffman decoding method suitable for JPEG code stream
US7612694B1 (en) Efficient coding of small integer sets
CN103546161A (en) Lossless compression method based on binary processing
CN109495211B (en) Channel coding and decoding method
US6778109B1 (en) Method for efficient data encoding and decoding
CN102089985A (en) Apparatus and method for transmitting data using a CTC (Convolutional Turbo Code) encoder in a mobile communication system
CN101595645A (en) The method and system of transmission/reception serial data and serial communication system thereof in the serial communication system
CN104980161A (en) Huffman decoding method and device
Beirami et al. Fundamental limits of universal lossless one-to-one compression of parametric sources
CN102545910A (en) Joint photographic experts group (JPEG) Huffman decoding circuit and method
CN107181567B (en) Low-complexity MPA algorithm based on threshold
JPH05183443A (en) Code conversion method
CN201966895U (en) JPEG Hoffman decoding circuit
CN103428502B (en) Decoding method and decoding system
CN102651795B (en) Run-length reduced binary sequence compressed encoding method
CN101834612A (en) Encoding method of LDPC (Low Density Parity Check) code and encoder
CN114614832A (en) Test data compression and decompression method based on front and back run length coding
US8854235B1 (en) Decompression circuit and associated compression method and decompression method
CN107888201B (en) Full-parallel high-throughput LDPC decoding method
CN108566210B (en) LDPC (Low Density parity check) coding system and method compatible with IEEE (institute of Electrical and electronics Engineers) 802.11n standard and LDPC coder
Setia et al. Enhanced LZW algorithm with less compression ratio
CN101707484A (en) Fast exp-Golomb decoding method suitable to be implemented by hardware
CN201054155Y (en) A Huffman decoding device suitable for JPEG
Kaur et al. Lossless text data compression using modified Huffman Coding-A review

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 214135 -6, Linghu Avenue, Wuxi Taihu international science and Technology Park, Wuxi, Jiangsu, China, 180

Patentee after: China Resources micro integrated circuit (Wuxi) Co., Ltd

Address before: 214061 Jiangsu city of Wuxi province Liangxi Road No. 14

Patentee before: WUXI CHINA RESOURCES SEMICO Co.,Ltd.