CN104461520B - The broadcasting frame frequency method of adjustment and device of animation - Google Patents

The broadcasting frame frequency method of adjustment and device of animation Download PDF

Info

Publication number
CN104461520B
CN104461520B CN201410693048.5A CN201410693048A CN104461520B CN 104461520 B CN104461520 B CN 104461520B CN 201410693048 A CN201410693048 A CN 201410693048A CN 104461520 B CN104461520 B CN 104461520B
Authority
CN
China
Prior art keywords
animation
frame frequency
playing
cpu usage
played
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
CN201410693048.5A
Other languages
Chinese (zh)
Other versions
CN104461520A (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.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201410693048.5A priority Critical patent/CN104461520B/en
Publication of CN104461520A publication Critical patent/CN104461520A/en
Application granted granted Critical
Publication of CN104461520B publication Critical patent/CN104461520B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses the broadcasting frame frequency method of adjustment and device of a kind of animation, belong to network technique field.Method includes:Obtain the currently playing frame frequency of animation;The first CPU usage during playing animation is determined according to currently playing frame frequency;When the first CPU usage is not less than the first predetermined threshold value, according to the follow-up play frame frequency of the whole animation of designated frame frequency modulation.Currently playing frame frequency of the invention by obtaining animation, the first CPU usage during playing animation is determined according to currently playing frame frequency, when the first CPU usage is not less than the first predetermined threshold value, according to the whole follow-up play frame frequency of designated frame frequency modulation.Because CPU usage when playing fluency and broadcasting frame frequency and playing animation of animation is closely related, when again due to specify frame frequency playing animation, animation plays smoother, and when playing smoother, CPU usage is relatively low, therefore, according to the follow-up play frame frequency of the whole animation of designated frame frequency modulation, CPU usage when not only can guarantee that the broadcasting fluency of animation, and reducing playing animation.

Description

The broadcasting frame frequency method of adjustment and device of animation
Technical field
The present invention relates to network technique field, the broadcasting frame frequency method of adjustment and device of more particularly to a kind of animation.
Background technology
With developing rapidly for network technology, broadcasting fluency of the people to animation requires more and more higher.The broadcasting of animation It is closely related that fluency with it plays frame frequency.Wherein, the number of image frames that frame frequency refers to playing animation each second is played.When animation When the industrywide standard of broadcasting frame frequency close to animation plays frame frequency, animation can play must be than smoother.
In addition, animation plays fluency and CPU (Central Processing Unit, the centre during playing animation Manage device) utilization rate is closely related.When CPU usage is not high, animation can play must be than smoother;When CPU usage compares Gao Shi, animation play not smooth.When CPU usage when playing animation is higher, it will influence animation playing facility Operating rate.
The relation between CPU usage when frame frequency, animation broadcasting fluency and playing animation are played with reference to above-mentioned animation, CPU utilization rate and the operating rate of playback equipment during in order to ensure the fluency of animation broadcasting, playing animation is, it is necessary in real time Adjust the broadcasting frame frequency of animation.
The content of the invention
In order to solve the problems, such as correlation technique, the embodiments of the invention provide a kind of broadcasting frame frequency method of adjustment of animation and Device.The technical scheme is as follows:
First aspect, there is provided a kind of broadcasting frame frequency method of adjustment of animation, methods described include:
Number of image frames in duration is being specified according to animation, is obtaining the currently playing frame frequency of the animation, the animation is SWF (Shockwave Flash, shock wave Flash) file format;
According to the currently playing frame frequency, mapping relations are inquired about, will central processing corresponding with the currently playing frame frequency For device CPU usage as the first CPU usage, the mapping relations are to play the mapping between frame frequency and the CPU usage Relation;
When first CPU usage is not less than the first predetermined threshold value, according to specified frame frequency, after adjusting the animation Frame frequency is put in continued broadcasting.
It is a length of described dynamic when described specified with reference in a first aspect, in the first possible implementation of first aspect The total duration of picture, described image frame number are the image totalframes that the animation includes, described to be specified according to animation in duration Number of image frames, the currently playing frame frequency of the animation is obtained, including:
According to the total duration of the animation and described image totalframes, calculate the animation first averagely plays frame frequency, Described first is averagely played frame frequency as the currently playing frame frequency.
It is a length of described dynamic when described specified with reference in a first aspect, in second of possible implementation of first aspect The played duration drawn, described image frame number is played number of image frames, described to specify the picture frame in duration according to animation Number, the currently playing frame frequency of the animation is obtained, including:
In animation playing process, the played duration of the animation and played number of image frames are obtained;
According to the played duration and the played number of image frames, calculate the animation second averagely plays frame Frequently, described second is averagely played frame frequency as the currently playing frame frequency.
With reference in a first aspect, in the 4th kind of possible implementation of first aspect, the basis specifies frame frequency, adjustment The follow-up play frame frequency of the animation, including:
According to specified frame frequency, the follow-up play frame frequency of the animation is adjusted to the difference between the specified frame frequency not Less than the second predetermined threshold value.
With reference in a first aspect, in the 5th kind of possible implementation of first aspect, the basis specifies frame frequency, adjustment After the follow-up play frame frequency of the animation, in addition to:
It is determined that the second CPU usage when the animation is played with the follow-up play frame frequency;
When second CPU usage is not less than first predetermined threshold value, perform according to specifying frame frequency, described in adjustment The step of follow-up play frame frequency of animation, until CPU usage when playing the animation is not less than first predetermined threshold value.
Second aspect, there is provided a kind of broadcasting frame frequency adjusting apparatus of animation, described device include:
First acquisition module, for specifying the number of image frames in duration according to animation, obtain the current of the animation and broadcast Frame frequency is put, the animation is SWF file format;
Second acquisition module, for obtaining the mapping relations between broadcasting frame frequency and CPU usage;
First determining module, for according to the currently playing frame frequency, inquiring about the mapping relations, will currently be broadcast with described CPU usage corresponding to frame frequency is put as the first CPU usage;Adjusting module, for being not less than when first CPU usage During the first predetermined threshold value, according to specified frame frequency, the follow-up play frame frequency of the animation is adjusted.
It is a length of described dynamic when described specified in the first possible implementation of second aspect with reference to second aspect The total duration of picture, the image totalframes that described image frame number includes for the animation, first acquisition module, for according to institute The total duration and described image totalframes of animation are stated, calculate the animation first averagely plays frame frequency, and described first is averaged Frame frequency is played as the currently playing frame frequency.
It is a length of described dynamic when described specified in second of possible implementation of second aspect with reference to second aspect The played duration drawn, described image frame number are that played number of image frames, first acquisition module, for being played in animation Cheng Zhong, obtain the played duration of the animation and played number of image frames;According to the played duration and described played Number of image frames, calculate the animation second averagely play frame frequency, described second are averagely played frame frequency and are currently broadcast as described Put frame frequency.
With reference to second aspect, in the 4th kind of possible implementation of second aspect, the adjusting module, for basis Frame frequency is specified, the follow-up play frame frequency of the animation is adjusted to the difference between the specified frame frequency and preset not less than second Threshold value.
With reference to second aspect, in the 5th kind of possible implementation of second aspect, described device also includes:
Second determining module, for determining the second CPU usage when the animation is played with the follow-up play frame frequency;
The adjusting module, for when second CPU usage is not less than first predetermined threshold value, performing basis Frame frequency, the step of adjusting the follow-up play frame frequency of the animation are specified, until CPU usage when playing the animation is not less than First predetermined threshold value.
The third aspect, there is provided a kind of computer-readable recording medium, be stored with the computer-readable recording medium Program, described program are used to perform method as described in relation to the first aspect.
The beneficial effect that technical scheme provided in an embodiment of the present invention is brought is:
By obtaining the currently playing frame frequency of animation, and according to currently playing frame frequency, determine the first CPU during playing animation Utilization rate, when the first CPU usage is not less than the first predetermined threshold value, according to specified frame frequency, adjust the follow-up play frame of animation Frequently.Because CPU usage when playing fluency and playing frame frequency and playing animation of animation is closely related, and due to specified During frame frequency playing animation, animation can play must than smoother, and when animation can play must than it is smoother when, CPU usage Compare relatively low, therefore, according to specified frame frequency, adjust the follow-up play frame frequency of animation, the broadcasting stream of animation can not only be ensured Smooth degree, and CPU usage during relative reduction animation playing facility playing animation, and then improve animation playing facility Operational efficiency.
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 embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing.
Fig. 1 is a kind of flow chart of the broadcasting frame frequency method of adjustment for animation that one embodiment of the invention provides;
Fig. 2 is a kind of flow chart of the broadcasting frame frequency method of adjustment for animation that another embodiment of the present invention provides;
Fig. 3 is a kind of structural representation of the broadcasting frame frequency adjusting apparatus for animation that another embodiment of the present invention provides;
Fig. 4 is a kind of structural representation of the broadcasting frame frequency adjusting apparatus for animation that another embodiment of the present invention provides;
Fig. 5 is a kind of structural representation of the broadcasting frame frequency adjusting apparatus for animation that another embodiment of the present invention provides.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention Formula is described in further detail.
Animation generally includes the number of image frames of certain numerical value, when making animation, while can set the broadcasting of the animation Frame frequency.Animation playing facility is in playing animation, due to other application journey that may simultaneously also in operation in addition to playing animation Sequence, so as to cause the CPU usage of animation playing facility higher, now, animation playing facility can not broadcasting according to setting Put frame frequency and play the animation, but actual play frame frequency is smaller than the broadcasting frame frequency of setting.For example, the broadcasting frame frequency set is 24 Frame/second, and actual play frame frequency is 18 frames/second.Now, because the actual play frame frequency of animation is less than the broadcasting frame frequency set, Slack situation will occurs in the process of playing animation.Slack problem is played in order to solve animation, while can be relative CPU usage during playing animation is reduced, the embodiments of the invention provide a kind of broadcasting frame frequency method of adjustment of animation.
With reference to the above, Fig. 1 is a kind of broadcasting frame frequency method of adjustment of the animation provided according to an exemplary embodiment Flow chart.As shown in figure 1, method flow provided in an embodiment of the present invention includes:
101st, the number of image frames in duration is being specified according to animation, is obtaining the currently playing frame frequency of animation, wherein, animation is SWF file format.
102nd, according to currently playing frame frequency, the first CPU usage during playing animation is determined.
103rd, when the first CPU usage is not less than the first predetermined threshold value, according to specified frame frequency, the rear continued broadcasting of animation is adjusted Put frame frequency.
Method provided in an embodiment of the present invention, by obtaining the currently playing frame frequency of animation, and according to currently playing frame frequency, The first CPU usage during playing animation is determined, when the first CPU usage is not less than the first predetermined threshold value, according to designated frame Frequently, the follow-up play frame frequency of animation is adjusted.Because CPU when playing fluency with playing frame frequency and playing animation of animation is used Rate is closely related, and during due to specifying frame frequency playing animation, animation, which can play, can be played than smoother, and when animation Must than it is smoother when, CPU usage compares relatively low, therefore, according to specified frame frequency, adjusts the follow-up play frame frequency of animation, no It can only ensure the broadcasting fluency of animation, and CPU usage during relative reduction animation playing facility playing animation, enter And improve the operational efficiency of animation playing facility.
Alternatively, the total duration of a length of animation when specifying, number of image frames is the image totalframes that animation includes, according to animation The number of image frames in duration is being specified, is obtaining the currently playing frame frequency of animation, including:
According to the total duration of animation and image totalframes, calculate animation first averagely plays frame frequency, and first is averagely broadcast Frame frequency is put as currently playing frame frequency.
Alternatively, the played duration of a length of animation when specifying, number of image frames are played number of image frames, are existed according to animation The number of image frames in duration is specified, obtains the currently playing frame frequency of animation, including:
In animation playing process, the played duration of animation and played number of image frames are obtained;
According to played duration and played number of image frames, calculate animation second averagely plays frame frequency, and second is averaged Frame frequency is played as currently playing frame frequency.
Alternatively, according to currently playing frame frequency, before the first CPU usage when determining playing animation, in addition to:
Obtain the mapping relations between broadcasting frame frequency and CPU usage;
According to currently playing frame frequency, the first CPU usage during playing animation is determined, including:
According to currently playing frame frequency, inquire about mapping relations, will CPU usage corresponding with currently playing frame frequency as first CPU usage.
Alternatively, according to specified frame frequency, the follow-up play frame frequency of animation is adjusted, including:
According to specified frame frequency, the follow-up play frame frequency of animation is adjusted to the difference between specified frame frequency and is not less than second Predetermined threshold value.
Alternatively, according to specified frame frequency, after the follow-up play frame frequency for adjusting animation, in addition to:
It is determined that with the second CPU usage during follow-up play frame frequency playing animation;
When the second CPU usage is not less than the first predetermined threshold value, performs according to frame frequency is specified, adjust the rear continued broadcasting of animation The step of putting frame frequency, until CPU usage during playing animation is not less than the first predetermined threshold value.
Above-mentioned all optional technical schemes, any combination can be used to form the alternative embodiment of the present invention, herein no longer Repeat one by one.
The content of embodiment with reference to corresponding to Fig. 1, Fig. 2 are a kind of broadcastings of the animation provided according to an exemplary embodiment The flow chart of frame frequency method of adjustment.As shown in Fig. 2 method flow provided in an embodiment of the present invention includes:
201st, the number of image frames in duration is being specified according to animation, is obtaining the currently playing frame frequency of animation, animation is SWF texts Part form.
The number of image frames refers to the amount of images that animation within a specified time plays.Animation is SWF file format, and it can be with Including Flash animations, the video of SWF file format, SWF file format film etc..
In order to determine the relation between the currently playing frame frequency of animation and its broadcasting frame frequency set, it is necessary to be existed according to animation The number of image frames in duration is specified, obtains the currently playing frame frequency of animation., in embodiments of the present invention, will for the ease of description When playing the broadcasting frame frequency set for animation to be defined as specifying frame frequency, and frame frequency is played for cartoon setting, often according to marking in the industry Standard realizes that the standard frame frequency for specifying frame frequency to be played for animation in the industry, it is 24 frames/second such as to specify frame frequency.
The embodiment of the present invention is not defined to the concrete numerical value for specifying duration, and it can be the total of the animation that this, which specifies duration, Duration, i.e., from the time interval commenced play out when the animation to end plays the animation;It can also be animation that this, which specifies duration, Played duration, one section of duration as in animation playing process, for example, a length of from the animation is commenced play out to broadcasting when specifying Time interval during the half number of image frames of the animation.
When specifying during a length of different numerical value, number of image frames is also different numerical value.For example, a length of when specified, this is dynamic During the total duration of picture, number of image frames is the image totalframes that the animation includes;When specifying during the played duration of a length of animation, Number of image frames is played number of image frames corresponding to the played duration.
Further, when a length of different numerical value, number of image frames are also different numerical value when specified, specified according to animation Number of image frames in duration, when obtaining the currently playing frame frequency of animation, including but not limited to realized by the following two kinds mode:
First way:When specifying, the total duration of a length of animation, number of image frames are the image totalframes that the animation includes When, can be according to the total duration and image totalframes of animation, calculate animation first averagely plays frame frequency, and this first is averagely broadcast Frame frequency is put as currently playing frame frequency.
For example, if total animation duration is 20s (second), the totalframes of the animation is 360 frames, then according to the total duration of animation And image totalframes, the first average frame frequency of the animation being calculated is 18 frames/second.Now, determine that the current of the animation is broadcast It is 18 frames/second to put frame frequency.
The second way:, can when when specifying, the played duration of a length of animation, number of image frames are played number of image frames In animation playing process, to obtain the played duration of animation and played number of image frames, according to played duration and broadcast Number of image frames is put, calculate animation second averagely plays frame frequency, second is averagely played frame frequency as currently playing frame frequency.
If for example, the animation got during animation plays it is played when a length of 10s, played frame frequency be 200 frames, then according to played duration and played number of image frames, it is 20 frames/second that second be calculated, which averagely plays frame frequency, this When, the currently playing frame frequency for determining the animation is 20 frames/second.
Further, in animation playing process, when obtaining the played duration of animation and played number of image frames, may be used also To choose played default value section playing duration, and count the played number of image frames in every section of playing duration.Now, exist When calculating the second of animation and averagely playing frame frequency, played number of image frames that can first according to animation in every section of playing duration, The average broadcasting frame number in every section of playing duration is calculated, and according to the average broadcasting frame number in default value section, it is flat to calculate second Play frame frequency.
For example, choosing 3 sections of played playing durations, 3 sections of playing durations are respectively 5s, 8s and 10s, and this 3 sections are broadcast It is respectively 90 frames, 160 frames and 190 frames to put the played number of image frames in duration, then this three sections average broadcasting being calculated Frame frequency is 18 frames/second, 20 frames/second and 19 frames/second.Further, according to the average broadcasting frame number in this 3 sections, it is calculated Second averagely broadcasting frame number is (18+20+19)/3=19 frames/second.
202nd, the mapping relations between CPU usage when playing frame frequency and playing animation are obtained.
Generally, during CPU usage difference when playing animation, animation can be played out with different broadcasting frame frequencies.Example Such as, the CPU usage when playing animation than it is relatively low when, e.g., when CPU usage during playing animation is 10%, animation can To specify frame frequency to play out, as animation can be played out with the broadcasting frame frequency of 24 frames/second;CPU when playing animation is used When rate is bigger, when CPU usage during such as playing animation is 30%, the broadcasting frame frequency of animation, which is less than, specifies frame frequency, such as animation It can be played out with the broadcasting frame frequency of 18 frames/second.That is, animation plays frame frequency and CPU usage during playing animation Between have certain mapping relations.In order to determine CPU usage corresponding to currently playing frame frequency, can first obtain play frame frequency with The mapping relations between CPU usage during playing animation, and subsequently determine playing animation when CPU when utilization rate when, root Realized according to the mapping relations.
, it is necessary to pre-establish before the mapping relations between obtaining CPU usage when playing frame frequency and playing animation The mapping relations between CPU usage when playing frame frequency and playing animation.Wherein, the broadcasting frame frequency pre-established is dynamic with playing The mapping relations between CPU usage during picture, including but not limited to as shown in Table 1.Wherein, in Table 1, play frame frequency with Utilization rate is one-to-one relationship during CPU during playing animation.
Table one
Play frame frequency Utilization rate during CPU during playing animation
18 frames/second 40%
20 frames/second 30%
…… ……
24 frames/second 10%
Certainly, the numeral in above-mentioned table one is only used for illustrating, and does not form the limitation to the embodiment of the present invention.
In addition, that establishes plays the mapping relations between frame frequency and CPU usage during playing animation, can also be such as table Form shown in two:
Table two
Play frame frequency Utilization rate during CPU during playing animation
16-18 frames/second 40%
19-21 frames/second 30%
…… ……
21-24 frames/second 10%
Certainly, the numeral in above-mentioned table two is also only used for illustrating, and does not form the limitation to the embodiment of the present invention.In table two In, between utilization rate it is many-to-one relation when playing frame frequency and CPU during playing animation, i.e., is a certain scope when playing frame frequency When, correspond to a CPU usage during playing animation.
203rd, according to currently playing frame frequency, mapping relations are inquired about, will CPU usage conduct corresponding with currently playing frame frequency First CPU usage.
The step is the specific implementation of the first CPU usage when determining playing animation according to currently playing frame frequency. Specifically, after the mapping relations when having pre-established CPU when playing frame frequency and playing animation between utilization rate, it is determined that working as Corresponding to preceding broadcasting frame frequency during the first CPU usage, it can be realized according to the mapping relations.For example, it can be somebody's turn to do by inquiry Mapping relations, will CPU usage corresponding with currently playing frame frequency as the first CPU usage.
, can be by the broadcasting frame in currently playing frame frequency and mapping relations when inquiring about mapping relations in currently playing frame frequency Frequency is compared one by one, using CPU usage corresponding to preceding broadcasting frame frequency in mapping relations as the first CPU usage.
Such as, if currently playing frame frequency is 18 frames/second, and when playing frame frequency and CPU during playing animation between utilization rate Mapping relations as shown in Table 1, then can by currently playing 18 frames of frame frequency/second with it is each in the mapping relations shown in table one Frame frequency is played to be compared, using corresponding to 18 frames in mapping relations/second during CPU during playing animation utilization rate 40% as first CPU usage.
In another example if currently playing frame frequency is 18 frames/second, and utilization rate during CPU when playing frame frequency and playing animation Between mapping relations as shown in Table 2, then by currently playing 18 frames of frame frequency/second with it is each in the mapping relations shown in table two Play frame frequency to be compared, because 18 frames/second belongs to this frame frequency scope of 16-18 frames/second, therefore, by currently playing frame frequency 18 CPU usage 40% corresponding to frame/second during playing animation is used as the first CPU usage.
204th, when the first CPU usage is not less than the first predetermined threshold value, according to specified frame frequency, the rear continued broadcasting of animation is adjusted Put frame frequency.
First predetermined threshold value be playing animation than it is smoother when CPU usage.For example, if playing animation is than smoother When CPU usage be 10%, then first predetermined threshold value be 10%.
, can be by the first CPU usage and after determining the first CPU usage in the currently playing frame frequency according to animation One predetermined threshold value is compared.When the first CPU usage is not less than the first predetermined threshold value, by the follow-up play for adjusting animation CPU usage when frame frequency is to adjust playing animation.In addition, when the first CPU usage is more than the first predetermined threshold value, illustrate this When animation be still able to play the follow-up play frame frequency that than smoother, now must need not temporarily adjust animation.
When being not less than the first predetermined threshold value in the first CPU usage, broadcast by the broadcasting frame frequency for adjusting animation to adjust Put CPU usage during animation, it can be ensured that the broadcasting frame frequency for adjusting animation realized based on the first predetermined threshold value, from And can avoid when the first CPU usage is less than the first predetermined threshold value, because blindness is made by adjusting the broadcasting frame frequency of animation Into unnecessary operation.
Wherein, because when to specify frame frequency playing animation, animation can play must be than smoother, therefore, can basis Frame frequency is specified, adjusts the follow-up play frame frequency of animation.Specifically, can be according to specified frame frequency, by the follow-up play frame frequency of animation Adjust to the difference between specified frame frequency and be not less than the second predetermined threshold value.
On the concrete numerical value of the second predetermined threshold value, the embodiment of the present invention is not especially limited.It is however, in order that follow-up dynamic Picture, which can play, to be adjusted follow-up play frame frequency to closer to better, therefore, this is second default with specified frame frequency than smoother Threshold value is the smaller the better.
For example, if currently playing frame frequency is 18 frames/second, it is 24 frames/second to specify frame frequency, then adjusts currently playing frame frequency Extremely with 24 frames/second closer to better.
In addition, on according to frame frequency is specified, adjusting the specific implementation of the follow-up play frame frequency of animation, including it is but unlimited In each image included by optimizing animation.For example, change each image, render each image etc. again.
205th, determine with the second CPU usage during follow-up play frame frequency playing animation, when the second CPU usage is not less than During the first predetermined threshold value, continue according to specifying frame frequency, the step of adjusting the follow-up play frame frequency of animation, until during playing animation CPU usage is not less than the first predetermined threshold value.
The step is optional step.After the follow-up play frame frequency of animation is adjusted, in order to test with the follow-up play frame frequency During playing animation, whether CPU usage during playing animation can be less than the first predetermined threshold value, it is thus necessary to determine that with follow-up play frame The second CPU usage during frequency playing animation.
In a manner of determining the second CPU usage when follow-up play frame frequency playing animation, and continue according to finger Framing frequency, adjusts the mode of the follow-up play frame frequency of animation, may refer to above-mentioned steps 201 to the content in step 204, herein Repeat no more.
Method provided in an embodiment of the present invention, by obtaining the currently playing frame frequency of animation, and according to currently playing frame frequency, The first CPU usage during playing animation is determined, when the first CPU usage is not less than the first predetermined threshold value, according to designated frame Frequently, the follow-up play frame frequency of animation is adjusted.Because CPU when playing fluency with playing frame frequency and playing animation of animation is used Rate is closely related, and during due to specifying frame frequency playing animation, animation, which can play, can be played than smoother, and when animation Must than it is smoother when, CPU usage compares relatively low, therefore, according to specified frame frequency, adjusts the follow-up play frame frequency of animation, no It can only ensure the broadcasting fluency of animation, and CPU usage during relative reduction animation playing facility playing animation, enter And improve the operational efficiency of animation playing facility.
Fig. 3 is a kind of structural representation of the broadcasting frame frequency adjusting apparatus of the animation provided according to an exemplary embodiment, The device is used for the broadcasting frame frequency method of adjustment for the animation for specifying embodiment corresponding to above-mentioned Fig. 1 or Fig. 2 to provide.As shown in figure 3, The broadcasting frame frequency adjusting apparatus of the animation includes:
First acquisition module 301, for specifying the number of image frames in duration according to animation, obtain the currently playing of animation Frame frequency, wherein, animation is SWF file format;
First determining module 302, for according to currently playing frame frequency, determining the first central processing unit during playing animation CPU usage;
Adjusting module 303, for when the first CPU usage is not less than the first predetermined threshold value, according to specified frame frequency, adjusting The follow-up play frame frequency of animation.
Device provided in an embodiment of the present invention, by obtaining the currently playing frame frequency of animation, and according to currently playing frame frequency, The first CPU usage during playing animation is determined, when the first CPU usage is not less than the first predetermined threshold value, according to designated frame Frequently, the follow-up play frame frequency of animation is adjusted.Because CPU when playing fluency with playing frame frequency and playing animation of animation is used Rate is closely related, and during due to specifying frame frequency playing animation, animation, which can play, can be played than smoother, and when animation Must than it is smoother when, CPU usage compares relatively low, therefore, according to specified frame frequency, adjusts the follow-up play frame frequency of animation, no It can only ensure the broadcasting fluency of animation, and CPU usage during relative reduction animation playing facility playing animation, enter And improve the operational efficiency of animation playing facility.
Alternatively, the total duration of a length of animation when specifying, number of image frames are the image totalframes that animation includes, and first obtains Module 301, for the total duration according to animation and image totalframes, calculate animation first averagely plays frame frequency, flat by first Frame frequency is played as currently playing frame frequency.
Alternatively, the played duration of a length of animation when specifying, number of image frames are played number of image frames, and first obtains mould Block 301, for the played duration in animation playing process, obtaining animation and played number of image frames;According to it is played when Long and played number of image frames, calculate animation second averagely play frame frequency, second are averagely played frame frequency as currently playing Frame frequency.
Alternatively, also include referring to Fig. 4, the broadcasting frame frequency adjusting apparatus of animation:
Second acquisition module 304, for obtaining the mapping relations between broadcasting frame frequency and CPU usage;
First determining module 302, for according to currently playing frame frequency, inquiry mapping relations will be with currently playing frame frequency pair The CPU usage answered is as the first CPU usage.
Alternatively, adjusting module 303, for according to frame frequency is specified, the follow-up play frame frequency of animation to be adjusted to specifying Difference between frame frequency is not less than the second predetermined threshold value.
Alternatively, also include referring to Fig. 5, the broadcasting frame frequency adjusting apparatus of animation:
Second determining module 305, for determining with the second CPU usage during follow-up play frame frequency playing animation;
Adjusting module 303, for when the second CPU usage is not less than the first predetermined threshold value, performing according to specified frame frequency, The step of adjusting the follow-up play frame frequency of animation, until CPU usage during playing animation is not less than the first predetermined threshold value.
Above-mentioned all optional technical schemes, any combination can be used to form the alternative embodiment of the present invention, herein no longer Repeat one by one.
It should be noted that:The animation that above-described embodiment provides plays broadcasting frame of the frame frequency adjusting apparatus in adjustment animation , can be as needed and by above-mentioned function only with the division progress of above-mentioned each functional module for example, in practical application during frequency Distribution is completed by different functional modules, i.e., the internal structure of device is divided into different functional modules, to complete to retouch above The all or part of function of stating.In addition, the broadcasting for playing frame frequency adjusting apparatus and animation for the animation that above-described embodiment provides Frame frequency method of adjustment embodiment belongs to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodiment To complete, by program the hardware of correlation can also be instructed to complete, described program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent substitution and improvements made etc., it should be included in the scope of the protection.

Claims (11)

1. the broadcasting frame frequency method of adjustment of a kind of animation, it is characterised in that methods described includes:
Number of image frames in duration is being specified according to animation, is obtaining the currently playing frame frequency of the animation, the animation is impact Ripple Flash SWF file formats;
According to the currently playing frame frequency, mapping relations are inquired about, will central processor CPU corresponding with the currently playing frame frequency For utilization rate as the first CPU usage, the mapping relations are to play the mapping relations between frame frequency and the CPU usage;
When first CPU usage is not less than the first predetermined threshold value, according to specified frame frequency, the rear continued broadcasting of the animation is adjusted Put frame frequency.
2. according to the method for claim 1, it is characterised in that the total duration of a length of animation when described specified, it is described Number of image frames is the image totalframes that the animation includes, described to specify the number of image frames in duration according to animation, obtains institute The currently playing frame frequency of animation is stated, including:
According to the total duration of the animation and described image totalframes, calculate the animation first averagely plays frame frequency, by institute State first and averagely play frame frequency as the currently playing frame frequency.
3. according to the method for claim 1, it is characterised in that the played duration of a length of animation when described specified, Described image frame number is played number of image frames, described to specify the number of image frames in duration according to animation, obtains the animation Currently playing frame frequency, including:
In animation playing process, the played duration of the animation and played number of image frames are obtained;
According to the played duration and the played number of image frames, calculate the second of the animation and averagely play frame frequency, will Described second averagely plays frame frequency as the currently playing frame frequency.
4. according to the method for claim 1, it is characterised in that the basis specifies frame frequency, adjusts the follow-up of the animation Frame frequency is played, including:
According to specified frame frequency, the follow-up play frame frequency of the animation is adjusted to the difference between the specified frame frequency and is not less than Second predetermined threshold value.
5. according to the method for claim 1, it is characterised in that the basis specifies frame frequency, adjusts the follow-up of the animation After playing frame frequency, in addition to:
It is determined that the second CPU usage when the animation is played with the follow-up play frame frequency;
When second CPU usage is not less than first predetermined threshold value, performs according to frame frequency is specified, adjust the animation Follow-up play frame frequency the step of, until play the animation when CPU usage be less than first predetermined threshold value.
6. the broadcasting frame frequency adjusting apparatus of a kind of animation, it is characterised in that described device includes:
First acquisition module, for specifying the number of image frames in duration according to animation, obtain the currently playing frame of the animation Frequently, the animation is shock wave Flash SWF file formats;
Second acquisition module, for obtaining the mapping relations between broadcasting frame frequency and CPU usage;
First determining module, will be with the currently playing frame for according to the currently playing frame frequency, inquiring about the mapping relations CPU usage corresponding to frequency is as the first CPU usage;
Adjusting module, for when first CPU usage is not less than the first predetermined threshold value, according to specified frame frequency, adjusting institute State the follow-up play frame frequency of animation.
7. device according to claim 6, it is characterised in that the total duration of a length of animation when described specified, it is described The image totalframes that number of image frames includes for the animation, first acquisition module, for the total duration according to the animation And described image totalframes, calculate the animation first averagely play frame frequency, described first is averagely played frame frequency as institute State currently playing frame frequency.
8. device according to claim 6, it is characterised in that the played duration of a length of animation when described specified, Described image frame number is played number of image frames, and first acquisition module is described dynamic in animation playing process, obtaining The played duration drawn and played number of image frames;According to the played duration and the played number of image frames, institute is calculated State animation second averagely plays frame frequency, described second is averagely played frame frequency as the currently playing frame frequency.
9. device according to claim 6, it is characterised in that the adjusting module, frame frequency is specified for basis, by described in The follow-up play frame frequency of animation, which is adjusted to the difference between the specified frame frequency, is not less than the second predetermined threshold value.
10. device according to claim 6, it is characterised in that described device also includes:
Second determining module, for determining the second CPU usage when the animation is played with the follow-up play frame frequency;
The adjusting module, for when second CPU usage is not less than first predetermined threshold value, performing according to specified Frame frequency, the step of adjusting the follow-up play frame frequency of the animation, until CPU usage when playing the animation is less than described the One predetermined threshold value.
A kind of 11. computer-readable recording medium, it is characterised in that had program stored therein in the computer-readable recording medium, Described program is used to perform the method as described in any one of claim 1 to 5.
CN201410693048.5A 2014-11-25 2014-11-25 The broadcasting frame frequency method of adjustment and device of animation Active CN104461520B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410693048.5A CN104461520B (en) 2014-11-25 2014-11-25 The broadcasting frame frequency method of adjustment and device of animation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410693048.5A CN104461520B (en) 2014-11-25 2014-11-25 The broadcasting frame frequency method of adjustment and device of animation

Publications (2)

Publication Number Publication Date
CN104461520A CN104461520A (en) 2015-03-25
CN104461520B true CN104461520B (en) 2018-04-03

Family

ID=52907631

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410693048.5A Active CN104461520B (en) 2014-11-25 2014-11-25 The broadcasting frame frequency method of adjustment and device of animation

Country Status (1)

Country Link
CN (1) CN104461520B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049914B (en) * 2015-07-07 2019-02-26 深圳Tcl数字技术有限公司 Picture frame playing method and device
CN105491448B (en) * 2015-12-07 2018-11-23 广州华多网络科技有限公司 A kind of animation data playback method and device
CN106211511A (en) * 2016-07-25 2016-12-07 青岛海信电器股份有限公司 The method of adjustment of horse race lamp rolling speed and display device
WO2018076659A1 (en) * 2016-10-31 2018-05-03 Huawei Technologies Co., Ltd. Backup optimization based dynamic resource feedback
CN106775811A (en) * 2016-11-17 2017-05-31 Tcl集团股份有限公司 A kind of animation playing method and device
CN106814936A (en) * 2017-01-13 2017-06-09 奇酷互联网络科技(深圳)有限公司 The processing method and mobile terminal of a kind of windows exchange animation
CN107398072B (en) * 2017-07-24 2019-01-08 腾讯科技(深圳)有限公司 The display methods and device of game picture
CN107819947B (en) * 2017-10-31 2020-08-11 Oppo广东移动通信有限公司 Picture display method and device
CN109905768B (en) * 2017-12-07 2021-04-06 卓望数码技术(深圳)有限公司 Method and device for judging blocking of output video of internet television set top box
CN110399315B (en) * 2019-06-05 2021-06-08 北京梧桐车联科技有限责任公司 Voice broadcast processing method and device, terminal equipment and storage medium
CN110990601A (en) * 2019-11-13 2020-04-10 珠海格力电器股份有限公司 Image processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1673927A (en) * 2004-03-25 2005-09-28 索尼株式会社 Image decoding device, image decoding method and program
CN101106683A (en) * 2007-08-08 2008-01-16 北京中星微电子有限公司 A hardware resource self-adapted AVI file playing method
CN102171651A (en) * 2008-12-02 2011-08-31 英特尔公司 Processing of video data in resource contrained devices
CN102483855A (en) * 2010-07-15 2012-05-30 松下电器产业株式会社 Animation controller, animation control method, program, and integrated circuit

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7715481B2 (en) * 2006-11-29 2010-05-11 Ipera Technology, Inc. System and method for allocation of resources for processing video

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1673927A (en) * 2004-03-25 2005-09-28 索尼株式会社 Image decoding device, image decoding method and program
CN101106683A (en) * 2007-08-08 2008-01-16 北京中星微电子有限公司 A hardware resource self-adapted AVI file playing method
CN102171651A (en) * 2008-12-02 2011-08-31 英特尔公司 Processing of video data in resource contrained devices
CN102483855A (en) * 2010-07-15 2012-05-30 松下电器产业株式会社 Animation controller, animation control method, program, and integrated circuit

Also Published As

Publication number Publication date
CN104461520A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
CN104461520B (en) The broadcasting frame frequency method of adjustment and device of animation
US11089305B2 (en) Video frame coding method during scene change, terminal and storage medium
CN102413307B (en) Self-adaptive code rate adjustment method and device for television video chat
US8594184B2 (en) Method and apparatus for controlling video-audio data playing
US20070053606A1 (en) Techniques to improve contrast enhancement
CN108353198B (en) Method and apparatus for providing power saving media content
CN101510960B (en) Mobile phone camera shooting method and apparatus
CN110545418B (en) Self-adaptive video coding method based on scene
CN103442307B (en) The method and apparatus for playing video stream media
CN106791915A (en) A kind of method and apparatus for showing video image
CN107872669A (en) Video code rate treating method and apparatus
CN109151562B (en) Sound effect control method and device, television and storage medium
CN103780942B (en) A kind of information configuring methods and device
CN104170315A (en) Method and video gateway for allocating bandwidth
US20140205020A1 (en) Real-time transcoding method and device
WO2017048887A1 (en) Methods, systems and apparatus for playing back power saving media content
CN112929668A (en) Video coding method, device, equipment and storage medium
CN107872673A (en) A kind of method and device of Intelligent Dynamic regulation video encoder
CN105323653B (en) A kind of method and apparatus playing segment video
CN104837061B (en) A kind of video broadcasts single modification management method and device
CN105813187B (en) Information processing method and electronic equipment
CN106331847A (en) Audio and video playing method and device
CN113411587B (en) Video compression method, device and computer readable storage medium
CN111556467B (en) Mobile phone interconnection audio playing processing method
US11381938B2 (en) Method and apparatus for providing unicast-based multimedia service

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 510660 Guangzhou City, Guangzhou, Guangdong, Whampoa Avenue, No. 315, self - made 1-17

Applicant after: Guangzhou KuGou Networks Co., Ltd.

Address before: 510000 B1, building, No. 16, rhyme Road, Guangzhou, Guangdong, China 13F

Applicant before: Guangzhou KuGou Networks Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant