A sequence frame animation playing method of a full-liquid-crystal instrument and electronic equipment
By preprocessing the sequence frame images into a GPU native compressed texture format during the development phase and utilizing memory mapping and GPU hardware decoding rendering, the problem of insufficient frame rate in sequence frame animation playback in the vehicle system was solved, achieving efficient and smooth animation playback and system startup.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGFENG MOTOR GRP
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-30
AI Technical Summary
Limited GPU, CPU, and I/O bandwidth performance of automotive SoC chips leads to insufficient frame rate and excessive resource consumption when playing high-resolution sequence frame animations, affecting system initialization efficiency and boot time.
During the development phase, the original images of the sequence frames are preprocessed in batches into a compressed texture format natively supported by the GPU. The file data is accessed directly through memory mapping technology, and the GPU performs hardware decoding and rendering, avoiding CPU software decoding and file I/O overhead.
It achieves efficient playback of sequence frame animations, reduces CPU usage, reduces memory bandwidth consumption, and ensures smooth animation playback during system startup without affecting initialization tasks.
Smart Images

Figure CN122308995A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer graphics processing technology, and in particular to a method and electronic device for playing sequential frame animations on a full LCD instrument. Background Technology
[0002] Currently, most fully digital instrument clusters use high-resolution displays. However, the limited performance of the GPU, CPU, and I / O bandwidth of automotive SoC chips results in insufficient frame rates when playing high-resolution sequence frame animations, leading to excessive consumption of various resources. Especially when playing boot animations, the kernel loading and system initialization consume a lot of resources, causing the boot animation to face multiple technical challenges: firstly, it needs to meet the real-time requirement of 30fps; secondly, there are storage space requirements; and thirdly, excessive use of CPU and DirectI / O will affect the system initialization efficiency, resulting in a longer system boot time. Summary of the Invention
[0003] In view of the technical defects and drawbacks existing in the prior art, the present invention provides a method and electronic device for playing sequence frame animation based on GPU native compressed texture to overcome the above problems or at least partially solve the above problems. The specific solution is as follows;
[0004] As a first aspect of the present invention, a method for playing sequential frame animation on a full LCD instrument panel is provided, comprising the following steps:
[0005] Preprocessing steps: During the development phase, the original images of the sequence frames are batch preprocessed into a compressed texture format natively supported by the GPU to generate a sequence frame data file containing compressed texture data of multiple frames;
[0006] The runtime playback steps include:
[0007] Resource preloading: During system runtime, the graphics rendering environment is initialized, and framebuffer objects and texture objects are created for display rendering;
[0008] Data mapping: The sequence frame data file is mapped to the process address space through memory mapping, establishing direct access from file data to memory;
[0009] Animation rendering loop: In the rendering loop, for each frame, the corresponding compressed texture data block is directly read from the mapped memory address according to the current frame number, and the compressed texture data block is directly uploaded to the texture object of the GPU through the graphics rendering interface. The GPU performs real-time decoding and rendering, and submits the rendering result to the display buffer for display.
[0010] In some embodiments, the preprocessing step specifically includes:
[0011] Image input: Obtain an image directory containing multiple sequentially named original image files, wherein the original image files are in PNG or JPG format with an alpha channel;
[0012] Data transformation: Perform the following operations frame by frame using the sequence frame generation tool:
[0013] Read the original image file of the current frame and decode it into RGBA pixel data;
[0014] The RGBA pixel data is encoded into compressed texture data blocks in ETC2 format;
[0015] File generation steps: All ETC2 format compressed texture data blocks generated in sequence are binary-stitched according to frame order to generate the sequence frame data file containing multiple frames of compressed texture data.
[0016] In some embodiments, the sequence frame data file includes file header information and compressed texture data blocks stored in frame order. The file header information includes at least one or more of the following: frame number, single-frame compressed data block size, and compression format identifier.
[0017] In some embodiments, the data mapping specifically includes:
[0018] The sequence frame data file is mapped to the address space of the current process by a memory mapping function, establishing a mapping relationship between file data and memory, so that the content of the sequence frame data file can be directly accessed through memory address.
[0019] In some embodiments, the animation rendering loop specifically includes:
[0020] Data acquisition: Based on the current frame number and the size of the compressed data block of a single frame, calculate the offset address of the current frame data in the mapped memory, and read the compressed texture data of the current frame from the offset address;
[0021] Texture update: The OpenGL ES glBindTexture interface is called to bind the texture object, and then the glCompressedTexSubImage2D interface is called to directly upload the read compressed texture data to the GPU's texture memory;
[0022] Rendering and drawing: The pre-compiled shader program is called, the texture sampling parameters are set, and a rectangular patch covering the display area is drawn using the glDrawArrays instruction. The GPU then performs the rendering operation.
[0023] Display submission: Call the eglSwapBuffers interface to swap the rendered frame buffer contents to the display output device.
[0024] In some embodiments, when the texture object is created during resource preloading, the internal format of the texture object is set to GL_COMPRESSED_RGBA8_ETC2_EAC format.
[0025] In some embodiments, the method is performed during the vehicle system startup phase, which includes a system initialization process.
[0026] In some embodiments, the ETC2 format has a compression ratio of 1:4 for RGBA images.
[0027] In some embodiments, the GPU natively supported compressed texture formats include at least one of ETC2, ASTC, and PVRTC formats.
[0028] As a second aspect of the present invention, an electronic device is provided, comprising:
[0029] One or more processors;
[0030] Memory, used to store one or more programs;
[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement the methods described above.
[0032] The present invention has the following beneficial effects:
[0033] This invention achieves efficient playback of frame-by-frame animation through a three-stage architecture: preprocessing during development, runtime memory mapping, and direct GPU rendering. Specifically, during development, raw images are batch-preprocessed into compressed texture format, avoiding the overhead of repetitive format conversion at runtime; a direct access channel from file to memory is established through memory mapping technology, eliminating data copying and kernel-mode switching overhead during file I / O; and during rendering, the GPU directly performs hardware decoding and rendering of the compressed texture, completely eliminating the CPU's software decoding burden. These three techniques work synergistically to significantly reduce CPU usage and memory bandwidth consumption during frame-by-frame animation playback, making it particularly suitable for resource-constrained environments such as in-vehicle systems, allowing for smooth animation playback during system startup without affecting other initialization tasks. Attached Figure Description
[0034] Figure 1 A flowchart illustrating a method for playing a sequence frame animation on a full LCD instrument, as provided in an embodiment of the present invention;
[0035] Figure 2 A flowchart illustrating the preprocessing steps provided in an embodiment of the present invention;
[0036] Figure 3 A flowchart illustrating the animation rendering loop provided in an embodiment of the present invention;
[0037] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0038] To enable those skilled in the art to better understand the technical solutions of the present invention, exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0039] Where there is no conflict, the various embodiments of the present invention and the features thereof may be combined with each other.
[0040] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.
[0041] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Terms such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.
[0042] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having the meaning consistent with their meaning in the context of the relevant art and the invention, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined herein.
[0043] In the technical solution of this invention, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information all comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example: appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely locating a specific individual.
[0044] To address at least one of the technical problems existing in the aforementioned related technologies, the present invention provides a method for playing sequential frame animations in a full LCD instrument. Figure 1 A flowchart illustrating a method for playing a sequence frame animation on a full LCD instrument, as provided in an embodiment of the present invention, includes the following steps:
[0045] Preprocessing steps: During the development phase, the original images of the sequence frames are batch preprocessed into a compressed texture format natively supported by the GPU to generate a sequence frame data file containing compressed texture data of multiple frames;
[0046] The runtime playback steps include:
[0047] S1. Resource preloading: During system runtime, the graphics rendering environment is initialized, and framebuffer objects and texture objects are created for display rendering.
[0048] S2, Data Mapping: The sequence frame data file is mapped to the process address space through memory mapping, establishing direct access from file data to memory;
[0049] S3. Animation rendering loop: In the rendering loop, for each frame, the corresponding compressed texture data block is directly read from the mapped memory address according to the current frame number. The compressed texture data block is directly uploaded to the texture object of the GPU through the graphics rendering interface. The GPU performs real-time decoding and rendering, and submits the rendering result to the display buffer for display.
[0050] This invention achieves efficient playback of frame-by-frame animation through a three-stage architecture: preprocessing during development, runtime memory mapping, and direct GPU rendering. Specifically, during development, raw images are batch-preprocessed into compressed texture format, avoiding the overhead of repetitive format conversion at runtime; a direct access channel from file to memory is established through memory mapping technology, eliminating data copying and kernel-mode switching overhead during file I / O; and during rendering, the GPU directly performs hardware decoding and rendering of the compressed texture, completely eliminating the CPU's software decoding burden. These three techniques work synergistically to significantly reduce CPU usage and memory bandwidth consumption during frame-by-frame animation playback, making it particularly suitable for resource-constrained environments such as in-vehicle systems, allowing for smooth animation playback during system startup without affecting other initialization tasks.
[0051] refer to Figure 2 As shown, in some embodiments, the preprocessing step specifically includes:
[0052] Image input: Obtain an image directory containing multiple sequentially named original image files, wherein the original image files are in PNG or JPG format with an alpha channel;
[0053] Data transformation: Perform the following operations frame by frame using the sequence frame generation tool:
[0054] Read the original image file of the current frame and decode it into RGBA pixel data;
[0055] The RGBA pixel data is encoded into compressed texture data blocks in ETC2 format;
[0056] File generation steps: All ETC2 format compressed texture data blocks generated in sequence are binary-stitched according to frame order to generate the sequence frame data file containing multiple frames of compressed texture data.
[0057] The above embodiments utilize a sequence frame generation tool to perform batch preprocessing of multiple image frames, thereby achieving efficient generation of compressed textures. Specifically, the original image files, named sequentially, are decoded frame by frame into RGBA pixel data, then encoded into a GPU-native compression format such as ETC2, and finally concatenated in frame order to generate a sequence frame data file. Compared to manual processing frame by frame, this batch processing method significantly improves development efficiency and reduces human error. Simultaneously, the tool-based processing ensures consistency in compression format and accuracy of frame order, avoiding rendering problems caused by format mismatches or frame order errors at runtime. The generated sequence frame data file can be directly loaded at runtime, simplifying the development process and improving code maintainability.
[0058] In some embodiments, the sequence frame data file includes file header information and compressed texture data blocks stored in frame order. The file header information includes at least one or more of the following: frame number, single-frame compressed data block size, and compression format identifier.
[0059] In the above embodiments, the file header information contains key metadata such as the number of frames and the size of a single frame, which enables the runtime to quickly obtain playback parameters without parsing the entire file, thus shortening the initialization time. Through the single frame size information, the offset address of any frame can be directly calculated, enabling random access and fast positioning, and avoiding the overhead of traversing frame by frame. The compression format identifier ensures that the runtime can correctly identify the data format, avoiding rendering errors caused by format mismatch.
[0060] In some embodiments, S2 specifically includes:
[0061] The sequence frame data file is mapped to the address space of the current process through a memory mapping function, establishing a mapping relationship between file data and memory, so that the content of the sequence frame data file can be directly accessed through memory address;
[0062] The memory mapping function maps the sequence frame data file into the address space of the current process in a read-only manner.
[0063] The above embodiments utilize memory mapping technology to directly map sequence frame data files to the process address space, achieving zero-copy access to file data. Specifically, after establishing the file-to-memory mapping relationship using memory mapping functions, applications can directly access file content through memory addresses without going through traditional read / write system calls. This avoids the data copying overhead of kernel page caches to user space, reducing CPU usage and memory bandwidth consumption. This access method is particularly suitable for scenarios like sequence frame animations that require frequent reading of large amounts of frame data. By eliminating file I / O bottlenecks, it significantly improves data reading efficiency, provides a stable data stream for subsequent GPU rendering, and ensures smooth animation playback.
[0064] refer to Figure 3 As shown, in some embodiments, S3 specifically includes:
[0065] Data acquisition: Based on the current frame number and the size of the compressed data block of a single frame, calculate the offset address of the current frame data in the mapped memory, and read the compressed texture data of the current frame from the offset address;
[0066] Texture update: The OpenGL ES glBindTexture interface is called to bind the texture object, and then the glCompressedTexSubImage2D interface is called to directly upload the read compressed texture data to the GPU's texture memory;
[0067] Rendering and drawing: The pre-compiled shader program is called, the texture sampling parameters are set, and a rectangular patch covering the display area is drawn using the glDrawArrays instruction. The GPU then performs the rendering operation.
[0068] Display submission: Call the eglSwapBuffers interface to swap the rendered frame buffer contents to the display output device.
[0069] The above embodiment achieves efficient uploading and rendering of compressed textures through the OpenGL ES interface, specifically optimizing each step of the rendering loop. Specifically, compressed texture data is read directly from mapped memory by calculating offset addresses, avoiding additional memory copying; compressed data is uploaded directly to GPU memory via the glCompressedTexSubImage2D interface, eliminating the need for CPU decoding and reducing CPU load; pre-compiling shader programs avoids runtime compilation overhead, improving rendering efficiency; and finally, eglSwapBuffers completes frame buffer swapping. This rendering process fully utilizes the GPU's hardware decoding capabilities, freeing the CPU from heavy decoding tasks. Simultaneously, by optimizing API call order and parameter settings, OpenGL state switching overhead is reduced, resulting in overall improved rendering performance and ensuring stable frame rates for animation playback.
[0070] In some embodiments, when the texture object is created in S1, the internal format of the texture object is set to GL_COMPRESSED_RGBA8_ETC2_EAC format.
[0071] The above embodiments achieve correct identification and efficient processing of compressed textures by explicitly specifying the internal format as GL_COMPRESSED_RGBA8_ETC2_EAC when creating texture objects. Specifically, setting the internal format when creating texture objects during the resource preloading stage informs the GPU in advance of the data format to be uploaded subsequently. This allows the GPU to correctly configure texture units and avoids errors caused by runtime format conversion or format mismatch. Simultaneously, the explicit format identifier enables the GPU to use hardware-accelerated decoding units for processing, fully utilizing hardware performance. Compared to dynamic setting at runtime, this pre-setting method reduces state switching overhead, improves rendering efficiency, and ensures correct rendering of compressed texture data, avoiding rendering anomalies or performance degradation caused by ambiguous formats.
[0072] In some embodiments, the method is performed during the vehicle system startup phase, which includes a system initialization process.
[0073] The above embodiments, by limiting the execution to the vehicle system startup phase, achieve a synergistic optimization of smooth playback of the system startup animation and startup efficiency. Specifically, the sequence frame animation playback process is executed in parallel with the system initialization process, utilizing the relatively idle CPU and GPU resources during the startup phase to complete animation rendering without affecting critical initialization tasks. Through reasonable scheduling, stuttering issues caused by resource contention between animation playback and system initialization are avoided. At the same time, animation playback during the startup phase can improve the user experience, mask the time consumed by system initialization, and make the system startup process smoother and more natural.
[0074] In some embodiments, the ETC2 format has a compression ratio of 1:4 for RGBA images.
[0075] The above embodiments achieve efficient utilization of storage space and stable rendering performance by limiting the ETC2 format to a fixed compression ratio of 1:4. Specifically, a compression ratio of 1:4 means that after compression, the storage space occupied by the original RGBA image data is reduced by 75%, significantly reducing the size of the sequence frame data file, and reducing storage media usage and file transfer time.
[0076] In some embodiments, the method accesses file data by using a GPU-native compressed texture format and memory mapping, eliminating the need for runtime software decoding of image data. By using a GPU-native compressed texture format and memory mapping, runtime software decoding is completely eliminated. Specifically, the compressed texture format is directly decoded by the GPU hardware, eliminating the need for any software decoding calculations by the CPU, thus completely offloading the decoding task to the GPU and significantly reducing CPU utilization. The memory mapping method establishes a direct access channel from the file to memory, avoiding the data copying overhead of traditional file I / O and further reducing CPU and memory bandwidth consumption.
[0077] In some embodiments, the GPU natively supported compressed texture formats include at least one of ETC2, ASTC, and PVRTC formats.
[0078] The above embodiments achieve flexible adaptation and broad compatibility of the technical solution by limiting the compressed texture format to multiple formats natively supported by GPUs, such as ETC2, ASTC, and PVRTC. Specifically, different GPU hardware platforms have varying capabilities in supporting compression formats. By supporting multiple mainstream compression formats, this solution can adapt to different models of automotive chips and GPU hardware from different manufacturers, improving the versatility and portability of the technical solution. At the same time, the choice of multiple formats provides room for performance optimization, allowing the selection of the most suitable compression format based on the hardware characteristics of the target platform, achieving the best balance between compression ratio, image quality, and decoding performance.
[0079] Based on the same inventive concept, embodiments of the present invention also provide an electronic device. Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Figure 4 As shown, an embodiment of the present invention provides an electronic device including: one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, which, when executed by the one or more processors, enable the one or more processors to implement any of the GPU native compressed texture-based sequence frame animation playback methods described in the above embodiments; the one or more I / O interfaces 103 are connected between the processor and the memory, configured to enable information interaction between the processor and the memory.
[0080] The processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read / write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus).
[0081] In some embodiments, the processor 101, memory 102, and I / O interface 103 are interconnected via bus 104, and thus connected to other components of the computing device.
[0082] In some embodiments, the one or more processors 101 include a field-programmable gate array.
[0083] This invention also provides a computer-readable medium. The computer-readable medium stores a computer program, which, when executed by a processor, implements the steps in any of the GPU-native compressed texture-based sequence frame animation playback methods described in the above embodiments. The computer-readable storage medium can be volatile or non-volatile.
[0084] This invention also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes any of the above-described methods for playing sequence frame animations based on GPU native compressed textures.
[0085] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).
[0086] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0087] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0088] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.
[0089] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0090] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0091] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0092] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0093] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0094] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.
Claims
1. A method for playing sequential frame animation on a full LCD instrument, characterized in that, Includes the following steps: Preprocessing steps: During the development phase, the original images of the sequence frames are batch preprocessed into a compressed texture format natively supported by the GPU to generate a sequence frame data file containing compressed texture data of multiple frames; The runtime playback steps include: Resource preloading: During system runtime, the graphics rendering environment is initialized, and framebuffer objects and texture objects are created for display rendering; Data mapping: The sequence frame data file is mapped to the process address space through memory mapping, establishing direct access from file data to memory; Animation rendering loop: In the rendering loop, for each frame, the corresponding compressed texture data block is directly read from the mapped memory address according to the current frame number, and the compressed texture data block is directly uploaded to the texture object of the GPU through the graphics rendering interface. The GPU performs real-time decoding and rendering, and submits the rendering result to the display buffer for display.
2. The method according to claim 1, characterized in that, The preprocessing steps specifically include: Image input: Obtain an image directory containing multiple sequentially named original image files, wherein the original image files are in PNG or JPG format with an alpha channel; Data transformation: Perform the following operations frame by frame using the sequence frame generation tool: Read the original image file of the current frame and decode it into RGBA pixel data; The RGBA pixel data is encoded into compressed texture data blocks in ETC2 format; File generation: All the sequentially generated ETC2 format compressed texture data blocks are binary-stitched in frame order to generate the sequence frame data file containing multiple frames of compressed texture data.
3. The method according to claim 2, characterized in that, The sequence frame data file includes file header information and compressed texture data blocks stored in frame order. The file header information includes at least one or more of the following: frame number, single frame compressed data block size, and compression format identifier.
4. The method according to claim 2, characterized in that, The data mapping specifically includes: The sequence frame data file is mapped to the address space of the current process by a memory mapping function, establishing a mapping relationship between file data and memory, so that the content of the sequence frame data file can be directly accessed through memory address.
5. The method according to claim 4, characterized in that, The animation rendering loop specifically includes: Data acquisition: Based on the current frame number and the size of the compressed data block of a single frame, calculate the offset address of the current frame data in the mapped memory, and read the compressed texture data of the current frame from the offset address; Texture update: The OpenGL ES glBindTexture interface is called to bind the texture object, and then the glCompressedTexSubImage2D interface is called to directly upload the read compressed texture data to the GPU's texture memory; Rendering: The pre-compiled shader program is called, the texture sampling parameters are set, and a rectangular patch covering the display area is drawn using the glDrawArrays instruction. The GPU then performs the rendering operation. Display submission: Call the eglSwapBuffers interface to swap the rendered frame buffer contents to the display output device.
6. The method according to claim 5, characterized in that, When the texture object is created during resource preloading, the internal format of the texture object is set to GL_COMPRESSED_RGBA8_ETC2_EAC format.
7. The method according to claim 1, characterized in that, The method is executed during the vehicle system startup phase, which includes a system initialization process.
8. The method according to claim 2, characterized in that, The ETC2 format has a compression ratio of 1:4 for RGBA images.
9. The method according to claim 1, characterized in that, The compressed texture formats natively supported by the GPU include at least one of the ETC2, ASTC, and PVRTC formats.
10. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-9.