CN104765696A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN104765696A
CN104765696A CN201510161147.3A CN201510161147A CN104765696A CN 104765696 A CN104765696 A CN 104765696A CN 201510161147 A CN201510161147 A CN 201510161147A CN 104765696 A CN104765696 A CN 104765696A
Authority
CN
China
Prior art keywords
image data
predetermined format
frame video
subdata
video subdata
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510161147.3A
Other languages
Chinese (zh)
Inventor
张金良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TVM Beijing Education Technology Co Ltd
Original Assignee
TVM Beijing Education Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TVM Beijing Education Technology Co Ltd filed Critical TVM Beijing Education Technology Co Ltd
Priority to CN201510161147.3A priority Critical patent/CN104765696A/en
Publication of CN104765696A publication Critical patent/CN104765696A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a data processing method and a data processing device, relates to the image processing technical field, and is invented for improving picture data output speed of a teaching application system. The data processing method includes: obtaining picture data which is obtained by converting video data sent form a transmitting end; allocating memory space for the picture data; storing the picture data in the memory space. By using the data processing method and the data processing device, the picture data output speed of the teaching application system can be improved.

Description

A kind of data processing method and device
Technical field
The present invention relates to technical field of image processing, particularly a kind of data processing method and device.
Background technology
At present, teaching application system in, input be video data, after a series of conversion, this system export be image data.Under normal circumstances, this image data is stored in disk.When needs call this image data, need could be obtained by reading disk.And in application process, the process reading disk is slow, this just makes the speed of this system output image data slower.
Summary of the invention
The invention provides a kind of data processing method and device, export the speed of image data in order to improve teaching application system.
The invention provides a kind of data processing method, comprising:
Obtain image data, described image data is carried out being converted to by the video data that transmitting terminal sends;
For described image data storage allocation space;
Described image data is stored in described memory headroom.
Some beneficial effects of the embodiment of the present invention can comprise:
In this embodiment, the image data of acquisition being stored in the memory headroom of distribution, therefore, directly obtaining from the memory headroom distributed when exporting this image data, and without the need to obtaining by reading disk as prior art.Therefore, the embodiment of the present invention is utilized to improve the speed of teaching application system output image data.
In one embodiment, describedly to comprise for described image data storage allocation space:
Determine the interim memory headroom shared by every frame video subdata converting the predetermined format obtained in the process of image data at the video data sent by transmitting terminal;
Interim memory headroom shared by every frame video subdata of described predetermined format is converted to the memory headroom of the image data corresponding to every frame video subdata of described predetermined format.
Be that image data storage allocation spatial operation is convenient by this kind of mode, and image data memory location accurately can be obtained, thus facilitate this image data of follow-up reading.
In one embodiment, described method also comprises:
Initializes system parameters.
By initializes system parameters, image data can be made to export according to the requirement that this parameter is corresponding in follow-up output procedure, thus make image data meet the requirement of display.
In one embodiment, described initializes system parameters comprises:
The initiation parameter that every frame video subdata of described predetermined format is corresponding is set.
In one embodiment, described initiation parameter comprises: the color space that wide, the height of every frame video subdata of predetermined format, the number of pixels of every frame video subdata of composition predetermined format and predetermined format every frame video subdata of every frame video subdata of predetermined format is corresponding.
By arranging the initiation parameter of every frame video subdata, can conveniently show this image data.
The invention provides a kind of data processing equipment, comprising:
Acquiring unit, for obtaining image data, described image data is carried out being converted to by the video data that transmitting terminal sends;
Allocation units, for being described image data storage allocation space;
Storage unit, for being stored in described memory headroom by described image data.
In this embodiment, the image data of acquisition being stored in the memory headroom of distribution, therefore, directly obtaining from the memory headroom distributed when exporting this image data, and without the need to obtaining by reading disk as prior art.Therefore, the embodiment of the present invention is utilized to improve the speed of teaching application system output image data.
In one embodiment, described allocation units comprise:
Determination module, for the interim memory headroom shared by every frame video subdata of determining to convert at the video data sent by transmitting terminal the predetermined format obtained in the process of image data to;
Distribution module, for the interim memory headroom shared by every frame video subdata of described predetermined format is converted to described predetermined format every frame video subdata corresponding to the memory headroom of image data.
Be that image data storage allocation spatial operation is convenient by this kind of mode, and image data memory location accurately can be obtained, thus facilitate this image data of follow-up reading.
In one embodiment, described device also comprises:
Initialization unit, for initializes system parameters.
By initializes system parameters, image data can be made to export according to the requirement that this parameter is corresponding in follow-up output procedure, thus make image data meet the requirement of display.
In one embodiment, institute's initialization unit specifically for:
The initiation parameter that every frame video subdata of described predetermined format is corresponding is set.
In one embodiment, described initiation parameter comprises: the color space that wide, the height of every frame video subdata of predetermined format, the number of pixels of every frame video subdata of composition predetermined format and predetermined format every frame video subdata of every frame video subdata of predetermined format is corresponding.
By arranging the initiation parameter of every frame video subdata, can conveniently show this image data.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from instructions, or understand by implementing the present invention.Object of the present invention and other advantages realize by structure specifically noted in write instructions, claims and accompanying drawing and obtain.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for instructions, together with embodiments of the present invention for explaining the present invention, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the process flow diagram of a kind of data processing method of the embodiment of the present invention;
Fig. 2 is the schematic diagram of a kind of data processing equipment of the embodiment of the present invention;
Fig. 3 is the structural drawing of a kind of data processing equipment of the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein is only for instruction and explanation of the present invention, is not intended to limit the present invention.
Export the speed of image data to improve teaching application system, the design of the embodiment of the present invention is: first obtain image data, and wherein said image data is carried out being converted to by the video data that transmitting terminal sends.Then, be described image data storage allocation space, and described image data is stored in described memory headroom.
Elaborate below in conjunction with the design of specific embodiment to the embodiment of the present invention.
As shown in Figure 1, the data processing method of the embodiment of the present invention comprises:
Step 11, DTU (Data Transfer unit) initializes system parameters.
The method of the embodiment of the present invention is mainly used in tutoring system.Wherein, this tutoring system can comprise transmitting terminal, receiving end and DTU (Data Transfer unit).Wherein transmitting terminal refers to the side providing video data, and accordingly, receiving end refers to the side receiving image data, and DTU (Data Transfer unit) can be integrated in data server.Such as, be a teacher when transmitting file to student, teaching equipment one side that teacher uses is transmitting terminal, and the one end at the equipment place that student uses is receiving end.
In this step, initializes system parameters mainly arranges initiation parameter corresponding to every frame video subdata of predetermined format.At this predetermined format, the DTU (Data Transfer unit) referred in the embodiment of the present invention can be converted into the video requency frame data of image data, such as RGB (Red, Green, Blue, red, green, blue) form.
Wherein, described initiation parameter comprises: the color space that wide, the height of every frame video subdata of predetermined format, the number of pixels of every frame video subdata of composition predetermined format and predetermined format every frame video subdata of every frame video subdata of predetermined format is corresponding.
Certainly, described initiation parameter is not limited to the content comprised, and also can set other initiation parameter as required.
By initializes system parameters, image data can be made to export according to the requirement that this parameter is corresponding in follow-up output procedure, thus make image data meet the requirement of display.Further, by arranging the initiation parameter of every frame video subdata, this image data can conveniently be shown.
In embody rule process, realize initializes system parameters by such as minor function.
Struct jpeg_compress_struct cinfo; //jpeg compressor configuration body
Jpeg_create_compress (& cinfo); // create a jpeg compressor reducer
nc=3;
Cinfo.image_width=w; The video subdata of // predetermined format wide, unit is pixel
Cinfo.image_height=h; The height of the video subdata of // predetermined format, unit is pixel
Cinfo.input_components=nc; The each pixel of video subdata of // predetermined format is made up of how many kinds of color
Cinfo.in_color_space=JCS_RGB; The color space that the video subdata of // predetermined format is corresponding
Jpeg_set_defaults (& cinfo); // jpeg compressor reducer default parameters is set
jpeg_set_quality(&cinfo,100,false);
jpeg_start_compress(&cinfo,TRUE);
Step 12, data processing equipment obtain image data, and described image data is carried out being converted to by the video data that transmitting terminal sends.
Wherein, this image data is that the video data of transmitting terminal carries out being converted to by data processing equipment.For the H.264 video data that transmitting terminal sends, this H.264 video data after DTU (Data Transfer unit) decoding, obtain the frame of video of yuv420p form.Then, the frame of video of each yuv420p form is converted to the frame of video of rgb format by DTU (Data Transfer unit).Finally, the frame of video of rgb format is converted to corresponding jpeg picture by DTU (Data Transfer unit) again.Every frame video subdata of the predetermined format in step 11 can be the frame of video of the rgb format at this.
Through above-mentioned process, data processing equipment can obtain image data.
Step 13, be described image data storage allocation space.
This step is specially: determine the interim memory headroom shared by every frame video subdata converting the predetermined format obtained in the process of image data at the video data sent by transmitting terminal, the interim memory headroom shared by every frame video subdata of described predetermined format is converted to the memory headroom of the image data corresponding to every frame video subdata of described predetermined format.
According to the citing in step 12, in this step, be first the interim memory headroom shared by frame of video determining rgb format, and then the interim memory headroom shared by the frame of video of each rgb format be converted to the memory headroom of the image data corresponding to it.
Be that image data storage allocation spatial operation is convenient by this kind of mode, and image data memory location accurately can be obtained, thus facilitate this image data of follow-up reading.
Wherein, for the process in image data storage allocation space loads the process of this image data immediately.In a particular application, realize by calling following program:
Rgbt=rgbp=(uint8_t*) malloc (w*h*nc); The interim internal memory of the video subdata of // predetermined format
for(i=0;i<h;i++)
{
Memcpy (rgbp+ (i*w*3), img+ (i*w*3), w*3); The video subdata pointer of //img predetermined format
}
Rows=(JSAMPROW*) malloc (h*sizeof (JSAMPROW)); The internal memory that //jpeg picture is corresponding
for(i=0;i<h;i++)
rows[i]=&rgbt[i*w*nc];
Wherein, the position of the memory location representated by rows and the memory headroom shared by image data.
Step 14, described image data is stored in described memory headroom.
According to the memory headroom obtained by step 13, store described image data.
In this embodiment, the image data of acquisition being stored in the memory headroom of distribution, therefore, directly obtaining from the memory headroom distributed when exporting this image data, and without the need to obtaining by reading disk as prior art.Therefore, the embodiment of the present invention is utilized to improve the speed of teaching application system output image data.
As shown in Figure 2, the embodiment of the present invention provides a kind of data processing equipment, comprising:
Acquiring unit 21, for obtaining image data, described image data is carried out being converted to by the video data that transmitting terminal sends;
Allocation units 22, for being described image data storage allocation space;
Storage unit 23, for being stored in described memory headroom by described image data.
Wherein, described allocation units comprise:
Determination module, for the interim memory headroom shared by every frame video subdata of determining to convert at the video data sent by transmitting terminal the predetermined format obtained in the process of image data to; Distribution module, for the interim memory headroom shared by every frame video subdata of described predetermined format is converted to described predetermined format every frame video subdata corresponding to the memory headroom of image data.
In this embodiment, be that image data storage allocation spatial operation is convenient by this kind of mode, and image data memory location accurately can be obtained, thus facilitate this image data of follow-up reading.
As shown in Figure 3, image data is exported according to the requirement that this parameter is corresponding in follow-up output procedure, thus makes image data meet the requirement of display, described device also comprises: initialization unit 24, for initializes system parameters.
Concrete, institute's initialization unit specifically for: the initiation parameter that every frame video subdata of described predetermined format is corresponding is set.
As previously mentioned, described initiation parameter can comprise: the color space that wide, the height of every frame video subdata of predetermined format, the number of pixels of every frame video subdata of composition predetermined format and predetermined format every frame video subdata of every frame video subdata of predetermined format is corresponding.Certainly, described initiation parameter is not limited to the content comprised, and also can set other initiation parameter as required.
Described in the embodiment of the present invention, the principle of work of device can refer to the description of preceding method embodiment, does not repeat them here.
In this embodiment, the image data of acquisition being stored in the memory headroom of distribution, therefore, directly obtaining from the memory headroom distributed when exporting this image data, and without the need to obtaining by reading disk as prior art.Therefore, the embodiment of the present invention is utilized to improve the speed of teaching application system output image data.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory and optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the process flow diagram of the method for the embodiment of the present invention, equipment (system) and computer program and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computing machine or other programmable data processing device produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make on computing machine or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computing machine or other programmable devices is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (10)

