CN106331532A - Data conversion method and device and electronic equipment - Google Patents
Data conversion method and device and electronic equipment Download PDFInfo
- Publication number
- CN106331532A CN106331532A CN201610743700.9A CN201610743700A CN106331532A CN 106331532 A CN106331532 A CN 106331532A CN 201610743700 A CN201610743700 A CN 201610743700A CN 106331532 A CN106331532 A CN 106331532A
- Authority
- CN
- China
- Prior art keywords
- converted
- value
- conversion
- conversion formula
- programmable device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/268—Signal distribution or switching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/01—Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
- H04N7/0127—Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level by changing the field or frame frequency of the incoming video signal, e.g. frame rate converter
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
Abstract
The embodiment of the invention discloses a data conversion method, a data conversion device and electronic equipment, relates to a data conversion technology, and can effectively improve the data conversion efficiency. The data conversion method comprises the following steps: sequentially acquiring values to be converted of all pixel points in a data frame to be converted to obtain a frame value sequence to be converted; inquiring a conversion formula programmer set to obtain a conversion formula programmer mapped by the value to be converted, wherein the conversion formula programmer is a programmer for programming a conversion formula in a parallel processing mode; and writing the frame to-be-converted value sequence into the obtained conversion formula programmer, and operating the obtained conversion formula programmer to obtain a frame conversion value sequence. The method is suitable for converting YUV data into RGB data.
Description
Technical field
The present invention relates to data conversion technique, particularly relate to a kind of data transfer device, device and electronic equipment.
Background technology
Along with compunication and Internet technology, the development of especially 4G communication technology, electronic equipment, example
As, intelligent mobile phone, personal digital assistant, palm PC, notebook computer etc. are applied more and more extensive, pacify in electronic equipment
Dress application program (APP, Application) get more and more, it is provided that application function more and more abundanter.For example, profit
With photographic head built-in in electronic equipment, video shooting can be carried out whenever and wherever possible and store, and by the video stored or image
Share such that it is able to greatly strengthen and enrich the experience of user.
At MultiMedia Field, the storage format of video is different from the storage format of image, and image typically uses RGB
(RGB, Red, Green, Blue) storage format, video typically uses YUV (Luma and Chroma), i.e.
YUV storage format.Wherein, Y represents lightness (Lumina nce or Luma), i.e. grey decision-making;U and V represents colourity
(Chrominance or Chroma), effect is to describe colors of image and saturation, and for the color of specified pixel, lightness is believed
Number Y and carrier chrominance signal U, V are to separate.Compared with requiring the RGB storage format that three independent signals transmit simultaneously, YUV deposits
Storage form only need to take few frequency range.
At present, in the electronic device, the data acquisition of camera collection YUV storage format, but in actual applications, user
Based on personalized video tastes demand, need the video of shooting is carried out the post processing of some personalizations, such as, to photographic head
The video (data) of shooting adds filter, in this last handling process, needs that the data of YUV storage format are converted into RGB and deposits
The data of storage form are to carry out respective handling, and existing conversion method is to use serial conversion, i.e. obtains the number of YUV storage format
The YUV value of the pixel according to, according to conversion formula, is converted to the rgb value of the corresponding pixel points of RGB storage format, then,
Each pixel in the data of traversal YUV storage format, completes the conversion to pixel with this.But this data transfer device,
Time needed for conversion is longer so that the real-time of data conversion is inefficient.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of data transfer device, device and electronic equipment, it is possible to effectively promote
Data conversion efficiency, to solve in existing data serial conversion method, the time needed for data conversion is longer, data conversion
The problem that real-time is inefficient.
First aspect, the embodiment of the present invention provides a kind of data transfer device, including:
Sequentially obtain the value to be converted of each pixel in Frame to be converted, obtain frame value sequence to be converted;
Inquiry conversion formula programmable device collection, obtains the conversion formula programmable device that described value to be converted maps, and described conversion is public
Formula programmable device is the programmable device being programmed conversion formula by the way of parallel processing;
In the conversion formula programmable device obtain value sequence to be converted for described frame write, run the conversion formula of described acquisition
Programmable device, obtains frame conversion value sequence.
In conjunction with first aspect, in the first embodiment of first aspect, described value to be converted is for using YUV4:2:0
The YUV value of sample format, the conversion formula in the conversion formula programmable device of described acquisition is:
Ri=Yi+1.403*(Vi-128)
Gi=Yi-0.344*(Ui-128)-0.714*(Vi-128)
Bi=Yi+1.770*(Ui-128)
In formula,
Ri、Gi、BiIt is respectively the R conversion value of ith pixel point, G conversion value and B conversion value;
Yi、Ui、ViIt is respectively the Y value to be converted of ith pixel point, U value to be converted and V value to be converted.
In conjunction with the first embodiment of first aspect, in the second embodiment of first aspect, described acquisition
Conversion formula programmable device includes multiple conversion formula.
In conjunction with the first embodiment of first aspect, in the third embodiment of first aspect, hardware is utilized to open
Conversion formula programmable device is programmed by the tinter putting shape library.
In conjunction with first aspect, in the 4th kind of embodiment of first aspect, described value sequence to be converted for described frame is write
Enter the conversion formula programmable device obtained to include:
Add up the conversion formula number in the conversion formula programmable device of described acquisition;
Value sequence to be converted to described frame carries out cutting, and the value cutting sequence to be converted that each cutting obtains includes described
The value to be converted that the pixel of conversion formula number is corresponding;
In the conversion formula programmable device sequentially value cutting sequence to be converted write obtained.
Second aspect, the embodiment of the present invention provides a kind of DTU, including: sequence generating module to be converted, turns
Change formula enquiry module and conversion sequence acquisition module, wherein,
Sequence generating module to be converted, for sequentially obtaining the value to be converted of each pixel in Frame to be converted, obtains
Frame value sequence to be converted;
Conversion formula enquiry module, is used for inquiring about conversion formula programmable device collection, obtains the conversion that described value to be converted maps
Formula programmable device, described conversion formula programmable device is the programmable device being programmed conversion formula by the way of parallel processing;
Conversion sequence acquisition module, in the conversion formula programmable device that value sequence to be converted for described frame write is obtained,
Run the conversion formula programmable device of described acquisition, obtain frame conversion value sequence.
In conjunction with second aspect, in the first embodiment of second aspect, described value to be converted is for using YUV4:2:0
The YUV value of sample format, the conversion formula in the conversion formula programmable device of described acquisition is:
Ri=Yi+1.403*(Vi-128)
Gi=Yi-0.344*(Ui-128)-0.714*(Vi-128)
Bi=Yi+1.770*(Ui-128)
In formula,
Ri、Gi、BiIt is respectively the R conversion value of ith pixel point, G conversion value and B conversion value;
Yi、Ui、ViIt is respectively the Y value to be converted of ith pixel point, U value to be converted and V value to be converted.
In conjunction with the first embodiment of second aspect, in the second embodiment of second aspect, described acquisition
Conversion formula programmable device includes multiple conversion formula.
In conjunction with the first embodiment of second aspect, in the third embodiment of second aspect, hardware is utilized to open
Conversion formula programmable device is programmed by the tinter putting shape library.
In conjunction with second aspect, in the 4th kind of embodiment of second aspect, described conversion sequence acquisition module includes: system
Meter unit, cutting unit, writing unit and conversion sequence acquiring unit, wherein,
Statistic unit, adds up the conversion formula number in the conversion formula programmable device of described acquisition;
Cutting unit, value sequence to be converted to described frame carries out cutting, the value cutting sequence to be converted that each cutting obtains
Include the value to be converted that the pixel of described conversion formula number is corresponding;
Writing unit, in the conversion formula programmable device sequentially value cutting sequence to be converted write obtained;
Conversion sequence acquiring unit, for running the conversion formula programmable device of described acquisition, obtains frame conversion value sequence.
The third aspect, the embodiment of the present invention provides a kind of electronic equipment, and described electronic equipment includes: housing, processor, deposit
Reservoir, circuit board and power circuit, wherein, circuit board is placed in the interior volume that housing surrounds, processor and memorizer and arranges
On circuit boards;Power circuit, powers for each circuit or the device for above-mentioned electronic equipment;Memorizer is used for storing can be held
Line program code;Processor runs and executable program code pair by reading the executable program code of storage in memorizer
The program answered, is used for performing to operate as follows:
Sequentially obtain the value to be converted of each pixel in Frame to be converted, obtain frame value sequence to be converted;
Inquiry conversion formula programmable device collection, obtains the conversion formula programmable device that described value to be converted maps, and described conversion is public
Formula programmable device is the programmable device being programmed conversion formula by the way of parallel processing;
In the conversion formula programmable device obtain value sequence to be converted for described frame write, run the conversion formula of described acquisition
Programmable device, obtains frame conversion value sequence.
Fourth aspect, the embodiment of the present invention additionally provides a kind of storage medium, is used for storing application program, described application journey
Sequence is for performing a kind of data transfer device that the embodiment of the present invention is provided.
5th aspect, the embodiment of the present invention additionally provides a kind of application program, and being used for performing the embodiment of the present invention is provided
A kind of data transfer device.
A kind of data transfer device, device and the electronic equipment that the embodiment of the present invention provides, to be converted by sequentially obtaining
The value to be converted of each pixel in Frame, obtains frame value sequence to be converted;Inquire about conversion formula programmable device collection, treat described in acquisition
The conversion formula programmable device that conversion value maps, described conversion formula programmable device is to enter conversion formula by the way of parallel processing
The programmable device of row programming;In the conversion formula programmable device obtain value sequence to be converted for described frame write, run described acquisition
Conversion formula programmable device, obtains frame conversion value sequence, it is possible to effectively promote data conversion efficiency, to solve existing data serial
In conversion method, the time needed for data conversion is longer, the inefficient problem of real-time of data conversion.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to
Other accompanying drawing is obtained according to these accompanying drawings.
Fig. 1 is embodiments of the invention one data transfer device schematic flow sheets;
Fig. 2 is embodiments of the invention two DTU structural representations;
Fig. 3 is the structural representation of one embodiment of electronic equipment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawings the embodiment of the present invention is described in detail.
It will be appreciated that described embodiment be only the present invention a part of embodiment rather than whole embodiments.Base
Embodiment in the present invention, those of ordinary skill in the art obtained under not making creative work premise all its
Its embodiment, broadly falls into the scope of protection of the invention.
Embodiment one
Fig. 1 is embodiments of the invention one data transfer device schematic flow sheets, as it is shown in figure 1, the method for the present embodiment
May include that
Step 101, sequentially obtains the value to be converted of each pixel in Frame to be converted, obtains frame value sequence to be converted;
In the present embodiment, as an alternative embodiment, data to be converted can be the data using YUV storage format, example
As, YUV video data;As another alternative embodiment, data to be converted can also be the data using RGB storage format, example
As, video RGB data, this is not construed as limiting by the present embodiment.
In the present embodiment, packet to be converted contains one or more Frames to be converted, and each Frame to be converted is corresponding
One frame value sequence to be converted.As an alternative embodiment, frame value sequence to be converted is as shown in table 1.
Table 1
Y | U | V | |
P1 | Y1 | U1 | V1 |
P2 | Y2 | U2 | V2 |
… | … | … | … |
Pn | Yn | Un | Vn |
In table 1, P1, P2 are pixel, and n is the pixel number comprised in Frame to be converted.
Step 102, inquires about conversion formula programmable device collection, obtains the conversion formula programmable device that described value to be converted maps, institute
Stating conversion formula programmable device is the programmable device being programmed conversion formula by the way of parallel processing;
In the present embodiment, as an alternative embodiment, conversion formula programmable device collection includes: YUV to RGB conversion formula programs
Device and RGB to YUV conversion formula programmable device.If value to be converted is YUV value, then the conversion formula that this value to be converted maps is compiled
Journey device is YUV to RGB conversion formula programmable device, if value to be converted is rgb value, then the conversion formula that this value to be converted maps is compiled
Journey device is RGB to YUV conversion formula programmable device.
In the present embodiment, as an alternative embodiment, utilize hardware development shape library (OpenGL, Open Graphics
Conversion formula is programmed by tinter (shader) Library), as such, it is possible to utilize video card graphic process unit (GPU,
Graphic Processing Unit) function carry out process work, CPU space can be discharged and improve efficiency.Certainly, actual
In application, it is also possible to for using software programming mode to be programmed conversion formula, this is not construed as limiting by the present embodiment.
In the present embodiment, as an alternative embodiment, can be that one or more pixel arranges a thread to count
According to conversion, in conversion formula programmable device, include multiple thread.
In the present embodiment, for yuv data, the sample format of yuv data includes: YUV4:4:4, YUV4:2:2 and
YUV4:2:0.Wherein,
For YUV4:4:4 sample format, each Y shares one group of UV;
For YUV4:2:2 sample format, each two Y shares one group of UV;
For YUV4:2:0 sample format, every four Y share one group of UV.
Wherein, YUV4:2:0 sample format has the compression ratio of maximum, for example, it is assumed that there is the pixel of a 2x2 size,
Use RGB storage format to store, need 12 byte-sized, if using the YUV4:2:0 sampling in YUV storage format
Form stores, it is only necessary to 6 bytes, and the memory space taken can reduce half.
In the present embodiment, as an alternative embodiment, value to be converted is the YUV value using YUV4:2:0 sample format.Right
In YUV4:2:0 sample format, owing to being that YUV component is packed respectively, split data into 3 pieces and store.Such as, for one
The data of W*H size, use YUV420 sample format to store, and the storage size for Y distribution is W*H, for U distribution
Storage size is W*H/4, and the storage size for V distribution is W*H/4.
In the present embodiment, if value to be converted is the YUV value using YUV4:2:0 sample format, corresponding conversion formula is such as
Under:
Ri=Yi+1.403*(Vi-128)
Gi=Yi-0.344*(Ui-128)-0.714*(Vi-128)
Bi=Yi+1.770*(Ui-128)
In formula,
Ri、Gi、BiIt is respectively the R conversion value of ith pixel point, G conversion value and B conversion value;
Yi、Ui、ViIt is respectively the Y value to be converted of ith pixel point, U value to be converted and V value to be converted.
In the present embodiment, by arranging a conversion formula for one or more pixels, the corresponding line of each conversion formula
Journey, each conversion formula is responsible for the data conversion of one or more pixels of correspondence so that in conversion formula programmable device, bag
Containing multiple identical conversion formulas, Y and UV of each pixel can use simultaneously, it is not necessary to changing successively of serial,
It is thus possible to realize concurrently yuv data being converted to RGB data, the time needed for conversion can be substantially reduced, strengthen data
The real-time efficiency of conversion, improves data conversion performance.Further, conversion formula is compiled by the shader utilizing OpenGL
Journey, owing to OpenGL is a set of GPU hardware interface, it is possible to use GPU carries out parallel processing to data, it is possible to effectively accelerates whole
Data conversion process.
Step 103, in the conversion formula programmable device obtain value sequence to be converted for described frame write, runs described acquisition
Conversion formula programmable device, obtains frame conversion value sequence.
In the present embodiment, as an alternative embodiment, the conversion formula that value sequence to be converted for described frame write obtains is compiled
Journey device includes:
A11, adds up the conversion formula number in the conversion formula programmable device of described acquisition;
In the present embodiment, including one or more conversion formula in conversion formula programmable device, each conversion formula is corresponding
The data conversion of one pixel.According to the conversion formula number in conversion formula programmable device, it may be determined that the pixel of parallel processing
Number.
A12, value sequence to be converted to described frame carries out cutting, and the value cutting sequence to be converted that each cutting obtains includes
The value to be converted that the pixel of described conversion formula number is corresponding;
In the present embodiment, if the conversion formula number in conversion formula programmable device is 5, then with 5 pixels for cutting list
Position, value sequence to be converted to frame carries out cutting process, each value cutting sequence to be converted include 5 pixels corresponding wait turn
Changing value, last value cutting sequence to be converted can comprise the to be converted value corresponding less than 5 pixels.
A13, in the conversion formula programmable device sequentially value cutting sequence to be converted write obtained.
In the present embodiment, as an alternative embodiment, can be by the figure of the value the most incoming video card of cutting sequence to be converted
In processor (GPU, Graphic Processing Unit).
In the present embodiment, as an alternative embodiment, OpenGL can be started and render pipeline to run turning of described acquisition
Change formula programmable device.Pipeline is rendered, by (to be converted for the yuv data in the graphic process unit of incoming video card by starting OpenGL
Value) utilize YUV to RGB conversion formula to process parallel, obtain RGB frame conversion value sequence, this parallel processing time-consumingly exists substantially
About 1ms, thus, it is possible to be converted to RGB data by yuv data more quickly.
In the present embodiment, after obtaining frame conversion value sequence (RGB data), employing RGB storage format can be directly displayed
RGB data, it is also possible to from the GPU of video card take out RGB data, it is also possible to the RGB data obtained is further processed,
Such as, the RGB data being converted to is carried out filter process etc..
The data transfer device of the embodiment of the present invention, by sequentially obtaining the to be converted of each pixel in Frame to be converted
Value, obtains frame value sequence to be converted;Inquiry conversion formula programmable device collection, obtains the conversion formula programming that described value to be converted maps
Device, described conversion formula programmable device is the programmable device being programmed conversion formula by the way of parallel processing;By described frame
In the conversion formula programmable device that value sequence to be converted write obtains, run the conversion formula programmable device of described acquisition, obtain frame and turn
Change value sequence.So, owing to arranging multiple identical conversion formula in conversion formula programmable device parallel, it is possible to realize concurrently
Value to be converted (such as, yuv data) is converted to conversion value (such as, RGB data), and data transfer speeds is very fast, substantially exists
About 1ms, performance can reach tens times of serial algorithm, such that it is able to be substantially reduced the time needed for data conversion, it is possible to
Effectively promote the real-time efficiency of data conversion.
Embodiment two
Fig. 2 is embodiments of the invention two DTU structural representations, as in figure 2 it is shown, the device of the present embodiment
May include that sequence generating module 21 to be converted, conversion formula enquiry module 22 and conversion sequence acquisition module 23, wherein,
Sequence generating module 21 to be converted, for sequentially obtaining the value to be converted of each pixel in Frame to be converted,
To frame value sequence to be converted;
In the present embodiment, data to be converted can be the data using YUV storage format, such as, YUV video data;Also
Can be the data using RGB storage format, such as, video RGB data.
In the present embodiment, packet to be converted contains one or more Frames to be converted, and each Frame to be converted is corresponding
One frame value sequence to be converted.
Conversion formula enquiry module 22, is used for inquiring about conversion formula programmable device collection, obtains turning of described value to be converted mapping
Changing formula programmable device, described conversion formula programmable device is the programming being programmed conversion formula by the way of parallel processing
Device;
In the present embodiment, as an alternative embodiment, conversion formula programmable device collection includes: YUV to RGB conversion formula programs
Device and RGB to YUV conversion formula programmable device.If value to be converted is YUV value, then the conversion formula that this value to be converted maps is compiled
Journey device is YUV to RGB conversion formula programmable device, if value to be converted is rgb value, then the conversion formula that this value to be converted maps is compiled
Journey device is RGB to YUV conversion formula programmable device.
In the present embodiment, as an alternative embodiment, a conversion formula programmable device includes multiple conversion formula, each
The corresponding thread of conversion formula.
In the present embodiment, as an alternative embodiment, utilize the tinter of hardware development shape library that conversion formula is programmed
Device is programmed.
Conversion sequence acquisition module 23, for conversion formula programmable device value sequence to be converted for described frame write obtained
In, run the conversion formula programmable device of described acquisition, obtain frame conversion value sequence.
In the present embodiment, as an alternative embodiment, value to be converted is the YUV value using YUV4:2:0 sample format, institute
The conversion formula stated in the conversion formula programmable device of acquisition is:
Ri=Yi+1.403*(Vi-128)
Gi=Yi-0.344*(Ui-128)-0.714*(Vi-128)
Bi=Yi+1.770*(Ui-128)
In formula,
Ri、Gi、BiIt is respectively the R conversion value of ith pixel point, G conversion value and B conversion value;
Yi、Ui、ViIt is respectively the Y value to be converted of ith pixel point, U value to be converted and V value to be converted.
In the present embodiment, as an alternative embodiment, conversion sequence acquisition module 23 includes: statistic unit, cutting unit,
Writing unit and conversion sequence acquiring unit (not shown), wherein,
Statistic unit, adds up the conversion formula number in the conversion formula programmable device of described acquisition;
Cutting unit, value sequence to be converted to described frame carries out cutting, the value cutting sequence to be converted that each cutting obtains
Include the value to be converted that the pixel of described conversion formula number is corresponding;
Writing unit, in the conversion formula programmable device sequentially value cutting sequence to be converted write obtained;
In the present embodiment, as an alternative embodiment, can be by the figure of the value the most incoming video card of cutting sequence to be converted
In processor.
Conversion sequence acquiring unit, for running the conversion formula programmable device of described acquisition, obtains frame conversion value sequence.
In the present embodiment, as an alternative embodiment, OpenGL can be started and render pipeline to run turning of described acquisition
Change formula programmable device.
The device of the present embodiment, may be used for performing the technical scheme of embodiment of the method shown in Fig. 1, and it realizes principle and skill
Art effect is similar to, and here is omitted.
It should be noted that in this article, the relational terms of such as first and second or the like is used merely to a reality
Body or operation separate with another entity or operating space, and deposit between not necessarily requiring or imply these entities or operating
Relation or order in any this reality.And, term " includes ", " comprising " or its any other variant are intended to
Comprising of nonexcludability, so that include that the process of a series of key element, method, article or equipment not only include that those are wanted
Element, but also include other key elements being not expressly set out, or also include for this process, method, article or equipment
Intrinsic key element.In the case of there is no more restriction, statement " including ... " key element limited, it is not excluded that
Including process, method, article or the equipment of described key element there is also other identical element.
Each embodiment in this specification all uses relevant mode to describe, identical similar portion between each embodiment
Dividing and see mutually, what each embodiment stressed is the difference with other embodiments.
For device embodiment, owing to it is substantially similar to embodiment of the method, so the comparison described is simple
Single, relevant part sees the part of embodiment of the method and illustrates.
Represent in flow charts or the logic described otherwise above at this and/or step, for example, it is possible to be considered as to use
In the sequencing list of the executable instruction realizing logic function, may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (system such as computer based system, including processor or other can hold from instruction
Row system, device or equipment instruction fetch also perform the system instructed) use, or combine these instruction execution systems, device or set
Standby and use.For the purpose of this specification, " computer-readable medium " can be any can to comprise, store, communicate, propagate or pass
Defeated program is for instruction execution system, device or equipment or combines these instruction execution systems, device or equipment and the dress that uses
Put.The more specifically example (non-exhaustive list) of computer-readable medium includes following: have the electricity of one or more wiring
Connecting portion (electronic installation), portable computer diskette box (magnetic device), random access memory (RAM), read only memory
(ROM), erasable read only memory (EPROM or flash memory), the fiber device edited, and portable optic disk is read-only deposits
Reservoir (CDROM).It addition, computer-readable medium can even is that and can print the paper of described program thereon or other are suitable
Medium, because then can carry out editing, interpreting or if desired with it such as by paper or other media are carried out optical scanning
His suitable method is processed to electronically obtain described program, is then stored in computer storage.
Should be appreciated that each several part of the present invention can realize by hardware, software, firmware or combinations thereof.
In the above-described embodiment, multiple steps or method can be with storing in memory and by suitably instructing execution
Software or firmware that system performs realize.Such as, if realized with hardware, with the most the same, available
Any one or their combination in following technology well known in the art realize: have for data signal realizes logic merit
The discrete logic of the logic gates of energy, has the special IC of suitable combination logic gate circuit, programmable gate
Array (PGA), field programmable gate array (FPGA) etc..
The embodiment of the present invention also provides for a kind of electronic equipment, and described electronic equipment comprises the dress described in aforementioned any embodiment
Put.
Fig. 3 is the structural representation of one embodiment of electronic equipment of the present invention, it is possible to achieve implement shown in Fig. 1-2 of the present invention
The flow process of example, as it is shown on figure 3, above-mentioned electronic equipment may include that housing 31, processor 32, memorizer 33, circuit board 34 and electricity
Source circuit 35, wherein, circuit board 34 is placed in the interior volume that housing 31 surrounds, processor 32 and memorizer 33 and is arranged on circuit
On plate 34;Power circuit 35, powers for each circuit or the device for above-mentioned electronic equipment;Memorizer 33 is used for storing can be held
Line program code;Processor 32 runs and executable program generation by reading the executable program code of storage in memorizer 33
The program that code is corresponding, is used for performing to operate as follows:
Sequentially obtain the value to be converted of each pixel in Frame to be converted, obtain frame value sequence to be converted;
Inquiry conversion formula programmable device collection, obtains the conversion formula programmable device that described value to be converted maps, and described conversion is public
Formula programmable device is the programmable device being programmed conversion formula by the way of parallel processing;
In the conversion formula programmable device obtain value sequence to be converted for described frame write, run the conversion formula of described acquisition
Programmable device, obtains frame conversion value sequence.
Processor 32 to concrete process and the processor 32 of performing of above-mentioned steps by running executable program code
The step performed further, may refer to the description of Fig. 1-2 illustrated embodiment of the present invention, does not repeats them here.
This electronic equipment exists in a variety of forms, includes but not limited to:
(1) mobile communication equipment: the feature of this kind equipment is to possess mobile communication function, and to provide speech, data
Communication is main target.This Terminal Type includes: smart mobile phone (such as iPhone), multimedia handset, functional mobile phone, and low
End mobile phone etc..
(2) super mobile personal computer equipment: this kind equipment belongs to the category of personal computer, has calculating and processes merit
Can, the most also possess mobile Internet access characteristic.This Terminal Type includes: PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device: this kind equipment can show and play content of multimedia.This kind equipment includes: audio frequency,
Video player (such as iPod), handheld device, e-book, and intelligent toy and portable car-mounted navigator.
(4) server: providing the equipment of the service of calculating, the composition of server includes that processor, hard disk, internal memory, system are total
Lines etc., server is similar with general computer architecture, but owing to needing to provide highly reliable service, is therefore processing energy
The aspects such as power, stability, reliability, safety, extensibility, manageability require higher.
(5) other have the electronic equipment of data interaction function.
The embodiment of the present invention additionally provides a kind of storage medium, is used for storing application program, and described application program is used for holding
A kind of data transfer device that the row embodiment of the present invention is provided.
The embodiment of the present invention additionally provides a kind of application program, for performing a kind of data that the embodiment of the present invention is provided
Conversion method.
Those skilled in the art are appreciated that and realize all or part of step that above-described embodiment method is carried
Suddenly the program that can be by completes to instruct relevant hardware, and described program can be stored in a kind of computer-readable storage medium
In matter, this program upon execution, including one or a combination set of the step of embodiment of the method.
For convenience of description, describing apparatus above is to be divided into various units/modules to be respectively described with function.Certainly, exist
Implement the function of each unit/module to be realized in same or multiple softwares and/or hardware during the present invention.
As seen through the above description of the embodiments, those skilled in the art is it can be understood that arrive this
Invention can add the mode of required general hardware platform by software and realize.Based on such understanding, the present invention
The part that the most in other words prior art contributed of technical scheme can embody with the form of software product, should
Computer software product can be stored in storage medium, such as ROM/RAM, magnetic disc, CD etc., including some instructions with so that
One computer equipment (can be personal computer, server, or the network equipment etc.) perform each embodiment of the present invention or
The method described in some part of person's embodiment.
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is not limited thereto, and any
Those familiar with the art in the technical scope that the invention discloses, the change that can readily occur in or replacement, all answer
Contain within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with scope of the claims.
Claims (10)
1. a data transfer device, it is characterised in that including:
Sequentially obtain the value to be converted of each pixel in Frame to be converted, obtain frame value sequence to be converted;
Inquiry conversion formula programmable device collection, obtains the conversion formula programmable device that described value to be converted maps, and described conversion formula is compiled
Journey device is the programmable device being programmed conversion formula by the way of parallel processing;
In the conversion formula programmable device obtain value sequence to be converted for described frame write, run the conversion formula programming of described acquisition
Device, obtains frame conversion value sequence.
Data transfer device the most according to claim 1, it is characterised in that described value to be converted is adopted for using YUV4:2:0
The YUV value of sample form, the conversion formula in the conversion formula programmable device of described acquisition is:
Ri=Yi+1.403*(Vi-128)
Gi=Yi-0.344*(Ui-128)-0.714*(Vi-128)
Bi=Yi+1.770*(Ui-128)
In formula,
Ri、Gi、BiIt is respectively the R conversion value of ith pixel point, G conversion value and B conversion value;
Yi、Ui、ViIt is respectively the Y value to be converted of ith pixel point, U value to be converted and V value to be converted.
Data transfer device the most according to claim 2, it is characterised in that wrap in the conversion formula programmable device of described acquisition
Containing multiple conversion formulas.
Data transfer device the most according to claim 2, it is characterised in that utilize the tinter pair of hardware development shape library
Conversion formula programmable device is programmed.
Data transfer device the most according to claim 1, it is characterised in that described by value sequence to be converted for described frame write
The conversion formula programmable device obtained includes:
Add up the conversion formula number in the conversion formula programmable device of described acquisition;
Value sequence to be converted to described frame carries out cutting, and the value cutting sequence to be converted that each cutting obtains includes described conversion
The value to be converted that the pixel of formula number is corresponding;
In the conversion formula programmable device sequentially value cutting sequence to be converted write obtained.
6. a DTU, it is characterised in that including: sequence generating module to be converted, conversion formula enquiry module with
And conversion sequence acquisition module, wherein,
Sequence generating module to be converted, for sequentially obtaining the value to be converted of each pixel in Frame to be converted, obtains frame and treats
Conversion value sequence;
Conversion formula enquiry module, is used for inquiring about conversion formula programmable device collection, obtains the conversion formula that described value to be converted maps
Programmable device, described conversion formula programmable device is the programmable device being programmed conversion formula by the way of parallel processing;
Conversion sequence acquisition module, in conversion formula programmable device value sequence to be converted for described frame write obtained, runs
The conversion formula programmable device of described acquisition, obtains frame conversion value sequence.
DTU the most according to claim 6, it is characterised in that described value to be converted is adopted for using YUV4:2:0
The YUV value of sample form, the conversion formula in the conversion formula programmable device of described acquisition is:
Ri=Yi+1.403*(Vi-128)
Gi=Yi-0.344*(Ui-128)-0.714*(Vi-128)
Bi=Yi+1.770*(Ui-128)
In formula,
Ri、Gi、BiIt is respectively the R conversion value of ith pixel point, G conversion value and B conversion value;
Yi、Ui、ViIt is respectively the Y value to be converted of ith pixel point, U value to be converted and V value to be converted.
DTU the most according to claim 7, it is characterised in that wrap in the conversion formula programmable device of described acquisition
Containing multiple conversion formulas.
DTU the most according to claim 7, it is characterised in that utilize the tinter pair of hardware development shape library
Conversion formula programmable device is programmed.
10. an electronic equipment, it is characterised in that described electronic equipment includes: housing, processor, memorizer, circuit board and electricity
Source circuit, wherein, circuit board is placed in the interior volume that housing surrounds, processor and memorizer and arranges on circuit boards;Power supply
Circuit, powers for each circuit or the device for above-mentioned electronic equipment;Memorizer is used for storing executable program code;Process
Device runs the program corresponding with executable program code by reading the executable program code of storage in memorizer, is used for holding
The following operation of row:
Sequentially obtain the value to be converted of each pixel in Frame to be converted, obtain frame value sequence to be converted;
Inquiry conversion formula programmable device collection, obtains the conversion formula programmable device that described value to be converted maps, and described conversion formula is compiled
Journey device is the programmable device being programmed conversion formula by the way of parallel processing;
In the conversion formula programmable device obtain value sequence to be converted for described frame write, run the conversion formula programming of described acquisition
Device, obtains frame conversion value sequence.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610743700.9A CN106331532A (en) | 2016-08-26 | 2016-08-26 | Data conversion method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610743700.9A CN106331532A (en) | 2016-08-26 | 2016-08-26 | Data conversion method and device and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106331532A true CN106331532A (en) | 2017-01-11 |
Family
ID=57791214
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610743700.9A Pending CN106331532A (en) | 2016-08-26 | 2016-08-26 | Data conversion method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106331532A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107680031A (en) * | 2017-09-29 | 2018-02-09 | 郑州云海信息技术有限公司 | A kind of RGB turns YUV methods, system and computer-readable recording medium |
CN108154539A (en) * | 2017-12-18 | 2018-06-12 | 北京酷我科技有限公司 | A kind of colorspace data converting algorithm based on Opengl ES |
EP3893479A1 (en) * | 2020-04-17 | 2021-10-13 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Image processing method and apparatus, electronic device and computer-readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050088455A1 (en) * | 2003-10-24 | 2005-04-28 | Chang Ke Y. | Image processing |
CN101867833A (en) * | 2010-06-12 | 2010-10-20 | 北京东方艾迪普科技发展有限公司 | Method and device for converting video image format |
CN102622723A (en) * | 2011-05-25 | 2012-08-01 | 上海大学 | Image interpolation based on CUDA (compute unified device architecture) and edge detection |
CN105163128A (en) * | 2015-08-31 | 2015-12-16 | 华南理工大学 | Screen image acquisition method for accelerating image conversion in parallel by GPU (Graphics Processing Unit) |
CN105681800A (en) * | 2016-01-27 | 2016-06-15 | 桂林长海发展有限责任公司 | Device and method for quickly converting YUV420 into RGB format |
-
2016
- 2016-08-26 CN CN201610743700.9A patent/CN106331532A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050088455A1 (en) * | 2003-10-24 | 2005-04-28 | Chang Ke Y. | Image processing |
CN101867833A (en) * | 2010-06-12 | 2010-10-20 | 北京东方艾迪普科技发展有限公司 | Method and device for converting video image format |
CN102622723A (en) * | 2011-05-25 | 2012-08-01 | 上海大学 | Image interpolation based on CUDA (compute unified device architecture) and edge detection |
CN105163128A (en) * | 2015-08-31 | 2015-12-16 | 华南理工大学 | Screen image acquisition method for accelerating image conversion in parallel by GPU (Graphics Processing Unit) |
CN105681800A (en) * | 2016-01-27 | 2016-06-15 | 桂林长海发展有限责任公司 | Device and method for quickly converting YUV420 into RGB format |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107680031A (en) * | 2017-09-29 | 2018-02-09 | 郑州云海信息技术有限公司 | A kind of RGB turns YUV methods, system and computer-readable recording medium |
CN108154539A (en) * | 2017-12-18 | 2018-06-12 | 北京酷我科技有限公司 | A kind of colorspace data converting algorithm based on Opengl ES |
EP3893479A1 (en) * | 2020-04-17 | 2021-10-13 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Image processing method and apparatus, electronic device and computer-readable storage medium |
US11930307B2 (en) | 2020-04-17 | 2024-03-12 | Beijing Baidu Netcom Science Technology Co., Ltd. | Image processing method and apparatus, electronic device and computer-readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103460253B (en) | Pixel value compaction for graphics process | |
RU2677584C1 (en) | Exploiting frame to frame coherency in architecture of image construction with primitives sorting at intermediate stage | |
CN105233498A (en) | Game character staining method and device, user terminal and game system | |
CN106331532A (en) | Data conversion method and device and electronic equipment | |
CN103209326A (en) | PNG (Portable Network Graphic) image compression method | |
CN106331822A (en) | Method and device for playing multiple videos and electronic equipment | |
CN103503032A (en) | Texturing in graphics hardware | |
CN107437272B (en) | Interactive entertainment method and device based on augmented reality and terminal equipment | |
CN109389661A (en) | A kind of animation file method for transformation and device | |
CN110533707A (en) | Illuminant estimation | |
CN105556574A (en) | Rendering apparatus, rendering method thereof, program and recording medium | |
CN111080806B (en) | Mapping processing method and device, electronic equipment and storage medium | |
US8294730B2 (en) | Anti-aliasing of a graphical object | |
CN106162224A (en) | Video transmission method and device and electronic equipment | |
CN105991982A (en) | Color matching for imaging systems | |
CN104113757B (en) | Color buffer compresses | |
CN110139149A (en) | A kind of video optimized method, apparatus, electronic equipment | |
CN106126248A (en) | Method and device for acquiring version information of operating system and electronic equipment | |
CN104641631B (en) | By the color enhancement of gamut extension | |
CN107707899A (en) | Multi-view image processing method, device and electronic equipment comprising moving target | |
CN106331479A (en) | Video processing method and device and electronic equipment | |
CN104077794A (en) | Picture staining method and device | |
CN105335989A (en) | Image coding method and image coding apparatus | |
CN109658525A (en) | Method and device for clearing redundant data in 3D model and electronic equipment | |
CN109146765A (en) | A kind of image processing method, primary processor, coprocessor and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170111 |