CN1412720A - Data compression method and image data compression equipment - Google Patents

Data compression method and image data compression equipment Download PDF

Info

Publication number
CN1412720A
CN1412720A CN 02147065 CN02147065A CN1412720A CN 1412720 A CN1412720 A CN 1412720A CN 02147065 CN02147065 CN 02147065 CN 02147065 A CN02147065 A CN 02147065A CN 1412720 A CN1412720 A CN 1412720A
Authority
CN
China
Prior art keywords
data
difference
code
reduction
character
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 02147065
Other languages
Chinese (zh)
Other versions
CN1182488C (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.)
Via Technologies Inc
Original Assignee
Via Technologies Inc
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 Via Technologies Inc filed Critical Via Technologies Inc
Priority to CNB021470650A priority Critical patent/CN1182488C/en
Publication of CN1412720A publication Critical patent/CN1412720A/en
Application granted granted Critical
Publication of CN1182488C publication Critical patent/CN1182488C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Abstract

The present invention relates to a data compression method and an image data compression equipment. Said equipment contains a first data buffer, a first coder and a second coder, and said method includes the following steps: storing a first data byte and a second data byte sent by said image pick-up device; making said two data byte undergo the process of comparison operation to obtain a difference value represented by m bit and outputting it; and coding said difference value to obtain a data code for reduction and outputting it into said framke buffer and storing it. Said invention also provides a method for utilziing said difference value to convert it into data code for move reduction.

Description

Data compression method and image data compression set
Technical field
The present invention relates to a kind of data compression method and image data compression set, finger is applied to data compression method and the image data compression set in the computer system especially.
Background technology
See also Fig. 1, it is a personal computer architecture synoptic diagram commonly used at present, its core partly mainly is made of with South Bridge chip 12 microprocessor 10, north bridge chips 11, and Installed System Memory 13 utilizes a rambus to be connected to north bridge chips 11, quickens port (AGP) bus as for 14 of video cards by a perimeter component connecting interface bus (PCI) or drawing and is connected with north bridge chips 11.Wherein video card 14 consists predominantly of a drawing chip 141 and a region memory (local memory) 142.
The region memory 142 that video card 14 is comprised uses as frame buffer (frame buffer) usually, when the image data output unit, for example the simulating signal that produced of TV frequency variator 15 (TV tuner) is sent into video card 14, sending into drawing chip 141 after the analog to digital converter 143 on it converts a digital image data to handles, and drawing chip 141 just writes this digital image data in the frame buffer that is defined in the region memory 142, so that these image datas can be read and play.Or, system also can with digital image data with an internal memory direct access move (DMA) write direct and deposit in the Installed System Memory 13, change into archives and deposit in order to further will be stored in the Installed System Memory 13 digital image data to a non-volatile memory unit (for example hard disk among the figure 16).
But because the image data amount is all very huge usually, therefore carrying out above-mentioned image capture action or image playback action, need take the frequency range of a large amount of memory headrooms and access frequency range thereof, perimeter component connecting interface bus or the acceleration port bus of drawing, or even the storage area of non-volatile memory unit.So, cross the decline that the big data quantity transmission will cause the personal computer overall efficiency.
See also Fig. 2, be one to have contract personal computer system's block diagram of function of data compression/decompression, this computer system consists predominantly of microprocessor 20, north bridge chips 21, South Bridge chip 22, Installed System Memory 23, image capture unit 243 and image player 244. and when an image capture unit 243 (such as the TV signal decoder (TV decoder) that the anolog TV signals such as NTSC or PAL is converted to a data signal (for example YUV422)) acquisition one digital image data and when sending into the drawing chip 241 that is arranged on the video card 24 and processing; Be located at the digital image data that the data compression device in the drawing chip 241 2411 is exported this image capture unit 243 in the native system (for example YUV422) and compress and obtain compressing image data and be stored in the one frame buffer, and this frame buffer is defined in the region memory 242 that is arranged on the video card 24. When needs were play immediately, data decompression compression apparatus 2412 just decompressed stored these compressing image data of this frame buffer and returns back to this digital image data, transferred to this image player 244 again and played back on a display 27.
In addition, when system's desire will be stored in compressing image data storing in the frame buffer when becoming image archives, just can utilize internal memory direct access action that these compressing image data are write direct in this Installed System Memory 23, and then unloading is to hard disk 26.Therefore, when system desires to carry out the playback action of these image archives, just from hard disk 26 with this image archives unloading to Installed System Memory 23, utilize this internal memory direct access action that these compressing image data are moved in this frame buffer subsequently, and data decompression compression apparatus 2412 just can decompress these compressing image data and return back to this digital image data, and then further offers image player 244 and play back in display 27.
But, static image compress technique commonly used and being not suitable for is applied in the system architecture that above-mentioned needs reach Real Time Compression and decompression, dynamic image compress technique commonly used then can increase the complexity of circuit, and how to develop the compression/de-compression technology that a suitable said system structure, be fundamental purpose of the present invention.
Summary of the invention
The objective of the invention is for a kind of data compression method is provided, this method does not need extra complicated circuit just can finish compression and the action that decompresses apace, is fit to very much be applied in the system architecture of Real Time Compression and decompression.
Another object of the present invention is for a kind of image data compression set is provided, and this device does not need extra complicated circuit just can finish compression and the action that decompresses apace, is fit to very much be applied in the system architecture of Real Time Compression and decompression.
Purpose of the present invention can realize by following measure:
A kind of data compression method, on one first data byte and one second data byte that is applied to successively receive, this method comprises the following step:
This second data byte and this first data byte compared computing and obtain a difference of representing with m bit;
When the absolute value of this difference during, utilize a variable length code method this difference is encoded and to convert to the reduction of representing less than m bit numeric data code less than one first threshold value;
When the absolute value of this difference more than or equal to this first threshold value during smaller or equal to one second threshold value, utilize a fixed-length code (FLC) method that this difference is encoded and convert the reduction of representing with m bit numeric data code to; And
When the absolute value of this difference during, directly this second data byte is compressed into the reduction numeric data code greater than this second threshold value.
Described data byte is represented the brightness value or the chroma value of two adjacent pixels.
Said method also comprises following uncompressing data, and this method comprises the following step:
When receiving this reduction when using numeric data code, check that this reduction is with the Q-character in numeric data code;
When this Q-character meets a first condition, utilize a variable length code table of comparisons to reduce and be reduced into a difference with numeric data code, and with this difference and this first data byte addition and decompress(ion) is withdrawn this second data byte; And
When this Q-character met a second condition, this reduction of part that directly will remove this Q-character was with numeric data code decompress(ion) this second data byte of withdrawing.
This first condition is 1 for this Q-character.
This second condition is 0 for this Q-character.
Be divided by two and insert this Q-character that meets this second condition with this difference with the method for numeric data code directly in the said method with being compressed into reduction in this second data byte.
Another object of the present invention can realize by following measure:
A kind of image data compression set is arranged in the image accelerator, and this image accelerator includes an image capture unit and one frame buffer, and this data compression device comprises:
One first data buffer, signal is connected in this image capture unit, and it will be stored by one first data byte and one second data byte that this image capture unit is sent;
One first scrambler, signal are connected in this first data buffer, and it compares computing with this second data byte and this first data byte and obtains a difference of representing with m bit and exported; And
One second scrambler, signal is connected in this first scrambler and this frame buffer, it is encoded to this difference and obtains a reduction and export to numeric data code and to deposit in this frame buffer, wherein when the absolute value of this difference during less than one first threshold value, utilize a variable length code method this difference is encoded and to convert to this reduction of representing less than m bit numeric data code, and when the absolute value of this difference more than or equal to this first threshold value during smaller or equal to one second threshold value, then utilize a fixed-length code (FLC) method that this difference is encoded and convert this reduction of representing with m bit numeric data code to, and, then directly this second data byte is compressed into this reduction numeric data code when the absolute value of this difference during greater than this second threshold value.
Said apparatus also comprises an image data decompressing device, and its signal is connected to this frame buffer, and this image data decompressing device comprises:
One second data buffer, it stores this first data byte of having finished reconstruction; And
One code translator, signal is connected in this frame buffer and this second data buffer, its this reduction that this frame buffer is exported is deciphered with numeric data code and is obtained this difference, wherein when this reduction meets a first condition with the Q-character in the numeric data code, utilize a variable length code table of comparisons to reduce and be reduced into a difference with numeric data code, and with this difference and this finished the first data byte addition of reconstruction and decompress(ion) is withdrawn one second data byte and this second data buffer of Hui Cunzhi, and when this Q-character met a second condition, this reduction of part that directly will remove this Q-character was with numeric data code decompress(ion) withdraw this second data byte and this second data buffer of Hui Cunzhi.
This first condition is 1 for this Q-character, and this second condition is 0 for this Q-character, and directly be compressed in this second data byte reduction with the action of numeric data code be with this difference divided by two and insert place value " 0 ".
This first scrambler is a differentiated pulse coding modulator.
Description of drawings
Fig. 1 is a personal computer architecture synoptic diagram commonly used at present.
Fig. 2 has contract personal computer system's block diagram of function of data compression/decompression.
Fig. 3 is a preferred embodiment block diagram of data compression device of the present invention.
Fig. 4 is the variable length code table of comparisons of preferred embodiment of the present invention.
Fig. 5 is another preferred embodiment block diagram of data decompression compression apparatus of the present invention.
Fig. 6 (a) is (b): the modes of emplacement synoptic diagram of representing these compressing image data in conventional means and the preferred embodiment of the present invention respectively.
Embodiment
See also Fig. 3, have contract data compression device 2411 among the personal computer system of function of data compression/decompression and develop the preferred embodiment block diagram that for the present invention is directed to, for convenience of description, below with the brightness value Y in the known YUV422 form be example (certainly, chroma value U, the also available same way as of V is carried out), Y (i) wherein, Y (i+1) represents 8 continuous brightness values of same row in the image of being exported by image capture unit 243 at 2, it is placed in earlier in first data buffer 30, pass through the processing of first scrambler of being finished by differentiated pulse coding modulator 31, and then draw Y (i), the difference of Y (i+1), second scrambler of being finished via variable length coder 32 is again encoded subsequently, and then reaches the purpose of compression.
And relevant variable length decoding method can be with reference to the table of comparisons listed among the figure 4, and wherein D (i) represents the absolute value of Y (i), 2 differences of Y (i+1), promptly D (i)=| Y (i+1)-Y (i) |.Yet, the back is found by statistics, usually the color-values (comprising brightness value and chroma value) of neighbor pixel is neither has a too violent variation, so D (i) value that differentiated pulse coding modulator 31 is produced drops on the less part of numerical value mostly, therefore, for reaching the figure place that reduces after encoding, to become reduction numeric data code (wherein last position s represents sign) less than D (i) the value code conversion of one first threshold value (this example is 8) less than 8 positions, and during less than one second threshold value (this example is 15), then only can convert the reduction numeric data code of 8 positions more than or equal to this first threshold value (this example is 8) to when D (i) value.As for when D (i) value during, then directly 7 higher among the Y (i+1) bit data right shifts are inserted 0 (being about to Y (i+1) divided by two) to 7 lower bit data and in most significant digit, and then form the reduction numeric data code greater than this second threshold value.
In sum, because D (i) value that differentiated pulse coding modulator 31 is produced drops on the less part of numerical value mostly, so the present invention will represent with numeric data code with the reduction of less figure place less than 8 D (i) value, and then reach the purpose of data compression.Then represent with numeric data code less than 15 D (i) value more than or equal to 8 with the reduction of identical figure place.As for when producing, then directly Y (i+1) is encoded divided by 2 greater than 15 D (i) value.Can be stored into numeric data code in the frame buffer 33 that is defined in the region memory by the formed reduction of above-mentioned compression step, and just can reach data compression thus and reduce the purpose that takies a large amount of memory headrooms and access frequency range thereof.
In addition, when system's desire will be stored in compressing image data storing in the frame buffer when becoming image archives, can utilize internal memory direct access action that these compressing image data are write direct in this Installed System Memory equally, and then unloading is to hard disk.Therefore, when system desires to carry out the playback action of these image archives, just from hard disk with this image archives unloading to Installed System Memory, utilize this internal memory direct access action that these compressing image data are moved in this frame buffer subsequently, and data decompression compression apparatus 2412 just can decompress these compressing image data and return back to this digital image data, and then further offers image player and play back in display.
And when needs are play, data decompression compression apparatus 2412 as shown in Figure 5 just can decompress these frame buffer 33 stored these reduction and revert back to this digital image data with numeric data code, and then transfers to this image player again and play back on a display.Wherein this data decompression compression apparatus 2412 mainly is made of one second data buffer 50 and a code translator 51.This second data buffer 50 in order to deposit decompress the institute rebuild time Y (i) ', and code translator 51 is judged with the Q-character in the numeric data code (most significant digit that this is routine) according to the reduction of being taken out by frame buffer 33 again, when Q-character meets first condition (this example is that most significant digit is 1), just can utilize the variable length code table of comparisons shown in Figure 4 to reduce and be reduced into the difference that comprises sign, and this difference and this have been finished Y (the i) ' addition of reconstruction and decompress(ion) is withdrawn in a Y (i+1) ' and this second data buffer 50 of Hui Cunzhi with numeric data code.But when this Q-character meets a second condition (this example is that most significant digit is 0), just must return this Y (i+1) ' after can directly this reduction of part of removing this Q-character being multiply by 2 with numeric data code, though Y (i+1) ' that rebuilds this moment and original Y (i+1) might have error (this example is for being not more than 1), but Y (i) in the time of therefore, 2 differences of Y (i+1) are very big, though therefore the image of rebuilding slightly distortion also be difficult for being discovered.
But because of the image data after the compression, brightness (the Luma of its each pixel, Y), chroma (Chroma, U and V) figure place might be different, and place image data and improper with usual way (seeing shown in Fig. 6 (a)), and be convenient these image datas that when image is play, reads, the present invention has still made the modes of emplacement of image data and has changed (seeing shown in Fig. 6 (b)), with brightness (Luma, Y) data, chroma (Chroma, U and V) data are placed on different memory cache districts respectively, this kind location mode can make things convenient for the realization of pipeline in the hardware circuit (pineline) structure, because under the structure of YUV422, the sampling frequency of brightness data Y is the twice of chroma data U or V, available two groups of code translators in decompression process, one group brightness data Y deciphered, each clock pulse decodable code goes out a brightness data, and another group is deciphered chroma data U or V, and each clock pulse decodable code goes out a chroma data U or V.Thus, each code translator only needs to decipher out data in each clock pulse and can restore complete pixel data Y, U and V.And compression handle a row pixel number according to after, respectively its length data is write file Head Section (Y Header and CHeader), and the information of this file Head Section is used can be convenient to decompress in action or the internal memory direct access action (DMA) reading of data the time, with this example, available 0000-0000 to 0000-0111 comes to use as the coding of these specific file headers.
And by above-mentioned narration as can be known, this case does not need extra complicated circuit just can finish the action of compression and decompression apace, is fit to very much be applied in the system architecture of Real Time Compression and decompression, and then can reaches the fundamental purpose of development this case effectively.Yet this case is invented to such an extent that thought and be to modify right neither taking off as Protector that attached claim is desired as all by the personage Ren Shi craftsman who has the knack of this skill.

Claims (10)

1, a kind of data compression method, on one first data byte and one second data byte that is applied to successively receive, this method comprises the following step:
This second data byte and this first data byte compared computing and obtain a difference of representing with m bit;
When the absolute value of this difference during, utilize a variable length code method this difference is encoded and to convert to the reduction of representing less than m bit numeric data code less than one first threshold value;
When the absolute value of this difference more than or equal to this first threshold value during smaller or equal to one second threshold value, utilize a fixed-length code (FLC) method that this difference is encoded and convert the reduction of representing with m bit numeric data code to; And
When the absolute value of this difference during, directly this second data byte is compressed into the reduction numeric data code greater than this second threshold value.
2, data compression method as claimed in claim 1 is characterized in that described data byte represents the brightness value or the chroma value of two adjacent pixels.
3, data compression method as claimed in claim 1 is characterized in that also comprising following uncompressing data, and this method comprises the following step:
When receiving this reduction when using numeric data code, check that this reduction is with the Q-character in numeric data code;
When this Q-character meets a first condition, utilize a variable length code table of comparisons to reduce and be reduced into a difference with numeric data code, and with this difference and this first data byte addition and decompress(ion) is withdrawn this second data byte; And
When this Q-character met a second condition, this reduction of part that directly will remove this Q-character was with numeric data code decompress(ion) this second data byte of withdrawing.
4, data compression method as claimed in claim 3 is characterized in that this first condition is 1 for this Q-character.
5, data compression method as claimed in claim 3 is characterized in that this second condition is 0 for this Q-character.
6, data compression method as claimed in claim 1 is characterized in that directly with being compressed into the method for reduction with numeric data code in this second data byte be divided by two and insert this Q-character that meets this second condition with this difference.
7, a kind of image data compression set is arranged in the image accelerator, and this image accelerator includes an image capture unit and one frame buffer, and this data compression device comprises:
One first data buffer, signal is connected in this image capture unit, and it will be stored by one first data byte and one second data byte that this image capture unit is sent;
One first scrambler, signal are connected in this first data buffer, and it compares computing with this second data byte and this first data byte and obtains a difference of representing with m bit and exported; And
One second scrambler, signal is connected in this first scrambler and this frame buffer, it is encoded to this difference and obtains a reduction and export to numeric data code and to deposit in this frame buffer, wherein when the absolute value of this difference during less than one first threshold value, utilize a variable length code method this difference is encoded and to convert to this reduction of representing less than m bit numeric data code, and when the absolute value of this difference more than or equal to this first threshold value during smaller or equal to one second threshold value, then utilize a fixed-length code (FLC) method that this difference is encoded and convert this reduction of representing with m bit numeric data code to, and, then directly this second data byte is compressed into this reduction numeric data code when the absolute value of this difference during greater than this second threshold value.
8, image data compression set as claimed in claim 7 is characterized in that also comprising an image data decompressing device, and its signal is connected to this frame buffer, and this image data decompressing device comprises:
One second data buffer, it stores this first data byte of having finished reconstruction; And
One code translator, signal is connected in this frame buffer and this second data buffer, its this reduction that this frame buffer is exported is deciphered with numeric data code and is obtained this difference, wherein when this reduction meets a first condition with the Q-character in the numeric data code, utilize a variable length code table of comparisons to reduce and be reduced into a difference with numeric data code, and with this difference and this finished the first data byte addition of reconstruction and decompress(ion) is withdrawn one second data byte and this second data buffer of Hui Cunzhi, and when this Q-character met a second condition, this reduction of part that directly will remove this Q-character was with numeric data code decompress(ion) withdraw this second data byte and this second data buffer of Hui Cunzhi.
9, image data compression set as claimed in claim 8, it is characterized in that this first condition is 1 for this Q-character, and this second condition is 0 for this Q-character, and directly be compressed in this second data byte reduction with the action of numeric data code be with this difference divided by two and insert place value " 0 ".
10, image data compression set as claimed in claim 7 is characterized in that this first scrambler is a differentiated pulse coding modulator.
CNB021470650A 2002-10-28 2002-10-28 Data compression method and image data compression equipment Expired - Lifetime CN1182488C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB021470650A CN1182488C (en) 2002-10-28 2002-10-28 Data compression method and image data compression equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021470650A CN1182488C (en) 2002-10-28 2002-10-28 Data compression method and image data compression equipment

Publications (2)

Publication Number Publication Date
CN1412720A true CN1412720A (en) 2003-04-23
CN1182488C CN1182488C (en) 2004-12-29

Family

ID=4751184

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021470650A Expired - Lifetime CN1182488C (en) 2002-10-28 2002-10-28 Data compression method and image data compression equipment

Country Status (1)

Country Link
CN (1) CN1182488C (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1331088C (en) * 2004-05-28 2007-08-08 凌阳科技股份有限公司 Method for compressing print data
CN101065760B (en) * 2003-12-11 2010-06-16 富可视公司 System and method for processing image data
CN101816182B (en) * 2007-10-01 2012-11-21 夏普株式会社 Image encoding device, image encoding method, and image encoding system
CN102792689A (en) * 2010-03-02 2012-11-21 高通股份有限公司 Enabling delta compression and modification of motion estimation and metadata for rendering images to a remote display
CN117499994A (en) * 2023-12-29 2024-02-02 南京市计量监督检测院 Compression and restoration method for differential data recording and transmission of GNSS (Global navigation satellite System) locator

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100647192B1 (en) 2005-09-01 2006-11-23 삼성전자주식회사 Data coding apparatus and method for reducing decoding time of data

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101065760B (en) * 2003-12-11 2010-06-16 富可视公司 System and method for processing image data
CN1331088C (en) * 2004-05-28 2007-08-08 凌阳科技股份有限公司 Method for compressing print data
CN101816182B (en) * 2007-10-01 2012-11-21 夏普株式会社 Image encoding device, image encoding method, and image encoding system
CN102792689A (en) * 2010-03-02 2012-11-21 高通股份有限公司 Enabling delta compression and modification of motion estimation and metadata for rendering images to a remote display
CN102792689B (en) * 2010-03-02 2015-11-25 高通股份有限公司 Delta compression can be carried out and for by image, remote display is presented to the amendment of estimation and metadata
CN117499994A (en) * 2023-12-29 2024-02-02 南京市计量监督检测院 Compression and restoration method for differential data recording and transmission of GNSS (Global navigation satellite System) locator
CN117499994B (en) * 2023-12-29 2024-03-19 南京市计量监督检测院 Compression and restoration method for differential data recording and transmission of GNSS (Global navigation satellite System) locator

Also Published As

Publication number Publication date
CN1182488C (en) 2004-12-29

Similar Documents

Publication Publication Date Title
Beers et al. Rendering from compressed textures
JP4475820B2 (en) System and method for compressing and decompressing extensible embedded parallel data
US8212828B2 (en) Hybrid multiple bit-depth video processing architecture
US5930390A (en) Encoding/decoding signals using a remap table
EP0622741A3 (en) Device and method for data compression/decompression
CN105933708B (en) A kind of method and apparatus of data compression and decompression
WO1995019683A1 (en) Boundary-spline-wavelet compression for video images
CN1195806A (en) Image processing device and its processing method
CN1125028A (en) Adaptive video decompression
CN1182488C (en) Data compression method and image data compression equipment
US5309528A (en) Image digitizer including pixel engine
CN1127219C (en) Method for compressing and decompressing data files
CN111031388B (en) YUV4:4:4 data coding and decoding method
US6519286B1 (en) Method and apparatus for decoding a stream of data
CN108881923B (en) Method for reducing buffer capacity of JPEG coding and decoding line
CN2583731Y (en) Image data compression device
JP2002112268A (en) Compressed image data decoding apparatus
US6147629A (en) Method and apparatus for variable length decoding
CN1902659A (en) Method and apparatus for image processing in a handheld device
GB2333201A (en) Video decoder for high picture quality
JP2004501531A (en) Method and apparatus for run-length encoding video data
US7340101B2 (en) Device and method for compressing and decompressing data for graphics display
JPH08130652A (en) Compression and expansion system for two-dimension image data
US6327305B1 (en) Method and apparatus for encoding a stream of data blocks
US6614934B1 (en) Method and apparatus for concatenating bits of odd-length words

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
CX01 Expiry of patent term
CX01 Expiry of patent term

Granted publication date: 20041229