1. a data processing method, is characterized in that, comprising:
Obtain image data, described image data is carried out being converted to by the video data that transmitting terminal sends;
For described image data storage allocation space;
Described image data is stored in described memory headroom.
2. method according to claim 1, is characterized in that, describedly comprises for described image data storage allocation space:
Determine the interim memory headroom shared by every frame video subdata converting the predetermined format obtained in the process of image data at the video data sent by transmitting terminal;
Interim memory headroom shared by every frame video subdata of described predetermined format is converted to the memory headroom of the image data corresponding to every frame video subdata of described predetermined format.
3. method according to claim 1 and 2, is characterized in that, described method also comprises:
Initializes system parameters.
4. method according to claim 3, is characterized in that, described initializes system parameters comprises:
The initiation parameter that every frame video subdata of described predetermined format is corresponding is set.
5. method according to claim 4, it is characterized in that, described initiation parameter comprises: the color space that wide, the height of every frame video subdata of predetermined format, the number of pixels of every frame video subdata of composition predetermined format and predetermined format every frame video subdata of every frame video subdata of predetermined format is corresponding.
6. a data processing equipment, is characterized in that, comprising:
Acquiring unit, for obtaining image data, described image data is carried out being converted to by the video data that transmitting terminal sends;
Allocation units, for being described image data storage allocation space;
Storage unit, for being stored in described memory headroom by described image data.
7. device according to claim 6, is characterized in that, described allocation units comprise:
Determination module, for the interim memory headroom shared by every frame video subdata of determining to convert at the video data sent by transmitting terminal the predetermined format obtained in the process of image data to;
Distribution module, for the interim memory headroom shared by every frame video subdata of described predetermined format is converted to described predetermined format every frame video subdata corresponding to the memory headroom of image data.
8. device according to claim 7, is characterized in that, described device also comprises:
Initialization unit, for initializes system parameters.
9. device according to claim 8, is characterized in that, institute's initialization unit specifically for:
The initiation parameter that every frame video subdata of described predetermined format is corresponding is set.
10. device according to claim 9, it is characterized in that, described initiation parameter comprises: the color space that wide, the height of every frame video subdata of predetermined format, the number of pixels of every frame video subdata of composition predetermined format and predetermined format every frame video subdata of every frame video subdata of predetermined format is corresponding.
CN201510161147.3A 2015-04-07 2015-04-07 Data processing method and device Pending CN104765696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510161147.3A CN104765696A (en) 2015-04-07 2015-04-07 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510161147.3A CN104765696A (en) 2015-04-07 2015-04-07 Data processing method and device

Publications (1)

Publication Number Publication Date
CN104765696A true CN104765696A (en) 2015-07-08

Family

ID=53647539

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510161147.3A Pending CN104765696A (en) 2015-04-07 2015-04-07 Data processing method and device

Country Status (1)

Country Link
CN (1) CN104765696A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080043140A1 (en) * 2004-12-02 2008-02-21 Carsten Herpel Method And Apparatus For Encoding And For Decoding A Main Video Signal And One Or More Auxilliary Video Signals
CN102547269A (en) * 2010-12-31 2012-07-04 上海讯垒网络科技有限公司 Network video browsing method
CN102724471A (en) * 2012-06-11 2012-10-10 宇龙计算机通信科技(深圳)有限公司 Picture and video converting method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080043140A1 (en) * 2004-12-02 2008-02-21 Carsten Herpel Method And Apparatus For Encoding And For Decoding A Main Video Signal And One Or More Auxilliary Video Signals
CN102547269A (en) * 2010-12-31 2012-07-04 上海讯垒网络科技有限公司 Network video browsing method
CN102724471A (en) * 2012-06-11 2012-10-10 宇龙计算机通信科技(深圳)有限公司 Picture and video converting method and device

Similar Documents

Publication Publication Date Title
US11429852B2 (en) Convolution acceleration and computing processing method and apparatus, electronic device, and storage medium
CN106569768B (en) Method for configuring spliced screen and splicer
CN105404455B (en) The method and device of screenshotss is realized to mobile terminal using terminal
US20190325630A1 (en) Image Synthesis Method, Image Chip, and Image Device
CN100571368C (en) The method and apparatus that a kind of many picture control shows
TWI695295B (en) Image processing method, device and electronic equipment based on augmented reality
CN109584366B (en) Terrain rendering method, device, equipment and readable storage medium
CN107547904A (en) Yuv data 8x8block conversion methods and device in a kind of video compress based on FPGA
CN110782387B (en) Image processing method and device, image processor and electronic equipment
CN109688395B (en) Operation method, device and related product
CN108230454B (en) Panorama picture cutting method and device and storage medium
CN104133607A (en) Handwriting sharing method and handwriting sharing device
CN105578016A (en) Method and terminal for adjusting image dynamic range
CN109214977B (en) Image processing apparatus and control method thereof
CN104423915A (en) Display output method and electronic device.
CN104765696A (en) Data processing method and device
CN103065349A (en) Data render method and device
CN103488380A (en) Method and device for displaying information
CN103268619B (en) The method of image data batch compression in swf file and device
CN105141901A (en) Video processing method and device
CN104780390A (en) Video processing method and device
CN103646427A (en) Method and device for acquiring image data
CN104954892A (en) Method and device for showing video subject content
CN101488991B (en) Image loading method based on BREW platform
CN105139333B (en) A kind of picture loading display method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate 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: 20150708