WO2021027144A1 - 数据压缩装置及压缩方法 - Google Patents
数据压缩装置及压缩方法 Download PDFInfo
- Publication number
- WO2021027144A1 WO2021027144A1 PCT/CN2019/117688 CN2019117688W WO2021027144A1 WO 2021027144 A1 WO2021027144 A1 WO 2021027144A1 CN 2019117688 W CN2019117688 W CN 2019117688W WO 2021027144 A1 WO2021027144 A1 WO 2021027144A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- quantization
- target
- quantization table
- compressed
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
- H04N19/126—Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/119—Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/146—Data rate or code amount at the encoder output
- H04N19/147—Data rate or code amount at the encoder output according to rate distortion criteria
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/172—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/184—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/186—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/625—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
Definitions
- This application relates to the field of data processing, and in particular to a data compression device and compression method.
- compensation algorithms are usually used to compensate for the uneven display quality of the liquid crystal panel. As the resolution of the liquid crystal panel increases, the storage unit required for the compensation data becomes larger and the cost becomes higher and higher, and the compensation data needs to be compressed.
- the existing compression processing of compensation data includes lossy compression and lossless compression.
- lossless compression usually has a low compression rate and cannot meet the compression requirements, and lossy compression has a high compression rate, but the distortion of the compressed data is more serious.
- the existing data compression method has the problem that the distortion rate and the compression rate cannot be satisfied at the same time, and need to be improved.
- the present application provides a data compression device and compression method to alleviate the problem that the distortion rate and the compression rate cannot be satisfied simultaneously in the existing data compression method.
- This application provides a data compression device, including:
- the preprocessing unit is used to preprocess the compressed data
- a quantization table processing unit configured to determine a target quantization table according to the target compression rate, and the quantization coefficients in the target quantization table enable the data distortion rate and the compression rate to meet preset conditions;
- a quantization unit configured to perform quantization and compression processing on the preprocessed data using the target quantization table
- the post-processing unit is configured to perform subsequent processing on the quantized and compressed data to obtain compressed data corresponding to the data to be compressed.
- the preprocessing unit includes: a data division subunit and a coefficient transformation subunit, the data division subunit is used to divide the data to be compressed as required, and the coefficient The transform subunit is used to perform coefficient transform processing on the divided data to be compressed.
- the coefficient change subunit includes a discrete cosine sine exchange converter, and the discrete cosine sine exchange converter is used to convert the divided data to be compressed into a phase according to a discrete cosine sine transformation formula. The corresponding transform coefficient.
- the quantization table processing unit includes: a quantization table selection subunit and a target quantization table construction subunit, and the quantization table selection subunit is used to select a corresponding quantization table according to the target compression ratio.
- the target quantization table construction subunit is used for optimizing the quantization table according to preset conditions to obtain the target quantization table.
- the preset condition is that after the compression processing of the data to be compressed, the data size thereof meets the size of the target output data, and the data loss is minimal.
- the target quantization table construction subunit is used to perform quantization processing on the corresponding transform coefficients with the quantization step size in the quantization table after the quantization table is selected, and the obtained quantization coefficients Perform subsequent compression processing, and then compare the size of the final compressed data with the target output data size. If the compressed data is greater than or equal to the target output data, the optimization is terminated.
- the original quantization step is the target quantization step; if the compressed data is less than Target output data, then the quantization step value on the coefficient is subtracted by 1, and the above quantization processing steps and subsequent compression processing and comparison steps are repeated again until the obtained compressed data is greater than or equal to the target output data; if the quantization step is reached The length is 1, the compressed data is still smaller than the target output data, and the quantization step when the ratio of the amount of data loss to the data to be compressed is the smallest is the target quantization step of the coefficient.
- the target quantization table is an optimized quantization table corresponding to the minimum target compression ratio.
- the target quantization table is a quantization table obtained after a weighted average of optimized quantization tables.
- the post-processing unit includes an encoding processing sub-unit for encoding the data after quantization and compression processing.
- the encoding processing subunit includes an entropy encoder, and the entropy encoder is configured to perform entropy encoding on the quantized and compressed data.
- this application provides a data compression method, including:
- the post-processing unit performs subsequent processing on the quantized and compressed data to obtain compressed data corresponding to the data to be compressed.
- the step of preprocessing the data to be compressed includes:
- the coefficient transformation process is performed on the divided data to be compressed.
- the step of performing coefficient transformation processing on the divided data to be compressed includes:
- the divided data to be compressed is transformed into corresponding transformation coefficients according to the discrete cosine sine transformation formula.
- the step of determining the target quantization table according to the target compression ratio includes:
- the sub-unit is constructed by the target quantization table, and the quantization table is optimized according to preset conditions, and then the target quantization table is obtained.
- the step of selecting a corresponding quantization table according to the target compression ratio includes:
- the corresponding quantization table is selected according to the size of the target compression ratio.
- the step of optimizing the quantization table according to preset conditions includes:
- the optimization is terminated, and the original quantization step is the target quantization step
- the quantization step value on the coefficient is reduced by 1, and the above quantization processing steps and subsequent compression processing and comparison steps are repeated again until the obtained compressed data is greater than or equal to the target output data;
- the quantization step is 1, the compressed data is still smaller than the target output data, and the quantization step when the ratio of the amount of data loss to the data to be compressed is the smallest is the target quantization step of the coefficient.
- the optimization of the quantization table according to preset conditions is the optimization of coefficients in the quantization table one by one.
- the optimization of the quantization table according to preset conditions is the synchronization optimization of all coefficients in the quantization table.
- the step of obtaining the target quantization table further includes:
- the optimized quantization table is weighted and averaged to obtain the target quantization table.
- the step of performing subsequent processing on the quantized and compressed data includes:
- Entropy coding is performed on the quantized and compressed data.
- the data compression device includes a quantization table processing unit and a quantization unit.
- the quantization table processing unit is used to determine a target quantization table according to a target compression rate.
- the quantization coefficients in the target quantization table cause data distortion
- the quantization rate and the compression rate meet preset conditions, and the quantization unit is configured to perform quantization compression processing on the preprocessed data using the target quantization table.
- FIG. 1 is a schematic diagram of a data compression device provided by an embodiment of the application.
- Figure 2 is a schematic diagram of a data compression process provided by an embodiment of the application
- FIG. 3 is a schematic diagram of a construction process of a quantization table provided by an embodiment of the application.
- the present application provides a data compression device and compression method that can alleviate this problem.
- the data compression device provided in the embodiment of the present application includes:
- the input unit 10 is used to input original data to be compressed.
- the preprocessing unit 20 is used to preprocess the compressed data; the preprocessing unit further includes a data division subunit 21 and a coefficient transformation subunit 22, wherein the data division subunit 21 is used to perform division processing on the compressed data as needed, and coefficient transformation
- the subunit 22 is used to perform coefficient transformation processing on the divided data to be compressed; the coefficient transformation subunit 22 includes a discrete cosine sine exchange transformer, and the discrete cosine sine exchange transformer is used to divide the divided data to be compressed according to the discrete cosine sine transformation formula.
- the compressed data is converted into corresponding transform coefficients.
- the quantization table processing unit 30 is configured to determine a target quantization table according to the target compression rate, and the quantization coefficients in the target quantization table make the data distortion rate and compression rate meet preset conditions; the quantization table processing unit 30 includes a quantization table selection subunit 31 and the target quantization table construction subunit 32, wherein the quantization table selection subunit 31 is used to select the corresponding quantization table according to the size of the target compression ratio, and the target quantization table construction subunit 32 is used to optimize the quantization table according to preset conditions, Then get the target quantization table.
- the quantization unit 40 is configured to perform quantization compression processing on the preprocessed data using the target quantization table.
- the post-processing unit 50 is configured to perform subsequent processing on the quantized and compressed data to obtain compressed data corresponding to the data to be compressed.
- the output unit 60 is used to output compressed data.
- An embodiment of the application provides a data compression device.
- the data compression device includes a quantization table processing unit and a quantization unit.
- the quantization table processing unit is used to determine a target quantization table according to a target compression rate.
- the quantization coefficients in the target quantization table make the data distortion rate
- the quantization unit is configured to use the target quantization table to perform quantization compression processing on the preprocessed data.
- multimedia data must be compressed.
- multimedia data including video, audio, pictures, etc.
- the following takes a frame of image as an example to introduce the data compression device and compression method provided by this application in detail.
- the data to be compressed input by the input unit is the acquired image information on the display panel.
- the image information of the display panel can be the gray value of a monochrome image, or the brightness component or color difference component of a color image. Signal or color difference component signal.
- the input unit first inputs the data to be compressed into the preprocessing unit 20.
- the data division subunit 21 of the preprocessing unit 20 divides the image to be compressed into a series of 8 *8 image sampling area, each 8*8 two-dimensional image sampling data block is actually a 64-point discrete signal, which is a function of spatial two-dimensional parameters x and y, and each 8*8 two-dimensional
- the image sample data block is represented by 64 functions about x and y, and the block data function is obtained.
- the size of each block of the obtained 8*8 two-dimensional image sample data blocks is equal.
- the coefficient change subunit 22 after the data division subunit 21 divides and processes the data to be compressed, it is transmitted to the coefficient change subunit 22 of the preprocessing unit 20, and the coefficient change subunit 22 further converts the data to be compressed into transform coefficients.
- the coefficient transformation subunit 22 includes a discrete cosine sine exchange converter, the data to be compressed transmitted to the coefficient transformation subunit 22 is the block data function of the image to be compressed, and the discrete cosine sine exchange converter is based on the discrete cosine
- the positive transformation formula converts the block data function into the corresponding transformation coefficient.
- Discrete cosine transform processing is the transformation processing of 8*8 sampled data blocks. It can be an image, from left to right, from top to bottom, one by one (8*8/block) transform and compression, or it can be Take turns to take 8*8 sample data block compression for multiple pictures.
- each orthogonal signal corresponds to one of 64 two-dimensional spatial frequencies, which are composed of the frequency spectrum of the input signal.
- the output of the discrete cosine sine transform is the amplitude of 64 base signals, that is, the transform coefficient, and each coefficient value is uniquely determined by the 64-point input signal, that is, the transform coefficient of the discrete cosine transform.
- the transform coefficients are functions of the two-dimensional frequency domain variables u and v.
- the quantization table processing unit 30 is configured to determine the target quantization table according to the target compression rate, and the quantization coefficients in the target quantization table make the data distortion rate and the compression rate meet the preset conditions.
- the quantization table selection subunit 31 in the quantization table processing unit 30 is used to select the corresponding quantization table according to the size of the target compression rate, and the size of the target compression rate is determined according to the size of the data to be compressed and the size of the corresponding output data, namely The ratio of the size of the data to be compressed and the size of the corresponding output data.
- the target compression rate will be fixed in a corresponding determined value range, and then the corresponding quantization will be selected according to the range of the target compression rate
- the corresponding quantization table may have only one corresponding quantization table or multiple tables.
- the size of the output data corresponding to the type of data to be compressed should be determined first according to the type of data to be compressed, and then the size and corresponding The size of the output data determines the size of the target compression ratio.
- image data is taken as an example.
- the quantization table selection sub-unit 31 sends the selected quantization table to the quantization table construction sub-unit 32, and the target quantization table construction sub-unit 32 is used to optimize the quantization table according to preset conditions to obtain the target Quantization table.
- the preset condition is that after the data to be compressed is quantized and compressed, the output condition is satisfied (that is, the compression ratio of the output data meets the target compression ratio range size, or the size of the output data meets the output size requirement) and the data loss is minimal (that is, the size of the loss data is The size ratio of the data to be compressed is the smallest).
- the quantization step size is the value of each coefficient in the quantization table
- the quantization table coefficients change with the position of the transform coefficients
- the size of the quantization table is also 8*8, which corresponds to 64 transform coefficients one-to-one.
- the value of each coefficient in the quantization table is an arbitrary integer between 1 and 255, and its value specifies the quantizer step size of the corresponding position transform coefficient.
- the target quantization table construction subunit 32 is used to perform quantization processing on the corresponding transform coefficients with the quantization step size in the quantization table after the quantization table is selected, and perform subsequent compression processing on the obtained quantization coefficients, and then compare the final compression The size of the data and the target output data size. If the compressed data is greater than or equal to the target output data, the optimization is terminated.
- the original quantization step is the target quantization step; if the compressed data is less than the target output data, the coefficients are quantized Decrease the step value by 1, and repeat the above quantization processing steps and subsequent compression processing and comparison steps again until the obtained compressed data is greater than or equal to the target output data; if the quantization step is 1, the compressed data is still less than the target output data , Take the quantization step when the ratio of the data loss to the data to be compressed is the smallest as the target quantization step of the coefficient.
- the optimization of the quantization table by the quantization table construction subunit 32 is to optimize all quantization tables that meet the target compression rate, including the quantization of each coefficient in all quantization tables that meet the target compression rate. Optimization of step size. That is, for the quantization step size of each coefficient in the selected quantization table, the corresponding data to be compressed is used for analog compression processing, and the size of the quantization step size is gradually adjusted to obtain the optimal target quantization step size that meets the preset conditions.
- the optimization of the quantization table by the quantization table construction subunit 32 may be the optimization of each coefficient in the quantization table one by one, or the synchronization optimization of all the coefficients in the quantization table.
- the final target quantization table can be the optimized quantization table when the target compression rate is selected as the minimum value, or it can be the quantization table obtained after optimization of all quantization tables that meet the target compression rate and weighted average.
- Each quantization coefficient is an optimized target quantization coefficient.
- the quantization unit 40 is configured to use the target quantization table to perform quantization compression processing on the preprocessed data.
- the transform coefficients after the discrete cosine sine exchange processing need to be quantized.
- the quantization process is a many-to-one mapping. At the same time, it is also the source of information loss in the data compression process.
- the definition of quantization is to divide the 64 transform coefficients by the corresponding quantization step size and then round up to obtain the corresponding quantization coefficient.
- the DC coefficient is the average of 64 image samples and contains the main part of the entire image energy.
- the quantization process is to select the size of the coefficient values in the quantization table according to the visual threshold of different frequencies under the premise of a certain subjective fidelity image quality.
- the transform coefficient is divided by the quantization step size of the corresponding position in the quantization table, its amplitude decreases, the dynamic range narrows, and the number of zeros of high-frequency coefficients increases.
- the post-processing unit 50 is configured to perform subsequent processing on the quantized and compressed data to obtain compressed data corresponding to the data to be compressed.
- the post-processing unit 50 includes an encoding processing subunit.
- the encoding processing subunit has an entropy encoder.
- the entropy encoder is used to perform entropy encoding processing on the quantized and compressed data. Entropy encoding is a general term that does not consider the compressed data. Nature of lossless encoding.
- entropy coding based on statistical characteristics is required for the quantized quantized coefficients.
- 63 AC coefficients need to be arranged in "z" shape, and then a two-dimensional 8*8 matrix is transformed into a one-dimensional 1*64 vector, and the lower frequency vector is placed in the vector
- RLE run-length encoding
- the DC coefficient values of adjacent blocks are very close.
- Differential pulse code modulation (DPCM) is used to encode the difference between the DC coefficients of adjacent image blocks. Fewer bits.
- the entropy encoder is used to further compress and encode the DC coefficients after DPCM coding and the AC coefficients after RLE coding.
- the entropy coder processes data, it generally assigns shorter codes to coefficients with higher frequency and longer codes to coefficients with lower frequency.
- the output unit 60 is used to output compressed data.
- the output unit 60 finally composes the compressed data after the encoding process into frame by frame data, that is, a data stream, and outputs it.
- the data compression method provided in the embodiment of the present application includes:
- An embodiment of the present application provides a data compression method.
- the data compression method includes: determining a target quantization table according to a target compression rate through a quantization table processing unit, and the quantization coefficients in the target quantization table make the data distortion rate and the compression rate meet preset conditions ; Through the quantization unit, the target quantization table performs quantization compression processing on the preprocessed data.
- the distortion rate is greatly reduced, and the existing data compression method has the problem that the distortion rate and the compression rate cannot be satisfied at the same time.
- the step of preprocessing the data to be compressed includes:
- the data division subunit 21 performs division processing on the data to be compressed.
- the data division subunit 21 divides the image to be compressed into a series of 8*8 image sampling areas.
- Each 8*8 two-dimensional image sampling data block is actually a 64-point discrete signal, which is a spatial two-dimensional parameter.
- For the functions of x and y, each 8*8 two-dimensional image sample data block is represented by 64 functions on x and y to obtain the block data function.
- the coefficient transformation subunit 22 performs coefficient transformation processing on the divided data to be compressed.
- the coefficient transformation subunit 22 includes a discrete cosine sine exchange converter, and the discrete cosine sine exchange converter converts the block data functions into corresponding transformation coefficients according to the discrete cosine sine transformation formula therein.
- Discrete cosine transform processing is the transformation processing of 8*8 sampled data blocks. It can be an image, from left to right, from top to bottom, one by one (8*8/block) transform and compression, or it can be Take turns to take 8*8 sample data block compression for multiple pictures.
- the step of determining the target quantization table according to the target compression ratio includes:
- the quantization table selection subunit 31 is used to select the corresponding quantization table according to the size of the target compression ratio. Determine the size of the output data corresponding to the type of data to be compressed according to the type of data to be compressed, and then determine the size of the target compression rate according to the size of the data to be compressed and the size of the corresponding output data; then select the corresponding one according to the range of the target compression rate
- the corresponding quantization table may have only one corresponding quantization table, or it may be multiple.
- the quantization table is optimized according to preset conditions, and then the target quantization table is obtained.
- the preset condition is that after the data to be compressed is quantized and compressed, the output condition is satisfied (that is, the compression ratio of the output data meets the target compression ratio range size, or the size of the output data meets the output size requirement) and the data loss is minimal (that is, the size of the loss data is The size ratio of the data to be compressed is the smallest).
- the corresponding transform coefficients are quantized with the quantization step Qk in the quantization table, and the obtained quantized coefficients are subjected to subsequent compression processing, and then the final compression is compared. The size of the data and the target output data size. If the compressed data is greater than or equal to the target output data, the optimization is terminated.
- the original quantization step is the target quantization step; if the compressed data is less than the target output data, the coefficients are quantized Decrease the step value by 1, and repeat the above quantization processing steps and subsequent compression processing and comparison steps again until the obtained compressed data is greater than or equal to the target output data; if the quantization step is 1, the compressed data is still less than the target output data , The quantization step size when the ratio of the data loss amount Dk to the data to be compressed Bk is the smallest is taken as the target quantization step size of the coefficient. Then the next coefficient is optimized with the above implementation steps until the quantization step size of all coefficients in the entire quantization table is optimized to the target quantization step size, and then the next quantization table is optimized.
- the optimization of the quantization table may be the optimization of the coefficients in the quantization table one by one, or the synchronization optimization of all the coefficients.
- the optimized quantization table corresponding to the minimum target compression rate can be selected as the final target quantization table; or all quantization tables that meet the target compression rate can be optimized and weighted and averaged.
- the quantization table is the final target quantization table.
- the step of quantizing and compressing the preprocessed data includes:
- the 64 transform coefficients are divided by the corresponding quantization step size and then rounded up to obtain the corresponding quantization coefficient.
- the quantized coefficients include a DC coefficient and 63 AC coefficients.
- the step of performing subsequent processing on the quantized and compressed data includes:
- DPCM differential pulse code modulation
- the data compression device includes a quantization table processing unit and a quantization unit.
- the quantization table processing unit is used to determine a target quantization table according to a target compression rate.
- the quantization coefficients in the target quantization table cause data distortion
- the quantization rate and the compression rate meet preset conditions, and the quantization unit is configured to perform quantization and compression processing on the preprocessed data using the target quantization table.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Discrete Mathematics (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本申请提供一种数据压缩装置及压缩方法,该数据压缩装置包括量化表处理单元和量化单元,量化表处理单元根据目标压缩率,确定量化系数满足数据失真率与压缩率预设条件的目标量化表;通过对不同的数据构造不同的量化表,在满足压缩率的基础上,极大可能地减小失真率,缓解了现有技术中失真率与压缩率无法同时满足的问题。
Description
本申请涉及数据处理领域,尤其涉及一种数据压缩装置及压缩方法。
在目前的显示器中,通常采用补偿算法对液晶面板显示画质不均匀的问题进行补偿。随着液晶面板解析度的增高,补偿数据所需的储存单元越来越大,成本亦越来越高,需要对补偿数据进行压缩处理。
现有对补偿数据的压缩处理包括有损压缩和无损压缩,然而,无损压缩通常压缩率较低无法达到压缩要求,有损压缩压缩率较高,但数据被压缩后失真较严重。
因此,现有数据压缩方法存在失真率与压缩率无法同时满足的问题,需要改进。
本申请提供一种数据压缩装置及压缩方法,以缓解现有数据压缩方法存在失真率与压缩率无法同时满足的问题。
为解决以上问题,本申请提供的技术方案如下:
本申请提供一种数据压缩装置,包括:
预处理单元,用于对待压缩数据进行预处理;
量化表处理单元,用于根据目标压缩率,确定目标量化表,所述目标量化表内的量化系数使得数据失真率与压缩率满足预设条件;
量化单元,用于使用所述目标量化表对预处理后的数据进行量化压缩处理;
后处理单元,用于对量化压缩后的数据进行后续处理,得到所述待压缩数据对应的压缩数据。
在本申请提供的数据压缩装置中,所述预处理单元包括:数据划分子单元和系数变换子单元,所述数据划分子单元用于根据需要对所述待压缩数据进行划分处理,所述系数变换子单元用于对划分后的待压缩数据进行系数变换处理。
在本申请提供的数据压缩装置中,所述的系数变化子单元包括离散余弦正交换变换器,所述离散余弦正交换变换器用于根据离散余弦正变换公式将划分后的待压缩数据转变为相对应的变换系数。
在本申请提供的数据压缩装置中,所述量化表处理单元包括:量化表选取子单元和目标量化表构建子单元,所述量化表选取子单元用于根据所述目标压缩率的大小选取对应的量化表,所述目标量化表构建子单元用于根据预设条件对所述量化表进行优化,进而得到目标量化表。
在本申请提供的数据压缩装置中,所述预设条件为所述待压缩数据压缩处理后,其数据大小满足目标输出数据的大小,且数据损失最小。
在本申请提供的数据压缩装置中,所述目标量化表构建子单元用于在量化表选取之后,以量化表中的量化步长对相对应的变换系数进行量化处理,并将所得的量化系数进行后续压缩处理,然后比较最终得到的压缩数据的大小与目标输出数据大小,若压缩数据大于或等于目标输出数据,则终止优化,该原量化步长即为目标量化步长;若压缩数据小于目标输出数据,则将该系数上的量化步长值减1,再次重复以上的量化处理步骤以及后续的压缩处理和比较步骤,直到获得的压缩数据大于或等于目标输出数据;若一直到量化步长为1,压缩数据依然小于目标输出数据,取数据损失量与待压缩数据比值最小时的量化步长为该系数的目标量化步长。
在本申请提供的数据压缩装置中,所述目标量化表为目标压缩率取最小值时对应的优化后的量化表。
在本申请提供的数据压缩装置中,所述目标量化表为优化后的量化表加权平均后得到的量化表。
在本申请提供的数据压缩装置中,所述后处理单元包括编码处理子单元,用于对量化压缩处理后的数据进行编码处理。
在本申请提供的数据压缩装置中,所述编码处理子单元包括熵编码器,所述熵编码器用于对量化压缩处理后的数据进行熵编码。
同时,本申请提供一种数据压缩方法,包括:
通过预处理单元,对待压缩数据进行预处理;
通过量化表处理单元,根据目标压缩率,确定目标量化表,所述目标量化表内的量化系数使得数据失真率与压缩率满足预设条件;
通过量化单元,使用所述目标量化表对预处理后的数据进行量化压缩处理;
通过后处理单元,对量化压缩后的数据进行后续处理,得到所述待压缩数据对应的压缩数据。
在本申请提供的数据压缩方法中,所述对待压缩数据进行预处理的步骤包括:
通过数据划分子单元,对所述待压缩数据进行划分处理;
通过系数变换子单元,对划分后的待压缩数据进行系数变换处理。
在本申请提供的数据压缩方法中,所述对划分后的待压缩数据进行系数变换处理的步骤包括:
通过离散余弦正交换变换器,根据离散余弦正变换公式将划分后的待压缩数据转变为相对应的变换系数。
在本申请提供的数据压缩方法中,所述根据目标压缩率,确定目标量化表的步骤包括:
通过量化表选取子单元,根据所述目标压缩率的大小选取对应的量化表;
通过目标量化表构建子单元,根据预设条件对所述量化表进行优化,进而得到目标量化表。
在本申请提供的数据压缩方法中,所述根据所述目标压缩率的大小选取对应的量化表的步骤包括:
根据待压缩数据的大小和对应的输出数据的大小确定目标压缩率的大小;
根据所述目标压缩率的大小选取对应的量化表。
在本申请提供的数据压缩方法中,所述根据预设条件对所述量化表进行优化的步骤包括:
以量化表中的量化步长对相对应的变换系数进行量化处理,并将所得的量化系数进行后续压缩处理,然后比较最终得到的压缩数据的大小与目标输出数据大小;
若压缩数据大于或等于目标输出数据,则终止优化,该原量化步长即为目标量化步长;
若压缩数据小于目标输出数据,则将该系数上的量化步长值减1,再次重复以上的量化处理步骤以及后续的压缩处理和比较步骤,直到获得的压缩数据大于或等于目标输出数据;
若一直到量化步长为1,压缩数据依然小于目标输出数据,取数据损失量与待压缩数据比值最小时的量化步长为该系数的目标量化步长。
在本申请提供的数据压缩方法中,所述根据预设条件对所述量化表进行优化为对量化表内系数的逐一优化。
在本申请提供的数据压缩方法中,所述根据预设条件对所述量化表进行优化为对量化表内所有系数的同步优化。
在本申请提供的数据压缩方法中,所述进而得到目标量化表的步骤包括:
对优化后的量化表加权平均,得到目标量化表。
在本申请提供的数据压缩方法中,所述对量化压缩后的数据进行后续处理的步骤包括:
对量化压缩处理后的数据进行熵编码处理。
本申请提供一种数据压缩装置及压缩方法,该数据压缩装置包括量化表处理单元和量化单元,量化表处理单元用于根据目标压缩率确定目标量化表,目标量化表内的量化系数使得数据失真率与压缩率满足预设条件,量化单元用于使用所述目标量化表对预处理后的数据进行量化压缩处理。通过对不同的数据构造不同的量化表,在满足压缩率的基础上,极大可能地减小了失真率,缓解了现有数据压缩方法存在失真率与压缩率无法同时满足的问题。
为了更清楚地说明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单介绍,显而易见地,下面描述中的附图仅仅是发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的数据压缩装置的示意图。
图2为本申请实施例提供的数据压缩流程示意图
图3为本申请实施例提供的量化表的构建流程示意图。
以下各实施例的说明是参考附加的图示,用以例示本申请可用以实施的特定实施例。本申请所提到的方向用语,例如[上]、[下]、[前]、[后]、[左]、[右]、[内]、[外]、[侧面]等,仅是参考附加图式的方向。因此,使用的方向用语是用以说明及理解本申请,而非用以限制本申请。在图中,结构相似的单元是用以相同标号表示。
针对现有补偿数据压缩方法存在的压缩率低、失真严重的问题,本申请提供一种数据压缩装置及压缩方法可以缓解这个问题。
在一种实施例中,如图1所示,本申请实施例提供的数据压缩装置包括:
输入单元10,用于输入原始待压缩数据。
预处理单元20,用于对待压缩数据进行预处理;预处理单元又包括数据划分子单元21和系数变换子单元22,其中数据划分子单元21用于根据需要对待压缩数据进行划分处理,系数变换子单元22用于对划分后的待压缩数据进行系数变换处理;系数变换子单元22内包括有离散余弦正交换变换器,离散余弦正交换变换器用于根据离散余弦正变换公式将划分后的待压缩数据转变为相对应的变换系数。
量化表处理单元30,用于根据目标压缩率,确定目标量化表,所述目标量化表内的量化系数使得数据失真率与压缩率满足预设条件;量化表处理单元30包括量化表选取子单元31和目标量化表构建子单元32,其中量化表选取子单元31用于根据目标压缩率的大小选取对应的量化表,目标量化表构建子单元32用于根据预设条件对量化表进行优化,进而得到目标量化表。
量化单元40,用于使用目标量化表对预处理后的数据进行量化压缩处理。
后处理单元50,用于对量化压缩后的数据进行后续处理,得到待压缩数据对应的压缩数据。
输出单元60,用于输出压缩数据。
本申请实施例提供一种数据压缩装置,该数据压缩装置包括量化表处理单元和量化单元,量化表处理单元用于根据目标压缩率确定目标量化表,目标量化表内的量化系数使得数据失真率与压缩率满足预设条件,量化单元用于使用所述目标量化表对预处理后的数据进行量化压缩处理。通过对不同的数据构造不同的量化表,在满足压缩率的基础上,极大可能地减小了失真率,缓解了现有数据压缩方法存在失真率与压缩率无法同时满足的问题。
由于多媒体信息的数据量巨大,需要极大的存储空间,且可能会超过线路的传输率,为了减小存储空间和传输宽带,进行实时高质的多媒体通信,必须对多媒体数据进行压缩处理。多媒体数据多种多样,包括视频、音频、图片等等,以下以一帧图像为例对本申请提供的数据压缩装置及压缩方法做详细介绍。
在一种实施例中,输入单元输入的待压缩数据为获取的显示面板上的图像信息,显示面板的图像信息可以是单色图像的灰度值,也可以是彩色图像的亮度分量或色差分量信或色差分量信号。
在一种实施例中,输入单元将待压缩数据先输入到预处理单元20中,在预处理单元20的数据划分子单元21内,数据划分子单元21将待压缩的图像划分为一系列8*8的图像采样区域,每个8*8的二维图像采样数据块,实际上是64点离散信号,该信号是空间二维参数x和y的函数,将每个8*8的二维图像采样数据块分别用64个关于x和y的函数表示,得到分块数据函数。
在一种实施例中,进一步的,在对图像进行分块处理时,得到的8*8二维图像采样数据块中的每一块的大小均相等。
在一种实施例中,数据划分子单元21在将待压缩数据划分处理后,传输进入到预处理单元20的系数变化子单元22内,系数变化子单元22进一步将待压缩数据转换为变换系数,系数变换子单元22内包括有离散余弦正交换变换器,传输到系数变换子单元22内的待压缩数据为待压缩图像的分块数据函数,离散余弦正交换变换器根据其内的离散余弦正变换公式将分块数据函数转换为相对应的变换系数。
离散余弦变换处理是对8*8采样数据块作的变换处理,可以是对一幅图像,从左到右、从上到下、一块一块(8*8/块)地变换压缩,也可以是对多幅图轮流取8*8采样数据块压缩。
由于一个8*8图像的分块数据函数即为64个正交基信号,每个正交信号对应于64个二维空间频率中的一个, 这些空间频率是由输入信号的频谱组成。离散余弦正变换的输出是64个基信号的幅值,即变换系数,每个系数值由64点输入信号唯一地确定,即离散余弦变换的变换系数。在频域平面上,变换系数为二维频域变量u和v的函数。对应于u=0,v=0的系数,称作直流分量,即直流变换系数,其余63个系数称作交流分量即交流变换系数。因为在一幅图像中像素之间的灰度或色差信号变化缓慢,在8*8子块中像素之间相关性很强,所以通过离散余弦正变换处理后,在空间频率低频范围内集中了数值大的系数,这样为数据压缩提供了可能。远离直流系数的高频交流系数大多为零或趋于零。
在一种实施例中,量化表处理单元30用于根据目标压缩率,确定目标量化表,目标量化表内的量化系数使得数据失真率与压缩率满足预设条件。量化表处理单元30内的量化表选取子单元31用于根据目标压缩率的大小选取对应的量化表,目标压缩率的大小为根据待压缩数据的大小和对应的输出数据的大小确定的,即待压缩数据大小和对应的输出数据大小的比值,根据输出数据的大小范围,该目标压缩率会被固定在一个相对应的确定取值范围内,然后根据目标压缩率的范围选取相对应的量化表,其相对应的量化表可以只有唯一对应的一张,也可以是多张。
进一步的,针对不同类型的待压缩数据,其输出数据的要求以及大小不一样,应当先根据待压缩数据的类型确定对应待压缩数据类型的输出数据的大小,进而根据待压缩数据的大小和对应的输出数据的大小确定目标压缩率的大小。在本申请实施例中,以图像数据为例。
在一种实施例中,量化表选取子单元31将挑选出来的量化表输送给量化表构建子单元32,目标量化表构建子单元32用于根据预设条件对量化表进行优化,进而得到目标量化表。其中预设条件为待压缩数据量化压缩后,满足输出条件(即输出数据的压缩率满足目标压缩率范围大小,或输出数据的大小满足输出大小要求)且数据损失最小(即损失数据的大小与待压缩数据的大小比值最小)。
由于量化步长为量化表内各系数的数值,量化表系数随变换系数的位置而改变,量化表的尺寸也是8*8,与64个变换系数一一对应。量化表中的每一个系数值为1至255之间的任意整数,其值规定了对应位置变换系数的量化器步长。
目标量化表构建子单元32用于在量化表选取之后,以量化表中的量化步长对相对应的变换系数进行量化处理,并将所得的量化系数进行后续压缩处理,然后比较最终得到的压缩数据的大小与目标输出数据大小,若压缩数据大于或等于目标输出数据,则终止优化,该原量化步长即为目标量化步长;若压缩数据小于目标输出数据,则将该系数上的量化步长值减1,再次重复以上的量化处理步骤以及后续的压缩处理和比较步骤,直到获得的压缩数据大于或等于目标输出数据;若一直到量化步长为1,压缩数据依然小于目标输出数据,取数据损失量与待压缩数据比值最小时的量化步长为该系数的目标量化步长。
在本实施例中,量化表构建子单元32对量化表进行的优化,为对所有满足目标压缩率的量化表进行的优化,包括对所有满足目标压缩率的量化表内的每个系数的量化步长的优化。即对于选取的量化表内的每个系数的量化步长,以对应的待压缩数据做模拟压缩处理,并逐步调节量化步长的大小,以获取满足预设条件的最优目标量化步长。
量化表构建子单元32对量化表进行的优化,可以是对量化表内各系数逐一进行的优化,也可以是对量化表内所有系数的同步优化。
最终得到的目标量化表可以是选取目标压缩率取最小值时对应的优化后的量化表,也可以是所有满足目标压缩率的量化表优化后加权平均后得到的量化表,目标量化表内的每个量化系数均为优化后的目标量化系数。
在一种实施例中,量化单元40用于使用目标量化表对预处理后的数据进行量化压缩处理。为了达到压缩数据的目的,对离散余弦正交换处理后的变换系数需要做量化处理。量化处理是一个多到一的映射,同时,它也是造成数据压缩处理信息损失的根源。量化的定义为对64个变换系数除以相对应的量化步长后四舍五入取整,得到对应的量化系数。
64个变换系数经量化后,坐标u=0,v=0对应的量化系数是直流分量(即直流系数),其余63个量化系数即为交流分量(即交流系数)。直流系数是64个图像采样的平均值,包含了整个图像能量的主要部分。
不同频率的余弦函数对视觉的影响不同,量化处理是在一定的主观保真度图像质量的前提下,据不同频率的视觉阈值来选择量化表中的系数值的大小。变换系数除以量化表中对应位置的量化步长,其幅值下降,动态范围变窄,高频系数的零值数目增加。
在一种实施例中,后处理单元50用于对量化压缩后的数据进行后续处理,得到待压缩数据对应的压缩数据。后处理单元50包括编码处理子单元,编码处理子单元内有熵编码器,熵编码器用于对量化压缩处理后的数据进行熵编码处理,熵编码是一种泛指哪些不考虑被压缩数据的性质的无损编码。
为进一步达到压缩数据的目的,需对量化后的量化系数进行基于统计特性的熵编码。在进行熵编码之前,还需要对63个交流系数进行“z”字形编排,进而将一个二维的8*8矩阵转变为一个一维的1*64矢量,频率较低的矢量放在矢量的顶部,然后使用行程长度编码(RLE)对交流系数进行编码。因为相邻的8×8块之间有强的相关性,所以相邻块的直流系数值很接近,使用差分脉冲编码调制(DPCM)对相邻图像块直流系数的差值进行编码,可以用较少的比特数。
熵编码器用于对DPCM编码后的直流系数和RLE编码后的交流系数做进一步的压缩编码。熵编码器在对数据进行处理时,一般对出现频率较高的系数分配比较短的代码,对出现频率较低的系数分配较长的代码。
在一种实施例中,输出单元60用于输出压缩数据。输出单元60最后将编码处理完成的压缩数据组成为一帧一帧的数据,即数据流,并输出。
同时,在一种实施例中,如图2所示,本申请实施例提供的数据压缩方法包括:
S21、通过输入单元10,输入待压缩数据;
S22、通过预处理单元20,对待压缩数据进行预处理;
S23、通过量化表处理单元30,根据目标压缩率,确定目标量化表,目标量化表内的量化系数使得数据失真率与压缩率满足预设条件;
S24、通过量化单元40,根据目标量化表对预处理后的数据进行量化压缩处理;
S25、通过后处理单元50,对量化压缩后的数据进行后续处理,得到待压缩数据对应的压缩数据;
S26、通过输出单元60,输出压缩数据。
本申请实施例提供一种数据压缩方法,该数据压缩方法包括:通过量化表处理单元,根据目标压缩率确定目标量化表,目标量化表内的量化系数使得数据失真率与压缩率满足预设条件;通过量化单元,所述目标量化表对预处理后的数据进行量化压缩处理。通过对不同的数据构造不同的量化表,在满足压缩率的基础上,极大可能地减小了失真率,缓解了现有数据压缩方法存在失真率与压缩率无法同时满足的问题。
在一种实施例中,对待压缩数据进行预处理的步骤包括:
通过数据划分子单元21,对待压缩数据进行划分处理。数据划分子单元21将待压缩的图像划分为一系列8*8的图像采样区域,每个8*8的二维图像采样数据块,实际上是64点离散信号,该信号是空间二维参数x和y的函数,将每个8*8的二维图像采样数据块分别用64个关于x和y的函数表示,得到分块数据函数。
通过系数变换子单元22,对划分后的待压缩数据进行系数变换处理。系数变换子单元22内包括有离散余弦正交换变换器,离散余弦正交换变换器根据其内的离散余弦正变换公式将分块数据函数转换为相对应的变换系数。离散余弦变换处理是对8*8采样数据块作的变换处理,可以是对一幅图像,从左到右、从上到下、一块一块(8*8/块)地变换压缩,也可以是对多幅图轮流取8*8采样数据块压缩。
在一种实施例中,根据目标压缩率,确定目标量化表的步骤包括:
通过量化表选取子单元31,根据所述目标压缩率的大小选取对应的量化表。根据待压缩数据的类型确定对应待压缩数据类型的输出数据的大小,进而根据待压缩数据的大小和对应的输出数据的大小确定目标压缩率的大小;然后根据目标压缩率的范围选取相对应的量化表,其相对应的量化表可以只有唯一对应的一张,也可以是多张。
通过目标量化表构建子单元32,根据预设条件对所述量化表进行优化,进而得到目标量化表。其中预设条件为待压缩数据量化压缩后,满足输出条件(即输出数据的压缩率满足目标压缩率范围大小,或输出数据的大小满足输出大小要求)且数据损失最小(即损失数据的大小与待压缩数据的大小比值最小)。
在一种是实施例中,如图3所示,以量化表中的量化步长Qk对相对应的变换系数进行量化处理,并将所得的量化系数进行后续压缩处理,然后比较最终得到的压缩数据的大小与目标输出数据大小,若压缩数据大于或等于目标输出数据,则终止优化,该原量化步长即为目标量化步长;若压缩数据小于目标输出数据,则将该系数上的量化步长值减1,再次重复以上的量化处理步骤以及后续的压缩处理和比较步骤,直到获得的压缩数据大于或等于目标输出数据;若一直到量化步长为1,压缩数据依然小于目标输出数据,取数据损失量Dk与待压缩数据Bk比值最小时的量化步长为该系数的目标量化步长。然后对下一个系数以上述实施步骤进行优化,直到整个量化表内的所有系数的量化步长均优化为目标量化步长,再换下一个量化表进行优化。
在本实施例中,对量化表的优化可以是对量化表内的系数的逐一优化,也可以是对所有系数的同步优化。
最后优化完成的所有量化表,可以选取目标压缩率取最小值时对应的优化后的量化表,为最终的目标量化表;也可以取所有满足目标压缩率的量化表优化后加权平均后得到的量化表,为最终的目标量化表。
在一种实施例中,对预处理后的数据进行量化压缩处理的步骤包括:
对64个变换系数除以相对应的量化步长后四舍五入取整,得到对应的量化系数。其量化系数包括一个直流系数和63个交流系数。
在一种实施例中,对量化压缩后的数据进行后续处理的步骤包括:
对63个交流系数进行“z”字形编排,进而将一个二维的8*8矩阵转变为一个一维的1*64矢量;
使用行程长度编码(RLE)对交流系数进行编码;
使用差分脉冲编码调制(DPCM)对相邻图像块直流系数的差值记行编码;
使用熵编码器对DPCM编码后的直流系数和RLE编码后的交流系数做进一步的压缩编码。
根据上述实施例可知:
本申请提供一种数据压缩装置及压缩方法,该数据压缩装置包括量化表处理单元和量化单元,量化表处理单元用于根据目标压缩率确定目标量化表,目标量化表内的量化系数使得数据失真率与压缩率满足预设条件,量化单元用于使用所述目标量化表对预处理后的数据进行量化压缩处理。通过对不同的数据构造不同的量化表,在满足压缩率的基础上,极大可能地减小了失真率,缓解了现有数据压缩方法存在失真率与压缩率无法同时满足的问题。
综上所述,虽然本申请已以优选实施例揭露如上,但上述优选实施例并非用以限制本申请,本领域的普通技术人员,在不脱离本申请的精神和范围内,均可作各种更动与润饰,因此本申请的保护范围以权利要求界定的范围为准。
Claims (20)
- 一种数据压缩装置,其包括:预处理单元,用于对待压缩数据进行预处理;量化表处理单元,用于根据目标压缩率,确定目标量化表,所述目标量化表内的量化系数使得数据失真率与压缩率满足预设条件;量化单元,用于使用所述目标量化表对预处理后的数据进行量化压缩处理;后处理单元,用于对量化压缩后的数据进行后续处理,得到所述待压缩数据对应的压缩数据。
- 如权利要求1所述的数据压缩装置,其中,所述预处理单元包括:数据划分子单元和系数变换子单元,所述数据划分子单元用于根据需要对所述待压缩数据进行划分处理,所述系数变换子单元用于对划分后的待压缩数据进行系数变换处理。
- 如权利要求2所述的数据压缩装置,其中,所述的系数变化子单元包括离散余弦正交换变换器,所述离散余弦正交换变换器用于根据离散余弦正变换公式将划分后的待压缩数据转变为相对应的变换系数。
- 如权利要求1所述的数据压缩装置,其中,所述量化表处理单元包括:量化表选取子单元和目标量化表构建子单元,所述量化表选取子单元用于根据所述目标压缩率的大小选取对应的量化表,所述目标量化表构建子单元用于根据预设条件对所述量化表进行优化,进而得到目标量化表。
- 如权利要求4所述的数据压缩装置,其中,所述预设条件为所述待压缩数据压缩处理后,其数据大小满足目标输出数据的大小,且数据损失最小。
- 如权利要求5所述的数据压缩装置,其中,所述目标量化表构建子单元用于在量化表选取之后,以量化表中的量化步长对相对应的变换系数进行量化处理,并将所得的量化系数进行后续压缩处理,然后比较最终得到的压缩数据的大小与目标输出数据大小,若压缩数据大于或等于目标输出数据,则终止优化,该原量化步长即为目标量化步长;若压缩数据小于目标输出数据,则将该系数上的量化步长值减1,再次重复以上的量化处理步骤以及后续的压缩处理和比较步骤,直到获得的压缩数据大于或等于目标输出数据;若一直到量化步长为1,压缩数据依然小于目标输出数据,取数据损失量与待压缩数据比值最小时的量化步长为该系数的目标量化步长。
- 如权利要求4所述的数据压缩装置,其中,所述目标量化表为目标压缩率取最小值时对应的优化后的量化表。
- 如权利要求4所述的数据压缩装置,其中,所述目标量化表为优化后的量化表加权平均后得到的量化表。
- 如权利要求1所述的数据压缩装置,其中,所述后处理单元包括编码处理子单元,用于对量化压缩处理后的数据进行编码处理。
- 如权利要求9所述的数据压缩装置,其中,所述编码处理子单元包括熵编码器,所述熵编码器用于对量化压缩处理后的数据进行熵编码。
- 一种数据压缩方法,其包括:通过预处理单元,对待压缩数据进行预处理;通过量化表处理单元,根据目标压缩率,确定目标量化表,所述目标量化表内的量化系数使得数据失真率与压缩率满足预设条件;通过量化单元,使用所述目标量化表对预处理后的数据进行量化压缩处理;通过后处理单元,对量化压缩后的数据进行后续处理,得到所述待压缩数据对应的压缩数据。
- 如权利要求11所述的数据压缩方法,其中,所述对待压缩数据进行预处理的步骤包括:通过数据划分子单元,对所述待压缩数据进行划分处理;通过系数变换子单元,对划分后的待压缩数据进行系数变换处理。
- 如权利要求12所述的数据压缩方法,其中,所述对划分后的待压缩数据进行系数变换处理的步骤包括:通过离散余弦正交换变换器,根据离散余弦正变换公式将划分后的待压缩数据转变为相对应的变换系数。
- 如权利要求11所述的数据压缩方法,其中,所述根据目标压缩率,确定目标量化表的步骤包括:通过量化表选取子单元,根据所述目标压缩率的大小选取对应的量化表;通过目标量化表构建子单元,根据预设条件对所述量化表进行优化,进而得到目标量化表。
- 如权利要求14所述的数据压缩方法,其中,所述根据所述目标压缩率的大小选取对应的量化表的步骤包括:根据待压缩数据的大小和对应的输出数据的大小确定目标压缩率的大小;根据所述目标压缩率的大小选取对应的量化表。
- 如权利要求14所述的数据压缩方法,其中,所述根据预设条件对所述量化表进行优化的步骤包括:以量化表中的量化步长对相对应的变换系数进行量化处理,并将所得的量化系数进行后续压缩处理,然后比较最终得到的压缩数据的大小与目标输出数据大小;若压缩数据大于或等于目标输出数据,则终止优化,该原量化步长即为目标量化步长;若压缩数据小于目标输出数据,则将该系数上的量化步长值减1,再次重复以上的量化处理步骤以及后续的压缩处理和比较步骤,直到获得的压缩数据大于或等于目标输出数据;若一直到量化步长为1,压缩数据依然小于目标输出数据,取数据损失量与待压缩数据比值最小时的量化步长为该系数的目标量化步长。
- 如权利要求16所述的数据压缩方法,其中,所述根据预设条件对所述量化表进行优化为对量化表内系数的逐一优化。
- 如权利要求16所述的数据压缩装置,其中,所述根据预设条件对所述量化表进行优化为对量化表内所有系数的同步优化。
- 如权利要求16所述的数据压缩装置,其中,所述进而得到目标量化表的步骤包括:对优化后的量化表加权平均,得到目标量化表。
- 如权利要求11所述的数据压缩方法,其中,所述对量化压缩后的数据进行后续处理的步骤包括:对量化压缩处理后的数据进行熵编码处理。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US16/618,911 US11494946B2 (en) | 2019-08-12 | 2019-11-12 | Data compression device and compression method configured to gradually adjust a quantization step size to obtain an optimal target quantization step size |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910737895.X | 2019-08-12 | ||
| CN201910737895.XA CN110505484A (zh) | 2019-08-12 | 2019-08-12 | 数据压缩装置及压缩方法 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021027144A1 true WO2021027144A1 (zh) | 2021-02-18 |
Family
ID=68587136
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/117688 Ceased WO2021027144A1 (zh) | 2019-08-12 | 2019-11-12 | 数据压缩装置及压缩方法 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US11494946B2 (zh) |
| CN (1) | CN110505484A (zh) |
| WO (1) | WO2021027144A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116450592A (zh) * | 2022-12-30 | 2023-07-18 | 湖北华数新一代智能数控系统创新中心有限公司 | 一种基于工业大数据特征的工况自适应压缩方法及系统 |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114816222B (zh) * | 2021-01-22 | 2025-06-06 | 伊姆西Ip控股有限责任公司 | 数据压缩方法、电子设备和计算机程序产品 |
| CN116600106B (zh) * | 2023-05-18 | 2024-04-09 | 深圳聚源视芯科技有限公司 | 一种动态调整压缩率的图像压缩方法及系统 |
| CN119728973B (zh) * | 2025-02-27 | 2025-06-06 | 山东云海国创云计算装备产业创新中心有限公司 | 一种图像压缩方法、设备、介质及计算机程序产品 |
| CN120568067B (zh) * | 2025-08-01 | 2025-10-21 | 北京流金岁月科技有限公司 | 一种基于机器学习的图文影像数据处理系统及方法 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003304404A (ja) * | 2002-04-09 | 2003-10-24 | Canon Inc | 画像符号化装置 |
| CN101176351A (zh) * | 2005-03-22 | 2008-05-07 | 高通股份有限公司 | 动态缩放文件编码 |
| CN101432803A (zh) * | 2006-04-26 | 2009-05-13 | 索尼株式会社 | 编码方法和编码装置 |
| CN101795412A (zh) * | 2004-07-14 | 2010-08-04 | 喷流数据有限公司 | 用于数据压缩优化的方法和系统 |
| CN104581158A (zh) * | 2013-10-16 | 2015-04-29 | 中兴通讯股份有限公司 | 量化表、图像压缩处理方法、装置、终端及图像搜索系统 |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5724453A (en) * | 1995-07-10 | 1998-03-03 | Wisconsin Alumni Research Foundation | Image compression system and method having optimized quantization tables |
| KR100438856B1 (ko) * | 2001-06-14 | 2004-07-05 | 엘지전자 주식회사 | 능동적인 테이블 생성에의한 양자화/역양자화 방법 및 장치 |
| US7403561B2 (en) * | 2003-04-04 | 2008-07-22 | Avid Technology, Inc. | Fixed bit rate, intraframe compression and decompression of video |
| JP4725217B2 (ja) * | 2005-07-11 | 2011-07-13 | 株式会社ニコン | 撮像装置 |
| KR20070024211A (ko) * | 2005-08-26 | 2007-03-02 | 삼성전자주식회사 | 영상압축장치 및 방법 |
| CN1972445A (zh) * | 2005-11-22 | 2007-05-30 | 映佳科技股份有限公司 | 可更新量化表的视讯编码器及视讯编码方法 |
| US20080285866A1 (en) | 2007-05-16 | 2008-11-20 | Takashi Ishikawa | Apparatus and method for image data compression |
| JP2008312193A (ja) * | 2007-05-16 | 2008-12-25 | Olympus Imaging Corp | 画像データ圧縮装置、画像データ圧縮方法およびプログラム |
| CN102595138B (zh) * | 2012-02-29 | 2014-04-23 | 北京大学 | 图像压缩的方法及装置、终端 |
| CN105407352A (zh) * | 2015-11-23 | 2016-03-16 | 小米科技有限责任公司 | 图像压缩方法、装置及服务器 |
-
2019
- 2019-08-12 CN CN201910737895.XA patent/CN110505484A/zh active Pending
- 2019-11-12 WO PCT/CN2019/117688 patent/WO2021027144A1/zh not_active Ceased
- 2019-11-12 US US16/618,911 patent/US11494946B2/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003304404A (ja) * | 2002-04-09 | 2003-10-24 | Canon Inc | 画像符号化装置 |
| CN101795412A (zh) * | 2004-07-14 | 2010-08-04 | 喷流数据有限公司 | 用于数据压缩优化的方法和系统 |
| CN101176351A (zh) * | 2005-03-22 | 2008-05-07 | 高通股份有限公司 | 动态缩放文件编码 |
| CN101432803A (zh) * | 2006-04-26 | 2009-05-13 | 索尼株式会社 | 编码方法和编码装置 |
| CN104581158A (zh) * | 2013-10-16 | 2015-04-29 | 中兴通讯股份有限公司 | 量化表、图像压缩处理方法、装置、终端及图像搜索系统 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116450592A (zh) * | 2022-12-30 | 2023-07-18 | 湖北华数新一代智能数控系统创新中心有限公司 | 一种基于工业大数据特征的工况自适应压缩方法及系统 |
| CN116450592B (zh) * | 2022-12-30 | 2024-01-02 | 湖北华数新一代智能数控系统创新中心有限公司 | 一种基于工业大数据特征的工况自适应压缩方法及系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110505484A (zh) | 2019-11-26 |
| US20210366157A1 (en) | 2021-11-25 |
| US11494946B2 (en) | 2022-11-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2021027144A1 (zh) | 数据压缩装置及压缩方法 | |
| JP5107495B2 (ja) | 品質ベースのイメージ圧縮 | |
| US6757438B2 (en) | Method and apparatus for video compression using microwavelets | |
| AU735938B2 (en) | Adaptive rate control for digital video compression | |
| US6031937A (en) | Method and apparatus for video compression using block and wavelet techniques | |
| JP6141295B2 (ja) | 知覚的に無損失のおよび知覚的に強調された画像圧縮システムならびに方法 | |
| JP4365957B2 (ja) | 画像処理方法及びその装置及び記憶媒体 | |
| CN112565757B (zh) | 基于通道差异化的点云属性编码及解码方法、装置及系统 | |
| JPH0746596A (ja) | イントラ−ブロックdc変換係数量子化方法 | |
| WO2010052833A1 (ja) | 画像符号化装置及び画像復号装置 | |
| JP2018524871A5 (zh) | ||
| JP2008527789A (ja) | エントロピー符号化方法 | |
| CN103458242A (zh) | 基于颜色分类与聚类的图像压缩和解压缩方法 | |
| CN109324778B (zh) | 补偿表压缩方法 | |
| CN107483850A (zh) | 一种低延迟的高清数字图像传输方法 | |
| JPH09200777A (ja) | 映像信号符号化方法及び映像信号符号化装置 | |
| CN106534870B (zh) | 一种基于rgb源视频的率失真优化编码方法 | |
| KR101320611B1 (ko) | 양자화 파라미터가 확장된 N bit 영상 데이터부호화/복호화 방법 및 장치 | |
| JPH11164152A (ja) | カラー画像データ圧縮装置 | |
| Lamsrichan | Straightforward Color image compression using true-mean multi-level block truncation coding | |
| KR100566290B1 (ko) | 스캔 테이블을 이용한 영상 주사방법과 그를 적용한 이산코사인 변환 장치 | |
| TWI789187B (zh) | 壓縮方法與相關的電子裝置 | |
| US8249367B2 (en) | Apparatus and method for encoding an image for a mobile telecommunication handset | |
| JP2005522957A (ja) | コーディング/デコーディング方法及びコーディング/デコーディング装置 | |
| JPH0276385A (ja) | 画像データ圧縮装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19941363 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19941363 Country of ref document: EP Kind code of ref document: A1 |