US-12619347-B2 - Method for performing frame interpolation in interface display process and terminal device
Abstract
In a method performed by a terminal device for performing frame interpolation in an interface display process, when a fling operation performed by a user on a display interface is received, the terminal starts display a sliding interface, which is a view in a first area of the display interface. The terminal device obtains input information that represents a fling direction, interface information of the display interface, sliding display information, and information about a plurality of image frames corresponding to the sliding interface. Based on the input information, the terminal device determines a frame interpolation policy based on the input information. The terminal device then performs, based on the information about the plurality of image frames, splicing and combination by using the frame interpolation policy to obtain one or more to-be-interpolated frames located between the plurality of image frames.
Inventors
- Tankun CHEN
- Tao Lu
Assignees
- HUAWEI TECHNOLOGIES CO., LTD.
Dates
- Publication Date
- 20260505
- Application Date
- 20211222
- Priority Date
- 20210113
Claims (20)
- 1 . A method performed by a terminal device for performing frame interpolation in an interface display process, wherein the method is applied to a terminal device, and the method comprises comprising: when a fling operation performed by a user on a display interface is received, starting to slide for displaying a sliding interface, wherein the sliding interface is a view in a first area of the display interface; obtaining input information, wherein the input information represents a fling direction, interface information of the display interface, sliding display information, and information about a plurality of image frames corresponding to the sliding interface; determining a frame interpolation policy based on the input information; determining the maximum quantity of interpolable frames based on the sliding frame rate and the maximum sliding duration of the sliding interface and obtaining, through calculation, the maximum quantity of interpolable frames according to the following formula: M =(max_ t/y )−1, wherein y=1000/x, x is the sliding frame rate, and max_t is the maximum sliding duration; and creating one or more interpolated frames by performing, based on the information about the plurality of image frames, splicing and combination by using the frame interpolation policy, to obtain one or more to-be-interpolated frames, wherein the one or more to-be-interpolated frames are located between the plurality of image frames.
- 2 . The method according to claim 1 , wherein the input information comprises the fling direction, a sliding start time point, an initial sliding speed, and a sliding frame rate of the sliding interface, an interface size of the sliding interface, a size of a screen display area of the terminal device, and the information about the plurality of image frames.
- 3 . The method according to claim 2 , wherein the input information further comprises information about an obstruction on the sliding interface.
- 4 . The method according to claim 3 , wherein the obstruction comprises one or more of the following: a floating window, a floating box, a floating control, or a floating icon.
- 5 . The method according to claim 1 , wherein the step of determining the frame interpolation policy based on the input information comprises: determining a maximum quantity of interpolable frames based on the input information; and determining the frame interpolation policy based on the maximum quantity of interpolable frames.
- 6 . The method according to claim 5 , wherein; the frame interpolation policy comprises a fixed frame interpolation policy and a variable frame interpolation policy; and the fixed frame interpolation policy means requires interpolating a fixed quantity of to-be-interpolated frames between two adjacent image frames in the plurality of image frames, and the variable frame interpolation policy means requires interpolating a variable quantity of to-be-interpolated frames between two adjacent image frames in the plurality of image frames.
- 7 . The method according to claim 5 , wherein the step of determining the maximum quantity of interpolable frames based on the input information comprises: determining a maximum sliding duration based on the sliding start time point, the initial sliding speed, and a maximum sliding distance of the sliding interface, wherein the maximum sliding distance is a width or a height of the display interface; and wherein the maximum sliding duration is determined based on the sliding start time point, the initial sliding speed, and a maximum sliding distance of the sliding interface, and the maximum sliding distance is a width or a height of the display interface.
- 8 . The method according to claim 7 , wherein the step of determining the maximum quantity of interpolable frames based on the sliding frame rate and maximum sliding duration of the sliding interface: wherein the step of determining the maximum sliding duration determines max_t is determined according to a formula: Fun (t1, max_t, v)<max_distance, t1 is the sliding start time point, v is the initial sliding speed, and max_distance is the maximum sliding distance.
- 9 . The method according to claim 1 , wherein the plurality of image frames comprise a first image frame and a last image frame in a sliding display process of the sliding interface.
- 10 . The method according to claim 1 , wherein the plurality of image frames each comprise a plurality of display areas.
- 11 . The method according to claim 10 , wherein the step of performing, based on the information about the plurality of image frames, splicing and combination by using the frame interpolation policy, to obtain one or more to-be-interpolated frames comprises: performing drawing and rendering based on the information about the plurality of image frames; and performing splicing and combination on the plurality of display areas of the plurality of image frames to obtain the one or more to-be-interpolated frames.
- 12 . The method according to claim 11 , wherein the plurality of image frames each comprise a system status bar view and a sliding interface view on the display interface, and each corresponding position of the one or more to-be-interpolated frames comprises the system status bar view and the sliding interface view.
- 13 . The method according to claim 10 , wherein the plurality of image frames each comprise one or more navigation bar views on the display interface, and each corresponding position of the one or more to-be-interpolated frames comprises the one or more navigation bar views.
- 14 . The method according to claim 10 , wherein the plurality of image frames each comprise one or more rounded-corner views, and each corresponding position of the one or more to-be-interpolated frames comprises the one or more rounded-corner views.
- 15 . The method according to claim 10 , wherein the plurality of image frames each comprise an obstruction view, and each corresponding position of the one or more to-be-interpolated frames comprises the obstruction view.
- 16 . The method according to claim 10 , wherein the plurality of image frames each comprise a view of a first desktop area of the terminal device, and each corresponding position of the one or more to-be-interpolated frames comprises the view of the first desktop area.
- 17 . A terminal device comprising: a memory storing executable instructions; and a processor configured to execute the executable instructions to perform operations of: when a fling operation performed by a user on a display interface is received, starting to display a sliding interface, wherein the sliding interface is a view in a first area of the display interface; obtaining input information, wherein the input information represents a fling direction, interface information of the display interface, sliding display information, and information about a plurality of image frames corresponding to the sliding interface; determining a frame interpolation policy based on the input information; determining the maximum quantity of interpolable frames based on the sliding frame rate and the maximum sliding duration of the sliding interface and obtaining, through calculation, the maximum quantity of interpolable frames according to the following formula: M =(max_ t/y )−1, wherein y=1000/x, x is the sliding frame rate, and max_t is the maximum sliding duration; and create one or more interpolated frames by performing, based on the information about the plurality of image frames, splicing and combination by using the frame interpolation policy, to obtain one or more to-be-interpolated frames located between the plurality of image frames.
- 18 . The terminal device according to claim 17 , wherein the input information comprises the fling direction, a sliding start time point, an initial sliding speed, and a sliding frame rate of the sliding interface, an interface size of the sliding interface, a size of a screen display area of the terminal device, and the information about the plurality of image frames.
- 19 . The terminal device according to claim 18 , wherein the input information further comprises information about an obstruction on the sliding interface.
- 20 . The terminal device according to claim 19 , wherein the obstruction comprises a floating window, a floating box, a floating control, or a floating icon.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a national stage of International Application No. PCT/CN2021/140405, filed on Dec. 22, 2021, which claims priority to Chinese Patent Application No. 202110044342.3, filed on Jan. 13, 2021. The aforementioned priority applications are hereby incorporated by reference in their entirety. TECHNICAL FIELD Embodiments of this application relate to the field of electronic technologies, and in particular, to a method for performing frame interpolation in an interface display process and a terminal device. BACKGROUND With advent of an era of a high refresh rate, a performance requirement on a terminal device is increasingly high. A refresh rate of the terminal device means a quantity of frames of images that can be displayed by the terminal device within one second. To display a frame of image, the terminal device first needs to complete drawing and rendering of the frame of image. For example, if a refresh rate requirement is 60 Hz, the terminal device needs to complete drawing and rendering of a single frame within 16.6 milliseconds (ms). If a refresh rate requirement is 120 Hz, the terminal device needs to complete drawing and rendering of a single frame within 8.3 ms. Further, if a refresh rate requirement is 240 Hz, the terminal device needs to complete drawing and rendering of a single frame within 4.3 ms. With an increasingly high refresh rate requirement, the terminal device processes more data per unit of time, and correspondingly power consumption of the terminal device is also increasingly high. For example, when the refresh rate requirement increases from 60 Hz to 120 Hz, data that needs to be processed by the terminal device per unit of time increases exponentially, and correspondingly power consumption of the terminal device almost increases exponentially. High power consumption accelerates power consumption of the terminal device. SUMMARY This application provides a method for performing frame interpolation in an interface display process and a terminal device, to improve interface display effect, reduce a power consumption speed of the terminal device, and improve user experience under a high refresh rate requirement. To achieve the foregoing objectives, the following technical solutions are used in embodiments of this application. According to a first aspect, a method for performing frame interpolation in an interface display process is provided. The method is applied to a terminal device. The method includes: when a fling operation performed by a user on a display interface is received, starting to slide for displaying a sliding interface, where the sliding interface is a view in a first area of the display interface; obtaining input information, where the input information represents a fling direction, interface information of the display interface, sliding display information, and information about a plurality of image frames corresponding to the sliding interface; determining a frame interpolation policy based on the input information; and performing, based on the information about the plurality of image frames, splicing and combination by using the frame interpolation policy, to obtain one or more to-be-interpolated frames, where the one or more to-be-interpolated frames are located between the plurality of image frames. According to the technical solution provided in the first aspect, in a process in which an interface starts to slide in a direction for display with animation effect, the terminal device determines a specific frame interpolation policy based on the fling direction, interface information of a display interface, sliding display information, information about a plurality of image frames corresponding to the sliding interface, and the like. In this way, the terminal device interpolates one or more combined frames between the plurality of frames according to the determined frame interpolation policy, to reduce layer drawing and rendering loads of a user interface (user interface, UI) thread and a render thread (render thread) per unit of time. This reduces power consumption of the terminal device, and avoids jitter, freezing, and blurry display in the interface display process, thereby bringing good user experience to the user. In a possible implementation, the input information includes the fling direction, a sliding start time point, an initial sliding speed, and a sliding frame rate of the sliding interface, an interface size of the sliding interface, a size of a screen display area of the terminal device, and the information about the plurality of image frames. In the solution provided in this application, the terminal device can determine the specific frame interpolation policy based on the collected input information such as the fling direction, the sliding start time point, the initial sliding speed, and the sliding frame rate of the sliding interface, the interface size of the sliding interface, the size of the scre