CN202602827U - Variable-length decoding device based on universal format code table - Google Patents

Variable-length decoding device based on universal format code table Download PDF

Info

Publication number
CN202602827U
CN202602827U CN 201220111591 CN201220111591U CN202602827U CN 202602827 U CN202602827 U CN 202602827U CN 201220111591 CN201220111591 CN 201220111591 CN 201220111591 U CN201220111591 U CN 201220111591U CN 202602827 U CN202602827 U CN 202602827U
Authority
CN
China
Prior art keywords
code table
address
code
state variable
decoding
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.)
Expired - Lifetime
Application number
CN 201220111591
Other languages
Chinese (zh)
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.)
SHANGHAI SUANXIN MICROELECTRONICS CO Ltd
Original Assignee
SHANGHAI SUANXIN MICROELECTRONICS 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 SHANGHAI SUANXIN MICROELECTRONICS CO Ltd filed Critical SHANGHAI SUANXIN MICROELECTRONICS CO Ltd
Priority to CN 201220111591 priority Critical patent/CN202602827U/en
Application granted granted Critical
Publication of CN202602827U publication Critical patent/CN202602827U/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The utility model relates to a variable-length decoding device based on a universal format code table. The device comprises an instruction decoder used for outputting an instruction decoding result; an address calculator used for calculating a code table address and reading data in an input code flow according to the instruction decoding result or an address state variable returned by an address state register; a code table storer for storing code table data and outputting table entries in a code table according to the code table address provided by the address calculator and the data in the input code flow; a table entry decoder used for receiving the table entries output by the code table storer and decoding, and determining the address state variable and a grammar state variable; an address state register used for receiving the address state variable and outputting the address state variable to the address calculator; a grammar state register used for receiving the grammar state variable and outputting the grammar state variable when the decoding ends; and a code table assembler used for receiving the code table data and loading the code table data into the code table storer, wherein the code table data contains a plurality of code tables and has a same universal format for different video standards.

Description

Variable-length decoder based on the general format code table
Technical field
The utility model relates to a kind of variable-length decoder, and is special, and the utility model relates to a kind of variable-length decoder based on the general format code table.
Background technology
At present, be that all kinds of variable length video encoding and decoding standards of representative are widely used in the systems such as various Video processing, communication, control with series H.26X.The performance of the Video Decoder of video receiver has remarkable influence to systematic function.In existing Video Decoder ASIC (application-specific integrated circuit (ASIC)); To different video encoding and decoding standards; All adopt the code table design of devices at full hardware logic realization; Promptly the code table to certain particular video frequency standard is provided, searches the decoded result of the syntactic element of the code word correspondence in the code stream through the method for the coupling of tabling look-up, thereby realize the decode procedure of variable length video code word by hardware system with hardware mode.This devices at full hardware mechanism is extensively adopted because of its advantage that efficient is high and performance is good of tabling look-up.
Yet there is following shortcoming in the code table design of this devices at full hardware logic:
After the video standard of-Xin occurs, need to add new hardware logic, and the flow checking is come into operation again, has so just reduced efficiency of research and development, has increased R&D costs to this new video standard.
-because the scale and the complexity of code table is quite high, directly caused the area of Video Decoder ASIC can be quite big.
Table look-up efficient height, advantage that performance is good of the code table that-this hardware logic is realized only is embodied under the lower condition of code check; Under the condition of high code check; Main performance bottleneck is the bandwidth of code stream input, and therefore whole decoding performance can not mate the impact of performance of this design anticipation.
The utility model content
The utility model provides a kind of variable-length decoder based on the general format code table; Its purpose is to overcome the above-mentioned shortcoming of the code table of existing devices at full hardware logic realization; Video encoding standard to different-format; The define method and the state updating method of abstract unified general code table able to programme, thus make the coding structure different video standards under can both utilize the apparatus and method of the utility model to decode, replaced the design of devices at full hardware code table with this; Thereby reach the raising efficiency of research and development, reduce the purpose of hardware area and cost.
According to the one side of the utility model, a kind of variable-length decoder based on the general format code table has been proposed, this device comprises:
-command decoder receives decoding instruction and decoding instruction is deciphered the output order decode results;
-address calculator, the address state variable that returns according to said instruction decode results or address state register calculates the code table address and reads the data in the input code flow;
-code table memory is used to store the code table data, and said code table memory is exported the list item in the code table according to the data in said address calculator code table address that provides and the input code flow that is read;
-list item decoder receives the said list item that the code table memory is exported, and said list item is deciphered, and confirms address state variable and grammer state variable through the result who deciphers;
-address state register receives said address state variable and exports to address calculator;
-grammer status register receives said grammer state variable and when decoding finishes, exports this grammer state variable;
-code table assembler, reception code table data also are loaded in the code table memory, and said code table data comprise a plurality of code tables and have unified general format to different video standards.
Preferably, comprise a plurality of code tables in the said code table data, each code table has the specific classification and the code table address of unique correspondence with it, and each code table comprises a plurality of list items, and each list item has the call number of unique correspondence with it.
Preferably, said a plurality of code table is divided into 0bit code table, 1bit code table ... the Nbit code table, and N>=0 and N are integer, comprise 2 in the Nbit code table NIndividual list item can be searched the Nbit code table through the Nbit data in the code stream, obtains and the corresponding list item of the call number of this Nbit data representation.
Preferably, wherein each said list item comprises one or more in the following information of representing with unified format:
-to the decode value that obtains of decoding of tabling look-up of the Nbit in the code stream;
The sign bit of-decode value;
After-current the tabling look-up, should in code stream, delete what bits;
After-current the tabling look-up, whether code word finishes;
-the address and the code table type of next time tabling look-up;
Said list item decoder is confirmed said address state variable and said grammer state variable according to above information; Wherein said address state variable is used to the code table address and the code table type of indicating the next one to search, and said grammer state variable comprises the syntactic information of decoded result.
Preferably; Wherein address calculator is confirmed the code table in the said code table memory according to the code table address that the instruction code table address that provides of decode results or address state variable provide; And from input code flow, read the Nbit data, and confirm the list item in the said code table through these Nbit data according to the code table type that the instruction code table type that provides of decode results or address state variable provide.
Preferably, also comprising the information that needs what data of deletion in code stream before next time tabling look-up in the said grammer state variable, accomplish to the decoding of the current data that read and definite legal after, the data of corresponding number are deleted from input code flow.
Preferably; The initial code table address and initial code table type of each code word are provided through decoding instruction; When a codeword decoding is not finished; Said address calculator is according to said address state variable look-up table item, and when a codeword decoding was finished, said grammer status register was exported said grammer state variable and specified the initial code table address and initial code table type of next code word again through decoding instruction.
Preferably; Said decoding instruction comprises the number of codewords that will decode; After the decoding of accomplishing each code word; Said address calculator automatically calculates start code table address and the code table type of next new code word according to the address state variable that obtains in the decode procedure last time, till the number of codewords of decoding reaches command request or address state variable and shows that next no Biao Kecha or decoding device quit work.
Preferably; Adopt paging mode to deposit said code table data; Said code table assembler is to code table memory load one page code table; If the page address of the page address of said instruction decode results indication or the indication of said address state variable and the page address of the code table data in the code table assembler are inconsistent, then required code table page or leaf is loaded in the said code table memory by said code table assembler.
Device according to the utility model; For the video standard of different-format, only need the static new cover code table able to programme that generates, for different video formats; Can dynamically select the static in advance code table that generates of assembling, thereby dwindle the area of ASIC hardware logic design greatly for decoding device.
According to the device of the utility model, in order to support the constantly video standard of the new form of appearance, need not to add new code table hardware algorithm logic, need not the checking of flow again, obviously improved the efficient of research and development checkings, saved R&D costs greatly.
Description of drawings
Fig. 1 is the block diagram based on an embodiment of the variable-length decoder of general format code table according to the utility model;
Fig. 2 is the flow chart based on an embodiment of the variable-length decoding method of general format code table according to the utility model;
Fig. 3 is the flow chart based on another embodiment of the variable-length decoding method of general format code table according to the utility model;
Fig. 4 is the flow chart based on another embodiment of the variable-length decoding method of general format code table according to the utility model;
Fig. 5 is the flow chart based on another embodiment of the variable-length decoding method of general format code table according to the utility model.
Embodiment
The utility model propose based on the variable-length decoder of general format code table and method mainly based on following principle: the variable length encoding and decoding mechanism of video data is first usually to wanting image encoded analysis at coding side; Obtain syntactic element; Again according to code table based on the particular video frequency standard; Through tabling look-up syntactic element is encoded to binary code stream, thereby obtains coding result; In decoding end, then based on the corresponding code table of coding side, through table look-up the coupling method be the value of syntactic element with the codeword decoding in the binary code stream, thereby obtain decoded result.The process of Code And Decode need repeatedly be searched a large amount of code tables usually and accomplished.The Variable Length Code result generally includes lead data and Back end data, and lead data is mainly used in the indication code table entry, and the start code table that should adopt when promptly decoding, Back end data mainly comprise Variable Length Code result's value and symbol.
Based on above-mentioned principle; The utility model has utilized the Variable Length Code result's who under the different video standard, obtains abstract rule; With the substandard code table of different video discernible general format of device of conversion cost utility model all, thereby make and to utilize the apparatus and method of the utility model to decode for the coding result under the different video standards.
Fig. 1 is the block diagram based on an embodiment of the variable-length decoder of general format code table according to the utility model, wherein should comprise based on variable-length decoder of general format code table:
-command decoder 101 receives decoding instruction and decoding instruction is deciphered the output order decode results;
-address calculator 102, the address state variable that returns according to said instruction decode results or address state register 106 calculates the code table address and reads the data in the input code flow;
-code table memory 103 is used to store the code table data, and said code table memory 103 is exported the list item in the code table according to the data in said address calculator code table address that provides and the input code flow that is read;
-list item decoder 105 receives the said list item that code table memory 103 is exported, and said list item is deciphered, and confirms address state variable and grammer state variable through the result who deciphers;
-address state register 106 receives said address state variable and exports to address calculator 102;
-grammer status register 107 receives said grammer state variable and when decoding finishes, exports this grammer state variable;
-code table assembler 104, reception code table data also are loaded in the code table memory 103, and said code table data comprise a plurality of code tables and have unified general format to different video standards.
In a preferred embodiment; 104 of code table assemblers receive and are loaded into the code table data in the code table memory 103; Be to generate cover code table data, in application, can generate corresponding code table data to different video standard static state to the specific video standard static; These code table data to different video standards have unified general format, and corresponding with the code table data of video standard self.In fact, said as preamble, because the code table of Variable Length Code has certain abstract rule, therefore can the code table of different video standards all be converted into the code table data in the utility model with general format.Comprise a plurality of code tables in the said code table data, each code table has the specific classification and the code table address of unique correspondence with it, and each code table comprises a plurality of list items, and each list item has the call number of unique correspondence with it.
Particularly, in a preferred embodiment, can be respectively 0bit code table, 1bit code table ... the Nbit code table with being divided into polytype according to the code table in the code table data of the utility model, N>=0 and N are integer, comprise 2 in the 0bit code table 0Individual list item comprises 2 in the 1bit code table 1Individual list item by that analogy, comprises 2 in the Nbit code table NIndividual list item.In the Nbit code table 2 NIn the individual list item each all has the call number of unique correspondence with it, can search the Nbit code table through the Nbit data in the code stream, obtains and the corresponding list item of the call number of this Nbit data representation.Each list item comprises the common information that list item had in the code table of various video standards, and for example, each list item can comprise following five kinds of information, can be represented by five variablees respectively:
Variable v: the bit of the N in the code stream is carried out the decode value that the table-look-up type decoding obtains;
Variable s: the sign bit of decode value;
Variable b: after current the tabling look-up, should in code stream, delete what bits;
Variable eocw: after current the tabling look-up, whether code word finishes;
Variable next: address of next time tabling look-up and code table type;
However, the utility model is not limited to above-mentioned five kinds of information or five variablees, also can comprise other information in the list item of code table of the variable-length decoding under the various video standards, or comprises in above five kinds of information one or more.As long as can be with unified format, the information of expressing in the list item of the variable-length decoding under the various video standards gets final product.
Through list item decoder 105, can draw address state variable and grammer state variable according to the above-mentioned five kinds of information that comprise in the list item.
Wherein the address state variable is used to the code table address and the code table type of indicating the next one to search, and in one embodiment, the address state variable can be identical with variable next;
The grammer state variable comprises the syntactic information of decoded result, and the grammer state variable can comprise:
Variable sign: the symbol of decoded result can obtain according to variable s;
Variable v_1: decode value, can obtain according to variable v, variable v_1 can be a plurality of variablees also, is used for the specific bit of storage of variables v respectively, variable v_1 can also utilize the value of part position storage of variables b;
Variable flag: overflow the indication address of next time tabling look-up, and can obtain according to variable next, for example indicates when not having table next time and can look into as variable next, and more new variables flag is to indicate this state.
However; The utility model is not limited to the address state variable and the grammer state variable of above definition; Can also be other address state variable and grammer state variable; As long as they can represent the code table address and the code table type of tabling look-up respectively, and the information of decoded result gets final product next time.
Grammer status register 107 is before the decoding of any one brand-new code word of beginning all be reset (reset); And after each table lookup operation; Judging on this basis of tabling look-up into legal operation; According to the information in the list item that obtains address state variable and grammer state variable are upgraded, the information in list item (like variable eocw) pointer finishes the decoding of current code word, then returns the grammer state variable by the grammer status register to the outside miscellaneous part of decoding device.
In another preferred embodiment; Also comprise the information (the for example information of variable b) that needs what data of deletion in code stream before next time tabling look-up in the grammer state variable of grammer status register 107; That is to say that in the process that the current data that read are decoded, said data still are retained in the code stream; Up to accomplish to the decoding of the current data that read and confirm legal after, just it is deleted from code stream.In one embodiment, grammer status register 107 returns the information of variable b the peripheral logical unit of decoding device at every turn after tabling look-up, thereby in the data of the current back deletion corresponding number in code stream of tabling look-up;
The decoding device of the utility model can be worked under three kinds of patterns, is respectively single-step mode, automatic mode and paging mode.
Single-step mode
In a preferred embodiment; The decoding device of the utility model is with the operand of single code word as the one whole decoding; The initial code table address and initial code table type of each code word are provided through decoding instruction; When a codeword decoding is finished; Output grammer state variable is also specified the initial code table address and initial code table type of next code word again through decoding instruction, the initial code table address of each code word and initial code table type can be through software or the static in advance settings of firmware before decode operation.
Referring to Fig. 1, in the preferred embodiment, before decoding device was started working, code table assembler 104 will be loaded in the code table memory 103 to a cover code table of particular video frequency standard.When decoding device was started working, address instruction decoder 101 received decoding instruction and it is deciphered, thereby obtains initial code table address and initial code table type.When initial code table type has been indicated first segment data in the input code flow has been decoded; Need search which kind of code table of 0bit code table in the Nbit code table; Also just determined the length of first end data that need read from input code flow; Address calculator 102 needs from code stream, to read corresponding 0bit, the data of 1bit...... or Nbit according to this initial code table type.In code table memory 103, can obtain the code table that will search according to the initial code table address, according to the 0bit that reads, 1bit...... or Nbit data, can find in this code table with the unique corresponding list item of these data.After obtaining this list item; 105 pairs of these list items of list item decoder are deciphered; Thereby obtain above-mentioned address state variable and grammer state variable; Address state register 106 receiver address state variables offer address calculator 102 with this address of tabling look-up and code table type (for example being stored among the variable next) that obtains of tabling look-up next time, the current grammer state variable that arrives of tabling look-up of grammer status register storage.Address calculator 102 is read corresponding 0bit according to the code table type of tabling look-up next time from input code flow; 1bit...... or the data of Nbit; And according to the code table address of tabling look-up definite corresponding code table in code table memory 103 next time, thereby find the corresponding list item in this code table based on above-mentioned data and code table address.After this; Parts such as list item decoder 105, address state register 106, grammer status register 107 repeat aforesaid operations to this list item; In code stream, constantly take out the data decoding of tabling look-up; Result up to list item decoder 105 indicates the decode operation (for example by variable eocw indication) of having accomplished a code word, then returns the grammer state variable that finally obtains by grammer status register 107 to the outside miscellaneous part of decoding device, and grammer status register 107 is resetted.When the decoding of the next code word of beginning, draw the initial code table address and the initial code table type of next code word and repeat aforesaid operations according to new decoding instruction once more by command decoder 101.If do not receive new decoding instruction, said process stops naturally.
Automatic mode
In another preferred embodiment of the utility model, the decoding device of the utility model is with the code word of the specifying number object as the operation of one whole decoding, and this pattern can be described as automatic mode.Under this automatic mode, decoding instruction comprises the number of codewords that will decode, and this number can be limited, also can be unlimited, promptly till decoding device quits work.Under this automatic mode; After the decoding of accomplishing each code word; Address calculator 102 no longer receives new decoding instruction; But automatically calculate start code table address and the code table type of next new code word according to the address state variable (for example variable next) that obtains in the decode procedure last time, reach command request or address state variable up to the number of codewords of decoding and show the next time of no Biao Kecha or till decoding device quits work, completion automatic decoding process.Preferably; Initial code table address when automatic mode starts can provide through different modes according to application need with initial code table type, for example can be provided by the address state variable in the address state register or provided or provided by other the decoding instruction that is used to indicate this initial code table address and initial code table type by decoding instruction.
Paging mode
In another preferred embodiment of the utility model; In order to enlarge the addressing range of code table; Adopt paging mode to deposit the code table data, therefore in decoding instruction, can comprise the page address and the page or leaf bias internal address thereof of initial code table; And initial code table type, thereby initial code table is carried out addressing through the page address and the page or leaf offset address thereof of initial code table.
When the scale of the corresponding code table data of video standard hour, only need before the decoding beginning, to load one page code tables to code table memory 103 through code table assembler 104, can accomplish decoding.When being on a grand scale of the corresponding code table data of video standard; For improving the decoding speed of decoding device; Can load one page code table to code table memory 103 through code table assembler 104, in decode procedure, if the situation that the code table decoding address overflows; The page address of corresponding code table page address and current code table page or leaf is inconsistent if for example said instruction decode results or the indication of said address state variable are tabled look-up next time; Need switch to addressing in other code table pages or leaves, then required code table page or leaf is loaded in the code table memory 103, carry out subsequent decoding by code table assembler 104.In a preferred embodiment; Can pass through list item information; For example variable next and variable eocw indicate needs to switch the code table page or leaf; For example do not had Biao Kecha when variable next indication, and variable eocw indication when not finished, the decoding of a code word means that the page address of next time table look-up corresponding code table page address and current code table page or leaf is inconsistent; In this state; Address state variable capable of using or grammer state variable are preserved the page address and page or leaf bias internal address of the code table page or leaf that will switch to, and export to external control component, and external control component control code table assembler 104 loads the code table page or leaf that will switch according to above-mentioned page address to code table memory 103; External control component is also controlled decoding instruction and to address decoder page address and page or leaf bias internal address is provided, thereby makes the decoding device of the utility model continue in new code table page or leaf, to search decoding.
Fig. 2 is the flow chart based on an embodiment of the variable-length decoding method of general format code table according to the utility model, wherein should comprise based on variable-length decoding method of general format code table:
S201 receives the code table data and is loaded in the code table memory through the code table assembler, and said code table data comprise a plurality of code tables and have unified general format to different video standards;
S202 receives decoding instruction and decoding instruction is deciphered the output order decode results through command decoder;
S203, the address state variable that returns according to said instruction decode results or address state register through address calculator calculates the code table address and reads the data in the input code flow;
S204, the list item of the code table in the code table memory is searched and exported to the code table address that provides according to said address calculator and the data in the input code flow that is read;
S205 deciphers said list item through the list item decoder, confirms address state variable and grammer state variable through the result who deciphers, and through the address state register said address state variable is exported to address calculator;
S206 judges whether decoding is accomplished, if the result of decoding indicates decoding to accomplish, then gets into step S207, if the result of decoding indicates decoding not accomplish, then gets into step S203;
S207 exports said grammer state variable through the grammer status register.
Fig. 3 is the flow chart based on another embodiment of the variable-length decoding method of general format code table according to the utility model; The method of the utility model is operated with single-step mode in this embodiment; It promptly is the operand of one whole decoding with single code word; In this embodiment, this method mainly may further comprise the steps:
S301 receives the code table data and is loaded in the code table memory through the code table assembler, and said code table data comprise a plurality of code tables and have unified general format to different video standards;
S302 receives decoding instruction and decoding instruction is deciphered the output order decode results through command decoder, and wherein decode results comprises the initial code table address and initial code table type of the current code word that will decode;
S303 searches and obtains list item according to this initial code table address and initial code table type to the code table memory through address calculator;
S304; Through the list item decoder this list item is deciphered; Thereby obtain address state variable and grammer state variable, wherein comprise the code table address and the code table type of tabling look-up in the address state variable next time, the address state variable is offered address calculator through the address state register;
S305 judges whether to have accomplished the decoding to a code word, if do not accomplish the decoding to a code word, then gets into step S306; If accomplished decoding, then get into step S307 to a code word;
S306 searches and obtains list item according to the address state variable to the code table memory through address calculator, and gets into step S304;
S307 through grammer status register output grammer state variable, resets the grammer status register, and gets back to step S302.
Fig. 4 is the flow chart based on another embodiment of the variable-length decoding method of general format code table according to the utility model; The method of the utility model is operated with automatic mode in this embodiment; Promptly, with the code word of specifying number as the object of the operation of one whole decoding under this automatic mode, decoding instruction comprises the number of codewords that will decode, this number can be limited; It also can be unlimited, promptly till decoding device quits work.In this embodiment, this method may further comprise the steps:
S401 receives the code table data and is loaded in the code table memory through the code table assembler, and said code table data comprise a plurality of code tables and have unified general format to different video standards;
S402 receives decoding instruction and decoding instruction is deciphered the output order decode results through command decoder, and wherein decode results comprises the number of the code word that will decode;
S403 searches and obtains list item according to initial code table address and initial code table type to the code table memory through address calculator;
S404; Through the list item decoder this list item is deciphered; Thereby obtain address state variable and grammer state variable, wherein comprise the code table address and the code table type of tabling look-up in the address state variable next time, the address state variable is offered address calculator through the address state register;
S405 judges whether to accomplish the decoding to a code word, if do not accomplish the decoding to a code word, then gets into step S406; If accomplished decoding, then get into step S407 to a code word;
S406 searches and obtains list item according to the address state variable to the code table memory through address calculator, gets into step S404 then;
S407 through grammer status register output grammer state variable, resets the grammer status register, and gets into step S408;
S408 judges whether to have accomplished the decoding to the code word of said number, if do not accomplish the decoding to the code word of said number, then gets into step S406; If accomplished the decoding to the code word of said number, then this method finishes.
Preferably; Said initial code table address can provide through different modes according to application need with initial code table type, for example can be provided by the address state variable in the address state register or provided or provided by other the decoding instruction that is used to indicate this initial code table address and initial code table type by decoding instruction.
Fig. 5 is the flow chart based on another embodiment of the variable-length decoding method of general format code table according to the utility model; In this embodiment, in order to enlarge the addressing range of code table, adopt paging mode to deposit the code table data; Therefore in decoding instruction; The initial page address and the initial page bias internal address thereof that can comprise initial code table, and initial code table type, thus through the initial page address and the initial page offset address thereof of initial code table initial code table is carried out addressing.When the scale of the corresponding code table data of video standard hour, only need before the decoding beginning, to load one page code tables to code table memory 103 through code table assembler 104, can accomplish decoding, this moment, coding/decoding method was similar with Fig. 2, Fig. 3 or method shown in Figure 4.
In a preferred embodiment, when being on a grand scale of the corresponding code table data of video standard, be the decoding speed that improves decoding device; Can load one page code table to code table memory 103 through code table assembler 104; In decode procedure, if the situation that the code table decoding address overflows need switch to addressing in other code table pages or leaves; Then required code table page or leaf is loaded in the code table memory 103, carries out subsequent decoding by code table assembler 104.In this embodiment shown in Figure 5, be to be that the paging storage mode is described on the basis with embodiment shown in Figure 2, in fact, the paging storage mode also can be applicable to Fig. 3 and embodiment shown in Figure 4, and wherein this method comprises:
S501 receives one page code table data and is loaded in the code table memory through the code table assembler, and said code table data comprise a plurality of code tables and have unified general format to different video standards;
S502 receives decoding instruction and decoding instruction is deciphered the output order decode results through command decoder;
S503, the address state variable that returns according to said instruction decode results or address state register through address calculator calculates the page address and a page or leaf bias internal address of code table;
S504 judges whether the page address of the code table data in this page address and the code table assembler is consistent; If the page address of the code table data in this page address and the code table assembler is inconsistent, then get into step S505; If the page address of the code table data in this page address and the code table assembler is consistent, get into step S506;
S505 to code table memory load and corresponding another page number table data of this page address, and gets into step S507 through the code table assembler;
S506, the data in the input code flow that reads, and get into step S507;
S507 searches and exports the list item of the code table in the code table memory according to said page address and the data in page or leaf bias internal address and the input code flow that read;
S508 deciphers said list item through the list item decoder, confirms address state variable and grammer state variable through the result who deciphers, and through the address state register said address state variable is exported to address calculator;
S509 judges whether decoding is accomplished; If the result of decoding indicates decoding to accomplish, then get into step S510, if the result of decoding indicates decoding not accomplish, then get into step S503;
S510 exports said grammer state variable through the grammer status register, and this method finishes.
The foregoing description is principle and the effect thereof that is used for illustrative the utility model, but not is used to limit the utility model.Any those skilled in the art all can make amendment to the foregoing description under the spirit and category of the utility model.So the protection range of the utility model, should be listed like claims of the utility model.

Claims (9)

1. the variable-length decoder based on the general format code table is characterized in that, this device comprises:
-command decoder receives decoding instruction and decoding instruction is deciphered the output order decode results;
-address calculator, the address state variable that returns according to said instruction decode results or address state register calculates the code table address and reads the data in the input code flow;
-code table memory is used to store the code table data, and said code table memory is exported the list item in the code table according to the data in said address calculator code table address that provides and the input code flow that is read;
-list item decoder receives the said list item that the code table memory is exported, and said list item is deciphered, and confirms address state variable and grammer state variable through the result who deciphers;
-address state register receives said address state variable and exports to address calculator;
-grammer status register receives said grammer state variable and when decoding finishes, exports this grammer state variable;
-code table assembler, reception code table data also are loaded in the code table memory, and said code table data comprise a plurality of code tables and have unified general format to different video standards.
2. the variable-length decoder based on the general format code table according to claim 1; It is characterized in that; Each said code table has the specific classification and the code table address of unique correspondence with it, and each code table comprises a plurality of list items, and each list item has the call number of unique correspondence with it.
3. the variable-length decoder based on the general format code table according to claim 2 is characterized in that, said a plurality of code tables are divided into 0bit code table, 1bit code table ... the Nbit code table, and N>=0 and N are integer, comprise 2 in the Nbit code table NIndividual list item can be searched the Nbit code table through the Nbit data in the code stream, obtains and the corresponding list item of the call number of this Nbit data representation.
4. the variable-length decoder based on the general format code table according to claim 2 is characterized in that, each said list item comprises one or more in the following information of representing with unified format:
-to the decode value that obtains of decoding of tabling look-up of the Nbit in the code stream;
The sign bit of-decode value;
After-current the tabling look-up, should in code stream, delete what bits;
After-current the tabling look-up, whether code word finishes;
-the address and the code table type of next time tabling look-up;
Said list item decoder is confirmed said address state variable and said grammer state variable according to above information; Wherein said address state variable is used to the code table address and the code table type of indicating the next one to search, and said grammer state variable comprises the syntactic information of decoded result.
5. the variable-length decoder based on the general format code table according to claim 4; It is characterized in that; Address calculator is confirmed the code table in the said code table memory according to the code table address that the instruction code table address that provides of decode results or address state variable provide; And from input code flow, read the Nbit data, and confirm the list item in the said code table through these Nbit data according to the code table type that the instruction code table type that provides of decode results or address state variable provide.
6. the variable-length decoder based on the general format code table according to claim 4; It is characterized in that; Also comprise the information that needs what data of deletion in code stream before next time tabling look-up in the said grammer state variable; Accomplish to the decoding of the current data that read and confirm legal after, the data of corresponding number are deleted from input code flow.
7. the variable-length decoder based on the general format code table according to claim 1; It is characterized in that; The initial code table address and initial code table type of each code word are provided through decoding instruction; When a codeword decoding is not finished; Said address calculator is according to said address state variable look-up table item, and when a codeword decoding was finished, said grammer status register was exported said grammer state variable and specified the initial code table address and initial code table type of next code word again through decoding instruction.
8. the variable-length decoder based on the general format code table according to claim 1; It is characterized in that; Said decoding instruction comprises the number of codewords that will decode; After the decoding of accomplishing each code word; Said address calculator automatically calculates start code table address and the code table type of next new code word according to the address state variable that obtains in the decode procedure last time, till the number of codewords of decoding reaches command request or address state variable and shows that next no Biao Kecha or decoding device quit work.
9. the variable-length decoder based on the general format code table according to claim 1; It is characterized in that; Adopt paging mode to deposit said code table data; Said code table assembler, then is loaded into required code table page or leaf in the said code table memory by said code table assembler if the page address of the page address of the page address of said instruction decode results indication or the indication of said address state variable and the code table data in the code table assembler is inconsistent to code table memory load one page code table.
CN 201220111591 2012-03-22 2012-03-22 Variable-length decoding device based on universal format code table Expired - Lifetime CN202602827U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201220111591 CN202602827U (en) 2012-03-22 2012-03-22 Variable-length decoding device based on universal format code table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201220111591 CN202602827U (en) 2012-03-22 2012-03-22 Variable-length decoding device based on universal format code table

Publications (1)

Publication Number Publication Date
CN202602827U true CN202602827U (en) 2012-12-12

Family

ID=47320333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201220111591 Expired - Lifetime CN202602827U (en) 2012-03-22 2012-03-22 Variable-length decoding device based on universal format code table

Country Status (1)

Country Link
CN (1) CN202602827U (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847801A (en) * 2015-01-30 2016-08-10 联发科技股份有限公司 Multi-standard video decoder with novel binary element decoding
CN110111779A (en) * 2018-01-29 2019-08-09 阿里巴巴集团控股有限公司 Syntactic model generation method and device, audio recognition method and device
CN110995285A (en) * 2019-12-27 2020-04-10 成都达安众科技有限公司 UHF RFID step-by-step instruction decoding method and chip

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847801A (en) * 2015-01-30 2016-08-10 联发科技股份有限公司 Multi-standard video decoder with novel binary element decoding
US10205957B2 (en) 2015-01-30 2019-02-12 Mediatek Inc. Multi-standard video decoder with novel bin decoding
CN105847801B (en) * 2015-01-30 2019-02-26 联发科技股份有限公司 Multi-standard video decoder is decoded with novel binary element
CN110111779A (en) * 2018-01-29 2019-08-09 阿里巴巴集团控股有限公司 Syntactic model generation method and device, audio recognition method and device
CN110995285A (en) * 2019-12-27 2020-04-10 成都达安众科技有限公司 UHF RFID step-by-step instruction decoding method and chip

Similar Documents

Publication Publication Date Title
US10224957B1 (en) Hash-based data matching enhanced with backward matching for data compression
CN104657362A (en) Method and device for storing and querying data
CN101809871A (en) optimized cabac decoder
CN202602827U (en) Variable-length decoding device based on universal format code table
US8947272B2 (en) Decoding encoded data
CN101551820B (en) Generation method and apparatus for index database of points of interest attribute
CN114567331A (en) LZ 77-based compression method, device and medium thereof
CN103825945A (en) Fragmentation storage method and user terminal
US7102550B1 (en) System and method for decoding a variable-length codeword while updating the variable-length codeword
CN110554878A (en) data conversion method, game data processing method and device and server
CN106354746B (en) Search method and search device
CN102193787B (en) Methods for serialization and de-serialization, device and system
CN201259670Y (en) Text message processing apparatus and equipment
CN103327314B (en) Variable-length decoder and method based on general format code table
CN115765754A (en) Data coding method and coded data comparison method
CN113222807B (en) Data memory, data storage method, data reading method, chip and computer equipment
CN114070470A (en) Encoding and decoding method and device
CN112015425A (en) Data storage method, data reading device, electronic equipment and storage medium
CN102695096A (en) Method and device for acquiring output image-text language of bit stream and set top box
CN115001628B (en) Data encoding method and device, data decoding method and device and data structure
JP2003513313A (en) Variable length decoding
US6622279B1 (en) Computer for data processing and method for data processing using a computer
CN115577149B (en) Data processing method, device and equipment and readable storage medium
US11831344B2 (en) Providing codewords
CN110413604B (en) Method and system for optimizing name ordering of phonebook on SIM card and SIM card

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
CX01 Expiry of patent term
CX01 Expiry of patent term

Granted publication date: 20121212