Movatterモバイル変換


[0]ホーム

URL:


CN104166614B - The frame per second detection method and relevant apparatus of a kind of mobile device - Google Patents

The frame per second detection method and relevant apparatus of a kind of mobile device
Download PDF

Info

Publication number
CN104166614B
CN104166614BCN201310185743.6ACN201310185743ACN104166614BCN 104166614 BCN104166614 BCN 104166614BCN 201310185743 ACN201310185743 ACN 201310185743ACN 104166614 BCN104166614 BCN 104166614B
Authority
CN
China
Prior art keywords
frame
pixel
video memory
sampling time
mobile 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.)
Active
Application number
CN201310185743.6A
Other languages
Chinese (zh)
Other versions
CN104166614A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co LtdfiledCriticalTencent Technology Shenzhen Co Ltd
Priority to CN201310185743.6ApriorityCriticalpatent/CN104166614B/en
Publication of CN104166614ApublicationCriticalpatent/CN104166614A/en
Application grantedgrantedCritical
Publication of CN104166614BpublicationCriticalpatent/CN104166614B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

The embodiment of the present invention discloses the frame per second detection method and relevant apparatus of a kind of mobile device, for detecting display frame rate in real time.Method may include:When preset sampling time section timing starts, according to the pixel value of pixel of the physics video memory of preset sampling time interval acquisition mobile device in the first frame and the pixel value of the pixel in the second frame;Judge whether physics video memory changes according to the pixel value of the pixel value of the pixel of the first frame and the pixel of the second frame;If so, the frame per second statistical value of mobile device is increased into a statistics step-length;Judge whether the timing duration of sampling time section has been completed, if it is not, triggering performs again according to the pixel value of the pixel value of pixel of the physics video memory of preset sampling time interval acquisition mobile device in the first frame and the pixel in the second frame;At the end of sampling time section timing, output frame rate statistical value, according to sampling time section and the real time frame rate of frame per second statistical value acquisition mobile device.

Description

The frame per second detection method and relevant apparatus of a kind of mobile device
Technical field
The present invention relates to video control technology field, more particularly to a kind of frame per second detection method of mobile device and related dressPut.
Background technology
The application program installed at present on mobile phone terminal such as Games Software, video calling software is more and more, in order toThe fluency of enough inspection softwares, for example, in screen sliding software sensitivity level, it is often necessary to accurately know current phone terminalFrame per second, and also have some evaluating softwares also usually using the frame per second of mobile phone terminal as measurement handset capability one side,This is equally also required to the frame per second for knowing current phone terminal.
A kind of method that frame per second to mobile phone terminal is counted in the prior art be present, using by video camera to mobile phoneThe mode that the screen of terminal is continuously shot, one section of video is obtained, followed by computer(PC, Personal Computer)The video jukebox software of upper installation, based on the video of recording by carry out frames statistic manually frame by frame, so as to obtain mobile phone terminalIn the frame per second of shooting time.
But the present inventor has found during the present invention is realized:It is existing this to be carried out by means of video cameraShooting, by manually being counted to obtain the mode of frame per second using PC, it is necessary to which the artificial realization that places one's entire reliance upon, can not be automatically performed surveyExamination process, time and effort consuming;And this frame per second statistical method needs to use video camera and PC to realize, count inconvenience,And what is come out is the frame per second in shooting time mobile phone terminal, it is impossible to the frame per second of current phone terminal is understood whenever and wherever possible,The real time frame rate of mobile phone terminal can not be known.
The content of the invention
The embodiments of the invention provide the frame per second detection method and relevant apparatus of a kind of mobile device, is moved for detecting in real timeThe screen display frame per second of dynamic equipment.
In order to solve the above technical problems, the embodiment of the present invention provides following technical scheme:
In a first aspect, the embodiment of the present invention provides a kind of frame per second detection method of mobile device, including:
When preset sampling time section timing starts, the physics of mobile device is obtained according to preset sampling time intervalFor video memory in the pixel value of the pixel of the first frame and the pixel value of pixel in the second frame, first frame is in the samplingThe frame that sampling time before time interval collects, second frame are the sampling time after the sampling time intervalThe frame collected;
The thing is judged according to the pixel value of the pixel value of the pixel of first frame and the pixel of second frameWhether reason video memory changes;
If so, the frame per second statistical value of the mobile device is increased into a statistics step-length;
Judge whether the timing duration of the sampling time section has been completed, if it is not, triggering is according to the preset sampling timeThe physics video memory of interval acquiring mobile device is in the pixel value of the pixel of the first frame and the pixel value of pixel in the second framePerform again;At the end of the sampling time section timing, the frame per second statistical value is exported, according to the sampling time section and instituteState the real time frame rate that frame per second statistical value obtains the mobile device.
Second aspect, the embodiment of the present invention also provide a kind of frame per second detection device of mobile device, including:
Pixel value acquisition module, for when preset sampling time section timing starts, according between the preset sampling timeEvery the pixel value of pixel and the pixel value of pixel in second frame of the physics video memory in the first frame for obtaining mobile device, instituteThe frame that the first frame collects for the sampling time before the sampling time interval is stated, second frame is in the samplingBetween be spaced after the frame that collects of sampling time;
Video memory judge module, for the pixel value of the pixel according to first frame and the pixel of second framePixel value judges whether the physics video memory changes;
Statistical module, for when the physics video memory changes, the frame per second statistical value of the mobile device to be increasedOne statistics step-length;
Timing module, for judging whether the timing duration of the sampling time section has been completed, if it is not, triggering the picturePlain value acquisition module performs again;
Frame per second detecting module, the frame per second at the end of the sampling time section timing, exporting the mobile device are unitedEvaluation, the real time frame rate of the mobile device is obtained according to the sampling time section and the frame per second statistical value.
As can be seen from the above technical solutions, the embodiment of the present invention has advantages below:
In embodiments of the present invention, sampling time section and sampling time interval are pre-set, then when sampling time section meterWhen starting, the sampling time distribution collection that is obtained according to sampling time interval before and after sampling time interval arrive twoThe pixel value of the pixel of frame, obtain the pixel value of the pixel value of the pixel of the first frame and the pixel of the second frame, Ran HougenJudge whether physics video memory changes according to the pixel value of the pixel of the first frame and the pixel value of pixel of the second frame, ifIt is the frame per second statistical value of mobile device to be increased into a statistics step-length, whether is the following timing duration for judging sampling time sectionIt has been completed that, if it is not, continuing the pixel of two frames that a sampling time distribution collection arrives before and after obtaining according to sampling time intervalPixel value, and continue the judgement whether physics video memory changes, until sampling time section timing terminates, output frame rateStatistical value, the real time frame rate of current mobile device is obtained according to sampling time section and frame per second statistical value.By in sampling time sectionIt is interior that the data content of the physics video memory of mobile device is extracted and compared according to sampling time interval timing, so as to calculateThe frame per second of physics video memory, it is possible to achieve real-time detection is carried out to the screen display frame per second of mobile device anywhere or anytime.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodimentAccompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, forFor those skilled in the art, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of process blocks schematic diagram of the frame per second detection method of mobile device provided in an embodiment of the present invention;
Fig. 2 is the process blocks schematic diagram of the frame per second detection method of another mobile device provided in an embodiment of the present invention;
Fig. 3 is virtual address space and the reading that the physics video memory of mobile device is mapped to process in the embodiment of the present inventionGo out the implementation schematic diagram of the pixel value of pixel;
Fig. 4 is the process blocks schematic diagram of the frame per second detection method of another mobile device provided in an embodiment of the present invention;
Fig. 5 is that whole pixels of the first frame and whole pixels of the second frame are carried out in the embodiment of the present inventionChecksum implementation schematic diagram;
Fig. 6 is the schematic flow sheet of the real time frame rate detection method of mobile device in the embodiment of the present invention;
Fig. 7-a are a kind of composition structural representation of the real time frame rate detection device of mobile device provided in an embodiment of the present inventionFigure;
Fig. 7-b are that the composition structure of the real time frame rate detection device of another mobile device provided in an embodiment of the present invention is shownIt is intended to;
Fig. 7-c are that the composition structure of the real time frame rate detection device of another mobile device provided in an embodiment of the present invention is shownIt is intended to;
Fig. 7-d are that the composition structure of the real time frame rate detection device of another mobile device provided in an embodiment of the present invention is shownIt is intended to;
Fig. 8 is that the real time frame rate detection method of mobile device provided in an embodiment of the present invention is applied to the composition structure of terminalSchematic diagram.
Embodiment
The embodiments of the invention provide the frame per second detection method and relevant apparatus of a kind of mobile device, is moved for detecting in real timeThe screen display frame per second of dynamic equipment.
To enable goal of the invention, feature, the advantage of the present invention more obvious and understandable, below in conjunction with the present inventionAccompanying drawing in embodiment, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that disclosed belowEmbodiment be only part of the embodiment of the present invention, and not all embodiments.Based on the embodiment in the present invention, this areaThe every other embodiment that technical staff is obtained, belongs to the scope of protection of the invention.
Term " first ", " second " in description and claims of this specification and above-mentioned accompanying drawing etc. are to be used to distinguishSimilar object, without for describing specific order or precedence.It should be appreciated that the term so used is in appropriate feelingsIt can be exchanged under condition, this is only to describe object used differentiation in description in embodiments of the invention to same alike resultMode.In addition, term " comprising " and " having " and their any deformation, it is intended that cover it is non-exclusive include, so as toProcess, method, system, product or equipment comprising a series of units are not necessarily limited to those units, but may include unclearOther units that ground is listed or for these processes, method, product or equipment inherently.
It is described in detail individually below.
One embodiment of the real time frame rate detection method of mobile device of the present invention, can include:When preset samplingBetween section timing when starting, obtain the pixel of the physics video memory of mobile device in the first frame according to preset sampling time intervalThe pixel value of pixel value and pixel in the second frame, above-mentioned first frame are the sampling time before above-mentioned sampling time intervalThe frame collected, the frame that above-mentioned second frame collects for the sampling time after above-mentioned sampling time interval;According to above-mentionedThe pixel value of the pixel of the pixel value of the pixel of one frame and above-mentioned second frame judges whether above-mentioned physics video memory changes;If so, the frame per second statistical value of above-mentioned mobile device is increased into a statistics step-length;Judge the timing duration of above-mentioned sampling time sectionWhether complete, if it is not, triggering obtains the physics video memory of mobile device in the first frame according to preset sampling time intervalThe pixel value of the pixel value of pixel and pixel in the second frame performs again;At the end of above-mentioned sampling time section timing,Above-mentioned frame per second statistical value is exported, the real-time frame of above-mentioned mobile device is obtained according to above-mentioned sampling time section and above-mentioned frame per second statistical valueRate.
Refer to shown in Fig. 1, the real time frame rate detection method for the mobile device that one embodiment of the invention provides, can wrapInclude:
101st, when preset sampling time section timing starts, mobile device is obtained according to preset sampling time intervalPhysics video memory is in the pixel value of the pixel of the first frame and the pixel value of pixel in the second frame.
Wherein, the frame that above-mentioned first frame collects for the sampling time before above-mentioned sampling time interval, above-mentioned secondThe frame that frame collects for the sampling time after above-mentioned sampling time interval.
In embodiments of the present invention, in order to accurately obtain the real time frame rate of mobile device, movement is being set every timeBefore standby real time frame rate is detected, sampling time section and sampling time interval, wherein sampling time can be pre-setSection refers to that selection is used for the period for calculating real time frame rate, can specifically be specified by user, naturally it is also possible to set by movementIt is standby to be set according to the hardware configuration performance of itself, for example, can be according to the speed and centre of the internal memory of mobile deviceManage device(CPU, Central Processing Unit)Frequency set, in addition can also be according to user generally to applicationThe timing statisticses section that sets is set when program carries out fluency test, as user can set sampling time section as 1 second(s),Or mobile device sets sampling time section as 1s according to the internal memory reading speed of oneself and CPU running frequency.Sampling timeInterval refers to the pixel value that the pixel time how long obtains a physics video memory present frame is spaced in sampling time section, adoptsSample time interval equally can specifically be specified by user, naturally it is also possible to by mobile device according to the hardware configuration performance of itselfTo set, for example, it can be set according to the speed of the internal memory of mobile device and CPU frequency, in addition can also basisStatistics number that user generally sets when carrying out fluency test to application program in the timing statisticses section that sets is set, such asUser can set sampling time section as 1s, count 50 times in 1s, then sampling time interval can be set as 20 milliseconds(ms),Or mobile device sets sampling time section according to the internal memory reading speed of oneself and CPU running frequency and united as 1s, in 1sMeter 50 times, then sampling time interval can be set as 20ms.In addition, in embodiments of the present invention, when sampling time section is with samplingBetween the setting that is spaced can also take other modes, if for example, the real time frame rate of detection mobile device is to be able to detectThe fluent movements degree of the game class application program of installation on the mobile apparatus, sampling time section and sampling time interval can basesSampling time section is set as 1s, is set as sampling time interval by the game class application program installed on detection mobile device10ms, and for example, if the real time frame rate of detection mobile device is to be able to the video calling class of detection installation on the mobile apparatusThe video pictures of application program show fluency, and sampling time section and sampling time interval can pacify according on detection mobile deviceSampling time section is set as 2s, sampling time interval is set as into 40ms by the video calling class software of dress, that is to say, that samplingThe setting of period and sampling time interval can also be determined by installing application program on the mobile apparatus, only be said hereinIt is bright, do not limit.
In some embodiments of the invention, when preset sampling time section timing starts, during according to preset samplingBetween interval acquiring mobile device physics video memory front and rear two frame pixel pixel value.In order to more accurately illustrateSampling time before one sampling time interval and two frames in sampling time afterwards, by the two in the embodiment of the present inventionFrame definition is " the first frame " and " the second frame ", then respectively in the sampling time of the first frame and the sampling time of the second frame, obtains respectivelyWhat is got is physics video memory in the pixel of the first frame and the pixel in the second frame, the two pixels respectively corresponding to pixelIt is worth and is:In the pixel value of the pixel of the first frame and the pixel value of pixel in the second frame.Some in the embodiment of the present inventionThe pixel value of pixel refers to the brightness value in the digital picture of the pixel, wherein, pass through the picture of the pixel of the first frameElement value can represents data content of the physics video memory of mobile device at the sampling time of the first frame, passes through the picture of the second frameThe pixel value can of vegetarian refreshments represents data content of the physics video memory of mobile device at the sampling time of the second frame.
In some embodiments of the invention, the data content stored in the physics video memory of mobile device is to seeming that video card is defeatedThe information of each pixel gone out onto display, and physics video memory is the important component of video card, and display chip has been handledPixel data can be saved in after pixel data in physics video memory, then read out pixel from physics video memory by digital analog converterData simultaneously convert digital signals into analog signal, are finally come out by the screen display of mobile device.In the embodiment of the present invention, whenPixel data can be saved in physics video memory by display chip after having handled pixel data, therefore can pass through the physics of mobile deviceIt is buffered in the pixel value for getting pixel in physics video memory in preset sampling time section according to preset sampling time interval.
In some embodiments of the invention, the clocking method of sampling time section and every sampling time interval timing touchThe mode that hair step 101 starts to perform can specifically be realized by timer come clocked flip, for example, sampling time section is 1s,Sampling time interval is 20ms, then when the timer time of sampling time section starts, timer just triggers step 101 every 20msPerform once.
102nd, according in the judgement of the pixel value of the pixel value of the pixel of above-mentioned first frame and the pixel of above-mentioned second frameState whether physics video memory changes.
Wherein, step 103 is performed when above-mentioned physics video memory changes.
In embodiments of the present invention, the sampling time before a sampling time interval is obtained by step 101 statisticsCollect data content in the physics video memory of mobile device for the pixel of the first frame pixel value, the sampling time interval itIt is the pixel value of the pixel of the second frame, Ran Hougen that sampling time afterwards, which collects data content in the physics video memory of mobile device,Judge whether physics video memory changes according to the pixel value of the pixel of the first frame and the pixel value of pixel of the second frame.ItsIn, in the embodiment of the present invention when physics video memory changes, digital analog converter reads out pixel data simultaneously from physics video memoryAnalog signal is converted digital signals into, screen-picture will produce change when finally being come out by the screen display of mobile device,Therefore whether the embodiment of the present invention is changed by physics video memory and gets the screen-picture of mobile device and display whether to becomeChange, so as to be changed the statistics of number to the frame per second of mobile device, and according to sampling time section so as to calculating mobile deviceReal time frame rate, refer to the description of subsequent embodiment.It should be noted that in embodiments of the present invention according to above-mentioned first frameThe pixel value of the pixel of the pixel value of pixel and above-mentioned second frame judge above-mentioned physics video memory whether change have it is a variety ofImplementation, for example, can be collected respectively for two sampling times before and after a sampling time intervalThe pixel value of pixel is compared frame by frame, can also be for being adopted at one so as to get whether physics video memory changesThe pixel value for the pixel that two sampling times before and after sample time interval collect respectively carries out summation inspection codeCompare, so as to get whether physics video memory changes, specifically can flexibly be set with application scenarios in actual applications, thisPlace for illustrative purposes only, does not limit.
It should be noted that in some embodiments of the invention, in step 102 when above-mentioned physics video memory becomesStep 103 is performed during change, refers to the description of subsequent step.In addition, when above-mentioned physics video memory does not change, it is necessary to againTriggering step 101 performs again, and what is simply got with the increase of the timer time of timer is between the latter sampling timeThe pixel value of the pixel for the frame that sampling time before and after collects.
103rd, when above-mentioned physics video memory changes, the frame per second statistical value of above-mentioned mobile device is increased into a statistics stepIt is long.
Wherein, by the judgement whether to be changed to physics video memory, show so as to get the screen-picture of mobile deviceShow whether changed, for example, the screen-picture of mobile device, which is shown, when physics video memory changes is becomeChange, when physics video memory does not change, the screen-picture of mobile device is displayed without changing.When above-mentioned physics video memoryWhen changing, the frame per second statistical value of above-mentioned mobile device is increased into a statistics step-length.Wherein, statistics step-length refers to frame per secondThe increasing degree of statistical value, counting the value of step-length can specifically be determined by the amplitude of variation of frame per second statistical value.For example, statisticsWhen step-length is arranged to 1, when changing physics video memory, the frame per second statistical value of mobile device is just increased by 1, and for example, statisticsWhen step-length is arranged to 2, when changing physics video memory, the frame per second statistical value of mobile device is just increased by 2.
104th, judge whether the timing duration of above-mentioned sampling time section has been completed.
Wherein, if the timing duration of above-mentioned sampling time section has not been completed, triggering step 101 performs again, when upperStep 105 is triggered at the end of stating sampling time section timing to perform.
In some embodiments of the invention, after in the sampling time, section timing starts, whenever a sampling time intervalLater, it is required for triggering step 101 to start to perform, this can sequence trigger switch subsequent step 102 to 104 after step 101 performsExecution, moved in circles so as to realize in a sampling time section repeatedly, until the timing of above-mentioned sampling time section terminates.
105th, at the end of above-mentioned sampling time section timing, above-mentioned frame per second statistical value is exported, according to above-mentioned sampling time sectionThe real time frame rate of above-mentioned mobile device is obtained with above-mentioned frame per second statistical value.
In embodiments of the present invention, step 101 to step 104 can be after in the sampling time, section timing starts, during according to samplingBetween be spaced and repeatedly move in circles executions, up to the timing of above-mentioned sampling time section terminates.When above-mentioned sampling time section timing terminatesWhen, above-mentioned frame per second statistical value is exported, the reality of above-mentioned mobile device is obtained according to above-mentioned sampling time section and above-mentioned frame per second statistical valueWhen frame per second.For example, if sampling time section is redefined for 1s, the frame per second statistical value of output is 30 statistics step-lengths, then leads toIt is 30 frames to cross frame per second statistical value divided by sampling time section can or the real time frame rate to mobile device.
Therefore sampling time section and sampling time interval are pre-set, then when the sampling time, section timing started,The pixel for two frames that the sampling time distribution collection before and after sampling time interval arrives is obtained according to sampling time intervalThe pixel value of point, obtains the pixel value of the pixel value of the pixel of the first frame and the pixel of the second frame, then according to the first frameThe pixel value of pixel and the pixel value of pixel of the second frame judge whether physics video memory changes, if so, will be mobileThe frame per second statistical value of equipment increases a statistics step-length, next judges whether the timing duration of sampling time section has been completed,If it is not, continue the pixel value of the pixel for two frames that a sampling time distribution collection arrives before and after obtaining according to sampling time interval,And continue the judgement whether physics video memory changes, until sampling time section timing terminates, output frame rate statistical value, rootThe real time frame rate of current mobile device is obtained according to sampling time section and frame per second statistical value.By in sampling time section according to samplingTime interval timing is extracted and compared to the data content of the physics video memory of mobile device, so as to calculate physics video memoryFrame per second, it is possible to achieve real-time detection is carried out to the screen display frame per second of mobile device anywhere or anytime.
Refer to shown in Fig. 2, the real time frame rate detection method for the mobile device that another embodiment of the present invention provides can be withIncluding:
201st, according to preset sampling time interval by above-mentioned mobile device the first frame physics video memory and second framePhysics video memory is mapped to the virtual address space of process.
In some embodiments of the invention, each process has the virtual address space of oneself, the address space of processSize can be determined by the CPU of mobile device digit.When preset sampling time section timing starts, adopted according to presetThe physics video memory for the first frame that sample time interval respectively collects the sampling time before sampling time interval is mapped to processVirtual address space, the physics video memory for the second frame for collecting the sampling time after sampling time interval be mapped to processVirtual address space.The virtual address space that physics video memory is mapped to process can specifically be realized by way of mmap.Wherein, the data content in physics video memory is mapped into internal memory by mmap, and data content is mapped on multiple pages, if in dataThe size sum of the not all page of size of appearance, the space that last page is not used will be reset.
202nd, the pixel of the pixel of the first frame is read out from the virtual address space of above-mentioned process in a manner of arrayThe pixel value of the pixel of value and the second frame.
Wherein, the physics video memory of the first frame is mapped to after the virtual address space of process, it is possible to pass through arrayMode reads out the pixel value of the pixel of the first frame from the virtual address space of process, likewise, the physics of the second frame is shownAfter the virtual address space for depositing the process of being mapped to, it is possible to read out by way of array from the virtual address space of processThe pixel value of the pixel of second frame.
How the physics video memory of mobile device to be mapped to the virtual address space of process in order to describe in detail and is read outThe pixel value of pixel, refer to as shown in figure 3, for the physics video memory of mobile device is mapped into process in the embodiment of the present inventionVirtual address space and read out the implementation schematic diagram of the pixel value of pixel, physics is shown by mmap modes firstThe virtual address space for the process of being mapped to is deposited,, can by the continuous change of i and j values then by array Array [i] [j]To read out the pixel value of pixel from the virtual address space of process, so as to realize the access to physics video memory.
In addition in some embodiments of the invention, physics video memory is got in the first frame by step 201 and step 202The pixel value of pixel and the pixel value of pixel in the second frame can also have other implementations, for example, canThink following steps:Physics video memory of the above-mentioned mobile device in the first frame is accessed, reads thing of the above-mentioned mobile device in the first frameThe file data in video memory is managed, obtains the pixel value of the pixel of above-mentioned first frame;Above-mentioned mobile device is accessed in the second framePhysics video memory, file data of the above-mentioned mobile device in the physics video memory of the second frame is read, obtains the pixel of above-mentioned second frameThe pixel value of point.That is, then step 201 reads picture using the virtual address space for the process that is mapped to 202 using arrayThe mode of the pixel value of vegetarian refreshments, the mode of data content in rdma read can be analogous to, its reading efficiency is higher, in foregoing citingIt is direct access physics video memory, is that have accessed physics video memory in a manner of reading " file system ", regards physics video memory as one" file system ", the file data in physics video memory is read by way of reading file, this mode is compared to rdma readMode efficiency it is slightly lower, but can also equally get the pixel value and the second frame of the pixel of the frame of mobile device firstPixel pixel value.
203rd, each first pixel of more above-mentioned first frame and each second pixel of above-mentioned second frame are respectiveWhether pixel value is identical.
Wherein, if the respective pixel value phase of each second pixel of each first pixel and the second pin of the first frameTogether, then illustrate that above-mentioned physics video memory does not change, if each the second of each first pixel and the second pin of the first frameThe pixel that pixel value differs in the respective pixel value of pixel be present, then illustrate that the physics video memory changes, it is above-mentionedLocation of pixels of the location of pixels of first pixel in the first frame with above-mentioned second pixel in the second frame is identical.
That is, when step 203 is by sampling of the location of pixels identical pixel before sampling time intervalBetween and sampling time interval after sampling time collect the first pixel and the second pixel respectively, pass through individual element positionPut compare the pixel that former and later two sampling times collect respectively pixel value it is whether different, if each location of pixels is front and rearThe pixel value for the pixel that two sampling times collect respectively is all identical, then it is assumed that the physics video memory of mobile device does not occurChange, if there is the pixel value for the pixel that former and later two sampling times collect respectively different in all location of pixels, recognizeChanged for the physics video memory of mobile device.
In addition in some embodiments of the invention, each first pixel of more above-mentioned first frame of step 203 is passed throughWith whether each respective pixel value of second pixel of above-mentioned second frame identical can also other implementations, citing comesSay, can be following steps:Go out from whole pixel point samplings of above-mentioned first frame respectively according to identical probability sampling methodOne pixel point set, go out the second pixel point set from whole pixel point samplings of above-mentioned second frame;More above-mentioned first pixelWhether each 3rd pixel of set is identical with the respective pixel value of each 4th pixel of above-mentioned second pixel point set,If identical, illustrate that above-mentioned physics video memory does not change, if differing, illustrate that above-mentioned physics video memory changes, itsIn, the location of pixels phase of location of pixels and above-mentioned 4th pixel in the second frame of above-mentioned 3rd pixel in the first frameTogether.That is, two samplings before and after sampling time interval is all judged relative to individual element position in step 203Whether the pixel value for the pixel that the time collects is identical, and the location of pixels of whole can also be taken out in the embodiment of the present inventionSample, partial pixel position is obtained, then compare two in these partial pixel positions before and after sampling time interval againWhether the pixel value for the pixel that the sampling time collects respectively is identical, specifically, can be by using identical probability samplingMethod goes out the first pixel point set from whole pixel point samplings of the first frame respectively, goes out from whole pixel point samplings of the second frameTwo pixel point sets, then each 3rd pixel of more above-mentioned first pixel point set and above-mentioned second pixel point setWhether the respective pixel value of each 4th pixel is identical.
204th, when above-mentioned physics video memory changes, the frame per second statistical value of above-mentioned mobile device is increased into a statistics stepIt is long.
Wherein, by the judgement whether to be changed to physics video memory, show so as to get the screen-picture of mobile deviceShow whether changed, for example, the screen-picture of mobile device, which is shown, when physics video memory changes is becomeChange, when physics video memory does not change, the screen-picture of mobile device is displayed without changing.When above-mentioned physics video memoryWhen changing, the frame per second statistical value of above-mentioned mobile device is increased into a statistics step-length.Wherein, statistics step-length refers to frame per secondThe increasing degree of statistical value, counting the value of step-length can specifically be determined by frame per second statistical value.
205th, judge whether the timing duration of above-mentioned sampling time section has been completed.
Wherein, if the timing duration of above-mentioned sampling time section has not been completed, triggering step 201 performs again, when upperStep 206 is triggered at the end of stating sampling time section timing to perform.
In some embodiments of the invention, after in the sampling time, section timing starts, whenever a sampling time intervalLater, it is required for triggering step 201 to start to perform, this can sequence trigger switch subsequent step 202 to 205 after step 201 performsExecution, moved in circles so as to realize in a sampling time section repeatedly, until the timing of above-mentioned sampling time section terminates.
206th, at the end of above-mentioned sampling time section timing, above-mentioned frame per second statistical value is exported, according to above-mentioned sampling time sectionThe real time frame rate of above-mentioned mobile device is obtained with above-mentioned frame per second statistical value.
In embodiments of the present invention, step 201 to step 205 can be after in the sampling time, section timing starts, during according to samplingBetween be spaced and repeatedly move in circles executions, up to the timing of above-mentioned sampling time section terminates.When above-mentioned sampling time section timing terminatesWhen, above-mentioned frame per second statistical value is exported, the reality of above-mentioned mobile device is obtained according to above-mentioned sampling time section and above-mentioned frame per second statistical valueWhen frame per second.
Refer to shown in Fig. 4, the real time frame rate detection method for the mobile device that another embodiment of the present invention provides can be withIncluding:
401st, above-mentioned mobile device is accessed in the physics video memory of the first frame, reads physics of the above-mentioned mobile device in the first frameFile data in video memory, obtain the pixel value of the pixel of above-mentioned first frame.
402nd, above-mentioned mobile device is accessed in the physics video memory of the second frame, reads physics of the above-mentioned mobile device in the second frameFile data in video memory, obtain the pixel value of the pixel of above-mentioned second frame.
In embodiments of the present invention, step 201 is mapped to the virtual address spaces of process to 202 uses in previous embodimentThen the mode of the pixel value of pixel is read using array, the mode of data content in rdma read can be analogous to, it reads effectRate is higher.Step 401 and being achieved in that for 402 samplings directly access physics video memory, are in a manner of reading " file system "Physics video memory is have accessed, physics video memory is regarded as one " file system ", physics video memory is read by way of reading fileIn file data, this mode is slightly lower compared to the mode efficiency of rdma read, but can also equally get movementThe pixel value of the pixel value of the pixel of the frame of equipment first and the pixel of the second frame.
403rd, the summation inspection code of whole pixels of above-mentioned first frame and whole pixels of above-mentioned second frame are calculated respectivelyThe summation inspection code of point.
Wherein, calculating the summation inspection code of pixel can be realized by way of checksum, be needed in checksumCalculate the sum of the pixel value of each pixel.
404th, the summation inspection code of whole pixels of above-mentioned first frame and whole pixels of above-mentioned second frame are judgedWhether summation inspection code is equal.
Wherein, if whole pixels of the summation inspection code of whole pixels of above-mentioned first frame and above-mentioned first frame it is totalIt is equal with check code, then illustrate that above-mentioned physics video memory does not change, if unequal, illustrate that above-mentioned physics video memory becomesChange.
Refer to shown in Fig. 5, be to whole pixels of the first frame and whole pixels of the second frame in the embodiment of the present inventionPoint carries out checksum implementation schematic diagram.Where it is assumed that the resolution ratio of image is that M × N, M and N are certainly in physical memorySo number, in the pixel of the first frame it is x for location of pixels 11,
Location of pixels 1 is x in the pixel of the second frame1', in the pixel of the first frame it is x for location of pixels 22, pixelPosition 2 is x in the pixel of the second frame2', the summation inspection code for calculating whole pixels of above-mentioned first frame is sum ', is calculatedThe summation inspection code for going out whole pixels of the second frame is sum, is then verified(check), judge sum ' and sum whether phaseDeng if so, then illustrating that above-mentioned physics video memory does not change, if unequal, illustrating that above-mentioned physics video memory changes.
In addition in some embodiments of the invention, by step 403 and step 404 by judging the complete of above-mentioned first frameWhether the summation inspection code of whole pixels of the summation inspection code of portion's pixel and above-mentioned second frame is equal to may determine that shiftingWhether the physics video memory of dynamic equipment changes, it is necessary to which what is illustrated is whether the physics video memory for judging mobile device changes alsoThere are other implementations, for example, can be following steps:According to identical probability sampling method respectively from above-mentioned first frameWhole pixel point samplings go out the first pixel point set, go out the second pixel point set from whole pixel point samplings of above-mentioned second frame;In the summation inspection code and above-mentioned second pixel point set that calculate whole pixels in above-mentioned first pixel point set respectivelyThe summation inspection code of whole pixels;Judge the summation inspection code of whole pixels in above-mentioned first pixel point set and above-mentionedWhether the summation inspection code of whole pixels in the second pixel point set is equal;If so, then illustrate that above-mentioned physics video memory does not haveChange, if unequal, illustrate that above-mentioned physics video memory changes.That is, foregoing be achieved in that to wholeLocation of pixels is sampled, and obtains partial pixel position, i.e. the first pixel point set and the second pixel point set, next respectivelyCalculate the summation inspection code of the first pixel point set and whole pixels in the second pixel point set.Pass through probability sampling methodProbability sampling is carried out to whole pixels in physics video memory, can faster judge whether physics video memory changes.
405th, when above-mentioned physics video memory changes, the frame per second statistical value of above-mentioned mobile device is increased into a statistics stepIt is long.
Wherein, by the judgement whether to be changed to physics video memory, show so as to get the screen-picture of mobile deviceShow whether changed, for example, the screen-picture of mobile device, which is shown, when physics video memory changes is becomeChange, when physics video memory does not change, the screen-picture of mobile device is displayed without changing.When above-mentioned physics video memoryWhen changing, the frame per second statistical value of above-mentioned mobile device is increased into a statistics step-length.Wherein, statistics step-length refers to frame per secondThe increasing degree of statistical value, counting the value of step-length can specifically be determined by frame per second statistical value.
406th, judge whether the timing duration of above-mentioned sampling time section has been completed.
Wherein, if the timing duration of above-mentioned sampling time section has not been completed, triggering step 401 performs again, when upperStep 407 is triggered at the end of stating sampling time section timing to perform.
In some embodiments of the invention, after in the sampling time, section timing starts, whenever a sampling time intervalLater, it is required for triggering step 401 to start to perform, this can sequence trigger switch subsequent step 402 to 406 after step 401 performsExecution, moved in circles so as to realize in a sampling time section repeatedly, until the timing of above-mentioned sampling time section terminates.
407th, at the end of above-mentioned sampling time section timing, above-mentioned frame per second statistical value is exported, according to above-mentioned sampling time sectionThe real time frame rate of above-mentioned mobile device is obtained with above-mentioned frame per second statistical value.
In embodiments of the present invention, step 401 to step 405 can be after in the sampling time, section timing starts, during according to samplingBetween be spaced and repeatedly move in circles executions, up to the timing of above-mentioned sampling time section terminates.When above-mentioned sampling time section timing terminatesWhen, above-mentioned frame per second statistical value is exported, the reality of above-mentioned mobile device is obtained according to above-mentioned sampling time section and above-mentioned frame per second statistical valueWhen frame per second.
Therefore sampling time section and sampling time interval are pre-set, then when the sampling time, section timing started,The pixel for two frames that the sampling time distribution collection before and after sampling time interval arrives is obtained according to sampling time intervalThe pixel value of point, obtains the pixel value of the pixel value of the pixel of the first frame and the pixel of the second frame, then according to the first frameThe pixel value of pixel and the pixel value of pixel of the second frame judge whether physics video memory changes, if so, will be mobileThe frame per second statistical value of equipment increases a statistics step-length, next judges whether the timing duration of sampling time section has been completed,If it is not, continue the pixel value of the pixel for two frames that a sampling time distribution collection arrives before and after obtaining according to sampling time interval,And continue the judgement whether physics video memory changes, until sampling time section timing terminates, output frame rate statistical value, rootThe real time frame rate of current mobile device is obtained according to sampling time section and frame per second statistical value.By in sampling time section according to samplingTime interval timing is extracted and compared to the data content of the physics video memory of mobile device, so as to calculate physics video memoryFrame per second, it is possible to achieve real-time detection is carried out to the screen display frame per second of mobile device anywhere or anytime.
For ease of being better understood from and implementing the such scheme of the embodiment of the present invention, corresponding application scenarios of illustrating below comeIt is specifically described.
Refer to the flow signal as shown in fig. 6, for the real time frame rate detection method of mobile device in the embodiment of the present inventionFigure, can include:
601st, preset counter Num and frame per second register FPS are initialized, wherein the sampling time interval setIt is 1s for 20ms, sampling time section, then is 50 in the maximum occurrences of the sampling time section inside counting device, minimum value is 0, justThe Num meaning for being entered as 50, representing assignment for symbol " <-" in figure 6 during beginningization, " Num < -50 " is expressed asNum's is entered as 50, and " <-" occurred in subsequent step also illustrates that assignment, and FPS is used for the frame per second statistics for storing mobile deviceValue, FPS can start counting up from less than or equal to 0, and FPS is entered as 0 during initialization, set and counts step-length as 1.
602, when the sampling time, section timing started, every 20ms trigger subsequent step 603 to step 606, in order toIt is easy to describe, step 603 to step 606 has been drawn into a big dotted line frame, therefore can simplifies and be described as triggering every 20msOnce the execution step in dotted line frame performs once.
603rd, judge whether Num is more than 0, if Num is less than or equal to 0, illustrate that the timing of sampling time section finishes,Retriggered step 601 and step 607 start to perform, if Num is more than 0, are illustrating the timing duration of sampling time section alsoCarry out, triggering step 604 starts to perform.
604th, Num is entered as again:Num-1, and read frame buffer(frame buffer), collect currentPhysics video memory in pixel pixel value, then perform step 605.
605th, judge whether the physics video memory of mobile device changes, it judges that the mode that physics video memory changes canRefering to the description in previous embodiment, if physics video memory changes triggering, step 606 starts to perform;
606th, when physics video memory changes, FPS is entered as again:FPS+1.
607th, at the end of sampling time section timing, the frame per second statistical value stored in FPS is exported, according to the above-mentioned sampling timeSection and above-mentioned frame per second statistical value obtain the real time frame rate of above-mentioned mobile device, if sampling time section is 1s, the reality of mobile deviceWhen frame per second be the frame per second statistical value stored in FPS.
Therefore sampling time section and sampling time interval are pre-set, then when the sampling time, section timing started,The pixel for two frames that the sampling time distribution collection before and after sampling time interval arrives is obtained according to sampling time intervalThe pixel value of point, obtains the pixel value of the pixel value of the pixel of the first frame and the pixel of the second frame, then according to the first frameThe pixel value of pixel and the pixel value of pixel of the second frame judge whether physics video memory changes, if so, will be mobileThe frame per second statistical value of equipment increases a statistics step-length, next judges whether the timing duration of sampling time section has been completed,If it is not, continue the pixel value of the pixel for two frames that a sampling time distribution collection arrives before and after obtaining according to sampling time interval,And continue the judgement whether physics video memory changes, until sampling time section timing terminates, output frame rate statistical value, rootThe real time frame rate of current mobile device is obtained according to sampling time section and frame per second statistical value.By in sampling time section according to samplingTime interval timing is extracted and compared to the data content of the physics video memory of mobile device, so as to calculate physics video memoryFrame per second, it is possible to achieve real-time detection is carried out to the screen display frame per second of mobile device anywhere or anytime.
It should be noted that for foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series ofCombination of actions, but those skilled in the art should know, the present invention is not limited by described sequence of movement becauseAccording to the present invention, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also knowKnow, embodiment described in this description belongs to preferred embodiment, and involved action and module are not necessarily of the inventionIt is necessary.
For ease of preferably implementing the such scheme of the embodiment of the present invention, the phase for implementing such scheme is also provided belowClose device.
Refer to shown in Fig. 7-a, a kind of real time frame rate detection device 700 of mobile device provided in an embodiment of the present invention,It can include:Pixel value acquisition module 701, video memory judge module 702, statistical module 703, timing module 704, frame per second detection mouldBlock 705, wherein,
Pixel value acquisition module 701, for when preset sampling time section timing starts, according to the preset sampling timeThe physics video memory of interval acquiring mobile device in the pixel value of the pixel of the first frame and the pixel value of pixel in the second frame,The frame that first frame collects for the sampling time before the sampling time interval, second frame are in the samplingThe frame that sampling time after time interval collects;
Video memory judge module 702, for the pixel of first frame that is got according to pixel value acquisition module 701The pixel value of the pixel of pixel value and second frame judges whether the physics video memory changes;
Statistical module 703, for when video memory judge module 702 judge learn that the physics video memory changes when, by instituteStating the frame per second statistical value of mobile device increases a statistics step-length;
Timing module 704, for judging whether the timing duration of the sampling time section has been completed, if it is not, triggering institutePixel value acquisition module 701 is stated to perform again;
Frame per second detecting module 705, at the end of the sampling time section timing, output statistical module 703 to count onThe mobile device frame per second statistical value, the mobile device is obtained according to the sampling time section and the frame per second statistical valueReal time frame rate.
In some embodiments of the invention, video memory judge module 702, specifically for each the of first frameWhether one pixel is identical with each respective pixel value of second pixel of second frame, if identical, illustrates the thingReason video memory does not change, if differing, illustrates that the physics video memory changes, wherein, first pixel existsLocation of pixels of the location of pixels with second pixel in the second frame in first frame is identical.
Refer to as shown in Fig. 7-b, in some embodiments of the invention, the real time frame rate detection device of mobile device700, it can also include:
Setting module 706, for the speed of the internal memory according to the mobile device and the frequency setting of central processor CPUThe sampling time section and the sampling time interval.
In some embodiments of the invention, pixel value acquisition module 701, can include:
Mapping submodule 7011, for according to preset sampling time interval by the mobile device the first frame physicsThe physics video memory of video memory and the second frame is mapped to the virtual address space of process;
First reading submodule 7012, for reading out from the virtual address space of the process in a manner of arrayThe pixel value of the pixel of the pixel value of the pixel of one frame and the second frame.
In some embodiments of the invention, video memory judge module 702, can include:
First calculating sub module 7021, summation inspection code and institute for whole pixels for calculating first frame respectivelyState the summation inspection code of whole pixels of the second frame;
First judging submodule 7022, for the summation inspection code and described for the whole pixels for judging first frameWhether the summation inspection code of whole pixels of two frames is equal;If so, then illustrate that the physics video memory does not change, if notIt is equal, then illustrate that the physics video memory changes.
Refer to as shown in Fig. 7-c, in some embodiments of the invention, pixel value acquisition module 701, can include:
Video memory accesses submodule 7013, for accessing physics video memory of the mobile device in the first frame, accesses the shiftingPhysics video memory of the dynamic equipment in the second frame;
Second reading submodule 7014, for reading number of files of the mobile device in the physics video memory of the first frameAccording to obtaining the pixel value of the pixel of first frame;Read file of the mobile device in the physics video memory of the second frameData, obtain the pixel value of the pixel of second frame.
In some embodiments of the invention, video memory judge module 702, can include:
Sample submodule 7023, for according to identical probability sampling method respectively from whole pixels of first frameSample out the first pixel point set, go out the second pixel point set from whole pixel point samplings of second frame;
Second calculating sub module 7024, for calculating the summation of whole pixels in the first pixel point set respectivelyThe summation inspection code of check code and whole pixels in the second pixel point set;
Second judging submodule 7025, for judging the summation inspection of whole pixels in the first pixel point setWhether the summation inspection code of whole pixels in code and the second pixel point set is equal;If so, then illustrate the physicsVideo memory does not change, if unequal, illustrates that the physics video memory changes.
Refer to as shown in Fig. 7-d, in some embodiments of the invention, pixel value acquisition module 701, can include:
Video memory accesses submodule 7013, for accessing physics video memory of the mobile device in the first frame, accesses the shiftingPhysics video memory of the dynamic equipment in the second frame;
Second reading submodule 7014, for reading number of files of the mobile device in the physics video memory of the first frameAccording to obtaining the pixel value of the pixel of first frame;Read file of the mobile device in the physics video memory of the second frameData, obtain the pixel value of the pixel of second frame.
In some embodiments of the invention, video memory judge module 702, can include:
Sample submodule 7023, for according to identical probability sampling method respectively from whole pixels of first frameSample out the first pixel point set, go out the second pixel point set from whole pixel point samplings of second frame;
Comparison sub-module 7026, each 3rd pixel and second picture for the first pixel point setWhether the respective pixel value of each 4th pixel of vegetarian refreshments set is identical, if identical, illustrates that the physics video memory is not sent outChanging, if differing, illustrate that the physics video memory changes, wherein, the picture of the 3rd pixel in the first frameLocation of pixels of the plain position with the 4th pixel in the second frame is identical.
It should be noted that the content such as information exchange, implementation procedure between each module/unit of said apparatus, due toThe inventive method embodiment is based on same design, and its technique effect brought is identical with the inventive method embodiment, particular contentReference can be made to the narration in the foregoing shown embodiment of the method for the present invention, here is omitted.
To sum up, sampling time section and sampling time interval are pre-set, then when the sampling time, section timing started, according toSampling time interval obtains the pixel for two frames that the sampling time distribution collection before and after sampling time interval arrivesPixel value, the pixel value of the pixel value of the pixel of the first frame and the pixel of the second frame is obtained, then according to the picture of the first frameThe pixel value of the pixel of the pixel value of vegetarian refreshments and the second frame judges whether physics video memory changes, if so, by mobile deviceFrame per second statistical value increase by one statistics step-length, next judge whether the timing duration of sampling time section has been completed, if it is not,Continue the pixel value of the pixel for two frames that a sampling time distribution collection arrives before and after obtaining according to sampling time interval, and continueThe judgement whether physics video memory changes is carried out, until sampling time section timing terminates, output frame rate statistical value, according to samplingPeriod and frame per second statistical value obtain the real time frame rate of current mobile device.By in sampling time section according between the sampling timeThe data content of the physics video memory of mobile device is extracted and compared every timing, so as to calculate the frame per second of physics video memory,It can realize and real-time detection is carried out to the screen display frame per second of mobile device anywhere or anytime.
Below mainly with the frame per second detection method of the mobile device of the embodiment of the present invention be applied to terminal in come for example,The terminal can include smart mobile phone, tablet personal computer, E-book reader, dynamic image expert's compression standard audio aspect 3(Moving Picture Experts Group Audio Layer III, MP3)Player, dynamic image expert's compression standardAudio aspect 4(Moving Picture Experts Group Audio Layer IV, MP4)Player, portable meter on kneeCalculation machine and desktop computer etc..
Fig. 8 is refer to, it illustrates the structural representation of the terminal involved by the embodiment of the present invention, specifically:
Terminal can include radio frequency(Radio Frequency, RF)Circuit 20, include one or more computersThe memory 21 of readable storage medium storing program for executing, input block 22, display unit 23, sensor 24, voicefrequency circuit 25, Wireless Fidelity(wireless fidelity, WiFi) module 26, the processor 27 for including one or more than one processing core andThe grade part of power supply 28.It will be understood by those skilled in the art that the restriction of the terminal structure shown in Fig. 8 not structure paired terminal,It can include than illustrating more or less parts, either combine some parts or different parts arrangement.Wherein:
RF circuits 20 can be used for receive and send messages or communication process in, the reception and transmission of signal, especially, by under base stationAfter row information receives, transfer to one or more than one processor 27 is handled;In addition, it is sent to base by up data are related toStand.Generally, RF circuits 20 include but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, userIdentity module(SIM)Card, transceiver, coupler, low-noise amplifier(Low Noise Amplifier, LNA), duplexerDeng.In addition, RF circuits 20 can also be communicated by radio communication with network and other equipment.The radio communication, which can use, appointsOne communication standard or agreement, including but not limited to global system for mobile communications (Global System of MobileCommunication, GSM), general packet radio service (General Packet Radio Service, GPRS), code division it is moreLocation (Code Division Multiple Access, CDMA), WCDMA (Wideband Code DivisionMultiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), Email, Short Message Service(Short Messaging Service, SMS) etc..
Memory 21 can be used for storage software program and module, and processor 27 is stored in the soft of memory 21 by operationPart program and module, so as to perform various function application and data processing.Memory 21 can mainly include storing program areaAnd storage data field, wherein, storing program area can storage program area, the application program needed at least one function(Such as soundSound playing function, image player function etc.)Deng;Storage data field can store uses created data according to terminal(Such asVoice data, phone directory etc.)Deng.In addition, memory 21 can include high-speed random access memory, can also include non-volatileProperty memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.Correspondingly, depositReservoir 21 can also include Memory Controller, to provide the access of processor 27 and input block 22 to memory 21.
Input block 22 can be used for the numeral or character information for receiving input, and generation is set with user and function controlIt is formed with keyboard, mouse, action bars, optics or the input of trace ball signal of pass.Specifically, in a specific embodiment,Input block 22 may include touch sensitive surface 221 and other input equipments 222.Touch sensitive surface 221, also referred to as touch display screen orPerson's Trackpad, collect touch operation of the user on or near it(For example user uses any suitable things such as finger, stylusThe operation of body or annex on touch sensitive surface 221 or near touch sensitive surface 221), and phase is driven according to formula set in advanceThe attachment means answered.Optionally, touch sensitive surface 221 may include both touch detecting apparatus and touch controller.Wherein, touchThe touch orientation of detection means detection user is touched, and detects the signal that touch operation is brought, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 27, andThe order sent of reception processing device 27 and it can be performed.Furthermore, it is possible to using resistance-type, condenser type, infrared ray and surfaceThe polytypes such as sound wave realize touch sensitive surface 221.Except touch sensitive surface 221, input block 22 can also be set including other inputsStandby 222.Specifically, other input equipments 222 can include but is not limited to physical keyboard, function key(Such as volume control button,Switch key etc.), trace ball, mouse, the one or more in action bars etc..
Display unit 23 can be used for display by user input information or be supplied to user information and terminal it is variousGraphical user interface, these graphical user interface can be made up of figure, text, icon, video and its any combination.DisplayUnit 23 may include display panel 231, optionally, can use liquid crystal display (Liquid Crystal Display,LCD), the form such as Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) configures display panel231.Further, touch sensitive surface 221 can cover display panel 231, when touch sensitive surface 221 detects touching on or near itAfter touching operation, processor 27 is sent to determine the type of touch event, is followed by subsequent processing device 27 and is existed according to the type of touch eventCorresponding visual output is provided on display panel 231.Although in fig. 8, touch sensitive surface 221 and display panel 231 are as twoIndividual independent part realizes input and input function, but in some embodiments it is possible to by touch sensitive surface 221 and display surfacePlate 231 is integrated and realizes input and output function.
Terminal may also include at least one sensor 24, such as optical sensor, motion sensor and other sensors.ToolBody, optical sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to ambient lightLight and shade adjusts the brightness of display panel 231, proximity transducer can when terminal is moved in one's ear, close display panel 231 and/Or backlight.As one kind of motion sensor, gravity accelerometer can detect in all directions(Generally three axles)AccelerateThe size of degree, size and the direction of gravity are can detect that when static, the application available for identification mobile phone posture(For example horizontal/vertical screen is cutChange, dependent game, magnetometer pose calibrating), Vibration identification correlation function(Such as pedometer, percussion)Deng;May be used also as terminalThe other sensors such as the gyroscope of configuration, barometer, hygrometer, thermometer, infrared ray sensor, will not be repeated here.
Voicefrequency circuit 25, loudspeaker 251, microphone 252 can provide the COBBAIF between user and terminal.Voicefrequency circuitElectric signal after the voice data received conversion can be transferred to loudspeaker 251 by 25, and sound letter is converted to by loudspeaker 251Number output;On the other hand, the voice signal of collection is converted to electric signal by microphone 252, is changed after being received by voicefrequency circuit 25For voice data, then after voice data output processor 27 is handled, through RF circuits 20 to be sent to such as another terminal, orVoice data is exported to memory 21 further to handle.Voicefrequency circuit 25 is also possible that earphone jack, outer to provideIf the communication of earphone and terminal.
WiFi belongs to short range wireless transmission technology, and terminal can help user's transceiver electronicses postal by WiFi module 26Part, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 8 is shownWiFi module 26, but it is understood that, it is simultaneously not belonging to must be configured into for terminal, can not change as needed completelyOmitted in the essential scope of invention.
Processor 27 is the control centre of terminal, using various interfaces and the various pieces of connection whole mobile phone, is led toCross operation or perform the software program and/or module being stored in memory 21, and call the number being stored in memory 21According to the various functions and processing data of terminal being performed, so as to carry out integral monitoring to mobile phone.Optionally, processor 27 may includeOne or more processing cores;Preferably, processor 27 can integrate application processor and modem processor, wherein, applicationProcessor mainly handles operating system, user interface and application program etc., and modem processor mainly handles radio communication.CanWith understanding, above-mentioned modem processor can not also be integrated into processor 27.
Terminal also includes the power supply 28 to all parts power supply(Such as battery), it is preferred that power supply can pass through power supply pipeReason system and processor 27 are logically contiguous, so as to realize management charging, electric discharge and power managed etc. by power-supply management systemFunction.Power supply 28 can also include one or more direct current or AC power, recharging system, power failure monitor electricityThe random component such as road, power supply changeover device or inverter, power supply status indicator.
Although being not shown, terminal can also include camera, bluetooth module etc., will not be repeated here.Specifically in this implementationIn example, the display unit of terminal is touch-screen display, and the memory 21 of terminal seemingly, can store sampling with above-mentioned class databasePeriod, sampling time interval, frame per second statistical value.
And one or more than one program storage in memory 21, and are configured to by one in the terminal of the present embodimentIndividual either more than one processor 27 performs the following operational order that said one or more than one program are included:
When preset sampling time section timing starts, the physics of mobile device is obtained according to preset sampling time intervalFor video memory in the pixel value of the pixel of the first frame and the pixel value of pixel in the second frame, first frame is in the samplingThe frame that sampling time before time interval collects, second frame are the sampling time after the sampling time intervalThe frame collected;
The thing is judged according to the pixel value of the pixel value of the pixel of first frame and the pixel of second frameWhether reason video memory changes;
If so, the frame per second statistical value of the mobile device is increased into a statistics step-length;
Judge whether the timing duration of the sampling time section has been completed, if it is not, triggering is according to the preset sampling timeThe physics video memory of interval acquiring mobile device is in the pixel value of the pixel of the first frame and the pixel value of pixel in the second framePerform again;At the end of the sampling time section timing, the frame per second statistical value is exported, according to the sampling time section and instituteState the real time frame rate that frame per second statistical value obtains the mobile device.
Specifically, the pixel of the physics video memory in the first frame that mobile device is obtained according to preset sampling time intervalThe pixel value of the pixel value of point and the pixel in the second frame, including:
According to preset sampling time interval by the mobile device in the physics video memory of the first frame and the physics of the second frameVideo memory is mapped to the virtual address space of process;
Read out in a manner of array from the virtual address space of the process pixel of the first frame pixel value andThe pixel value of the pixel of second frame.
Specifically, the pixel of the physics video memory in the first frame that mobile device is obtained according to preset sampling time intervalThe pixel value of the pixel value of point and the pixel in the second frame, including:
Physics video memory of the mobile device in the first frame is accessed, reads physics video memory of the mobile device in the first frameIn file data, obtain the pixel value of the pixel of first frame;
Physics video memory of the mobile device in the second frame is accessed, reads physics video memory of the mobile device in the second frameIn file data, obtain the pixel value of the pixel of second frame.
Specifically, the pixel according to first frame pixel value and second frame pixel pixel valueJudge whether the physics video memory changes, including:
Compare each first pixel of first frame and each respective pixel of second pixel of second frameWhether value is identical, if identical, illustrates that the physics video memory does not change, if differing, illustrates the physics video memoryChange, wherein, first pixel location of pixels in the first frame and second pixel are in the second frameLocation of pixels is identical.
Specifically, the pixel according to first frame pixel value and second frame pixel pixel valueJudge whether the physics video memory changes, including:
The summation inspection code of whole pixels of first frame and whole pixels of second frame are calculated respectivelySummation inspection code;
Judge the summation of the summation inspection code of whole pixels of first frame and whole pixels of second frameWhether check code is equal;If so, then illustrating that the physics video memory does not change, if unequal, illustrate that the physics showsDeposit and change.
Specifically, the pixel according to first frame pixel value and second frame pixel pixel valueJudge whether the physics video memory changes, including:
Go out the first pixel point set from whole pixel point samplings of first frame respectively according to identical probability sampling methodClose, go out the second pixel point set from whole pixel point samplings of second frame;
The summation inspection code of whole pixels in the first pixel point set and second pixel are calculated respectivelyThe summation inspection code of whole pixels in set;
Judge the summation inspection code of whole pixels in the first pixel point set and the second pixel point setIn whole pixels summation inspection code it is whether equal;If so, then illustrate that the physics video memory does not change, if not phaseDeng then illustrating that the physics video memory changes.
Specifically, the pixel according to first frame pixel value and second frame pixel pixel valueJudge whether the physics video memory changes, including:
Go out the first pixel point set from whole pixel point samplings of first frame respectively according to identical probability sampling methodClose, go out the second pixel point set from whole pixel point samplings of second frame;
Compare each 3rd pixel and each 4th of the second pixel point set of the first pixel point setWhether the respective pixel value of pixel is identical, if identical, illustrates that the physics video memory does not change, if differing,Illustrate that the physics video memory changes, wherein, the 3rd pixel location of pixels in the first frame and the 4th pictureThe location of pixels of vegetarian refreshments in the second frame is identical.
Further, the sampling time section and the sampling time interval are according to the speed of the internal memory of the mobile deviceWith the frequency setting of central processor CPU.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is canTo instruct the hardware of correlation to complete by program, the program can be stored in a computer-readable recording medium, storageMedium can include:Read-only storage(ROM), random access memory(RAM), disk or CD etc..
Detailed Jie has been carried out to the frame per second detection method and relevant apparatus of a kind of mobile device provided by the present invention aboveContinue, for those of ordinary skill in the art, according to the thought of the embodiment of the present invention, in specific embodiments and applicationsThere will be changes, in summary, this specification content should not be construed as limiting the invention.

