CN116821537A - Animation display method and device, storage medium and embedded terminal - Google Patents

Animation display method and device, storage medium and embedded terminal Download PDF

Info

Publication number
CN116821537A
CN116821537A CN202310758658.8A CN202310758658A CN116821537A CN 116821537 A CN116821537 A CN 116821537A CN 202310758658 A CN202310758658 A CN 202310758658A CN 116821537 A CN116821537 A CN 116821537A
Authority
CN
China
Prior art keywords
animation
displayed
picture
data
storage area
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
CN202310758658.8A
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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202310758658.8A priority Critical patent/CN116821537A/en
Publication of CN116821537A publication Critical patent/CN116821537A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides an animation display method, an animation display device, a storage medium and an embedded terminal, wherein the method comprises the following steps: performing preset processing on the animation to be displayed of the embedded terminal to obtain animation data of the animation to be displayed; storing the animation data of the animation to be displayed into a preset first storage area, wherein the first storage area is a fixed storage area; when the animation to be displayed is required to be displayed, sending display information for informing the animation to be displayed and notification information of the address of the first storage area to a screen; and reading the animation data of the animation to be displayed stored in the first storage area by the screen according to the address of the first storage area, and displaying the animation data according to the display information of the animation to be displayed. The proposal provided by the invention can improve the frame rate and the display effect of the animation and reduce the resource consumption for displaying the animation.

Description

Animation display method and device, storage medium and embedded terminal
Technical Field
The present invention relates to the field of control, and in particular, to an animation display method, an animation display device, a storage medium, and an embedded terminal.
Background
With the advancement of the information age, more and more display devices are used in human-computer interaction. Display devices with high performance processors have been the mainstream in the past, such as PCs, mobile phones, etc.; along with the popularization of ideas such as intelligent factories and intelligent houses, some embedded terminals also have the requirement of performing man-machine interaction by using display equipment, such as a vehicle-mounted host, an intelligent home master controller, a factory controller and the like. The performance of the processor used by the embedded terminal is much worse than that of a PC (personal computer) and a mobile phone, and the real-time performance of some special function responses (such as fault protection of a factory, abnormal feedback of a vehicle-mounted host computer and the like) needs to be ensured; the display function of the embedded terminal is generally not as smooth as that of a mobile phone or a PC.
For example, embedded device processor chips are commonly used today: STM32F103 from ST, which is typically only 72MHz at maximum, is single core and has no GPU. In contrast to the PC now common: the processors used are mostly four cores or eight cores, the frequency is generally 2.4GHz and above, and the processors are provided with high-performance GPUs, for example, I7-6700 (eight cores 3.4 GHz) of Intel corporation is used by the CPU, and RTX2060 of Intel corporation is used by the GPU. The difference of the performance is obvious, and the PC and the mobile phone are difficult to perfectly reproduce to the embedded terminal by the same design.
Display dysfluency mostly occurs in two places: switching of an entire page, such as switching from one picture directly to another, requires updating the entire display buffer. And two animation effects, such as dynamic wallpaper, a process that color changes or enlarges after clicking some virtual buttons, a fade-in fade-out effect of an image, and the like.
Disclosure of Invention
The invention aims to overcome the defects of the related art and provide an animation display method, an animation display device, a storage medium and an embedded terminal, so as to solve the problem that the animation effect of the display device of the embedded terminal is not smooth in the related art.
In one aspect, the present invention provides an animation display method, including: performing preset processing on the animation to be displayed of the embedded terminal to obtain animation data of the animation to be displayed; storing the animation data of the animation to be displayed into a preset first storage area, wherein the first storage area is a fixed storage area; when the animation to be displayed is required to be displayed, sending display information for informing the animation to be displayed and notification information of the address of the first storage area to an embedded end screen; and reading the animation data of the animation to be displayed stored in the first storage area by the screen according to the address of the first storage area, and displaying the animation data according to the display information of the animation to be displayed.
Optionally, performing preset processing on the animation to be displayed by the embedded terminal to obtain animation data of the animation to be displayed, including: splitting the animation to be displayed into N pictures, and converting the N pictures into picture data, thereby obtaining the animation data of the animation to be displayed.
Optionally, the method further comprises: after converting the N pictures into picture data, judging whether each picture has the same part with the picture before the picture in the playing sequence according to the playing sequence of the pictures; if the current picture and the picture before the current picture are judged to have the same part, the current picture is compressed based on the same part.
Optionally, the displaying information includes: the size of the area and/or the display position of the animation to be displayed.
Another aspect of the present invention provides an animation display device, comprising: the processing unit is used for carrying out preset processing on the animation to be displayed on the embedded end to obtain animation data of the animation to be displayed; a storage unit, configured to store animation data of the animation to be displayed in a preset first storage area, where the first storage area is a fixed storage area; a sending unit, configured to send, to an embedded end screen, display information for notifying the animation to be displayed and notification information of an address of the first storage area when the animation to be displayed needs to be displayed; and reading the animation data of the animation to be displayed stored in the first storage area by the screen according to the address of the first storage area, and displaying the animation data according to the display information of the animation to be displayed.
Optionally, the processing unit performs preset processing on an animation to be displayed by the embedded end to obtain animation data of the animation to be displayed, including: splitting the animation to be displayed into N pictures, and converting the N pictures into picture data, so as to obtain the animation data of the animation to be displayed.
Optionally, the processing unit performs preset processing on the animation to be displayed to obtain animation data of the animation to be displayed, and further includes: after converting the N pictures into picture data, judging whether each picture has the same part with the picture before the picture in the playing sequence according to the playing sequence of the pictures; if the current picture and the picture before the current picture are judged to have the same part, the current picture is compressed based on the same part.
Optionally the displaying information includes: the size of the area and/or the display position of the animation to be displayed.
In a further aspect the invention provides a storage medium having stored thereon a computer program which when executed by a processor performs the steps of any of the methods described above.
In yet another aspect, the invention provides an embedded terminal comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any of the methods described above when executing the program.
In yet another aspect, the invention provides an embedded terminal comprising an apparatus as described in any one of the preceding.
According to the technical scheme of the invention, the animation effect is stored in the independent storage area, and the independent storage area is directly called when the animation needs to be displayed, so that the traditional process of going from the first-level buffer memory to the second-level buffer memory to the display equipment is omitted, the frame rate and the display effect of the animation are improved, the resource consumption for displaying the animation is reduced, and meanwhile, the operations of reducing the frame rate, reducing the color types and the like and reducing the user's look and feel are not required.
According to the technical scheme, the animation effect is split into a plurality of pictures in advance, the pictures are converted into the picture data and stored in the preset fixed storage area, and the calculation time for the processor to instantly draw the images is saved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a schematic diagram of an animation display method according to an embodiment of the present invention;
fig. 2 is a display flow chart of a display device in the related art;
FIG. 3 is a schematic diagram of an animation display method according to an embodiment of the present invention;
FIG. 4 is a block diagram illustrating an embodiment of an animation display device according to the present invention;
FIG. 5a is one of the example diagrams for splitting an animation into pictures;
FIG. 5b is a second exemplary diagram of splitting an animation into pictures;
FIG. 5c is a third exemplary diagram of splitting an animation into pictures;
FIG. 5d is a fourth example diagram of splitting an animation into pictures;
FIG. 5e is a fifth example diagram of splitting an animation into pictures;
FIG. 6 shows an example of a two picture pixel overlap;
fig. 7 shows an example of the case where three picture pixels overlap.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to specific embodiments of the present invention and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The invention mainly aims at the display optimization of the animation effect, and the optimization of the animation effect by the embedded terminal at present is mainly two methods:
(1) and the investment of system resources is increased. Processor performance is increased by changing processors, the duty ratio of the display device in system resources is increased (display buffer area size is increased, buffer area number is increased), etc.
(2) The resource consumption of the display device is reduced. By reducing the frame rate, reducing the color variety, etc.
Optimization method (1):
changing devices can result in increased costs or increasing the duty cycle of the display device in the system resources can result in embedded real-time being difficult to guarantee.
Optimization method (2): whether reducing the frame rate or reducing the color variety, reduces the user's viewing experience.
The display flow of the display device in the related art is as shown in fig. 2:
(1) calculating graphic data to be displayed by a processor; including calculating image data and/or storage locations for graphics to be displayed. The graphic data may specifically be a color value of a pixel corresponding to the picture.
(2) Then the data is stored in a first buffer area which is a temporary storage area with smaller capacity;
(3) the processor stores the data of the first buffer area into the second buffer area according to a specific sequence, wherein the buffer area is an area for reading the data by the screen, and the capacity is larger;
(4) and finally, the screen reads the data of the second buffer area, and changes the color value of each pixel point on the screen according to the read data, so as to display the graph corresponding to the data.
The above-mentioned display flow is often drawn in real time when displaying the moving picture, and steps (1) to (4) are frequently performed, which requires a large amount of processor computing resources. However, in practice, most of the animation except for playing the video is repeated, such as the effect that the mouse clicks a certain icon, and the icon gets bigger and squeezes.
The invention provides an animation display method of a display device. The display device may specifically be an embedded terminal. The animation display method may be implemented in particular in a display device such as a processor of an embedded terminal.
Fig. 1 is a schematic diagram of an animation display method according to an embodiment of the present invention.
As shown in fig. 1, the animation display method according to an embodiment of the present invention includes at least step S110, step S120, and step S130.
Step S110, performing preset processing on the animation to be displayed by the embedded terminal to obtain animation data of the animation to be displayed.
In a specific embodiment, the animation to be displayed is split into N pictures, and the N pictures are converted into picture data, so that animation data of the animation to be displayed is obtained.
Specifically, the animation is essentially a quick play of consecutive pictures, and the splitting is to take out one Zhang Tupian played in the animation alone. The animation effect can be the whole screen, or a certain component in the screen, such as the effect that a mouse clicks a certain icon, the icon is enlarged, squeezed and the like. More specifically, the animation to be displayed is split into N pictures according to the playing time of the animation and a preset refresh rate. For example, when 30FPS (i.e. 1s plays 30 pictures), it is comfortable for human eyes to watch the animation effect, and split the animation to be displayed into 45 pictures according to the specification of 30 pictures per second if the playing time of the animation to be displayed is 45 s. The picture data is color value data of pixel points of the picture. And converting the N pictures into picture data, namely converting the N pictures into pixel point color value data, namely sequentially storing red, yellow and blue primary color values of each pixel point of the picture, so as to obtain animation data of the animation to be displayed, namely, the animation data comprise the split picture data of the N pictures.
The graphics data is for a display device the color value of the corresponding pixel of the picture, for example, a picture with a resolution of 480 x 320, which is 480 x 320 = 153600 pixels in total, assuming that the color format is RGB888, the value of the red Huang Lansan primary color of each pixel is binary 8 bits, that is, at most 255 (from bit 0 in the computer, so at most 255 = 2 x 7+2 x 6+ … +2 x 1+2 x 0), and the data is stored (255 ) assuming that the first pixel of the picture is pure white, and the binary value is (11111111, 1111111, 11111111) in the computer.
Preferably, the preset processing is performed on the animation to be displayed by the embedded terminal to obtain animation data of the animation to be displayed, and the method further includes: after converting the N pictures into picture data, judging whether each picture has the same part with the picture before the picture in the playing sequence according to the playing sequence of the pictures; if the current picture and the picture before the current picture are judged to have the same part, the current picture is compressed based on the same part.
Specifically, whether each picture has the same part as the picture before the picture in the play order is judged according to the picture play order, namely, after the N pictures are converted into picture data, whether each picture has adjacent pixel points with the same positions and color values exceeding the preset number as the picture before the picture in the play order is judged according to the picture play order. If the current picture and the picture before the current picture are judged to have adjacent pixel points with the same position and color value exceeding the preset number, the current picture and the picture are judged to have the same part, and the part of the current picture, which is the same as the picture, is compressed. Compressing the same portion of the current picture as the picture preceding it in the play order and having more than a predetermined number of adjacent pixels having the same position and color value may specifically include: if it is determined that the current picture and the picture preceding the current picture have adjacent pixel points with positions and color values which are more than a preset number, deleting the positions and the color value data of the adjacent pixel points with the positions and the color values which are more than the preset number and are the same as those of the picture (the number of the pictures can be more than one) in the picture data of the current picture, and pointing the positions and the reading addresses of the pixel points with the positions and the color value data deleted to the reading addresses of the pixel points with the same positions in the picture through the mark.
The compression process is described as an example:
as shown in fig. 5a to 5e, for simplifying the process, assume that a segment of 0×10 pixels (i.e. 100 pixels) is split into 5 pictures, and the circle moves diagonally from the lower left corner position in fig. 5a to the upper right corner position in fig. 5e, so that five pictures of fig. 5a, 5b, 5c, 5d and 5e can be split.
Setting a fixed storage area starting address: 0; the addresses in the computer are continuous, the whole storage area (which can be understood as a computer hard disk) can have a size of 1G, namely a size of 1 x 1024 bytes, when the addresses are divided, the starting address is set to be from 0, the addresses of the storage area are 0-1073741824, and 1 byte can be stored in each address. So we use RGB888, the color of each pixel is 3 bytes, each pixel needs three address storage, default storage in order.
The addresses of the memory areas are identified as 0-1073741824, the stored data or read data, and addresses within the range may be optional, here we start with 0 for the sake of simplicity of description to store our animated pixel data.
The compression process is as follows:
the first picture is normally stored, and the data occupies addresses 0 to 299;
The second picture originally occupies 300 to 599 addresses, but 80 pixels are the same as the first picture, so that the second picture is deleted, and only 20 pixels are reserved, so that the second picture occupies 300 to 359 addresses;
the third picture originally occupies addresses 600-899, but 80 pixels are the same as the first picture, so that the third picture is deleted, and only 20 pixels are reserved, so that the third picture occupies addresses 360-419;
the fourth picture originally occupies the addresses 900-1199, but 80 pixels are the same as the first picture, so that the fourth picture is deleted, and only 20 pixels are reserved, so that the fourth picture occupies the addresses 420-479;
the fifth picture originally occupies the addresses 1200-1499, but 80 pixels are the same as the first picture, so that the fifth picture is deleted, and only 20 pixels are reserved, so that the fifth picture occupies the addresses 480-539;
the data size of the animation occupies 0-1499 addresses, namely 1500 bytes (Byte) size, but only occupies 540 addresses after compression, so that the memory occupation is reduced by 64%, and the consumption of resources is greatly reduced.
The flag may be designed to contain information: segment 1 start address, segment 1 end address, segment 2 start address, segment 2 end address, segment 3 start address, segment 3 end address, … …, and so on, the number of segments is set according to the actual situation.
For example, fig. 6 shows an example of the case where two picture pixels overlap. Referring to fig. 6, reference numerals 1 to 99 in the drawing represent pixel positions, wherein the pixel of the white background color is a portion where the second picture overlaps the first picture (the color value is the same), and the pixel of the gray background color is a portion where the color value of the second picture is different from that of the first picture; there are no adjacent pixels of the same color value around the pixel 78, and therefore the pixel 78 is not considered to be within the compression range.
The first picture stores 0 to 99 pixel points into addresses 0 to 299 in sequence;
only 15 to 16, 25 to 26, 34 to 36 and … … pixels of the second image are sequentially stored in the addresses 300 to 359;
the marks of the second graph are segmented into the following pixel points:
section 1: using the 0 th to 14 th pixel points of the first image; section 2: using the 15 th to 16 th pixel points of the second image; section 3: 17 th to 24 th pixel points of the first image are used; specific address value substitution in flags this is followed by {0,42,300,305,51,72,306,311..once. }, in this way the first and second light sources, then, when the compressed picture is needed to be displayed, the coordinate values of the pixel points are replaced by the following marks in sequence: segment 1 start address to segment 1 end address, segment 2 start address to segment 2 end address, segment 3 start address to segment 3 end address, … …, and so on.
When the second picture is displayed, when the 0 th pixel point (0, 0) coordinate is sent, the color value address uses the segment 1 starting address+0 to the starting address+2 in the mark, namely 0 to 2; when the 1 st pixel point (0, 1) coordinates are sent, the color value address uses the segment 1 starting address +3 to the starting address +5 in the mark, namely 3 to 5; when the coordinates of the 14 th pixel point (1, 4) are transmitted, the color value address is changed into a segment 1 starting address +42 to a starting address +44, namely 42 to 44, and at the moment, the starting address +44=44=segment 1 ending address, and the segment 1 ending is judged, and the segment 2 needs to be transmitted; so when sending the 15 th pixel (1, 5), the color value address uses segment 2 start address +0 to start address +2 in the flag, i.e. analogized to 300-302.
Fig. 7 shows an example of the case where three picture pixels overlap. Referring to fig. 7, in the same way, when the third picture is compressed, the pixel of the white background color is the portion where the third picture overlaps with the first picture (the color value is the same), the pixel of the gray background color (25, 26, 34, 35, 36, 44, 45, 55, 56, 57, 65, 66, 75, 76) is the portion where the third picture overlaps with the second picture (the color value is the same), and the pixel of the black background color is the portion where the third picture differs from the first picture and the second picture in color value.
Then the third picture only leaves 4 pixel points when compressing, and stores it into addresses 360-371;
section 1: 0 to 14 of a first picture; section 2: 15-16 of a third picture; section 3: 17-24 of a first picture; section 4: 25-26 of a second picture; … …; similarly, the specific address value in the tag is then replaced by {0,42,360,369,51,72,306,311, … … }
When the compressed picture is displayed: the first picture is displayed uncompressed, so when we display, the CPU sends the addresses of 100 pixels, namely 0 to 299, and the corresponding coordinates to the screen (display driving chip) in sequence.
A picture is displayed, essentially also a single pixel. The display of a pixel requires the CPU to send the x, y coordinates (corresponding to 10 x 10 resolution) and the color value address to the display driver chip. For example, the first point is displayed, the CPU sends (0, 0) and address 0 passed. Since the data is stored at a one-dimensional address, we will reduce the dimension of 10 x 10 to 100. Typically, rows are connected end to end, with the first row corresponding to 0-9 and the second row corresponding to 10-19, and so on. Therefore, the CPU is required to send four data (pixel coordinates, R/G/B addresses) to the display driver chip to display a pixel of RGB888, and the display driver chip changes the pixel at the corresponding position into the color corresponding to the data in the R/G/B address according to the data.
Step S120, storing the animation data of the animation to be displayed in a preset first storage area.
Wherein the first storage area is a fixed storage area. That is, a fixed storage area for storing animation data of an animation to be displayed is provided in the display device.
Step S130, when the animation to be displayed is required to be displayed, sending display information for informing the animation to be displayed and notification information of the address of the first storage area to a screen of the embedded terminal.
And reading the animation data of the animation to be displayed stored in the first storage area by the screen according to the address of the first storage area, and displaying the animation data according to the display information of the animation to be displayed. The screen (i.e., display screen) is a screen with a display driving chip. The display driving chip is matched with the screen generally, and is responsible for reading the address of the storage area informed by the processor, reading and displaying the data in the address, and the processor is not required to be responsible for displaying details in real time. The processor is only required to be configured with the driving chip once when the processor is started, then only required to store the data to be displayed into the corresponding address, and then the driving chip is notified, and the driving chip can automatically read the data and display the data.
Specifically, when the animation to be displayed is not required to be displayed, displaying is performed according to a normal display flow. And when the animation to be displayed is required to be displayed, sending display information for informing the animation to be displayed and notification information of the address of the first storage area to a screen. The screen reads the animation data of the animation to be displayed stored in the first storage area according to the address of the first storage area, and displays the animation data according to the display information of the animation to be displayed. The display information may specifically include: and the size and/or the display position of the area to be displayed with the animation. After the screen reads the animation data of the animation to be displayed according to the address of the first storage area, the color value of each pixel point on the screen is changed according to the read picture data according to the size and the display position of the area of the animation to be displayed, and then the picture corresponding to the picture data is displayed on the screen.
For example, it is desirable to display a square, 50 pixels in size, positioned against the upper left corner of the screen, 2 pixels in frame width, and color (200,150,100). The position of the corresponding pixel point is calculated according to the position, the size and the frame line width, namely, the position of the corresponding pixel point is calculated at 0-53 pixel points of the 1 st row of the screen, the position of the corresponding pixel point is calculated at 0-53 pixel points of the 2 nd row, the position of the corresponding pixel point is calculated at 0-1 pixel points of the 3 rd row, the position of the corresponding pixel point is calculated at 52-53 pixel points of the 3 rd row, the position of the corresponding pixel point is calculated at the 53 rd row, and then the value of the corresponding pixel point is changed into (200,150,100).
According to the technical scheme of the invention, except that some resources are required to be additionally consumed when the device is started, when the animation is displayed, only a processor is required to send simple animation attribute information to the judgment, so that the operation that the processor is required to send all animation data and temporarily store the animation data into a first cache region and then transfer the animation data into a second cache region in real time drawing is omitted, and particularly, the animation display effect can be remarkably improved on a platform with lower performance of the processor, such as an embedded terminal.
In order to clearly illustrate the technical scheme of the present invention, a specific embodiment is used to describe the execution flow of the animation display method provided by the present invention.
Fig. 3 is a schematic diagram of an animation display method according to an embodiment of the present invention.
As shown in fig. 3, the specific flow of the display device of the present invention during operation is as follows:
(1) after the embedded display device is started, the processor splits and converts the animation effect in advance and stores the animation effect into a specific storage area (namely a first storage area), wherein the specific storage area is a preset fixed storage area;
(2) detecting whether animation is required to be displayed currently or not, and displaying according to a normal display flow when the animation is not required to be displayed;
(3) when it is desired to display an animation, the processor informs the screen of the size of the area in which the animation is displayed, the location of the screen, and the particular memory area address where the animation effect is deposited.
(4) The screen reads the animation data according to the address of the specific memory area notified by the processor, and then displays the animation data on the screen at the position of the screen according to the size of the area notified by the processor in which the animation is displayed.
The invention provides an animation display device of a display device. The display device may specifically be an embedded terminal. The animated display apparatus may be embodied in particular in a display device such as a processor of an embedded terminal.
Fig. 4 is a block diagram showing the structure of an embodiment of an animation display device according to the present invention. As shown in fig. 4, the animation display device 100 includes: a processing unit 110, a saving unit 120, and a transmitting unit 130.
And the processing unit 110 is used for carrying out preset processing on the animation to be displayed on the embedded terminal to obtain animation data of the animation to be displayed.
In a specific embodiment, performing preset processing on an animation to be displayed on an embedded terminal to obtain animation data of the animation to be displayed, where the animation data includes: splitting the animation to be displayed into N pictures, and converting the N pictures into picture data, so as to obtain the animation data of the animation to be displayed.
Specifically, the animation is essentially a quick play of consecutive pictures, and the splitting is to take out one Zhang Tupian played in the animation alone. The animation effect can be the whole screen, or a certain component in the screen, such as the effect that a mouse clicks a certain icon, the icon is enlarged, squeezed and the like. More specifically, splitting the animation to be displayed into N pictures according to the playing time of the animation and a preset refresh rate, for example, when 30FPS (i.e. playing 30 pictures for 1 s), the human eyes are comfortable to watch the animation effect, splitting the animation with the specification of 30 pictures per second, and splitting the animation to be displayed into 45 pictures if the playing time of the animation to be displayed is 45 s. The picture data is pixel point color value data of the picture. And converting the N pictures into picture data, namely converting the N pictures into pixel point color value data, namely sequentially storing red, yellow and blue primary color values of each pixel point of the picture, so as to obtain animation data of the animation to be displayed, namely, the animation data comprise the split picture data of the N pictures.
The graphics data is for a display device the color value of the corresponding pixel of the picture, for example, a picture with a resolution of 480 x 320, which is 480 x 320 = 153600 pixels in total, assuming that the color format is RGB888, the value of the red Huang Lansan primary color of each pixel is binary 8 bits, that is, at most 255 (from bit 0 in the computer, so at most 255 = 2 x 7+2 x 6+ … +2 x 1+2 x 0), and the data is stored (255 ) assuming that the first pixel of the picture is pure white, and the binary value is (11111111, 1111111, 11111111) in the computer.
The processing unit 130 performs preset processing on the animation to be displayed at the embedded end to obtain animation data of the animation to be displayed, and further includes: after converting the N pictures into picture data, judging whether each picture has the same part as the previous picture according to the picture playing sequence; and if the current picture and the previous picture are judged to have the same part, compressing the current picture based on the same part.
Specifically, whether each picture has the same part as the picture before the picture in the play order is judged according to the picture play order, namely, after the N pictures are converted into picture data, whether each picture has adjacent pixel points with the same positions and color values exceeding the preset number as the picture before the picture in the play order is judged according to the picture play order. If the current picture and the picture before the current picture are judged to have adjacent pixel points with the same position and color value exceeding the preset number, the current picture and the picture before the current picture are judged to have the same part, and the part, which is the same as the picture, of the current picture is compressed. Compressing the same portion of the current picture as the picture preceding it in the play order and having more than a predetermined number of adjacent pixels having the same position and color value may specifically include: if it is judged that the current picture and the previous picture have adjacent pixel points with the positions and the color values which are more than the preset number, deleting the positions and the color value data of the adjacent pixel points with the positions and the color values which are more than the preset number and are the same as the positions and the color values of the picture (the number of the pictures can be more than one) in the picture data of the current picture, and pointing the positions of the pixel points with the positions and the color value data deleted and the reading addresses of the color value data to the reading addresses of the pixel points with the same positions in the picture through marks.
The compression process is described as an example:
as shown in fig. 5a to 5e, for simplifying the process, assume that a segment of 0×10 pixels (i.e. 100 pixels) is split into 5 pictures, and the circle moves diagonally from the lower left corner position in fig. 5a to the upper right corner position in fig. 5e, so that five pictures of fig. 5a, 5b, 5c, 5d and 5e can be split.
Setting a fixed storage area starting address: 0; the addresses in the computer are continuous, the whole storage area (which can be understood as a computer hard disk) can have a size of 1G, namely a size of 1 x 1024 bytes, when the addresses are divided, the starting address is set to be from 0, the addresses of the storage area are 0-1073741824, and 1 byte can be stored in each address. So we use RGB888, the color of each pixel is 3 bytes, each pixel needs three address storage, default storage in order.
The addresses of the memory areas are identified as 0-1073741824, the stored data or read data, and addresses within the range may be optional, here we start with 0 for the sake of simplicity of description to store our animated pixel data.
The compression process is as follows:
the first picture is normally stored, and the data occupies addresses 0 to 299;
The second picture originally occupies 300 to 599 addresses, but 80 pixels are the same as the first picture, so that the second picture is deleted, and only 20 pixels are reserved, so that the second picture occupies 300 to 359 addresses;
the third picture originally occupies addresses 600-899, but 80 pixels are the same as the first picture, so that the third picture is deleted, and only 20 pixels are reserved, so that the third picture occupies addresses 360-419;
the fourth picture originally occupies the addresses 900-1199, but 80 pixels are the same as the first picture, so that the fourth picture is deleted, and only 20 pixels are reserved, so that the fourth picture occupies the addresses 420-479;
the fifth picture originally occupies the addresses 1200-1499, but 80 pixels are the same as the first picture, so that the fifth picture is deleted, and only 20 pixels are reserved, so that the fifth picture occupies the addresses 480-539;
the data size of the animation occupies 0-1499 addresses, namely 1500 bytes (Byte) size, but only occupies 540 addresses after compression, so that the memory occupation is reduced by 64%, and the consumption of resources is greatly reduced.
The flag may be designed to contain information: segment 1 start address, segment 1 end address, segment 2 start address, segment 2 end address, segment 3 start address, segment 3 end address, … …, and so on, the number of segments is set according to the actual situation.
For example, fig. 6 shows an example of the case where two picture pixels overlap. Referring to fig. 6, reference numerals 1 to 99 in the drawing represent pixel positions, wherein the pixel of the white background color is a portion where the second picture overlaps the first picture (the color value is the same), and the pixel of the gray background color is a portion where the color value of the second picture is different from that of the first picture; there are no adjacent pixels of the same color value around the pixel 78, and therefore the pixel 78 is not considered to be within the compression range.
The first picture stores 0 to 99 pixel points into addresses 0 to 299 in sequence;
only 15 to 16, 25 to 26, 34 to 36 and … … pixels of the second image are sequentially stored in the addresses 300 to 359;
the marks of the second graph are segmented into the following pixel points:
section 1: using the 0 th to 14 th pixel points of the first image; section 2: using the 15 th to 16 th pixel points of the second image; section 3: 17 th to 24 th pixel points of the first image are used; specific address value substitution in flags this is followed by {0,42,300,305,51,72,306,311..once. }, in this way the first and second light sources, then, when the compressed picture is needed to be displayed, the coordinate values of the pixel points are replaced by the following marks in sequence: segment 1 start address to segment 1 end address, segment 2 start address to segment 2 end address, segment 3 start address to segment 3 end address, … …, and so on.
When the second picture is displayed, when the 0 th pixel point (0, 0) coordinate is sent, the color value address uses the segment 1 starting address+0 to the starting address+2 in the mark, namely 0 to 2; when the 1 st pixel point (0, 1) coordinates are sent, the color value address uses the segment 1 starting address +3 to the starting address +5 in the mark, namely 3 to 5; when the coordinates of the 14 th pixel point (1, 4) are transmitted, the color value address is changed into a segment 1 starting address +42 to a starting address +44, namely 42 to 44, and at the moment, the starting address +44=44=segment 1 ending address, and the segment 1 ending is judged, and the segment 2 needs to be transmitted; so when sending the 15 th pixel (1, 5), the color value address uses segment 2 start address +0 to start address +2 in the flag, i.e. analogized to 300-302.
Fig. 7 shows an example of the case where three picture pixels overlap. Referring to fig. 7, in the same way, when the third picture is compressed, the pixel of the white background color is the portion where the third picture overlaps with the first picture (the color value is the same), the pixel of the gray background color (25, 26, 34, 35, 36, 44, 45, 55, 56, 57, 65, 66, 75, 76) is the portion where the third picture overlaps with the second picture (the color value is the same), and the pixel of the black background color is the portion where the third picture differs from the first picture and the second picture in color value.
Then the third picture only leaves 4 pixel points when compressing, and stores it into addresses 360-371;
section 1: 0 to 14 of a first picture; section 2: 15-16 of a third picture; section 3: 17-24 of a first picture; section 4: 25-26 of a second picture; … …; similarly, the specific address value in the tag is then replaced by {0,42,360,369,51,72,306,311, … … }
When the compressed picture is displayed: the first picture is displayed uncompressed, so when we display, the CPU sends the addresses of 100 pixels, namely 0 to 299, and the corresponding coordinates to the screen (display driving chip) in sequence.
A picture is displayed, essentially also a single pixel. The display of a pixel requires the CPU to send the x, y coordinates (corresponding to 10 x 10 resolution) and the color value address to the display driver chip. For example, the first point is displayed, the CPU sends (0, 0) and address 0 passed. Since the data is stored at a one-dimensional address, we will reduce the dimension of 10 x 10 to 100. Typically, rows are connected end to end, with the first row corresponding to 0-9 and the second row corresponding to 10-19, and so on. Therefore, the CPU is required to send four data (pixel coordinates, R/G/B addresses) to the display driver chip to display a pixel of RGB888, and the display driver chip changes the pixel at the corresponding position into the color corresponding to the data in the R/G/B address according to the data.
A storage unit 120, configured to store animation data of the animation to be displayed in a preset first storage area.
Wherein the first storage area is a fixed storage area. That is, a fixed storage area for storing animation data of an animation to be displayed is provided in the display device.
And a sending unit 130, configured to send, when the animation to be displayed needs to be displayed, display information for notifying the animation to be displayed and notification information of the address of the first storage area to a screen of the embedded terminal.
And reading the animation data of the animation to be displayed stored in the first storage area by the screen according to the address of the first storage area, and displaying the animation data according to the display information of the animation to be displayed. The screen (i.e., display screen) is a screen with a display driving chip. The display driving chip is matched with the screen generally, and is responsible for reading the address of the storage area informed by the processor, reading and displaying the data in the address, and the processor is not required to be responsible for displaying details in real time. The processor is only required to be configured with the driving chip once when the processor is started, then only required to store the data to be displayed into the corresponding address, and then the driving chip is notified, and the driving chip can automatically read the data and display the data.
Specifically, when the animation to be displayed is not required to be displayed, displaying is performed according to a normal display flow. And when the animation to be displayed is required to be displayed, sending display information for informing the animation to be displayed and notification information of the address of the first storage area to a screen. The screen reads the animation data of the animation to be displayed stored in the first storage area according to the address of the first storage area, and displays the animation data according to the display information of the animation to be displayed. The display information may specifically include: and the size and/or the display position of the area to be displayed with the animation. After the screen reads the animation data of the animation to be displayed according to the address of the first storage area, the color value of each pixel point on the screen is changed according to the read picture data according to the size and the display position of the area of the animation to be displayed, and then the picture corresponding to the picture data is displayed on the screen.
The present invention also provides a storage medium corresponding to the animation display method, having stored thereon a computer program which, when executed by a processor, implements the steps of any of the methods described above.
The invention also provides an embedded terminal corresponding to the animation display method, which comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the steps of any one of the methods when executing the program.
The invention also provides an embedded terminal corresponding to the animation display device, which comprises any one of the animation display devices.
According to the scheme provided by the invention, the animation effect is stored in the independent storage area, and the independent storage area is directly called when the animation is required to be displayed, so that the traditional process of going from the first-level cache to the second-level cache to the display equipment is omitted, the frame rate and the display effect of the animation are improved, the resource consumption for displaying the animation is reduced, and meanwhile, the operations of reducing the frame rate, reducing the color types and the like and reducing the user's look and feel are not required.
According to the technical scheme, the animation effect is split into a plurality of pictures in advance, the pictures are converted into the picture data and stored in the preset fixed storage area, and the calculation time for the processor to instantly draw the images is saved.
Through actual use, the frame rate can be improved by 10% -25% and the system resource consumption can be reduced by 15% -20% for different processors.
The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software that is executed by a processor, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Other examples and implementations are within the scope and spirit of the invention and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hardwired, or a combination of any of these. In addition, each functional unit may be integrated in one processing unit, each unit may exist alone physically, or two or more units may be integrated in one unit.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate components may or may not be physically separate, and components as control devices may or may not be physical units, may be located in one place, or may be distributed over a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the related art or all or part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above description is only an example of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (10)

1. An animation display method, comprising:
performing preset processing on the animation to be displayed of the embedded terminal to obtain animation data of the animation to be displayed;
storing the animation data of the animation to be displayed into a preset first storage area, wherein the first storage area is a fixed storage area;
when the animation to be displayed is required to be displayed, sending display information for informing the animation to be displayed and notification information of the address of the first storage area to a screen of the embedded terminal;
and reading the animation data of the animation to be displayed stored in the first storage area by the screen according to the address of the first storage area, and displaying the animation data according to the display information of the animation to be displayed.
2. The animation display method according to claim 1, wherein performing a preset process on an animation to be displayed on an embedded terminal to obtain animation data of the animation to be displayed, comprises:
Splitting the animation to be displayed into N pictures, and converting the N pictures into picture data, thereby obtaining the animation data of the animation to be displayed.
3. The animation display method according to claim 2, wherein the animation to be displayed on the embedded terminal is subjected to a preset process to obtain animation data of the animation to be displayed, and further comprising:
after converting the N pictures into picture data, judging whether each picture has the same part with the picture before the picture in the playing sequence according to the playing sequence of the pictures;
if the current picture and the picture before the current picture are judged to have the same part, the current picture is compressed based on the same part.
4. The animation display method according to claim 1 or 2, characterized in that,
the display information includes: the size of the area and/or the display position of the animation to be displayed.
5. An animation display device, comprising:
the processing unit is used for carrying out preset processing on the animation to be displayed of the embedded end to obtain animation data of the animation to be displayed;
a storage unit, configured to store animation data of the animation to be displayed in a preset first storage area, where the first storage area is a fixed storage area;
A sending unit, configured to send, when the animation to be displayed needs to be displayed, display information for notifying the animation to be displayed and notification information of an address of the first storage area to a screen of the embedded terminal;
and reading the animation data of the animation to be displayed stored in the first storage area by the screen according to the address of the first storage area, and displaying the animation data according to the display information of the animation to be displayed.
6. The animation display device according to claim 5, wherein the processing unit performs a preset process on an animation to be displayed on the embedded terminal to obtain animation data of the animation to be displayed, and the animation data comprises:
splitting the animation to be displayed into N pictures, and converting the N pictures into picture data, so as to obtain the animation data of the animation to be displayed.
7. The animation display device according to claim 6, wherein the processing unit performs a preset process on an animation to be displayed on the embedded terminal to obtain animation data of the animation to be displayed, and further comprises:
after converting the N pictures into picture data, judging whether each picture has the same part with the picture before the picture in the playing sequence according to the playing sequence of the pictures;
If the current picture and the picture before the current picture are judged to have the same part, the current picture is compressed based on the same part.
8. The animation display device according to any one of claims 5 to 7, wherein,
the display information includes: the size of the area and/or the display position of the animation to be displayed.
9. A storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of claims 1-4.
10. An embedded terminal comprising a processor, a memory and a computer program stored on the memory and executable on the processor, said processor implementing the steps of the method according to any one of claims 1-4 when said program is executed, comprising the animation display device according to any one of claims 5-8.
CN202310758658.8A 2023-06-25 2023-06-25 Animation display method and device, storage medium and embedded terminal Pending CN116821537A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310758658.8A CN116821537A (en) 2023-06-25 2023-06-25 Animation display method and device, storage medium and embedded terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310758658.8A CN116821537A (en) 2023-06-25 2023-06-25 Animation display method and device, storage medium and embedded terminal

Publications (1)

Publication Number Publication Date
CN116821537A true CN116821537A (en) 2023-09-29

Family

ID=88117959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310758658.8A Pending CN116821537A (en) 2023-06-25 2023-06-25 Animation display method and device, storage medium and embedded terminal

Country Status (1)

Country Link
CN (1) CN116821537A (en)

Similar Documents

Publication Publication Date Title
CN109783178B (en) Color adjusting method, device, equipment and medium for interface component
CA1236940A (en) Monochromatic representation of color images
CN109166159B (en) Method and device for acquiring dominant tone of image and terminal
JP2022524889A (en) Image rendering methods, equipment, equipment and computer programs
CN112614202A (en) GUI rendering display method, terminal, server, electronic device and storage medium
CN112714357B (en) Video playing method, video playing device, electronic equipment and storage medium
US20020122045A1 (en) Font anti-aliasing system
CN112596843A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN108694733B (en) MCU-based display system and display method for overlaying dynamic images on background image
US20120218292A1 (en) System and method for multistage optimized jpeg output
CN115297094A (en) Video transmission control method, device, equipment and computer readable storage medium
CN110969690A (en) Vertex animation data storage method and system based on texture
CN108989872B (en) Android television background fast switching method, framework, server and storage medium
CN112689188B (en) Large-screen rolling caption display method, device, terminal and storage medium
CN113645476A (en) Picture processing method and device, electronic equipment and storage medium
CN111614906B (en) Image preprocessing method and device, electronic equipment and storage medium
CN116821537A (en) Animation display method and device, storage medium and embedded terminal
CN116414510A (en) Display adjustment method based on intelligent management cockpit
CA1200025A (en) Graphic and textual image generator for a raster scan display
TWI391907B (en) Method for setting caption window attributes and associated tv system
CN108509112B (en) Menu display method and device, display equipment and storage medium
CN116880937A (en) Desktop screen capturing data processing method, device, equipment and medium for interactive classroom
CN109859328B (en) Scene switching method, device, equipment and medium
CN114222185B (en) Video playing method, terminal equipment and storage medium
CN113645484B (en) Data visualization accelerated rendering method based on graphic processor

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