CN102984517B - The method of video data compression and decompression, device, equipment and system - Google Patents
The method of video data compression and decompression, device, equipment and system Download PDFInfo
- Publication number
- CN102984517B CN102984517B CN201210476583.6A CN201210476583A CN102984517B CN 102984517 B CN102984517 B CN 102984517B CN 201210476583 A CN201210476583 A CN 201210476583A CN 102984517 B CN102984517 B CN 102984517B
- Authority
- CN
- China
- Prior art keywords
- pixel
- gray value
- vegetarian refreshments
- image vegetarian
- last
- 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.)
- Active
Links
- 230000006837 decompression Effects 0.000 title claims abstract description 103
- 238000000034 method Methods 0.000 title claims abstract description 83
- 238000013144 data compression Methods 0.000 title claims abstract description 42
- 238000007906 compression Methods 0.000 claims abstract description 114
- 230000006835 compression Effects 0.000 claims abstract description 112
- 230000009467 reduction Effects 0.000 abstract description 23
- 238000005516 engineering process Methods 0.000 abstract description 5
- 230000006870 function Effects 0.000 description 34
- 238000010586 diagram Methods 0.000 description 29
- 230000008569 process Effects 0.000 description 29
- 239000000203 mixture Substances 0.000 description 10
- 230000003247 decreasing effect Effects 0.000 description 6
- 230000007423 decrease Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 5
- 230000000052 comparative effect Effects 0.000 description 3
- 101100517651 Caenorhabditis elegans num-1 gene Proteins 0.000 description 2
- 235000007926 Craterellus fallax Nutrition 0.000 description 2
- 240000007175 Datura inoxia Species 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses a kind of method of video data compression and decompression, device, equipment and system, belong to field of computer technology.Described method comprises: in video compression, the second gray value of first pixel and second gray value of last pixel of this coding is added in packed data, simultaneously when decompression, utilize the second gray value of first pixel in packed data and the second gray value reduction original video data of last pixel, while effectively reducing memory space and occupied bandwidth by the flexible balance of compression algorithm and linear interpolation, ensure that the image after decompression can obtain better picture quality.
Description
Technical field
The present invention relates to field of computer technology, a kind of method of particularly video data compression and decompression, device, equipment and system.
Background technology
Along with the development of multimedia technology and network technology, carry out a large amount of transfer of data by network and become more and more convenient.But the information age brings " information explosion ", makes data volume increase, therefore, transmit or store and all need effectively to compress data.In actual applications, usual use Image Compression is compressed original video data, less space is taken to obtaining in the data transmission in less transmission bandwidth or storing process, packed data, before being sent to display, is converted to original video data by decompression technique by packed data.
Data compression algorithm conventional in this area is variable-run-length code algorithm, namely the pixel with identical high-order gray value occurred continuously in original video data is represented by the mode of high-order gray value and continuous length value, decompression is then the inverse process of packed data, and the pixel data that high-order gray value and continuous print length value represent is changed into video data.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem:
Variable-run-length code algorithm in compression process owing to only have employed the high-order gray value of pixel, have ignored low level numerical value, although add the efficiency of coding, but the image detail information that lost in original video, image after so decompressing can not recover the details in original image well, reduces the quality of image.
Summary of the invention
In order to solve the problem of the loss image detail information that video compression is brought, embodiments provide a kind of method of video data compression and decompression, device, equipment and system.Described technical scheme is as follows:
On the one hand, provide a kind of method of video data compression, described method comprises:
Obtain the gray value of pixel in the image of video data;
According to the gray value of pixel in described image, the multiple continuous image vegetarian refreshments identical to the first gray value in described image are encoded, obtain packed data, described packed data carries the first gray value in the gray value of described multiple continuous image vegetarian refreshments, this packed pixel selects the second gray value of first pixel and the second gray value of last pixel in number and described multiple continuous image vegetarian refreshments;
When each two field picture of described video data is all through overcompression, terminate video data compression.
According to the gray value of pixel in described image, the multiple continuous image vegetarian refreshments identical to the first gray value in described image are encoded, and obtain packed data, specifically comprise:
According to the gray value of each pixel in described image, determine multiple continuous image vegetarian refreshments that in described image, the first gray value is identical, and the number of described multiple continuous image vegetarian refreshments is within the scope of expansion bit requirements;
Described multiple continuous image vegetarian refreshments is encoded to packed data.
Second gray value of described first pixel is become by the specific bit array in described first pixel, and the second gray value of last pixel described is become by the specific bit array in last pixel described.
Described packed data also carries the second gray value of the multiple intermediary image vegetarian refreshments in described multiple continuous image vegetarian refreshments.
Second gray value of described multiple intermediary image vegetarian refreshments is become by the specific bit array in the gray value of described intermediary image vegetarian refreshments.
On the one hand, provide a kind of method of video data decompressor, described method comprises:
Obtain the packed data of video data, described packed data carries the first gray value, packed pixel selects number and the second gray value of first pixel in multiple continuous image vegetarian refreshments of compression and the second gray value of last pixel;
Obtain the gray value of first pixel and last pixel in described packed data;
According to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtain the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression;
When each packed data of described video data is all in time decompressing, terminate video data decompressor.
The gray value of first pixel and last pixel in the described packed data of described acquisition, specifically comprises:
According to the second gray value of described first gray value and described first pixel, calculate the gray value of described first pixel;
According to the second gray value of described first gray value and last pixel described, calculate the gray value of last pixel.
Described according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtain the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression, comprising:
Calculate the difference of the second gray value of described first pixel and the second gray value of last pixel described, by described difference divided by described packed pixel point number, obtain the increment of linear interpolation;
Other pixels in decompressing according to this and the distance of described first pixel, and the increment of described linear interpolation, calculate the gray value of other pixels in this decompression described successively.
Described packed data also comprises: the second gray value of multiple intermediary image vegetarian refreshments.
Described according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtain the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression, comprising:
Calculate the difference of the second gray value of described first pixel and the second gray value of first intermediary image vegetarian refreshments, by the packed pixel point number that described difference comprises divided by described first pixel and first intermediary image vegetarian refreshments, obtain the increment of the first linear interpolation;
Described first pixel in decompressing according to this and pixel and the distance of described first pixel between intermediary image vegetarian refreshments and the increment of described first linear interpolation, calculate the gray value of the pixel described in this decompression described between first pixel and described intermediary image vegetarian refreshments successively;
Calculate the difference of the second gray value of two adjacent intermediary image vegetarian refreshments, by the packed pixel point number of described difference divided by described two adjacent intermediary image vegetarian refreshments, obtain the increment of center linear interpolation;
According to the distance of position at pixel above and the increment of described center linear interpolation in the pixel between two the described adjacent intermediary image vegetarian refreshments in this decompression and adjacent two intermediary image vegetarian refreshments, calculate the gray value of the pixel between described two adjacent intermediary image vegetarian refreshments successively;
Calculate the difference of the second gray value of last intermediary image vegetarian refreshments and the second gray value of last pixel, by described difference divided by described packed pixel point number, obtain the increment of the second linear interpolation;
Pixel between last intermediary image vegetarian refreshments and second pixel described in decompressing according to this and the distance of last intermediary image vegetarian refreshments described and the increment of described second linear interpolation, calculate the gray value of the pixel described in this decompression described between last intermediary image vegetarian refreshments and described second pixel successively.
On the one hand, provide a kind of device of video data compression, described device comprises:
Acquisition module, for obtain video data image in the gray value of pixel;
Coding module, for the gray value according to pixel in described image, the multiple continuous image vegetarian refreshments identical to the first gray value in described image are encoded, obtain packed data, described packed data carries the first gray value in the gray value of described multiple continuous image vegetarian refreshments, this packed pixel selects the second gray value of first pixel and the second gray value of last pixel in number and described multiple continuous image vegetarian refreshments;
Described coding module, also for when each two field picture of described video data is all through overcompression, terminates video data compression.
Described coding module, specifically for the gray value according to each pixel in described image, determines multiple continuous image vegetarian refreshments that in described image, the first gray value is identical, and the number of described multiple continuous image vegetarian refreshments is within the scope of extended length bit requirements; Described multiple continuous image vegetarian refreshments is encoded to packed data.
Second gray value of described first pixel is become by the specific bit array in described first pixel, and the second gray value of last pixel described is become by the specific bit array in last pixel described.
Described packed data also carries the second gray value of the multiple intermediary image vegetarian refreshments in described multiple continuous image vegetarian refreshments.
Second gray value of described multiple intermediary image vegetarian refreshments is become by the specific bit array in the gray value of described intermediary image vegetarian refreshments.
On the one hand, provide a kind of equipment of video data compression, described equipment comprises: processor;
Described processor for obtain video data image in the gray value of pixel;
Described processor is also for the gray value according to pixel in described image, the multiple continuous image vegetarian refreshments identical to the first gray value in described image are encoded, obtain packed data, described packed data carries the first gray value in the gray value of described multiple continuous image vegetarian refreshments, this packed pixel selects the second gray value of first pixel and the second gray value of last pixel in number and described multiple continuous image vegetarian refreshments;
Described processor, also for when each two field picture of described video data is all through overcompression, terminates video data compression.
Described processor, specifically for the gray value according to each pixel in described image, determines multiple continuous image vegetarian refreshments that in described image, the first gray value is identical, and the number of described multiple continuous image vegetarian refreshments is within the scope of extended length bit requirements;
Described processor is also for being encoded to packed data by described multiple continuous image vegetarian refreshments.
Second gray value of described first pixel is become by the specific bit array in described first pixel, and the second gray value of last pixel described is become by the specific bit array in last pixel described.
Described packed data also carries the second gray value of the multiple intermediary image vegetarian refreshments in described multiple continuous image vegetarian refreshments.
Second gray value of described multiple intermediary image vegetarian refreshments is become by the specific bit array in the gray value of described intermediary image vegetarian refreshments.
On the one hand, provide a kind of device of video data decompressor, described device comprises:
Acquisition module, for obtaining the packed data of video data, described packed data carries the first gray value, packed pixel selects number and the second gray value of first pixel in multiple continuous image vegetarian refreshments of compression and the second gray value of last pixel;
Described decompression module is also for obtaining the gray value of first pixel and last pixel in described packed data;
Described decompression module also for according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtains the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression;
Judge module, for when each packed data of described video data is all in time decompressing, terminates video data decompressor.
Described decompression module, specifically for the second gray value according to described first gray value and described first pixel, calculates the gray value of described first pixel;
Described decompression module also for the second gray value according to described first gray value and last pixel described, calculates the gray value of last pixel.
Described decompression module, specifically for the difference of the second gray value of the second gray value and last pixel described that calculate described first pixel, by described difference divided by described packed pixel point number, obtains the increment of linear interpolation;
Described decompression module is also for the distance according to other pixels in this decompression and described first pixel, and the increment of described linear interpolation, calculates the gray value of other pixels in this decompression described successively.
Described packed data also comprises: the second gray value of multiple intermediary image vegetarian refreshments.
Described decompression module is specifically for the difference of the second gray value of the second gray value and first intermediary image vegetarian refreshments that calculate described first pixel, by the packed pixel point number that described difference comprises divided by described first pixel and first intermediary image vegetarian refreshments, obtain the increment of the first linear interpolation;
Described decompression module also for pixel and the distance of described first pixel between described first pixel in decompressing according to this and intermediary image vegetarian refreshments and the increment of described first linear interpolation, calculates the gray value of the pixel described in this decompression described between first pixel and described intermediary image vegetarian refreshments successively;
Described decompression module, also for calculating the difference of the second gray value of two adjacent intermediary image vegetarian refreshments, by the packed pixel point number of described difference divided by described two adjacent intermediary image vegetarian refreshments, obtains the increment of center linear interpolation;
Described decompression module also for according to the distance of position at pixel above and the increment of described center linear interpolation in the pixel between two the described adjacent intermediary image vegetarian refreshments in this decompression and adjacent two intermediary image vegetarian refreshments, calculates the gray value of the pixel between described two adjacent intermediary image vegetarian refreshments successively;
Described decompression module also for the difference of the second gray value of the second gray value He last pixel that calculate last intermediary image vegetarian refreshments, by described difference divided by described packed pixel point number, obtains the increment of the second linear interpolation;
Described decompression module also for pixel between last intermediary image vegetarian refreshments and second pixel and the distance of last intermediary image vegetarian refreshments described and the increment of described second linear interpolation described in decompressing according to this, calculates the gray value of the pixel described in this decompression described between last intermediary image vegetarian refreshments and described second pixel successively.
On the one hand, provide a kind of equipment of video data decompressor, described equipment comprises: processor;
Described processor is for obtaining the packed data of video data, and described packed data carries the first gray value, packed pixel selects number and the second gray value of first pixel in multiple continuous image vegetarian refreshments of compression and the second gray value of last pixel;
Described processor is also for obtaining the gray value of first pixel and last pixel in described packed data;
Described processor also for according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtains the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression;
Described processor also for when each packed data of described video data is all in time decompressing, terminates video data decompressor.
Described processor also for the second gray value according to described first gray value and described first pixel, calculates the gray value of described first pixel;
Described processor also for the second gray value according to described first gray value and last pixel described, calculates the gray value of last pixel.
Described processor, specifically for the difference of the second gray value of the second gray value and last pixel described that calculate described first pixel, by described difference divided by described packed pixel point number, obtains the increment of linear interpolation;
Described processor is also for the distance according to other pixels in this decompression and described first pixel, and the increment of described linear interpolation, calculates the gray value of other pixels in this decompression described successively.
Described packed data also comprises: the second gray value of multiple intermediary image vegetarian refreshments.
Described processor is specifically for the difference of the second gray value of the second gray value and first intermediary image vegetarian refreshments that calculate described first pixel, by the packed pixel point number that described difference comprises divided by described first pixel and first intermediary image vegetarian refreshments, obtain the increment of the first linear interpolation;
Described processor also for pixel and the distance of described first pixel between described first pixel in decompressing according to this and intermediary image vegetarian refreshments and the increment of described first linear interpolation, calculates the gray value of the pixel described in this decompression described between first pixel and described intermediary image vegetarian refreshments successively;
Described processor, also for calculating the difference of the second gray value of two adjacent intermediary image vegetarian refreshments, by the packed pixel point number of described difference divided by described two adjacent intermediary image vegetarian refreshments, obtains the increment of center linear interpolation;
Described processor also for according to the distance of position at pixel above and the increment of described center linear interpolation in the pixel between two the described adjacent intermediary image vegetarian refreshments in this decompression and adjacent two intermediary image vegetarian refreshments, calculates the gray value of the pixel between described two adjacent intermediary image vegetarian refreshments successively;
Described processor also for the difference of the second gray value of the second gray value He last pixel that calculate last intermediary image vegetarian refreshments, by described difference divided by described packed pixel point number, obtains the increment of the second linear interpolation;
Described processor also for pixel between last intermediary image vegetarian refreshments and second pixel and the distance of last intermediary image vegetarian refreshments described and the increment of described second linear interpolation described in decompressing according to this, calculates the gray value of the pixel described in this decompression described between last intermediary image vegetarian refreshments and described second pixel successively.
On the other hand, provide the system of a kind of video data compression and decompression, described system comprises: the equipment of video data compression as above and the equipment of video data decompressor as above.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
The technical scheme that the embodiment of the present invention adopts, add the second gray value of first pixel and the second gray value of last pixel in the compressed data, to obtain more image detail information, make can reduce preferably when decompressing original video data, while effectively reducing memory space and occupied bandwidth, ensure that the image after decompress(ion) can obtain better picture quality.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of the method for a kind of video data compression provided in the embodiment of the present invention;
Fig. 2 a is the schematic diagram of a kind of packed data form provided in the embodiment of the present invention;
Fig. 2 b is the method flow diagram of a kind of video data compression provided in the embodiment of the present invention;
Fig. 2 c is the flow chart of a kind of video data compression method provided in the embodiment of the present invention;
Fig. 3 a is the schematic diagram of a kind of packed data form provided in the embodiment of the present invention;
Fig. 3 b is the method flow diagram of a kind of video data compression provided in the embodiment of the present invention;
Fig. 3 c is the method flow diagram of a kind of video data compression provided in the embodiment of the present invention;
Fig. 4 a is the schematic diagram of a kind of packed data form provided in the embodiment of the present invention;
Fig. 4 b is the method flow diagram of a kind of video data compression provided in the embodiment of the present invention;
Fig. 4 c is the flow chart of a kind of video data compression method provided in the embodiment of the present invention;
Fig. 5 is the method flow diagram of a kind of video data decompressor provided in the embodiment of the present invention;
Fig. 6 is the method flow diagram of a kind of video data decompressor provided in the embodiment of the present invention;
Fig. 7 is the method flow diagram of a kind of video data decompressor provided in the embodiment of the present invention;
Fig. 8 is the apparatus structure schematic diagram of a kind of video data compression provided in the embodiment of the present invention;
Fig. 9 is the device structure schematic diagram of a kind of video data compression provided in the embodiment of the present invention;
Figure 10 is the apparatus structure schematic diagram of a kind of video data decompressor provided in the embodiment of the present invention;
Figure 11 is the device structure schematic diagram of a kind of video data decompressor provided in the embodiment of the present invention;
Figure 12 is the system configuration schematic diagram of a kind of video data compression and the decompression provided in the embodiment of the present invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Fig. 1 is the method flow diagram of a kind of video compression provided in the embodiment of the present invention, and see Fig. 1, described method comprises:
101: the gray value obtaining pixel in the image of video data;
Wherein, described video data comprises multiple image data, and the gray value of the pixel comprised in every frame image data is made up of the gray value of RGB tri-passages, and the gray value related in embodiments of the present invention is all the gray value containing RGB tri-passages.
102: according to the gray value of pixel in described image, the multiple continuous image vegetarian refreshments identical to the first gray value in described image are encoded, obtain packed data, described packed data carries the first gray value in the gray value of described multiple continuous image vegetarian refreshments, this packed pixel selects the second gray value of first pixel and the second gray value of last pixel in number and described multiple continuous image vegetarian refreshments;
Wherein, described first gray value is made up of an appointment high position for the gray value of pixel, and continuous image vegetarian refreshments refers to the pixel on locus with neighbouring relations, and the pixel in image sorts by row.
In embodiments of the present invention, the compression of every two field picture can be divided into and repeatedly carry out, multiple continuous image vegetarian refreshments in every two field picture with identical first gray value are encoded, multiple continuous image vegetarian refreshments that many groups have identical first gray value as having in image, then this many groups continuous image vegetarian refreshments is encoded, and for not having the pixel of identical first gray value in image, can respectively it be encoded, therefore every two field picture needs repeatedly to encode and could compress.
103: when each two field picture of described video data is all through overcompression, terminate video data compression.
Each two field picture in video data to be compressed is all performed to the compression in step 102, to obtain the video data after compressing, the video data after this compression can comprise multiple packed data.
The video-frequency compression method provided in the embodiment of the present invention, add the second gray value of first pixel and the second gray value of last pixel in the compressed data, to obtain more image detail information, make can reduce preferably when decompressing original video data, while effective reduction memory space and occupied bandwidth, ensure that the image after decompress(ion) can obtain better picture quality.
Fig. 2 a is the schematic diagram of a kind of packed data form provided in the embodiment of the present invention.With reference to Fig. 2 a, described packed data comprises: the second gray value s of first pixel of the first gray value LEVEL, expansion instruction, extension bits, packed pixel point number, this second compression and the second gray value e of last pixel.
Wherein, first row LEVEL represents the first gray value, it is the combined value of RGB tri-passages of 8, second is classified as reduction length expansion instruction, if the numerical value in these row, between 1-15, illustrates not do and expands, the pixel number be compressed together is within the scope of 0-15, if the numerical value in these row is 0000, then represent extension bits with 00,01,10,11 below, illustrate that the pixel number be compressed together can expand to 8,10,18,22, the pixel number of compression will within the scope of extension bits.8 s represent the second gray value of first pixel of this second compression, 8 e represent the second gray value of last pixel of this second compression, the figure place of the second gray value s and e is optional, but to ensure according to the pixel of compression in reality number reasonably regulate and can ensure higher compression ratio and obtain higher picture quality after decompressing.
Fig. 2 b is the method flow diagram of a kind of video data compression provided in the embodiment of the present invention, video data in the present embodiment comprises multiframe RGB(RedGreenBlue, RGB) coloured image, the gray value figure place m of RGB tri-passages of image represents, then tonal range is 0-2^m, and the compression process of video data is described with the boil down to of the two field picture in this video data example.See Fig. 2 b, described method comprises:
201: according to current frame image, obtain the pixel number of this two field picture;
This step 201 carries out initialized process to image, initialized data comprise total number of pixel in image, in actual initialization operation process, these initialized data also comprise counter arm function, and counter arm function is used in reference to the pixel to compressing.
Concrete program operation process is understood better for making those skilled in the art, carry out concrete citing to described method to describe, see Fig. 2 c, total number of pixel represents with parameter P_C, P_C carries out initialization according to the size of real image, if the size of image is 1024*1024, then P_C=1048576; Counter arm function Count points to the pixel that will compress, it is 1 that initial value is composed, that is to say Count=1, often compress a pixel, the value of Count adds 1, and for judging whether the pixel in described two field picture has compressed, Cnt is the pixel number of each coding, its initial value is 1, i.e. Cnt=1.
202: obtain the first gray value of this coding and the second gray value of first pixel;
According to the gray value of first pixel of this coding, obtain the second gray value of described first gray value, described first pixel, the second gray value of described first gray value and first pixel is put into this packed data.
Wherein, this time the first gray value of coding is the first gray value of described this time first pixel of coding, first gray value has fixing figure place (as 8), this first gray value is made up of the high-order numerical value of the gray value of RGB tri-passages, by value composition any in the high-order numerical value of the gray value from RGB tri-passages, particularly, according to the gray value of each passage of RGB of described first pixel, the high-order numerical value of specifying is taken out respectively from the m figure place of the gray value of each passage, form the first gray value of described first pixel, then the first gray value can be expressed as the form of Rn1Gn2Bn3, for judging whether neighbor pixel can be compressed together with described pixel, described n1, n2, n3 can get different numerical value, also identical numerical value can be got.Here is illustrating the first gray value, wherein n1=3, n2=3, n3=2, then have:
R3=R8>>5;
G3=G8>>5;
B2=B8>>6;
LEVEL=(R3<<5)+(G3<<2)+B2;
Wherein, R8, G8, B8 represent R, G, B component in the original video data of 8bit respectively; R3, G3, B2 represent the highest 3bit(and bit7 ~ bit5 in R8, G8, B8 respectively), 3bit, 2bit, LEVEL represents the first gray value, be made up of the high position data of specifying in RGB, >> and << represents respectively and moves to right and move to left, by move to right and shift left operation obtains the first gray value.
Second gray value of described first pixel is become by the specific bit array in described first pixel, second gray value figure place is variable (as 4, 6, 8 etc.), need to regulate according to the pixel number of the compression of reality, this second gray value is become by the specific bit array of the gray value of RGB tri-passages, by value composition any in the specific bit numerical value of the gray value from RGB tri-passages, particularly, specific bit numerical value is taken out as after the first gray value from the m figure place of the RGB gray value of described first pixel, the high x1 that fetching is fixed from remaining bit value, x2, x3 position is as the second gray value of described first pixel, then the second gray value of described first pixel can be expressed as the form of Rx1Gx2Bx3, specifically for improving the details of image when decompressing, described x1, x2, x3 can get different numerical value, also identical numerical value can be got.Here is illustrating the second gray value of first pixel, and wherein x1=2, x2=3, x3=3, then have:
sr2=(R8<<3)>>6;
sg3=(G8<<3)>>5;
sb3=(B8<<2)>>5;
s=(sr2<<6)+(sg3<<3)+sb3;
Wherein, sr2, sg3, sb3 represent that in from R8, G8, B8 of first pixel, taking-up 2bit, 3bit, 3bit are as the component of the second gray value respectively, s represents the second gray value of first pixel, by the first pixel gray value by move to left and shift right operation result form.
For the RGB image represented by less figure place, remaining whole figure place can be got when getting the second gray value, such as, when the original video data of R6G6B6 being compressed, the m of RGB is equal to 6, first gray value gets the high-order portion of original value, as R2G3B3, the second gray value gets remainder, be then R4G3B3.Now, for be compressed together there is monotonic increase or the pixel of the gray value that successively decreases can obtain extraordinary reduction effect.
Based on the example in step 201, this step 202 specifically comprises: LEVEL and s obtaining the pixel that Count points to.
203: judge that whether current pixel point is last pixel of current frame image; If so, then perform step 208, if not, then perform step 204;
Based on the example in step 202, this step 203 specifically can comprise: use Count and P_C to compare, namely whether Count=P_C is had, if equal, illustrate that described first pixel is last pixel of described current frame image, if unequal, then need to continue the remaining pixel of compression, until compress complete.
204: the first gray value and the second gray value that obtain next pixel;
Obtain the gray value of next pixel, according to the gray value of the next pixel obtained, obtain the first gray value of described next pixel and the second gray value of described next pixel.
First gray value of described next pixel is identical with the first gray value sampling process of first pixel, is not repeating.Second gray value of described next pixel is become by the specific bit array in described next pixel, and be variable (as 4, 5, 6 etc.), need to regulate according to the pixel number of the compression of reality, second gray value of this next pixel is become by the specific bit array of the gray value of RGB tri-passages, by value composition any in the specific bit numerical value of the gray value from RGB tri-passages, but it is corresponding with the figure place of the second gray value of first pixel of this coding, particularly, specific bit numerical value is taken out as after the first gray value from the m figure place of the RGB gray value of described next pixel, the high y1 that fetching is fixed from remaining bit value, y2, y3 position is as the second gray value of described next pixel, then the second gray value of described first pixel can be expressed as the form of Ry1Gy2By3, specifically for improving the details of image when decompressing, described y1, y2, y3 can get different numerical value, also identical numerical value can be got.Here is illustrating the second gray value of first pixel, and wherein y1=2, y2=3, y3=3, then have:
er2=(R8<<3)>>6;
eg3=(G8<<3)>>5;
eb3=(B8<<2)>>5;
e=(er2<<6)+(eg3<<3)+eb3;
Wherein, er2, eg3, eb3 represent that in from R8, G8, B8 of next pixel, taking-up 2bit, 3bit, 3bit are as the component of the second gray value respectively, e represents the second gray value of last pixel, by next pixel gray value by move to left and shift right operation result form.
Wherein, table 1 be the first gray value and the second gray value figure place choose signal table.For red component R, the desirable number being less than 8 of m=8, n1 shown in following table, such as 3 or 2; And as n1=3, x1 and y1 can get 5,4,3 etc. in R8-R3.
Table 1
For the RGB image represented by less figure place, remaining whole figure place can be got when getting the second gray value of next pixel, such as, when the original video data of R6G6B6 being compressed, the m of RGB is equal to 6, first gray value gets the high-order portion of original value, as R2G3B3, the second gray value gets remainder, be then R4G3B3.Now, for be compressed together there is monotonic increase or the pixel of the gray value that successively decreases can obtain extraordinary reduction effect.
Based on the example in step 203, this step 204 specifically comprises: by next for Count pointed pixel, the first gray value LEVEL and the second gray value s of next pixel is obtained by the gray value of this pixel, i.e. Count=Count+1, obtains LEVEL and s of the pixel that Count points to.
205: judge that whether the first gray value of the pixel of current acquisition is identical with the first gray value of the last pixel obtained, and if so, performs step 206, if not, perform step 207;
Further, judge pixel number of this time having compressed whether within the scope of extended length bit requirements, if so, then perform step 206, if not, then perform step 207;
Particularly, the first gray value of the pixel of current acquisition is identical with the first gray value of the last pixel obtained, and the pixel number this time compressed is within the scope of extended length bit requirements, performs step 206; And the first gray value of the pixel of current acquisition is identical with the first gray value of the last pixel obtained, and the pixel number length this time compressed not within the scope expanding bit requirements time, perform step 207; First gray value of the first gray value of the pixel of current acquisition and the last pixel obtained is not identical, and the pixel number this time compressed within the scope of extended length bit requirements time, perform step 207; And the first gray value of the first gray value of the pixel of current acquisition and the last pixel obtained is not identical, and the pixel number this time compressed not within the scope of extended length bit requirements time, perform step 207;
Based on step 204, this step 205 specifically compares according to the LEVEL of the pixel obtained in the LEVEL of first pixel and step 204, and judges the scope whether Cnt exceeds extended length position and allow, and proceeds compression according to comparative result.
206: adjust the pixel number compressed, perform step 203;
Step 203-206 is the gray value according to each pixel in described image, determine multiple continuous image vegetarian refreshments that in described image, the first gray value is identical, and the number of described multiple continuous image vegetarian refreshments is within the scope of extended length bit requirements, described multiple continuous image vegetarian refreshments is encoded to the process of packed data.Whether this process is identical with the first gray value of the pixel that the last time obtains by judging the first gray value of the pixel of current acquisition, and judge, within the scope whether Cnt value allows in extended length position, can ensure that the pixel be compressed together can obtain good image detail information after decompression.
Based on the example in step 205, this step 206 adjusts accordingly to the Cnt parameter used in compression, original basis adds 1, i.e. Cnt=Cnt+1.
207: export this packed data, using the pixel of current acquisition as first pixel of encoding next time, adjust the pixel number compressed, perform step 203;
According to the formatted output this time packed data of Fig. 2 a, packed data comprises: the second gray value s of first pixel of LEVEL, expansion instruction, extension bits, packed pixel point number, this second compression and the second gray value e of last pixel, the second gray value e of last pixel described are the second gray values of the last pixel obtained.Due to described current acquisition pixel can not with the last time obtain pixel be compressed together, so using the pixel of described current acquisition as first pixel of encoding next time, adjust the pixel number compressed is 1 simultaneously.
Based on step 204, the pixel value of the pixel of described current acquisition, after the packed data exporting this time coding, is assigned to first pixel by this step 207, as first pixel of encoding next time, and the value of corresponding adjustment Cnt, i.e. Cnt=1.
208: the packed data exporting this.
If this time the pixel number of coding only has one, so second gray value of the second gray value of first pixel as last pixel is exported.
The video compression algorithm that the present invention adopts, add the second gray value of first pixel and the second gray value of last pixel in the compressed data, to obtain more image detail information, make can reduce preferably when decompressing original video data, while effective reduction memory space and occupied bandwidth, ensure that the image after decompress(ion) can obtain better picture quality.
Fig. 3 a is the schematic diagram of a kind of packed data form provided in the embodiment of the present invention.With reference to Fig. 3 a, described packed data comprises: the second gray value s of first pixel of the first gray value LEVEL, expansion instruction, extension bits, packed pixel point number, this second compression and the second gray value e of last pixel.
Wherein, first row LEVEL represents the first gray value, it is the combined value of RGB tri-passages of 8, second is classified as reduction length expansion instruction, if the numerical value in these row, between 1-15, illustrates not do and expands, the pixel number be compressed together is within the scope of 0-15, if the numerical value in these row is 0000, then represent extension bits with 00,01,10,11 below, illustrate that the pixel number be compressed together can expand to 8,10,18,22, the pixel number of compression will within the scope of extension bits.10 s represent the second gray value of first pixel of this second compression, 10 e represent the second gray value of last pixel of this second compression, adopt RGB666 as original video data in the embodiment of the present invention, the quantity be coded in together for the continuous image vegetarian refreshments with identical first gray value LEVEL is controlled, encode several times with successively decreasing according to monotonic increase, after employing 8 is as the first gray value, using remaining 10 as the second gray value, make in packed data, to carry more image detail information.Because the half-tone information of first pixel all carries, so solid-color image can reduce completely; There is monotonic increase can obtain extraordinary reduction with the image successively decreased for pixel gradual change direction in identical LEVEL simultaneously; The image increased progressively for pixel gradual manner linear monotonic in identical LEVEL and successively decrease has best reduction effect.
Fig. 3 b is the method flow diagram of a kind of video data compression provided in the embodiment of the present invention.See Fig. 3 b, specifically comprise:
301: according to current frame image, obtain the pixel number of this two field picture;
This step 301 carries out initialized process to image, initialized data comprise total number of pixel in image, in actual initialization operation process, these initialized data also comprise counter arm function, and counter arm function is used in reference to the pixel to compressing.
Concrete program operation process is understood better for making those skilled in the art, carry out concrete citing to described method to describe, see Fig. 3 c, total number of pixel represents with parameter P_C, P_C carries out initialization according to the size of real image, if the size of image is 1024*1024, then P_C=1048576; Counter arm function Count points to the pixel that will compress, it is 1 that initial value is composed, that is to say Count=1, often compress a pixel, the value of Count adds 1, and for judging whether the pixel in described two field picture has compressed, Cnt is the pixel number of each coding, its initial value is 1, i.e. Cnt=1.
302: obtain the first gray value of this coding, the second gray value of first pixel and monotonic function value;
According to the gray value of first pixel of this coding, obtain the second gray value of described first gray value, described first pixel, the second gray value of described first gray value and first pixel is put into this packed data.
Wherein, this time the first gray value of coding is the first gray value of described this time first pixel of coding, first gray value has fixing figure place (as 8), this first gray value is made up of the high-order numerical value of the gray value of RGB tri-passages, by value composition any in the high-order numerical value of the gray value from RGB tri-passages, particularly, according to the gray value of each passage of RGB of described first pixel, the high-order numerical value of specifying is taken out respectively from the m figure place of the gray value of each passage, form the first gray value of described first pixel, then the first gray value can be expressed as the form of Rn1Gn2Bn3, for judging whether neighbor pixel can be compressed together with described pixel, described n1, n2, n3 can get different numerical value, also identical numerical value can be got.Here is illustrating the first gray value, wherein n1=3, n2=3, n3=4, then have:
R3=R6>>3;
G3=G6>>3;
B2=B6>>4;
LEVEL=(R3<<5)+(G3<<2)+B2
Wherein, R6, G6, B6 represent R, G, B component in the original video data of 6bit respectively; R3, G3, B2 represent the highest 3bit(and bit7 ~ bit5 in R6, G6, B6 respectively), 3bit, 2bit, LEVEL represents the first gray value, be made up of the high position data of specifying in RGB, >> and << represents respectively and moves to right and move to left, by move to right and shift left operation obtains the first gray value.
Second gray value of described first pixel is become by the specific bit array in described first pixel, second gray value figure place is variable (as 4, 6, 8 etc.), need to regulate according to the pixel number of the compression of reality, this second gray value is become by the specific bit array of the gray value of RGB tri-passages, by value composition any in the specific bit numerical value of the gray value from RGB tri-passages, particularly, specific bit numerical value is taken out as after the first gray value from the m figure place of the RGB gray value of described first pixel, the high x1 that fetching is fixed from remaining bit value, x2, x3 position is as the second gray value of described first pixel, then the second gray value of described first pixel can be expressed as the form of Rx1Gx2Bx3, specifically for improving the details of image when decompressing, described x1, x2, x3 can get different numerical value, also identical numerical value can be got.In embodiments of the present invention, adopt the residue figure place after taking-up first gray value as the second gray value of first pixel, here is illustrating the second gray value of first pixel, and wherein x1=3, x2=3, x3=3, then have:
sr3=(R6<<3)>>3;
sg3=(G6<<3)>>3;
sb4=(B6<<2)>>2
s=(sr3<<7)+(sg3<<4)+sb4;
Wherein, sr3, sg3, sb4 represent respectively from R6, G6, B6 of first pixel, take out the first gray value after remaining figure place 3bit, 3bit, 4bit be as the component of the second gray value, s represents the second gray value of first pixel, by the first pixel gray value by move to left and shift right operation result form.
Simultaneously, with F(n) represent the monotonic function value of pixel, n represents the n-th pixel in this two field picture, n value equals pointer function value, i.e. n=Count, for representing that the gray value of the pixel that pixel gray value obtained relative to the last time is monotonic increase or monotone decreasing, as F(n)=1 time, the gray value representing the pixel that this pixel gray value obtained relative to the last time is monotonically increasing, as F(n)=-1 time, represent that the gray value of the pixel that this pixel gray value obtained relative to the last time is monotone decreasing.
Based on the example in step 301, this step 302 specifically comprises: the LEVEL and s, the F(1 that obtain the pixel that Count points to)=0, represent that the monotonic function value of first pixel of this second compression is 0.
303: judge that whether current pixel point is last pixel of current frame image; If so, then perform step 308, if not, then perform step 304;
Based on the example in step 302, this step 303 specifically can comprise: use Count and P_C to compare, namely whether Count=P_C is had, if equal, illustrate that described first pixel is last pixel of described current frame image, if unequal, then need to continue the remaining pixel of compression, until compress complete.
304: obtain the first gray value of next pixel, the second gray value and monotonic function value;
Obtain the first gray value of next pixel and the process of the second gray value and step 302 in like manner, do not repeat them here.Second gray value of described next pixel is become by the specific bit array in described next pixel, and be variable (as 4, 5, 6 etc.), need to regulate according to the pixel number of the compression of reality, second gray value of this next pixel is become by the specific bit array of the gray value of RGB tri-passages, by value composition any in the specific bit numerical value of the gray value from RGB tri-passages, but it is corresponding with the figure place of the second gray value of first pixel, particularly, specific bit numerical value is taken out as after the first gray value from the m figure place of the RGB gray value of described next pixel, the high y1 that fetching is fixed from remaining bit value, y2, y3 position is as the second gray value of described next pixel, then the second gray value of described first pixel can be expressed as the form of Ry1Gy2By3, specifically for improving the details of image when decompressing, described y1, y2, y3 can get different numerical value, also identical numerical value can be got.In embodiments of the present invention, adopt the residue figure place after taking-up first gray value as the second gray value of next pixel, here is illustrating the second gray value of next pixel, and wherein y1=3, y2=3, y3=4, then have:
er3=(R6<<3)>>3;eg3=(G6<<3)>>3;eb4=(B6<<2)>>2
e=(er3<<7)+(eg2<<4)+eb4;
Wherein, after er3, eg3, eb4 represent respectively take out the first gray value from R6, G6, B6 of next pixel, remaining 3bit, 3bit, 4bit are as the component of the second gray value, e represents the second gray value of next pixel herein, by next pixel gray value by move to left and shift right operation result form.
Next pixel described is herein exactly the pixel of current acquisition, and the pixel of described current acquisition is once exactly next pixel herein.
According to the second gray value of the pixel of current acquisition and the second gray value of the last pixel obtained, determine the pixel monotonic function value of the pixel of current acquisition, particularly, difference is done by the second gray value of the pixel of current acquisition and the second gray value of the last pixel obtained, when the difference obtained is more than or equal to 0, the monotonic function assignment F(n of the pixel of current acquisition)=1, when the difference obtained is less than or equal to 0, the monotonic function assignment F(n of the pixel of current acquisition)=-1.Table 2 is values of concrete monotonic function value, wherein, Diff represents the result that the second gray value that the second gray value of the pixel of current acquisition deducts previous pixel obtains, form first row is the monotonic function value F(n-1 of previous pixel), the monotonic function value F(n of the current pixel point obtained according to Diff difference is shown in two lists below).
Particularly, when data at first, F(n)=0.
Namely R/G/B component in second gray value of the current pixel point R/G/B be more than or equal to respectively in the second gray value of previous pixel thinks monotonic increase, now, and Diff>=0, F(n)=1.
Current pixel point the second gray value in the R/G/B component R/G/B that is less than or equal to a pixel e respectively namely think monotone decreasing, now, Diff>=0, F(n)=-1.
Table 2
Based on the example in step 303, this step 304 specifically comprises: by next for Count pointed pixel, the first gray value LEVEL and the second gray value s of next pixel is obtained by the gray value of this pixel, i.e. Count=Count+1, obtain LEVEL and s, the F(n of the pixel that Count points to).
305: judge that whether the first gray value of the pixel of current acquisition is identical with the first gray value of the last pixel obtained, and if so, performs step 306, if not, perform step 307;
Further, judge pixel number of this time having compressed whether within the scope of extended length bit requirements, and whether the monotonic function value judging the pixel of the whether identical or last acquisition of the monotonic function value of the monotonic function value of the pixel of current acquisition and the last pixel obtained is 0, if what above-mentioned two judgements obtained is all, then perform step 306, if the result that above-mentioned two judgements obtain has any one no, then perform step 307;
Particularly, first gray value of the pixel of current acquisition is identical with the first gray value of the last pixel obtained, and the pixel number this time compressed is within the scope of extended length bit requirements, and the monotonic function value of the pixel of current acquisition is identical with the monotonic function value of the last pixel obtained or the monotonic function value of the pixel of last acquisition is 0, performs step 306; For other situations, as long as do not meet wherein any one condition, just perform step 307;
Based on the example in step 304, this step 305 specifically compares according to the LEVEL of the pixel obtained in the LEVEL of first pixel and step 304, and judge whether Cnt exceeds the scope of extended length position permission, and judge F(n-1)=0, or F(n) whether equal F(n-1), proceed compression according to comparative result.
306: adjust the pixel number compressed, perform step 303;
Particularly, if there is the second gray value of last pixel in the data of this coding, then replace the second gray value of existing pixel with the second gray value of the pixel of current pointer sensing.
Step 303-306 is the gray value according to each pixel in described image, determine multiple continuous image vegetarian refreshments that in described image, the first gray value is identical, described multiple continuous image vegetarian refreshments also will meet the number of described multiple continuous image vegetarian refreshments within the scope of extended length bit requirements, and the monotonic function value meeting the pixel of current acquisition is identical with the monotonic function value of the last pixel obtained or the monotonic function value of the pixel of last acquisition is 0, described multiple continuous image vegetarian refreshments is encoded to the process of packed data.Whether this process is identical with the first gray value of the pixel that the last time obtains by judging the first gray value of the pixel of current acquisition, and judge within the scope whether Cnt value allows in extended length position, the monotonic function value of the pixel of the monotonic function value of the pixel of current acquisition or last acquisition identical with the monotonic function value of the last pixel obtained is 0, can ensure that the pixel be compressed together can obtain good image detail information after decompression.
Based on step 305, this step 306 adjusts accordingly to the Cnt parameter used in compression, original basis adds 1, i.e. Cnt=Cnt+1.
307: export this packed data, using the pixel of current acquisition as first pixel of encoding next time, adjust the pixel number compressed, perform step 303;
According to the formatted output this time packed data of Fig. 3 a, packed data comprises: the second gray value s of first pixel of LEVEL, expansion instruction, extension bits, packed pixel point number, this second compression and the second gray value e of last pixel, the second gray value e of last pixel described are the second gray values of the last pixel obtained.Because the pixel of described current acquisition can not and be compressed together with the pixel that the last time obtains, thus using the pixel of described current acquisition as first pixel of encoding next time, adjust the pixel number compressed is 1 simultaneously.
Based on step 304, the pixel value of the pixel of described current acquisition, after the packed data exporting this time coding, is assigned to first pixel by this step 307, as first pixel of encoding next time, and the value of corresponding adjustment Cnt, i.e. Cnt=1.
308: the packed data exporting this.
If this time the pixel number of coding only has one, so second gray value of the second gray value of first pixel as last pixel is exported.
The video compression algorithm that the present invention adopts, add the second gray value of first pixel and the second gray value of last pixel in the compressed data, during compression, the first gray value gets the high-order portion of original value, second gray value gets remainder, and the packed pixel for identical first gray value is counted and to be transmitted several times according to monotonic increase and successively decreasing.Meanwhile, the data stream format that the present invention adopts has suitable flexibility, can adjust the figure place of the second gray value, reaches the effect of adjustment compression ratio and increase image detail information.Because the information of first pixel is all carried, so solid-color image just can reduce completely when decompression, there are monotonic increase or the image that successively decreases can obtain extraordinary reduction for pixel gradual change direction in identical first gray value simultaneously, the image increased progressively for pixel gradual manner linear monotonic in identical first gray value and successively decrease has best reduction effect, meanwhile, memory space and occupied bandwidth can effectively be reduced.
Fig. 4 a is the schematic diagram of a kind of video compression data form provided in the embodiment of the present invention.With reference to Fig. 4 a, described packed data comprises: the first gray value LEVEL, expansion instruction, extension bits, packed pixel select number, the second gray value s of first pixel, the second gray value m of intermediary image vegetarian refreshments of this second compression and the second gray value e of last pixel.
Wherein, LEVEL represents the first gray value, it is the RGB combined value of 8, second is classified as reduction length expansion instruction, if the numerical value in these row, between 1-15, illustrates not do and expands, the pixel number be compressed together is within the scope of 0-15, now the second gray value of first of this second compression pixel and last pixel is set to 4, effectively can reduce compression ratio, if the numerical value in these row is 0000, then use 00 below, 01, 10, 11 figure places representing expansion, illustrate that the pixel number be compressed together can expand to 8, 10, 18, 22, be used for depositing actual compression to count.8 s represent first pixel second gray value of this second compression, and 8 m represent intermediary image vegetarian refreshments second gray value of this second compression, and the number of intermediary image vegetarian refreshments can have multiple, and 8 e represent the second gray value of last pixel of this second compression.
Fig. 4 b is the flow chart of a kind of video data compression method provided in the embodiment of the present invention, see Fig. 4 b, specifically comprises:
401: according to current frame image, obtain the pixel number of this two field picture;
This step 401 carries out initialized process to image, initialized data comprise total number of pixel in image, and in actual motion, these initialized data also comprise counter arm function, counter arm function is used in reference to the pixel to compressing.
Concrete program operation process is understood better for making those skilled in the art, carry out concrete citing to described method to describe, see Fig. 4 c, total number of pixel represents with parameter P_C, P_C carries out initialization according to the size of real image, if the size of image is 1024*1024, then P_C=1048576; Counter arm function Count points to the pixel that will compress, it is 1 that initial value is composed, that is to say Count=1, often compress a pixel, the value of Count adds 1, and for judging whether the pixel in described two field picture has compressed, Cnt is the pixel number of each coding, its initial value is 1, i.e. Cnt=1.
402: obtain the first gray value of this coding and the second gray value of first pixel;
According to the gray value of first pixel of this coding, obtain the second gray value of described first gray value, described first pixel, the second gray value of described first gray value and first pixel is put into this packed data.
Wherein, this time the first gray value of coding is the first gray value of described this time first pixel of coding, first gray value has fixing figure place (as 8), this first gray value is made up of the high-order numerical value of the gray value of RGB tri-passages, by value composition any in the high-order numerical value of the gray value from RGB tri-passages, particularly, according to the gray value of each passage of RGB of described first pixel, the high-order numerical value of specifying is taken out respectively from the m figure place of the gray value of each passage, form the first gray value of described first pixel, then the first gray value can be expressed as the form of Rn1Gn2Bn3, for judging whether neighbor pixel can be compressed together with described pixel, described n1, n2, n3 can get different numerical value, also identical numerical value can be got.Here is illustrating the first gray value, wherein n1=3, n2=3, n3=2, then have:
R3=R8>>5;
G3=G8>>5;
B2=B8>>6;
LEVEL=(R3<<5)+(G3<<2)+B2;
Wherein, R8, G8, B8 represent R, G, B component in the original video data of 8bit respectively; R3, G3, B2 represent the highest 3bit(and bit7 ~ bit5 in R8, G8, B8 respectively), 3bit, 2bit, LEVEL represents the first gray value, be made up of the high position data of specifying in RGB, >> and << represents respectively and moves to right and move to left, by move to right and shift left operation obtains the first gray value.
Second gray value of described first pixel is become by the specific bit array in described first pixel, second gray value figure place is variable (as 4, 6, 8 etc.), need to regulate according to the pixel number of the compression of reality, this second gray value is become by the specific bit array of the gray value of RGB tri-passages, by value composition any in the specific bit numerical value of the gray value from RGB tri-passages, particularly, specific bit numerical value is taken out as after the first gray value from the m figure place of the RGB gray value of described first pixel, the high x1 that fetching is fixed from remaining bit value, x2, x3 position is as the second gray value of described first pixel, then the second gray value of described first pixel can be expressed as the form of Rx1Gx2Bx3, specifically for improving the details of image when decompressing, described x1, x2, x3 can get different numerical value, also identical numerical value can be got.Here is illustrating the second gray value of first pixel, and wherein x1=2, x2=3, x3=3, then have:
sr2=(R8<<3)>>6;
sg3=(G8<<3)>>5;
sb3=(B8<<2)>>5;
s=(sr2<<6)+(sg3<<3)+sb3;
Wherein, sr2, sg3, sb3 represent that in from R8, G8, B8 of first pixel, taking-up 2bit, 3bit, 3bit are as the component of the second gray value respectively, s represents the second gray value of first pixel, by the first pixel gray value by move to left and shift right operation result form.
Based on the example in step 401, this step 402 specifically comprises: LEVEL and s obtaining the pixel that Count points to.
403: judge that whether the pixel of current acquisition is last pixel of current frame image; If so, then perform step 412, if not, then perform step 404;
Based on the algorithm in step 402, this step 403 specifically can comprise: use Count and P_C to compare, namely whether Count=P_C is had, if equal, illustrate that described first pixel is last pixel of described current frame image, if unequal, then need to continue the remaining pixel of compression, until compress complete.
404: the first gray value and the second gray value that obtain next pixel;
This step 404 and step 204 in like manner, do not repeat them here.
Based on the example in step 403, this step 404 specifically comprises: by next for Count pointed pixel, the first gray value LEVEL and the second gray value s of next pixel is obtained by the gray value of this pixel, i.e. Count=Count+1, obtains LEVEL and s of the pixel that Count points to.
405: judge that whether the first gray value of the pixel of current acquisition is identical with the first gray value of the last pixel obtained, and if so, performs step 406, if not, perform step 409;
Further, judge pixel number of this time having compressed whether within the scope of extended length bit requirements, if so, then perform step 406, if not, then perform step 409;
Particularly, the first gray value of the pixel of current acquisition is identical with the first gray value of the last pixel obtained, and the pixel number this time compressed is within the scope of extended length bit requirements, performs step 406; And the first gray value of the pixel of current acquisition is identical with the first gray value of the last pixel obtained, and the pixel number length this time compressed not within the scope expanding bit requirements time, perform step 409; First gray value of the first gray value of the pixel of current acquisition and the last pixel obtained is not identical, and the pixel number this time compressed within the scope of extended length bit requirements time, perform step 409; And the first gray value of the first gray value of the pixel of current acquisition and the last pixel obtained is not identical, and the pixel number this time compressed not within the scope of extended length bit requirements time, perform step 409;
Based on step 404, this step 405 specifically compares according to the LEVEL of the pixel obtained in the LEVEL of first pixel and step 404, and judges the scope whether Cnt exceeds extended length position and allow, and proceeds compression according to comparative result.
406: adjust the pixel number compressed;
The LEVEL value of first pixel is identical with the LEVEL value of last pixel and Cnt value is less than or equal to the scope that extended length position allows, illustrate that last pixel can be able to be compressed together with first pixel, then the Cnt parameter used in compression is adjusted accordingly, original basis adds 1, and Count adds 1 simultaneously.Based on the example in step 405, this step 406 adjusts parameter Cnt, i.e. Cnt=Cnt+1.
407: whether the pixel judging current acquisition is intermediary image vegetarian refreshments, if so, perform step 408, if not, perform step 403;
Intermediary image vegetarian refreshments refers to that the pixel every some chooses a pixel as an intermediary image vegetarian refreshments, is equivalent to bulk zone to be divided into a lot of zonules to carry out Approach by inchmeal.For the situation that the pixel number be compressed together is more, in order to obtain the color detail of more horn of plenty when reducing video data, adopt the second gray value increasing and carry more intermediary image vegetarian refreshments, during as reached 2^22 for the pixel number be compressed together, can choose and increase an intermediary image vegetarian refreshments every N number of pixel, N value can choose 1024,2048,4096 etc.
Particularly, on the basis of example in a step 406, in this step 407, increase by the first preset value for judging when to increase the second gray value of intermediary image vegetarian refreshments, this judgement can comprise: judge that whether Cnt value is the integral multiple of the first preset value, again, getting the first preset value is 1024, if so, performs 408, if not, step 403 is performed.
408: the second gray value of the pixel of current acquisition is put into the packed data of this time encoding as the second gray value of intermediary image vegetarian refreshments, performs step 403;
This process is in first encoding process, may perform repeatedly, the so last packed data exported will carry the second gray value of multiple intermediary image vegetarian refreshments, and the second gray value of described multiple intermediary image vegetarian refreshments is become by the specific bit array in the gray value of described intermediary image vegetarian refreshments.Second gray value of described intermediary image vegetarian refreshments is become by the specific bit array in described intermediary image vegetarian refreshments, and be variable (as 4, 5, 6 etc.), need to regulate according to the pixel number of the compression of reality, second gray value of this intermediary image vegetarian refreshments is become by the specific bit array of the gray value of RGB tri-passages, by value composition any in the specific bit numerical value of the gray value from RGB tri-passages, particularly, specific bit numerical value is taken out as after the first gray value from the m figure place of the RGB gray value of described intermediary image vegetarian refreshments, the high z1 that fetching is fixed from remaining bit value, z2, z3 position is as the second gray value of described intermediary image vegetarian refreshments, then the second gray value of described intermediary image vegetarian refreshments can be expressed as the form of Rz1Gz2Bz3, specifically for improving the details of image when decompressing, described z1, z2, z3 can get different numerical value, also identical numerical value can be got.Here is illustrating the second gray value of first pixel, and wherein z1=2, z2=3, z3=3, then have:
mr2=(R8<<3)>>6;
mg3=(G8<<3)>>5;
mb3=(B8<<2)>>5;
m=(mr2<<6)+(mg3<<3)+mb3;
Wherein, mr2, mg3, mb3 represent respectively take out 2bit, 3bit, 3bit component as the second gray value from R8, G8, B8 of last pixel, m represents the second gray value of last pixel, by last pixel gray value by move to left and shift right operation result form.
Based on the example in step 407, this step 408, when current pixel point is the integral multiple of the first preset value, using this pixel as intermediary image vegetarian refreshments, puts into the second gray value of intermediary image vegetarian refreshments the data of coding.
409: whether the pixel number this time in packed data is less than the second preset value, if so, performs step 410, if not, perform step 411;
Wherein, the second preset value refer to of specifying for weigh the data volume of compression number numerical value, for determining the selection of the figure place of the second gray value, can get in the numeral the present embodiment such as 10,20,25 as the second preset value and not limiting.If the pixel number of compression is less than the second preset value, then uses less figure place to represent the second gray value, can compression ratio be increased like this.Particularly, on the basis of step 408, this step 309 judges whether the Cnt in this packed data is less than the second preset value, the second preset value value 16.
410: the figure place adjusting the second gray value of first pixel and last pixel in this packed data;
Because the pixel number of compression is less than preset value, illustrate that the data volume of compression is less, so in order to increase compression ratio, reducing the figure place of the second gray value, such as, second gray value of R2G2B3 can be revised as R1G1B2.Here is illustrating the second gray value of adjustment first pixel and last pixel:
sr1/er1=(R8<<3)>>7;
sg1/eg1=(G8<<3)>>7;
sb2/eb2=(B8<<2)>>6
s=(sr1<<3)+(sg1<<2)+sb2;
e=(er1<<3)+(eg1<<2)+eb2;
Wherein, sr1/er1, sg1/eg1, sb2/eb2 represent respectively and from the second gray value of first pixel and last pixel, to retrieve high 1bit, 1bit, 2bit the second gray value as first pixel and last pixel, by moving to left and shift right operation result composition.
On the basis of step 409, the second gray value of first pixel that this encodes by this step 410 changes R1G1B2 into, and the second gray value of last pixel changes R1G1B2 into.
411: export this time packed data after adjustment, using the pixel of current acquisition as first pixel of encoding next time, adjust the pixel number compressed, perform step 403;
The pixel that can not obtain with the last time due to the pixel of described current acquisition is compressed together, so using the pixel of described current acquisition as first pixel of encoding next time.
On the basis of step 410, the value of last pixel is assigned to first pixel by this step 411, accordingly, and the pixel number of adjustment compression, i.e. Cnt=Cnt+1.
412: judge whether the pixel number in this packed data is less than the second preset value, if so, perform step 413, if not, perform step 414;
Wherein, second preset value be of specifying for weigh the data volume of compression number numerical value, for determining the selection of the figure place of the second gray value, if the pixel number of compression is less than the second preset value, then use the second gray value of less figure place, can compression ratio be increased like this.
Particularly, on the basis of step 402, this step 412 judges whether the Cnt in this packed data is less than the second preset value, the second preset value value 16.
413: the figure place adjusting the second gray value of first pixel and last pixel in this packed data;
Because the pixel number of compression is less than preset value, illustrate that the data volume of compression is less, so in order to increase compression ratio, reducing the figure place of the second gray value, such as, second gray value of R2G2B3 can be revised as R1G1B2.Concrete adjustment process is identical with step 410, repeats no more here.
On the basis of example in step 412, the second gray value of first pixel that this encodes by this step 413 changes R1G1B2 into, and the second gray value of last pixel changes R1G1B2 into.
414: export this packed data.
After the compression of all pixels completing two field picture, described packed data carries outside the second gray value of the first gray value, the pixel number of expansion compression, the second gray value of first pixel, last pixel, described packed data also carries the second gray value of the multiple intermediary image vegetarian refreshments in described multiple continuous image vegetarian refreshments, and the second gray value of described multiple intermediary image vegetarian refreshments is become by the specific bit array in the gray value of described intermediary image vegetarian refreshments.
On the basis of example in step 413, this step 414 exports this packed data.
The video compression algorithm adopted in the embodiment of the present invention, when contiguous pixels for compression is counted and is less than the second preset value, the figure place of the second gray value is controlled in less figure place, add the compression ratio of image, and the contiguous pixels of compression is counted many regions, in order to obtain the color detail of more horn of plenty when reducing video data, adopt the second gray value increasing and carry more intermediary image vegetarian refreshments, make the method for the linear interpolation when decompressing just can reduce original video data better, obtain more image detail information, while effective reduction memory space and occupied bandwidth, ensure that the image after decompress(ion) can obtain better picture quality.
Fig. 5 is the method flow diagram of a kind of video data decompressor that the embodiment of the present invention provides, the video compression data that the method for this video decompression obtains corresponding to the method for Fig. 1, see Fig. 5, specifically comprises:
501: obtain the packed data of video data, described packed data carries the first gray value, packed pixel selects number and the second gray value of first pixel in multiple continuous image vegetarian refreshments of compression and the second gray value of last pixel;
502: the gray value obtaining first pixel and last pixel in described packed data;
503: according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtain the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression;
504: when each packed data of described video data is all in time decompressing, terminate video data decompressor.
The video decompression algorithm that the present invention adopts, according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtain the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression, reduction original video data, to obtain more image detail, improve the picture quality after decompress(ion).
Fig. 6 is the method flow diagram of a kind of video data decompressor provided in the embodiment of the present invention, the video compression data that the method for this video decompression obtains corresponding to the method for Fig. 2 b and Fig. 3 b, see Fig. 6, specifically comprises:
601: obtain the packed data of video data, described packed data carries the first gray value, packed pixel selects number and the second gray value of first pixel in multiple continuous image vegetarian refreshments of compression and the second gray value of last pixel;
If the form of the first gray value LEVEL of compression first pixel is R3G3B2, then the RGB component in the first gray value is respectively:
R_L=((LEVEL&0xe0);
G_L=((LEVEL&0x1c)<<3);
B_L=((LEVEL&0x3)<<6);
Wherein, R_L, G_L, B_L represent the RGB component in the first gray value after decompress(ion) respectively, and & represents and computing.
602: according to the second gray value of described first gray value and described first pixel, calculate the gray value of described first pixel;
Particularly, described first gray value can represent with Rn1Gn2Bn3, described first gray value n1, n2, n3 position is as the gray value of a high position for described first pixel three passages, described second gray value can represent with Rx1Gx2Bx3, described second gray value x1, x2, x3 position is as the high position in the remaining bit of described first pixel, m is the figure place of described first pixel, with 0 or 1 as the value of the low m-n-x position of described first pixel.Concrete example illustrates the computational process of the gray value of first pixel:
If the form of the compression of the second gray value s of first pixel is R3G2B3, then the RGB component of first pixel after decompress(ion) is respectively:
sr=R_L+((s&0xe0)>>3);
sg=G_L+(s&0x18);
sb=B_L+((s&0x07)<<2);
Wherein, sr, sg, sb are respectively the RGB component of first pixel, fill 0 in the present embodiment to the low level of last pixel, can be 0 or 1, be not construed as limiting here in actual use.
If the form of the compression of the second gray value s of first pixel is R3G3B4, then the RGB component of first pixel after decompress(ion) is respectively:
sr=R_L+((s&0x380)>>7);
sg=G_L+((s&0x070)>>4);
sb=B_L+(s&0x00f);
Wherein, sr, sg, sb are respectively the RGB component of first pixel, fill 0 in the present embodiment to the low level of last pixel, can be 0 or 1, be not construed as limiting here in actual use.
603: according to described first gray value and last pixel second gray value described, calculate the gray value of last pixel;
Particularly, described first gray value can represent with Rn1Gn2Bn3, described first gray value n1, n2, n3 position is as the gray value of a high position for described first pixel three passages, second gray value of last pixel described can represent with Rx1Gx2Bx3, second gray value y1, y2, y3 position of last pixel described as last pixel described remaining bit in a high position, m is the figure place of last pixel described, with 0 or 1 as the value of the low level of last pixel.Concrete example illustrates the computational process of the gray value of last pixel:
If the form of the compression of the second gray value e of last pixel is R3G2B3, then the RGB component of last pixel after decompress(ion) is respectively:
er=R_L+((e&0xe0)>>3);
eg=G_L+(e&0x18);
eb=B_L+((e&0x07)<<2);
In the present embodiment 0 is filled to the low level of last pixel, can be 0 or 1 in actual use, be not construed as limiting here.
If the form of the compression of the second gray value e of first pixel is R3G3B4, then the RGB component of first pixel after decompress(ion) is respectively:
er=R_L+((e&0x380)>>7);
eg=G_L+((e&0x070)>>4);
eb=B_L+(e&0x00f);
Wherein, er, eg, eb are respectively the RGB component of first pixel, fill 0 in the present embodiment to the low level of last pixel, can be 0 or 1, be not construed as limiting here in actual use.
604: the difference calculating the second gray value of described first pixel and the second gray value of last pixel described, by described difference divided by described packed pixel point number, obtain the increment of linear interpolation;
Concrete example illustrates the process of the gray value calculating intermediary image vegetarian refreshments:
Linear difference increment used can be expressed as:
Δr=(er-sr)*Cnt/L;
Δg=(eg-sg)*Cnt/L;
Δb=(eb-sb)*Cnt/L。
Wherein, L is reduction length, er, eg, eb appoint the RGB component for last pixel respectively, sr, sg, sb are respectively the RGB component of first pixel, Δ r, Δ g, Δ b are respectively the increment of the RGB linear interpolation of intermediary image vegetarian refreshments, the distance of intermediary image vegetarian refreshments and first pixel is Cnt, 1<=Cnt<=L.
605: other pixels in decompressing according to this and the distance of described first pixel, and the increment of described linear interpolation, calculate the gray value of other pixels in this decompression described successively;
The formula calculating the gray value of intermediary image vegetarian refreshments is as follows:
R=sr+Δr;
G=sg+Δg;
B=sb+Δb;
Wherein, R, G, B are respectively the gray value of the intermediary image vegetarian refreshments after decompress(ion).
The video decompression algorithm that the present invention adopts, the second gray value of first pixel and the second gray value of last pixel is utilized to calculate the increment of linear interpolation, original video data is reduced by the mode of linear interpolation, to obtain more image detail, improve the picture quality after decompress(ion).
Fig. 7 is the method flow diagram of a kind of video data decompressor provided in the embodiment of the present invention, the video compression data comprising the second gray value of multiple intermediary image vegetarian refreshments that the method for this video decompression obtains corresponding to the method for Fig. 4 b, see Fig. 7, specifically comprises:
701: obtain the packed data of video data, described packed data carries the first gray value, packed pixel selects number and the second gray value of first pixel in multiple continuous image vegetarian refreshments of compression and the second gray value of last pixel;
If the form of the first gray value LEVEL of first pixel of compression is R3G3B2, then the RGB component in the first gray value is respectively:
R_L=((LEVEL&0xe0);
G_L=((LEVEL&0x1c)<<3);
B_L=((LEVEL&0x3)<<6);
Wherein, R_L, G_L, B_L represent the RGB component in the first gray value after decompress(ion) respectively, and & represents and computing.
702: according to the second gray value of described first gray value and described first pixel, calculate the gray value of described first pixel;
Particularly, described first gray value can represent with Rn1Gn2Bn3, described first gray value n1, n2, n3 position is as the gray value of a high position for described first pixel three passages, second gray value of described first pixel can represent with Rx1Gx2Bx3, described x1, x2, x3 position is as the high position in the remaining bit of described first pixel, m is the figure place of described first pixel, with 0 or 1 as the value of the low m-n-x position of described first pixel.Concrete example illustrates the computational process of the gray value of first pixel:
If the form of the compression of the second gray value s of first pixel is R3G2B2, then the RGB component of first pixel after decompress(ion) is respectively:
sr=R_L+((s&0xe0)>>3);
sg=G_L+(s&0x18);
sb=B_L+((s&0x07)<<2);
Wherein, sr, sg, sb are respectively the RGB component of first pixel, fill 0 in the present embodiment to the low level of last pixel, can be 0 or 1, be not construed as limiting here in actual use.
Reduction length is less than to the packed data of 16, if the form of the compression of the second gray value s of first pixel is R1G1B2, then the RGB component of first pixel after decompress(ion) is respectively:
sr=R_L+((s&0x8)<<1);
sg=G_L+((s&0x6)<<2);
sb=B_L+((s&0x3)<<4);
Wherein, sr, sg, sb are respectively the RGB component of first pixel, fill 0 in the present embodiment to the low level of last pixel, can be 0 or 1, be not construed as limiting here in actual use.
703: according to the second gray value of described first gray value and last pixel described, calculate the gray value of last pixel;
The concrete computational process of gray value of last pixel described and the gray value similar computation process of first pixel, repeat no more here.Concrete example illustrates the computational process of the gray value of last pixel:
If the form of the compression of the second gray value e of last pixel is R3G2B2, then the RGB component of last pixel after decompress(ion) is respectively:
er=R_L+((e&0xe0)>>3);
eg=G_L+(e&0x18);
eb=B_L+((e&0x07)<<2);
In the present embodiment 0 is filled to the low level of last pixel, can be 0 or 1 in actual use, be not construed as limiting here.
Reduction length is less than to the packed data of 16, if the form of the compression of the second gray value s of first pixel is R1G1B2, then the RGB component of first pixel after decompress(ion) is respectively:
er=R_L+((e&0x8)<<1);
eg=G_L+((e&0x6)<<2);
eb=B_L+((e&0x3)<<4);
Wherein, er, eg, eb are respectively the RGB component of first pixel, fill 0 in the present embodiment to the low level of last pixel, can be 0 or 1, be not construed as limiting here in actual use.
704: according to the second gray value of described first gray value and described intermediary image vegetarian refreshments, calculate the gray value of intermediary image vegetarian refreshments;
Particularly, if the form of the compression of the second gray value m of intermediary image vegetarian refreshments is R3G2B2, then the RGB component of last pixel after decompress(ion) is respectively:
m[n]r=R_L+((m[n]&0xe0)>>3);
m[n]g=G_L+(m[n]&0x18);
m[n]b=B_L+((m[n]&0x07)<<2);
Wherein, m [n] r, m [n] g, m [n] b represents the RGB component of the n-th intermediary image vegetarian refreshments after decompress(ion) respectively, and n can value 1,2,3 etc., fills 0 in this example to the low level of middle pixel, actual use in can be 0 or 1, be not construed as limiting here.
705: judge the second gray value whether having intermediary image vegetarian refreshments in packed data, if so, perform step 708, if not, perform step 706;
706: the difference calculating the second gray value of described first pixel and the second gray value of described first intermediary image vegetarian refreshments, by described difference divided by described packed pixel point number, obtain the increment of linear interpolation;
Concrete example illustrates the process of the gray value calculating intermediary image vegetarian refreshments:
Linear difference increment used can be expressed as:
Δr=(er-sr)*Cnt/L;
Δg=(eg-sg)*Cnt/L;
Δb=(eb-sb)*Cnt/L。
Wherein, L is reduction length, er, eg, eb appoint the RGB component for last pixel respectively, sr, sg, sb are respectively the RGB component of first pixel, Δ r, Δ g, Δ b are respectively the increment of the RGB linear interpolation of intermediary image vegetarian refreshments, the distance of intermediary image vegetarian refreshments and first pixel is Cnt, 1<=Cnt<=L.
707: other pixels in decompressing according to this and the distance of described first pixel, and the increment of described linear interpolation, calculate the gray value of other pixels in this decompression described successively, perform step 714;
The formula calculating the gray value of intermediary image vegetarian refreshments is as follows:
R=sr+Δr;G=sg+Δg;B=sb+Δb;
Wherein, R, G, B are respectively the gray value of the intermediary image vegetarian refreshments after decompress(ion).
708: the difference calculating the second gray value of described first pixel and the second gray value of first intermediary image vegetarian refreshments, by the packed pixel point number that described difference comprises divided by described first pixel and first intermediary image vegetarian refreshments, obtain the increment of the first linear interpolation;
Now L<=4096, then have:
Δr=(m1r-sr)*Cnt/L;Δg=(m1g-sg)*Cnt/L;Δb=(m1b-sb)*Cnt/L;
Wherein, Δ r, Δ g, Δ b are respectively the increment of the RGB linear interpolation of the pixel between first pixel and first intermediary image vegetarian refreshments, and the pixel between first pixel and first intermediary image vegetarian refreshments and the distance of first pixel are Cnt.
709: described first pixel in decompressing according to this and pixel and the distance of described first pixel between intermediary image vegetarian refreshments and the increment of described first linear interpolation, calculate the gray value of the pixel described in this decompression described between first pixel and described intermediary image vegetarian refreshments successively;
The formula calculating the gray value of the pixel between first pixel and described intermediary image vegetarian refreshments is as follows:
R=sr+Δr;G=sg+Δg;B=sb+Δb;
Wherein, R, G, B are respectively the gray value of the pixel between first pixel after decompress(ion) and described intermediary image vegetarian refreshments.
710: the difference calculating the second gray value of two adjacent intermediary image vegetarian refreshments, by the packed pixel point number of described difference divided by described two adjacent intermediary image vegetarian refreshments, obtain the increment of center linear interpolation;
Now L>4096, then get num=L/4096, n=Cnt/4096
During n==1:
Δr=(m1r-sr)*Cnt/4096;
Δg=(m1r-sg)*Cnt/4096;
Δb=(m1-sb)*Cnt/4096
During n<=num-1:
Δr=(m[n]r-m[n-1]r)*(Cnt-(n-1)*4096)/4096;
Δg=(m[n]g-m[n-1]g)*(Cnt-(n-1)*4096)/4096;
Δb=(m[n]b-m[n-1]b)*(Cnt-(n-1)*4096)/4096
Wherein, m [n] r, m [n] g, m [n] b represents the RGB component of the n-th intermediary image vegetarian refreshments respectively, 1<=n<=num – 1, the increment of the RGB linear interpolation of Δ r, Δ g, the Δ b pixel respectively between intermediary image vegetarian refreshments, the distance of the pixel between intermediary image vegetarian refreshments and first pixel is Cnt.
711: according to the distance of position at pixel above and the increment of described center linear interpolation in the pixel between two the described adjacent intermediary image vegetarian refreshments in this decompression and adjacent two intermediary image vegetarian refreshments, calculate the gray value of the pixel between described two adjacent intermediary image vegetarian refreshments successively;
The formula calculating the gray value of the pixel between intermediary image vegetarian refreshments is as follows:
R=sr+Δr;
G=sg+Δg;
B=sb+Δb;
Wherein, R, G, B are respectively the gray value of the pixel between the intermediary image vegetarian refreshments after decompress(ion).
712: the difference calculating the second gray value of last intermediary image vegetarian refreshments and the second gray value of last pixel, by described difference divided by described packed pixel point number, obtains the increment of the second linear interpolation;
Now, n=num, then have
Δr=(erm[n]r)*(Cnt-n*4096)/(L-n*4096);
Δg=(eg-m[n]g)*(Cnt-n*4096)/(L-n*4096);
Δb=(eb–m[n]b)*(Cnt–n*4096)/(L-n*4096);
Wherein, Δ r, Δ g, Δ b are respectively the increment of the RGB linear interpolation of the pixel between last pixel and last intermediary image vegetarian refreshments, and the pixel between last pixel and last intermediary image vegetarian refreshments and the distance of first pixel are Cnt.
713: pixel between last intermediary image vegetarian refreshments and second pixel described in decompressing according to this and the distance of last intermediary image vegetarian refreshments described and the increment of described second linear interpolation, calculate the gray value of the pixel described in this decompression described between last intermediary image vegetarian refreshments and described second pixel successively;
The formula calculating the gray value of the pixel between last intermediary image vegetarian refreshments and second pixel is as follows:
R=sr+Δr;
G=sg+Δg;
B=sb+Δb;
Wherein, R, G, B are respectively the gray value of the pixel between last the intermediary image vegetarian refreshments after decompress(ion) and second pixel.
714: terminate this and decompress.
The video decompression algorithm that the present invention adopts, the second gray value of first pixel and the second gray value of last pixel is utilized to calculate the increment of linear interpolation, original video data is reduced by the mode of linear interpolation, to obtain more image detail, improve the picture quality after decompress(ion).
Fig. 8 is the apparatus structure schematic diagram of a kind of video data compression provided in the embodiment of the present invention, and see Fig. 8, described device specifically comprises:
Acquisition module 81, for obtain video data image in the gray value of pixel;
Coding module 82, for the gray value according to pixel in described image, the multiple continuous image vegetarian refreshments identical to the first gray value in described image are encoded, obtain packed data, described packed data carries the first gray value in the gray value of described multiple continuous image vegetarian refreshments, this packed pixel selects the second gray value of first pixel and the second gray value of last pixel in number and described multiple continuous image vegetarian refreshments;
Described coding module 82, also for when each two field picture of described video data is all through overcompression, terminates video data compression.
Described coding module 82, specifically for the gray value according to each pixel in described image, determines multiple continuous image vegetarian refreshments that in described image, the first gray value is identical, and the number of described multiple continuous image vegetarian refreshments is within the scope of extended length bit requirements; Described multiple continuous image vegetarian refreshments is encoded to packed data.
Second gray value of described first pixel is become by the specific bit array in described first pixel, and the second gray value of last pixel described is become by the specific bit array in last pixel described.
Described packed data also carries the second gray value of the multiple intermediary image vegetarian refreshments in described multiple continuous image vegetarian refreshments.
Second gray value of described multiple intermediary image vegetarian refreshments is become by the specific bit array in the gray value of described intermediary image vegetarian refreshments.
The device of the video compression that the embodiment of the present invention provides, by the second gray value of the second gray value He last pixel that add first pixel in the compressed data, to obtain more image detail, make can reduce preferably when decompressing original video data, while effective reduction memory space and occupied bandwidth, ensure that the image after decompress(ion) can obtain better picture quality.
Fig. 9 is the device structure schematic diagram of a kind of video data compression provided in the embodiment of the present invention, and see Fig. 9, described equipment specifically comprises: processor 91;
Described processor 91 for obtain video data image in the gray value of pixel;
Described processor 91 is also for the gray value according to pixel in described image, the multiple continuous image vegetarian refreshments identical to the first gray value in described image are encoded, obtain packed data, described packed data carries the first gray value in the gray value of described multiple continuous image vegetarian refreshments, this packed pixel selects the second gray value of first pixel and the second gray value of last pixel in number and described multiple continuous image vegetarian refreshments;
Described processor 91, also for when each two field picture of described video data is all through overcompression, terminates video data compression.
Described processor 91, specifically for the gray value according to each pixel in described image, determines multiple continuous image vegetarian refreshments that in described image, the first gray value is identical, and the number of described multiple continuous image vegetarian refreshments is within the scope of extended length bit requirements;
Described processor 91 is specifically for being encoded to packed data by described multiple continuous image vegetarian refreshments.
Second gray value of described first pixel is become by the specific bit array in described first pixel, and the second gray value of last pixel described is become by the specific bit array in last pixel described.
Described packed data also carries the second gray value of the multiple intermediary image vegetarian refreshments in described multiple continuous image vegetarian refreshments.
Second gray value of described multiple intermediary image vegetarian refreshments is become by the specific bit array in the gray value of described intermediary image vegetarian refreshments.
The equipment of the video compression that the embodiment of the present invention provides, by the second gray value of the second gray value He last pixel that add first pixel in the compressed data, to obtain more image detail, make can reduce preferably when decompressing original video data, while effective reduction memory space and occupied bandwidth, ensure that the image after decompress(ion) can obtain better picture quality.
Figure 10 is the apparatus structure schematic diagram of a kind of video data decompressor provided in the embodiment of the present invention, and see Figure 10, described device specifically comprises:
Acquisition module 1001, for obtaining the packed data of video data, described packed data carries the first gray value, packed pixel selects number and the second gray value of first pixel in multiple continuous image vegetarian refreshments of compression and the second gray value of last pixel;
Described decompression module 1002 is also for obtaining the gray value of first pixel and last pixel in described packed data;
Described decompression module 1002 also for according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtains the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression;
Described decompression module 1002 also for when each packed data of described video data is all in time decompressing, terminates video data decompressor.
Described decompression module 1002, specifically for the second gray value according to described first gray value and described first pixel, calculates the gray value of described first pixel;
Described decompression module 1002, specifically for the second gray value according to described first gray value and last pixel described, calculates the gray value of last pixel.
Described decompression module 1002, specifically for the difference of the second gray value of the second gray value and last pixel described that calculate described first pixel, by described difference divided by described packed pixel point number, obtains the increment of linear interpolation;
Other pixels in decompressing according to this and the distance of described first pixel, and the increment of described linear interpolation, calculate the gray value of other pixels in this decompression described successively.
Described packed data also comprises: the second gray value of multiple intermediary image vegetarian refreshments.
Described decompression module 1002 is specifically for the difference of the second gray value of the second gray value and first intermediary image vegetarian refreshments that calculate described first pixel, by the packed pixel point number that described difference comprises divided by described first pixel and first intermediary image vegetarian refreshments, obtain the increment of the first linear interpolation;
Described decompression module 1002 also for pixel and the distance of described first pixel between described first pixel in decompressing according to this and intermediary image vegetarian refreshments and the increment of described first linear interpolation, calculates the gray value of the pixel described in this decompression described between first pixel and described intermediary image vegetarian refreshments successively;
Described decompression module 1002, also for calculating the difference of the second gray value of two adjacent intermediary image vegetarian refreshments, by the packed pixel point number of described difference divided by described two adjacent intermediary image vegetarian refreshments, obtains the increment of center linear interpolation;
Described decompression module 1002 also for according to the distance of position at pixel above and the increment of described center linear interpolation in the pixel between two the described adjacent intermediary image vegetarian refreshments in this decompression and adjacent two intermediary image vegetarian refreshments, calculates the gray value of the pixel between described two adjacent intermediary image vegetarian refreshments successively;
Described decompression module 1002 also for the difference of the second gray value of the second gray value He last pixel that calculate last intermediary image vegetarian refreshments, by described difference divided by described packed pixel point number, obtains the increment of the second linear interpolation;
Described decompression module 1002 also for pixel between last intermediary image vegetarian refreshments and second pixel and the distance of last intermediary image vegetarian refreshments described and the increment of described second linear interpolation described in decompressing according to this, calculates the gray value of the pixel described in this decompression described between last intermediary image vegetarian refreshments and described second pixel successively.
The device of the video decompression that the present invention adopts, by according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtain the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression, reduction original video data, to obtain more image detail, improve the picture quality after decompress(ion).
Figure 11 is the device structure schematic diagram of a kind of video data decompressor provided in the embodiment of the present invention, and see Figure 11, described equipment specifically comprises: processor 1101;
Described processor 1101 is for obtaining the packed data of video data, and described packed data carries the first gray value, packed pixel selects number and the second gray value of first pixel in multiple continuous image vegetarian refreshments of compression and the second gray value of last pixel;
Described processor 1101 is for obtaining the gray value of first pixel and last pixel in described packed data;
Described processor 1101, for according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtains the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression;
Described processor 1101, for when each packed data of described video data is all in time decompressing, terminates video data decompressor.
Described processor 1101, for the second gray value according to described first gray value and described first pixel, calculates the gray value of described first pixel;
Described processor 1101, for the second gray value according to described first gray value and last pixel described, calculates the gray value of last pixel.
Described processor 1101, for the difference of the second gray value of the second gray value and last pixel described that calculate described first pixel, by described difference divided by described packed pixel point number, obtains the increment of linear interpolation;
Described processor 1101 is for the distance according to other pixels in this decompression and described first pixel, and the increment of described linear interpolation, calculates the gray value of other pixels in this decompression described successively.
Described packed data also comprises: the second gray value of multiple intermediary image vegetarian refreshments.
Described processor 1101 is for the difference of the second gray value of the second gray value and first intermediary image vegetarian refreshments that calculate described first pixel, by the packed pixel point number that described difference comprises divided by described first pixel and first intermediary image vegetarian refreshments, obtain the increment of the first linear interpolation;
Described processor 1101, for pixel and the distance of described first pixel between described first pixel in decompressing according to this and intermediary image vegetarian refreshments and the increment of described first linear interpolation, calculates the gray value of the pixel described in this decompression described between first pixel and described intermediary image vegetarian refreshments successively;
Described processor 1101, for calculating the difference of the second gray value of two adjacent intermediary image vegetarian refreshments, by the packed pixel point number of described difference divided by described two adjacent intermediary image vegetarian refreshments, obtains the increment of center linear interpolation;
Described processor 1101, for according to the distance of position at pixel above and the increment of described center linear interpolation in the pixel between two the described adjacent intermediary image vegetarian refreshments in this decompression and adjacent two intermediary image vegetarian refreshments, calculates the gray value of the pixel between described two adjacent intermediary image vegetarian refreshments successively;
Described processor 1101, for the difference of the second gray value of the second gray value He last pixel that calculate last intermediary image vegetarian refreshments, by described difference divided by described packed pixel point number, obtains the increment of the second linear interpolation;
Described processor 1101, for pixel between last intermediary image vegetarian refreshments and second pixel and the distance of last intermediary image vegetarian refreshments described and the increment of described second linear interpolation described in decompressing according to this, calculates the gray value of the pixel described in this decompression described between last intermediary image vegetarian refreshments and described second pixel successively.
The equipment of the video decompression that the present invention adopts, by according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtain the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression, reduction original video data, to obtain more image detail, improve the picture quality after decompress(ion).
Figure 12 is the system configuration schematic diagram of a kind of video data compression and the decompression provided in the embodiment of the present invention, and see Figure 12, described system specifically comprises:
The equipment of video data compression as above and the equipment of video data decompressor as above.
The system of the video data compression that the present invention adopts and decompression, in video compression, the second gray value of first pixel and second gray value of last pixel of this coding is added in packed data, simultaneously, when decompression, utilize the second gray value of first pixel in packed data and the second gray value reduction original video data of last pixel, while effectively reducing memory space and occupied bandwidth by the flexible balance of compression algorithm and linear interpolation, ensure that the image after decompress(ion) can obtain better picture quality.
It should be noted that: the system of the video data compression that above-described embodiment provides and decompression is when carrying out compression and decompression to video data, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, internal structure by the system of video data compression and decompression is divided into different functional modules, to complete all or part of function described above.In addition, the embodiment of the method for the video data compression that above-described embodiment provides and decompression belongs to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (18)
1. a method for video data compression, is characterized in that, described method comprises:
Obtain the gray value of pixel in the image of video data;
According to the gray value of pixel in described image, the multiple continuous image vegetarian refreshments identical to the first gray value in described image are encoded, obtain packed data, described packed data carries the first gray value in the gray value of described multiple continuous image vegetarian refreshments, this packed pixel selects the second gray value of first pixel and the second gray value of last pixel in number and described multiple continuous image vegetarian refreshments, described first gray value is made up of an appointment high position for the gray value of pixel, second gray value of described first pixel is become by the specific bit array in described first pixel, second gray value of last pixel described is become by the specific bit array in last pixel described,
When each two field picture of described video data is all through overcompression, terminate video data compression.
2. method according to claim 1, is characterized in that, according to the gray value of pixel in described image, the multiple continuous image vegetarian refreshments identical to the first gray value in described image are encoded, and obtain packed data, specifically comprise:
According to the gray value of each pixel in described image, determine multiple continuous image vegetarian refreshments that in described image, the first gray value is identical, and the number of described multiple continuous image vegetarian refreshments is within the scope of extended length bit requirements;
Described multiple continuous image vegetarian refreshments is encoded to packed data.
3. the method according to any one of claim 1 or 2, is characterized in that, described packed data also carries the second gray value of the multiple intermediary image vegetarian refreshments in described multiple continuous image vegetarian refreshments.
4. method according to claim 3, is characterized in that, the second gray value of described multiple intermediary image vegetarian refreshments is become by the specific bit array in the gray value of described intermediary image vegetarian refreshments.
5. a method for video data decompressor, is characterized in that, described method comprises:
Obtain the packed data of video data, described packed data carries the first gray value, packed pixel selects number and the second gray value of first pixel in multiple continuous image vegetarian refreshments of compression and the second gray value of last pixel, described first gray value is made up of an appointment high position for the gray value of pixel, second gray value of described first pixel is become by the specific bit array in described first pixel, and the second gray value of last pixel described is become by the specific bit array in last pixel described;
Obtain the gray value of first pixel and last pixel in described packed data;
According to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtain the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression;
When each packed data of described video data is all in time decompressing, terminate video data decompressor.
6. method according to claim 5, is characterized in that, obtains the gray value of first pixel and last pixel in described packed data, specifically comprises:
According to the second gray value of described first gray value and described first pixel, calculate the gray value of described first pixel;
According to the second gray value of described first gray value and last pixel described, calculate the gray value of last pixel.
7. method according to claim 5, it is characterized in that, according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtain the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression, comprising:
Calculate the difference of the second gray value of described first pixel and the second gray value of last pixel described, by described difference divided by described packed pixel point number, obtain the increment of linear interpolation;
Other pixels in decompressing according to this and the distance of described first pixel, and the increment of described linear interpolation, calculate the gray value of other pixels in this decompression described successively.
8. the method according to any one of claim 5-7, is characterized in that, described packed data also comprises: the second gray value of multiple intermediary image vegetarian refreshments.
9. method according to claim 8, it is characterized in that, described according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtain the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression, comprising:
Calculate the difference of the second gray value of described first pixel and the second gray value of first intermediary image vegetarian refreshments, by the packed pixel point number that described difference comprises divided by described first pixel and first intermediary image vegetarian refreshments, obtain the increment of the first linear interpolation;
Described first pixel in decompressing according to this and pixel and the distance of described first pixel between intermediary image vegetarian refreshments and the increment of described first linear interpolation, calculate the gray value of the pixel described in this decompression described between first pixel and described intermediary image vegetarian refreshments successively;
Calculate the difference of the second gray value of two adjacent intermediary image vegetarian refreshments, by the packed pixel point number of described difference divided by described two adjacent intermediary image vegetarian refreshments, obtain the increment of center linear interpolation;
According to the distance of position at pixel above and the increment of described center linear interpolation in the pixel between two the described adjacent intermediary image vegetarian refreshments in this decompression and adjacent two intermediary image vegetarian refreshments, calculate the gray value of the pixel between described two adjacent intermediary image vegetarian refreshments successively;
Calculate the difference of the second gray value of last intermediary image vegetarian refreshments and the second gray value of last pixel, by described difference divided by described packed pixel point number, obtain the increment of the second linear interpolation;
Pixel between last intermediary image vegetarian refreshments and second pixel described in decompressing according to this and the distance of last intermediary image vegetarian refreshments described and the increment of described second linear interpolation, calculate the gray value of the pixel described in this decompression described between last intermediary image vegetarian refreshments and described second pixel successively.
10. a device for video data compression, is characterized in that, described device comprises:
Acquisition module, for obtain video data image in the gray value of pixel;
Coding module, for the gray value according to pixel in described image, the multiple continuous image vegetarian refreshments identical to the first gray value in described image are encoded, obtain packed data, described packed data carries the first gray value in the gray value of described multiple continuous image vegetarian refreshments, this packed pixel selects the second gray value of first pixel and the second gray value of last pixel in number and described multiple continuous image vegetarian refreshments, described first gray value is made up of an appointment high position for the gray value of pixel, second gray value of described first pixel is become by the specific bit array in described first pixel, second gray value of last pixel described is become by the specific bit array in last pixel described,
Described coding module, also for when each two field picture of described video data is all through overcompression, terminates video data compression.
11. devices according to claim 10, it is characterized in that, described coding module is specifically for the gray value according to each pixel in described image, determine multiple continuous image vegetarian refreshments that in described image, the first gray value is identical, and the number of described multiple continuous image vegetarian refreshments is within the scope of extended length bit requirements; Described coding module is also for being encoded to packed data by described multiple continuous image vegetarian refreshments.
12. devices according to any one of claim 10 or 11, it is characterized in that, described packed data also carries the second gray value of the multiple intermediary image vegetarian refreshments in described multiple continuous image vegetarian refreshments.
13. devices according to claim 12, is characterized in that, the second gray value of described multiple intermediary image vegetarian refreshments is become by the specific bit array in the gray value of described intermediary image vegetarian refreshments.
The device of 14. 1 kinds of video data decompressor, is characterized in that, described device comprises:
Packed data acquisition module, for obtaining the packed data of video data, described packed data carries the first gray value, packed pixel selects number and the second gray value of first pixel in multiple continuous image vegetarian refreshments of compression and the second gray value of last pixel, described first gray value is made up of an appointment high position for the gray value of pixel, second gray value of described first pixel is become by the specific bit array in described first pixel, and the second gray value of last pixel described is become by the specific bit array in last pixel described;
Decompression module is also for obtaining the gray value of first pixel and last pixel in described packed data;
Described decompression module also for according to the first gray value in described packed data, packed pixel point number, the second gray value of first pixel and the second gray value of last pixel, obtains the gray value of other pixels in multiple continuous image vegetarian refreshments of described compression;
Described decompression module, also for when each packed data of described video data is all in time decompressing, terminates video data decompressor.
15. devices according to claim 14, is characterized in that, described decompression module, specifically for the second gray value according to described first gray value and described first pixel, calculates the gray value of described first pixel;
Described decompression module also for the second gray value according to described first gray value and last pixel described, calculates the gray value of last pixel.
16. devices according to claim 15, it is characterized in that, described decompression module is specifically for the difference of the second gray value of the second gray value and last pixel described that calculate described first pixel, by described difference divided by described packed pixel point number, obtain the increment of linear interpolation;
Described decompression module is also for the distance according to other pixels in this decompression and described first pixel, and the increment of described linear interpolation, calculates the gray value of other pixels in this decompression described successively.
17. devices according to any one of claim 14-16, it is characterized in that, described packed data also comprises: the second gray value of multiple intermediary image vegetarian refreshments.
18. devices according to claim 17, it is characterized in that, described decompression module is specifically for the difference of the second gray value of the second gray value and first intermediary image vegetarian refreshments that calculate described first pixel, by the packed pixel point number that described difference comprises divided by described first pixel and first intermediary image vegetarian refreshments, obtain the increment of the first linear interpolation;
Described decompression module also for pixel and the distance of described first pixel between described first pixel in decompressing according to this and intermediary image vegetarian refreshments and the increment of described first linear interpolation, calculates the gray value of the pixel described in this decompression described between first pixel and described intermediary image vegetarian refreshments successively;
Described decompression module, also for calculating the difference of the second gray value of two adjacent intermediary image vegetarian refreshments, by the packed pixel point number of described difference divided by described two adjacent intermediary image vegetarian refreshments, obtains the increment of center linear interpolation;
Described decompression module also for according to the distance of position at pixel above and the increment of described center linear interpolation in the pixel between two the described adjacent intermediary image vegetarian refreshments in this decompression and adjacent two intermediary image vegetarian refreshments, calculates the gray value of the pixel between described two adjacent intermediary image vegetarian refreshments successively;
Described decompression module also for the difference of the second gray value of the second gray value He last pixel that calculate last intermediary image vegetarian refreshments, by described difference divided by described packed pixel point number, obtains the increment of the second linear interpolation;
Described decompression module also for pixel between last intermediary image vegetarian refreshments and second pixel and the distance of last intermediary image vegetarian refreshments described and the increment of described second linear interpolation described in decompressing according to this, calculates the gray value of the pixel described in this decompression described between last intermediary image vegetarian refreshments and described second pixel successively.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210476583.6A CN102984517B (en) | 2012-11-21 | 2012-11-21 | The method of video data compression and decompression, device, equipment and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210476583.6A CN102984517B (en) | 2012-11-21 | 2012-11-21 | The method of video data compression and decompression, device, equipment and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102984517A CN102984517A (en) | 2013-03-20 |
CN102984517B true CN102984517B (en) | 2016-03-30 |
Family
ID=47858206
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210476583.6A Active CN102984517B (en) | 2012-11-21 | 2012-11-21 | The method of video data compression and decompression, device, equipment and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102984517B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104301726B (en) * | 2014-09-15 | 2018-04-03 | 成都智明达电子股份有限公司 | A kind of Lossless Image Compression Algorithm and the method for decompression |
CN104464594B (en) * | 2014-12-16 | 2017-02-22 | 京东方科技集团股份有限公司 | Method and device for transmitting display data and method and device for driving display panel |
JP6855722B2 (en) * | 2016-09-21 | 2021-04-07 | 富士ゼロックス株式会社 | Image processing equipment and programs |
CN110060311B (en) * | 2018-09-09 | 2020-03-20 | 深圳硅基仿生科技有限公司 | Image processing device of retina stimulator |
CN109672923B (en) * | 2018-12-17 | 2021-07-02 | 龙迅半导体(合肥)股份有限公司 | Data processing method and device |
GB2611864B (en) * | 2019-08-23 | 2023-12-06 | Imagination Tech Ltd | Random accessible image data compression |
CN111766471A (en) * | 2020-06-28 | 2020-10-13 | 河北旭辉电气股份有限公司 | Power waveform compression algorithm |
CN116405685B (en) * | 2023-06-08 | 2023-08-22 | 安元科技股份有限公司 | Image data compression method applied to test process record |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1716998A (en) * | 2004-06-14 | 2006-01-04 | 奥林巴斯株式会社 | Picture compressor and picture reproducer |
CN102281469A (en) * | 2011-08-31 | 2011-12-14 | 深圳市茁壮网络股份有限公司 | Processing method of bitmap information and set top box |
-
2012
- 2012-11-21 CN CN201210476583.6A patent/CN102984517B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1716998A (en) * | 2004-06-14 | 2006-01-04 | 奥林巴斯株式会社 | Picture compressor and picture reproducer |
CN102281469A (en) * | 2011-08-31 | 2011-12-14 | 深圳市茁壮网络股份有限公司 | Processing method of bitmap information and set top box |
Also Published As
Publication number | Publication date |
---|---|
CN102984517A (en) | 2013-03-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102984517B (en) | The method of video data compression and decompression, device, equipment and system | |
US9978156B2 (en) | High-throughput image and video compression | |
FI107495B (en) | Method and arrangement for reducing the volume or speed of a coded digital video bit stream | |
CN102668558B (en) | Wireless display encoder architecture | |
CN102017638A (en) | Video coding-decoding device | |
CN103581678B (en) | To improve the method and system of decoder capabilities by using multiple decoder channels | |
TWI743098B (en) | Apparatus and methods for adaptive calculation of quantization parameters in display stream compression | |
CN105191304A (en) | Image encoding method and apparatus for performing bit-plane scanning coding upon pixel data and related image decoding method and apparatus | |
KR20210153060A (en) | Video encoder rate control | |
CN109618157A (en) | A kind of system for implementing hardware and method of video display stream compressed encoding | |
CN103229508A (en) | Image encoding device, and image encoding method | |
CN101796809B (en) | Method of transmission of a video sequence of images that have to be color transformed using lut | |
CN108322749A (en) | The coefficient optimization method of RDOQ, the accelerating method and device of RDOQ | |
TW202116072A (en) | Tensor-product b-spline predictor | |
CN106817584A (en) | A kind of MJPEG compressions implementation method and FPGA based on FPGA | |
CN108881915A (en) | Device and method based on DSC coding techniques video playing | |
CN110012292A (en) | Method and apparatus for compressed video data | |
US11715239B2 (en) | Systems and methods for scalable throughput entropy coders | |
CN103237211B (en) | A kind of method of the video sub-pix brightness interpolating based on FPGA and device thereof | |
CN203206399U (en) | FPGA-based video sub-pixel luminance interpolation device | |
CN106385556B (en) | A kind of arrow load ccd image acquisition compressibility | |
US20150163496A1 (en) | Method and apparatus for performing compression of image data | |
CN103247344B (en) | Packet assembling device and data packing method | |
JP2012191362A (en) | Image processing system and image processing method | |
US20140098852A1 (en) | Compression bandwidth overflow management using auxiliary control channel |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210122 Address after: Room 400, building 5, No.11 Deshengmenwai street, Xicheng District, Beijing 100032 (Desheng Park) Patentee after: Migu cultural technology Co., Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd. |