CN101808248A - Adaptive paradigm Hoffmann decoder, method thereof and image decoder - Google Patents

Adaptive paradigm Hoffmann decoder, method thereof and image decoder Download PDF

Info

Publication number
CN101808248A
CN101808248A CN 200910006693 CN200910006693A CN101808248A CN 101808248 A CN101808248 A CN 101808248A CN 200910006693 CN200910006693 CN 200910006693 CN 200910006693 A CN200910006693 A CN 200910006693A CN 101808248 A CN101808248 A CN 101808248A
Authority
CN
China
Prior art keywords
index value
yard
code word
signal
symbol
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
CN 200910006693
Other languages
Chinese (zh)
Other versions
CN101808248B (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.)
Novatek Microelectronics Corp
Original Assignee
Novatek Microelectronics Corp
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 Novatek Microelectronics Corp filed Critical Novatek Microelectronics Corp
Priority to CN 200910006693 priority Critical patent/CN101808248B/en
Publication of CN101808248A publication Critical patent/CN101808248A/en
Application granted granted Critical
Publication of CN101808248B publication Critical patent/CN101808248B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to an adaptive paradigm Hoffmann decoder, a method thereof and an image decoder. The adaptive paradigm Hoffmann decoder comprises a symbol index value generator, a content selector and a symbol table buffer memory circuit, wherein the content selector is used for outputting a content selecting signal; the symbol table buffer memory circuit reads a corresponding symbol table from a plurality of symbol tables stored by an external memory according to the content selecting signal and stores the corresponding symbol table; the symbol index value generator is used for storing decoding information of a plurality of encode tables and selecting corresponding decoding information from a plurality of kinds of decoding information according to the content selecting signal; the symbol index value generator receives bittorrent and compares the bittorrent to decode according to the corresponding decoding information to solve a symbol index value; and then, the symbol table buffer memory circuit solves an output symbol from the corresponding symbol table according to the symbol index value.

Description

Adaptive paradigm Hoffmann decoder and method thereof and image decoder
Technical field
The present invention relates to a kind of entropy decoder (entropy decoder), and be particularly related to a kind of adaptive paradigm Hoffmann decoder (adaptive canonical Huffman decoder) and method thereof, and the image decoder that uses this adaptability normal form Hafman decoding device or its method.
Background technology
Huffman encoding (Huffman coding) is a kind of entropy coding (entropy coding) that is usually used in the image compression (image or video compression), and Huffman encoding is a kind of existence undistorted compression (lossless compression) method for a long time.Yet, when using Huffman encoding, decoder need be known the structure of Huffman encoding tree, so encoder must send the Huffman encoding tree to decoder in bit stream (bit stream), and perhaps the decoder Huffman encoding that must use its and encoder to appoint is in advance set.
Yet along with the progress in epoch, the data volume of required compression is more and more huge, if therefore transmit the Huffman encoding tree in bit stream, the compression ratio of data can be reduced widely.Though, in decoder, store huge Huffman encoding tree in advance and can solve the problem that compression ratio is lowered,, in advance huge Huffman encoding tree is stored in the hardware resource that then can occupy entire decoder or image decoder in the decoder in large quantities.
In order to solve the above problems, normal form Huffman encoding (canonical Huffman coding) is by Schwartz[1964] propose, the normal form Huffman encoding belongs to optimization pre-coded (optimal prefix coding) and non-isometric coding (variable length coding) equally with Huffman encoding.The normal form Huffman encoding is a subclass of Huffman encoding, and its main feature is to add some compulsory agreements in Huffman encoding, makes decoder only need know that information seldom just can reconstruct whole Huffman encoding tree.
The most important agreement of normal form Huffman encoding is exactly the agreement of Serial No. attribute (numerical sequence property), and the code word of these all equal length of agreed specifications (codeword) is continuous binary numeral.For instance, be 0010 if code word size is 4 first yard (first code), then other code word sizes be 4 code word must be for 0011,0100,0101 ... etc.Except the agreement of Serial No. attribute, the normal form Huffman encoding has also added other agreement.According to these agreements, the normal form Huffman encoding can be divided into two kinds, and wherein a kind of is the normal form Huffman encoding of kind 1, and is another kind of then be the normal form Huffman encoding of kind 2.
The decoding process of tradition normal form Huffman encoding adopts the mode of software decode mostly, yet, when the decision code word size is the practice that adopts in proper order, therefore, when code word size is longer, adopt the mode meeting of software decode too low, and can not be applied under some systems that speed requirement is arranged, for example: real-time system (real-time system) because of efficient.
In the 5th, 173, No. 695 patents of the U.S., Ming-Ting Sun uses hardware structure to come non-isometric sign indicating number (Variable Length Code) is decoded.Because the normal form Huffman encoding also belongs to a kind of of non-isometric sign indicating number, so decoder also can be used in the decoding of normal form Huffman encoding.Please refer to Figure 1A, Figure 1A is the system block diagrams of the U.S.'s non-isometric sign indicating number decoder 10 that the 5th, 173, No. 695 patent provided.This traditional decoder 10 comprises register 101,102, tubbiness (barrel) register 103, adder 104 and look-up table (lookup table) 11.Wherein, look-up table 11 has comprised codeword table 110, decoding symbols table (decoded symbol table) 111 and code word size table 112.The relation that couples of each element in the normal form Hafman decoding device 10 is not just given unnecessary details at this as shown in Figure 1A.
This traditional decoder 10 utilizes codeword table 110 to remove the bit stream of parallel comparison input, and then will compare resulting code word size and decoding symbols output.Codeword table 110, code word size table 112 are stored by programmable logic array (programmable logic array) with decoding symbols table 111, and therefore the speed of the decoding of traditional decoder 10 is very fast.This traditional decoder 10 can solve a symbol (1 symbol/cycle) in each clock cycle, therefore can meet the demand of many real-time systems.
But along with the progress of coding algorithm, the someone has proposed the notion of content adaptability (content adaptive), and the main demand of this notion is under different coding environments, and the probability distribution of various symbols should be different to some extent.Therefore, under different environment, encoder can adopt different coding schedules to encode, and decoder then must select the corresponding codes table to decode.For example in the specification of VC-1, have 8 interchanges (AC) coding schedule altogether, and VC-1 can according between quantization parameter (quantization parameter, be called for short QP) or picture with picture in the otherness of (inter/intra) decide and use that AC coding schedule to encode.
H.264, some recent image encoding standards (video coding standard) for example reach VC-1 and all use this notion.If make a decoder in fact, then must add a coding schedule and select signal and two multiplexers to select correct decoding symbols with content adaptability with the notion of the 5th, 173, No. 695 patents of the U.S..
Please refer to Figure 1B, Figure 1B be utilize the 5th, 173, No. 695 patents of the U.S. notion a real system block diagrams of doing with decoder 20 of content adaptability.Decoder 20 comprises register 201,202, tubbiness register 203, adder 204, first look-up table 21, second look-up table 22, the 3rd look-up table 23, the 4th look-up table 24 and multiplexer 205,206.Wherein, first to fourth look-up table 21~24 has been stored the content of its corresponding different coding table, and for example, first look-up table 21 has comprised codeword table, decoding symbols table and the code word size table in its corresponding codes table.The relation that couples of each element in the decoder 20 is not just given unnecessary details at this as shown in Figure 1B.
Decoder 20 is the bit streams that utilize the parallel comparison input of programmable logic array, each look-up table 21~24 all can be exported a decoding symbols and code word size, and coding schedule selects signal Table_sel then to select a correct decoding symbols and code word size in order to control multiplexer 205 and 206.Yet along with the increase of coding schedule, the hardware cost of this kind execution mode also can equal proportion be grown up.Though this kind execution mode is applicable to all non-isometric sign indicating number decodings (variable length decoding) and be easy to real work, but under the application of content adaptability coding (content adaptive coding), its hardware cost can increase many.
Though, the U.S. the 5th, 173, the decode time of No. 695 decoders that patent provided is quick, and its hardware is easy to real work, and of many uses, even can be used to the real decoder of making all non-isometric sign indicating numbers.But, on real work of the decoder of normal form Huffman encoding, owing to do not use the characteristic that the normal form Huffman encoding does not need to store whole coding binary tree attentively, so, use the U.S. the 5th, when the decoder that 173, No. 695 patent provided to make normal form Hafman decoding device in fact, have the too high problem of hardware cost.
Therefore, in the 6th, 657, No. 569 patents of the U.S., Mark L.Barnett has proposed a normal form Hafman decoding device that utilizes hardware-accelerated decoding.Please refer to Fig. 2, Fig. 2 is the system block diagrams of the 6th, 657, No. 569 normal form Hafman decoding devices 30 that patent provided of the U.S..Normal form Hafman decoding device 30 has comprised first yard register 301, symbol index register 302, comparator 330~33N, subtracter 350~35N, adder 340~34N and multiplexer 312.Wherein, the relation that couples in the normal form Hafman decoding device 30 between each element just repeats no more as shown in Figure 2.
Outside memory can write down a plurality of different coding schedules, and each coding schedule has first code table (first code table), the symbol index table (symbol pointer table) and symbol table (symbol table) of its correspondence.First yard register 301 can be selected first code table corresponding with the current encoder table in a plurality of first code tables that outside memory is stored, wherein, having write down code word size in selected first code table is first yard FIRSTCODE[0 of 1 to N+1]~FIRSTCODE[N].Index register 302 is selected one and current encoder table corresponding symbol index table in a plurality of symbol index tables that outside memory is stored, wherein, index register 302 is only stored and first yard register 301 pairing a plurality of first yard symbol index S YM_PTR[0]~SYM_PTR[N], wherein, SYM_PTR[i] the indication code word length is first yard the symbol index of i+1, i is 0 to N integer.
Normal form Hafman decoding device 30 is characteristics of utilizing the normal form Huffman encoding, removes parallel relatively more all first yard and the bit stream of input, utilizes multiplexer 312 to remove to select correct code word size and address signal then.At last, in external memory storage, read correct decoding symbols with resulting address signal.
Because the input of normal form Hafman decoding device 30 and output all must be carried out access to the memory of outside, so in the system that uses normal form Hafman decoding device 30, all storage access all must decide the power of access memory by the arbitration of moderator (arbiter), so can be slow on the speed.Therefore, in some real-time systems, normal form Hafman decoding device 30 may not reach the demand of speed.In addition, normal form Hafman decoding device 30 can only be decoded to the normal form Huffman encoding of kind 2, and when normal form Hafman decoding device 30 applies to image decoder, so that considering on the speed, just generally all only can after having separated a picture, allow to upgrade the decoded information of corresponding codes table.Therefore, normal form Hafman decoding device 30 does not more have versatility in application and use.
In sum, traditional normal form Hafman decoding device can't be taken into account hardware cost and decoding efficiency, and can't make it have versatility.
Summary of the invention
Example embodiment of the present invention provides a kind of adaptive paradigm Hoffmann decoder, and this adaptive paradigm Hoffmann decoder comprises notation index value generator, content choice device and symbol table buffer storage circuit.Wherein, the content choice device is coupled to notation index value generator, and the symbol table buffer storage circuit is coupled to notation index value generator and content choice device.The content choice device is selected signal in order to output content.Notation index value generator is in order to storing the decoded information of a plurality of coding schedules, and according to selecting corresponding decoded information in a plurality of since then decoded informations of content choice signal.The symbol table buffer storage circuit reads corresponding symbol table according to the content choice signal in a plurality of symbol tables that external memory storage is stored, and stores this corresponding symbol table.Afterwards, notation index value generator receives bit stream, and according to corresponding decoded information to bit stream decoding, to solve the notation index value.Then, the symbol table buffer storage circuit solves output symbol according to the notation index value in corresponding symbol table.
According to example embodiment of the present invention, above-mentioned notation index value generator comprises comparator circuit, multiplexer, notation index value counting circuit and decoded information generator.Wherein, multiplexer is coupled to comparator circuit, and notation index value counting circuit is coupled to multiplexer, and the decoded information generator is coupled to the content choice device.The decoded information generator is in order to storing the decoded information of a plurality of coding schedules, and selects corresponding decoded information according to the content choice signal in a plurality of decoded informations.Comparator circuit has N comparator of 1 to N position, in order to compare the size of individual first yard of bit stream and N, selects signal to produce N.It is that first yard of L is first yard index value of L with option code word length in the individual first yard index value of N that multiplexer is selected signal and N identification signal option code word length in individual first yard of N according to N, wherein, N is more than or equal to 2, L is the natural number smaller or equal to N, and whether N identification signal is 1 to N N first yard in order to the indication code word length and exists.Notation index value counting circuit according to code word size be first yard index value, the code word size of L be first yard of L with bit stream in L the formed code word in position calculate the notation index value.
Example embodiment of the present invention provides a kind of image decoder, and this image decoder comprises adaptive paradigm Hoffmann decoder and decode controller.Wherein, the adaptive paradigm Hoffmann decoder comprises notation index value generator, content choice device and symbol table buffer storage circuit.Wherein, the content choice device is coupled to notation index value generator, and the symbol table buffer storage circuit is coupled to notation index value generator and content choice device, and decode controller is coupled to notation index value generator and symbol table buffer storage circuit.The content choice device is selected signal in order to output content.Notation index value generator is in order to storing the decoded information of a plurality of coding schedules, and selects corresponding decoded information according to the content choice signal in a plurality of decoded informations.Notation index value generator is more in order to receiving bit stream, and according to corresponding decoded information bit stream decoded, to solve the notation index value.The symbol table buffer storage circuit reads corresponding symbol table according to the content choice signal in a plurality of symbol tables that external memory storage is stored, store corresponding symbol table, and solves output symbol according to the notation index value in corresponding symbol table.Decode controller is in order to control character index value generator and symbol table buffer storage circuit.
According to example embodiment of the present invention, above-mentioned image decoder also comprises the major control device.The major control device is coupled to decode controller, and the major control device reads the header of bit stream from external memory storage, and header is decoded, to obtain initialize signal.Wherein, the content choice device receives initialize signal, and according to initialize signal decision content choice signal.
According to example embodiment of the present invention, wherein, the major control device is after decoding to header, also export initial signal and give decode controller, decode controller is after receiving initial signal, and decode controller informs that notation index value generator selects corresponding decoded information to read and store corresponding symbol table with informing the symbol table buffer storage circuit in external memory storage.
According to example embodiment of the present invention, wherein, after notation index value generator is selected corresponding decoded information to read in external memory storage with the symbol table buffer storage circuit and is stored corresponding symbol table, decode controller informs that notation index value generator begins bit stream is decoded, obtaining the notation index value, decode controller informs that also the symbol table buffer storage circuit finds out output symbol according to the notation index value in the corresponding symbol table that it is stored.
According to example embodiment of the present invention, wherein, if bit stream decoding finishes or one of them of corresponding symbol table and corresponding decoded information need upgrade the time, decode controller is more sent end signal and is given the major control device.The major control device is after receiving end signal, and the major control device reads a new header from external memory storage.
Example embodiment of the present invention provides a kind of adaptive paradigm Hoffmann coding/decoding method.At first, provide first to get the decoded information that a plurality of coding schedules are stored in the space soon.Afterwards, in a plurality of decoded informations, select corresponding decoded information according to the content choice signal.Then, in a plurality of symbol tables that external memory storage is stored, select corresponding symbol table, and corresponding symbol table is stored in second gets the space soon according to the content choice signal.Afterwards, receive bit stream, and according to corresponding decoded information to bit stream decoding, to solve the notation index value.Then, in corresponding symbol table, solve output symbol according to the notation index value.
In sum, compare with image decoder with traditional adaptive paradigm Hoffmann decoder and method thereof, adaptive paradigm Hoffmann decoder that example embodiment of the present invention provided and method thereof and image decoder relatively have versatility, and its speed can reach the demand of many real-time systems.In addition, adaptive paradigm Hoffmann decoder that example embodiment of the present invention provided and method thereof can be decoded along with the corresponding decoded information of the suitable coding schedule of the variation selection of content choice signal with image decoder, and can be along with coding schedule increases and the cost of need increase hardware.
For above-mentioned feature and advantage of the present invention can be become apparent, example embodiment cited below particularly, and conjunction with figs. are described in detail below.
Description of drawings
Figure 1A is the system block diagrams of the 5th, 173, No. 695 normal form Hafman decoding devices 10 that patent provided of the U.S..
Figure 1B be utilize the 5th, 173, No. 695 patents of the U.S. notion a real system block diagrams of doing with decoder 20 of content adaptability.
Fig. 2 is the system block diagrams of the 6th, 657, No. 569 normal form Hafman decoding devices 30 that patent provided of the U.S..
Fig. 3 is the system block diagrams of an adaptive paradigm Hoffmann decoder 40 providing of example embodiment of the present invention.
Fig. 4 is the system block diagrams of an image decoder 50 providing of example embodiment of the present invention.
Fig. 5 is the flow chart of a picture decoding method providing of example embodiment of the present invention.
Fig. 6 is the flow chart of an adaptive paradigm Hoffmann coding/decoding method providing of example embodiment of the present invention.
Fig. 7 is the flow chart of the step S74 of Fig. 6.
[main element symbol description]
10: normal form Hafman decoding device
101,102: register
103: the tubbiness register
104: adder 104
11: look-up table
110: codeword table
111: the decoding symbols table
112: the code word size table
20: decoder
201,202: register
203: the tubbiness register
204: adder
21: the first look-up tables
22: second look-up table
23: the three look-up tables
24: the four look-up tables
205,206: multiplexer
30: normal form Hafman decoding device
301: the first yards registers
302: symbol index register
330~33N: comparator
340~34N: adder
350~35N: subtracter
312: multiplexer
40: the adaptive paradigm Hoffmann decoder
41: notation index value generator
42: the content choice device
43: the symbol table buffer storage circuit
440: external memory storage
410: comparator circuit
411: the bit stream register
412: multiplexer
413: notation index value counting circuit
414: the decoded information generator
CMP_1~CMP_N: comparator
SUB_1: subtracter
ADD_1: adder
50: image decoder
51: adaptability model Hafman decoding device
52: decode controller
53: the major control device
510: notation index value generator
511: the content choice device
512: the symbol table buffer storage circuit
599: external memory storage
S60~S65: steps flow chart
S70~S76: steps flow chart
S741~S743: steps flow chart
Embodiment
Before introducing the adaptive paradigm Hoffmann decoder and method and image decoder that example embodiment of the present invention provides, introduce the normal form Huffman encoding of kind 1 and kind 2 earlier at this.
The normal form Huffman encoding of kind 1 also has two extra agreements except the agreement of Serial No. attribute.First agreement is first sign-on coding from the code word size minimum, and the numerical value of this code word is necessary for 0.Second agreement is the agreement of standard in order to utilize space encoder as much as possible, and its agreement is that to be first yard of L can be that last sign indicating number of L-n draws from code word size to code word size.Wherein, code word size be L-1, L-2 ..., the code word of L-n+1 is not for being present in the code word of Huffman encoding tree, n is one of them of 1 to L-1 integer.
Be present in the Huffman encoding tree if the hypothesis code word size is the code word of L-1, then code word size is that to equal code word size be the formed code word that moves to left again after last sign indicating number of L-1 adds 1 for first yard of L.At this moment, code word size is that first yard available mathematical formulae of L can be expressed as follows:
FIRSTCODE[L]=(LASTCODE[L-1]+1)<<1
Wherein, FIRSTCODE[L] the indication code word length is first yard of L, LASTCODE[L-1] the indication code word length is last sign indicating number of L-1, move to left one operator of "<<1 " expression.
If the hypothesis code word size be L-1, L-2 ..., the code word of L-n+1 is not present in the Huffman encoding tree, and code word size to be the code word of L-n have in the Huffman encoding of the being present in tree, then code word size is the formed code word in n position that moves to right again after first yard of L last sign indicating number that equals L-n for code word size adds 1.At this moment, code word size is that first yard available mathematical formulae of L can be expressed as follows:
FIRSTCODE[L]=(LASTCODE[L-n]+1)<<n
Wherein, FIRSTCODE[L] the indication code word length is first yard of L, LASTCODE[L-n] the indication code word length is last sign indicating number of L-n, the move to left operator of n position of "<<n " expression.
The normal form Huffman encoding of kind 2 is to be that the starting point that begins to encode is different with the main difference of the normal form Huffman encoding of kind 1, and the normal form Huffman encoding of kind 2 also has two extra agreements except the agreement of Serial No. attribute.First agreement is first sign-on coding from the code word size maximum, and the numerical value of this code word is necessary for 0.Second agreement is the agreement of standard in order to utilize space encoder as much as possible, and its agreement is that to be first yard of L can be that last sign indicating number of L+n draws from code word size to code word size.Wherein, code word size be L+1, L+2 ..., the code word of L+n-1 is not for being present in the code word of Huffman encoding tree, n is a natural number.
If supposing code word size is that the code word of L+1 is present in the Huffman encoding tree, then code word size is that to equal code word size be that last sign indicating number of L+1 moves to right and adds 1 formed code word again after one for first yard of L.At this moment, code word size is that first yard available mathematical formulae of L can be expressed as follows:
FIRSTCODE[L]=(LASTCODE[L+1]>>1)+1
Wherein, FIRSTCODE[L] the indication code word length is first yard of L, LASTCODE[L+1] the indication code word length is last sign indicating number of L+1, move to right one operator of ">>1 " expression.
If the hypothesis code word size be L+1, L+2 ..., the code word of L+n-1 is not present in the Huffman encoding tree, and code word size to be the code word of L+n have in the Huffman encoding of the being present in tree, then code word size is that first yard of L last sign indicating number that equals L+n for code word size moves to right and add 1 formed code word again behind the n position.At this moment, code word size is that first yard available mathematical formulae of L can be expressed as follows:
FIRSTCODE[L]=(LASTCODE[L+n]>>n)+1
Wherein, FIRSTCODE[L] the indication code word length is first yard of L, LASTCODE[L+n] the indication code word length is last sign indicating number of L+n, the move to right operator of n position of ">>n " expression.
Then, please refer to Fig. 3, Fig. 3 is the system block diagrams of an adaptive paradigm Hoffmann decoder 40 providing of example embodiment of the present invention.This adaptive paradigm Hoffmann decoder 40 comprises notation index value generator 41, content choice device 42 and symbol table buffer storage circuit 43, wherein, content choice device 42 is coupled to notation index value generator 41, and symbol table buffer storage circuit 43 is coupled to notation index value generator 41 and content choice device 42.
Content choice device 42 can be according to quantization parameter (quantization parameter, be called for short QP) or picture between with picture in the otherness etc. of (inter/intra) decide the content choice signal, and after decision content choice signal, this content choice signal is exported to notation index value generator 41 and symbol table buffer storage circuit 43.Notation index value generator 41 is after receiving the content choice signal, can store from it according to the content choice signal and select a corresponding decoded information to use in the decoded information of a plurality of coding schedules, this corresponding decoded information is corresponding to bit stream employed coding schedule when the coding; Simultaneously, symbol table buffer storage circuit 43 can read a corresponding symbol table according to the content choice signal in a plurality of symbol tables that external memory storage 440 is stored, and stores this corresponding symbol table.For example, the corresponding symbol table that symbol table buffer storage circuit 43 is read according to the content choice signal is second symbol table, and then symbol table buffering memory circuit 43 can this second symbol table of storage.
In the example embodiment of Fig. 3, selected to the correspondence decoding packets of information of coding schedule draw together N first yard FIRSTCODE[1 that code word size is 1~N]~FIRSTCODE[N], N first yard index value FCODE_INDX[1]~FCODE_INDEX[N] with N identification signal VALID[1]~VALID[N].Wherein, N identification signal VALID[1]~VALID[N] be 1 to N N first yard FIRSTCODE[1 in order to the indication code word length]~FIRSTCODE[N] whether exist, and N first yard index value FCODE_INDX[1]~FCODE_INDEX[N] N first yard FIRSTCODE[1 of expression respectively]~FIRSTCODE[N] index value.
After notation index value generator 41 has been selected corresponding decoded information and symbol table buffer storage circuit 43 has been stored corresponding symbol table, notation index value generator 41 can receive bit stream, and according to corresponding decoded information to bit stream decoding, to solve notation index value SYMBOL_INDEX.Then, symbol table buffer storage circuit 43 can solve output symbol according to notation index value SYMNOL_INDEX in corresponding symbol table.
In addition, it should be noted that, because other agreements of the agreement of Serial No. attribute and the normal form Huffman encoding of kind 1 or kind 2, notation index value generator 41 does not need to store all information of each coding schedule, and the decoded information that notation index value generator 41 only need be stored each coding schedule gets final product.Each symbol table in a plurality of symbol tables that external memory storage 440 is stored has been stored a plurality of symbols corresponding index value a plurality of with it, therefore, symbol table buffer storage circuit 43 can find corresponding output symbol according to notation index value SYMBOL_INDEX in the corresponding symbol table of its storage.Wherein, symbol table buffer storage circuit 43 in fact is a look-up table that can upgrade according to the content choice signal.
Then, introduce the detailed structure of notation index value generator 41 at this.Notation index value generator 41 comprises comparator circuit 410, bit stream register 411, multiplexer 412, notation index value counting circuit 413 and decoded information generator 414.Wherein, bit stream register 411 is coupled to comparator circuit 410, multiplexer 412 and notation index value counting circuit 413.Decoded information generator 414 is coupled to content choice device 42 and multiplexer 412, and multiplexer is selected and is coupled to comparator circuit 410.
Bit stream register 411 is in order to temporary bit stream, and comparator circuit 410 is given in first to N position of output bit flow.Behind the code word size L of multiplexer 412 decision bit streams, multiplexer 412 can be informed first to L formed code word NEXTBIT[L in position of bit stream register 411 output bit flows] to notation index value counting circuit 413.Wherein, be noted that, inform first to L of the bit stream register 411 output bit flows formed code word NEXTBIT[L in position at multiplexer 412] to notation index value counting circuit 413 after, L position of bit stream displacement that can it is temporary is with wait decoding next time.In other words, the code word NEXTBIT[L that this time exports exactly] will can not persist in bit stream register 411.
Decoded information generator 414 is in order to storing the decoded information of a plurality of coding schedules, and selects corresponding decoded information in the decoded information of a plurality of coding schedules since then according to the content choice signal.Correspondence that decoded information generator 414 is chosen decoding packets of information is drawn together N first yard FIRSTCODE[1 that code word size is 1~N]~FIRSTCODE[N], N first yard index value FCODE_INDX[1]~FCODE_INDEX[N] with N identification signal VALID[1]~VALID[N], 414 meetings of decoded information generator offer multiplexer 412 with the corresponding decoded information of being chosen.
Comparator circuit 410 has N comparator C MP_1~CMP_N of 1 to N position, and comparator circuit 410 is in order to relatively bit stream and N first yard FIRSTCODE[1]~FIRSTCODE[N] size, with N selection of generation signal, wherein, N is more than or equal to 2.It is first yard FIRSTCODE[1 of 1 that comparator C MP_1 can compare first formed code word and code word size in the bit stream] size, and export one and select signal to give multiplexer 412.It is first yard FIRSTCODE[N of N with code word size that comparator C MP_N can compare in the bit stream first to N formed code word in position] size, and export one and select signal to multiplexer 412.Other comparator C MP_2~CMP_N-1 then can the rest may be inferred, in this just seldom explanation.
In the example embodiment of Fig. 3, this N is selected signal in fact only is 0 or 1 signal, this N the result after selecting signal in order to expression relatively, and inform that by this multiplexer 412 is to determine code word size L.Multiplexer 412 is selected signal and N identification signal VALID[1 according to N]~VALID[N] from N first yard FIRSTCDE[1]~FIRSTCODE[N] in the option code word length be first yard FIRSTCODE[L of L] and in the individual first yard index value of N FCODE_INDEX[1]~FCODE_INDEX[N] the option code word length is first yard index value FCODE_INDEX[L of L], wherein, L is the natural number smaller or equal to N.
In addition, it should be noted that under the situation of some coding, the code word of some length does not exist, the selection signal that this moment, certain some comparator was exported does not have not in all senses, but can influence decoded results.Therefore in decoded information generator 414, can produce N identification signal VALID[1]~VALID[N].For example, if in a coding schedule, code word size is not 3 with 5 code word, this moment identification signal VALID[3] and VALID[5] can equal 1, remaining then can equal 0.These identification signals VALID[1 has been arranged]~VALID[N] afterwards, selection signal and identification signal VALID[1 that multiplexer 412 can produce according to each comparator C MP_1~CMP_N]~VALID[N] decide the length L of code word.As identification signal VALID[i] when equaling 1, then multiplexer 412 can be ignored (ignore) selection signal that comparator C MP_i exported, and this code word size i can not be decided to be the code word size of code word.
Notation index value counting circuit 413 is first yard index value FCODE_INDEX[L of L according to code word size], code word size is first yard FIRSTCODE[L of L] with bit stream in L formed code word NEXTBIT[L] calculate notation index value SYMBOL_INDEX.Wherein, be noted that no matter be the normal form Huffman encoding of adopting kind 1 or kind 2, when decoding, this notation index value SYMBOL_INDEX all equals first yard index value FCODE_INDEX[L] with code word NEXTBIT[L] summation deduct first yard FIRSTCODE[L] value, that is SYMBOL_INDEX=NEXTBIT[L]+FCODE_INDEX[L]-FIRSTCODE[L].
Therefore, notation index value counting circuit 413 comprises subtracter SUB_1 and adder ADD_1.Wherein, subtracter SUB_1 is in order to code word NEXTBIT[L] deduct first yard FIRSTCODE[L], adder ADD_1 then adds first yard index value FCODE_INDEX[L in order to the output with subtracter SUB_1].Certainly, the execution mode of above-mentioned notation index value counting circuit 413 only is a kind of example embodiment of the present invention, be not in order to limit the present invention, according to above-mentioned SYMBOL_INDEX=NEXTBIT[L]+FCODE_INDEX[L]-FIRSTCODE[L] conclusion, those skilled in the art can adopt other mode to implement notation index value counting circuit 413, perhaps only the notation index value counting circuit 413 of Fig. 3 are made suitable modification.
Then, please refer to table one and table two, table one is the coding schedule that a plurality of symbols use the normal form Huffman encoding of kind 1, and the decoded information of the required storage of coding schedule of table two expression correspondence table one.Wherein, the code word size of table two is first yard FIRSTCODE[L of L] be to represent with decade.In addition, though code word is first yard FIRSTCODE[1 of 1] be not present in the Huffman encoding tree, but because identification signal VALID[1 arranged] indication, can be first yard FIRSTCODE[1 of 1 with code word size at this] be made as 0, its first yard index value FCODE_INDEX[1] then be made as 0.
Table one
The notation index value ??0 ??1 ??2 ??3 ??4 ??5 ??6 ??7 ??8 ??9 ??10
Code word size ??2 ??3 ??3 ??3 ??4 ??4 ??4 ??4 ??4 ??5 ??5
Code word ??00 ??010 ??011 ??100 ??1010 ??1011 ??1100 ??1101 ??1110 ??11110 ??11111
Symbol ??a ??b ??c ??d ??e ??f ??g ??h ??i ??j ??k
Table two
Code word size (L) ??1 ??2 ??3 ??4 ??5
??FIRSTCODE[L] ??0 ??0 ??2 ??10 ??30
??FCODE_INDEX[L] ??0 ??0 ??1 ??4 ??9
At this, be example with a coding schedule of the normal form Huffman encoding of kind 1, illustrate how adaptive paradigm Hoffmann decoder 40 decodes to received bit stream.Suppose that the comparator circuit 410 in the adaptive paradigm Hoffmann decoder 40 has 5 comparators of 1 to 5, the symbol table that content choice signal indicator table buffering memory circuit 43 is stored comprises the whole of the symbol of table one and notation index value, decoded information generator 414 selected to corresponding decoded information then comprise first yard FIRSTCODE[1 of table two]~FIRSTCODE[5], first yard index value FCODE_INDEX[1]~FCODE_INDEX[5] and 5 identification signal VALID[1]~VALID[5].Wherein, identification signal VALID[2]~VALID[5] be 0, be first yard FIRSTCODE[2 of 2~5 in order to the indication code word length]~FIRSTCODE[5] be present in the Huffman encoding tree, and identification signal VALID[1] be 1, be first yard FIRSTCODE[1 of 1 in order to the indication code word length] be not present in the Huffman encoding tree.
If the bit stream that receives is for { 001001101}, then comparator circuit 410 can receive preceding 5 positions in the bit streams { 01101}, and export 5 and select signals to give multiplexer 412.Comparator C MP_1 is first yard FIRSTCODE[1 relatively] with bit stream in { 1}, and output selects signal, it selects signal is 1 in first position.Comparator C MP_2 is first yard FIRSTCODE[2 relatively] with bit stream in { 01}, and output selects signal, it selects signal is 1 in preceding two positions.Comparator C MP_3 is first yard FIRSTCODE[3 relatively] with bit stream in { 101}, and output selects signal, it selects signal is 1 in preceding 3 positions.Comparator C MP_4 is first yard FIRSTCODE[4 relatively] with bit stream in { 1101}, and output selects signal, it selects signal is 1 in preceding 4 positions.Comparator C MP_5 is first yard FIRSTCODE[5 relatively] with bit stream in { 01101}, and output selects signal, it selects signal is 0 in preceding two positions.
According to 5 selection signals that comparator circuit 410 is exported, multiplexer 412 can learn that the code word size of the present symbol that will decode is 4.Because identification signal VAILD[4] be 0, and multiplexer 412 knows that the code word size of the present symbol that will decode is 4, so this multiplexer 412 can be selected first yard FIRSTCODE[4] with first yard index value FCODE_INDEX[4] as output.Then, notation index value counting circuit 413 can be according to selecting first yard FIRSTCODE[4], first yard index value FCODE_INDEX[4] with receive preceding 4 formed code word NEXTBIT[4 in position in the bit stream] calculate notation index value SYMBOL_INDEX.
At this moment, code word NEXTBIT[4] the decade value be 13, and first yard FIRSTCODE[4], first yard index value FCODE_INDEX[4] be respectively 10 and 4, therefore, notation index value SYMBOL_INDEX=13+4-10=7.Then, symbol table buffer storage circuit 43 is found out output symbol according to notation index value SYMBOL_INDEX in the corresponding symbol table of its storage, successfully to finish the decoding of preceding 4 positions in the bit stream.In this example embodiment, notation index value SYMBOL_INDEX is 7 o'clock, and output symbol is h (with reference to table two).
{ behind the 1101}, { 1101} just can not exist bit stream register 411 in these 4 positions in preceding 4 positions in having separated bit stream.Therefore, only remaining 5 position { 00100} of ensuing bit stream.Then, adaptive paradigm Hoffmann decoder 40 can { 00100} decodes at 5 positions afterwards, { decoding process that 00100} decodes can be learnt from the narration of front, therefore just seldom gives unnecessary details at this and adaptive paradigm Hoffmann decoder 40 is at 5 positions.
Then, please refer to table three and table four, table three is coding schedules that a plurality of symbols use the normal form Huffman encoding of kind 2, and the decoded information of the required storage of coding schedule of table four expression correspondence table three.Wherein, the code word size of table four is first yard FIRSTCODE[L of L] be to represent with decade.In addition, though code word is first yard FIRSTCODE[1 of 1] be not present in the Huffman encoding tree, but because identification signal VALID[1 arranged] indication, can be first yard FIRSTCODE[1 of 1 with code word size at this] be made as 30, its first yard index value FCODE_INDEX[1] then be made as 12.
Table three
The notation index value ??0 ??1 ??2 ??3 ??4 ??5 ??6 ??7 ??8 ??9 ??10
Code word size ??5 ??5 ??4 ??4 ??4 ??4 ??4 ??3 ??3 ??3 ??2
Code word ??00000 ??00001 ??0001 ??0010 ??0011 ??0100 ??0101 ??011 ??110 ??101 ??11
Symbol ??a ??b ??c ??d ??e ??f ??g ??h ??i ??j ??k
Table four
Code word size (L) ??5 ??4 ??3 ??2 ??1
??FIRSTCODE[L] ??0 ??0 ??2 ??10 ??30
??FCODE_INDEX[L] ??0 ??2 ??7 ??10 ??12
At this, be example with a coding schedule of the normal form Huffman encoding of kind 2, illustrate how adaptive paradigm Hoffmann decoder 40 decodes to received bit stream.Suppose that the comparator circuit 410 in the adaptive paradigm Hoffmann decoder 40 has 5 comparators of 1 to 5, the symbol table that content choice signal indicator table buffering memory circuit 43 is stored comprises the whole of the symbol of table one and notation index value, decoded information generator 414 selected to corresponding decoded information then comprise first yard FIRSTCODE[1 of table two]~FIRSTCODE[5], first yard index value FCODE_INDEX[1]~FCODE_INDEX[5] and 5 identification signal VALID[1]~VALID[5].Wherein, identification signal VALID[2]~VALID[5] be 0, be first yard FIRSTCODE[2 of 2~5 in order to the indication code word length]~FIRSTCODE[5] be present in the Huffman encoding tree, and identification signal VALID[1] be 1, be first yard FIRSTCODE[1 of 1 in order to the indication code word length] be not present in the Huffman encoding tree.
If the bit stream that receives is for { 1101100001}, then comparator circuit 410 can receive preceding 5 positions in the bit streams { 00001}, and export 5 and select signals to give multiplexer 412.Comparator C MP_1 is first yard FIRSTCODE[1 relatively] with bit stream in { 1}, and output selects signal, it selects signal is 0 in first position.Comparator C MP_2 is first yard FIRSTCODE[2 relatively] with bit stream in { 01}, and output selects signal, it selects signal is 0 in preceding two positions.Comparator C MP_3 is first yard FIRSTCODE[3 relatively] with bit stream in { 001}, and output selects signal, it selects signal is 0 in preceding 3 positions.Comparator C MP_4 is first yard FIRSTCODE[4 relatively] with bit stream in { 0001}, and output selects signal, it selects signal is 0 in preceding 4 positions.Comparator C MP_5 is first yard FIRSTCODE[5 relatively] with bit stream in { 00001}, and output selects signal, it selects signal is 1 in preceding two positions.
According to 5 selection signals that comparator circuit 410 is exported, multiplexer 412 can learn that the code word size of the present symbol that will decode is 5.Because identification signal VAILD[5] be 0, and multiplexer 412 knows that the code word size of the present symbol that will decode is 5, so this multiplexer 412 can be selected first yard FIRSTCODE[5] with first yard index value FCODE_INDEX[5] as output.Then, notation index value counting circuit 413 can be according to selecting first yard FIRSTCODE[5], first yard index value FCODE_INDEX[5] with receive preceding 5 formed code word NEXTBIT[5 in position in the bit stream] calculate notation index value SYMBOL_INDEX.
At this moment, code word NEXTBIT[5] the decade value be 1, and first yard FIRSTCODE[5], first yard index value FCODE_INDEX[5] be all 0, therefore, notation index value SYMBOL_INDEX=1+0-0=1.Then, symbol table buffer storage circuit 43 is found out output symbol according to notation index value SYMBOL_INDEX in the corresponding symbol table of its storage, successfully to finish the decoding of preceding 4 positions in the bit stream.In this example embodiment, notation index value SYMBOL_INDEX is 1 o'clock, and output symbol is b (with reference to table four).
{ behind the 00001}, { 00001} just can not exist bit stream register 411 in these 5 positions in preceding 5 positions in having separated bit stream.Therefore, only remaining 5 position { 11011} of ensuing bit stream.Then, adaptive paradigm Hoffmann decoder 40 can { 11011} decodes at 5 positions afterwards, { decoding process that 11011} decodes can be learnt from the narration of front, therefore just seldom gives unnecessary details at this and adaptive paradigm Hoffmann decoder 40 is at 5 positions.
In sum, can know that the adaptive paradigm Hoffmann decoder 40 that example embodiment of the present invention provides has versatility, can be used for the bit stream of the normal form Huffman encoding of kind 1 or kind 2 is decoded.In addition, all symbol tables exist in the external memory storage 414, and symbol table buffer storage circuit 43 can read a corresponding symbol table according to the content choice signal in external memory storage, therefore the hardware cost of the adaptive paradigm Hoffmann decoder 40 that example embodiment of the present invention provided can be reduced in a large number, and its speed can meet the requirement of general real-time system.
Then, please refer to Fig. 4, Fig. 4 is the system block diagrams of an image decoder 50 providing of example embodiment of the present invention.Image decoder 50 comprises adaptive paradigm Hoffmann decoder 51, decode controller 52 and major control device 53.Wherein, adaptive paradigm Hoffmann decoder 51 is coupled to decode controller 52 and major control device 53, and major control device 53 is coupled to decode controller 52.Adaptive paradigm Hoffmann decoder 51 comprises notation index value generator 510, content choice device 511 and symbol table buffer storage circuit 512.Wherein, content choice device 511 is coupled to major control device 53, notation index value generator 510 and symbol table buffer storage circuit 512, symbol table buffer storage circuit 512 is coupled to external memory storage 599, decode controller 52 and notation index value generator 510, and notation index value generator 510 is coupled to decode controller 52.
Decode controller 52 is in order to notation index value generator 510 and symbol table buffer storage circuit 512, decode controller 52 utilizes number control signal to link up to notation index value generator 510 and symbol table buffer-stored electricity 512 tunnel, confirming state to each other by this, and the work carried out of designated symbol index value generator 510 and symbol table buffer storage circuit 512.Major control device 53 reads header from external memory storage 599, and header is decoded, to obtain initialize signal Content_set, initial signal Start_set.In addition, major control device 53 more receives end signal Finish_signal from decode controller 52.Wherein, header can be the header of the bit stream that will decode, and header can be the several positions, front in the bit stream of desire decoding, or the independent header that transmits.
The function of the adaptive paradigm Hoffmann decoder 40 that the function of adaptive paradigm Hoffmann decoder 51 and Fig. 3 are provided is close, and the function of its notation index value generator 510, content choice device 511 and symbol table buffer storage circuit 512 is also close with the function of symbol table buffer storage circuit 43 with the described notation index value of Fig. 3 generator 41, content choice device 42.Its different place only is, the described notation index value of Fig. 5 generator 510, content choice device 511 are to be based upon in the image decoder 50 with symbol table buffer storage circuit 512, therefore, notation index value generator 510, content choice device 511 and symbol table buffer storage circuit 512 can be subjected to the control of major control device 53 and decode controller 52.Certainly, notation index value generator 510, content choice device 511 can be with reference to the execution modes of figure 3 described notation index value generators 41, content choice device 42 and symbol table buffer storage circuit 43 with the execution mode of symbol table buffer storage circuit 512, just, must additionally add control circuit.
When major control device 53 reads header from external memory storage 599, and after header decoded, can export initialize signal Content_set and initial signal Start_signal respectively and give content choice device 511 and decode controller 52.Content choice device 511 can produce the content choice signal to notation index value generator 510 and symbol table buffer storage circuit 512 according to initialize signal Content_set after receiving initialize signal Content_set.Wherein, content signal may have been carried the information of the otherness in otherness between quantization parameter, picture or the picture secretly, by these information, notation index value generator 510 can be selected the corresponding decoded information of a corresponding coding schedule from the decoded information in a plurality of coding schedules, and symbol table buffer storage circuit 512 then can be selected a corresponding symbol table in a plurality of symbol tables that external memory storage 599 is stored.
Decode controller 52 just can allow 51 pairs of bit streams of adaptive paradigm Hoffmann decoder to decode after receiving initial signal Start_signal.At first, decode controller 52 can inform that notation index value generator 510 selects corresponding decoded information according to the content choice signal, simultaneously, decode controller 52 also can inform that symbol table buffer storage circuit 512 reads and store corresponding symbol table in external memory storage 599.
Notation index value generator 510 is selected corresponding decoded information and symbol table buffer storage circuit 512 reads and store corresponding symbol table in external memory storage 599 according to the content choice signal after, decode controller 52 just can begin bit stream is decoded by admissible mark index value generator 510, to obtain the notation index value.Then, the notation index value calculate finish after, decode controller 52 can inform that symbol table buffer storage circuit 512 finds out output symbol according to the notation index value in the corresponding symbol table that it is stored.
Afterwards, decode controller 52 can judge whether bit stream decoding finishes or whether corresponding symbol table and corresponding decoded information need renewal.If bit stream decoding finishes, perhaps answer symbol table and corresponding decoded information one of them need upgrade the time, then decode controller 52 can be sent end signal Finish_signal and give major control device 53.Major control device 53 is after receiving end signal Finish_signal, and major control device 53 can read a new header from external memory storage, and produces new initialize signal Content_set and initial signal Start_signal.Then, adaptive paradigm Hoffmann decoder 51 just can begin to after bit stream decode.
Then, please refer to Fig. 5, Fig. 5 is the flow chart of a picture decoding method providing of example embodiment of the present invention.The picture decoding method that this example embodiment provided is resulting according to the image decoder 50 of Fig. 4, yet the picture decoding method of Fig. 5 only is an example embodiment of the present invention, is not in order to limit the present invention.
At first, in step S60, major control device 53 reads bit stream and the header of bit stream is decoded in external memory storage 599.Then, in step S61, the information setting content choice signal that content choice device 511 is carried under one's arms according to header decoding back.Then, in step S62, major control device 53 is sent initial signal Start_signal and is given decode controller 52, and decode controller 52 informs that then first gets space (the decoded information generator in the just aforesaid notation index value generator 510) the corresponding decoded information of selection soon and inform that second gets space (just aforesaid symbol table buffer storage circuit 512) soon from the corresponding symbol table of external memory storage 599 selections.
Then, in step S63, decode controller 52 informs that notation index value generator 510 decodes to bit stream according to corresponding decoded information, to obtain the notation index value.Afterwards, in step S64, decode controller 52 informs that symbol table buffer storage circuit 512 finds out output symbol according to the notation index value in corresponding symbol table.Afterwards, in step S65, decode controller 52 judge bit stream whether decode finish or corresponding decoded information and corresponding symbol table one of them whether need to upgrade.If bit stream decoding finishes, perhaps, one of them needs corresponding decoded information and corresponding symbol table to upgrade, and then decode controller 52 can be sent end signal Finish_signal and give major control device 53, afterwards, just carry out step S60.If bit stream as yet decoding do not finish, and corresponding decoded information and corresponding symbol table are neither when needing renewal, then get back to step S63.
Afterwards, please refer to Fig. 6, Fig. 6 is the flow chart of an adaptive paradigm Hoffmann coding/decoding method providing of example embodiment of the present invention.The picture decoding method that this example embodiment provided is that the adaptive paradigm Hoffmann decoder 40 according to Fig. 3 adds that the viewpoint of the image decoder 50 of Fig. 4 produces, yet, the picture decoding method of Fig. 4 only is an example embodiment of the present invention, is not in order to limit the present invention.
At first, in step S70, decide the content choice signal according to otherness between quantization parameter, picture or the otherness in the picture.Afterwards, in step S71, provide first to get the decoded information that a plurality of coding schedules are stored in the space soon.Wherein, first to get the space soon can be decoded information generator 414 among Fig. 3.In step S72, in a plurality of decoded informations, select corresponding decoded information according to the content choice signal.In other words, be exactly in a plurality of coding schedules, to select a corresponding coding schedule, and store the corresponding decoded information of this corresponding coding schedule.
In step S73, in a plurality of symbol tables that external memory storage is stored, select corresponding symbol table according to the content choice signal, and corresponding symbol table is stored in second gets the space soon.Wherein, second to get the space soon can be symbol table buffer storage circuit 43 among Fig. 3.Then, in step S74, receive bit stream, and according to corresponding decoded information to bit stream decoding, to solve the notation index value.In step S75, in corresponding symbol table, solve output symbol according to the notation index value.Then, in step S76, judge that bit stream decoding finishes or one of them of corresponding symbol table and corresponding decoded information needs to upgrade.If bit stream decoding finishes, one of them of perhaps corresponding symbol table and corresponding decoded information needs to upgrade, and then gets back to step S70; If bit stream as yet decoding finish and corresponding symbol table and corresponding decoded information neither needs upgrades, then get back to step S74.
Then, please refer to Fig. 7, Fig. 7 is the flow chart of the step S74 of Fig. 6.The step S74 of Fig. 6 can realize with step S741~S743, yet Fig. 7 flow chart is not in order to limit step S74.In step S741, relatively preceding i formed code word in position and code word size are first yard the size of i in the bit stream, select signal to produce, and wherein, i is 1 to N integer.The function that execution in step S741 produced is equivalent to the function of the comparator circuit 410 of Fig. 3, therefore, in step S741, always meets together and produces N selection signal.
Then, in step S742, selecting signal and N identification signal option code word length in individual first yard of N according to N is that first yard of L is first yard index value of L with option code word length in the individual first yard index value of N, and wherein, L is the natural number smaller or equal to N.The function that execution in step S741 produced is equivalent to the function of the multiplexer 412 of Fig. 3.Afterwards, in step S743, according to code word size be first yard index value, the code word size of L be first yard of L with bit stream in L the formed code word in position calculate the notation index value.The function that execution in step S743 produced is equivalent to the function of the notation index value counting circuit 413 of Fig. 3.By the detailed process that Fig. 7 provided, the notation index value just can correctly be calculated, and then, just can solve correct output symbol according to the notation index value.
In sum, compare with image decoder with traditional adaptive paradigm Hoffmann decoder and method thereof, adaptive paradigm Hoffmann decoder that example embodiment of the present invention provided and method thereof and image decoder relatively have versatility, can decode to the bit stream through the normal form Huffman encoding of kind 1 or kind 2.
In addition, the notion that the adaptive paradigm Hoffmann decoder utilization that example embodiment provided is got soon, select corresponding decoded information and corresponding symbol table according to the content choice signal, make the more traditional adaptive paradigm Hoffmann decoder of speed of its decoding come soon, therefore can reach the demand of many real-time systems.
In addition, adaptive paradigm Hoffmann decoder that example embodiment of the present invention provided and method thereof can be decoded along with the corresponding decoded information of the suitable coding schedule of the variation selection of content choice signal with image decoder, and can be along with coding schedule increases and the cost of need increase hardware.
Though the present invention with example embodiment openly as above; right its is not in order to qualification the present invention, those skilled in the art, without departing from the spirit and scope of the present invention; when can doing a little change and retouching, so protection scope of the present invention is as the criterion when looking the appended claims person of defining.

Claims (22)

1. adaptive paradigm Hoffmann decoder comprises:
One notation index value generator, in order to store the decoded information of a plurality of coding schedules, in these decoded informations, select a corresponding decoded information according to a content choice signal, in order to receive a bit stream, and according to this correspondence decoded information to this bit stream decoding, to solve a notation index value;
One content choice device is coupled to this notation index value generator, in order to export this content choice signal; And
One symbol table buffer storage circuit, be coupled to this notation index value generator and this content choice device, in a plurality of symbol tables that an external memory storage is stored, read a corresponding symbol table according to this content choice signal, store this correspondence symbol table, and in this correspondence symbol table, solve an output symbol according to this notation index value.
2. adaptive paradigm Hoffmann decoder as claimed in claim 1, wherein, it is 1 to N N first yard, N first yard index value and N identification signal that this correspondence decoding packets of information is drawn together code word size, wherein, whether this N identification signal is 1 to N N first yard in order to the indication code word length and exists, wherein, N is more than or equal to 2.
3. adaptive paradigm Hoffmann decoder as claimed in claim 2, wherein, this notation index value generator comprises:
One comparator circuit has N comparator of 1 to N position, in order to relatively this bit stream and this N first yard size, with N selection of generation signal;
One multiplexer, be coupled to this comparator circuit, selecting signal and this N identification signal option code word length in individual first yard of this N according to this N is that this first yard of L is this first yard index value of L with option code word length in the individual first yard index value of N, wherein, L is the natural number smaller or equal to N; And
One notation index value counting circuit is coupled to this multiplexer, according to code word size be this first yard index value, the code word size of L be this first yard of L with this bit stream in L the formed code word in position calculate this notation index value.
4. adaptive paradigm Hoffmann decoder as claimed in claim 2, wherein, this notation index value generator comprises:
One decoded information generator is coupled to this content choice device, in order to storing the decoded information of a plurality of coding schedules, and selects this correspondence decoded information according to this content choice signal in these decoded informations.
5. adaptive paradigm Hoffmann decoder as claimed in claim 3, wherein, if it is that this first yard index value of L is expressed as FCODE_INDEX[L that this notation index value equals code word size], L in this bit stream the formed codeword table in position is shown NEXTBIT[L], be shown FIRSTCODE[L and code word size is this first code table of L], this notation index value SYMBOL_INDEX=NEXTBIT[L then]+FCODE_INDEX[L]-FIRSTCODE[L].
6. adaptive paradigm Hoffmann decoder as claimed in claim 1, wherein this content choice device decides this content choice signal according to one according to the otherness of (inter-frame) between quantization parameter, a picture or the otherness of a picture interior (intra-frame).
7. image decoder comprises:
One adaptive paradigm Hoffmann decoder comprises:
One notation index value generator, in order to store the decoded information of a plurality of coding schedules, in these decoded informations, select a corresponding decoded information according to a content choice signal, in order to receive a bit stream, and according to this correspondence decoded information this bit stream is decoded, to solve a notation index value;
One content choice device is coupled to this notation index value generator, in order to export this content choice signal; And
One symbol table buffer storage circuit, be coupled to this notation index value generator and this content choice device, in a plurality of symbol tables that this external memory storage is stored, read a corresponding symbol table according to this content choice signal, store this correspondence symbol table, and in this correspondence symbol table, solve an output symbol according to this notation index value; And
One decode controller is coupled to this notation index value generator and this symbol table buffer storage circuit, in order to control this notation index value generator and this symbol table buffer storage circuit.
8. image decoder as claimed in claim 7 also comprises:
One major control device is coupled to this decode controller, reads a header from an external memory storage, and this header is decoded, to obtain an initialize signal;
Wherein, this content choice device receives this initialize signal, and determines this content choice signal according to this initialize signal.
9. image decoder as claimed in claim 8, this initialize signal comprise the otherness of (inter-ffame) between a quantization parameter, a picture or the otherness of a picture interior (intra-frame).
10. image decoder as claimed in claim 8, wherein, this major control device is after decoding to this header, also export an initial signal and give this decode controller, this decode controller is after receiving this initial signal, and this decode controller informs that this notation index value generator selects this correspondence decoded information to read and store this corresponding symbol table with informing this symbol table buffer storage circuit in this external memory storage.
11. image decoder as claimed in claim 10, wherein, after this notation index value generator is selected this correspondence decoded information and this symbol table buffer storage circuit reads and store this corresponding symbol table in this external memory storage, this decode controller informs that this notation index value generator begins this bit stream is decoded, obtaining this notation index value, this decode controller informs that also this symbol table buffer storage circuit finds out this output symbol according to this notation index value in the corresponding symbol table that it is stored.
12. image decoder as claimed in claim 8, wherein, if this bit stream decoding finishes or should the correspondence symbol table and one of them of this correspondence decoded information need upgrade the time, this decode controller is more sent an end signal and is given this major control device, this major control device is after receiving this end signal, and this major control device reads a new header from this external memory storage.
13. image decoder as claimed in claim 7, wherein, it is 1 to N N first yard, N first yard index value and N identification signal that this correspondence decoding packets of information is drawn together code word size, wherein, whether this N identification signal is 1 to N N first yard in order to the indication code word length and exists, wherein, N is more than or equal to 2.
14. image decoder as claimed in claim 13, wherein, this notation index value generator comprises:
One comparator circuit has N comparator of 1 to N position, in order to relatively this bit stream and this N first yard size, with N selection of generation signal;
One multiplexer, be coupled to this comparator circuit, selecting signal and this N identification signal option code word length in individual first yard of this N according to this N is that this first yard of L is this first yard index value of L with option code word length in the individual first yard index value of N, wherein, L is the natural number smaller or equal to N; And
One notation index value counting circuit is coupled to this multiplexer, according to code word size be this first yard index value, the code word size of L be this first yard of L with this bit stream in L the formed code word in position calculate this notation index value.
15. image decoder as claimed in claim 13, wherein, this notation index value generator comprises:
One decoded information generator is coupled to this content choice device, in order to storing the decoded information of a plurality of coding schedules, and selects this correspondence decoded information according to this content choice signal in these decoded informations.
16. image decoder as claimed in claim 14, wherein, if it is that this first yard index value of L is expressed as FCODE_INDEX[L that this notation index value equals code word size], L in this bit stream the formed codeword table in position is shown NEXTBIT[L], be shown FIRSTCODE[L and code word size is this first code table of L], this notation index value SYMBOL_INDEX=NEXTBIT[L then]+FCODE_INDEX[L]-FIRSTCODE[L].
17. an adaptive paradigm Hoffmann coding/decoding method comprises:
Provide one first to get the decoded information that a plurality of coding schedules are stored in the space soon;
In these decoded informations, select a corresponding decoded information according to a content choice signal;
In a plurality of symbol tables that an external memory storage is stored, select a corresponding symbol table according to this content choice signal, and should the correspondence symbol table be stored in one second and get the space soon;
Receive a bit stream, and according to this correspondence decoded information to this bit stream decoding, to solve a notation index value; And
In this correspondence symbol table, solve an output symbol according to this notation index value.
18. adaptive paradigm Hoffmann coding/decoding method as claimed in claim 17, wherein, it is 1 to N N first yard, N first yard index value and N identification signal that this correspondence decoding packets of information is drawn together code word size, wherein, whether this N identification signal is 1 to N N first yard in order to the indication code word length and exists, wherein, N is more than or equal to 2.
19. adaptive paradigm Hoffmann coding/decoding method as claimed in claim 18, wherein, the step of " according to this correspondence decoded information to this bit stream decoding, to solve this notation index value " also comprises:
Relatively preceding i formed code word in position and code word size are this size of first yard of i in this bit stream, select signal to produce one, and wherein, i is 1 to N integer;
Selecting signal and this N identification signal option code word length in individual first yard of this N according to this N is that this first yard of L is this first yard index value of L with option code word length in the individual first yard index value of N, and wherein, L is the natural number smaller or equal to N; And
According to code word size be this first yard index value, the code word size of L be this first yard of L with this bit stream in L the formed code word in position calculate this notation index value.
20. adaptive paradigm Hoffmann coding/decoding method as claimed in claim 18, wherein, if it is that this first yard index value of L is expressed as FCODE_INDEX[L that this notation index value equals code word size], L in this bit stream the formed codeword table in position is shown NEXTBIT[L], be shown FIRSTCODE[L and code word size is this first code table of L], this notation index value SYMBOL_INDEX=NEXTBIT[L then]+FCODE_INDEX[L]-FIRSTCODE[L].
21. adaptive paradigm Hoffmann coding/decoding method as claimed in claim 17 also comprises:
Decide this content choice signal according to one according to the otherness of (inter-frame) between quantization parameter, a picture or the otherness of a picture interior (intra-frame).
22. adaptive paradigm Hoffmann coding/decoding method as claimed in claim 17 if this bit stream decoding finishes or should the correspondence symbol table and one of them of this correspondence decoded information need upgrade the time, then resets this content choice signal.
CN 200910006693 2009-02-13 2009-02-13 Adaptive paradigm Hoffmann decoder, method thereof and image decoder Expired - Fee Related CN101808248B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910006693 CN101808248B (en) 2009-02-13 2009-02-13 Adaptive paradigm Hoffmann decoder, method thereof and image decoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910006693 CN101808248B (en) 2009-02-13 2009-02-13 Adaptive paradigm Hoffmann decoder, method thereof and image decoder

Publications (2)

Publication Number Publication Date
CN101808248A true CN101808248A (en) 2010-08-18
CN101808248B CN101808248B (en) 2012-01-11

Family

ID=42609833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910006693 Expired - Fee Related CN101808248B (en) 2009-02-13 2009-02-13 Adaptive paradigm Hoffmann decoder, method thereof and image decoder

Country Status (1)

Country Link
CN (1) CN101808248B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2523348A (en) * 2014-02-20 2015-08-26 Gurulogic Microsystems Oy Encoder, decoder and method
CN104980161A (en) * 2015-04-02 2015-10-14 深圳市腾讯计算机系统有限公司 Huffman decoding method and device
CN105490683A (en) * 2015-11-26 2016-04-13 东方网力科技股份有限公司 Method and device for saving canonical Huffman tree
WO2018020100A1 (en) * 2016-07-28 2018-02-01 B<>Com Method for decoding an image, and associated coding method, devices, terminal unit and computer programs
CN110837562A (en) * 2018-08-17 2020-02-25 阿里巴巴集团控股有限公司 Case processing method, device and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1098565C (en) * 1996-06-07 2003-01-08 大宇电子株式会社 Method and apparatus for decoding variable length code
RU2003131191A (en) * 2001-04-04 2005-04-20 Хонейвелл Интернэшнл Инк. (Us) DEVICE (OPTIONS) AND METHOD FOR UNPACKING DATA
US6650996B1 (en) * 2001-12-20 2003-11-18 Garmin Ltd. System and method for compressing data
US7415154B2 (en) * 2002-02-01 2008-08-19 Koninklijke Philips Electronics N.V. Compression of palettized color images with variable length color codes

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2523348A (en) * 2014-02-20 2015-08-26 Gurulogic Microsystems Oy Encoder, decoder and method
GB2523348B (en) * 2014-02-20 2016-03-30 Gurulogic Microsystems Oy Encoder, decoder and method
CN106170921A (en) * 2014-02-20 2016-11-30 古鲁洛吉克微系统公司 Relate to source code and the decoding method and device of the data of sign compression
CN106170921B (en) * 2014-02-20 2019-10-15 古鲁洛吉克微系统公司 It is related to the source code and decoding method and device of the data of sign compression
CN104980161A (en) * 2015-04-02 2015-10-14 深圳市腾讯计算机系统有限公司 Huffman decoding method and device
CN105490683A (en) * 2015-11-26 2016-04-13 东方网力科技股份有限公司 Method and device for saving canonical Huffman tree
CN105490683B (en) * 2015-11-26 2019-01-08 东方网力科技股份有限公司 Save the method and device of normal form Huffman tree
WO2018020100A1 (en) * 2016-07-28 2018-02-01 B<>Com Method for decoding an image, and associated coding method, devices, terminal unit and computer programs
FR3054764A1 (en) * 2016-07-28 2018-02-02 B<>Com METHOD OF DECODING AN IMAGE, ENCODING METHOD, DEVICES, TERMINAL EQUIPMENT AND COMPUTER PROGRAMS
US10798383B2 (en) 2016-07-28 2020-10-06 B<>Com Method for decoding a digital image, coding method, devices, terminal and associated computer programs
CN110837562A (en) * 2018-08-17 2020-02-25 阿里巴巴集团控股有限公司 Case processing method, device and system
CN110837562B (en) * 2018-08-17 2023-05-02 阿里巴巴集团控股有限公司 Case processing method, device and system

Also Published As

Publication number Publication date
CN101808248B (en) 2012-01-11

Similar Documents

Publication Publication Date Title
CN1930782B (en) Address generator for an interleaver memory and a deinterleaver memory
US8306108B2 (en) Adaptive canonical Huffman decoder and method thereof and video decoder
CN101808248B (en) Adaptive paradigm Hoffmann decoder, method thereof and image decoder
CN100492916C (en) Variable-length code using multiple mapping table and decoding method and apparatus
CN100525450C (en) Method and device for realizing Hoffman decodeng
CN105103549A (en) Encoding and decoding of significant coefficients in dependence upon a parameter of the significant coefficients
CA3069482C (en) Blockwise parallel frozen bit generation for polar codes
CN111884660B (en) Huffman coding equipment
US20060001555A1 (en) Variable length code table look ups
JP2006157678A (en) Variable length coding apparatus and variable length coding method
CN102761394A (en) Method and device for processing data
US7218677B2 (en) Variable-length encoding apparatus and method
CN102595121A (en) Intra-frame prediction mode binarization method, device and system as well as decoding method
CN101151806A (en) Memory efficient interleaving / de-interleaving utilising the periodicity of the mapping function
CN105103192A (en) Method and apparatus for vertex error correction
US6788617B1 (en) Device for generating memory address and mobile station using the address for writing/reading data
JP2002141806A (en) Variable length code decoding device
CN101093998B (en) Decoding method and device
CN109150397B (en) A kind of method and device constructing polarization code sequence
CN102651795B (en) Run-length reduced binary sequence compressed encoding method
Zhou et al. Comments on" A Novel Compression and Encryption Scheme Using Variable Model Arithmetic Coding and Coupled Chaotic System
CN108235013A (en) A kind of low period CABAC decoders and its coding/decoding method based on HEVC
CN103024380B (en) A kind of entropy coding method of data and device
CN102751994B (en) Short code length block code decoder device based on two finite group symbols
Higgie et al. Efficient encoding and decoding algorithms for variable-length entropy codes

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: 20120111

Termination date: 20150213

EXPY Termination of patent right or utility model