Dynamic wallpaper generation method based on embedded high frame rate and chip

By using hardware decoding modules and GPUs in the dynamic wallpaper generation method to decode and render video streams, the compatibility and performance problems of dynamic wallpaper in the existing technology are solved, and efficient and fast dynamic wallpaper generation is achieved.

CN119847655APending Publication Date: 2025-04-18YEKER INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411864563.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

When implementing dynamic wallpapers in the existing technology, the HEIF format is not compatible with software such as Windows platform and PhotoShop, and requires special decoding hardware support, which increases cost and compatibility issues; while the dynamic wallpaper generation method of Windows system requires storing a large amount of image data, resulting in large file size and increased GPU computing volume, and heavy performance burden.

Method used

The dynamic wallpaper generation method based on embedded high frame rate is adopted, and the video stream is decoded through the hardware decoding module, I frame and P frame information are obtained, and the complete P frame YUV data is merged and generated, and the GPU converts it into RGB data, and drawn into the rendering interface to form a dynamic wallpaper.

Benefits of technology

This enables direct and rapid rendering of videos into dynamic wallpaper, reducing the GPU's computing volume and rendering bandwidth, improving rendering efficiency, and reducing cost and compatibility issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847655A_ABST
    Figure CN119847655A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic wallpaper generation method based on an embedded high frame rate and a chip, the method and the chip are suitable for the chip, the chip comprises a hardware decoding module and a GPU, the method comprises the following steps: obtaining a to-be-rendered video stream, decoding the video stream through the hardware decoding module, and obtaining a to-be-rendered video stream; the method comprises the following steps: decoding a video stream to obtain decoded first I-frame information and first P-frame information, combining the first I-frame information and the first P-frame information to obtain finished second P-frame information, and obtaining P-frame YUV data corresponding to the second P-frame information, the video stream comprising the first I-frame information and the first P-frame information; and the GPU converts the P frames of YUV data into corresponding RGB (Red, Green and Blue) data, and draws the RGB data into a pre-created rendering interface to form the dynamic wallpaper. According to the method and the device, the video can be directly and quickly rendered into the dynamic wallpaper.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of dynamic wallpapers, and in particular to a method and chip for generating dynamic wallpapers based on embedded high frame rate. Background Art

[0002] With the development of computer technology, electronic products with screens such as mobile phones, computers, and tablets have become daily necessities. Users can set their favorite dynamic wallpapers on the screen to make the desktop more beautiful, thereby realizing the user's personalized needs for the desktop.

[0003] In the technical implementation of dynamic wallpaper, the Linux system uses the advanced HEIF encoding format, which is efficiently coupled through the box module of the small window and uses the change of the box angle parameter to optimize the size of the predicted frame, thereby significantly reducing the file size of the dynamic wallpaper. However, the HEIF format is currently not compatible with the Windows platform and mainstream editing software such as PhotoShop, which greatly limits its wide application. In addition, the use of the HEIF format also requires special decoding hardware support, which not only increases the cost, but also affects the compatibility of dynamic wallpapers on different devices. In contrast, the Windows system uses a relatively simple method to achieve the dynamic wallpaper effect, that is, to display multiple pictures in a specific time sequence to achieve dynamic wallpaper generation. However, this method requires the storage of a large amount of picture data, resulting in a large file size of the dynamic wallpaper. At the same time, during the playback of the dynamic wallpaper, the GPU needs to process a large amount of image data, and the amount of calculation increases greatly. As the frame rate increases, the rendering bandwidth occupied by the GPU also increases, further exacerbating the performance burden.

[0004] Application Contents

[0005] The present application provides a method and chip for generating dynamic wallpaper based on embedded high frame rate, so as to directly and quickly render the video into dynamic wallpaper.

[0006] In a first aspect, the present application provides a method for generating a dynamic wallpaper based on an embedded high frame rate, which is applicable to a chip, wherein the chip includes a hardware decoding module and a GPU, and the method includes:

[0007] Obtain a video stream to be rendered, decode the video stream through the hardware decoding module to obtain decoded first I frame information and first P frame information, merge the first I frame information and the first P frame information to obtain completed second P frame information, and obtain P frame YUV data corresponding to the second P frame information, wherein the video stream includes the first I frame information and the first P frame information;

[0008] The GPU converts the P frame YUV data into corresponding RGB data, and draws the RGB data into a pre-created rendering interface to form a dynamic wallpaper.

[0009] The embodiment of the present application decodes the video stream through the hardware decoding module, and can accurately decode the first I frame information and the first P frame information, thereby ensuring the efficiency of video decoding and facilitating the subsequent reconstruction of the second P frame information using the first I frame information; by merging the first I frame information and the first P frame information, the first I frame information can be accurately used to reconstruct the second P frame information, thereby facilitating the subsequent acquisition of the corresponding P frame YUV data and passing it to the GPU for rendering; the GPU converts the P frame YUV data into corresponding RGB data, and can make full use of the P frame YUV data to match the GPU drawing area, and reduce the amount of drawing data by reducing the rendering area, thereby achieving the goal of meeting the frame rate while reducing the amount of GPU calculation, thereby improving the rendering efficiency; by drawing the RGB data into a pre-created rendering interface, the P frame YUV data can be used to match the GPU drawing area, thereby reducing the rendering area, reducing the amount of drawing data, and improving the rendering efficiency, thereby achieving the goal of meeting the frame rate while reducing the amount of GPU calculation. Compared with the prior art, the present application can directly and quickly render the video into a dynamic wallpaper.

[0010] Further, the video stream is decoded by the hardware decoding module to obtain the decoded first I frame information and the first P frame information, specifically:

[0011] Decoding the video stream by the hardware decoding module to obtain first I frame information;

[0012] Searching for a reference frame on which the P frame depends based on the first I frame information, and determining a motion vector and residual data corresponding to the P frame based on the reference frame, wherein the reference frame includes a reference I frame or a reference P frame;

[0013] Based on the motion vector and the residual data, the first P frame information is determined.

[0014] In this way, by decoding the video stream through the hardware decoding module, the first I frame information and the first P frame information can be accurately decoded, thereby ensuring the efficiency of video decoding and facilitating the subsequent reconstruction of the second P frame information using the first I frame information.

[0015] Furthermore, the GPU converts the P frame YUV data into corresponding RGB data, specifically:

[0016] The P frame YUV data is obtained through a preset shader, and the RGB value of each pixel in the P frame YUV data is calculated to obtain the RGB data corresponding to the P frame YUV data.

[0017] In this way, by converting the P frame YUV data into corresponding RGB data, the P frame YUV data can be fully utilized to match the GPU drawing area, thereby improving the rendering efficiency.

[0018] Furthermore, the RGB data is drawn into a pre-created rendering interface to form a dynamic wallpaper, specifically:

[0019] Create a rendering interface in the wallpaper preview window;

[0020] The GPU maps the RGB data as texture data to the shape of the rendering interface to form a dynamic wallpaper.

[0021] In this way, by drawing the RGB data into a pre-created rendering interface, the P frame YUV data can be used to match the GPU drawing area, reducing the rendering area, reducing the amount of drawing data, and improving rendering efficiency, thereby meeting the frame rate while reducing the amount of GPU calculations.

[0022] Furthermore, the method for generating dynamic wallpaper based on embedded high frame rate also includes:

[0023] Creating an application window in the wallpaper preview window through GUI, and drawing the graphic content of the application program into the application window to obtain an application interface;

[0024] The dynamic wallpaper and the application interface are superimposed and calculated by a hardware acceleration module to obtain a composite image, and the composite image is displayed in the wallpaper preview window.

[0025] In this way, by using the hardware acceleration module to manage the interface, it can be ensured that the application interface and the rendering interface are merged and displayed, which can ensure the integrity of multiple screens and avoid the occurrence of screen distortion and other situations. In addition, the hardware acceleration module is used to balance the work of the GPU to ensure that the GPU drawing is smoother.

[0026] In a second aspect, the present application provides a chip, including: a hardware decoding module and a GPU;

[0027] The hardware decoding module is used to obtain a video stream to be rendered, decode the video stream, obtain decoded first I frame information and first P frame information, merge the first I frame information and the first P frame information to obtain completed second P frame information, and obtain P frame YUV data corresponding to the second P frame information, wherein the video stream includes the first I frame information and the first P frame information;

[0028] The GPU is used to convert the P frame YUV data into corresponding RGB data, and draw the RGB data into a pre-created rendering interface to form a dynamic wallpaper.

[0029] The embodiment of the present application decodes the video stream through the hardware decoding module, and can accurately decode the first I frame information and the first P frame information, thereby ensuring the efficiency of video decoding and facilitating the subsequent reconstruction of the second P frame information using the first I frame information; by merging the first I frame information and the first P frame information, the second P frame information can be accurately reconstructed using the first I frame information, thereby facilitating the subsequent acquisition of the corresponding P frame YUV data and passing it to the GPU for rendering; the GPU converts the P frame YUV data into corresponding RGB data, and can make full use of the P frame YUV data to match the GPU drawing area, thereby improving the rendering efficiency; by drawing the RGB data into a pre-created rendering interface, the P frame YUV data can be used to match the GPU drawing area, thereby reducing the rendering area, reducing the amount of drawing data, and improving the rendering efficiency, thereby achieving the goal of meeting the frame rate while reducing the amount of GPU calculation. Compared with the prior art, the present application can directly and quickly render a video into a dynamic wallpaper.

[0030] Further, the hardware decoding module includes: a decoding unit, a searching unit and a determining unit;

[0031] The decoding unit is used to decode the video stream to obtain first I frame information;

[0032] The search unit is used to search for a reference frame on which the P frame depends based on the first I frame information, and determine a motion vector and residual data corresponding to the P frame based on the reference frame, wherein the reference frame includes a reference I frame or a reference P frame;

[0033] The determining unit is used to determine the first P frame information based on the motion vector and the residual data.

[0034] Further, the GPU includes: a conversion unit;

[0035] The conversion unit is used to obtain the P frame YUV data through a preset shader, and calculate the RGB value of each pixel in the P frame YUV data to obtain RGB data corresponding to the P frame YUV data.

[0036] Furthermore, the GPU further includes: a first creation unit and a rendering unit;

[0037] The first creation unit is used to create a rendering interface in the wallpaper preview window;

[0038] The rendering unit is used to map the RGB data as texture data onto the shape of the rendering interface to form a dynamic wallpaper.

[0039] Furthermore, the chip also includes a hardware acceleration module and a GUI:

[0040] The GUI is used to create an application window in the wallpaper preview window and draw the graphic content of the application program into the application window to obtain an application interface;

[0041] The hardware acceleration module is used to perform superposition calculation on the dynamic wallpaper and the application interface to obtain a composite image, and display the composite image in the wallpaper preview window. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flowchart of an embodiment of a method for generating a dynamic wallpaper based on an embedded high frame rate provided by the present application;

[0043] Figure 2 It is a schematic diagram of the structure of an embodiment of the chip provided in this application. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] It should be understood that the step numbers used in this article are only for the convenience of description and are not intended to limit the order in which the steps are executed.

[0046] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.

[0047] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0048] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.

[0049] With the development of computer technology, mobile phones, computers, tablets and other electronic products with screens have become popular. Users can set dynamic wallpapers on the screen to beautify the desktop and meet personalized needs. At present, the Linux system uses the HEIF format, which is efficiently coupled through the box module of the small window and uses the change of the box angle parameter to optimize the size of the predicted frame, thereby significantly reducing the file size of the dynamic wallpaper. However, it is not compatible with Windows and PhotoShop, and the HEIF format also requires special decoding hardware support, which increases the cost. Windows displays pictures in sequence to achieve dynamics, but the picture data is large, the volume is large, the GPU processing volume is large, and the increase in frame rate increases the performance burden.

[0050] Next, the nouns involved in this application are analyzed:

[0051] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0052] YUV is a color encoding method used to represent the brightness (Y) and chrominance (U, V) information of an image.

[0053] Based on this, the embodiment of the present application provides a method and chip for generating dynamic wallpaper based on embedded high frame rate, so as to directly and quickly render the video into dynamic wallpaper.

[0054] The embodiment of the present application provides a method and chip for generating a dynamic wallpaper based on an embedded high frame rate, which are specifically described through the following embodiments. First, the method for generating a dynamic wallpaper based on an embedded high frame rate in the embodiment of the present application is described.

[0055] The method for generating dynamic wallpaper based on embedded high frame rate provided in the embodiment of the present application relates to the field of dynamic wallpaper. The method for generating dynamic wallpaper based on embedded high frame rate provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements a method for generating dynamic wallpaper based on embedded high frame rate, etc., but is not limited to the above forms.

[0056] The present application can also be used in numerous general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0057] Embodiment 1

[0058] Please refer to Figure 1 , Figure 1 It is a flow chart of an embodiment of a method for generating a dynamic wallpaper based on an embedded high frame rate provided by the present application, which is applicable to a chip, wherein the chip includes a hardware decoding module and a GPU, and the method includes steps S101 to S102;

[0059] Step S101, obtaining a video stream to be rendered, decoding the video stream through the hardware decoding module to obtain decoded first I frame information and first P frame information, merging the first I frame information and the first P frame information to obtain completed second P frame information, and obtaining P frame YUV data corresponding to the second P frame information, wherein the video stream includes the first I frame information and the first P frame information;

[0060] In some embodiments, obtaining the video stream to be rendered specifically includes: obtaining the video stream to be rendered from a video source (such as a file, a network stream, etc.), that is, directly downloading the required video stream from the network, or determining the video stream to be rendered from a database.

[0061] In some embodiments, the video stream includes a series of frames, such as I frames (key frames), P frames (predicted frames), or B frames (bi-directionally predicted frames).

[0062] In some embodiments, the video stream is decoded by the hardware decoding module to obtain decoded first I frame information and first P frame information, including: decoding the video stream by the hardware decoding module to obtain first I frame information; searching for a reference frame on which the P frame depends based on the first I frame information, and determining a motion vector and residual data corresponding to the P frame based on the reference frame, wherein the reference frame includes a reference I frame or a reference P frame; determining the first P frame information based on the motion vector and the residual data. Specifically, after the hardware decoding module receives the video stream, it will parse the video stream. Since the I frame is independent and does not depend on other frames, the hardware decoding module can directly parse the first I frame information; secondly, after parsing the first I frame information, the hardware decoding module needs to use the first I frame information to find the reference frame on which the P frame depends, where the reference frame is the most recent I frame or the previous P frame. After that, the hardware decoding module needs to read the information in the P frame header to determine which reference frames are used, and find the location of these reference frames in the memory, and use the reference frame to determine the motion vector and residual data of the P frame; finally, after obtaining the motion vector and residual data, the hardware decoding module needs to find the corresponding block in the reference frame according to the motion vector, and adjust it according to the residual data, so as to determine the first P frame information.

[0063] It should be noted that the motion vector indicates the position of each block in the P frame in the reference frame, and the residual data represents the difference between these blocks and the corresponding blocks in the reference frame.

[0064] It should be noted that the first I frame information and the second I frame information, the first P frame information and the second P frame information are understood as nouns.

[0065] It should be noted that the first I frame information includes complete image information, while the first P frame information includes differential information relative to the previous I frame or P frame.

[0066] In this way, by decoding the video stream through the hardware decoding module, the first I frame information and the first P frame information can be accurately decoded, thereby ensuring the efficiency of video decoding and facilitating the subsequent reconstruction of the second P frame information using the first I frame information.

[0067] In some embodiments, the first I frame information and the first P frame information are merged to obtain the completed second P frame information, specifically: using the decoded I frame image as a reference, combined with the prediction information and difference data in the P frame, it can be understood that the difference data is applied to the corresponding position of the I frame or the previous P frame to reconstruct the complete image of the P frame, that is, the second P frame information.

[0068] In some embodiments, obtaining the P frame YUV data corresponding to the second P frame information includes: after determining the second P frame information, the hardware decoding module outputs the P frame YUV data corresponding to the second P frame information and passes it to the GPU for rendering.

[0069] Step S102: The GPU converts the P frame YUV data into corresponding RGB data, and draws the RGB data into a pre-created rendering interface to form a dynamic wallpaper.

[0070] In some embodiments, the GPU converts the P-frame YUV data into corresponding RGB data, including: obtaining the P-frame YUV data through a preset shader, and calculating the RGB value of each pixel in the P-frame YUV data to obtain the RGB data corresponding to the P-frame YUV data. Specifically, after the GPU obtains the P-frame YUV data, it creates one or more textures to store the YUV data to obtain the texture coordinates corresponding to the YUV data, and then writes a fragment shader to convert the texture coordinates into RGB values ​​through a conversion formula, and then outputs the RGB data corresponding to the P-frame YUV data.

[0071] In this way, by converting the P frame YUV data into corresponding RGB data, the P frame YUV data can be fully utilized to match the GPU drawing area, thereby improving the rendering efficiency.

[0072] In some embodiments, the RGB data is drawn into a pre-created rendering interface to form a dynamic wallpaper, including: creating a rendering interface in the wallpaper preview window; the GPU maps the RGB data as texture data to the shape of the rendering interface to form a dynamic wallpaper. Specifically, the GPU will create a rendering interface in the wallpaper preview window in advance and set its vertex data and texture coordinates. After that, the GPU drawing command is used to map the acquired RGB data to the rendering interface, that is, to achieve the replacement of the corresponding area. Since there is more than one P frame in the video stream, the video stream needs to be continuously decoded by the hardware decoding module to form new YUV data and render it, and the cycle is repeated in sequence to obtain the dynamic wallpaper.

[0073] In this way, by drawing the RGB data into a pre-created rendering interface, the P frame YUV data can be used to match the GPU drawing area, reducing the rendering area, reducing the amount of drawing data, and improving rendering efficiency, thereby meeting the frame rate while reducing the amount of GPU calculations.

[0074] In some embodiments, the method for generating dynamic wallpaper based on embedded high frame rate also includes: creating an application window in the wallpaper preview window through the GUI, and drawing the graphic content of the application into the application window to obtain an application interface; superimposing the dynamic wallpaper and the application interface through the hardware acceleration module to obtain a composite image, and displaying the composite image in the wallpaper preview window. Specifically, since other application windows will exist in the preview window when rendering the dynamic wallpaper, in order not to affect the normal operation of other windows, it is necessary to create an application window in the wallpaper preview window through the GUI, and the application window is used to display the graphic content of the application, and receive drawing instructions from the application, and convert these instructions into graphic content and draw them into the application window to obtain the application interface; then the hardware acceleration module superimposes the dynamic wallpaper and the application interface through the transparency setting, that is, the Alpha channel, to obtain a composite image containing the two windows and display it in the wallpaper preview window.

[0075] It should be noted that when the final composite image is displayed, the dynamic wallpaper is used as the bottom layer and the application interface is used as the upper layer. The two are merged through the Alpha channel and rendered into a composite interface through the hardware acceleration module G2D for display.

[0076] It should be noted that some form of communication or synchronization mechanism is required between the application and the GUI system to ensure that the graphic content of the application is updated synchronously with the dynamic wallpaper in the wallpaper preview window.

[0077] It should be noted that the GUI is only responsible for drawing and displaying the application window, while the GPU is responsible for converting the P-frame YUV data into RGB data for rendering, and the hardware acceleration module G2D is responsible for synthesizing images and displaying them. This ensures the integrity of GPU drawing and GUI drawing, and does not cause screen distortion or other problems.

[0078] It should be noted that the existing method decodes the complete I frame to the Surface through hardware and overlays the window through the GPU. All such workload is on the GPU. However, this application balances the GPU work through modules such as G2D, which can ensure that the GPU load is not too high, thereby ensuring smoother drawing.

[0079] In this way, by using the hardware acceleration module to manage the interface, it can be ensured that the application interface and the rendering interface are merged and displayed, which can ensure the integrity of multiple screens and avoid the occurrence of screen distortion and other situations. In addition, the hardware acceleration module is used to balance the work of the GPU to ensure that the GPU drawing is smoother.

[0080] The embodiment of the present application decodes the video stream through the hardware decoding module, and can accurately decode the first I frame information and the first P frame information, thereby ensuring the efficiency of video decoding and facilitating the subsequent reconstruction of the second P frame information using the first I frame information; by merging the first I frame information and the first P frame information, the first I frame information can be accurately used to reconstruct the second P frame information, thereby facilitating the subsequent acquisition of the corresponding P frame YUV data and passing it to the GPU for rendering; the GPU converts the P frame YUV data into corresponding RGB data, and can make full use of the P frame YUV data to match the GPU drawing area, and reduce the amount of drawing data by reducing the rendering area, thereby achieving the goal of meeting the frame rate while reducing the amount of GPU calculation, thereby improving the rendering efficiency; by drawing the RGB data into a pre-created rendering interface, the P frame YUV data can be used to match the GPU drawing area, thereby reducing the rendering area, reducing the amount of drawing data, and improving the rendering efficiency, thereby achieving the goal of meeting the frame rate while reducing the amount of GPU calculation. Compared with the prior art, the present application can directly and quickly render the video into a dynamic wallpaper.

[0081] Embodiment 2

[0082] Please refer to Figure 2 , Figure 1 It is a schematic diagram of the structure of an embodiment of a chip provided by the present application, comprising: a hardware decoding module 100 and a GPU 200;

[0083] The hardware decoding module 100 is used to obtain a video stream to be rendered, decode the video stream, obtain decoded first I frame information and first P frame information, merge the first I frame information and the first P frame information to obtain completed second P frame information, and obtain P frame YUV data corresponding to the second P frame information, wherein the video stream includes the first I frame information and the first P frame information;

[0084] In some embodiments, obtaining the video stream to be rendered specifically includes: obtaining the video stream to be rendered from a video source (such as a file, a network stream, etc.), that is, directly downloading the required video stream from the network, or determining the video stream to be rendered from a database.

[0085] In some embodiments, the video stream includes a series of frames, such as I frames (key frames), P frames (predicted frames), or B frames (bi-directionally predicted frames).

[0086] In some embodiments, the hardware decoding module 100 includes: a decoding unit, a search unit and a determination unit; the decoding unit is used to decode the video stream to obtain first I frame information; the search unit is used to search for a reference frame on which the P frame depends based on the first I frame information, and determine the motion vector and residual data corresponding to the P frame based on the reference frame, wherein the reference frame includes a reference I frame or a reference P frame; the determination unit is used to determine the first P frame information based on the motion vector and the residual data. Specifically, after the hardware decoding module receives the video stream, it will parse the video stream. Since the I frame is independent and does not depend on other frames, the hardware decoding module can directly parse the first I frame information; secondly, after parsing the first I frame information, the hardware decoding module needs to use the first I frame information to find the reference frame on which the P frame depends, where the reference frame is the most recent I frame or the previous P frame. After that, the hardware decoding module needs to read the information in the P frame header to determine which reference frames are used, and find the location of these reference frames in the memory, and use the reference frame to determine the motion vector and residual data of the P frame; finally, after obtaining the motion vector and residual data, the hardware decoding module needs to find the corresponding block in the reference frame according to the motion vector, and adjust it according to the residual data, so as to determine the first P frame information.

[0087] It should be noted that the motion vector indicates the position of each block in the P frame in the reference frame, and the residual data represents the difference between these blocks and the corresponding blocks in the reference frame.

[0088] It should be noted that the first I frame information and the second I frame information, the first P frame information and the second P frame information are understood as nouns.

[0089] It should be noted that the first I frame information includes complete image information, while the first P frame information includes differential information relative to the previous I frame or P frame.

[0090] In this way, by decoding the video stream through the hardware decoding module, the first I frame information and the first P frame information can be accurately decoded, thereby ensuring the efficiency of video decoding and facilitating the subsequent reconstruction of the second P frame information using the first I frame information.

[0091] In some embodiments, the first I frame information and the first P frame information are merged to obtain the completed second P frame information, specifically: using the decoded I frame image as a reference, combined with the prediction information and difference data in the P frame, it can be understood that the difference data is applied to the corresponding position of the I frame or the previous P frame to reconstruct the complete image of the P frame, that is, the second P frame information.

[0092] In some embodiments, obtaining the P frame YUV data corresponding to the second P frame information includes: after determining the second P frame information, the hardware decoding module outputs the P frame YUV data corresponding to the second P frame information and passes it to the GPU for rendering.

[0093] The GPU 200 is used to convert the P frame YUV data into corresponding RGB data, and draw the RGB data into a pre-created rendering interface to form a dynamic wallpaper.

[0094] In some embodiments, the GPU 200 includes: a conversion unit; the conversion unit is used to obtain the P frame YUV data through a preset shader, and calculate the RGB value of each pixel in the P frame YUV data to obtain the RGB data corresponding to the P frame YUV data. Specifically, after the GPU obtains the P frame YUV data, it will create one or more textures to store the YUV data to obtain the texture coordinates corresponding to the YUV data, and then write a fragment shader to convert the texture coordinates into RGB values ​​through a conversion formula, and then output the RGB data corresponding to the P frame YUV data.

[0095] In this way, by converting the P frame YUV data into corresponding RGB data, the P frame YUV data can be fully utilized to match the GPU drawing area, thereby improving the rendering efficiency.

[0096] In some embodiments, the GPU 200 further includes: a first creation unit and a rendering unit; the first creation unit is used to create a rendering interface in the wallpaper preview window; the rendering unit is used to map the RGB data as texture data to the shape of the rendering interface to form a dynamic wallpaper. Specifically, the GPU will create a rendering interface in the wallpaper preview window in advance and set its vertex data and texture coordinates. After that, the GPU drawing command is used to map the acquired RGB data to the rendering interface, that is, to achieve the replacement of the corresponding area. Since there is more than one P frame in the video stream, it is necessary to continuously decode the video stream through the hardware decoding module to form new YUV data and render it, and then cycle in sequence to obtain the dynamic wallpaper.

[0097] In this way, by drawing the RGB data into a pre-created rendering interface, the P frame YUV data can be used to match the GPU drawing area, reducing the rendering area, reducing the amount of drawing data, and improving rendering efficiency, thereby meeting the frame rate while reducing the amount of GPU calculations.

[0098] In some embodiments, the chip further includes a hardware acceleration module and a GUI: the GUI is used to create an application window in the wallpaper preview window, and draw the graphic content of the application into the application window to obtain an application interface; the hardware acceleration module is used to perform superposition calculations on the dynamic wallpaper and the application interface to obtain a composite image, and display the composite image in the wallpaper preview window. Specifically, since other application windows will exist in the preview window when rendering the dynamic wallpaper, in order not to affect the normal operation of other windows, it is necessary to create an application window in the wallpaper preview window through the GUI, and the application window is used to display the graphic content of the application, and receive drawing instructions from the application, and convert these instructions into graphic content and draw them into the application window to obtain the application interface; then the hardware acceleration module superimposes the dynamic wallpaper and the application interface through the transparency setting, that is, the Alpha channel, to obtain a composite image containing two windows and display it in the wallpaper preview window.

[0099] It should be noted that when the final composite image is displayed, the dynamic wallpaper is used as the bottom layer and the application interface is used as the upper layer. The two are merged through the Alpha channel and accelerated by the hardware acceleration module G2D to be rendered into a composite interface and displayed.

[0100] It should be noted that some form of communication or synchronization mechanism is required between the application and the GUI system to ensure that the graphic content of the application is updated synchronously with the dynamic wallpaper in the wallpaper preview window.

[0101] It should be noted that GUI is only responsible for drawing and displaying the application window, while GPU is responsible for converting P-frame YUV data into RGB data for rendering, and hardware acceleration module G2D is responsible for image synthesis and display. This ensures the integrity of GPU drawing and GUI drawing, and does not cause screen distortion and other problems.

[0102] It should be noted that the existing method decodes the complete I frame to the Surface through hardware and overlays the window through the GPU. All such workload is on the GPU. However, this application balances the GPU work through modules such as G2D, which can ensure that the GPU load is not too high, thereby ensuring smoother drawing.

[0103] In this way, by using the hardware acceleration module to manage the interface, it can be ensured that the application interface and the rendering interface are merged and displayed, which can ensure the integrity of multiple screens and avoid the occurrence of screen distortion and other situations. In addition, the hardware acceleration module is used to balance the work of the GPU to ensure that the GPU drawing is smoother.

[0104] The embodiment of the present application decodes the video stream through the hardware decoding module, and can accurately decode the first I frame information and the first P frame information, thereby ensuring the efficiency of video decoding and facilitating the subsequent reconstruction of the second P frame information using the first I frame information; by merging the first I frame information and the first P frame information, the first I frame information can be accurately used to reconstruct the second P frame information, thereby facilitating the subsequent acquisition of the corresponding P frame YUV data and passing it to the GPU for rendering; the GPU converts the P frame YUV data into corresponding RGB data, and can make full use of the P frame YUV data to match the GPU drawing area, and reduce the amount of drawing data by reducing the rendering area, thereby achieving the goal of meeting the frame rate while reducing the amount of GPU calculation, thereby improving the rendering efficiency; by drawing the RGB data into a pre-created rendering interface, the P frame YUV data can be used to match the GPU drawing area, thereby reducing the rendering area, reducing the amount of drawing data, and improving the rendering efficiency, thereby achieving the goal of meeting the frame rate while reducing the amount of GPU calculation. Compared with the prior art, the present application can directly and quickly render the video into a dynamic wallpaper.

[0105] The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, i.e., may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the method of this embodiment.

[0106] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-monitorable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0107] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application.

[0108] It is particularly pointed out that for those skilled in the art, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method for generating dynamic wallpaper based on embedded high frame rate, characterized in that: Applicable to a chip, wherein the chip includes a hardware decoding module and a GPU, and the method includes: Obtain a video stream to be rendered, decode the video stream through the hardware decoding module to obtain decoded first I frame information and first P frame information, merge the first I frame information and the first P frame information to obtain completed second P frame information, and obtain P frame YUV data corresponding to the second P frame information, wherein the video stream includes the first I frame information and the first P frame information; The GPU converts the P frame YUV data into corresponding RGB data, and draws the RGB data into a pre-created rendering interface to form a dynamic wallpaper.

2. The method for generating dynamic wallpaper based on embedded high frame rate according to claim 1, characterized in that: The decoding of the video stream by the hardware decoding module to obtain the decoded first I frame information and the first P frame information is specifically: Decoding the video stream by the hardware decoding module to obtain first I frame information; Searching for a reference frame on which the P frame depends based on the first I frame information, and determining a motion vector and residual data corresponding to the P frame based on the reference frame, wherein the reference frame includes a reference I frame or a reference P frame; Based on the motion vector and the residual data, the first P frame information is determined.

3. The method for generating dynamic wallpaper based on embedded high frame rate according to claim 1, characterized in that: The GPU converts the P frame YUV data into corresponding RGB data, specifically: The P frame YUV data is obtained through a preset shader, and the RGB value of each pixel in the P frame YUV data is calculated to obtain the RGB data corresponding to the P frame YUV data.

4. The method for generating dynamic wallpaper based on embedded high frame rate according to claim 1, characterized in that: Drawing the RGB data into a pre-created rendering interface to form a dynamic wallpaper is specifically as follows: Create a rendering interface in the wallpaper preview window; The GPU maps the RGB data as texture data to the shape of the rendering interface to form a dynamic wallpaper.

5. The method for generating dynamic wallpaper based on embedded high frame rate according to claim 4, characterized in that: Also includes: Creating an application window in the wallpaper preview window through the GUI, and drawing the graphic content of the application program into the application window to obtain an application interface; The dynamic wallpaper and the application interface are superimposed and calculated by a hardware acceleration module to obtain a composite image, and the composite image is displayed in the wallpaper preview window.

6. A chip, characterized in that: include: Hardware decoding module and GPU; The hardware decoding module is used to obtain a video stream to be rendered, decode the video stream, obtain decoded first I frame information and first P frame information, merge the first I frame information and the first P frame information to obtain completed second P frame information, and obtain P frame YUV data corresponding to the second P frame information, wherein the video stream includes the first I frame information and the first P frame information; The GPU is used to convert the P frame YUV data into corresponding RGB data, and draw the RGB data into a pre-created rendering interface to form a dynamic wallpaper.

7. The chip according to claim 6, characterized in that: The hardware decoding module includes: a decoding unit, a searching unit and a determining unit; The decoding unit is used to decode the video stream to obtain first I frame information; The search unit is used to search for a reference frame on which the P frame depends based on the first I frame information, and determine a motion vector and residual data corresponding to the P frame based on the reference frame, wherein the reference frame includes a reference I frame or a reference P frame; The determining unit is used to determine the first P frame information based on the motion vector and the residual data.

8. The chip according to claim 6, characterized in that: The GPU includes: a conversion unit; The conversion unit is used to obtain the P frame YUV data through a preset shader, and calculate the RGB value of each pixel in the P frame YUV data to obtain RGB data corresponding to the P frame YUV data.

9. The chip according to claim 6, characterized in that: The GPU also includes: a first creation unit and a rendering unit; The first creation unit is used to create a rendering interface in the wallpaper preview window; The rendering unit is used to map the RGB data as texture data onto the shape of the rendering interface to form a dynamic wallpaper.

10. The chip according to claim 9, characterized in that: The chip also includes a hardware acceleration module and a GUI: The GUI is used to create an application window in the wallpaper preview window and draw the graphic content of the application program into the application window to obtain an application interface; The hardware acceleration module is used to perform superposition calculation on the dynamic wallpaper and the application interface to obtain a composite image, and display the composite image in the wallpaper preview window.