CN100558166C - A kind of Code And Decode method of graph terminal interface - Google Patents

A kind of Code And Decode method of graph terminal interface Download PDF

Info

Publication number
CN100558166C
CN100558166C CN 200610112819 CN200610112819A CN100558166C CN 100558166 C CN100558166 C CN 100558166C CN 200610112819 CN200610112819 CN 200610112819 CN 200610112819 A CN200610112819 A CN 200610112819A CN 100558166 C CN100558166 C CN 100558166C
Authority
CN
China
Prior art keywords
present encoding
code word
pixel value
picture element
run length
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 - Fee Related
Application number
CN 200610112819
Other languages
Chinese (zh)
Other versions
CN1925612A (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.)
Dongguan Lianzhou Electronic Technology Co Ltd
Original Assignee
Institute of Computing Technology of CAS
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 Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CN 200610112819 priority Critical patent/CN100558166C/en
Publication of CN1925612A publication Critical patent/CN1925612A/en
Application granted granted Critical
Publication of CN100558166C publication Critical patent/CN100558166C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses a kind of graph terminal interface coding method.This method is selected the reference position of present encoding position, and the unified position mark that is provided with.When encoded in the present encoding position, at first search for the pixel value of its reference position.When the pixel value of present encoding position picture element does not occur in its reference position, the position mark of present encoding position is enrolled code word, this code word is enrolled code stream, and subsequently the pixel value of present encoding position picture element is enrolled code stream.When the pixel value of present encoding position picture element occurs in its reference position, the position mark of reference position is enrolled code word, and search for run length backward, and this run length is enrolled code word, this code word is enrolled code stream.The coding and the decoding algorithm thereof of graph terminal interface of the present invention is simple, code efficiency is high, operand is little, and the computing capability of application server and terminal is less demanding, is suitable for the more weak terminal equipment of computing capability.

Description

A kind of Code And Decode method of graph terminal interface
Technical field
The present invention relates to the interface data transmission technique field in the graphic terminal application protocol, more particularly, the present invention relates to the Code And Decode method in a kind of graph terminal interface transfer of data.
Background technology
Along with developing rapidly of network infrastructure and internet, various terminal equipments comprise that the use of PC, PDA, NC etc. is universal day by day.Use the various application on the network terminal accesses network to become the important way that people obtain information and various network services.In various access modes, use the application program of the various graphical interfaces on the network to become a kind of trend gradually by the graphic terminal application protocol, adopt this mode, can reduce the maintenance and management cost of various software and hardwares greatly.
In graphic terminal was used, application program left on the terminal server, and terminal is by the application program on the network execution server.As shown in Figure 1, the graphical interfaces of application program is drawn on terminal server in the empty screen.Terminal is mainly finished by empty screen alternately with the graphical interfaces between the terminal server.Terminal server is checked empty screen state, if some zone of empty screen (dash area among Fig. 1) data change, then terminal server transmits the empty on-screen data of zone (being generally a rectangular area) that changes every Fixed Time Interval to terminal, and shows on terminal screen.The data of empty screen are generally deposited with the BMP form, and order has been described the pixel value of each pixel in the empty screen, and the figure place of pixel value (BPP) can be set to 8,16,24 or 32.
In graphic terminal shown in Figure 1 is used, by network with on-screen data from terminal server to terminal transmission, on-screen data is carried out efficient encoding compression fast so that reduce the volume of transmitted data of network, then is a key technology of graphic terminal application protocol.In the graphic terminal application process, the general requirement of the graphical interfaces data compression on the application server is the lossless compress process, and data format is the BMP form.Because the terminal applies server handles a plurality of graphical interface of user simultaneously, therefore require the compression algorithm must be fast simple, terminal then may comprise the various device from PC to PDA, it is also simple as much as possible that this will find the solution code calculation.In graphic terminal is used, the transfer of data of graphical interfaces will take a large amount of network bandwidths in addition, and it also is a basic demand of compression algorithm that high as far as possible compression ratio is provided.
Summary of the invention
The objective of the invention is to provides a kind of simple Code And Decode method of graph terminal interface fast for the graphical interfaces data of BMP form, and improves compression ratio as far as possible.
To achieve these goals, the invention provides a kind of graph terminal interface coding method, be used for the empty on-screen data of rectangular area on the terminal server is encoded, so that be transmitted through the network to terminal.This method comprises:
Select the reference position of present encoding position, and present encoding position and reference position unification are provided with position mark; Described reference position is positioned in coded sequence before the present encoding position;
When encoded in a certain present encoding position, the pixel value of at first searching for its reference position, and the pixel value of the picture element of comparison present encoding position and reference position, encode according to two kinds of situations then:
When the pixel value of present encoding position picture element does not occur in its reference position, the code word of the position mark of present encoding position being enrolled present encoding position picture element; This code word is enrolled code stream, and subsequently the pixel value of present encoding position picture element is enrolled code stream;
When the pixel value of present encoding position picture element occurs in its reference position, the position mark of reference position is enrolled the code word of present encoding position picture element, and search for the run length that has the picture element of identical pixel value with present encoding position picture element backward, and the code word of this run length being enrolled present encoding position picture element; This code word is enrolled code stream;
Described rectangular area is begun to encode by preceding method in order from original position, until the coding of finishing whole rectangular area.In when coding, the original position of described rectangular area is the picture element in this regional upper left corner, and its coded sequence is for from left to right from top to bottom.
The reference position of described present encoding position is respectively the left previous position of present encoding position, upper left two positions, just goes up two positions, upper right two positions.The position mark of described present encoding position and reference position thereof can be represented with three continuous binary digits, be positioned at the Senior Three position of described code word.
The position mark of described present encoding position and reference position thereof is respectively: left previous position is 011, upper left first position is 110, upper left second position is 010, just going up first position is 101, just going up second position is 001, upper right first position is 100, and upper right second position is 000, and the present encoding position is 111.
The search of reference position pixel value is carried out according to predetermined order, when the pixel value of the pixel value of finding a reference position in the search procedure and present encoding position is identical, stopped search.
When the pixel value of present encoding position picture element occurred in its reference position, the code word of described present encoding position picture element also comprised a run length marker bit, was used for identifying run length in the occupied figure place of code word.Described position mark, run length flag bit and run length order next-door neighbour in code word arrange.
When the pixel value of present encoding position picture element occurs in its reference position, the code word of described present encoding position edge vegetarian refreshments is made up of one or two byte, wherein first byte Senior Three position of code word is the position mark of reference position, follow by the run length marker bit, according to the different conditions of run length marker bit, adopting low four and a byte subsequently of low four or this first byte of first byte is run length.
When the pixel value of present encoding position picture element did not occur in its reference position, code word was made up of a byte, and wherein the Senior Three position of this byte is the position mark of present encoding position, and other position is for keeping the position.
The palette pixel of described rectangular area is greater than 16.
The invention provides the graph terminal interface coding/decoding method that a kind of data after being used for aforementioned coding method encoded are decoded, this method comprises:
Read the code word of current decoded positions in the code stream, described current decoded positions is corresponding with the present encoding position in the coding method;
Read the position mark in this code word, decode according to two kinds of situations then:
If this position mark that reads is the position mark of present encoding position in the coding method, then closely the pixel value of the pixel value of code word as current decoded positions picture element will be followed in the code stream;
If this position mark that reads is the position mark of a reference position in the coding method, then read the run length n in this code word, the pixel value of n the continuous image vegetarian refreshments that begins from current decoded positions is set to the pixel value of this position mark corresponding reference position;
Read the code word in the code stream in order, until the decoding of finishing whole data.
During run length in reading described code word, be according to the state of the run length position mark in the code word, the position of reading different length in the code stream is as run length.
The coding method of graph terminal interface of the present invention belongs to lossless coding, this coding method algorithm is simple, the computing capability of application server and terminal requires not high, and corresponding decoding algorithm is also simple relatively, operand in the time of can obviously reducing decoding is suitable for the more weak mobile terminal device of computing capability.The two-dimensional signal of graphical interfaces is considered in coding method of the present invention in cataloged procedure, the value of being encoded can according to current location left front, upper left, just go up and 7 upper right points carry out reference encoder, reduce the correlation of coded graphics interface data, improve code efficiency.
Description of drawings
Fig. 1 is the transmission schematic diagram of empty on-screen data during graphic terminal is used;
Fig. 2 is an embodiment who selects the reference position of present encoding position in the coding method of the present invention;
Fig. 3 is the embodiment that position mark is provided with that carries out to present encoding position shown in Figure 2 and reference position thereof;
Fig. 4 is the schematic diagram of codeword structure in the coding method of the present invention; Wherein Fig. 4 (a) is the direct coding to the present encoding position, and Fig. 4 (b) is the indirect coding of present encoding position with respect to the reference position.
Embodiment
Below in conjunction with the drawings and specific embodiments the present invention is described in further detail.
In the graphic terminal application protocol, after terminal server detects empty screen area and changes, when default timer expired, the BMP The data method provided by the invention in the zone that changes is encoded, wherein coding region is generally rectangle, characterising parameter is a quaternary array (x, y, w, h), wherein x and y represent this coordinate position of the regional upper left corner on empty screen, and w and h represent width and the length that this is regional.In the drawing process of graphical interfaces, two kinds of typical application routine interface X and Windows are arranged at present, in both cases, can be by on its interface, adding hook (Hook) function, just these interfaces are once packed again, just can note all operations of application program, and these related zones of operation are exactly the zone that changes to screen.By hook (Hook) function can obtain coding region characterising parameter (x, y, w, h).
In the present invention, be picture element to the coding of rectangle coding region, according to from left to right, order from top to bottom carries out from its upper left corner.
In the process of coding, need therefore at first need to define the reference position of present encoding position here with reference to the coding of its reference position to the coding of present encoding position picture element.As shown in Figure 2, in one embodiment of the invention, selected 7 reference positions altogether, wherein No. 7 positions among Fig. 2 are the present encoding position, and 0~No. 6 position is the reference position of present encoding position.Reference position among Fig. 2 is respectively the left previous position (No. 1), upper left two positions (2 and No. 4) of present encoding position (No. 7), just goes up two positions (0 and No. 5), upper right two positions (3 and No. 6).As can be seen from Figure 2, the reference position is positioned in coded sequence before the present encoding position.
After the reference position is selected to finish, need carry out position mark to present encoding position and reference position unification, so that this position mark is enrolled in the code word, and when decoding, also need to judge that according to this position mark in the code word this code word is to the direct coding of present encoding position or with respect to the coding of reference position in when coding.The effect of position mark is more detailed description hereinafter.Fig. 3 shows the present invention carries out position mark to the reference position a embodiment, corresponding with the position of Fig. 2, the position mark of present encoding position is 111, the left previous position of present encoding position is 011, and upper left first position is 110, and upper left second position is 010, just going up first position is 101, just going up second position is 001, and upper right first position is 100, and upper right second position is 000.
After the position mark setting of present encoding position and reference position thereof is finished, can encode to rectangular area to be encoded.Coding strategy of the present invention is:
When encoded in a certain present encoding position, at first will search for the pixel value of its reference position, the pixel value that a kind of exemplary search order is present encoding position in the zone compares from 0 to 6 successively according to the order of the label among Fig. 2.Then according to (A) and (B) two kinds of situations encode:
(A) after search finished, the pixel value of present encoding position picture element did not occur in its reference position, the code word of then position mark of present encoding position being enrolled present encoding position picture element; This code word is enrolled code stream, and subsequently the pixel value of present encoding position picture element is enrolled code stream.
In an embodiment of this kind situation, the coding of present encoding position picture element shown in Fig. 4 (a), is comprised pixel value two parts of code word and present encoding position picture element.Wherein in the embodiment shown in Fig. 4 (a), code word takies a byte, and position mark is positioned at the Senior Three position t of code word 765, promptly 5~7 of code word, corresponding to the aforesaid position mark that the present encoding position is provided with t as can be known 765=111.In the code word other t 43210For keeping the position, they are all by zero setting in one embodiment in this encoding scheme.Deposit the pixel value of present encoding position picture element in a code word BPP/8 subsequently byte, wherein BPP is the BMP data bits of each picture element, and BPP=8/16/24/32.
(B) in search procedure, when the pixel value of present encoding position picture element occurs in a certain reference position, the code word that then stops search and the position mark of reference position is enrolled present encoding position picture element, search for the run length that has the picture element of identical pixel value with present encoding position picture element then backward, and the code word of this run length being enrolled present encoding position picture element; This code word is enrolled code stream.
In an embodiment of this kind situation, to the coding codeword of present encoding position picture element shown in Fig. 4 (b), the Senior Three position t of code word 765The position mark of the reference position of depositing and searching, and at low four t of this byte 3210Deposit run length.In order to expand the scope of the run length that this code word can deposit, can be with the 4th t in the code word 4As the run length marker bit.As run length marker bit t 4Be set to 0 o'clock, code word size is a byte, the low four bit table t of this byte 3210Show run length, denotable maximum run is 15; When the run length marker bit was set to 1, code word size was two bytes, low four t of first byte in the code word 3210With subsequently a byte totally 12 bit representation run lengths, denotable maximum run is 4095.
The rectangular area is begun to encode according to the coding method of the invention described above in order from original position, and enroll code stream in proper order, until the coding of finishing whole rectangular area.
Rectangular block with 16 * 16 concrete pixels is that example further describes coding method of the present invention below.As shown in table 1, the row of the numeral rectangular block in the 1st row, the row of the numeral rectangular block in the 1st row.Other element representation pixel in the table 1, the pixel value of its this picture element of numeric representation.Pixel can represent that for example, the pixel of the 0th row the 8th row is represented with (0,8) with its corresponding line number and columns as coordinate.In the present embodiment, BPP=32, promptly pixel value is with four byte representations.
Table 1
Figure C20061011281900091
Coding begins from (0,0) pixel.From reference position shown in Figure 2 as can be known, in the rectangular area shown in the table 1, (0,0) pixel does not have the reference position, and therefore the pixel value of (0,0) picture element fails to occur in the reference position, so the Senior Three position t of code word 765Be the position mark of present encoding position, this position mark is 111 as can be known in Fig. 3.Other position in the code word is put 0, and promptly code word is 11100000.After this code word enrolled code stream,, the pixel value (00000000,00000000,00000000,00000000) of (0,0) pixel is enrolled code stream, the intact coding of (0,0) pixel afterwards immediately following code word.
Then, (0,1) pixel becomes the present encoding position, and (0,0) pixel is the reference position of (0,1) pixel, and (0,1) pixel is identical with the pixel value of (0,0) pixel.From the position mark of Fig. 3 as can be known, (0,0) pixel is during as the reference position of (0,1) pixel, and its position mark is 011, therefore with the 011 Senior Three position of enrolling code word.Have identical pixel value from (0,1) pixel to continuous 7 pixels of (0,7) pixel, so run length is 7, this run length is less than 15, so the distance of swimming degree flag bit zero setting in the code word, the low four bit representation run lengths 0111 in code word.Finally, the code word of the coding from (0,1) pixel to (0,7) pixel is 01100111.
Then, (0,8) pixel becomes the present encoding position, continues to encode according to coding method of the present invention.
When (2,4) pixel became the present encoding position, on its reference position, the pixel value of (1,4) and (1,5) pixel is identical with (2,4) to be 3.Because the search of reference position be from Fig. 2 from 0 to 6 in sequence, the pixel value that therefore at first searches (1,4) pixel is identical with the pixel value of present encoding position (2,4) pixel, can stop search at this moment.As shown in Figure 3, (1,4) pixel is during as the reference position of (2,4) pixel, and its position mark is 101, therefore with the 101 Senior Three positions of enrolling in the code word of present encoding.Have identical pixel value from (2,4) pixel to continuous 12 pixels of (2,15) pixel, so run length is 12, this run length is less than 15, so the distance of swimming degree flag bit zero setting in the code word, the low four bit representation run lengths 1100 in code word.Finally, the code word of the coding from (2,4) pixel to (2,15) pixel is 10101100.
When (13,0) pixel became the present encoding position, its pixel value was 17, does not have identical pixel value in its reference position, so the Senior Three position t of code word 765Be the position mark of present encoding position, this position mark is 111 as can be known in Fig. 3.Other position in the code word is put 0, and promptly code word is 11100000.After this code word enrolled code stream,, the pixel value (00000000,00000000,00000000,00010001) of (13,0) pixel is enrolled code stream, the intact coding of (13,0) pixel afterwards immediately following code word.
Then, (13,1) pixel becomes the present encoding position, and on its reference position, the pixel value of (13,0) pixel and present encoding position (13,1) pixel is identical.From the position mark of Fig. 3 as can be known, (13,0) pixel is during as the reference position of (13,1) pixel, and its position mark is 011, therefore with the 011 Senior Three position of enrolling code word.From (13,1) pixel is to (15,15) continuous 47 pixels of pixel have identical pixel value, therefore run length is 47, this run length is greater than 15, therefore the distance of swimming degree mark position in the code word is 1, and low four and the byte subsequently in code word totally 12 is expression run length (0,000 00101111).Finally, the code word of the coding from (13,1) pixel to (15,15) pixel is (01,110,000 00101111).
At last, the code stream of the whole rectangular block after encoding according to method of the present invention is: totally 952 (bit).
11100000,00000000,00000000,00000000,00000000,01100111,
11100000,00000000,00000000,00000000,00000001,01100111,
11100000,00000000,00000000,00000000,00000010,01100011,
11100000,00000000,00000000,00000000,00000011,01101001,
11100000,00000000,00000000,00000000,00000100,01100101,
10101100,
11100000,00000000,00000000,00000000,00000101,01100011,
11000100,
11100000,00000000,00000000,00000000,00000110,01100111,
11100000,00000000,00000000,00000000,00000111,01100110,
10001000,
11100000,00000000,00000000,00000000,00001000,01100011,
01000100,
11100000,00000000,00000000,00000000,00001001,01100111,
11100000,00000000,00000000,00000000,00001010,01100111,
11100000,00000000,00000000,00000000,00001011,01100011,
11100000,00000000,00000000,00000000,00001100,01100011,
10101000,
11100000,00000000,00000000,00000000,00001101,01100011,
11100000,00000000,00000000,00000000,00001110,01100011,
11100000,00000000,00000000,00000000,00001111,01110000,
00010001,
11100000,00000000,00000000,00000000,00010000,01110000,
00010101,01000110,10110000,00100010,
11100000,00000000,00000000,00000000,00010001,01110000,
00101111,
After understanding the above-mentioned coding method of the present invention, corresponding coding/decoding method just clearly.When code stream is decoded, read the code word (byte in other words) in the code stream, the position mark in the code word is judged for example in the foregoing embodiments, this position mark is positioned at the Senior Three position of code word.When this position mark is the position mark of present encoding, be 111 in the foregoing embodiments, then will follow the pixel value of the pixel value of code word in the code stream closely as current decoded positions picture element.When this position mark is the position mark of a reference position, be the position mark of each reference position of defining among Fig. 3 in the foregoing embodiments, then read the run length n in this code word, the pixel value of n the continuous image vegetarian refreshments that begins from current decoded positions is set to the pixel value of this position mark corresponding reference position.When in code word, having defined the run length marker bit, also will be according to the state of the run length position mark in the code word, the position of reading different length in the code stream is as run length.
Corresponding to aforesaid coding embodiment, in a decoding embodiment, can adopt following decoding step:
(1) the Senior Three position of code fetch word;
(2) if the value of the Senior Three position of code word is the position mark of present encoding position (just current decoded positions), i.e. 111 among Fig. 3, then the pixel value of current location is from next byte;
(3) if the value of the Senior Three position of code word is the position mark of the reference position of present encoding position (just current decoded positions), i.e. other value except that 111 among Fig. 3.Continue to read run length flag bit adjacent in the code word, i.e. the 4th t in the code word with position mark 4:
(I) as the 4th t 4Be 0 o'clock, the indication code word length is a byte, reads low four t adjacent with the run length marker bit in the code word 3210Value as run length;
(II) as the 4th t 4Be 1 o'clock, the indication code word length is two bytes, reads 12 place values subsequently adjacent with the run length marker bit in the code word, i.e. t among Fig. 4 (b) 3210Position and its byte subsequently, as run length, establishing this length is n;
(4) pixel value of n the continuous image vegetarian refreshments that begins from current decoded positions is set to the pixel value of the pixel value of the position mark corresponding reference position the code word with current decoded positions.Particularly, when the position mark in the code word was 011, as shown in Figure 3, the last position pixel value of set pixel value and current decoded positions was identical; When the position mark in the code word was the position mark of other reference position outside 011, the position pixel value that set pixel value is shown below was identical:
c-(2-t 7)×w+(1-t 65)
Wherein c is current decoded positions, t 7Be the value of the 7th of code word, w is the wide of coding rectangle zone, t 65Value for the 6th of code word and the 5th.
(5) read next code word, the process of repeating step (1) to (4) is up to solving all code words.
Though in an above-mentioned specific embodiment, described and adopted method of the present invention that Code And Decode is carried out in the rectangular area of one 16 * 16 pixel, and selected reference position as shown in Figure 2, and adopted the BPP=32 position to describe the pixel value of a picture element, but the present invention is not limited in this embodiment.One of ordinary skill in the art is appreciated that, the present invention also can be used for the coding of other big or small rectangular area, for example in an embodiment of the present invention, 12 binary digits of the longest usefulness of run length are represented, its denotable maximum run is 4095, and therefore method of the present invention all can be adopted in any rectangular area that is no more than 4096 picture elements.And, for bigger rectangular area, can be by being divided into a plurality of little rectangular areas so that adopt method of the present invention.One of ordinary skill in the art also be appreciated that the present invention can adopt other for example 8/16/24 pixel value is described, these variations all should be included within the technical scheme of the present invention.
In the present invention, the palette pixel number (i.e. the number of the different pixel value that is comprised in this rectangular area) that is comprised in the rectangular area to be encoded is not limited, but the present invention is preferably applied to palette pixel number greater than 16 rectangular area.Smaller or equal to 16 situation, preferably adopt more existing encoding schemes for palette pixel number.Shown in Fig. 4 (a), when the pixel value of present encoding position picture element does not occur in its reference position, also leave some in the code word of the present invention and keep position t 43210, can be used for the interface with other existing coding method, by define these keep the position can be easily with the use that combines of technical scheme of the present invention and more existing encoding schemes, so that obtain better effect.For example, a preferred encoding scheme as follows:
(a1) if whole rectangular block is a kind of color, code word then directly is set is (11110000), be about to keep position t 43210Position 10000 is set, uses (BPP/8) byte to deposit the present picture element value subsequently, return.
(a2) if the palette pixel number of whole rectangular area is less than or equal to 16 greater than 1, high four of code word then is set is (1111), low four is palette pixel number, is about to keep the position and is set to (1+ palette pixel number).Byte is deposited the palette pixel value, is the pixel index value subsequently to use (BPP/8 * palette pixel number) subsequently, returns.Wherein, if:
Palette pixel number is 2, then represents an index with 1;
Palette pixel number is (3 ... 4), then represent an index with 2;
Palette pixel number is (5 ... 16), then represent an index with 4.
(a3) if the palette pixel number of whole rectangular area greater than 16, directly adopts the coding method that provides among the present invention to encode.
Corresponding decoding scheme is:
(b1) the Senior Three position of code fetch word;
(b2) if the value of the Senior Three position of code word is 111,
The 4th of code fetch word, if be 1,
Low four of code fetch word, if be 0,
Represent that whole rectangular area is a pixel value, pixel value is from next byte;
Otherwise
The palette pixel number of representing whole rectangular block is less than 16, and pixel value is from next byte, and number is low four place values of code word, next is the palette index of whole each pixel of rectangular block, and the index figure place is different and different with palette pixel number;
Otherwise
Decode by coding/decoding method provided by the invention;
(b3) if the value of the Senior Three position of code word is not 111, then decode by coding/decoding method provided by the invention.

Claims (10)

1, a kind of graph terminal interface coding method is used for the empty on-screen data of rectangular area on the terminal server is encoded, so that be transmitted through the network to terminal; This method comprises:
Select the reference position of present encoding position, and present encoding position and reference position unification are provided with position mark; Described reference position is positioned in coded sequence before the present encoding position;
The reference position of described present encoding position is respectively the left previous position of present encoding position, upper left two positions, just goes up two positions, upper right two positions;
When encoded in a certain present encoding position, the pixel value of at first searching for its reference position, and the pixel value of the picture element of comparison present encoding position and reference position, encode according to two kinds of situations then:
The position mark of described present encoding position and reference position thereof is represented with three continuous binary digits, is positioned at the Senior Three position of described code word;
The position mark of described present encoding position and reference position thereof is respectively: left previous position is 011, upper left first position is 110, upper left second position is 010, just going up first position is 101, just going up second position is 001, upper right first position is 100, and upper right second position is 000, and the present encoding position is 111;
When the pixel value of present encoding position picture element does not occur in its reference position, the code word of the position mark of present encoding position being enrolled present encoding position picture element; This code word is enrolled code stream, and subsequently the pixel value of present encoding position picture element is enrolled code stream;
When the pixel value of present encoding position picture element occurs in its reference position, the position mark of reference position is enrolled the code word of present encoding position picture element, and search for the run length that has the picture element of identical pixel value with present encoding position picture element backward, and the code word of this run length being enrolled present encoding position picture element; This code word is enrolled code stream;
Described rectangular area is begun to encode by preceding method in order from original position, until the coding of finishing whole rectangular area.
2, graph terminal interface coding method according to claim 1 is characterized in that, the original position of described rectangular area is the picture element in this regional upper left corner, and its coded sequence is for from left to right from top to bottom.
3, graph terminal interface coding method according to claim 1, it is characterized in that, the search of the reference position pixel value order according to label is compared successively from 0 to 6, when the pixel value of the pixel value of finding a reference position in the search procedure and present encoding position is identical, stop search.
4, graph terminal interface coding method according to claim 1, it is characterized in that, when the pixel value of present encoding position picture element occurs in its reference position, the code word of described present encoding position picture element also comprises a run length marker bit, is used for identifying run length in the occupied figure place of code word.
5, graph terminal interface coding method according to claim 4 is characterized in that, when the pixel value of present encoding position picture element occurred in its reference position, described position mark, run length flag bit and run length order next-door neighbour in code word arranged.
6, graph terminal interface coding method according to claim 1, it is characterized in that, when the pixel value of present encoding position picture element occurs in its reference position, the code word of described present encoding position picture element is made up of one or two byte, wherein first byte Senior Three position of code word is the position mark of reference position, follow by the run length marker bit, according to the different conditions of run length marker bit, adopting low four and a byte subsequently of low four or this first byte of first byte is run length.
7, graph terminal interface coding method according to claim 1, it is characterized in that when the pixel value of present encoding position picture element did not occur in its reference position, code word was made up of a byte, wherein the Senior Three position of this byte is the position mark of present encoding position, and other position is for keeping the position.
8, according to claim 1 or 7 described graph terminal interface coding methods, it is characterized in that the palette pixel of described rectangular area is greater than 16.
9, a kind of graph terminal interface coding/decoding method that data after encoding with the described coding method of claim 1 are decoded, this method comprises:
Read the code word of current decoded positions in the code stream, described current decoded positions is corresponding with the present encoding position in the coding method;
Read the position mark in this code word, decode according to two kinds of situations then:
If this position mark that reads is the position mark of present encoding position in the coding method, then closely the pixel value of the pixel value of code word as current decoded positions picture element will be followed in the code stream;
If this position mark that reads is the position mark of a reference position in the coding method, then read the run length n in this code word, the pixel value of n the continuous image vegetarian refreshments that begins from current decoded positions is set to the pixel value of this position mark corresponding reference position; Described run length n is 1-4095;
Read the code word in the code stream in order, until the decoding of finishing whole data.
10, graph terminal interface coding/decoding method according to claim 9 is characterized in that, during run length in reading described code word, be according to the state of the run length position mark in the code word, and the position of reading different length in the code stream is as run length.
CN 200610112819 2006-09-04 2006-09-04 A kind of Code And Decode method of graph terminal interface Expired - Fee Related CN100558166C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200610112819 CN100558166C (en) 2006-09-04 2006-09-04 A kind of Code And Decode method of graph terminal interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200610112819 CN100558166C (en) 2006-09-04 2006-09-04 A kind of Code And Decode method of graph terminal interface

Publications (2)

Publication Number Publication Date
CN1925612A CN1925612A (en) 2007-03-07
CN100558166C true CN100558166C (en) 2009-11-04

Family

ID=37818033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200610112819 Expired - Fee Related CN100558166C (en) 2006-09-04 2006-09-04 A kind of Code And Decode method of graph terminal interface

Country Status (1)

Country Link
CN (1) CN100558166C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102299718A (en) * 2010-06-25 2011-12-28 汉王科技股份有限公司 Compression and decompression methods for locus at hand-written terminal

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101261740B (en) * 2008-03-27 2012-01-04 于培宁 Processing method of an image storage
JP6328262B2 (en) * 2014-03-14 2018-05-23 寰發股▲ふん▼有限公司HFI Innovation Inc. Color index coding method by palette stuffing
US9877029B2 (en) * 2014-10-07 2018-01-23 Qualcomm Incorporated Palette index binarization for palette-based video coding

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1556652A (en) * 2003-12-30 2004-12-22 中国科学院计算技术研究所 Video freguencying frame image fast coding method based on optimal prediction mode probability
CN1581978A (en) * 2004-05-17 2005-02-16 中国科学院计算技术研究所 Tree block structure and multi-frame-reference motion estimating method and apparatus
CN1235411C (en) * 2003-10-17 2006-01-04 中国科学院计算技术研究所 Flow-line-based frame predictive mode coding acceleration method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1235411C (en) * 2003-10-17 2006-01-04 中国科学院计算技术研究所 Flow-line-based frame predictive mode coding acceleration method
CN1556652A (en) * 2003-12-30 2004-12-22 中国科学院计算技术研究所 Video freguencying frame image fast coding method based on optimal prediction mode probability
CN1581978A (en) * 2004-05-17 2005-02-16 中国科学院计算技术研究所 Tree block structure and multi-frame-reference motion estimating method and apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102299718A (en) * 2010-06-25 2011-12-28 汉王科技股份有限公司 Compression and decompression methods for locus at hand-written terminal

Also Published As

Publication number Publication date
CN1925612A (en) 2007-03-07

Similar Documents

Publication Publication Date Title
US6542631B1 (en) Encoding method of a color image and its encoding device and a decoding method of the color image and its decoding device
Rossignac 3d compression made simple: Edgebreaker with zipandwrap on a corner-table
CN101087423B (en) Methods and systems for estimating pixle intra-predication for encoding or decoding digital video
CN103297767B (en) A kind of jpeg image coding/decoding method and decoder being applicable to multinuclear embedded platform
CN100558166C (en) A kind of Code And Decode method of graph terminal interface
CN100493202C (en) Variable length decoding device
CN107094021A (en) Data compression
US6396490B1 (en) Efficient representation of connectivity information in progressive mesh update record
CN101272442A (en) Digital image nondestructive compression method and device, resolution method and image encoder
CN103379333A (en) Encoding and decoding method, encoding and decoding of video sequence code streams and device corresponding to methods
CN109819254B (en) Lossy image compression transmission method and system
CN103166740A (en) Coding method of flow indicator diagram and beacon frames
CN100385958C (en) Cyclic resynchronization marker for error tolerate video coding
CN100518171C (en) General coding decoding method for high layer application of abstract syntax representation
CN1941910B (en) Method and apparatus for encoding coordinate built in symbol and decoding bit data flow
CN101282406B (en) Image processing apparatus
EP0849951B1 (en) Method for encoding digital information
EP1130926A2 (en) Variable length decoding system and method
CN103428502B (en) Decoding method and decoding system
JPH03188768A (en) Picture compression system
CN101106385B (en) A Viterbi decoding device and method
CN1238644A (en) Video code and decode method in error resilient mode and apparatus therefor
CN107005693A (en) The system and method for the depth image coding of depth of smoothness image-region
CN108280502A (en) A kind of QR codes capacity boost method and terminal
CN101489136B (en) Methods and systems for image intra-prediction mode estimation, communication, and organization

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
ASS Succession or assignment of patent right

Owner name: DONGGUAN LIANZHOU ELECTRONIC TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: INSTITUTE OF COMPUTING TECHNOLOGY, CHINESE ACADEMY OF SCIENCES

Effective date: 20130116

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100080 HAIDIAN, BEIJING TO: 523000 DONGGUAN, GUANGDONG PROVINCE

TR01 Transfer of patent right

Effective date of registration: 20130116

Address after: 523000 Yuquan Industrial Zone, Fenggang Town, Guangdong, Dongguan

Patentee after: Dongguan Lianzhou Electronic Technology Co., Ltd.

Address before: 100080 Haidian District, Zhongguancun Academy of Sciences, South Road, No. 6, No.

Patentee before: Institute of Computing Technology, Chinese Academy of Sciences

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091104

Termination date: 20150904

EXPY Termination of patent right or utility model