Claims (16)

CN201310185743.6A2013-05-172013-05-17The frame per second detection method and relevant apparatus of a kind of mobile deviceActiveCN104166614B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201310185743.6ACN104166614B (en)2013-05-172013-05-17The frame per second detection method and relevant apparatus of a kind of mobile device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201310185743.6ACN104166614B (en)2013-05-172013-05-17The frame per second detection method and relevant apparatus of a kind of mobile device

Publications (2)

Publication NumberPublication Date
CN104166614A CN104166614A (en)2014-11-26
CN104166614Btrue CN104166614B (en)2017-12-15

Family

ID=51910440

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201310185743.6AActiveCN104166614B (en)2013-05-172013-05-17The frame per second detection method and relevant apparatus of a kind of mobile device

Country Status (1)

CountryLink
CN (1)CN104166614B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104965773B (en)*2015-07-092019-06-04网易(杭州)网络有限公司Terminal, Caton detection method, device and game Caton detection method, device
CN106547504B (en)*2015-09-212019-08-30腾讯科技(深圳)有限公司Fluency appraisal procedure and device
CN105653407A (en)*2015-12-082016-06-08网易(杭州)网络有限公司Terminal, jam measuring method, device, game jam measuring method and apparatus
CN107079135B (en)*2016-01-292020-02-07深圳市大疆创新科技有限公司Video data transmission method, system, equipment and shooting device
JP6658860B2 (en)*2016-02-242020-03-04ソニー株式会社 Signal processing device, signal processing method, and program
CN105912444A (en)*2016-04-292016-08-31网易(杭州)网络有限公司Refresh rate testing method and device of picture change of mobile terminal game screen
CN106371786B (en)*2016-08-312019-04-30福建省天奕网络科技有限公司A kind of method and system of frame per second dynamic acquisition
CN109656645A (en)*2017-10-112019-04-19阿里巴巴集团控股有限公司Presentation time determines the determination method and device of method and page rendering deadline
CN107800989B (en)*2017-10-162021-01-05深圳市天视通电子科技有限公司Video display method and system based on dynamic frame rate detection and network video recorder
CN107864378A (en)*2017-11-102018-03-30维沃移动通信有限公司A kind of frame rate detection method, device, mobile terminal and server
CN113259654B (en)*2020-02-102023-01-20北京达佳互联信息技术有限公司Video frame rate detection method and device, electronic equipment and storage medium
CN111461044B (en)*2020-04-072021-01-08北京波谱华光科技有限公司Video synthesis method, system and computer storage medium
CN112206508A (en)2020-09-252021-01-12腾讯科技(深圳)有限公司Image detection method and device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101217573A (en)*2007-12-292008-07-09厦门大学 A Method of Accelerating Network Card Packet Capture
CN102956208A (en)*2011-08-232013-03-06华为技术有限公司Method, device and system for counting image frame rates of terminal
CN102968971A (en)*2012-11-082013-03-13京东方科技集团股份有限公司Liquid crystal display driving method, time sequence control device and liquid crystal display device
CN103037216A (en)*2011-10-042013-04-10索尼公司Image processing apparatus and method, program and recording medium
CN103108169A (en)*2013-02-272013-05-15Tcl通讯(宁波)有限公司Mobile terminal which display video frame rate in real time and achieving method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2006115470A (en)*2004-09-162006-04-27Ntt Docomo Inc Video evaluation device, frame rate determination device, video processing device, video evaluation method, and video evaluation program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101217573A (en)*2007-12-292008-07-09厦门大学 A Method of Accelerating Network Card Packet Capture
CN102956208A (en)*2011-08-232013-03-06华为技术有限公司Method, device and system for counting image frame rates of terminal
CN103037216A (en)*2011-10-042013-04-10索尼公司Image processing apparatus and method, program and recording medium
CN102968971A (en)*2012-11-082013-03-13京东方科技集团股份有限公司Liquid crystal display driving method, time sequence control device and liquid crystal display device
CN103108169A (en)*2013-02-272013-05-15Tcl通讯(宁波)有限公司Mobile terminal which display video frame rate in real time and achieving method thereof

Also Published As

Publication numberPublication date
CN104166614A (en)2014-11-26

Similar Documents

PublicationPublication DateTitle
CN104166614B (en)The frame per second detection method and relevant apparatus of a kind of mobile device
CN103473011B (en)A kind of mobile terminal performance detection method, device and mobile terminal
CN109828688A (en)Screen damage processing method, mobile terminal and computer readable storage medium
CN107450841B (en)Interactive object control method and device
CN104159140B (en)A kind of methods, devices and systems of Video processing
CN103455407A (en)Mobile terminal CPU (Central Processing Unit) occupation rate monitoring method and device and mobile terminal
CN104699501B (en)A kind of method and device for running application program
CN104965642B (en)Drop-down list generation method and device
CN104571529A (en)Application wake method and mobile terminal
CN109270986A (en)Flexible screen terminal and its display methods and computer readable storage medium
CN109788136A (en) Information display method and mobile terminal
CN109739394A (en) A kind of processing method of SAR value, mobile terminal
CN107231201A (en)Alleviate method and electronic equipment of the display screen to antenna interference
CN104820546B (en)Function information methods of exhibiting and device
CN106155888A (en)The detection method of webpage loading performance and device in a kind of Mobile solution
CN109561192A (en)A kind of antenna fault detection method and device
CN104123210B (en)Test the method, apparatus and system of browser performance
CN107562303A (en)Element motion control method and device in display interface
CN107632985A (en)Webpage preloads method and device
CN106709856A (en)Graphic rendering method and related equipment
CN110096213A (en)Terminal operation method, mobile terminal and readable storage medium storing program for executing based on gesture
CN109189538A (en)Method and device for sending directional red packet
CN106412250B (en)Fall counting method and device
CN108234760A (en)Athletic posture recognition methods, mobile terminal and computer readable storage medium
US20150070360A1 (en)Method and mobile terminal for drawing sliding trace

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
EXSBDecision made by sipo to initiate substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp