Summary of the invention
The application provides a kind of Video Rendering method, apparatus, electronic equipment and storage medium.
According to a first aspect of the present application, a kind of Video Rendering method is provided, which is characterized in that the described method includes:
When needing render video in a device, the hardware performance of the equipment is obtained;
In at least two default rendering shape libraries, the rendering shape library for being suitable for the hardware performance is obtained;
The video is rendered using the rendering shape library obtained in the apparatus.
In an optional implementation manner, the hardware performance for obtaining the equipment, comprising:
Obtain the device model of the equipment;
According to the corresponding relationship between the device model of equipment and the hardware performance of equipment, the device model with acquisition is determinedCorresponding hardware performance, and the hardware performance as the equipment.
In an optional implementation manner, the hardware performance for obtaining the equipment, comprising:
The hardware performance of the equipment is read from the preset configuration file in the operating system of the equipment.
In an optional implementation manner, described at least two default rendering shape libraries, it obtains described in being suitable forThe rendering shape library of hardware performance, comprising:
In corresponding relationship between hardware performance section and rendering shape library, the hardware where the hardware performance is searchedPerformance interval;
In corresponding relationship between hardware performance section and rendering shape library, search opposite with the hardware performance sectionThe rendering shape library answered, and as the rendering shape library for being suitable for the hardware performance.
According to a second aspect of the present application, a kind of Video Rendering device is provided, described device includes:
First obtains module, is configured as obtaining the hardware performance of the equipment when needing render video in a device;
Second obtains module, is configured as at least two default rendering shape libraries, obtain it is suitable be configured as it is described hardThe rendering shape library of part performance;
Rendering module is configured as rendering the video using the rendering shape library obtained in the apparatus.
In an optional implementation manner, the first acquisition module includes:
Acquiring unit is configured as obtaining the device model of the equipment;
Determination unit is configured as according to the corresponding relationship between the device model of equipment and the hardware performance of equipment, reallyFixed hardware performance corresponding with device model that is obtaining, and the hardware performance as the equipment.
In an optional implementation manner, the first acquisition module is specifically configured to: from the operation of the equipmentThe hardware performance of the equipment is read in preset configuration file in system.
In an optional implementation manner, the second acquisition module includes:
First searching unit is configured as in the corresponding relationship between hardware performance section and rendering shape library, searchesHardware performance section where the hardware performance;
Second searching unit is configured as in the corresponding relationship between hardware performance section and rendering shape library, searchesRendering shape library corresponding with the hardware performance section, and as the suitable rendering figure for being configured as the hardware performanceLibrary.
According to the third aspect of the application, a kind of electronic equipment is provided, the electronic equipment includes:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to executing Video Rendering method as described in relation to the first aspect.
According to the fourth aspect of the application, a kind of non-transitorycomputer readable storage medium is provided, when the storage is situated betweenWhen instruction in matter is executed by the processor of electronic equipment, so that electronic equipment is able to carry out video wash with watercolours as described in relation to the first aspectDyeing method.
According to the 5th of the application the aspect, a kind of computer program product is provided, when in the computer program productWhen instruction is executed by the processor of electronic equipment, so that electronic equipment is able to carry out Video Rendering side as described in relation to the first aspectMethod.
Technical solution provided by the present application can include the following benefits:
In this application, when needing render video in a device, the hardware performance of the equipment is obtained;It is pre- at least twoIf rendering in shape library, the rendering shape library for being suitable for the hardware performance is obtained;The rendering shape library wash with watercolours is used in the deviceContaminate the video.The advantage of the hardware performance of the equipment can be so played, for example, special efficacy rendering can be carried out to video, noInterruption can be rendered, equipment will not be in the case that Caton and equipment can carry out other business simultaneously, and the render time of consuming is mostRendering effect that is short and obtaining is best, and then improves user experience.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, notThe application can be limited.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related toWhen attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodimentDescribed in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appendedThe example of the consistent device and method of some aspects be described in detail in claims, the application.
Fig. 1 is a kind of flow chart of Video Rendering method shown in the application, as shown in Figure 1, this method includes following stepSuddenly.
In step s101, when needing render video in a device, the hardware performance of the equipment is obtained;
In this application, after user shoots one section of video using the equipment, if necessary to carry out special efficacy to the videoRendering, then can input the render instruction for carrying out special efficacy rendering to the video in the device, which receives the renderingWhen instruction, the equipment is it is determined that need to render the video in the device.
In this application, it when carrying out special efficacy rendering to the video, needs to add in advance in the equipment using shape library is renderedIt is loaded at least two rendering shape libraries.
Secondly, there are a variety of different equipment on the market, the hardware performance of different equipment is different, suitable for differentThe rendering shape library of hardware performance is different.Therefore, it is necessary to obtain the rendering shape library for being suitable for the hardware performance of the equipment, in order toThe rendering shape library of the hardware performance suitable for the equipment can be obtained, it is necessary first to obtain the hardware performance of equipment.
The equipment performance of equipment includes the frame number for the image that equipment can render within the unit time, alternatively, equipment is currentFree system resources, for example, cpu resource, GPU resource and memory source etc..
In one embodiment of the application, the hardware performance of equipment can store default in the operating system of equipmentIn configuration file, therefore, in this step, the hard of equipment can be read from the preset configuration file in the operating system of equipmentPart performance.
In this application, equipment includes mobile phone, tablet computer, laptop or desktop computer etc..
In another embodiment of the application, each equipment has respective model, and device manufacturer is in production equipmentWhen, the hardware performance of the equipment of same model be it is identical, the hardware performance of the equipment of different model is often different.For example,In iphone mobile phone, the hardware performance of the iphone mobile phone of all models " 5S " is identical, the iphone hand of all models " 7 "The hardware performance of machine is identical, but the hardware performance of the mobile phone of the hardware performance of the mobile phone of model " 5S " and model " 7 " is notTogether, for example, the hardware performance of the mobile phone of model " 5S " lower than model " 7 " mobile phone hardware performance.
Device manufacturer, can be by the hardware of the device model of the equipment and the equipment after the equipment for a certain model of dispatching from the factoryPerformance is sent to cloud, so that the hardware performance of the device model of the equipment and the equipment is formed corresponding table item by cloud, and depositsIt stores up in the corresponding relationship between the device model of equipment and the hardware performance of equipment.
Therefore, in this step, the device model of the available equipment;For example, from the operating system of the equipmentThe device model that the equipment is read in another preset configuration file, then according to the hardware performance of the device model of equipment and equipmentBetween corresponding relationship determine the corresponding hardware performance of the device model with acquisition, and the hardware performance as the equipment.
Wherein, which can send the hardware performance inquiry request for carrying the device model obtained, cloud to cloudThe inquiry request is received, the device model is extracted from the inquiry request, then in the hard of the device model of equipment and equipmentIn corresponding relationship between part performance, hardware performance corresponding with the device model obtained is searched, is then sent to the equipmentThe hardware performance found, the equipment receive the hardware performance that cloud is sent, and the hardware performance as the equipment,
In step s 102, at least two default rendering shape libraries, the rendering figure for being suitable for the hardware performance is obtainedShape library;
In this application, be often pre-loaded at least two default rendering shape libraries in equipment, for example, METAL2 andOpenGL ES etc..
When same equipment carries out special efficacy rendering to same video using different rendering shape libraries, the time of required consuming is notTogether, and, finally obtained rendering effect is also different.
In historical process, it is higher that technical staff constantly can output rank on the basis of original rendering shape libraryRendering shape library can load in new equipment later if to dispatch from the factory new equipment and obtain the higher rendering figure of rankLibrary.
Wherein, the time of required consuming is more when carrying out special efficacy rendering to a certain image using the higher rendering shape library of rankIt is short, and finally obtained rendering effect is better.Special efficacy rendering when institute is carried out using the image of the lower rendering shape library of rankThe time that need to be expended is longer, and finally obtained rendering effect is poorer.
But it if necessary to carry out special efficacy selection to video using the higher rendering shape library of rank, then needs higherThe support of hardware performance.
If equipment needs to carry out special efficacy rendering to video using high level rendering shape library, which needs to haveHigh level hardware performance, otherwise, if using high level rendering shape library to view in the equipment of low level hardware performanceFrequency carries out special efficacy rendering, then the advantage of high level rendering shape library can not be played, for example, when can expend longer renderingBetween, alternatively, special efficacy rendering normally can not be carried out to video, cause rendering to be interrupted, or lead to equipment Caton, equipment can not carry outOther business.
Secondly, if the equipment has high level hardware performance, if rendering shape library using low level in a deviceSpecial efficacy rendering is carried out to video, then can not play the advantage of the high level hardware performance of the equipment, longer wash with watercolours can be expendedIt contaminates the time and finally obtained rendering effect is poor.
Therefore, in this application, in order to the high-level of equipment can be played when equipment has high level hardware performanceHardware performance advantage,
And when in order to have the hardware performance of low level in equipment, special efficacy rendering normally can be carried out to video, avoidedRendering is interrupted, and equipment Caton is avoided, and avoid equipment that from can not carrying out other business, for any one loaded in equipmentShape library is rendered, technical staff can test the hardware performance section suitable for the rendering shape library in advance, then by the hardwarePerformance interval and the rendering shape library form corresponding table item, and are stored in corresponding between hardware performance section and rendering shape libraryIn relationship.
Wherein, when the hardware performance of an equipment is located in the hardware performance section, compared to using other renderings to schemeShape library, which carries out special efficacy rendering when the equipment carries out special efficacy rendering to video using the rendering shape library to video, can play thisThe advantage of the hardware performance of equipment, for example, interruption will not be rendered special efficacy rendering can be carried out to video, equipment will not Caton,And in the case that equipment can carry out other business simultaneously, the render time of consuming is most short and obtained rendering effect is best.
Each rendering shape library, equally execution aforesaid operations for other.
In this way, in this step, in order to need the selection at least two default rendering shape libraries to be suitable for the equipmentThe rendering shape library of hardware performance can search the hardware in the corresponding relationship between hardware performance section and rendering shape libraryThen hardware performance section where performance is searched and is somebody's turn to do in the corresponding relationship between hardware performance section and rendering shape libraryThe corresponding rendering shape library in hardware performance section, and as the rendering shape library for being suitable for the hardware performance, then execute stepRapid S103.
In step s 103, the video is rendered using the rendering shape library of acquisition in the device.
In this application, when needing render video in a device, the hardware performance of the equipment is obtained;It is pre- at least twoIf rendering in shape library, the rendering shape library for being suitable for the hardware performance is obtained;The rendering shape library wash with watercolours is used in the deviceContaminate the video.The advantage of the hardware performance of the equipment can be so played, for example, special efficacy rendering can be carried out to video, noInterruption can be rendered, equipment will not be in the case that Caton and equipment can carry out other business simultaneously, and the render time of consuming is mostRendering effect that is short and obtaining is best, and then improves user experience.
Fig. 2 is a kind of block diagram of Video Rendering device shown in the application.Referring to Fig. 2, which includes:
First obtains module 11, is configured as obtaining the hardware of the equipment when needing render video in a deviceEnergy;
Second acquisition module 12 is configured as at least two default rendering shape libraries, obtains described in suitable be configured asThe rendering shape library of hardware performance;
Rendering module 13 is configured as rendering the video using the rendering shape library obtained in the apparatus.
In an optional implementation manner, the first acquisition module 11 includes:
Acquiring unit is configured as obtaining the device model of the equipment;
Determination unit is configured as according to the corresponding relationship between the device model of equipment and the hardware performance of equipment, reallyFixed hardware performance corresponding with device model that is obtaining, and the hardware performance as the equipment.
In an optional implementation manner, the first acquisition module is specifically configured to: from the operation of the equipmentThe hardware performance of the equipment is read in preset configuration file in system.
In an optional implementation manner, the second acquisition module 12 includes:
First searching unit is configured as in the corresponding relationship between hardware performance section and rendering shape library, searchesHardware performance section where the hardware performance;
Second searching unit is configured as in the corresponding relationship between hardware performance section and rendering shape library, searchesRendering shape library corresponding with the hardware performance section, and as the suitable rendering figure for being configured as the hardware performanceLibrary.
In this application, when needing render video in a device, the hardware performance of the equipment is obtained;It is pre- at least twoIf rendering in shape library, the rendering shape library for being suitable for the hardware performance is obtained;The rendering shape library wash with watercolours is used in the deviceContaminate the video.The advantage of the hardware performance of the equipment can be so played, for example, special efficacy rendering can be carried out to video, noInterruption can be rendered, equipment will not be in the case that Caton and equipment can carry out other business simultaneously, and the render time of consuming is mostRendering effect that is short and obtaining is best, and then improves user experience.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this methodEmbodiment in be described in detail, no detailed explanation will be given here.
Fig. 3 is the block diagram of a kind of electronic equipment 800 shown in the application.For example, electronic equipment 800 can be mobile electricityWords, computer, digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices, body-building equipment are aPersonal digital assistant etc..
Referring to Fig. 3, electronic equipment 800 may include following one or more components: processing component 802, memory 804,Electric power assembly 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814,And communication component 816.
The integrated operation of the usual controlling electronic devices 800 of processing component 802, such as with display, call, data are logicalLetter, camera operation and record operate associated operation.Processing component 802 may include one or more processors 820 to holdRow instruction, to complete all or part of the steps of above-mentioned Video Rendering method as shown in Figure 1.In addition, processing component 802 can be withIncluding one or more modules, convenient for the interaction between processing component 802 and other assemblies.For example, processing component 802 can wrapMulti-media module is included, to facilitate the interaction between multimedia component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in equipment 800.These data are shownExample includes the instruction of any application or method for operating on electronic equipment 800, contact data, telephone directory numberAccording to, message, picture, video etc..Memory 804 can by any kind of volatibility or non-volatile memory device or theyCombination realize, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasableProgrammable read only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, quick flashingMemory, disk or CD.
Power supply module 806 provides electric power for the various assemblies of electronic equipment 800.Power supply module 806 may include power supply pipeReason system, one or more power supplys and other with for electronic equipment 800 generate, manage, and distribute the associated component of electric power.
Multimedia component 808 includes the screen of one output interface of offer between the electronic equipment 800 and user.In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch surfacePlate, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touchesSensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or slidingThe boundary of movement, but also detect duration and pressure associated with the touch or slide operation.In some embodiments,Multimedia component 808 includes a front camera and/or rear camera.When equipment 800 is in operation mode, as shot mouldWhen formula or video mode, front camera and/or rear camera can receive external multi-medium data.Each preposition camera shootingHead and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a MikeWind (MIC), when electronic equipment 800 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphoneIt is configured as receiving external audio signal.The received audio signal can be further stored in memory 804 or via logicalBelieve that component 816 is sent.In some embodiments, audio component 810 further includes a loudspeaker, is used for output audio signal.
I/O interface 812 provides interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module canTo be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lockDetermine button.
Sensor module 814 includes one or more sensors, for providing the state of various aspects for electronic equipment 800Assessment.For example, sensor module 814 can detecte the state that opens/closes of equipment 800, the relative positioning of component, such as instituteThe display and keypad that component is electronic equipment 800 are stated, sensor module 814 can also detect electronic equipment 800 or electronicsThe position change of 800 1 components of equipment, the existence or non-existence that user contacts with electronic equipment 800,800 orientation of electronic equipmentOr the temperature change of acceleration/deceleration and electronic equipment 800.Sensor module 814 may include proximity sensor, be configured toIt detects the presence of nearby objects without any physical contact.Sensor module 814 can also include optical sensor, such asCMOS or ccd image sensor, for being used in imaging applications.In some embodiments, which can be withIncluding acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between electronic equipment 800 and other equipment.Electronic equipment 800 can access the wireless network based on communication standard, such as WiFi, carrier network (such as 2G, 3G, 4G or 5G),Or their combination.In one exemplary embodiment, communication component 816 receives via broadcast channel and comes from external broadcasting managementThe broadcast singal or broadcast related information of system.In one exemplary embodiment, the communication component 816 further includes that near field is logical(NFC) module is believed, to promote short range communication.For example, radio frequency identification (RFID) technology, infrared data association can be based in NFC moduleMeeting (IrDA) technology, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, electronic equipment 800 can be by one or more application specific integrated circuit (ASIC), numberWord signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing above-mentioned video as shown in Figure 1Rendering method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally providedIt such as include the memory 804 of instruction, above-metioned instruction can be executed above-mentioned such as Fig. 1 institute to complete by the processor 820 of electronic equipment 800The Video Rendering method shown.For example, the non-transitorycomputer readable storage medium can be ROM, random access memory(RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
Fig. 4 is the block diagram of a kind of electronic equipment 1900 shown in the application.For example, electronic equipment 1900 may be provided asOne server.
Referring to Fig. 4, it further comprises one or more processors that electronic equipment 1900, which includes processing component 1922, withAnd memory resource represented by a memory 1932, it can be by the instruction of the execution of processing component 1922 for storing, such as answerUse program.The application program stored in memory 1932 may include it is one or more each correspond to one group of instructionModule.In addition, processing component 1922 is configured as executing instruction, to execute above-mentioned Video Rendering method as described in Figure 1.
Electronic equipment 1900 can also include that a power supply module 1926 is configured as executing the power supply of electronic equipment 1900Management, a wired or wireless network interface 1950 is configured as electronic equipment 1900 being connected to network and an input is defeated(I/O) interface 1958 out.Electronic equipment 1900 can be operated based on the operating system for being stored in memory 1932, such asWindows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the applicationIts embodiment.This application is intended to cover any variations, uses, or adaptations of the application, these modifications, purposes orPerson's adaptive change follows the general principle of the application and including the undocumented common knowledge in the art of the applicationOr conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the application are by followingClaim is pointed out.
It should be understood that the application is not limited to the precise structure that has been described above and shown in the drawings, andAnd various modifications and changes may be made without departing from the scope thereof.Scope of the present application is only limited by the accompanying claims.