CN108989805A - Image processing method and device based on WebP image compression algorithm - Google Patents

Image processing method and device based on WebP image compression algorithm Download PDF

Info

Publication number
CN108989805A
CN108989805A CN201810573736.6A CN201810573736A CN108989805A CN 108989805 A CN108989805 A CN 108989805A CN 201810573736 A CN201810573736 A CN 201810573736A CN 108989805 A CN108989805 A CN 108989805A
Authority
CN
China
Prior art keywords
block
sub
macro
macro block
processing
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.)
Pending
Application number
CN201810573736.6A
Other languages
Chinese (zh)
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810573736.6A priority Critical patent/CN108989805A/en
Publication of CN108989805A publication Critical patent/CN108989805A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods 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/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods 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/17Methods 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/176Methods 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 block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods 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/186Methods 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a kind of image processing method based on WebP image compression algorithm, device, equipment and computer readable storage mediums, it include: the YUV image data for obtaining image to be processed, after the Y data channel of the YUV image data to be divided into the Y macro block of multiple default sizes, each Y macro block is divided into the sub-block of multiple default sizes;According to the dependence between sub-block in the Y macro block, the traversal order of sub-block in the Y macro block is recombinated;The sub-block in each Y macro block is handled according to the sub-block traversal order after recombination, to obtain the data processed result of each Y macro block in the Y data channel;Using the data processed result of each Y macro block in the Y data channel, the brightness value of described image to be detected is obtained.Image processing method, device, equipment and computer readable storage medium provided by the present invention, execute the sub-block in macro block can with flowing water, improve throughput performance of the Web graph as compression algorithm.

Description

Image processing method and device based on WebP image compression algorithm
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of image based on WebP image compression algorithm Processing method, device, equipment and computer readable storage medium.
Background technique
As the development of the image capture devices such as mobile phone, plate, digital camera and picture pixels scale are promoted, cause mutually Networking image data scale exponentially increases.It recent studies have shown that, 2016 to 2021, number on data center server Four times will be increased according to storage size, rise to 2.6ZB from 663EB, wherein most of data storage derives from image and video. For example, Facebook user's uploading pictures scale in 2013 has surpassed 250,000,000,000, until 2015, Facebook increases closely daily 2000000000 images;According to Tencent's newest statistics in 2016, because QQ, wechat etc. are applied on Tencent's data center server, often It increases 8,000,000,000 output image memories newly.This will bring serious challenge to the data storage of data center server and network bandwidth.
Due to current JPEG picture file format Coding Compression Algorithm optimization theoretically almost reached it is ultimate attainment, in order to The size of image storage is reduced, it is often existing to substitute using the image file format WebP with higher compression ratio Jpeg image file, compared with JPEG Lossy Compression Algorithm, WebP image Lossy Compression Algorithm can reduce 30% or so text Part size.Code conversion, Neng Gouyou are carried out to jpeg file using WebP image compression algorithm on data center server The pressure of effect alleviated picture scale and increase brought data center's storage and network bandwidth access.
But WebP image Lossy Compression Algorithm data handling procedure computation complexity is higher, to Y data channel and UV number It is separately handled according to channel.UV data channel only needs to carry out the prediction, transformation, quantization, compressed encoding mistake of macro block rank Journey.And the channel Y needs to predict each macro block rank, converts, quantifies, the process of compressed encoding, it is also necessary to each macro Each sub-block in block carries out primary duplicate prediction, transformation, quantization, compression encoding process.At to Y data channel When reason, firstly, being handled in macro block rank, the macro block data is predicted using macroblock boundaries, selects optimal macro block Prediction mode obtains being compressed according to the residual values of optimal prediction modes computing macro block initial data and prediction data The Image Residual data macro of coding;Secondly, utilizing DCT (Discrete Cosine Transform) transformation, WHT (Walsh-Hadamard Transform) transformation, quantization step, the residual error coefficient after compression processing is calculated.In sub-block When rank carries out the processing of Y data channel, individually prediction process is carried out for each sub-block, selects the optimal pre- of each sub-block Survey mode calculates the residual values of each sub-block initial data and prediction data according to the optimal prediction modes of each sub-block;Its Secondary, using dct transform, WHT transformation, quantization step, after each sub-block compression processing is calculated residual error coefficient.By right Than the residual error coefficient obtained in macro block rank and sub-block level, optimal sub-block or macro-block skip mode are selected.If final choosing What is selected is sub-block prediction mode, for each sub-block in Y macro block, requires individually to be predicted, to the residual of each sub-block Poor coefficient carries out inverse quantization, DCT inverse transformation, WHT inverse transformation, boundary value needed for obtaining adjacent sub-blocks prediction.
When carrying out WebP algorithm based on OpenCL and realizing, such as it can only handle and could handle the 3rd after the 2nd Y macro block A Y macro block could start the 4th Y macro block after having handled the 3rd Y macro block;And the sub-block process flow in Y data channel It can only serially execute in this way, the assembly line that cannot achieve between sub-block executes, and causes overall throughput lower, algorithm performance can not It improves.
In summary as can be seen that how to realize that flowing water execution is current problem to be solved between sub-block in Y macro block.
Summary of the invention
The object of the present invention is to provide a kind of image processing method based on WebP image compression algorithm, device, equipment with And computer readable storage medium, it has solved to cannot achieve in macro block flowing water between sub-block when Webp algorithm execution in the prior art The problem of execution.
In order to solve the above technical problems, the present invention provides a kind of image processing method based on WebP image compression algorithm, Include: the YUV image data for obtaining image to be processed, the Y data channel of the YUV image data is divided into multiple default After the Y macro block of size, each Y macro block is divided into the sub-block of multiple default sizes;According between sub-block in the Y macro block according to The relationship of relying, recombinates the traversal order of sub-block in the Y macro block;It is macro to each Y according to the sub-block traversal order after recombination Sub-block in block is handled, to obtain the data processed result of each Y macro block in the Y data channel;Utilize the Y The data processed result of each Y macro block, obtains the brightness value of described image to be detected in data channel.
Preferably, the sub-block traversal order according to after recombination, which handle to the sub-block in each Y macro block, includes:
The dependence of the left margin of right margin and the second sub-block according to the first sub-block in the Y macro block completes institute After the processing for stating the first sub-block, second sub-block is handled;After completing to the processing of second sub-block, to the Y While the third sub-block of macro block is handled, the 4th sub-block of the Y macro block is handled;Wherein, it is macro to choose the Y Public sub-block is as first sub-block in the left margin of block and coboundary;The left margin of second sub-block and described the The right margin of one sub-block is adjacent;The left margin of the third sub-block is adjacent with the right margin of second sub-block;4th son The coboundary of block is adjacent with the lower boundary of first sub-block.
Preferably, after the completion is to the processing of second sub-block, the third sub-block of the Y macro block is handled While, include: after handling the 4th sub-block of the Y macro block
After the third sub-block is completed in processing, the 5th sub-block of the Y macro block is handled;The third sub-block After the completion of processing with the 4th sub-block, the 6th sub-block of the Y macro block is handled;At the 6th sub-block After the completion of reason, while the 7th sub-block and the 8th sub-block of the Y macro block are handled;Wherein, the left side of the 5th sub-block Boundary is adjacent with the right margin of the third macro block, the left margin and the right margin phase of the 4th sub-block of the 6th sub-block It is adjacent;The left margin of 7th sub-block is adjacent with the right margin of the 6th sub-block;The coboundary of 8th sub-block with it is described The lower boundary of 4th sub-block is adjacent.
Preferably, after the completion of the processing to the 6th sub-block, while to the 7th sub-block and the 8th of the Y macro block Sub-block includes: after being handled
After the 7th sub-block is completed in processing, the 9th sub-block and the tenth sub-block to the Y macro block are located simultaneously Reason;After the completion of the tenth sub-block processing, the 11st sub-block and the 12nd sub-block to the Y macro block are handled simultaneously;It is right Tridecyne and the 14th sub-block after the completion of the 11st sub-block processing, while to the Y macro block are handled simultaneously; Wherein, the left margin of the 9th sub-block is adjacent with the right margin of the 7th macro block, the left margin of the tenth sub-block with The right margin of 8th sub-block is adjacent;The left margin of 11st sub-block is adjacent with the right margin of the tenth sub-block;Institute The coboundary for stating the 12nd sub-block is adjacent with the lower boundary of the 8th sub-block;The left margin of 13rd sub-block with it is described The right margin of 11st sub-block is adjacent;The left margin of 14th sub-block and the right margin of the 12nd sub-block are adjacent.
Preferably, the YUV image data for obtaining image to be processed, by the Y data channel of the YUV image data After being divided into the Y macro block of multiple default sizes, include: by the sub-block that each Y macro block is divided into multiple default sizes
It, will be every 16 × 16 in the Y data channel of the YUV image data after the YUV image data for obtaining image to be processed A pixel Y data forms a Y macro block, wherein each Y macro block laterally accounts for 16 location of pixels, longitudinally accounts for 16 pixel positions It sets;After the Y data channel to be divided into the Y macro block of multiple 16 × 16 sizes, each Y macro block is divided into 16 4 × 4 big Small sub-block.
The present invention also provides a kind of image processing apparatus based on WebP image compression algorithm, comprising:
Module is obtained, the YUV image data of image to be processed are obtained, the Y data channel of the YUV image data is drawn After being divided into the Y macro block of multiple default sizes, each Y macro block is divided into the sub-block of multiple default sizes;
Recombination module, for according to the dependence between sub-block in the Y macro block, to the traversal of sub-block in the Y macro block Sequence is recombinated;
Processing module, for being handled according to the sub-block traversal order after recombination the sub-block in each Y macro block, from And obtain the data processed result of each Y macro block in the Y data channel;
Computing module obtains described to be checked for the data processed result using each Y macro block in the Y data channel The brightness value of altimetric image.
Preferably, the processing module is specifically used for:
The dependence of the left margin of right margin and the second sub-block according to the first sub-block in the Y macro block completes institute After the processing for stating the first sub-block, second sub-block is handled;After completing to the processing of second sub-block, to the Y While the third sub-block of macro block is handled, the 4th sub-block of the Y macro block is handled;Wherein, it is macro to choose the Y Public sub-block is as first sub-block in the left margin of block and coboundary;The left margin of second sub-block and described the The right margin of one sub-block is adjacent;The left margin of the third sub-block is adjacent with the right margin of second sub-block;4th son The coboundary of block is adjacent with the lower boundary of first sub-block.
Preferably, after the completion is to the processing of second sub-block, the third sub-block of the Y macro block is handled While, include: after handling the 4th sub-block of the Y macro block
After the third sub-block is completed in processing, the 5th sub-block of the Y macro block is handled;The third sub-block After the completion of processing with the 4th sub-block, the 6th sub-block of the Y macro block is handled;At the 6th sub-block After the completion of reason, while the 7th sub-block and the 8th sub-block of the Y macro block are handled;Wherein, the left side of the 5th sub-block Boundary is adjacent with the right margin of the third macro block, the left margin and the right margin phase of the 4th sub-block of the 6th sub-block It is adjacent;The left margin of 7th sub-block is adjacent with the right margin of the 6th sub-block;The coboundary of 8th sub-block with it is described The lower boundary of 4th sub-block is adjacent.
The present invention also provides a kind of image processing equipments based on WebP image compression algorithm, comprising:
Memory, for storing computer program;Processor realizes above-mentioned one when for executing the computer program The step of planting the image processing method based on WebP image compression algorithm.
The present invention also provides a kind of computer readable storage medium, it is stored on the computer readable storage medium Computer program, the computer program realize a kind of above-mentioned figure based on WebP image compression algorithm when being executed by processor As the step of processing method.
Image processing method provided by the present invention based on WebP image compression algorithm, obtains the YUV of image to be processed After image data, after the Y data channel in the YUV image data to be divided into the Y macro block of multiple default sizes, by each Y Macro block is divided into the sub-block of multiple default sizes.According to the dependence between sub-block in the Y macro block, to sub in the Y macro block The traversal order of block is recombinated, and is handled according to the sub-block traversal order after recombination the sub-block in each Y macro block, from And obtain the data processed result of each Y macro block in the Y data channel;Utilize each Y macro block in the Y data channel Data processed result obtains the brightness value of described image to be detected.It is preferential to locate in image processing method provided by the present invention Reason causes the sub-block of dependence to improve to make the sub-block in the Y macro block that can execute with flowing water to adjacent sub-blocks Throughput performance of the Web graph as compression algorithm.
Detailed description of the invention
For the clearer technical solution for illustrating the embodiment of the present invention or the prior art, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without creative efforts, may be used also for those of ordinary skill in the art To obtain other drawings based on these drawings.
Fig. 1 is a kind of the first tool of image processing method based on WebP image compression algorithm provided by the present invention The flow chart of body embodiment;
Fig. 2 is that second of the image processing method provided by the present invention based on WebP image compression algorithm is specific real Apply the flow chart of example;
Fig. 3 is dependence schematic diagram of the sub-block data to data boundary;
Fig. 4 is the dependence schematic diagram in macro block between sub-block;
Fig. 5 is the practical traversal order schematic diagram of sub-block in macro block after the recombination of sub-block traversal order;
Fig. 6 is a kind of structure of the image processing apparatus based on WebP image compression algorithm provided in an embodiment of the present invention Block diagram.
Specific embodiment
Core of the invention be to provide a kind of image processing method based on WebP image compression algorithm, device, equipment with And computer readable storage medium, it execute the sub-block in macro block can with flowing water, improve Web graph handling up as compression algorithm Rate performance.
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawing and specific embodiment party The present invention is described in further detail for formula.Obviously, described embodiments are only a part of the embodiments of the present invention, and The embodiment being not all of.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work Under the premise of every other embodiment obtained, shall fall within the protection scope of the present invention.
Referring to FIG. 1, Fig. 1 is the of the image processing method provided by the present invention based on WebP image compression algorithm A kind of flow chart of specific embodiment;Specific steps are as follows:
Step S101: obtaining the YUV image data of image to be processed, and the Y data channel of the YUV image data is drawn After being divided into the Y macro block of multiple default sizes, each Y macro block is divided into the sub-block of multiple default sizes;
It, will be every 16 × 16 in the Y data channel of the YUV image data after the YUV image data for obtaining image to be processed A pixel Y data forms a Y macro block, wherein each Y macro block laterally accounts for 16 location of pixels, longitudinally accounts for 16 pixel positions It sets;It is unsatisfactory for the data of 16 integral multiples for image boundary, carries out polishing by the way of replicating boundary pixel.
After the Y data channel to be divided into the Y macro block of multiple 16 × 16 sizes, each Y macro block is divided into 16 4 The sub-block of × 4 sizes.Each sub-block laterally accounts for 4 location of pixels in image Y pixel macroblock data coordinates, and longitudinal coordinate accounts for 4 location of pixels, each Y macro block include 16 4 × 4 sub-blocks altogether.
Step S102: according to the dependence between sub-block in the Y macro block, to the traversal order of sub-block in the Y macro block It is recombinated;
Step S103: being handled the sub-block in each Y macro block according to the sub-block traversal order after recombination, thus The data processed result of each Y macro block into the Y data channel;
Step S104: using the data processed result of each Y macro block in the Y data channel, the mapping to be checked is obtained The brightness value of picture.
Image processing method based on WebP image compression algorithm provided by the present embodiment, solves using OpenCL When realizing the FPGA hardware circuit Mapping implementation of WebP image Lossy Compression Algorithm, can only serially it be executed between sub-block in macro block Problem;By being recombinated to sub-block traversal order in macro block, when data boundary dependence executes program between alleviation sub-block The influence of flowing water between sub-block, improves the assembly line execution performance of sub-block in macro block, so that improving FPGA isomery accelerates WebP figure As the efficiency of compression algorithm.
Based on the above embodiment, in the present embodiment, according to the boundary dependence between sub-block in the Y macro block, to institute The first sub-block in Y macro block is stated, after the second sub-block, processing while third sub-block and four sub-blocks may be implemented, please refer to figure 2, Fig. 2 be second of specific embodiment of the image processing method provided by the present invention based on WebP image compression algorithm Flow chart;Specific steps are as follows:
Step S201: obtaining the YUV image data of image to be processed, and the Y data channel is divided into multiple 16 × 16 After the Y macro block of size, each Y macro block is divided into the sub-block of 16 4 × 4 sizes;
Step S202: the dependence of the left margin of the right margin and the second sub-block according to the first sub-block in the Y macro block is closed System is handled second sub-block after the processing for completing first sub-block;
As shown in Figure 3 and Figure 4, Fig. 3 is dependence schematic diagram of the sub-block data to data boundary;Fig. 4 is son in macro block Dependence schematic diagram between block;Sub-block index in original Y macro block is defined as y_sub [index], and y_sub [i] is indicated When traversing to the sub-block in Y macro block, i-th of sub-block index value of processing is y_sub [i].Wherein index maximum value etc. In 16, indicate to include 16 4 × 4 sub-blocks in Y macro block, sub-block order traversal mode in original Y macro block are as follows: y_sub_old [i]={ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }.
Step S203: after completing to the processing of second sub-block, the third sub-block of the Y macro block is handled Meanwhile the 4th sub-block of the Y macro block is handled;
After recombination in macro block sub-block traversal order as shown in figure 5, sub-block number in Fig. 5 indicates after recombination son in Y macro block The traversal order of block position.Sub-block public in the left margin and coboundary of the Y macro block is chosen as first sub-block; The left margin of second sub-block is adjacent with the right margin of first sub-block;The left margin of the third sub-block and described the The right margin of two sub-blocks is adjacent;The coboundary of 4th sub-block is adjacent with the lower boundary of first sub-block.
Step S204: after the third sub-block is completed in processing, the 5th sub-block of the Y macro block is handled;
Step S205: after the completion of the processing of the third sub-block and the 4th sub-block, to the 6th of the Y macro block the Sub-block is handled;
Wherein, the left margin of the 5th sub-block is adjacent with the right margin of the third macro block, a left side for the 6th sub-block Boundary is adjacent with the right margin of the 4th sub-block;The left margin and the right margin phase of the 6th sub-block of 7th sub-block It is adjacent;The coboundary of 8th sub-block is adjacent with the lower boundary of the 4th sub-block.
Step S206: same to the 9th sub-block and the tenth sub-block of the Y macro block after the 7th sub-block is completed in processing Shi Jinhang processing;
Step S207: after the completion of the tenth sub-block processing, to the 11st sub-block and the 12nd sub-block of the Y macro block It is handled simultaneously;
Step S208: after the completion of the 11st sub-block processing, while to the tridecyne and the tenth of the Y macro block Four sub-blocks are handled simultaneously;
Wherein, the left margin of the 9th sub-block is adjacent with the right margin of the 7th macro block, a left side for the tenth sub-block Boundary is adjacent with the right margin of the 8th sub-block;The left margin of 11st sub-block and the right margin of the tenth sub-block It is adjacent;The coboundary of 12nd sub-block is adjacent with the lower boundary of the 8th sub-block;The left margin of 13rd sub-block It is adjacent with the right margin of the 11st sub-block;The left margin of 14th sub-block and the right margin of the 12nd sub-block It is adjacent.
Step S209: after the processing for completing the 14th sub-block, successively the 15th sub-block and the 16th sub-block are carried out Processing, to obtain the data processed result of the Y macro block;
Wherein, the left margin of the 15th sub-block is adjacent with the right margin of the 14th sub-block, the 16th son The left margin of block is adjacent with the right margin of the 15th sub-block.
Step S210: obtaining the data processed result of each Y macro block in the Y data channel, after, utilize the Y data The data processed result of each Y macro block, obtains the brightness value of described image to be detected in channel.
Sub-block time in the present embodiment, after 4 × 4 sub-block traversal orders carry out recombination mapping in Y macro block, in Y macro block Go through sequence:
Y_sub_new [i]=y_sub_old [1,2,3], y_sub_old [5], y_sub_old [4],
y_sub_old[6,7],y_sub_old[9],y_sub_old[8],y_sub_old[10,11],
Y_sub_old [13], y_sub_old [12],? y_sub_old [14,15,16] }
Traversal order recombination is being carried out to 4 × 4 sub-block of image Y macro block data according to y_sub_new [i] mapping order, After first three complete sub-block of serial process, so that it may realize that the flowing water between remaining sub-block executes, avoiding between all sub-blocks is all string Row executes, and can be improved the performance of macro block processing on FPGA.
Image processing method based on WebP image compression algorithm provided by the present embodiment, by the son in Y macro block Block traversal order carries out recombination mapping, can be realized the flowing water in Y macro block between sub-block and executes, between because of boundary sub-block in Y macro block In macro block caused by data dependence relation between sub-block can only the poor efficiency of serial process improved, realize in macro block between sub-block The flowing water for the treatment of process improves the throughput performance of WebP image compression algorithm.
Referring to FIG. 6, Fig. 6 is a kind of image procossing based on WebP image compression algorithm provided in an embodiment of the present invention The structural block diagram of device;Specific device may include:
The image processing apparatus based on WebP image compression algorithm of the present embodiment is schemed for realizing above-mentioned based on WebP As the image processing method of compression algorithm, therefore the specific implementation in the image processing apparatus based on WebP image compression algorithm The embodiment part of the visible image processing method based on WebP image compression algorithm hereinbefore of mode, for example, obtaining module 100, recombination module 200, processing module 300, computing module 400 is respectively used to realize and above-mentioned be calculated based on WebP compression of images Step S101, S102, S103 and S104 in the image processing method of method, so, specific embodiment is referred to accordingly The description of various pieces embodiment, details are not described herein.
The specific embodiment of the invention additionally provides a kind of image processing equipment based on WebP image compression algorithm, comprising: Memory, for storing computer program;Processor realizes that above-mentioned one kind is based on when for executing the computer program The step of image processing method of WebP image compression algorithm.
The specific embodiment of the invention additionally provides a kind of computer readable storage medium, the computer-readable storage medium Computer program is stored in matter, the computer program is realized above-mentioned a kind of based on WebP image pressure when being executed by processor The step of image processing method of compression algorithm.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with its The difference of its embodiment, same or similar part may refer to each other between each embodiment.For disclosed in embodiment For device, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method Part illustrates.
Professional further appreciates that, list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, hard in order to clearly demonstrate The interchangeability of part and software generally describes each exemplary composition and step according to function in the above description. These functions are implemented in hardware or software actually, the specific application and design constraint item depending on technical solution Part.Professional technician can use different methods to achieve the described function each specific application, but this Realization should not be considered as beyond the scope of the present invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly use hardware, processor The combination of the software module or the two of execution is implemented.Software module can be placed in random access memory (RAM), memory, only Read memory (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM, Or in technical field well known to any other form of storage medium in.
Above to the image processing method provided by the present invention based on WebP image compression algorithm, device, equipment and Computer readable storage medium is described in detail.Specific case used herein is to the principle of the present invention and embodiment party Formula is expounded, and the above description of the embodiment is only used to help understand the method for the present invention and its core ideas.It should refer to It out, for those skilled in the art, without departing from the principle of the present invention, can also be to this hair Bright some improvement and modification can also be carried out, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims (10)

1. a kind of image processing method based on WebP image compression algorithm characterized by comprising
The Y data channel of the YUV image data is divided into multiple default big by the YUV image data for obtaining image to be processed After small Y macro block, each Y macro block is divided into the sub-block of multiple default sizes;
According to the dependence between sub-block in the Y macro block, the traversal order of sub-block in the Y macro block is recombinated;
The sub-block in each Y macro block is handled according to the sub-block traversal order after recombination, to obtain the Y data channel In each Y macro block data processed result;
Using the data processed result of each Y macro block in the Y data channel, the brightness value of described image to be detected is obtained.
2. image processing method as described in claim 1, which is characterized in that the sub-block traversal order pair according to after recombination Sub-block in each Y macro block carries out processing
The dependence of the left margin of right margin and the second sub-block according to the first sub-block in the Y macro block completes described the After the processing of one sub-block, second sub-block is handled;
It is macro to the Y while processing the third sub-block of the Y macro block after completing to the processing of second sub-block 4th sub-block of block is handled;
Wherein, sub-block public in the left margin and coboundary of the Y macro block is chosen as first sub-block;Second son The left margin of block is adjacent with the right margin of first sub-block;The right of the left margin of the third sub-block and second sub-block Boundary is adjacent;The coboundary of 4th sub-block is adjacent with the lower boundary of first sub-block.
3. image processing method as claimed in claim 2, which is characterized in that processing of the completion to second sub-block Afterwards, while processing the third sub-block of the Y macro block, include: after handling the 4th sub-block of the Y macro block
After the third sub-block is completed in processing, the 5th sub-block of the Y macro block is handled;
After the completion of the processing of the third sub-block and the 4th sub-block, the 6th sub-block of the Y macro block is handled;
After the completion of the 6th sub-block processing, while the 7th sub-block and the 8th sub-block of the Y macro block are handled;
Wherein, the left margin of the 5th sub-block is adjacent with the right margin of the third macro block, the left margin of the 6th sub-block It is adjacent with the right margin of the 4th sub-block;The left margin of 7th sub-block is adjacent with the right margin of the 6th sub-block;Institute The coboundary for stating the 8th sub-block is adjacent with the lower boundary of the 4th sub-block.
4. image processing method as claimed in claim 3, which is characterized in that after the completion of the processing to the 6th sub-block, Include: after handling simultaneously the 7th sub-block of the Y macro block and the 8th sub-block
After the 7th sub-block is completed in processing, the 9th sub-block and the tenth sub-block to the Y macro block are handled simultaneously;
After the completion of the tenth sub-block processing, the 11st sub-block and the 12nd sub-block to the Y macro block are handled simultaneously;
After the completion of the 11st sub-block processing, while the tridecyne and the 14th sub-block of the Y macro block are carried out simultaneously Processing;
Wherein, the left margin of the 9th sub-block is adjacent with the right margin of the 7th macro block, the left margin of the tenth sub-block It is adjacent with the right margin of the 8th sub-block;The left margin of 11st sub-block is adjacent with the right margin of the tenth sub-block; The coboundary of 12nd sub-block is adjacent with the lower boundary of the 8th sub-block;The left margin of 13rd sub-block with it is described The right margin of 11st sub-block is adjacent;The left margin of 14th sub-block and the right margin of the 12nd sub-block are adjacent.
5. image processing method as described in claim 1, which is characterized in that the YUV image number for obtaining image to be processed According to after the Y data channel of the YUV image data to be divided into the Y macro block of multiple default sizes, each Y macro block is divided into The sub-block of multiple default sizes includes:
After the YUV image data for obtaining image to be processed, by 16 × 16 pictures every in the Y data channel of the YUV image data Plain Y data forms a Y macro block, wherein each Y macro block laterally accounts for 16 location of pixels, longitudinally accounts for 16 location of pixels;
After the Y data channel to be divided into the Y macro block of multiple 16 × 16 sizes, each Y macro block is divided into 16 4 × 4 big Small sub-block.
6. a kind of image processing apparatus based on WebP image compression algorithm characterized by comprising
Module is obtained, the YUV image data of image to be processed is obtained, the Y data channel of the YUV image data is divided into more After the Y macro block of a default size, each Y macro block is divided into the sub-block of multiple default sizes;
Recombination module, for according to the dependence between sub-block in the Y macro block, to the traversal order of sub-block in the Y macro block It is recombinated;
Processing module, for being handled according to the sub-block traversal order after recombination the sub-block in each Y macro block, to obtain The data processed result of each Y macro block in the Y data channel;
Computing module obtains the mapping to be checked for the data processed result using each Y macro block in the Y data channel The brightness value of picture.
7. image processing apparatus as claimed in claim 6, which is characterized in that the processing module is specifically used for:
The dependence of the left margin of right margin and the second sub-block according to the first sub-block in the Y macro block completes described the After the processing of one sub-block, second sub-block is handled;
It is macro to the Y while processing the third sub-block of the Y macro block after completing to the processing of second sub-block 4th sub-block of block is handled;
Wherein, sub-block public in the left margin and coboundary of the Y macro block is chosen as first sub-block;Second son The left margin of block is adjacent with the right margin of first sub-block;The right of the left margin of the third sub-block and second sub-block Boundary is adjacent;The coboundary of 4th sub-block is adjacent with the lower boundary of first sub-block.
8. image processing apparatus as claimed in claim 7, which is characterized in that processing of the completion to second sub-block Afterwards, while processing the third sub-block of the Y macro block, include: after handling the 4th sub-block of the Y macro block
After the third sub-block is completed in processing, the 5th sub-block of the Y macro block is handled;
After the completion of the processing of the third sub-block and the 4th sub-block, the 6th sub-block of the Y macro block is handled;
After the completion of the 6th sub-block processing, while the 7th sub-block and the 8th sub-block of the Y macro block are handled;
Wherein, the left margin of the 5th sub-block is adjacent with the right margin of the third macro block, the left margin of the 6th sub-block It is adjacent with the right margin of the 4th sub-block;The left margin of 7th sub-block is adjacent with the right margin of the 6th sub-block;Institute The coboundary for stating the 8th sub-block is adjacent with the lower boundary of the 4th sub-block.
9. a kind of image processing equipment based on WebP image compression algorithm characterized by comprising
Memory, for storing computer program;
Processor is realized a kind of based on WebP figure as described in any one of claim 1 to 5 when for executing the computer program As compression algorithm image processing method the step of.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program is realized a kind of based on WebP image as described in any one of claim 1 to 5 when the computer program is executed by processor The step of image processing method of compression algorithm.
CN201810573736.6A 2018-06-06 2018-06-06 Image processing method and device based on WebP image compression algorithm Pending CN108989805A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810573736.6A CN108989805A (en) 2018-06-06 2018-06-06 Image processing method and device based on WebP image compression algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810573736.6A CN108989805A (en) 2018-06-06 2018-06-06 Image processing method and device based on WebP image compression algorithm

Publications (1)

Publication Number Publication Date
CN108989805A true CN108989805A (en) 2018-12-11

Family

ID=64540758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810573736.6A Pending CN108989805A (en) 2018-06-06 2018-06-06 Image processing method and device based on WebP image compression algorithm

Country Status (1)

Country Link
CN (1) CN108989805A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1529512A (en) * 2003-10-17 2004-09-15 中国科学院计算技术研究所 Flow-line-based frame predictive mode coding acceleration method
CN103763561A (en) * 2014-01-19 2014-04-30 林雁 H264 video code parallel operation method
CN106797479A (en) * 2014-10-09 2017-05-31 高通股份有限公司 Prediction limitation is replicated for the intra block of parallel processing
CN106851298A (en) * 2017-03-22 2017-06-13 腾讯科技(深圳)有限公司 A kind of efficient video coding method and device
US20170264784A1 (en) * 2014-12-16 2017-09-14 Guangzhou Ucweb Computer Technology Co., Ltd. Picture data transmission method and device
CN107613301A (en) * 2017-10-17 2018-01-19 郑州云海信息技术有限公司 A kind of image processing method and device
CN107820091A (en) * 2017-11-23 2018-03-20 郑州云海信息技术有限公司 A kind of image processing method, system and a kind of image processing device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1529512A (en) * 2003-10-17 2004-09-15 中国科学院计算技术研究所 Flow-line-based frame predictive mode coding acceleration method
CN103763561A (en) * 2014-01-19 2014-04-30 林雁 H264 video code parallel operation method
CN106797479A (en) * 2014-10-09 2017-05-31 高通股份有限公司 Prediction limitation is replicated for the intra block of parallel processing
US20170264784A1 (en) * 2014-12-16 2017-09-14 Guangzhou Ucweb Computer Technology Co., Ltd. Picture data transmission method and device
CN106851298A (en) * 2017-03-22 2017-06-13 腾讯科技(深圳)有限公司 A kind of efficient video coding method and device
CN107613301A (en) * 2017-10-17 2018-01-19 郑州云海信息技术有限公司 A kind of image processing method and device
CN107820091A (en) * 2017-11-23 2018-03-20 郑州云海信息技术有限公司 A kind of image processing method, system and a kind of image processing device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
万帅等: "《新一代高效视频编码H.265/HEVC:原理、标准与实现》", 30 December 2014, 电子工业出版社 *

Similar Documents

Publication Publication Date Title
US10412393B2 (en) Intra-frame encoding method, intra-frame decoding method, encoder, and decoder
TW201826786A (en) Low-complexity sign prediction for video coding
CN104683805B (en) Image coding, coding/decoding method and device
CN105100814B (en) Image coding and decoding method and device
CN110691250B (en) Image compression apparatus combining block matching and string matching
WO2020172907A1 (en) Method and device for selecting context model of quantization coefficient end flag bit
CN104125466A (en) GPU (Graphics Processing Unit)-based HEVC (High Efficiency Video Coding) parallel decoding method
US20180199058A1 (en) Video encoding and decoding method and device
US20230336733A1 (en) Sample Adaptive Offset
CN108769684A (en) Image processing method based on WebP image compression algorithms and device
CN111432213B (en) Method and apparatus for tile data size coding for video and image compression
CN105847823B (en) A method of memory bandwidth, which is reduced, in video decoding uses
CN104811731A (en) Multilayer sub-block matching image compression method
CN110691242B (en) Large-format remote sensing image lossless compression method
CN108989805A (en) Image processing method and device based on WebP image compression algorithm
CN115442617A (en) Video processing method and device based on video coding
CN105812824A (en) Video image encoding method and device
CN104956677A (en) Combined parallel and pipelined video encoder
CN116132759B (en) Audio and video stream synchronous transmission method and device, electronic equipment and storage medium
CN108900842B (en) Y data compression processing method, device and equipment and WebP compression system
CN113038131A (en) Video encoding method, video encoding device, computer equipment and storage medium
CN108419078B (en) Image processing method and device based on WebP image compression algorithm
CN107172425B (en) Thumbnail generation method and device and terminal equipment
WO2023185806A9 (en) Image coding method and apparatus, image decoding method and apparatus, and electronic device and storage medium
CN110099279B (en) Method for adjusting lossy compression based on hardware

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181211