CN101345873A - Method and apparatus for decoding picture - Google Patents
Method and apparatus for decoding picture Download PDFInfo
- Publication number
- CN101345873A CN101345873A CN 200810116958 CN200810116958A CN101345873A CN 101345873 A CN101345873 A CN 101345873A CN 200810116958 CN200810116958 CN 200810116958 CN 200810116958 A CN200810116958 A CN 200810116958A CN 101345873 A CN101345873 A CN 101345873A
- Authority
- CN
- China
- Prior art keywords
- decoding
- picture
- code table
- carry out
- huffman code
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
One embodiment of the invention provides a method and a device of decoding pictures. The method and the device belong to the field of computer and picture decoding. The method comprises: parsing a grammar element Li in the code stream; judging the grammar element Li and recommending whether Li of a Huffman code table is same, if same, using the Huffman code table to decode the pictures. The embodiment of the invention also provides a device of decoding pictures. The method and the device have the advantages of saving decoding time and reducing CPU computation amount and occupancy factor.
Description
Technical field
The present invention relates to computer and picture decoding field, relate in particular to a kind of method and device of decoding picture.
Background technology
Joint photographic experts group (Joint Picture Experts Group, JPEG) be a kind of reference format of picture, it has defined incompatible coding method, in the most frequently used pattern, it is the band distortion, an image that recovers out from jpeg file is always different with original image, but the image of lossy compression method after rebuilding is usually than the better effects if of original image.Another outstanding feature of JPEG is that its compression factor is quite high.In view of above-mentioned advantage, a large amount of application in network of JPEG picture.The method of the decoding JPEG picture that provides in the JPEG agreement comprises the steps: as shown in Figure 1
Step 11, from code stream, parse syntactic element Li and syntactic element V
I, j,
This Li is the number that code length is the code word of i; This V
I, jPromptly be and the relevant value of symbol of Huffman (huffman).
Step 12, generate HUFFSIZE and two tabulations of HUFFWORD according to Li and the computing of JPEG agreement;
Step 13, set up HUFFSIZE tabulation, HUFFWORD tabulation and V by reordering
I, jCorresponding relation, construct the huffman code table, carry out the decoding of JPEG picture.
In realizing process of the present invention, the inventor finds prior art, and there are the following problems:
Technology need just can obtain HUFFSIZE and two tabulations of HUFFWORD by the calculating of large amount of complex when constructing the huffman code table now, and then has increased the time of decoding, has also increased amount of calculation and the occupancy of CPU.
Summary of the invention
The embodiment of the invention provides a kind of method and device of decoding picture, does not need the calculating of large amount of complex just can obtain the huffman code table in decode procedure, has reduced amount of calculation and the occupancy of CPU.
The specific embodiment of the present invention provides a kind of method of decoding picture, and described method comprises:
In code stream, parse syntactic element Li;
Judge whether described syntactic element Li is identical with the Li that recommends huffman code table,, use described recommendation huffman code table to carry out the picture decoding judging when identical.
The specific embodiment of the invention also provides a kind of device of decoding picture, and described device comprises:
Resolution unit is used for parsing syntactic element Li at code stream;
Judging unit is used to judge whether described syntactic element Li is identical with the Li that recommends huffman code table;
First decoding unit is used for judging under the identical situation, uses described recommendation huffman code table to carry out the picture decoding.
By the above-mentioned technical scheme that provides as can be seen, the technical scheme of the embodiment of the invention is by parsing syntactic element Li from code stream, and Li compared with recommending the Li in the code table, recommend the huffman code table to carry out the picture decoding thereby judge whether can directly use.Because simply contrasting, the Li in syntactic element Li that technical scheme of the present invention only need parse and the recommendation code table can obtain the required huffman code table of picture decoding, and the calculating that need not to carry out large amount of complex obtains HUFFSIZE and HUFFWORD, and reorders and obtain HUFFSIZE, HUFFWORD and V
I, jCorresponding relation, thereby saved the time of decoding, also reduced amount of calculation and the occupancy of CPU.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
The method flow diagram of the decoding JPEG picture that Fig. 1 provides for prior art.
The flow chart of the method for a kind of decoding picture that Fig. 2 provides for the embodiment of the invention 1.
Fig. 3 is the structure chart of the device of the described decoding picture of the specific embodiment of the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Embodiment of the present invention provides a kind of method of decoding picture, and the syntactic element Li of this method by parsing from code stream compares this Li with recommending the Li in the code table, if identical then adopt and recommend the huffman code table to carry out the picture decoding.Otherwise use the syntactic element Li and the syntactic element V that from code stream, parse
I, jConstruct the huffman code table voluntarily according to the JPEG agreement, adopting voluntarily then, the huffman code table of structure carries out the picture decoding.The method of the decoding picture that the specific embodiment of the invention provides, owing to adopted recommendation huffman code table to carry out the picture decoding, so the calculating that does not need to carry out large amount of complex obtains HUFFSIZE and HUFFWORD, and reorder acquisition HUFFSIZE, HUFFWORD and V
I, jCorresponding relation, thereby saved the time of decoding, also reduced amount of calculation and the occupancy of CPU.
Recommendation code table in the specific embodiment of the invention if no special instructions all can be for recommending the huffman code table.
The present invention is concrete implement 1 described a kind of decoding picture method can for, this method comprises the steps: as shown in Figure 2
Step 21, from code stream, resolve and obtain syntactic element Li;
This syntactic element Li is the tabulation of a 16-bit in actual conditions, T.81 be labeled as BITS list in the JPEG agreement at CCITT.
Step 22, judge whether this Li is identical with the Li that recommends the huffman code table; Judging when identical, carry out following step 23, otherwise execution in step 24;
The picture decoding process of the standard in this step can just not given unnecessary details here referring to the CCITT relevant regulations of JPEG agreement T.81.This recommends the huffman code table, and T.81 JPEG agreement TableK.3~Table is K.6 referring to CCITT.
Step 23, use recommend the huffman code table to carry out the picture decoding;
Step 24, carry out the picture decoding process of standard, for example can construct the huffman code table, and use the huffman code table of structure to decode according to the mode of JPEG agreement regulation.。
If when picture decoding abnormal conditions take place in the decode procedure of step 22 and step 23, can then carry out the picture decoding process of standard.These abnormal conditions can for, make a mistake during decoding picture or unusual automatic withdraw from etc. of decoding program.
The described method of the embodiment of the invention is by parsing syntactic element Li from code stream, and Li is compared with recommending the Li in the code table, if identical just the employing recommends the huffman code table to decode picture.Because the Li in syntactic element Li that technical scheme of the present invention only need parse and the recommendation code table simply contrasts and can obtain the huffman code table of decoding required, and the calculating that need not to carry out large amount of complex obtains HUFFSIZE and HUFFWORD, and reorders and obtain HUFFSIZE, HUFFWORD and V
I, jCorresponding relation, thereby saved the time of decoding, also reduced amount of calculation and the occupancy of CPU.
Embodiments of the present invention also provide a kind of device of decoding picture, and described device comprises as shown in Figure 3: resolution unit 31 is used for parsing syntactic element Li at code stream; Judging unit 32 is used to judge whether syntactic element Li is identical with the Li that recommends the huffman code table; First decoding unit 33 is used for judging under the identical situation at judging unit 32, uses and recommends the huffman code table to carry out the picture decoding.
Optionally, said apparatus can also comprise: second decoding unit 34, be used for when abnormal conditions take place decoding unit 33, and adopt the normal pictures decoding process to carry out the picture decoding.
Decoding unit 33 generation abnormal conditions are identical with the abnormal conditions that the picture among the method embodiment is decoded, and just do not giving unnecessary details here.The normal pictures decoding process can be referring to the associated description of method embodiment.
The described device of invention embodiment, from code stream, parse syntactic element Li by resolution unit 31, and by judging unit 32 Li is compared with recommending the Li in the code table, if identical just the employing by decoding unit 33 recommends code tables to carry out picture to decode.Because the Li in syntactic element Li that technical scheme of the present invention only need parse and the recommendation code table simply contrasts and can obtain the huffman code table of decoding required, and the calculating that need not to carry out large amount of complex obtains HUFFSIZE and HUFFWORD, and reorders and obtain HUFFSIZE, HUFFWORD and V
I, jCorresponding relation, thereby saved the time of decoding, also reduced amount of calculation and the occupancy of CPU.It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, module in the accompanying drawing or flow process might not be that enforcement the present invention is necessary.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method can instruct relevant hardware to finish by program, described program can be stored in a kind of computer-readable recording medium, this program comprises one of step or its combination of method embodiment when carrying out.
In addition, each functional unit in each embodiment of the present invention can be integrated in the processing module, also can be that the independent physics in each unit exists, and also can be integrated in the module two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, also can adopt the form of software function module to realize.If described integrated module realizes with the form of software function module and during as independently production marketing or use, also can be stored in the computer read/write memory medium.
The above-mentioned storage medium of mentioning can be a read-only memory, disk or CD etc.
In sum, the technical scheme that the specific embodiment of the invention provides has the time of having saved decoding, has also reduced the amount of calculation of CPU and the advantage of occupancy.
The above; only be the preferable embodiment of the present invention; but protection scope of the present invention is not limited thereto; anyly be familiar with those skilled in the art in the technical scope that the embodiment of the invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.
Claims (8)
1, a kind of method of decoding picture is characterized in that, described method comprises:
In code stream, parse syntactic element Li;
Judge whether described syntactic element Li is identical with the Li that recommends huffman code table,, use described recommendation huffman code table to carry out the picture decoding judging when identical.
2, method according to claim 1 is characterized in that, if judge not simultaneously, adopts the normal pictures decoding process to carry out the picture decoding.
3, method according to claim 1 is characterized in that, if described picture is decoded when abnormal conditions take place, described method also comprises:
Adopt the normal pictures decoding process to carry out the picture decoding.
4, method according to claim 3 is characterized in that, described abnormal conditions are:
Make a mistake during decoding picture or the unusual automatic release of decoding program.
As each described method of claim 1 to 4, it is characterized in that 5, described picture is the JPEG picture.
6, a kind of device of decoding picture is characterized in that, described device comprises:
Resolution unit is used for parsing syntactic element Li at code stream;
Judging unit is used to judge whether described syntactic element Li is identical with the Li that recommends huffman code table;
First decoding unit is used for judging under the identical situation, uses described recommendation huffman code table to carry out the picture decoding.
7, device according to claim 4 is characterized in that, described device also comprises:
Second decoding unit is used in described decoding unit generation abnormal conditions or described judgment unit judges adopting the normal pictures decoding process to carry out the picture decoding for not simultaneously.
As claim 6 or 7 described methods, it is characterized in that 8, described picture is the JPEG picture.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200810116958 CN101345873A (en) | 2008-07-21 | 2008-07-21 | Method and apparatus for decoding picture |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200810116958 CN101345873A (en) | 2008-07-21 | 2008-07-21 | Method and apparatus for decoding picture |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101345873A true CN101345873A (en) | 2009-01-14 |
Family
ID=40247742
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200810116958 Pending CN101345873A (en) | 2008-07-21 | 2008-07-21 | Method and apparatus for decoding picture |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101345873A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106204668A (en) * | 2016-07-01 | 2016-12-07 | 腾讯科技(深圳)有限公司 | Picture decoding method and device |
-
2008
- 2008-07-21 CN CN 200810116958 patent/CN101345873A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106204668A (en) * | 2016-07-01 | 2016-12-07 | 腾讯科技(深圳)有限公司 | Picture decoding method and device |
CN106204668B (en) * | 2016-07-01 | 2020-11-10 | 腾讯科技(深圳)有限公司 | Picture decoding method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TW583883B (en) | System and method for multiple channel video transcoding | |
CN109064399B (en) | Image super-resolution reconstruction method and system, computer device and storage medium thereof | |
CN103260021B (en) | A kind of video encoding/decoding method and device | |
WO2016124070A1 (en) | Data processing method and device | |
CN109672893A (en) | A kind of video encoding/decoding method, device, equipment and storage medium | |
CN107370726B (en) | Virtual slicing method and system for distributed media file transcoding system | |
JP2009017535A (en) | Coding of multimedia signal | |
EP2219117A1 (en) | A processing module, a device, and a method for processing of XML data | |
CN103702124A (en) | Transcoding acceleration method and transcoder | |
CN105187845A (en) | Video data decoding device and method | |
CN103369315A (en) | Coding and decoding methods, equipment and system of intra-frame chroma prediction modes | |
CN107229516B (en) | Data processing method and device | |
CN114817114A (en) | MIPI interface, control method, device and medium thereof | |
CN105554375A (en) | Method and device of video preview in digital video recorder | |
CN101345873A (en) | Method and apparatus for decoding picture | |
CN110446046B (en) | Batch image fast decoding method based on embedded platform | |
CN101710994B (en) | Method and system for video decoding | |
CN103391440A (en) | Binarization encoding processing method and device of syntactic information | |
CN105791514A (en) | Application starting monitoring method and device | |
CN115334313A (en) | Video decoding method, device, equipment and storage medium | |
CN114417834A (en) | Text processing method and device, electronic equipment and readable storage medium | |
CN114070470A (en) | Encoding and decoding method and device | |
CN113722321A (en) | Data export method and device and electronic equipment | |
CN112820343A (en) | Data protection method and device, computer equipment and storage medium | |
CN105657540A (en) | Video decoding method adapted to Android system and device thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Open date: 20090114 |