CN112037309A - Frame animation generation method, device, equipment and storage medium - Google Patents

Frame animation generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN112037309A
CN112037309A CN202010646024.XA CN202010646024A CN112037309A CN 112037309 A CN112037309 A CN 112037309A CN 202010646024 A CN202010646024 A CN 202010646024A CN 112037309 A CN112037309 A CN 112037309A
Authority
CN
China
Prior art keywords
frame
picture
animation
playing
processing operation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010646024.XA
Other languages
Chinese (zh)
Inventor
丁磊
吴礼庆
张子琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Human Horizons Shanghai Internet Technology Co Ltd
Original Assignee
Human Horizons Shanghai Internet 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 Human Horizons Shanghai Internet Technology Co Ltd filed Critical Human Horizons Shanghai Internet Technology Co Ltd
Priority to CN202010646024.XA priority Critical patent/CN112037309A/en
Publication of CN112037309A publication Critical patent/CN112037309A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a frame animation generation method, which comprises the following steps: responding to a frame animation generation instruction, and acquiring a plurality of frame pictures; carrying out picture processing operation on the current frame picture; the picture processing operation comprises calling an OpenGL interface to draw the current frame picture and rendering the current frame picture by a GPU; after the current frame picture is processed, calculating the processing time of the next frame; the next frame processing time is the interval time of performing picture processing operation on the next frame picture after the current frame picture is processed; and carrying out picture processing operation on the next frame of picture until the loop ending instruction is responded, and stopping the picture processing operation on the frame of picture. The invention also discloses a frame animation generating device, frame animation generating equipment and a computer readable storage medium. By adopting the embodiment of the invention, the playing platform can support the playing of the large memory picture, and the user experience is improved.

Description

Frame animation generation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer graphics, and in particular, to a method, an apparatus, a device, and a storage medium for generating a frame animation.
Background
Frame animation is a common animation form, and the principle thereof is to decompose animation actions in continuous frames, namely draw different contents on each frame of a time axis frame by frame, and continuously play the contents to form animation. The frame animation has great flexibility, can represent almost any content to be represented, is similar to the playing mode of a movie, and is very suitable for performing fine animation. The native frame animation on the playing platform can support the playing of small memory pictures, and the large memory pictures occupy more memory, so that the problem of playing the animation is blocked or the animation cannot be played normally when the memory overflows during the playing of the large memory pictures, and the user experience is low.
Disclosure of Invention
The embodiment of the invention aims to provide a frame animation generation method, a frame animation generation device, frame animation generation equipment and a storage medium, which can enable a playing platform to support playing of a large-memory picture and improve user experience.
In order to achieve the above object, an embodiment of the present invention provides a frame animation generating method, including:
responding to a frame animation generation instruction, and acquiring a plurality of frame pictures;
carrying out picture processing operation on the current frame picture; the picture processing operation comprises calling an OpenGL interface to draw the current frame picture and rendering the current frame picture by a GPU;
after the current frame picture is processed, calculating the processing time of the next frame; the next frame processing time is the interval time of performing picture processing operation on the next frame picture after the current frame picture is processed;
and carrying out picture processing operation on the next frame of picture until the loop ending instruction is responded, and stopping the picture processing operation on the frame of picture.
As an improvement of the above, the method further comprises:
dividing a plurality of frame pictures into an entry frame, an exit frame and at least one group of circulating frames; the entry frame is used for playing at the beginning stage of the frame animation once, the loop frame is used for playing in the loop of the running stage of the frame animation, and the exit frame is used for playing at the ending stage of the frame animation once.
As an improvement of the above scheme, the acquiring a plurality of frame pictures includes:
reading original data compressed into a fixed format;
and decoding the original data to obtain a plurality of decoded frame pictures.
As an improvement of the above scheme, the decoding the original data includes:
decoding the original data at a native layer; and the native layer is a local framework in the Android layer.
As an improvement of the above scheme, before the calling an OpenGL interface to draw the current frame picture, the method further includes:
setting an animation playing frame rate; the animation playing frame rate is used for defining the time required for drawing one frame of picture.
As an improvement of the above scheme, the next frame processing time is calculated by a time interpolator.
In order to achieve the above object, an embodiment of the present invention further provides a frame animation generating apparatus, including;
the data acquisition module is used for responding to a frame animation generation instruction and acquiring a plurality of frame pictures;
the picture processing module is used for carrying out picture processing operation on the current frame picture; the picture processing operation comprises calling an OpenGL interface to draw the current frame picture and rendering the current frame picture by a GPU; and the processor is also used for carrying out picture processing operation on the next frame of picture and stopping the picture processing operation on the frame of picture until a loop ending instruction is responded
The time calculation module is used for calculating the processing time of the next frame after the current frame picture is processed; and the next frame processing time is the interval time of performing picture processing operation on the next frame picture after the current frame picture is processed.
As an improvement of the above, the apparatus further comprises:
the frame picture dividing module is used for dividing a plurality of frame pictures into an entry frame, an exit frame and at least one group of circulating frames; the entry frame is used for playing at the beginning stage of the frame animation once, the loop frame is used for playing in the loop of the running stage of the frame animation, and the exit frame is used for playing at the ending stage of the frame animation once.
To achieve the above object, an embodiment of the present invention further provides a frame animation generating device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor, when executing the computer program, implements the frame animation generating method according to any one of the above embodiments.
In order to achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, a device on which the computer-readable storage medium is located is controlled to execute the frame animation generation method according to any one of the above embodiments.
Compared with the prior art, the frame animation generating method, the device, the equipment and the storage medium disclosed by the embodiment of the invention firstly respond to a frame animation generating instruction to obtain a plurality of frame pictures; then, carrying out picture processing operation on the current frame picture; after the current frame picture is processed, calculating the processing time of the next frame; and finally, carrying out picture processing operation on the next frame of picture until the loop ending instruction is responded, and stopping the picture processing operation on the frame of picture. In the process of carrying out picture processing operation on the current frame picture, the OpenGL interface is called to draw the current frame picture and the GPU is used to render the current frame picture, so that the memory of the playing platform can be saved, too many resources of the playing platform cannot be occupied, the playing platform can support playing of a large-memory picture, and the user experience is improved. In addition, multiple groups of frame animations can be managed by defining the forms of the incoming frame, the outgoing frame and the circulating frame, the incoming and outgoing animations can be supported, a user can flexibly control the playing speed of the frame animations, and the user experience is improved.
Drawings
FIG. 1 is a flow chart of a frame animation generation method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another frame animation generation method provided by the embodiment of the invention;
fig. 3 is a block diagram of a frame animation generating apparatus according to an embodiment of the present invention;
FIG. 4 is a block diagram of another frame animation generation apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of a frame animation generating apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a frame animation generation method provided in an embodiment of the present invention, where the frame animation generation method includes:
s1, responding to the frame animation generation instruction, and acquiring a plurality of frame pictures;
s2, carrying out picture processing operation on the current frame picture;
s3, after the current frame picture is processed, calculating the processing time of the next frame;
and S4, carrying out picture processing operation on the next frame picture until the loop ending instruction is responded, and stopping the picture processing operation on the frame picture.
It should be noted that the frame animation generation method according to the embodiment of the present invention is implemented by a playing platform installed on a client, and the client is preferably an android client.
Specifically, in step S1, in response to the frame animation generation instruction, execution of animation is started at this time, UI rendering is requested, and the current frame picture is ready to be drawn. Illustratively, the frame animation generation instruction may be triggered by a user.
Optionally, the acquiring the plurality of frame pictures includes steps S11 to S12:
s11, reading the original data compressed into a fixed format;
and S12, decoding the original data to obtain a plurality of decoded frame pictures.
Illustratively, reading the original data by a native layer, and decoding the original data at the native layer; the native layer is a local framework in the Android layer, is written in c + + language and is superior to an application layer (java writing) of the Android in performance. The picture resources are compressed into raw data in ktx format, so that the obtained raw data needs to be decoded.
Further, frame data information is also required to be acquired in the process, the frame data information comprises the size and the path of the frame picture, the size is used in the subsequent drawing process, and the path can be provided for a native layer to call the path of the original data.
Specifically, in step S2, the picture processing operation includes steps S21 to S22:
s21, calling an OpenGL interface to draw the current frame picture;
and S22, rendering the current frame picture by the GPU.
By way of example, OpenGL is a cross-language, cross-platform application programming interface for rendering 2D, 3D vector graphics, which is typically used to interact with a graphics processing unit to achieve hardware acceleration. A gpu (graphics Processing unit), also called a display core, a visual processor, a display chip or a drawing chip, is a microprocessor that is dedicated to running drawing operations on personal computers, workstations, game machines, and some mobile devices. The current frame picture is drawn by calling the OpenGL interface and rendered by the GPU, so that the memory of the playing platform can be saved, too many resources of the playing platform cannot be occupied, the playing platform can support playing of a large memory picture, the problem that the playing is blocked or animation cannot be played normally is solved, and the user experience is improved.
Specifically, in step S3, after the current frame picture is processed, the next frame processing time is calculated; the next frame processing time is an interval time for performing picture processing operation on the next frame picture after the current frame picture is processed, and is used for controlling the animation rendering speed, and the next frame processing time can be calculated through a time interpolator.
Specifically, in step S4, the picture processing operation is performed on the next frame picture until the picture processing operation on the frame picture is stopped in response to a loop end instruction, which may be triggered by a user. Illustratively, a play stopping button is arranged on the play platform, when a user touches the play stopping button, the play platform sends a loop ending instruction to stop playing the frame animation, and at this time, drawing and rendering of the next frame of picture are stopped.
Further, in the process of performing the picture processing operation on the frame picture, the method further includes step S5:
and S5, dividing the plurality of frame pictures into an input frame, an output frame and at least one group of circulating frames.
The entry frame is used for playing at one time at the beginning stage of frame animation, and the entry frame comprises at least one frame picture; the loop frame is used for playing in a loop mode in a frame animation running stage, and the loop frame comprises at least one frame picture; the field frame is used for playing at one time at the end stage of the frame animation, and the field frame comprises at least one frame picture. The method comprises the steps of dividing a plurality of frame pictures into an entry frame, an exit frame and a cycle frame, controlling to play an entry frame animation at the beginning stage of the frame animation, continuously playing a cycle frame animation at the running stage of the frame animation and playing an exit frame animation at the ending stage of the frame animation. Furthermore, the cycle frames can have multiple groups, the multiple groups of cycle frames can effectively control the multiple groups of animations to be played together, and at the moment, the multiple groups of cycle frames are played through one group of serial rendering.
Optionally, before the calling an OpenGL interface to draw the current frame picture, the method further includes:
setting an animation playing frame rate; the animation playing frame rate is used for defining the time required for drawing one frame of picture.
Specifically, the animation playing frame rate is calculated by a time interpolator. The default animation frame rate is 25 frames, i.e. 40 ms (1 s/25-40 ms) to draw a picture. The user can customize the time, and different effects such as animation acceleration or deceleration and the like can be realized after the time is calculated through different algorithms. The accelerated playing can improve the animation playing frame rate, and the decelerated playing can reduce the animation playing frame rate.
Illustratively, when a user wants to accelerate the playing of an animation, the user uses an acceleration effect algorithm, and the codes that can be referred to in this case are as follows:
Figure BDA0002573143000000061
Figure BDA0002573143000000071
it can be known from the above codes that the loop time of each time is reduced (i.e. the animation playing frame rate is increased) by continuously reducing 0.01 ms, so as to achieve the effect of accelerating the animation.
Referring to fig. 2, fig. 2 is a flowchart of another frame animation generation method according to an embodiment of the present invention, where the process of fig. 2 is an initialization process, and at this time, a service wrapper object needs to be constructed, a frame sequence is initialized, and a time interpolator needs to be initialized; the second process is a process of responding to a frame animation generation instruction, at the moment, animation is executed, UI rendering is requested, and a current frame picture is prepared to be drawn; the third step is to obtain data, draw frame pictures and render the frame pictures, and frame data information is also needed to be obtained in the process; and the process is used for requesting circular rendering.
Compared with the prior art, the frame animation generating method disclosed by the embodiment of the invention firstly responds to a frame animation generating instruction to obtain a plurality of frame pictures; then, carrying out picture processing operation on the current frame picture; after the current frame picture is processed, calculating the processing time of the next frame; and finally, carrying out picture processing operation on the next frame of picture until the loop ending instruction is responded, and stopping the picture processing operation on the frame of picture. In the process of carrying out picture processing operation on the current frame picture, the OpenGL interface is called to draw the current frame picture and the GPU is used to render the current frame picture, so that the memory of the playing platform can be saved, too many resources of the playing platform cannot be occupied, the playing platform can support playing of a large-memory picture, and the user experience is improved. In addition, multiple groups of frame animations can be managed by defining the forms of the incoming frame, the outgoing frame and the circulating frame, the incoming and outgoing animations can be supported, a user can flexibly control the playing speed of the frame animations, and the user experience is improved.
Referring to fig. 3, fig. 3 is a block diagram of a frame animation generating apparatus 10 according to an embodiment of the present invention, where the frame animation generating apparatus 10 includes:
the data acquisition module 11 is used for responding to a frame animation generation instruction and acquiring a plurality of frame pictures;
the picture processing module 12 is configured to perform picture processing operation on the current frame picture; the picture processing operation comprises calling an OpenGL interface to draw the current frame picture and rendering the current frame picture by a GPU; and the processor is also used for carrying out picture processing operation on the next frame of picture and stopping the picture processing operation on the frame of picture until a loop ending instruction is responded
The time calculation module 13 is configured to calculate a next frame processing time after the current frame picture is processed; and the next frame processing time is the interval time of performing picture processing operation on the next frame picture after the current frame picture is processed.
It should be noted that the frame animation generating device 10 according to the embodiment of the present invention is a playing platform installed on a client, and the client is preferably an android client.
Specifically, the data obtaining module 11 responds to a frame animation generation instruction, starts to execute animation at this time, requests UI rendering, and prepares to draw a current frame picture. Illustratively, the frame animation generation instruction may be triggered by a user.
Optionally, the data obtaining module 11 is specifically configured to: reading original data compressed into a fixed format; and decoding the original data to obtain a plurality of decoded frame pictures.
Illustratively, reading the original data by a native layer, and decoding the original data at the native layer; the native layer is a local framework in the Android layer, is written in c + + language and is superior to an application layer (java writing) of the Android in performance. The picture resources are compressed into raw data in ktx format, so that the obtained raw data needs to be decoded.
Further, in this process, the data obtaining module 11 needs to obtain frame data information, where the frame data information includes the size and the path of the frame picture, the size is used in a subsequent drawing process, and the path may be provided to a native layer to invoke the path of the original data.
Specifically, the picture processing operation includes invoking an OpenGL interface to draw the current frame picture and rendering the current frame picture by a GPU.
By way of example, OpenGL is a cross-language, cross-platform application programming interface for rendering 2D, 3D vector graphics, which is typically used to interact with a graphics processing unit to achieve hardware acceleration. A gpu (graphics Processing unit), also called a display core, a visual processor, a display chip or a drawing chip, is a microprocessor that is dedicated to running drawing operations on personal computers, workstations, game machines, and some mobile devices. The current frame picture is drawn by calling the OpenGL interface and rendered by the GPU, so that the memory of the playing platform can be saved, too many resources of the playing platform cannot be occupied, the playing platform can support playing of a large memory picture, the problem that the playing is blocked or animation cannot be played normally is solved, and the user experience is improved.
Specifically, after the picture processing module 12 finishes processing the current frame picture, the time calculating module 13 calculates the processing time of the next frame; the next frame processing time is an interval time for performing picture processing operation on the next frame picture after the current frame picture is processed, and is used for controlling the animation rendering speed, and the next frame processing time can be calculated through a time interpolator.
Specifically, the picture processing module 12 performs a picture processing operation on the next frame of picture, and stops the picture processing operation on the frame of picture until a loop ending instruction is responded, where the loop ending instruction may be triggered by a user. Illustratively, a play stopping button is arranged on the play platform, when a user touches the play stopping button, the play platform sends a loop ending instruction to stop playing the frame animation, and at this time, drawing and rendering of the next frame of picture are stopped.
Further, referring to fig. 4, the frame animation generating apparatus 10 further includes:
the frame picture dividing module 14 is configured to divide a plurality of frame pictures into an entry frame, an exit frame, and at least one group of cyclic frames. The entry frame is used for playing at one time at the beginning stage of frame animation, and the entry frame comprises at least one frame picture; the loop frame is used for playing in a loop mode in a frame animation running stage, and the loop frame comprises at least one frame picture; the field frame is used for playing at one time at the end stage of the frame animation, and the field frame comprises at least one frame picture. The method comprises the steps of dividing a plurality of frame pictures into an entry frame, an exit frame and a cycle frame, controlling to play an entry frame animation at the beginning stage of the frame animation, continuously playing a cycle frame animation at the running stage of the frame animation and playing an exit frame animation at the ending stage of the frame animation. Furthermore, the cycle frames can have multiple groups, the multiple groups of cycle frames can effectively control the multiple groups of animations to be played together, and at the moment, the multiple groups of cycle frames are played through one group of serial rendering.
Optionally, the time calculation module 13 is further configured to set an animation playing frame rate; the animation playing frame rate is used for defining the time required for drawing one frame of picture.
Specifically, the animation playing frame rate is calculated by a time interpolator. The default animation frame rate is 25 frames, i.e. 40 ms (1 s/25-40 ms) to draw a picture. The user can customize the time, and different effects such as animation acceleration or deceleration and the like can be realized after the time is calculated through different algorithms. The accelerated playing can improve the animation playing frame rate, and the decelerated playing can reduce the animation playing frame rate.
Compared with the prior art, the frame animation generating device 10 disclosed by the embodiment of the invention firstly responds to a frame animation generating instruction to obtain a plurality of frame pictures; then, carrying out picture processing operation on the current frame picture; after the current frame picture is processed, calculating the processing time of the next frame; and finally, carrying out picture processing operation on the next frame of picture until the loop ending instruction is responded, and stopping the picture processing operation on the frame of picture. In the process of carrying out picture processing operation on the current frame picture, the OpenGL interface is called to draw the current frame picture and the GPU is used to render the current frame picture, so that the memory of the playing platform can be saved, too many resources of the playing platform cannot be occupied, the playing platform can support playing of a large-memory picture, and the user experience is improved. In addition, multiple groups of frame animations can be managed by defining the forms of the incoming frame, the outgoing frame and the circulating frame, the incoming and outgoing animations can be supported, a user can flexibly control the playing speed of the frame animations, and the user experience is improved.
Referring to fig. 5, fig. 5 is a block diagram of a frame animation generating apparatus 20 according to an embodiment of the present invention. The frame animation generating device 20 includes: a processor 21, a memory 22 and a computer program, such as a driving control program, stored in said memory and executable on said processor. The processor 21, when executing the computer program, implements the steps in the above-described frame animation generation method embodiments, such as steps S1 to S4 shown in fig. 1. Alternatively, the processor implements the functions of the modules in the above device embodiments when executing the computer program, such as the data acquisition module 11.
Illustratively, the computer program may be divided into one or more modules, which are stored in the memory 22 and executed by the processor 21 to accomplish the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program in the frame animation generation device 20. For example, the computer program may be divided into a data acquisition module 11, a picture processing module 12, a time calculation module 13, and a frame picture division module 14, and the specific functions of each module are as follows:
the data acquisition module 11 is used for responding to a frame animation generation instruction and acquiring a plurality of frame pictures;
the picture processing module 12 is configured to perform picture processing operation on the current frame picture; the picture processing operation comprises calling an OpenGL interface to draw the current frame picture and rendering the current frame picture by a GPU; and the processor is also used for carrying out picture processing operation on the next frame of picture and stopping the picture processing operation on the frame of picture until a loop ending instruction is responded
The time calculation module 13 is configured to calculate a next frame processing time after the current frame picture is processed; the next frame processing time is the interval time of performing picture processing operation on the next frame picture after the current frame picture is processed;
the frame picture dividing module 14 is configured to divide a plurality of frame pictures into an entry frame, an exit frame, and at least one group of cyclic frames.
For the specific working process of each module, reference may be made to the working process of the frame animation generating device 10 described in the foregoing embodiment, which is not described herein again.
The frame animation generating device 20 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The frame animation generating device 20 may include, but is not limited to, a processor 21, a memory 22. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of an image enhancement device and does not constitute a limitation of the frame animation generation device 20, and may include more or less components than those shown, or combine some components, or different components, for example, the frame animation generation device 20 may further include an input-output device, a network access device, a bus, etc.
The Processor 21 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and the processor 21 is a control center of the frame animation generating device 20 and connects various parts of the entire frame animation generating device 20 by using various interfaces and lines.
The memory 22 may be used to store the computer programs and/or modules, and the processor 21 implements various functions of the frame animation generating apparatus 20 by running or executing the computer programs and/or modules stored in the memory 22 and calling data stored in the memory 22. The memory 22 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory 22 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the integrated module of the frame animation generating device 20 may be stored in a computer readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A frame animation generation method, comprising:
responding to a frame animation generation instruction, and acquiring a plurality of frame pictures;
carrying out picture processing operation on the current frame picture; the picture processing operation comprises calling an OpenGL interface to draw the current frame picture and rendering the current frame picture by a GPU;
after the current frame picture is processed, calculating the processing time of the next frame; the next frame processing time is the interval time of performing picture processing operation on the next frame picture after the current frame picture is processed;
and carrying out picture processing operation on the next frame of picture until the loop ending instruction is responded, and stopping the picture processing operation on the frame of picture.
2. The frame animation generation method of claim 1, further comprising:
dividing a plurality of frame pictures into an entry frame, an exit frame and at least one group of circulating frames; the entry frame is used for playing at the beginning stage of the frame animation once, the loop frame is used for playing in the loop of the running stage of the frame animation, and the exit frame is used for playing at the ending stage of the frame animation once.
3. The frame animation generation method according to claim 1, wherein the acquiring of the plurality of frame pictures includes:
reading original data compressed into a fixed format;
and decoding the original data to obtain a plurality of decoded frame pictures.
4. The frame animation generation method as claimed in claim 3, wherein the decoding of the original data comprises:
decoding the original data at a native layer; and the native layer is a local framework in the Android layer.
5. The method of generating frame animation according to claim 1, wherein the invoking of the OpenGL interface draws the current frame picture, the method further comprises:
setting an animation playing frame rate; the animation playing frame rate is used for defining the time required for drawing one frame of picture.
6. The frame animation generation method as claimed in claim 1, wherein the next frame processing time is calculated by a time interpolator.
7. A frame animation generation device, characterized by comprising:
the data acquisition module is used for responding to a frame animation generation instruction and acquiring a plurality of frame pictures;
the picture processing module is used for carrying out picture processing operation on the current frame picture; the picture processing operation comprises calling an OpenGL interface to draw the current frame picture and rendering the current frame picture by a GPU; and the processor is also used for carrying out picture processing operation on the next frame of picture and stopping the picture processing operation on the frame of picture until a loop ending instruction is responded
The time calculation module is used for calculating the processing time of the next frame after the current frame picture is processed; and the next frame processing time is the interval time of performing picture processing operation on the next frame picture after the current frame picture is processed.
8. The frame animation generation apparatus of claim 7, wherein the apparatus further comprises:
the frame picture dividing module is used for dividing a plurality of frame pictures into an entry frame, an exit frame and at least one group of circulating frames; the entry frame is used for playing at the beginning stage of the frame animation once, the loop frame is used for playing in the loop of the running stage of the frame animation, and the exit frame is used for playing at the ending stage of the frame animation once.
9. A frame animation generating device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the frame animation generating method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, comprising a stored computer program, wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the frame animation generation method according to any one of claims 1 to 6.
CN202010646024.XA 2020-07-07 2020-07-07 Frame animation generation method, device, equipment and storage medium Pending CN112037309A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010646024.XA CN112037309A (en) 2020-07-07 2020-07-07 Frame animation generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010646024.XA CN112037309A (en) 2020-07-07 2020-07-07 Frame animation generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112037309A true CN112037309A (en) 2020-12-04

Family

ID=73579100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010646024.XA Pending CN112037309A (en) 2020-07-07 2020-07-07 Frame animation generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112037309A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168878A (en) * 2021-11-23 2022-03-11 上海鸿米信息科技有限责任公司 Dynamic effect playing method, device, equipment, storage medium and program product

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168878A (en) * 2021-11-23 2022-03-11 上海鸿米信息科技有限责任公司 Dynamic effect playing method, device, equipment, storage medium and program product

Similar Documents

Publication Publication Date Title
EP3754490B1 (en) User interface rendering method and apparatus, and terminal
US10207190B2 (en) Technologies for native game experience in web rendering engine
EP4044604A1 (en) Video special effect processing method and apparatus, and electronic device
US9176757B2 (en) Method, system and an executable piece of code for the virtualization of a hardware resource associated with a computer system
CN110750664B (en) Picture display method and device
US11989814B2 (en) Image processing method and apparatus, electronic device, and storage medium
WO2019238145A1 (en) Webgl-based graphics rendering method, apparatus and system
CN106797398A (en) Method and system for providing from virtual desktop serve to client
CN112423111A (en) Graphic engine and graphic processing method suitable for player
CN110825467A (en) Rendering method, rendering apparatus, hardware apparatus, and computer-readable storage medium
CN112037309A (en) Frame animation generation method, device, equipment and storage medium
CN113411660B (en) Video data processing method and device and electronic equipment
CN106648623B (en) Display method and device for characters in android system
CN113365150A (en) Video processing method and video processing device
CN109091866B (en) Display control method and device, computer readable medium and electronic equipment
CN108416830B (en) Animation display control method, device, equipment and storage medium
CN116966546A (en) Image processing method, apparatus, medium, device, and program product
CN108010095B (en) Texture synthesis method, device and equipment
CN115878247A (en) Front-end element adaptive display method, device, storage medium and system
CN113407259B (en) Scene loading method, device, equipment and storage medium
CN111785229B (en) Display method, device and system
CN117065357A (en) Media data processing method, device, computer equipment and storage medium
CN114327790A (en) Rendering method of Android container based on Linux system
CN112348928A (en) Animation synthesis method, animation synthesis device, electronic device, and medium
CN112328351A (en) Animation display method, animation display device and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination