IP Library Granted Patent US 12685936
Granted Patent B2
US 12685936 · App. 18/727,891 · Granted Jul 21, 2026

Special effect optimization method and apparatus, storage medium, and program product

Inventors: Zhibo Zhang (Nanjing, CN); Ting Li (Nanjing, CN); Liangcheng Xu (Shenzhen, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
A63F13/52A63F13/60G06T15/04G06V10/761
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12685936
App. No.
18/727,891
Granted
Jul 21, 2026
Kind
B2
Abstract

In accordance with an embodiment, a method includes obtaining render instructions and identifying a purpose of the render instructions; in response to the render instructions being used to obtain a plurality of image frames and the plurality of image frames comprising special effect textures: selecting two adjacent image frames from the plurality of image frames, and identifying a similarity between special effect textures of the two adjacent image frames; and in response to the similarity meeting a condition, using a special effect texture of a latter image frame in the two adjacent image frames as a special effect texture of a next frame of image of the two adjacent image frames.

Claims (60)

1 . A method comprising:

obtaining render instructions and identifying a purpose of the render instructions;

in response to the render instructions being used to obtain a plurality of image frames and the plurality of image frames comprising special effect textures:

selecting two adjacent image frames from the plurality of image frames, and

identifying a similarity between special effect textures of the two adjacent image frames; and

in response to the similarity meeting a condition, using a special effect texture of a latter image frame in the two adjacent image frames as a special effect texture of a next image frame of the two adjacent image frames.

2 . The method according to claim 1 , wherein obtaining the render instructions and identifying the purpose of the render instructions comprises:

intercepting the render instructions from an application;

for each instruction in the render instructions, analyzing at least one of a parameter of the instruction, a type of the instruction, or semantics of an instruction segment in which the instruction is located; and

determining the purpose of the render instructions based on a result of the analysis.

3 . The method according to claim 1 , wherein identifying the similarity between the special effect textures of the two adjacent image frames comprises:

determining a value of a grayscale difference between the special effect textures of the two adjacent image frames by comparison; and

determining a value of the similarity between the special effect textures of the two adjacent image frames based on the value of the grayscale difference.

4 . The method according to claim 3 , wherein the condition comprises:

the value of the similarity between the special effect textures of the two adjacent image frames is less than a first threshold, wherein a smaller similarity value indicates a greater similarity between the special effect textures of the two adjacent image frames; or

the value of the similarity between the special effect textures of the two adjacent image frames is greater than a second threshold, wherein a smaller similarity value indicates a smaller similarity between the special effect textures of the two adjacent image frames.

5 . The method according to claim 1 , wherein selecting the two adjacent image frames from the plurality of image frames comprises:

selecting first two image frames from the plurality of image frames as the two adjacent image frames.

6 . The method according to claim 1 , wherein, in response to the similarity meeting the condition, the method further comprises:

sampling the special effect texture of the latter image frame in the two adjacent image frames to a frame buffer, wherein

in the frame buffer, the special effect texture of the latter image frame in the two adjacent image frames and a main scene texture of the next image frame of the two adjacent image frames are used for rendering to obtain the next image frame of the two adjacent image frames.

7 . The method according to claim 1 , wherein, in response to the similarity meeting the condition, the method further comprises:

intercepting a render instruction that is in the render instructions and that is used to create a render pass to obtain the special effect texture of the next image frame of the two adjacent image frames, so that the intercepted instruction is not transferred to an execution object of the render instructions.

8 . The method according to claim 1 , wherein, in response to the similarity not meeting the condition, the method further comprises:

repeatedly performing the steps of selecting the two adjacent image frames from the plurality of image frames, and identifying the similarity between the special effect textures of the two adjacent image frames; and

in response to the step of selecting the two adjacent image frames from the plurality of image frames being repeatedly performed, the latter image frame in the two adjacent image frames that are previously selected and the next image frame of the two adjacent image frames are used as newly selected two adjacent image frames.

9 . The method according to claim 1 , wherein the special effect texture comprises at least one of a bloom special effect texture or a shadow special effect texture.

10 . An apparatus comprising:

a processor; and

a memory with instructions stored thereon, wherein the instructions, when executed by the processor, enable the apparatus to:

in response to render instructions being used to obtain a plurality of image frames and the plurality of image frames comprising special effect textures:

select two adjacent image frames from the plurality of image frames, and

identify a similarity between special effect textures of the two adjacent image frames; and

in response to the similarity meeting a condition, use a special effect texture of a latter image frame in the two adjacent image frames as a special effect texture of a next image frame of the two adjacent image frames.

11 . The apparatus according to claim 10 , wherein the instructions, when executed by the processor, further enable the apparatus to:

intercept the render instructions from an application;

for each instruction in the render instructions, analyze at least one of a parameter of the instruction, a type of the instruction, or semantics of an instruction segment in which the instruction is located; and

determine a purpose of the render instructions based on a result of the analysis.

12 . The apparatus according to claim 10 , wherein identifying the similarity between the special effect textures of the two adjacent image frames comprises:

determining a value of a grayscale difference between the special effect textures of the two adjacent image frames by comparison; and

determining a value of the similarity between the special effect textures of the two adjacent image frames based on the value of the grayscale difference.

13 . The apparatus according to claim 12 , wherein the condition comprises:

the value of the similarity between the special effect textures of the two adjacent image frames is less than a first threshold, wherein a smaller similarity value indicates a greater similarity between the special effect textures of the two adjacent image frames; or

the value of the similarity between the special effect textures of the two adjacent image frames is greater than a second threshold, wherein a smaller similarity value indicates a smaller similarity between the special effect textures of the two adjacent image frames.

14 . The apparatus according to claim 10 , wherein selecting the two adjacent image frames from the plurality of image frames comprises:

selecting a first two image frames from the plurality of image frames as the two adjacent image frames.

15 . The apparatus according to claim 10 , wherein the instructions, when executed by the processor, further enable the apparatus to, in response to the similarity meeting the condition:

sample the special effect texture of the latter image frame in the two adjacent image frames to a frame buffer, wherein

in the frame buffer, the special effect texture of the latter image frame in the two adjacent image frames and a main scene texture of the next image frame of the two adjacent image frames are used for rendering to obtain the next image frame of the two adjacent image frames.

16 . The apparatus according to claim 10 , wherein the instructions, when executed by the processor, further enable the apparatus to, in response to the similarity meeting the condition:

intercept a render instruction that is in the render instructions and that is used to create a render pass to obtain the special effect texture of the next image frame of the two adjacent image frames, so that the intercepted instruction is not transferred to an execution object of the render instructions.

17 . The apparatus according to claim 10 , wherein the instructions, when executed by the processor, further enable the apparatus to, in response to the similarity not meeting the condition:

repeatedly perform the step of selecting the two adjacent image frames from the plurality of image frames and identifying the similarity between the special effect textures of the two adjacent image frames; and

in response to the step of selecting the two adjacent image frames from the plurality of image frames being repeatedly performed, the latter image frame in the two adjacent image frames that are previously selected and the next image frame of the two adjacent image frames are used as newly selected two adjacent image frames.

18 . The apparatus according to claim 10 , wherein the special effect texture comprises at least one of a bloom special effect texture or a shadow special effect texture.

19 . A non-volatile computer-readable storage medium storing computer program instructions, wherein, when the computer program instructions are executed by a processor, the processor is configured to:

in response to render instructions being used to obtain a plurality of image frames and the plurality of image frames comprising special effect textures:

select two adjacent image frames from the plurality of image frames, and

identify a similarity between special effect textures of the two adjacent image frames; and

in response to the similarity meeting a condition, use a special effect texture of a latter image frame in the two adjacent image frames as a special effect texture of a next image frame of the two adjacent image frames, wherein the condition comprises a value of the similarity between the special effect textures of the two adjacent image frames being greater than a threshold, and a smaller similarity value indicates a smaller similarity between the special effect textures of the two adjacent image frames.