CN107592450A - A kind of media data processing method and device - Google Patents
A kind of media data processing method and device Download PDFInfo
- Publication number
- CN107592450A CN107592450A CN201710769051.4A CN201710769051A CN107592450A CN 107592450 A CN107592450 A CN 107592450A CN 201710769051 A CN201710769051 A CN 201710769051A CN 107592450 A CN107592450 A CN 107592450A
- Authority
- CN
- China
- Prior art keywords
- media data
- frame buffer
- resolution
- media
- 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.)
- Granted
Links
Abstract
The embodiment of the invention discloses a kind of media data processing method and device, wherein media data processing method includes:If detecting instruction for previewing, the first frame buffer is created, first frame buffer is used for the media data for drawing first resolution;The first media data is obtained, first media data is the first resolution;First media data is plotted in first frame buffer, and shows previewing media corresponding to the first media data described in first frame buffer;If detecting media generation instruction, the second frame buffer is created, second frame buffer is used for the media data for drawing second resolution, and the second resolution is more than the first resolution;The second media data is obtained, second media data is the second resolution;Second media data is plotted in second frame buffer, and second media data in second frame buffer, generates target medium.Using the embodiment of the present invention, the quality of image in the case where image processing speed is effectively ensured, can be improved.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of media data processing method and device.
Background technology
With the continuous development of computer technology, the application on mobile terminal is more and more, wherein, it is common on mobile terminal
Media application have application and/or the application of recorded video for taking pictures.Media application passes through shooting during operation
Head collection media data, and various functions processing is carried out to media data.At present, the resolution ratio of mobile terminal camera is supported
720p and 1080p, but because media application to media data when carrying out function treatment, the performance of internal processor is limited to,
The media data of small in resolution would generally be selected, and then media quality is with regard to poor.The figure increased income is being utilized for example, taking pictures and applying
When carrying out various functions processing as processing engine (Open Graphics Library, OpenGL), graphics processor is limited to
The performance of (Graphics Processing Unit, GPU), therefore the resolution ratio of the camera selected is 720p, so pre-
The resolution ratio for the image that phase user of looking at is seen only has 720p, and image generation phase is taken the photo resolution come and also only had
720p, this reduces the quality of image while very fast processing speed is ensured.
The content of the invention
, can be with the embodiments of the invention provide method, apparatus, electronic equipment and the storage medium of a kind of media data processing
Realize in the case where processing speed is effectively ensured, improve the quality of generation media.
In a first aspect, the embodiment of the present invention provides a kind of method of media data processing, including:
If detecting instruction for previewing, the first frame buffer is created, first frame buffer is used for the matchmaker for drawing first resolution
Volume data;
The first media data is obtained, first media data is the first resolution;
First media data is plotted in first frame buffer, and shown first described in first frame buffer
Previewing media corresponding to media data;
If detecting photographing instruction, the second frame buffer is created, second frame buffer is used for the matchmaker for drawing second resolution
Volume data, the second resolution are more than the first resolution;
The second media data is obtained, second media data is the second resolution;
Second media data is plotted in second frame buffer, and described in second frame buffer
Two media datas, generate target medium.
In a kind of possible design, the first media data of the acquisition includes:
The 3rd media data of camera collection is obtained, the 3rd media data is the 3rd resolution ratio, described 3rd point
Resolution is more than the first resolution;
Processing is compressed to the 3rd media data, obtains first media data.
In a kind of possible design, the 3rd resolution ratio is identical with the second resolution.
It is described that first media data is being plotted in first frame buffer in a kind of possible design, and show
Show described in first frame buffer before previewing media corresponding to the first media data, in addition to:
Objective function processing is carried out to first media data;
It is described that first media data is plotted in first frame buffer, and show described in first frame buffer
Previewing media corresponding to first media data, including:
First media data after the objective function processing will be carried out and be plotted in first frame buffer, and shown
Previewing media corresponding to first media data after the objective function processing is carried out in first frame buffer.
It is described that second media data is being plotted in second frame buffer, and root in a kind of possible design
According to second media data in second frame buffer, before generating target medium, in addition to:
The objective function processing is carried out to second media data;
It is described that second media data is plotted in second frame buffer, and the institute in second frame buffer
The second media data is stated, generates target medium, including:
Second media data after the objective function processing will be carried out and be plotted in second frame buffer, and according to
Second media data after the objective function processing is carried out in second frame buffer, generates target medium.
In a kind of possible design, preview corresponding to the first media data described in display first frame buffer
Media, including:
The resolution ratio for adjusting viewing area is the first resolution;
Preview matchmaker corresponding to the first media data described in first frame buffer is shown in viewing area after the adjustment
Body.
Second aspect, the embodiment of the present invention provide a kind of media data processing device, including:
First creation module, if for detecting instruction for previewing, the first frame buffer is created, first frame buffer is used to paint
The media data of first resolution processed;
First acquisition module, for obtaining the first media data, first media data is the first resolution;
First drafting module, for first media data to be plotted in into first frame buffer;
Display module, for showing previewing media corresponding to the first media data described in first frame buffer;
Second creation module, if for detecting media generation instruction, the second frame buffer is created, second frame buffer is used
In the media data for drawing second resolution, the second resolution is more than the first resolution;
Second acquisition module, for obtaining the second media data, second media data is the second resolution;
Second drafting module, for second media data to be plotted in into second frame buffer;
Generation module, for second media data in second frame buffer, generate target medium.
In a kind of possible design, first acquisition module includes:
Collecting unit, for obtaining the 3rd media data of camera collection, the 3rd media data is the 3rd resolution
Rate, the 3rd resolution ratio are more than the first resolution;
Compression unit, for being compressed processing to the 3rd media data, obtain first media data.
In a kind of possible design, the 3rd resolution ratio is identical with the second resolution.
In a kind of possible design, described device also includes:
First processing module, for carrying out objective function processing to first media data;
First drafting module is specifically used for that first media data after the objective function processing will be carried out painting
System is in first frame buffer;
The display module is specifically used for showing described after the objective function processing is carried out in first frame buffer
Previewing media corresponding to first media data.
In a kind of possible design, described device also includes:
Second processing module, for carrying out the objective function processing to second media data;
Second drafting module is specifically used for that second media data after the objective function processing will be carried out painting
System is in second frame buffer;
The generation module is specifically used for according to being carried out in second frame buffer after the objective function processing
Second media data, generate target medium.
In a kind of possible design, the display module includes:
Adjustment unit, the resolution ratio for adjusting viewing area are the first resolution;
Display unit, for showing the first media data described in first frame buffer in viewing area after the adjustment
Corresponding previewing media.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, and the electronic equipment includes:Memory, processor
And the computer program that can be run on the memory and on the processor is stored in, calculating described in the computing device
During machine program, for performing the image processing method of first aspect.
Fourth aspect, the embodiment of the present invention provide a kind of computer-readable recording medium, including instruction, when the instruction exists
When being run on computer so that computer performs the image processing method of first aspect.
5th aspect, the embodiment of the present invention provide a kind of application program, and the application program includes instruction, when the instruction
When running on computers so that computer performs the image processing method of first aspect.
Implement the embodiment of the present invention, when detecting instruction for previewing, the first frame for creating first resolution delays mobile terminal
Deposit, then obtain the first media data, the first media data of first resolution is plotted in first frame buffer, and mobile whole
End shows previewing media corresponding to first media data in first frame buffer, because the resolution ratio of the first frame buffer is first
Resolution ratio, the resolution ratio of the previewing media is also first resolution, when detecting media generation instruction, creates second resolution
The second frame buffer, obtain the second media data, the second media data of second resolution is plotted in the second frame buffer, and root
Target medium is generated according to the second media data in second frame buffer, the target medium is second resolution, second resolution
Rate is more than the first resolution.The embodiment of the present invention, by preview phase, the frame buffer of low resolution being created, in matchmaker
Body generation phase creates the frame buffer of high-resolution, it is possible to achieve the matter of generation media is improved while processing speed is ensured
Amount.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of media data processing method provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of another media data processing method provided in an embodiment of the present invention;
Fig. 3 is a kind of structural representation of media data processing device provided in an embodiment of the present invention;
Fig. 4 is the structural representation of another media data processing device provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
Term " first ", " second " and " the 3rd " in description and claims of this specification and the accompanying drawing etc.
It is to be used to distinguish different objects, rather than for describing particular order.In addition, term " comprising " and " having " and they are any
Deformation, it is intended that cover non-exclusive include.Such as contain the process of series of steps or unit, method, system, product
Or equipment the step of being not limited to list or unit, but the step of alternatively also include not listing or unit, or can
Selection of land is also included for the intrinsic other steps of these processes, method, product or equipment or unit.
Referenced herein " embodiment " is it is meant that the special characteristic, structure or the characteristic that describe can wrap in conjunction with the embodiments
In at least one embodiment of the present invention.It is identical that each position in the description shows that the phrase might not be each meant
Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and
Implicitly understand, embodiment described herein can be combined with other embodiments.
Media in the embodiment of the present invention include but is not limited to image, video.If media are image, the embodiment of the present invention
Media data processing method can apply in scene of taking pictures, mobile terminal detects that user opens and taken pictures software or boundary of taking pictures
Instruction for previewing caused by face, the first frame buffer being created, first frame buffer is used for the view data for drawing first resolution, then
Obtain the first view data of first resolution, and first view data be plotted in first frame buffer, show this first
Preview image corresponding to the view data of this in frame buffer first, if detecting, user clicks on image caused by button of taking pictures and generated
Instruction, the second frame buffer is created, second frame buffer is used for the view data for drawing second resolution, and the second resolution is more than
The first resolution, then obtain the second view data of second resolution, finally by second view data be plotted in this second
Frame buffer, and second view data in second frame buffer, generate Target Photo.
If media are video, the media processing method of the embodiment of the present invention can be applied in recorded video scene, move
Dynamic terminal detects that user opens instruction for previewing caused by video record software or recording interface, creates the first frame buffer, should
First frame buffer is used for the video data for drawing first resolution, then obtains the first video data of first resolution, and should
First video data is plotted in first frame buffer, shows that preview corresponding to first video data regards in first frame buffer
Frequently, if detecting that user clicks on starts to record video generation instruction caused by button, the second frame buffer is created, second frame delays
The video data for drawing second resolution is deposited, the second resolution is more than the first resolution, then obtains second resolution
The second video data, second video data is finally plotted in second frame buffer, and according in second frame buffer
Second video data, generate target video.
In brief, if the media in the embodiment of the present invention are image, media data is view data, and previewing media is
Preview image, target medium are Target Photo;If the media in the embodiment of the present invention are video, media data is video counts
According to previewing media is preview video, and target medium is target video.
Below in conjunction with accompanying drawing 1- accompanying drawings 4, media data processing method provided in an embodiment of the present invention and device are carried out
It is discussed in detail.
Fig. 1 is refer to, is a kind of schematic flow sheet of media data processing method provided in an embodiment of the present invention, the present invention
Method in embodiment can realize including mobile phone, tablet personal computer, desktop computer, IPAD etc. have take pictures and/or record work(
On the mobile terminal of energy, as illustrated, this method may include but be not limited to following steps:
S101, if detecting instruction for previewing, mobile terminal creates the first frame buffer, and first frame buffer is used to draw the
The media data of one resolution ratio;
In embodiments of the present invention, media data processing procedure can be divided into preview and media generate two stages, and this is pre-
The stage of looking at can be triggered by instruction for previewing, and the media generation phase can generate instruction triggers by media.
In embodiments of the present invention, instruction for previewing can take pictures or record including openings such as user's click, double-click, long-press and regard
Instructed caused by the operation of frequency software, can also include instructing caused by user's return preview interface.Mobile terminal is being examined
When measuring instruction for previewing, mobile terminal can be delayed by calling the built-in function in OpenGL to create the first frame on the mobile terminal
Deposit, first frame buffer is used for the media data for drawing first resolution.Wherein, media data can be view data or regard
Frequency according to etc..
It should be noted that frame buffer is frame buffer memory (Frame Buffer) abbreviation, it is shown by screen
One direct map of picture, also known as bit map (Bit Map) or grating, each memory cell of frame buffer are corresponded on screen
A pixel, the corresponding sub-picture of whole frame buffer, the image stored in frame buffer is one by one.First frame buffer
Any one in the multiple frame buffers that can be created by mobile terminal.
It is specific optional, if mobile terminal detects instruction for previewing, the first frame buffer is created, first frame buffer is used to paint
The media data of first resolution processed, first resolution can be arbitrary resolution, point such as 720p, 1080p or less than 720p
Resolution etc., the embodiment of the present invention are not construed as limiting to this.
S102, the media data of acquisition for mobile terminal first, first media data are the first resolution;
In embodiments of the present invention, the resolution ratio of the first media data and the first frame buffer are used for the media data drawn
Resolution ratio is identical, that is, is first resolution.Such as first the frame buffer resolution ratio of media data that is used to draw be 720P,
Then the resolution ratio of first media data is also 720P.
Optionally, first media data can be the media data for the target object that camera is gathered without any
The media data of processing is compressed, i.e. resolution ratio set by camera is also the first resolution.
Optionally, first media data can be the target object that camera is gathered media data through overcompression at
Resolution ratio set by the media data of reason, i.e. camera is more than the first resolution.Specific optional, mobile terminal can lead to
The 3rd media data of the target object that camera collection user chooses is crossed, the resolution ratio of the 3rd media data is differentiated for the 3rd
Resolution ratio set by the camera of rate, i.e. mobile terminal is the 3rd resolution ratio, and what mobile terminal collected to camera should
3rd media data is compressed processing, such as merges adjacent pixel, obtains the first media data of first resolution, needs
It is noted that above-mentioned 3rd resolution ratio is more than above-mentioned first resolution.For example, the resolution ratio of the camera of mobile terminal is set
For 1080p, the resolution ratio that the camera of the mobile terminal gathers the 3rd media data of the target object that user chooses also is
1080p, handled by merging the compressions such as adjacent pixel to the 3rd media data, the 3rd media data is compressed
Into 720p the first media data, therefore first resolution is 720p, and the 3rd resolution ratio is 1080p.
Optionally, first media data can also be by a certain or plurality of target function treatment (such as mill skin,
Whitening or filter etc.) after media data, for example the resolution ratio of camera is arranged to first resolution, then by camera collection
First media data of target object carries out above-mentioned objective function processing, then by the first media data after objective function processing
It is plotted in the first frame buffer.Or the resolution ratio of camera is arranged to the 3rd resolution ratio, the 3rd resolution ratio is more than first and differentiated
Rate, then after the media data of the target object of camera collection being compressed into processing, then to the media data after compression processing
Above-mentioned objective function processing is carried out, the resolution ratio of the wherein media data after compression processing is above-mentioned first resolution, by target
Media data after function treatment is plotted in the first frame buffer as the first media data.It should be noted that to media
When data carry out objective function processing, the resolution ratio of the media data, i.e. the first media data after target processing are not changed
Still it is first resolution.
First media data is plotted in first frame buffer by S103, mobile terminal, and shows first frame
Previewing media corresponding to first media data described in caching;
In embodiments of the present invention, the first media data can be plotted in the first frame by function call and delayed by mobile terminal
Deposit, and show previewing media corresponding to first media data in first frame buffer.Optionally, the resolution of viewing area is adjusted
Rate is first resolution, such as the resolution ratio by the increase resolution of viewport (viewport) to view component, so that first point
First media data of resolution can be adapted to the display demand of screen, and first frame buffer is shown in viewing area after the adjustment
In previewing media corresponding to first media data, the resolution ratio of the previewing media is first resolution.Wherein, previewing media can
To include but is not limited to preview picture, preview video etc..If media data is view data, previewing media can be preview graph
Picture, if media data is video data, previewing media can be preview video.
S104, if detecting media generation instruction, mobile terminal creates the second frame buffer, and second frame buffer is used to paint
The media data of second resolution processed, the second resolution are more than the first resolution;
In embodiments of the present invention, media generation instruction can include user's click, long-press, double-click is taken pictures or recorded video
Button or user set some quick take pictures or the triggering mobile terminal such as the gesture of recorded video, voice, shortcut is carried out
Take pictures or the operation of recorded video caused by instruct.Mobile terminal can pass through calling when detecting media generation instruction
Built-in function in OpenGL creates the second frame buffer on the mobile terminal, and second frame buffer is used to draw second resolution
Media data.
Optionally, the second frame buffer is corresponding with above-mentioned first frame buffer, and the second frame buffer is used to draw second resolution
Media data, wherein, the second resolution is more than above-mentioned first resolution, such as, above-mentioned first resolution is 720p, then second
Resolution ratio can be 1080p.
S105, the media data of acquisition for mobile terminal second, second media data are the second resolution;
In embodiments of the present invention, the resolution ratio of the second media data and the second frame buffer are used for the media data drawn
Resolution ratio is identical, that is, is second resolution.Such as second the frame buffer resolution ratio of media data that is used to draw be 1080p,
Then the resolution ratio of second media data is also 1080p.
Optionally, the second media data can be the matchmaker that mobile terminal gathers the target object that user chooses by camera
Volume data, second media data are second resolution, i.e., (present invention is implemented the resolution ratio set by the camera of mobile terminal
3rd resolution ratio of example) can be with identical with second resolution.For example, the resolution ratio of the camera of mobile terminal is set to 1080p,
The resolution ratio for the second media data of target object that the camera collection user of the mobile terminal chooses also is 1080p, second
Resolution ratio is identical with the 3rd resolution ratio, is 1080p.
Optionally, the second media data can be the matchmaker that mobile terminal gathers the target object that user chooses by camera
Media data of the volume data after overcompression is handled, i.e., the resolution ratio (i.e. the 3rd resolution ratio of the present embodiment) set by camera
More than the second resolution.For example the media data of target object that collects of camera is 1080p, the media number of the 1080p
It is 960p according to the resolution ratio after overcompression is handled, i.e., second resolution is 960p, and the 3rd resolution ratio is 1080p, and second differentiates
Rate is different from the 3rd resolution ratio.
Optionally, if the first media data is the media data after objective function is handled, the second media data also may be used
To be the media data after same target function treatment.For example the resolution ratio of camera is arranged to the 3rd resolution ratio, and
Three resolution ratio are identical with second resolution, then the media data of the target object of camera collection is carried out at above-mentioned objective function
Reason, then using the media data after objective function processing as the second media data, and be plotted in the second frame buffer.Or
The resolution ratio of camera is arranged to the 3rd resolution ratio, and the 3rd resolution ratio is more than second resolution, then the mesh gathered camera
After the media data of mark object is compressed processing, then above-mentioned objective function processing is carried out to the media data after compression processing,
The resolution ratio of media data wherein after compression processing is above-mentioned second resolution, and the media data after objective function is handled is made
For the second media data, and it is plotted in the second frame buffer.It should be noted that objective function processing is carried out to media data
When, do not change the resolution ratio of the media data, i.e., the second media data after objective function processing is still second resolution.
Second media data is plotted in second frame buffer by S106, mobile terminal, and according to second frame
Second media data in caching, generate target medium.
In embodiments of the present invention, the second media data can be plotted in the second frame by function call and delayed by mobile terminal
Deposit, and second media data in second frame buffer, target medium is generated, the resolution ratio of the target medium is second
Resolution ratio, second resolution are more than first resolution, i.e. the resolution ratio of target medium is more than the resolution ratio of previewing media, is ensureing
During previewing media while high processing rate, it can also be ensured that the quality of target medium.Wherein, target medium can be mesh
Mark on a map piece or target video etc..If media data is view data, target medium can be Target Photo, if media data be regarding
Frequency evidence, target medium can be target video.
Optionally, the resolution ratio of viewing area can be changed to the second resolution by mobile terminal after target medium is generated
Rate, for example viewport resolution ratio is changed to second resolution, the target is shown in the viewing area of the second resolution
Media.After the target medium is shown, the resolution ratio of viewing area can also be adjusted, for example viewport resolution ratio is changed
Return first resolution.
In the embodiment of the present invention, mobile terminal creates the first frame buffer of first resolution when detecting instruction for previewing,
The first media data is obtained again, and the first media data of first resolution is plotted to first frame buffer, and in mobile terminal
Previewing media corresponding to first media data in first frame buffer is shown, because the resolution ratio of the first frame buffer is first point
Resolution, the resolution ratio of the previewing media is also first resolution, when detecting media generation instruction, creates second resolution
Second frame buffer, the second media data is obtained, the second media data of second resolution is plotted in the second frame buffer, and according to
The second media data generation target medium in second frame buffer, the target medium is second resolution, the second resolution
More than the first resolution.The embodiment of the present invention, by preview phase, the frame buffer of low resolution being created, in media
Generation phase creates the frame buffer of high-resolution, it is possible to achieve the matter of generation media is improved while processing speed is ensured
Amount.
Fig. 2 is refer to, is the schematic flow sheet of another media data processing method provided in an embodiment of the present invention, this hair
Method in bright embodiment can realize including mobile phone, tablet personal computer, desktop computer, IPAD etc. have take pictures and/or record
On the mobile terminal of function, as illustrated, this method may include but be not limited to following steps:
S201, if detecting instruction for previewing, mobile terminal creates the first frame buffer, and first frame buffer is used to draw the
The media data of one resolution ratio;
S202, the media data of acquisition for mobile terminal first, first media data are the first resolution;
Step S201- steps of embodiment of the present invention S202 refer to Fig. 1 embodiment step S101- step S102, herein
Repeat no more.
S203, mobile terminal carry out objective function processing to first media data;
First media data after carrying out the objective function processing is plotted in described first by S204, mobile terminal
Frame buffer, and show pre- corresponding to first media data after the objective function processing is carried out in first frame buffer
Look at media;
Optionally, objective function processing can be appointing in the function treatments such as mill skin, whitening, virtualization background plus filter
Meaning is a kind of, and the resolution ratio of the first media data after objective function processing is still first resolution.
Optionally, mobile terminal can need to create at least one frame buffer according to function treatment, and a frame buffer can
Handled with corresponding One function, at least one frame buffer can be cascade connection, i.e., the media data of previous frame buffer enters
Go and next frame buffer is input to after objective function corresponding with next frame buffer is handled, mentioned by the embodiment of the present invention
First frame buffer can be any one frame buffer at least one frame buffer, the first frame buffer that mobile terminal is created
It is corresponding with objective function processing.
Optionally, if first frame buffer is first frame buffer at least one frame buffer of cascade, above-mentioned first
Media data can be media data of the media data of camera collection after overcompression, or the matchmaker of camera collection
Volume data without any compression media data;If first frame buffer is not first at least one frame buffer of cascade
Individual frame buffer, such as second or the 3rd frame buffer etc., then above-mentioned first media data can be plotted in this first
The media data in frame buffer before frame buffer.It should be noted that the resolution ratio of first media data is the first resolution
Rate, first frame buffer are also the media data for first resolution for drawing resolution.
Optionally, each frame buffer at least one frame buffer can be created when detecting the operational order of user
Build, such as, when detecting for indicating to carry out the operational order of a certain function treatment (such as user clicks on whitening and pressed
Button), that is, frame buffer corresponding with the function treatment is created, and would be mapped out upper one of frame buffer corresponding with the function treatment
The media data of frame buffer carries out the function treatment, will carry out the media data after the function treatment and is plotted in the function treatment pair
In the frame buffer answered, further output previewing media corresponding with media data in the frame buffer, that is, export the preview after whitening
Media.
Optionally, each frame buffer at least one frame buffer can be that the function treatment set according to system is automatic
Create, such as, the function treatment that system is set includes whitening and mill skin, then creates two frame buffers, and each frame buffer is corresponding
A kind of function treatment.Wherein, the cascade connection of at least one frame buffer can be the permanent order of internal system setting, also may be used
To be the order that randomly generates, it is necessary to which explanation, the cascade connection of at least one frame buffer are determined to media data
Processing sequence.First frame buffer can be any one frame buffer of at least one frame buffer frame, and system often carries out a kind of work(
It can handle, i.e. output is plotted in previewing media corresponding to the media data in frame buffer corresponding to the function treatment.
If the cascade connection of at least one frame buffer is the permanent order of internal system setting, therefore mobile terminal is each
When carrying out function treatment, the order of function treatment is identical corresponding at least one frame buffer.For example preview is detected for the first time
Instruction, the order of function treatment corresponding at least one frame buffer of cascade are mill skin, whitening;Detect that preview refers to for the second time
Order, the order of function treatment corresponding at least one frame buffer of cascade are still mill skin, whitening;N-th (arbitrarily once) detects
To instruction for previewing, function treatment order corresponding at least one frame buffer of cascade is still mill skin, whitening.
If the cascade connection of at least one frame buffer is the order randomly generated, therefore mobile terminal carries out function every time
During processing, the order of function treatment may differ corresponding at least one frame buffer.For example, detect that preview refers to for the first time
Order, the order of function treatment corresponding at least one frame buffer of cascade are mill skin, whitening;Instruction for previewing is detected for the second time,
The order of function treatment corresponding at least one frame buffer of cascade may be whitening, mill skin.
Specific optional, mobile terminal can be adjusted after objective function processing is carried out to the first media data by function
The first media data after carrying out objective function processing is plotted in the first frame buffer by mode.The first frame is plotted in output
Before previewing media corresponding to the first media data after the carry out objective function processing of caching, the mobile terminal viewing area is adjusted
The resolution ratio in domain is first resolution, such as the resolution ratio by the increase resolution of viewport (viewport) to view component, with
The first media data after objective function processing is adapted to the display demand of screen, show in viewing area after the adjustment
Show previewing media corresponding to first media data after the objective function processing is carried out in first frame buffer, the previewing media
Resolution ratio be first resolution.Wherein, previewing media can be preview image or preview video etc., if media data is image
Data, previewing media can be preview image, if media data is video data, previewing media can be preview video.
It is further alternative, first frame buffer at least one frame buffer of cascade can not also with any function
Manage it is corresponding, i.e., first frame buffer be used only for draw without any function treatment media data.It is for example, mobile whole
End needs to create at least one frame buffer according to function treatment, and the media data of the target object of camera collection is passed through
Obtained the first media data is plotted in first frame buffer after compression processing, and user clicks on objective function A (such as mill skin, U.S.
Any one in white or filter etc.) corresponding to function button a, mobile terminal refers to according to caused by user's click function button a
Order, the first media data in first frame buffer is subjected to objective function A processing corresponding to function button a, and by target work(
The first media data after energy A processing is plotted in frame buffer corresponding to objective function A processing, and shows in the frame buffer and carry out
Previewing media corresponding to the first media data after objective function A processing;Further, if user clicks on objective function B (ratios again
As ground any one in skin, whitening or filter etc.) corresponding to function button b, mobile terminal is according to user click function button b institutes
Caused instruction, the first media data after objective function A processing is subjected to objective function B processing corresponding to function button b, and
By by objective function A and objective function B processing after the first media data be plotted in the objective function B processing corresponding to frame delay
Deposit, and show preview corresponding to the first media data after objective function A and objective function B processing is carried out in the frame buffer
Media etc.;Until mobile terminal detects media generation instruction, media data processing procedure is transferred to media generation phase.
S205, if detecting photographing instruction, mobile terminal creates the second frame buffer, and second frame buffer is used to draw the
The media data of two resolution ratio, the second resolution are more than the first resolution;
S206, the media data of acquisition for mobile terminal second, second media data are the second resolution;
Step S205- steps of embodiment of the present invention S206 refer to Fig. 1 embodiment step S104- step S105, herein
Repeat no more.
S207, mobile terminal carry out the objective function processing to second media data;
Second media data after carrying out the objective function processing is plotted in described second by S208, mobile terminal
Frame buffer, and according to second media data after the objective function processing is carried out in second frame buffer, generate mesh
Mark media.
In embodiments of the present invention, mobile terminal carries out objective function processing to the second media data, can further lead to
Cross function call mode and the second media data after carrying out objective function processing be plotted in the second frame buffer, and according to this second
Second media data in frame buffer after objective function processing, generates target medium, and the resolution ratio of the target medium is the
Two resolution ratio, second resolution are more than first resolution, i.e. the resolution ratio of target medium is more than the resolution ratio of previewing media, is protecting
During card previewing media while high processing rate, it can also be ensured that the quality of target medium.Wherein, target medium can be
Target Photo or target video etc..If media data is view data, target medium can be Target Photo, if media data is
Video data, target medium can be target video.
Optionally, mobile terminal can need to create at least one frame buffer according to function treatment, and a frame buffer can
Handled with corresponding One function, at least one frame buffer can be cascade connection, i.e., the media data of previous frame buffer enters
Go and next frame buffer is input to after objective function corresponding with next frame buffer is handled, mentioned by the embodiment of the present invention
Second frame buffer can be any one frame buffer at least one frame buffer, the second frame buffer that mobile terminal is created
It is corresponding with objective function processing.
Wherein, the objective function processing in this step S208 is identical with the objective function processing that step S203 is carried out, should
The resolution ratio of the second media data after objective function processing is second resolution, and specific processing mode refer to step S203's
Illustrate, will not be repeated here.
Further alternative, the resolution ratio of viewing area can be changed to by mobile terminal after target medium is generated
Two resolution ratio, for example viewport resolution ratio is changed to second resolution, shown in the viewing area of the second resolution
The target medium.After the target medium is shown, the resolution ratio of viewing area, such as point by viewport can also be adjusted
Resolution changes back first resolution.
In the embodiment of the present invention, mobile terminal creates the first frame buffer of first resolution when detecting instruction for previewing,
The first media data is obtained again, the first media data is first resolution, and objective function processing is carried out to first media data,
The first media data after objective function processing is still first resolution, will carry out first matchmaker after the objective function processing
Direct volume rendering shows first media after the objective function processing is carried out in first frame buffer in first frame buffer
Previewing media corresponding to data, the resolution ratio of the previewing media is first resolution, when detecting media generation instruction, creates the
Second frame buffer of two resolution ratio, the second resolution are more than the first resolution, obtain the second media data, second media
Data are the second resolution, the objective function processing are carried out to second media data, after carrying out the objective function processing
Second media data be plotted in second frame buffer, and according to the objective function processing is carried out in second frame buffer after
Second media data, target medium is generated, the resolution ratio of the target medium is second resolution.The embodiment of the present invention, pass through
In preview phase, the frame buffer for creating low resolution carries out objective function processing, it is being carried out various objective function processing
When, the processing speed of media data is also effective to ensure that, in media generation phase, the frame buffer for creating high-resolution is carried out
Objective function processing, generating it, resolution ratio of target medium is higher, improves the quality of generation media.
Fig. 3 is refer to, is a kind of structural representation of media data processing device provided in an embodiment of the present invention, as schemed institute
Show, the media data processing device of the embodiment of the present invention includes:
First creation module 100, if for detecting instruction for previewing, the first frame buffer is created, first frame buffer is used
In the media data for drawing first resolution;
In embodiments of the present invention, media data processing procedure can be divided into preview and media generate two stages, and this is pre-
The stage of looking at can be triggered by instruction for previewing, and the media generation phase can generate instruction triggers by media.
In embodiments of the present invention, instruction for previewing can take pictures or record including openings such as user's click, double-click, long-press and regard
Instructed caused by the operation of frequency software, can also include instructing caused by user's return preview interface.Mobile terminal is being examined
When measuring instruction for previewing, mobile terminal can be delayed by calling the built-in function in OpenGL to create the first frame on the mobile terminal
Deposit, first frame buffer is used for the media data for drawing first resolution.Wherein, media data can be view data or video
Data etc..
It should be noted that frame buffer is frame buffer memory (Frame Buffer) abbreviation, it is shown by screen
One direct map of picture, also known as bit map (Bit Map) or grating, each memory cell of frame buffer are corresponded on screen
A pixel, the corresponding sub-picture of whole frame buffer, the image stored in frame buffer is one by one.First frame buffer
Any one in the multiple frame buffers that can be created by mobile terminal.
It is specific optional, if mobile terminal detects instruction for previewing, the first frame buffer is created, first frame buffer is used to paint
The media data of first resolution processed, first resolution can be arbitrary resolution, point such as 720p, 1080p or less than 720p
Resolution etc., the embodiment of the present invention are not construed as limiting to this.
First acquisition module 200, for obtaining the first media data, first media data is the described first resolution
Rate;
In embodiments of the present invention, the resolution ratio of the first media data and the first frame buffer are used for the media data drawn
Resolution ratio is identical, that is, is first resolution.Such as first the frame buffer resolution ratio of media data that is used to draw be 720P,
Then the resolution ratio of first media data is also 720P.
Optionally, first media data can be the media data for the target object that camera is gathered without any
The media data of processing is compressed, i.e. resolution ratio set by camera is also the first resolution.
Optionally, first media data can be the target object that camera is gathered media data through overcompression at
Resolution ratio set by the media data of reason, i.e. camera is more than the first resolution.
Specific optional, the first acquisition module 200 can include collecting unit 201 and compression unit 202;
Collecting unit 201, for obtaining the 3rd media data of camera collection, the 3rd media data is the 3rd point
Resolution, the 3rd resolution ratio are more than the first resolution;
Compression unit 202, for being compressed processing to the 3rd media data, obtain first media data;
Further specific optional, mobile terminal can gather the 3rd matchmaker of the target object that user chooses by camera
Volume data, the resolution ratio of the 3rd media data is the 3rd resolution ratio, i.e. resolution ratio set by the camera of mobile terminal is
3rd resolution ratio, the 3rd media data that mobile terminal collects to camera are compressed processing, as merge it is adjacent
Pixel etc., the first media data of first resolution is obtained, it is necessary to which explanation, above-mentioned 3rd resolution ratio are more than above-mentioned first
Resolution ratio.For example, the resolution ratio of the camera of mobile terminal is set to 1080p, camera collection user's choosing of the mobile terminal
In the resolution ratio of the 3rd media data of target object be also 1080p, it is adjacent by being merged to the 3rd media data
The compression such as pixel processing, the 3rd media data has been compressed into 720p the first media data, therefore first resolution
For 720p, the 3rd resolution ratio is 1080p.
Optionally, first media data can also be by a certain or plurality of target function treatment (such as mill skin,
Whitening or filter etc.) after media data, for example the resolution ratio of camera is arranged to first resolution, then by camera collection
First media data of target object carries out above-mentioned objective function processing, then by the first media data after objective function processing
It is plotted in the first frame buffer.Or the resolution ratio of camera is arranged to the 3rd resolution ratio, the 3rd resolution ratio is more than first and differentiated
Rate, then after the media data of the target object of camera collection being compressed into processing, then to the media data after compression processing
Above-mentioned objective function processing is carried out, the resolution ratio of the wherein media data after compression processing is above-mentioned first resolution, by target
Media data after function treatment is plotted in the first frame buffer as the first media data.It should be noted that to media
When data carry out objective function processing, the resolution ratio of the media data, i.e. the first media data after target processing are not changed
Still it is first resolution.
Optionally, described device also includes:
First processing module 300, for carrying out objective function processing to first media data;
First drafting module 400 is specifically used for that above-mentioned first media data after above-mentioned objective function processing will be carried out
It is plotted in above-mentioned first frame buffer;
The display module 500 is specifically used for showing upper after above-mentioned objective function processing is carried out in above-mentioned first frame buffer
State previewing media corresponding to the first media data.
Optionally, objective function processing can be appointing in the function treatments such as mill skin, whitening, virtualization background plus filter
Meaning is a kind of, and the resolution ratio of the first media data after objective function processing is still first resolution.
Optionally, mobile terminal can need to create at least one frame buffer according to function treatment, and a frame buffer can
Handled with corresponding One function, at least one frame buffer can be cascade connection, i.e., the media data of previous frame buffer enters
Go and next frame buffer is input to after objective function corresponding with next frame buffer is handled, mentioned by the embodiment of the present invention
First frame buffer can be any one frame buffer at least one frame buffer, the first frame buffer that mobile terminal is created
It is corresponding with objective function processing.
If first frame buffer is first frame buffer at least one frame buffer of cascade, above-mentioned first media data
Can be media data of the media data of camera collection after overcompression, or the media data of camera collection is not
By the media data of any compression;If first frame buffer is not delayed for first frame at least one frame buffer of cascade
Deposit, such as second or the 3rd frame buffer etc., then above-mentioned first media data can be to be plotted in first frame buffer
The media data in frame buffer before.It should be noted that the resolution ratio of first media data is first resolution, this
One frame buffer is also the media data for first resolution for drawing resolution.
Optionally, each frame buffer at least one frame buffer can be created when detecting the operational order of user
Build, such as, when detecting for indicating to carry out the operational order of a certain function treatment (such as user clicks on whitening and pressed
Button), that is, frame buffer corresponding with the function treatment is created, and would be mapped out upper one of frame buffer corresponding with the function treatment
The media data of frame buffer carries out the function treatment, will carry out the media data after the function treatment and is plotted in the function treatment pair
In the frame buffer answered, further output previewing media corresponding with media data in the frame buffer, that is, export the preview after whitening
Media.
Optionally, each frame buffer at least one frame buffer can be that the function treatment set according to system is automatic
Create, such as, the function treatment that system is set includes whitening and mill skin, then creates two frame buffers, and each frame buffer is corresponding
A kind of function treatment.Wherein, the cascade connection of at least one frame buffer can be the permanent order of internal system setting, also may be used
To be the order that randomly generates, it is necessary to which explanation, the cascade connection of at least one frame buffer are determined to media data
Processing sequence.First frame buffer can be any one frame buffer of at least one frame buffer frame, and system often carries out a kind of work(
It can handle, i.e. output is plotted in previewing media corresponding to the media data in frame buffer corresponding to the function treatment.Or first
Frame buffer can be last frame buffer at least one frame buffer, i.e., system all function treatments it is complete after, output
Previewing media after all function treatments.
If the cascade connection of at least one frame buffer is the permanent order of internal system setting, therefore mobile terminal is each
When carrying out function treatment, the order of function treatment is identical corresponding at least one frame buffer.For example preview is detected for the first time
Instruction, the order of function treatment corresponding at least one frame buffer of cascade are mill skin, whitening;Detect that preview refers to for the second time
Order, the order of function treatment corresponding at least one frame buffer of cascade are still mill skin, whitening;N-th (arbitrarily once) detects
To instruction for previewing, function treatment order corresponding at least one frame buffer of cascade is still mill skin, whitening.
If the cascade connection of at least one frame buffer is the order randomly generated, therefore mobile terminal carries out function every time
During processing, the order of function treatment may differ corresponding at least one frame buffer.For example, detect that preview refers to for the first time
Order, the order of function treatment corresponding at least one frame buffer of cascade are mill skin, whitening;Instruction for previewing is detected for the second time,
The order of function treatment corresponding at least one frame buffer of cascade may be whitening, mill skin.
Specific optional, mobile terminal can be adjusted after objective function processing is carried out to the first media data by function
The first media data after carrying out objective function processing is plotted in the first frame buffer by mode.The first frame is plotted in output
Before previewing media corresponding to the first media data after the carry out objective function processing of caching, the mobile terminal viewing area is adjusted
The resolution ratio in domain is first resolution, such as the resolution ratio by the increase resolution of viewport (viewport) to view component, with
The first media data after objective function processing is adapted to the display demand of screen, show in viewing area after the adjustment
Show previewing media corresponding to first media data after the objective function processing is carried out in first frame buffer, the previewing media
Resolution ratio be first resolution.Wherein, previewing media can be preview image or preview video etc., if media data is image
Data, previewing media can be preview image, if media data is video data, previewing media can be preview video.
It is further alternative, first frame buffer at least one frame buffer of cascade can not also with any function
Manage it is corresponding, i.e., first frame buffer be used only for draw without any function treatment media data.It is for example, mobile whole
End needs to create at least one frame buffer according to function treatment, and the media data of the target object of camera collection is passed through
Obtained the first media data is plotted in first frame buffer after compression processing, and user clicks on objective function A (such as mill skin, U.S.
Any one in white or filter etc.) corresponding to function button a, mobile terminal refers to according to caused by user's click function button a
Order, the first media data in first frame buffer is subjected to objective function A processing corresponding to function button a, and by target work(
The first media data after energy A processing is plotted in frame buffer corresponding to objective function A processing, and shows in the frame buffer and carry out
Previewing media corresponding to the first media data after objective function A processing;Further, if user clicks on objective function B (ratios again
As ground any one in skin, whitening or filter etc.) corresponding to function button b, mobile terminal is according to user click function button b institutes
Caused instruction, the first media data after objective function A processing is subjected to objective function B processing corresponding to function button b, and
By by objective function A and objective function B processing after the first media data be plotted in the objective function B processing corresponding to frame delay
Deposit, and show preview corresponding to the first media data after objective function A and objective function B processing is carried out in the frame buffer
Media etc.;Until mobile terminal detects media generation instruction, media data processing procedure is transferred to media generation phase.
First drafting module 400, for first media data to be plotted in into first frame buffer;
Display module 500, for showing previewing media corresponding to the first media data described in first frame buffer;
Optionally, display module 500 can include adjustment unit 501, display unit 502.
Adjustment unit 501, the resolution ratio for adjusting viewing area are the first resolution;
Display unit 502, for showing the first media described in first frame buffer in viewing area after the adjustment
Previewing media corresponding to data;
In embodiments of the present invention, the first media data can be plotted in the first frame by function call and delayed by mobile terminal
Deposit, and show previewing media corresponding to first media data in first frame buffer.Optionally, the resolution of viewing area is adjusted
Rate is first resolution, such as the resolution ratio by the increase resolution of viewport (viewport) to view component, so that first point
First media data of resolution can be adapted to the display demand of screen, and first frame buffer is shown in viewing area after the adjustment
In previewing media corresponding to first media data, the resolution ratio of the previewing media is first resolution.Wherein, previewing media can
To include but is not limited to preview picture, preview video etc..If media data is view data, previewing media can be preview graph
Picture, if media data is video data, previewing media can be preview video.
Second creation module 600, if for detecting media generation instruction, the second frame buffer is created, second frame delays
The media data for drawing second resolution is deposited, the second resolution is more than the first resolution;
In embodiments of the present invention, media generation instruction can include user's click, long-press, double-click is taken pictures or recorded video
Button or user set some quick take pictures or the triggering mobile terminal such as the gesture of recorded video, voice, shortcut is carried out
Take pictures or recorded video operates caused instruct.Mobile terminal can pass through calling when detecting media generation instruction
Built-in function in OpenGL creates the second frame buffer on the mobile terminal, and second frame buffer is used to draw second resolution
Media data.
Optionally, the second frame buffer is corresponding with above-mentioned first frame buffer, and the second frame buffer is used to draw second resolution
Media data, wherein, the second resolution is more than above-mentioned first resolution, such as, above-mentioned first resolution is 720p, then second
Resolution ratio can be 1080p.
Second acquisition module 700, for obtaining the second media data, second media data is the described second resolution
Rate;
In embodiments of the present invention, the resolution ratio of the second media data and the second frame buffer are used for the media data drawn
Resolution ratio is identical, that is, is second resolution.Such as second the frame buffer resolution ratio of media data that is used to draw be 1080p,
Then the resolution ratio of second media data is also 1080p.
Optionally, the second media data can be the matchmaker that mobile terminal gathers the target object that user chooses by camera
Volume data, second media data are second resolution, i.e., (present invention is implemented the resolution ratio set by the camera of mobile terminal
3rd resolution ratio of example) can be with identical with second resolution.For example, the resolution ratio of the camera of mobile terminal is set to 1080p,
The resolution ratio for the second media data of target object that the camera collection user of the mobile terminal chooses also is 1080p, second
Resolution ratio is identical with the 3rd resolution ratio, is 1080p.
Optionally, the second media data can be the matchmaker that mobile terminal gathers the target object that user chooses by camera
Media data of the volume data after overcompression is handled, i.e., the resolution ratio (i.e. the 3rd resolution ratio of the present embodiment) set by camera
More than the second resolution.For example the media data of target object that collects of camera is 1080p, the media number of the 1080p
It is 960p according to the resolution ratio after overcompression is handled, i.e., second resolution is 960p, and the 3rd resolution ratio is 1080p, and second differentiates
Rate is different from the 3rd resolution ratio.
Optionally, if the first media data is the media data after objective function is handled, the second media data also may be used
To be the media data after same target function treatment.For example the resolution ratio of camera is arranged to the 3rd resolution ratio, and
Three resolution ratio are identical with second resolution, then the media data of the target object of camera collection is carried out at above-mentioned objective function
Reason, then using the media data after objective function processing as the second media data, and be plotted in the second frame buffer.Or
The resolution ratio of camera is arranged to the 3rd resolution ratio, and the 3rd resolution ratio is more than second resolution, then the mesh gathered camera
After the media data of mark object is compressed processing, then above-mentioned objective function processing is carried out to the media data after compression processing,
The resolution ratio of media data wherein after compression processing is above-mentioned second resolution, and the media data after objective function is handled is made
For the second media data, and it is plotted in the second frame buffer.It should be noted that objective function processing is carried out to media data
When, do not change the resolution ratio of the media data, i.e., the second media data after objective function processing is still second resolution.
Optionally, described device also includes:
Second processing module 800, for carrying out the objective function processing to second media data;
Second drafting module 900, specifically for the second media number after the objective function processing will be carried out
According to being plotted in second frame buffer;
The generation module 1000, specifically for according to being carried out in the second frame buffer after the objective function processing
Second media data, generate target medium.
In embodiments of the present invention, mobile terminal carries out objective function processing to the second media data, can further lead to
Cross function call mode and the second media data after carrying out objective function processing be plotted in the second frame buffer, and according to this second
Second media data in frame buffer after objective function processing, generates target medium, and the resolution ratio of the target medium is the
Two resolution ratio, second resolution are more than first resolution, i.e. the resolution ratio of target medium is more than the resolution ratio of previewing media, is protecting
During card previewing media while high processing rate, it can also be ensured that the quality of target medium.Wherein, target medium can be
Target Photo or target video etc..If media data is view data, target medium can be Target Photo, if media data is
Video data, target medium can be target video.
Optionally, mobile terminal can need to create at least one frame buffer according to function treatment, and a frame buffer can
Handled with corresponding One function, at least one frame buffer can be cascade connection, i.e., the media data of previous frame buffer enters
Go and next frame buffer is input to after objective function corresponding with next frame buffer is handled, mentioned by the embodiment of the present invention
Second frame buffer can be any one frame buffer at least one frame buffer, the second frame buffer that mobile terminal is created
It is corresponding with objective function processing.
Wherein, the target that the objective function processing carried out in Second processing module 800 is carried out with first processing module 300
Function treatment is identical, and the resolution ratio of the second media data after objective function processing is second resolution, specific processing mode
The elaboration of first processing module 300 is refer to, will not be repeated here.
Further alternative, the resolution ratio of viewing area can be changed to by mobile terminal after target medium is generated
Two resolution ratio, for example viewport resolution ratio is changed to second resolution, shown in the viewing area of the second resolution
The target medium.After the target medium is shown, the resolution ratio of viewing area, such as point by viewport can also be adjusted
Resolution changes back first resolution.
Second drafting module 900, for second media data to be plotted in into second frame buffer;
Generation module 1000, for second media data in second frame buffer, generate target medium.
In embodiments of the present invention, the second media data can be plotted in the second frame by function call and delayed by mobile terminal
Deposit, and second media data in second frame buffer, target medium is generated, the resolution ratio of the target medium is second
Resolution ratio, second resolution are more than first resolution, i.e. the resolution ratio of target medium is more than the resolution ratio of previewing media, is ensureing
During previewing media while high processing rate, it can also be ensured that the quality of target medium.Wherein, target medium can be mesh
Mark on a map piece or target video etc..If media data is view data, target medium can be Target Photo, if media data be regarding
Frequency evidence, target medium can be target video.
Optionally, the resolution ratio of viewing area can be changed to the second resolution by mobile terminal after target medium is generated
Rate, for example viewport resolution ratio is changed to second resolution, the target is shown in the viewing area of the second resolution
Media.After the target medium is shown, the resolution ratio of viewing area can also be adjusted, for example viewport resolution ratio is changed
Return first resolution.
In the embodiment of the present invention, mobile terminal creates the first frame buffer of first resolution when detecting instruction for previewing,
The first media data is obtained again, the first media data is first resolution, and objective function processing is carried out to first media data,
The first media data after objective function processing is still first resolution, will carry out first matchmaker after the objective function processing
Direct volume rendering shows first media after the objective function processing is carried out in first frame buffer in first frame buffer
Previewing media corresponding to data, the resolution ratio of the previewing media is first resolution, when detecting media generation instruction, creates the
Second frame buffer of two resolution ratio, the second resolution are more than the first resolution, obtain the second media data, second media
Data are the second resolution, the objective function processing are carried out to second media data, after carrying out the objective function processing
Second media data be plotted in second frame buffer, and according to the objective function processing is carried out in second frame buffer after
Second media data, target medium is generated, the resolution ratio of the target medium is second resolution.The embodiment of the present invention, pass through
In preview phase, the frame buffer for creating low resolution carries out objective function processing, it is being carried out various objective function processing
When, the processing speed of media data is also effective to ensure that, in media generation phase, the frame buffer for creating high-resolution is carried out
Objective function processing, generating it, resolution ratio of target medium is higher, improves the quality of generation media.
Fig. 4 is refer to, for the embodiments of the invention provide the structural representation of another image processing apparatus.Such as Fig. 4 institutes
Show, described image processing unit 2000 can include:At least one processor 2001, such as CPU, GPU, at least one take pictures connect
Mouth 2002, memory 2003, at least one communication bus 2004.Wherein, communication bus 2004 is used to realize between these components
Connection communication.Wherein, user can be by calling interface 2002 of taking pictures to gather media data, and interface 2002 of taking pictures can include
The external camera of camera, mobile terminal built in mobile terminal.Memory 2003 can be high-speed RAM memory, also may be used
To be non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.Memory 2003 can
Choosing can also be at least one storage device for being located remotely from above-mentioned processor 2001.As shown in figure 4, as a kind of computer
Operating system, network communication module, Subscriber Interface Module SIM and data processing can be included in the memory 2003 of storage medium
Application program.
In the image processing apparatus 2000 shown in Fig. 4, processor 2001 can be used for calling to be stored in memory 2003
Data process application, and specifically perform following operate:
If detecting instruction for previewing, the first frame buffer is created, first frame buffer is used for the matchmaker for drawing first resolution
Volume data;
The first media data is obtained, first media data is the first resolution;
First media data is plotted in first frame buffer, and shown first described in first frame buffer
Previewing media corresponding to media data;
If detecting media generation instruction, the second frame buffer is created, second frame buffer is used to draw second resolution
Media data, the second resolution is more than the first resolution;
The second media data is obtained, second media data is the second resolution;
Second media data is plotted in second frame buffer, and described in second frame buffer
Two media datas, generate target medium.
Optionally, the processor 2001 obtains the first media data, and first media data is the first resolution,
Specifically include:
The 3rd media data of camera collection is obtained, the 3rd media data is the 3rd resolution ratio;
Processing is compressed to the 3rd media data, obtains first media data.
Optionally, the processor 2001 is additionally operable to carry out objective function processing to first media data;The processor
First media data is plotted in first frame buffer by 2001, and shows the first media described in first frame buffer
Previewing media corresponding to data, is specifically included:
First media data after the objective function processing will be carried out and be plotted in first frame buffer, and shown
Previewing media corresponding to first media data after the objective function processing is carried out in first frame buffer.
Optionally, the processor 2001 is additionally operable to carry out the objective function processing to second media data;At this
Second media data is plotted in second frame buffer by reason device 2001, and is shown second described in second frame buffer
Previewing media corresponding to media data, is specifically included:
Second media data after the objective function processing will be carried out and be plotted in second frame buffer, and shown
Previewing media corresponding to second media data after the objective function processing is carried out in second frame buffer.
Optionally, the processor 2001 carries out objective function processing to first media data, specifically includes:
If the target instruction target word for indicating to carry out first media data objective function processing is detected, to described the
One media data carries out the objective function processing.
Optionally, the processor 2001 shows preview matchmaker corresponding to the first media data described in first frame buffer
Body, specifically include:
The resolution ratio for adjusting viewing area is the first resolution;
Preview matchmaker corresponding to the first media data described in first frame buffer is shown in viewing area after the adjustment
Body.
The embodiment of the present invention also provides a kind of electronic equipment, and the electronic equipment includes:Memory, processor and it is stored in institute
The computer program that can be run on memory and on the processor is stated, described in the computing device during computer program,
For performing the image processing method in Fig. 1 or Fig. 2 embodiments, detail refer to the description of Fig. 1 or Fig. 2 embodiments,
This is repeated no more.
The embodiment of the present invention also provides a kind of computer-readable recording medium, and the computer-readable recording medium includes referring to
Order, when the instruction is run on computers so that computer performs Fig. 1 or Fig. 2 image processing method, and detail please
The description of reference picture 1 or Fig. 2 embodiments, will not be repeated here.
The embodiment of the present invention also provides a kind of application program, and the application program includes instruction, when the instruction is calculating
When being run on machine so that computer performs Fig. 1 or Fig. 2 image processing method, and detail refer to Fig. 1 or Fig. 2 embodiments
Description, will not be repeated here.
Although combining each embodiment herein, invention has been described, however, implementing the present invention for required protection
During, those skilled in the art are by checking the accompanying drawing, disclosure and appended claims, it will be appreciated that and it is real
Other changes of the existing open embodiment.In the claims, the word of " comprising " (comprising) one is not excluded for other compositions
Part or step, "a" or "an" are not excluded for multiple situations.Single processor or other units can realize claim
In some functions enumerating.Mutually different has been recited in mutually different dependent some measures, it is not intended that these are arranged
Apply to combine and produce good effect.
It will be understood by those skilled in the art that embodiments of the invention can be provided as method, apparatus (equipment) or computer journey
Sequence product.Therefore, in terms of the present invention can use complete hardware embodiment, complete software embodiment or combine software and hardware
The form of embodiment.Moreover, the present invention can use the calculating for wherein including computer usable program code in one or more
The computer program that machine usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.Computer program is stored/distributed in suitable medium, is provided together with other hardware or one as hardware
Part, other distribution forms can also be used, such as pass through the wired or wireless telecommunication systems of Internet or other.
The present invention be with reference to the embodiment of the present invention method, apparatus (equipment) and computer program product flow chart with/
Or block diagram describes.It should be understood that can by each flow in computer program instructions implementation process figure and/or block diagram and/
Or square frame and the flow in flow chart and/or block diagram and/or the combination of square frame.These computer program instructions can be provided
To the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices to produce one
Individual machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for realizing
The device for the function of being specified in one flow of flow chart or multiple flows and/or one square frame of block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
Although with reference to specific features and embodiment, invention has been described, it is clear that, do not departing from this hair
In the case of bright spirit and scope, various modifications and combinations can be carried out to it.Correspondingly, the specification and drawings are only institute
The exemplary illustration of the invention that attached claim is defined, and be considered as covered in the scope of the invention any and all and repair
Change, change, combining or equivalent.Obviously, those skilled in the art can to the present invention carry out it is various change and modification without
Depart from the spirit and scope of the present invention.So, if the present invention these modifications and variations belong to the claims in the present invention and its
Within the scope of equivalent technologies, then the present invention is also intended to comprising including these changes and modification.
Claims (10)
- A kind of 1. media data processing method, it is characterised in that including:If detecting instruction for previewing, the first frame buffer is created, first frame buffer is used for the media number for drawing first resolution According to;The first media data is obtained, first media data is the first resolution;First media data is plotted in first frame buffer, and shows the first media described in first frame buffer Previewing media corresponding to data;If detecting media generation instruction, the second frame buffer is created, second frame buffer is used for the matchmaker for drawing second resolution Volume data, the second resolution are more than the first resolution;The second media data is obtained, second media data is the second resolution;Second media data is plotted in second frame buffer, and second matchmaker in second frame buffer Volume data, generate target medium.
- 2. the method as described in claim 1, it is characterised in that the first media data of the acquisition includes:The 3rd media data of camera collection is obtained, the 3rd media data is the 3rd resolution ratio, the 3rd resolution ratio More than the first resolution;Processing is compressed to the 3rd media data, obtains first media data.
- 3. method as claimed in claim 2, it is characterised in that the 3rd resolution ratio is identical with the second resolution.
- 4. the method as described in claim 1, it is characterised in that described that first media data is being plotted in described first Frame buffer, and show described in first frame buffer before previewing media corresponding to the first media data, in addition to:Objective function processing is carried out to first media data;It is described that first media data is plotted in first frame buffer, and show first described in first frame buffer Previewing media corresponding to media data, including:First media data after the objective function processing will be carried out and be plotted in first frame buffer, and described in showing Previewing media corresponding to first media data after the objective function processing is carried out in first frame buffer.
- 5. method as claimed in claim 4, it is characterised in that described that second media data is being plotted in described second Frame buffer, and second media data in second frame buffer, before generating target medium, in addition to:The objective function processing is carried out to second media data;It is described that second media data is plotted in second frame buffer, and described in second frame buffer Two media datas, target medium is generated, including:Second media data after the objective function processing will be carried out and be plotted in second frame buffer, and according to described Second media data after the objective function processing is carried out in second frame buffer, generates target medium.
- 6. the method as described in claim any one of 1-5, it is characterised in that the described in the display first frame buffer Previewing media corresponding to one media data, including:The resolution ratio for adjusting viewing area is the first resolution;Previewing media corresponding to the first media data described in first frame buffer is shown in viewing area after the adjustment.
- A kind of 7. media data processing device, it is characterised in that including:First creation module, if for detecting instruction for previewing, create the first frame buffer, first frame buffer is used to drawing the The media data of one resolution ratio;First acquisition module, for obtaining the first media data, first media data is the first resolution;First drafting module, for first media data to be plotted in into first frame buffer;Display module, for showing previewing media corresponding to the first media data described in first frame buffer;Second creation module, if for detecting media generation instruction, the second frame buffer is created, second frame buffer is used to paint The media data of second resolution processed, the second resolution are more than the first resolution;Second acquisition module, for obtaining the second media data, second media data is the second resolution;Second drafting module, for second media data to be plotted in into second frame buffer;Generation module, for second media data in second frame buffer, generate target medium.
- 8. device as claimed in claim 7, it is characterised in that first acquisition module includes:Collecting unit, for obtaining the 3rd media data of camera collection, the 3rd media data is the 3rd resolution ratio, institute State the 3rd resolution ratio and be more than the first resolution;Compression unit, for being compressed processing to the 3rd media data, obtain first media data.
- 9. a kind of electronic equipment, it is characterised in that the electronic equipment includes:Memory, processor and it is stored in the storage On device and the computer program that can run on the processor, described in the computing device during computer program, for holding Method of the row as described in claim 1 to 6 any one.
- 10. a kind of computer-readable recording medium, including instruction, when the instruction is run on computers so that computer Perform the method as described in claim 1 to 6 any one.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710769051.4A CN107592450B (en) | 2017-08-30 | 2017-08-30 | Media data processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710769051.4A CN107592450B (en) | 2017-08-30 | 2017-08-30 | Media data processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107592450A true CN107592450A (en) | 2018-01-16 |
CN107592450B CN107592450B (en) | 2021-07-20 |
Family
ID=61050718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710769051.4A Active CN107592450B (en) | 2017-08-30 | 2017-08-30 | Media data processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107592450B (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1510950A (en) * | 2002-12-25 | 2004-07-07 | Multifunctional image processor | |
CN1742481A (en) * | 2003-04-07 | 2006-03-01 | 圣像实验室有限公司 | Method for capturing of real-time image |
CN102546925A (en) * | 2010-12-29 | 2012-07-04 | Lg电子株式会社 | Mobile terminal and controlling method thereof |
CN103139473A (en) * | 2011-11-28 | 2013-06-05 | 三星电子株式会社 | Method of eliminating a shutter-lag, camera module, and mobile device having the same |
CN103248818A (en) * | 2012-02-13 | 2013-08-14 | 宏达国际电子股份有限公司 | Image capture method and image capture system thereof |
CN103297676A (en) * | 2012-02-24 | 2013-09-11 | 宏达国际电子股份有限公司 | Image continuous shooting method and relative image capture system |
CN103369239A (en) * | 2012-03-28 | 2013-10-23 | 三星电子株式会社 | Image processing apparatus and method for camera |
CN103391414A (en) * | 2013-07-24 | 2013-11-13 | 杭州趣维科技有限公司 | Video processing device and processing method applied to mobile phone platform |
US20140232892A1 (en) * | 2013-02-20 | 2014-08-21 | Woodman Labs, Inc. | Digital signal processor buffer management |
CN104521227A (en) * | 2012-08-03 | 2015-04-15 | 三星电子株式会社 | Image processing method and apparatus |
CN105915793A (en) * | 2016-05-10 | 2016-08-31 | 北京奇虎科技有限公司 | Intelligent watch shooting processing method and device |
CN106227441A (en) * | 2015-06-07 | 2016-12-14 | 苹果公司 | For capturing digitally enhanced image and the equipment interacted and method |
-
2017
- 2017-08-30 CN CN201710769051.4A patent/CN107592450B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1510950A (en) * | 2002-12-25 | 2004-07-07 | Multifunctional image processor | |
CN1742481A (en) * | 2003-04-07 | 2006-03-01 | 圣像实验室有限公司 | Method for capturing of real-time image |
CN102546925A (en) * | 2010-12-29 | 2012-07-04 | Lg电子株式会社 | Mobile terminal and controlling method thereof |
CN103139473A (en) * | 2011-11-28 | 2013-06-05 | 三星电子株式会社 | Method of eliminating a shutter-lag, camera module, and mobile device having the same |
CN103248818A (en) * | 2012-02-13 | 2013-08-14 | 宏达国际电子股份有限公司 | Image capture method and image capture system thereof |
CN103297676A (en) * | 2012-02-24 | 2013-09-11 | 宏达国际电子股份有限公司 | Image continuous shooting method and relative image capture system |
CN103369239A (en) * | 2012-03-28 | 2013-10-23 | 三星电子株式会社 | Image processing apparatus and method for camera |
CN104521227A (en) * | 2012-08-03 | 2015-04-15 | 三星电子株式会社 | Image processing method and apparatus |
US20140232892A1 (en) * | 2013-02-20 | 2014-08-21 | Woodman Labs, Inc. | Digital signal processor buffer management |
CN103391414A (en) * | 2013-07-24 | 2013-11-13 | 杭州趣维科技有限公司 | Video processing device and processing method applied to mobile phone platform |
CN106227441A (en) * | 2015-06-07 | 2016-12-14 | 苹果公司 | For capturing digitally enhanced image and the equipment interacted and method |
CN105915793A (en) * | 2016-05-10 | 2016-08-31 | 北京奇虎科技有限公司 | Intelligent watch shooting processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN107592450B (en) | 2021-07-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20160366341A1 (en) | Image processing method and imaging device | |
CN111726533A (en) | Image processing method, image processing device, mobile terminal and computer readable storage medium | |
CN104994287B (en) | A kind of image pickup method and mobile terminal based on wide-angle camera | |
CN112954212B (en) | Video generation method, device and equipment | |
CN105120169A (en) | Information processing method and electronic equipment | |
CN109767401A (en) | Picture optimization method, device, terminal and corresponding storage medium | |
CN106385625A (en) | Image intermediate frame generation method and device | |
CN107302666A (en) | Photographic method, mobile terminal and computer-readable recording medium | |
CN111586305B (en) | Anti-shake method, anti-shake device and electronic equipment | |
KR20130103217A (en) | Apparatus for providing blurred image and method for providing blurred image | |
CN113010738A (en) | Video processing method and device, electronic equipment and readable storage medium | |
CN107592450A (en) | A kind of media data processing method and device | |
CN107155000A (en) | One kind is taken pictures behavior analysis method, device and mobile terminal | |
CN110969587A (en) | Image acquisition method and device and electronic equipment | |
CN115439386A (en) | Image fusion method and device, electronic equipment and storage medium | |
CN106161743A (en) | A kind of method for processing media resource, device and terminal | |
CN113473012A (en) | Virtualization processing method and device and electronic equipment | |
CN110874816B (en) | Image processing method, device, mobile terminal and storage medium | |
CN113810624A (en) | Video generation method and device and electronic equipment | |
CN112291474A (en) | Image acquisition method and device and electronic equipment | |
CN117271090A (en) | Image processing method, device, electronic equipment and medium | |
CN111966642B (en) | Picture management method and device and electronic equipment | |
CN112911163B (en) | Image exposure method and device and electronic equipment | |
CN113489901B (en) | Shooting method and device thereof | |
CN113923367B (en) | Shooting method and shooting device |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20181206 Address after: Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province Applicant after: Zhuhai Seal Interest Technology Co., Ltd. Address before: 519070, six level 601F, 10 main building, science and technology road, Tangjia Bay Town, Zhuhai, Guangdong. Applicant before: Zhuhai Juntian Electronic Technology Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |