CN105791819A - Frame compression method for image and decompression method and device for image - Google Patents

Frame compression method for image and decompression method and device for image Download PDF

Info

Publication number
CN105791819A
CN105791819A CN201410836815.3A CN201410836815A CN105791819A CN 105791819 A CN105791819 A CN 105791819A CN 201410836815 A CN201410836815 A CN 201410836815A CN 105791819 A CN105791819 A CN 105791819A
Authority
CN
China
Prior art keywords
pixel
current line
bit length
bit
organizing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410836815.3A
Other languages
Chinese (zh)
Other versions
CN105791819B (en
Inventor
旷开智
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Actions Technology Co Ltd
Original Assignee
Juxin (zhuhai) Science & Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Juxin (zhuhai) Science & Technology Co Ltd filed Critical Juxin (zhuhai) Science & Technology Co Ltd
Priority to CN201410836815.3A priority Critical patent/CN105791819B/en
Publication of CN105791819A publication Critical patent/CN105791819A/en
Application granted granted Critical
Publication of CN105791819B publication Critical patent/CN105791819B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a frame compression method for an image and a decompression method and device for the image. The frame compression method comprises the following steps of starting with the second row of pixel points of the image and carrying out the following operations line by line: determining a predicted pixel value of each pixel point of the current row according to the pixel values of the pixel points of the previous row; determining a difference between the predicted pixel value and the pixel value of each pixel point of the current row; determining a bit depth of each pixel point of the current row; grouping the pixel points of the current row and determining the bit lengths of each group of pixel points; and if the sum of the bit lengths of each group of pixel points is not greater than a bit length threshold, taking the bit depths and the differences of each group of pixel points as compressed data of the group of pixel points and packaging to a compressed data packet. According to the embodiments of the invention, the row is taken as a unit to carry out frame compression, so that the consumption of hardware resources is reduced. The operand for computing the bit depths is far less than the operand of an entropy encoding method, so that the coding efficiency is high.

Description

The frame compression method of a kind of image, the decompression method of image and device
Technical field
The present invention relates to technical field of image processing, particularly relate to the frame compression method of a kind of image, the decompression method of image and device.
Background technology
Frame compression (FrameCompress) is a kind of mode that in embedded hardware system, view data is carried out lossless compress by each image processing equipment (master).From frame buffer (buffer), read view data be compressed, then the view data after compression is stored in Double Data Rate synchronous DRAM (DDR), through compression so that each image procossing master accesses the readwrite bandwidth minimizing of view data from DDR in system.
The image procossing master relating to frame squeeze operation in embedded system has Video Codec (VideoCodec), image processor (GPU), image-signal processor (ISP) and display engine (DisplayEngine).Wherein, Video Codec and image processor press block (block) for unit access view data, and it is that unit accesses view data that image-signal processor and display engine press row (line).
In existing frame compress mode, entropy code method is adopted to be encoded, for instance Huffman compiling method etc..Entropy code method, in units of block, carries out picture coding, therefore all needs to consume the hardware resources such as a large amount of buffer memorys at encoding and decoding end, and code efficiency is relatively low.
Summary of the invention
It is an object of the invention to provide the frame compression method of a kind of image, the decompression method of image and device, the code efficiency to solve existing frame compress mode is low, it is necessary to the problem consuming great amount of hardware resources.
It is an object of the invention to be achieved through the following technical solutions:
A kind of frame compression method of image, including: the pixel value of the first row pixel of image is sent as the coding data of the first row pixel, and sends the unpressed instruction information of current line pixel point;From the second row pixel of image, proceed as follows line by line:
Pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line;
Determine the predicted pixel values of each pixel of current line and the difference of its pixel value;
Determine that the bit-depth of each pixel of current line, described bit-depth refer to for representing the number of bits that the described difference needs of pixel take;
Current line pixel point is grouped, and determines the product that the bit length often organizing pixel, described bit length are the maximal bit degree of depth in one group of pixel and the quantity of this group pixel;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, as the compression data of this group pixel, the bit-depth often organizing pixel and described difference are packaged as compressed data packets, and described bit length threshold value is for representing the number of bits that the pixel value needs of current line pixel point take;Send the compressed data packets of current line and the instruction information of instruction current line pixel point compression;
If respectively organizing the bit length sum of pixel more than bit length threshold value, the pixel value of current line pixel point is sent as the coding data of current line, and send the instruction unpressed instruction information of current line pixel point.
Preferably, the pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line, including: the pixel value according to previous row pixel, the predicted pixel values of each pixel of current line is determined according at least two predictive mode;
Determine the predicted pixel values of each pixel of current line and the difference of pixel value, comprise determining that the difference of predicted pixel values that each pixel of current line determines according to different predictive modes and pixel value;
Determine the bit-depth of each pixel of current line, comprise determining that each pixel of current line bit-depth under different predictive modes;
Determine the bit length often organizing pixel, comprise determining that often group pixel bit length under different predictive modes;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, the bit-depth often organizing pixel and described difference are packaged as compressed data packets as the compression data of this group pixel, including: select the minima of each bit length sum organizing pixel under same prediction mode, if described minima is not more than bit length threshold value, being packaged as compressed data packets using often organizing pixel bit-depth under minimum predictive mode and the described difference compression data as this group pixel, described minimum predictive mode is the predictive mode that described minima is corresponding.
Based on above-mentioned arbitrary frame compression method embodiment, preferably, current line pixel point is grouped, and determines the bit length often organizing pixel, including: according at least two group mode, current line pixel point is grouped, and determines the bit length often organizing pixel under every kind of group mode;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, the bit-depth often organizing pixel and described difference are packaged as compressed data packets as the compression data of this group pixel, including: select the minima of each bit length sum organizing pixel under same packets pattern, if described minima is not more than bit length threshold value, as the compression data of this group pixel, the bit-depth often organizing pixel under minimum packets pattern and described difference are packaged as compressed data packets, and described minimum packets pattern is the group mode that described minima is corresponding.
Preferably, if the bit length sum respectively organizing pixel is not more than bit length threshold value, send the compressed data packets of current line and the instruction information of instruction current line pixel point compression, including:
Send the instruction information of the group mode that the compressed data packets of current line, the instruction information of instruction current line pixel point compression, the instruction information indicating the predictive mode of current line employing and instruction current line adopt.
A kind of decompression method of image, including, each row pixel to image, proceed as follows line by line:
If receiving the instruction unpressed instruction information of current line pixel point, using pixel value as the pixel of current line of the coding data of the pixel of current line that receive;
If receiving the instruction information of instruction current line pixel point compression, according to each bit-depth organizing pixel carried in each compressed data packets of current line, from each compressed data packets of current line, obtain the predicted pixel values of each pixel of current line and the difference of pixel value respectively;Pixel value according to described difference and previous row pixel, it is determined that the pixel value of each pixel of current line, described bit-depth refers to for representing the number of bits that the described difference needs of pixel take.
Preferably, the pixel value according to described difference and previous row pixel, it is determined that the pixel value of each pixel of current line, including:
Instruction information according to the predictive mode that the instruction current line received adopts, it is determined that the predictive mode that current line adopts;
According to described predictive mode, the pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line;
According to described difference and described predicted pixel values, it is determined that the pixel value of each pixel of current line pixel point.
Based on above-mentioned any decompression method embodiment, it is preferred that obtaining from each compressed data packets of current line before the predicted pixel values of each pixel of current line and the difference of pixel value respectively, the method also includes:
Instruction information according to the group mode that the instruction current line received adopts, it is determined that the group mode that current line adopts;
According to the group mode that current line adopts, obtain each compressed data packets of current line pixel point.
Based on the inventive concept same with method, the embodiment of the present invention also provides for the frame compressor of a kind of image, including:
First compression processing module, for being sent as the coding data of the first row pixel by the pixel value of the first row pixel of image, and sends the unpressed instruction information of current line pixel point;
Second compression processing module, for, from the second row pixel of image, proceeding as follows line by line:
Pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line;
Determine the predicted pixel values of each pixel of current line and the difference of its pixel value;
Determine that the bit-depth of each pixel of current line, described bit-depth refer to for representing the number of bits that the described difference needs of pixel take;
Current line pixel point is grouped, and determines the product that the bit length often organizing pixel, described bit length are the maximal bit degree of depth in one group of pixel and the quantity of this group pixel;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, as the compression data of this group pixel, the bit-depth often organizing pixel and described difference are packaged as compressed data packets, and described bit length threshold value is for representing the number of bits that the pixel value needs of current line pixel point take;Send the compressed data packets of current line and the instruction information of instruction current line pixel point compression;
If respectively organizing the bit length sum of pixel more than bit length threshold value, the pixel value of current line pixel point is sent as the coding data of current line, and send the instruction unpressed instruction information of current line pixel point.
Preferably, the second compression processing module is used for:
Pixel value according to previous row pixel, determines the predicted pixel values of each pixel of current line according at least two predictive mode;
Determine the difference of predicted pixel values that each pixel of current line determines according to different predictive modes and pixel value;
Determine each pixel of current line bit-depth under different predictive modes;
Determine often group pixel bit length under different predictive modes;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, select the minima of each bit length sum organizing pixel under same prediction mode, if described minima is not more than bit length threshold value, being packaged as compressed data packets using often organizing pixel bit-depth under minimum predictive mode and the described difference compression data as this group pixel, described minimum predictive mode is the predictive mode that described minima is corresponding;
If respectively organizing the bit length sum of pixel more than bit length threshold value, the pixel value of current line pixel point is sent as the coding data of current line, and send the instruction unpressed instruction information of current line pixel point.
Based on above-mentioned any device embodiment, preferably, current line pixel point is grouped, and when determining the bit length often organizing pixel, described second compression processing module is used for: according at least two group mode, current line pixel point is grouped, and determines the bit length often organizing pixel under every kind of group mode;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, using the bit-depth often organizing pixel and described difference as the compression data of this group pixel be packaged as compressed data packets time, described second compression processing module is used for: select the minima of each bit length sum organizing pixel under same packets pattern, if described minima is not more than bit length threshold value, the bit-depth often organizing pixel under minimum packets pattern and described difference are packaged as compressed data packets as the compression data of this group pixel, described minimum packets pattern is the group mode that described minima is corresponding.
Based on above-mentioned any device embodiment, preferably, if the bit length sum respectively organizing pixel is not more than bit length threshold value, when the compressed data packets sending current line and the instruction information indicating the compression of current line pixel point, described second compression processing module is used for:
Send the instruction information of the group mode that the compressed data packets of current line, the instruction information of instruction current line pixel point compression, the instruction information indicating the predictive mode of current line employing and instruction current line adopt.
Based on the inventive concept same with method, the embodiment of the present invention also provides for the decompressing device of a kind of image, including:
First decompression module, when being used for receiving the unpressed instruction information of instruction current line pixel point, using pixel value as the pixel of current line of the coding data of the pixel of current line that receive;
Second decompression module, during for receiving the instruction information indicating the compression of current line pixel point, according to each bit-depth organizing pixel carried in each compressed data packets of current line, from each compressed data packets of current line, obtain the predicted pixel values of each pixel of current line and the difference of pixel value respectively;Pixel value according to described difference and previous row pixel, it is determined that the pixel value of each pixel of current line, described bit-depth refers to for representing the number of bits that the described difference needs of pixel take.
Preferably, the pixel value according to described difference and previous row pixel, it is determined that during the pixel value of each pixel of current line, described second decompression module is used for:
Instruction information according to the predictive mode that the instruction current line received adopts, it is determined that the predictive mode that current line adopts;
According to described predictive mode, the pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line;
According to described difference and described predicted pixel values, it is determined that the pixel value of each pixel of current line pixel point.
Based on above-mentioned any device embodiment, it is preferred that obtaining from each compressed data packets of current line before the predicted pixel values of each pixel of current line and the difference of pixel value respectively, described second decompression module is additionally operable to:
Instruction information according to the group mode that the instruction current line received adopts, it is determined that the group mode that current line adopts;
According to the group mode that current line adopts, obtain each compressed data packets of current line pixel point.
The technical scheme that the embodiment of the present invention provides, carries out frame compression with behavior unit, only needs a row cache for preserving the pixel value of lastrow pixel, therefore reduce the consumption to hardware resource in compression process.And when each bit length sum organizing pixel of current line is not more than bit length threshold value, the bit-depth often organizing pixel and above-mentioned difference are packaged as compressed data packets as the compression data of this group pixel.Operand owing to calculating bit-depth is far smaller than the operand of entropy code method, and therefore the code efficiency of the frame compression method that the embodiment of the present invention provides is high.
Accompanying drawing explanation
A kind of frame compression method flow chart that Fig. 1 provides for the embodiment of the present invention;
A kind of decompression method flow chart that Fig. 2 provides for the embodiment of the present invention;
The frame compressor schematic diagram that Fig. 3 provides for the embodiment of the present invention;
The decompressing device schematic diagram that Fig. 4 provides for the embodiment of the present invention.
Detailed description of the invention
The core concept of the embodiment of the present invention is in that, with behavior unit, image is carried out frame compression.The first row pixel of image is not compressed, the direct coding data (namely compressing data) using the pixel value of each pixel as this row pixel, from the second row pixel, the bit-depth of each pixel and difference are packed as compression data.
Below in conjunction with accompanying drawing, the technical scheme that the embodiment of the present invention is provided is described in detail.
The frame compression method of the image that the embodiment of the present invention provides, sends the pixel value of the first row pixel of image as the coding data of the first row pixel, and sends the unpressed instruction information of current line pixel point;From the second row pixel of image, carry out operation as shown in Figure 1 line by line, specific as follows:
Step 100, pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line.
Step 110, determine the predicted pixel values of each pixel of current line and the difference of its pixel value.
Step 120, determine the bit-depth of each pixel of current line.
Wherein, bit-depth refers to for representing the number of bits that the described difference needs of pixel take.
Step 130, current line pixel point is grouped, and determines the bit length often organizing pixel.
Wherein, bit length is the product of the maximal bit degree of depth in one group of pixel and the quantity of this group pixel.
If the bit length sum that step 140 respectively organizes pixel is not more than bit length threshold value, the bit-depth often organizing pixel and above-mentioned difference are packaged as compressed data packets as the compression data of this group pixel, and send the compressed data packets of current line and the instruction information of instruction current line pixel point compression.
If step 150 respectively organizes the bit length sum of pixel more than bit length threshold value, the pixel value of current line pixel point is sent as the coding data of current line, and send the instruction unpressed instruction information of current line pixel point.
That is, if the bit length sum of each group pixel is more than bit length threshold value, then this row pixel is not carried out frame compression process.
Wherein, bit length threshold value is for representing the number of bits that the pixel value needs of current line pixel point take.
The technical scheme that the embodiment of the present invention provides, carries out frame compression with behavior unit, only needs a row cache for preserving the pixel value of lastrow pixel, therefore reduce the consumption to hardware resource in compression process.And when each bit length sum organizing pixel of current line is not more than bit length threshold value, the bit-depth often organizing pixel and above-mentioned difference are packaged as compressed data packets as the compression data of this group pixel.Operand owing to calculating bit-depth is far smaller than the operand of entropy code method, and therefore the code efficiency of the frame compression method that the embodiment of the present invention provides is high.
In the embodiment of the present invention, it is determined that the predictive mode of the predicted pixel values of each pixel of current line has multiple, enumerate wherein several below.
Predictive mode one:
This predictive mode is properly termed as again vertical prediction mode.By the pixel value of previous row nth pixel point as the predicted pixel values of current line nth pixel point.
Predictive mode two:
This predictive mode is properly termed as again mean prediction pattern.By the average of pixel value of a~b pixel of previous row as the predicted pixel values of c pixel of current line.Wherein, b > a, b >=c and c >=a.
Predictive mode three:
This predictive mode is properly termed as again upper left predictive mode.As the pixel value of b pixel of current line after computing weighted by the pixel value of a~b pixel of previous row.Wherein, b > a.
Predictive mode four:
This predictive mode is properly termed as again upper right predictive mode.As the pixel value of a pixel of current line after computing weighted by the pixel value of a~b pixel of previous row.Wherein, b > a.
The technical scheme that the embodiment of the present invention provides, it is possible to adopt at least one predictive mode to determine the predicted pixel values of each pixel of current line.
If adopt N (N be not less than 2 integer) plant predictive mode and determine the predicted pixel values of each pixel of current line, for each pixel, N number of predicted pixel values will be obtained.Accordingly, when determining the difference of the predicted pixel values of each pixel of current line and pixel value, for each pixel, N number of difference will be obtained;When determining the bit-depth of each pixel of current line, for each pixel, N number of bit-depth will be obtained;When determining the bit length often organizing pixel, for often organizing pixel, N number of bit length will be obtained;Using the bit-depth often organizing pixel as the compression data of this group pixel be packaged as compressed data packets time, specifically select the minima of each bit length sum organizing pixel under same prediction mode, it is packaged as compressed data packets using often organizing the pixel bit-depth under the minimum predictive mode compression data as this group pixel, wherein, minimum predictive mode is the predictive mode that described minima is corresponding.
In the embodiment of the present invention, it is possible to according at least one group mode, current line pixel point is grouped.
Wherein, it is distinctive in that between different grouping pattern that packet count is different.
If current line pixel point is grouped according at least two group mode, it is determined that often organize the bit length of pixel under every kind of group mode;Select the minima of each bit length sum organizing pixel under same packets pattern, if this minima is not more than setting threshold value, the bit-depth often organizing pixel under minimum packets pattern is packaged as compressed data packets as the compression data of this group pixel, wherein, minimum packets pattern is the group mode that this minima is corresponding.
In the embodiment of the present invention, if the predictive mode adopting two or more determines the predicted pixel values of pixel, and according to two kinds or two or more group modes, one-row pixels point is grouped, according to the one-row pixels point finally given bit length under different predictive modes and group mode, select optimum predictive mode and group mode (i.e. minimum predictive mode and minimum packets pattern), thus improve compression performance.
Accordingly, when the instruction information that the compressed data packets and instruction current line pixel point that send current line are compressed, also send the instruction information of the predictive mode that instruction current line adopts and/or the instruction information of the group mode of instruction current line employing.
The technical scheme that the embodiment of the present invention provides is particularly suited for the application scenarios being written and read with behavior unit.Such as, the raw reading and writing data of ISP, reading and writing data of DisplayEngine etc..
The embodiment of the present invention also provides for the decompression method of a kind of image, each row pixel to image, performs the operation shown in Fig. 2 line by line, specific as follows:
If step 200 receives the instruction unpressed instruction information of current line pixel point, using pixel value as the pixel of current line of the coding data of the pixel of current line that receive.
If step 210 receives the instruction information of instruction current line pixel point compression, according to each bit-depth organizing pixel carried in each compressed data packets of current line, from each compressed data packets of current line, obtain the predicted pixel values of each pixel of current line and the difference of its pixel value respectively;Pixel value according to described difference and previous row pixel, it is determined that the pixel value of each pixel of current line, described bit-depth refers to for representing the number of bits that the described difference needs of pixel take.
The technical scheme that the embodiment of the present invention provides, carries out the decompression of image, only needs a row cache for preserving the pixel value of lastrow pixel, therefore reduce the consumption to hardware resource in decompression process with behavior unit.And each bit length organizing pixel according to current line decompresses the pixel value obtaining pixel, its operand is far smaller than the operand of entropy code method, and therefore the code efficiency of the image expansion method that the embodiment of the present invention provides is high.
Preferably, the pixel value according to described difference and previous row pixel, it is determined that the pixel value of each pixel of current line, including:
Instruction information according to the predictive mode that the instruction current line received adopts, it is determined that the predictive mode that current line adopts;
According to described predictive mode, the pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line;
According to described difference and described predicted pixel values, it is determined that the pixel value of each pixel of current line pixel point.
Based on above-mentioned any decompression method embodiment, it is preferred that obtaining from each compressed data packets of current line before the predicted pixel values of each pixel of current line and the difference of pixel value respectively, the method also includes:
Instruction information according to the group mode that the instruction current line received adopts, it is determined that the group mode that current line adopts;
According to the group mode that current line adopts, obtain each compressed data packets of current line pixel point.
Processing for the frame compression of ISP below, the technical scheme that the embodiment of the present invention is provided is described in detail.
In this embodiment, each row of image has 32 pixels, has four kinds of predictive modes, four kinds of group modes.Wherein, vertical prediction mode, mean prediction pattern, upper left predictive mode and the upper right predictive mode that these four predictive mode is respectively above-mentioned;These four group mode is respectively as follows: and one-row pixels point is divided into 8 groups, and the group mode that one-row pixels point is divided into acquiescence is 4 groups, and one-row pixels point is divided into 2 groups, and one-row pixels point is divided into one group.Wherein default packet pattern is for be divided into 4 groups by one-row pixels point.Concrete processing mode is as follows.
It is successively read the raw data of the one-row pixels point of image.If the first row pixel, then the raw data of this row pixel are sent to DDR preservation as coding data, and unpressed for this row pixel of instruction instruction information are sent to DDR preservation, if non-the first row pixel, carry out according to following operation:
It is respectively adopted the prediction data (i.e. predicted pixel values) that above-mentioned four kinds of prediction mode obtain each pixel of current line, and then calculating obtains under different predictive mode, the difference of the prediction data of each pixel and raw data;
Determine under different predictive mode, the bit-depth of each pixel;
According to above-mentioned four kinds of group modes, respectively current line pixel point is grouped;
Calculate under each group mode, each predictive mode respectively, each bit length organizing pixel;
Wherein, under each predictive mode, one group of pixel has four bit lengths, predictive modes corresponding different respectively.
Calculate under each group mode, under each predictive mode, each bit length sum organizing pixel;
The minima of bit length sum and bit length threshold value are compared, if this minima is not more than bit length threshold value, then according to group mode corresponding to this minima and predictive mode, current line pixel point is carried out packing process, otherwise, the raw value of current line pixel point is sent to DDR preservation as coding data, and unpressed for the raw value of instruction current line pixel point instruction information transmission is preserved to DDR.
Assuming that group mode corresponding to minima is for be divided into 4 groups by one-row pixels point, corresponding predictive mode is vertical prediction mode.For the difference respectively (5,1,0,2,4,1,7,6) of 8 pixels of first group, raw data and prediction data, bit-depth is (3,1,1,2,3,1,3,3) respectively.
The maximal bit degree of depth of this group pixel is 3, and pixel quantity is 8, and therefore, the bit length of this group pixel is 3*8=24bit.
Wherein, when calculating bit-depth, consider compression efficiency, if bit-depth exceedes a certain threshold value (such as 6bit), it is believed that this difference needs to use raw compress mode (not namely being compressed), so when calculating bit-depth, if bit-depth is more than 6, then directly represent with 7, so, bit-depth this parameter information 3bit describes just much of that to (the binary system scope 000~111 that 3 bit can represent, the expression bit degree of depth is from 0~7 respectively).
Based on the inventive concept same with method, the embodiment of the present invention also provides for the frame compressor of a kind of image, as it is shown on figure 3, include:
First compression processing module 301, for being sent as the coding data of the first row pixel by the pixel value of the first row pixel of image, and sends the unpressed instruction information of current line pixel point;
Second compression processing module 302, for, from the second row pixel of image, proceeding as follows line by line:
Pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line;
Determine the predicted pixel values of each pixel of current line and the difference of its pixel value;
Determine that the bit-depth of each pixel of current line, described bit-depth refer to for representing the number of bits that the described difference needs of pixel take;
Current line pixel point is grouped, and determines the product that the bit length often organizing pixel, described bit length are the maximal bit degree of depth in one group of pixel and the quantity of this group pixel;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, as the compression data of this group pixel, the bit-depth often organizing pixel and described difference are packaged as compressed data packets, and described bit length threshold value is for representing the number of bits that the pixel value needs of current line pixel point take;Send the compressed data packets of current line and the instruction information of instruction current line pixel point compression;
If respectively organizing the bit length sum of pixel more than bit length threshold value, the pixel value of current line pixel point is sent as the coding data of current line, and send the instruction unpressed instruction information of current line pixel point.
Based on the inventive concept same with method, the embodiment of the present invention also provides for the decompressing device of a kind of image, as shown in Figure 4, and including:
First decompression module 401, when being used for receiving the unpressed instruction information of instruction current line pixel point, using pixel value as the pixel of current line of the coding data of the pixel of current line that receive;
Second decompression module 402, during for receiving the instruction information indicating the compression of current line pixel point, according to each bit-depth organizing pixel carried in each compressed data packets of current line, from each compressed data packets of current line, obtain the predicted pixel values of each pixel of current line and the difference of pixel value respectively;Pixel value according to described difference and previous row pixel, it is determined that the pixel value of each pixel of current line, described bit-depth refers to for representing the number of bits that the described difference needs of pixel take.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, complete software implementation or the embodiment in conjunction with software and hardware aspect.And, the present invention can adopt the form at one or more upper computer programs implemented of computer-usable storage medium (including but not limited to disk memory, CD-ROM, optical memory etc.) wherein including computer usable program code.
The present invention is that flow chart and/or block diagram with reference to method according to embodiments of the present invention, equipment (system) and computer program describe.It should be understood that can by the combination of the flow process in each flow process in computer program instructions flowchart and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can be provided to produce a machine to the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device so that the instruction performed by the processor of computer or other programmable data processing device is produced for realizing the device of function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and can guide in the computer-readable memory that computer or other programmable data processing device work in a specific way, the instruction making to be stored in this computer-readable memory produces to include the manufacture of command device, and this command device realizes the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices provides for realizing the step of function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art are once know basic creative concept, then these embodiments can be made other change and amendment.So, claims are intended to be construed to include preferred embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, the present invention can be carried out various change and modification without deviating from the spirit and scope of the present invention by those skilled in the art.So, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (14)

1. the frame compression method of an image, it is characterised in that the pixel value of the first row pixel of image is sent as the coding data of the first row pixel, and send the unpressed instruction information of current line pixel point;From the second row pixel of image, proceed as follows line by line:
Pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line;
Determine the predicted pixel values of each pixel of current line and the difference of its pixel value;
Determine that the bit-depth of each pixel of current line, described bit-depth refer to for representing the number of bits that the described difference needs of pixel take;
Current line pixel point is grouped, and determines the product that the bit length often organizing pixel, described bit length are the maximal bit degree of depth in one group of pixel and the quantity of this group pixel;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, as the compression data of this group pixel, the bit-depth often organizing pixel and described difference are packaged as compressed data packets, and described bit length threshold value is for representing the number of bits that the pixel value needs of current line pixel point take;Send the compressed data packets of current line and the instruction information of instruction current line pixel point compression;
If respectively organizing the bit length sum of pixel more than bit length threshold value, the pixel value of current line pixel point is sent as the coding data of current line, and send the instruction unpressed instruction information of current line pixel point.
2. method according to claim 1, it is characterized in that, the pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line, including: the pixel value according to previous row pixel, the predicted pixel values of each pixel of current line is determined according at least two predictive mode;
Determine the predicted pixel values of each pixel of current line and the difference of pixel value, comprise determining that the difference of predicted pixel values that each pixel of current line determines according to different predictive modes and pixel value;
Determine the bit-depth of each pixel of current line, comprise determining that each pixel of current line bit-depth under different predictive modes;
Determine the bit length often organizing pixel, comprise determining that often group pixel bit length under different predictive modes;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, the bit-depth often organizing pixel and described difference are packaged as compressed data packets as the compression data of this group pixel, including: select the minima of each bit length sum organizing pixel under same prediction mode, if described minima is not more than bit length threshold value, being packaged as compressed data packets using often organizing pixel bit-depth under minimum predictive mode and the described difference compression data as this group pixel, described minimum predictive mode is the predictive mode that described minima is corresponding.
3. method according to claim 1 and 2, it is characterized in that, current line pixel point is grouped, and determines the bit length often organizing pixel, including: according at least two group mode, current line pixel point is grouped, and determines the bit length often organizing pixel under every kind of group mode;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, the bit-depth often organizing pixel and described difference are packaged as compressed data packets as the compression data of this group pixel, including: select the minima of each bit length sum organizing pixel under same packets pattern, if described minima is not more than bit length threshold value, as the compression data of this group pixel, the bit-depth often organizing pixel under minimum packets pattern and described difference are packaged as compressed data packets, and described minimum packets pattern is the group mode that described minima is corresponding.
4. method according to claim 1 and 2, it is characterised in that if the bit length sum respectively organizing pixel is not more than bit length threshold value, sends the compressed data packets of current line and the instruction information of instruction current line pixel point compression, including:
Send the instruction information of the group mode that the compressed data packets of current line, the instruction information of instruction current line pixel point compression, the instruction information indicating the predictive mode of current line employing and instruction current line adopt.
5. the decompression method of an image, it is characterised in that each row pixel to image, proceeds as follows line by line:
If receiving the instruction unpressed instruction information of current line pixel point, using pixel value as the pixel of current line of the coding data of the pixel of current line that receive;
If receiving the instruction information of instruction current line pixel point compression, according to each bit-depth organizing pixel carried in each compressed data packets of current line, from each compressed data packets of current line, obtain the predicted pixel values of each pixel of current line and the difference of its pixel value respectively;Pixel value according to described difference and previous row pixel, it is determined that the pixel value of each pixel of current line, described bit-depth refers to for representing the number of bits that the described difference needs of pixel take.
6. method according to claim 5, it is characterised in that the pixel value according to described difference and previous row pixel, it is determined that the pixel value of each pixel of current line, including:
Instruction information according to the predictive mode that the instruction current line received adopts, it is determined that the predictive mode that current line adopts;
According to described predictive mode, the pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line;
According to described difference and described predicted pixel values, it is determined that the pixel value of each pixel of current line pixel point.
7. the method according to claim 5 or 6, it is characterised in that obtaining from each compressed data packets of current line before the predicted pixel values of each pixel of current line and the difference of pixel value respectively, the method also includes:
Instruction information according to the group mode that the instruction current line received adopts, it is determined that the group mode that current line adopts;
According to the group mode that current line adopts, obtain each compressed data packets of current line pixel point.
8. the frame compressor of an image, it is characterised in that including:
First compression processing module, for being sent as the coding data of the first row pixel by the pixel value of the first row pixel of image, and sends the unpressed instruction information of current line pixel point;
Second compression processing module, for, from the second row pixel of image, proceeding as follows line by line:
Pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line;
Determine the predicted pixel values of each pixel of current line and the difference of its pixel value;
Determine that the bit-depth of each pixel of current line, described bit-depth refer to for representing the number of bits that the described difference needs of pixel take;
Current line pixel point is grouped, and determines the product that the bit length often organizing pixel, described bit length are the maximal bit degree of depth in one group of pixel and the quantity of this group pixel;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, as the compression data of this group pixel, the bit-depth often organizing pixel and described difference are packaged as compressed data packets, and described bit length threshold value is for representing the number of bits that the pixel value needs of current line pixel point take;Send the compressed data packets of current line and the instruction information of instruction current line pixel point compression;
If respectively organizing the bit length sum of pixel more than bit length threshold value, the pixel value of current line pixel point is sent as the coding data of current line, and send the instruction unpressed instruction information of current line pixel point.
9. device according to claim 8, it is characterised in that the second compression processing module is used for:
Pixel value according to previous row pixel, determines the predicted pixel values of each pixel of current line according at least two predictive mode;
Determine the difference of predicted pixel values that each pixel of current line determines according to different predictive modes and pixel value;
Determine each pixel of current line bit-depth under different predictive modes;
Determine often group pixel bit length under different predictive modes;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, select the minima of each bit length sum organizing pixel under same prediction mode, if described minima is not more than bit length threshold value, being packaged as compressed data packets using often organizing pixel bit-depth under minimum predictive mode and the described difference compression data as this group pixel, described minimum predictive mode is the predictive mode that described minima is corresponding;
If respectively organizing the bit length sum of pixel more than bit length threshold value, the pixel value of current line pixel point is sent as the coding data of current line, and send the instruction unpressed instruction information of current line pixel point.
10. device according to claim 8 or claim 9, it is characterized in that, current line pixel point is grouped, and when determining the bit length often organizing pixel, described second compression processing module is used for: according at least two group mode, current line pixel point is grouped, and determines the bit length often organizing pixel under every kind of group mode;
If the bit length sum respectively organizing pixel is not more than bit length threshold value, using the bit-depth often organizing pixel and described difference as the compression data of this group pixel be packaged as compressed data packets time, described second compression processing module is used for: select the minima of each bit length sum organizing pixel under same packets pattern, if described minima is not more than bit length threshold value, the bit-depth often organizing pixel under minimum packets pattern and described difference are packaged as compressed data packets as the compression data of this group pixel, described minimum packets pattern is the group mode that described minima is corresponding.
11. device according to claim 8 or claim 9, it is characterized in that, if the bit length sum respectively organizing pixel is not more than bit length threshold value, when the compressed data packets sending current line and the instruction information indicating the compression of current line pixel point, described second compression processing module is used for:
Send the instruction information of the group mode that the compressed data packets of current line, the instruction information of instruction current line pixel point compression, the instruction information indicating the predictive mode of current line employing and instruction current line adopt.
12. the decompressing device of an image, it is characterised in that including:
First decompression module, when being used for receiving the unpressed instruction information of instruction current line pixel point, using pixel value as the pixel of current line of the coding data of the pixel of current line that receive;
Second decompression module, during for receiving the instruction information indicating the compression of current line pixel point, according to each bit-depth organizing pixel carried in each compressed data packets of current line, from each compressed data packets of current line, obtain the predicted pixel values of each pixel of current line and the difference of pixel value respectively;Pixel value according to described difference and previous row pixel, it is determined that the pixel value of each pixel of current line, described bit-depth refers to for representing the number of bits that the described difference needs of pixel take.
13. device according to claim 12, it is characterised in that the pixel value according to described difference and previous row pixel, it is determined that during the pixel value of each pixel of current line, described second decompression module is used for:
Instruction information according to the predictive mode that the instruction current line received adopts, it is determined that the predictive mode that current line adopts;
According to described predictive mode, the pixel value according to previous row pixel, it is determined that the predicted pixel values of each pixel of current line;
According to described difference and described predicted pixel values, it is determined that the pixel value of each pixel of current line pixel point.
14. the device according to claim 12 or 13, it is characterised in that obtaining from each compressed data packets of current line before the predicted pixel values of each pixel of current line and the difference of pixel value respectively, described second decompression module is additionally operable to:
Instruction information according to the group mode that the instruction current line received adopts, it is determined that the group mode that current line adopts;
According to the group mode that current line adopts, obtain each compressed data packets of current line pixel point.
CN201410836815.3A 2014-12-26 2014-12-26 The decompression method and device of a kind of frame compression method of image, image Active CN105791819B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410836815.3A CN105791819B (en) 2014-12-26 2014-12-26 The decompression method and device of a kind of frame compression method of image, image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410836815.3A CN105791819B (en) 2014-12-26 2014-12-26 The decompression method and device of a kind of frame compression method of image, image

Publications (2)

Publication Number Publication Date
CN105791819A true CN105791819A (en) 2016-07-20
CN105791819B CN105791819B (en) 2018-09-25

Family

ID=56389678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410836815.3A Active CN105791819B (en) 2014-12-26 2014-12-26 The decompression method and device of a kind of frame compression method of image, image

Country Status (1)

Country Link
CN (1) CN105791819B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109309836A (en) * 2018-10-25 2019-02-05 广州星唯信息科技有限公司 A kind of image compression method based on prediction difference
CN110971904A (en) * 2018-10-15 2020-04-07 新相微电子(上海)有限公司 Control method for image compression
CN112839230A (en) * 2021-01-20 2021-05-25 北京思朗科技有限责任公司 Image data compression apparatus and image data decompression apparatus

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8542938B2 (en) * 2008-12-31 2013-09-24 Entropic Communications, Inc. System and method for intra-frame compression using predictive coding
CN103379334A (en) * 2012-04-19 2013-10-30 富士施乐株式会社 Image encoding apparatus and method, and image decoding apparatus and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8542938B2 (en) * 2008-12-31 2013-09-24 Entropic Communications, Inc. System and method for intra-frame compression using predictive coding
CN103379334A (en) * 2012-04-19 2013-10-30 富士施乐株式会社 Image encoding apparatus and method, and image decoding apparatus and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高健等: "数据多次分组的图像无损压缩算法", 《计算机系统应用》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971904A (en) * 2018-10-15 2020-04-07 新相微电子(上海)有限公司 Control method for image compression
CN110971904B (en) * 2018-10-15 2020-12-04 新相微电子(上海)有限公司 Control method for image compression
CN109309836A (en) * 2018-10-25 2019-02-05 广州星唯信息科技有限公司 A kind of image compression method based on prediction difference
CN112839230A (en) * 2021-01-20 2021-05-25 北京思朗科技有限责任公司 Image data compression apparatus and image data decompression apparatus
CN112839230B (en) * 2021-01-20 2023-04-28 上海思朗科技有限公司 Image data compression device and image data decompression device

Also Published As

Publication number Publication date
CN105791819B (en) 2018-09-25

Similar Documents

Publication Publication Date Title
CN107886560B (en) Animation resource processing method and device
US20140086309A1 (en) Method and device for encoding and decoding an image
US10834401B2 (en) Video encoding
CN105120293A (en) Image cooperative decoding method and apparatus based on CPU and GPU
CN104125458A (en) Lossless stored data compression method and device
US9836248B2 (en) In-memory data compression complementary to host data compression
CN105472389B (en) Compression method is cached outside a kind of piece for ultra high-definition processing system for video
CN111402380B (en) GPU compressed texture processing method
KR101773396B1 (en) Graphic Processing Apparatus and Method for Decompressing to Data
CN103139567B (en) The method and apparatus of a kind of image compression and decompression
MX2012004747A (en) Embedded graphics coding: reordered bitstream for parallel decoding.
CN105096367A (en) Method and device of optimizing Canvas rendering performance
CN110990358A (en) Decompression method, electronic equipment and computer readable storage medium
KR20230128581A (en) Method and apparatus for embedding key information in an image
CN105791819A (en) Frame compression method for image and decompression method and device for image
US10062142B2 (en) Stutter buffer transfer techniques for display systems
CN117014618A (en) Image compression-based blocking method and system and electronic equipment
CN103327340B (en) A kind of integer searches method and device
US9998745B2 (en) Transforming video bit streams for parallel processing
CN111405293B (en) Video transmission method and device
JP7271671B2 (en) Point cloud encoding method and encoder
CN101257590B (en) Coding, decoding method and device, display system
CN104469385A (en) Graphic display method and device based on virtualization technology
CN105681789A (en) Rearrangement method and device of reference frame data reading instructions
CN103581674A (en) Video data compression or decompression method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 519085 High-tech Zone, Tangjiawan Town, Zhuhai City, Guangdong Province

Patentee after: ACTIONS TECHNOLOGY Co.,Ltd.

Address before: 519085 High-tech Zone, Tangjiawan Town, Zhuhai City, Guangdong Province

Patentee before: ACTIONS (ZHUHAI) TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder