Display control method and electronic equipment
By adjusting the display frame rate in the display screen of the electronic device, the preview screen frame loss problem caused by the limitations of the display driver chip process is solved, and a stable and efficient preview screen display is achieved.
Patent Information
- Application Number
- CN202310967414.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2025-02-14
AI Technical Summary
Due to the process limitations of the display driver chip, the frequency of the display switching display cannot accurately correspond to the frequency of the image collected by the camera module, resulting in problems such as frame drops and frame skipping on the preview screen.
Provide a display control method, by adjusting the display frame rate of the display screen to a higher first frame rate when entering the preview or video shooting scene, to ensure that the display frame rate is greater than the output frequency of the camera module, and avoiding the undisplayed The image is overwritten.
It effectively avoids the problem of frame images being covered and lost due to low display frame rate, ensures stable display of the preview screen and improves user experience.
Smart Images

Figure CN119450195A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of electronic devices, and in particular, to a display control method and an electronic device. Background Art
[0002] When the camera application of the electronic device is running, a preview picture can be displayed on the display screen so that the user can intuitively see the current shooting scene.
[0003] The preview screen may be composed of a plurality of continuous frame images, which may be captured by a camera module of the electronic device and displayed on a display screen controlled by a display driver chip of the electronic device.
[0004] At present, due to the process limitations of the display driver chip, the display switching frequency cannot accurately correspond to the frequency of the camera module collecting images. As a result, some images are collected by the camera module and are overwritten by subsequent images before being displayed on the display. This causes problems such as frame loss and frame skipping in the preview screen. Summary of the invention
[0005] The present application provides a display control method and an electronic device, which can accurately identify a preview / video shooting scene and improve the display frame rate in the scene to avoid frame loss caused by covering of undisplayed images.
[0006] In order to achieve the above technical objectives, this application adopts the following technical solutions:
[0007] In a first aspect, a display control method is provided, which is applied to an electronic device, which is equipped with a display screen. A camera application is also installed in the electronic device. The method includes: receiving a first operation of a user. In response to the first operation, the camera application is started, and a first interface is displayed on the display screen. The first interface is a preview interface of the camera application, or the first interface is a video shooting interface of the camera application. When the first interface is displayed, the display frame rate of the display screen is a first frame rate. A second operation of the user is received. In response to the second operation, the display screen displays a second interface, which is different from the preview interface or the video shooting interface. When the second interface is displayed, the display frame rate of the display screen is a second frame rate. The first frame rate is greater than the second frame rate. For example, the first operation may be an operation in which a user clicks on a camera application icon on the display screen of the electronic device. For another example, the second operation may include an operation in which a user indicates to exit the preview interface or the video shooting interface. For example, the second operation may include an operation in which the electronic device is instructed to enter the main interface, and for another example, the second operation may include an operation in which the camera application is instructed to enter the gallery interface, etc.
[0008] In this way, the electronic device can automatically adjust to a higher display frame rate (such as the first frame rate) for display when entering a preset scene (such as a preview scene or a video shooting scene). This will ensure that even if the display frame rate is lower than the configured ideal value due to process problems such as hardware DDIC, the display frame rate is greater than the ideal value, such as the image output frequency of the camera module. This can also solve the problem of frame images being covered and lost due to a low display frame rate.
[0009] Optionally, before receiving the first operation of the user, the method further includes: the electronic device displays a third interface on the display screen, the third interface is the main interface of the electronic device, and the display frame rate of the electronic device is the second frame rate. In this implementation, before entering the preset scene, the electronic device can use the configured second frame rate as the display frame rate. That is, after entering the preset scene, the electronic device can increase the display frame rate for display.
[0010] Optionally, the electronic device is configured with a camera module, which is used to obtain image information of the shooting scene after the camera application is run. A buffer queue is configured in the memory of the electronic device, and the buffer queue is used to store the image to be displayed, and the image to be displayed is generated according to the image information obtained by the camera module. After receiving the first operation, the method also includes: the camera application controls the image information to be obtained by the camera module. The electronic device generates the image to be displayed according to the image information, and stores the image to be displayed in the buffer queue. This example provides a specific mechanism for image display. That is, the image is produced and consumed by the buffer queue configured in the memory, so that the final image is presented on the display screen. It can be understood that in the present application, after the display frame rate is increased, the corresponding rate of consuming images from the buffer queue is increased, so it is possible to avoid the situation where the frame image that has not yet been displayed is covered due to the production rate being greater than the consumption rate.
[0011] Optionally, the camera module acquires the image information at a frequency of a third frame rate, and the first frame rate is greater than or equal to the third frame rate. In this way, after the display frame rate is increased, the consumption rate is at least equal to the image production rate, thereby avoiding the problem of frame loss.
[0012] Optionally, after receiving the first operation of the user, the method further includes: the electronic device determines that a first view has been configured, and the first view is used to draw the image to be displayed of the composite preview interface or the video shooting interface. In this example, a specific judgment implementation of entering a preset scene is provided. For example, the electronic device can determine to enter a preset scene when the first view has been configured in the view system.
[0013] Optionally, before displaying the first interface, the method further includes: the electronic device sending a frequency increase instruction to the display screen, and the display screen configures a display frame rate to the first frame rate according to the frequency increase instruction, so as to display the first interface.
[0014] Optionally, the frequency increase indication includes a frequency increase ratio, and the frequency increase ratio is greater than 1. The first frame rate is equal to the second frame rate multiplied by the frequency increase ratio. Thus, a specific solution for increasing the display frame rate is provided.
[0015] Optionally, after receiving the first operation of the user and before displaying the first interface, the method further includes: the camera application sends a first Vsync signal generation request to the electronic device. The electronic device generates multiple first Vsync signals according to the first Vsync signal generation request at a first time interval. The first Vsync signal is used to trigger the drawing and synthesis of the image in the buffer queue.
[0016] Optionally, before generating the plurality of first Vsync signals, the method further comprises: the electronic device generates a request according to the first Vsync signal to obtain the current display frame rate from the display screen. The generating of the plurality of first Vsync signals according to the first time interval comprises: the electronic device determines the first time interval according to the current display frame rate, and generates a first Vsync signal at each first time interval.
[0017] Optionally, the current display frame rate is the first frame rate, and the electronic device determines the first time interval according to the current display frame rate, including: the electronic device determines, according to the current display frame rate, that the first time interval corresponds to the inverse of the first frame rate.
[0018] Optionally, the electronic device displays a first interface on the display screen, comprising: after the first Vsync signal is generated, the electronic device obtains first image information from the buffer queue, and the first image information corresponds to the first interface. On the first view, drawing and synthesizing is performed according to the first image to obtain an image to be displayed corresponding to the first interface. The electronic device displays the first interface on the display screen according to the image to be displayed.
[0019] It is understandable that after the display frame rate is improved, the corresponding first time interval is shortened, so the first Vsync signal can be generated more frequently, which will trigger the consumption of the image in the buffer queue more quickly.
[0020] Optionally, the electronic device is configured with a display engine and a display driver module, and an enabling driver unit is configured in the display driver module. The method also includes: the camera application determines that a first view has been configured, and the first view is used to draw an image to be displayed of a composite preview interface or a video shooting interface. The camera application sends a first indication message to the enabling driver unit through the display engine, and the first indication message is used to indicate that the enabling driver unit enters a preset scene, and the preset scene includes a preview scene and / or a video shooting scene. The enabling driver generates a frequency increase indication according to the first indication information, and the frequency increase indication is used to indicate that the display driver chip DDIC of the display screen increases the display frame rate. The DDIC receives the frequency increase indication and adjusts the display frame rate of the display screen to the first frame rate according to the frequency increase indication. Therefore, in the present application, by configuring a display engine in an electronic device (such as a framework layer of an electronic device) and configuring an enabling driver in an existing display driver in the kernel layer, the effect of the preset scene frequency increase in the display control method provided in the present application can be achieved.
[0021] Optionally, the electronic device is provided with a display synthesis module SurfaceFlinger. The method further includes: the camera application sends a first Vsync signal generation request to the SurfaceFlinger. The SurfaceFlinger generates a request based on the first Vsync signal, and obtains the current display frame rate from the DDIC as a first frame rate. The SurfaceFlinger generates a first Vsync signal at every first time interval, and the first time interval corresponds to the first frame rate. Whenever a first Vsync signal is generated, the SurfaceFlinger obtains image information from a buffer queue in the memory of the electronic device for drawing synthesis, and sends the image to be displayed obtained by the drawing synthesis to the display screen for display.
[0022] The present application also provides the following examples, so as to restore the display frame rate to the value before the frequency increase when exiting the preset scene. For example, the exiting the preset scene may correspond to exiting the video shooting scene, or exiting the preview scene.
[0023] Optionally, after receiving the second operation of the user, the method further includes: the electronic device determining that the first view is not included in the configured views.
[0024] Optionally, before the electronic device switches to display the second interface, the method further includes: the electronic device sends a frequency reduction instruction to the display screen, and the display screen configures the display frame rate to the second frame rate according to the frequency reduction instruction to display the second interface.
[0025] Optionally, after receiving the second operation of the user and before displaying the second interface, the method further includes: the camera application sends a second Vsync signal generation request to the electronic device. The electronic device generates multiple second Vsync signals according to the second Vsync signal generation request at a second time interval. The second Vsync signal is used to trigger the drawing and synthesis of the image in the buffer queue.
[0026] Optionally, before generating multiple second Vsync signals, the method further includes: the electronic device generates a request according to the second Vsync signal to obtain the current display frame rate from the display screen. Generating multiple second Vsync signals according to the second time interval includes: the electronic device determines the second time interval according to the current display frame rate, and generates a second Vsync signal every second time interval.
[0027] Optionally, the current display frame rate is the second frame rate, and the electronic device determines the second time interval according to the current display frame rate, including: the electronic device determines, according to the current display frame rate, that the second time interval corresponds to the inverse of the second frame rate.
[0028] Optionally, the electronic device displays a second interface on the display screen, including: after the second Vsync signal is generated, the electronic device obtains second image information from the buffer queue, and the second image information corresponds to the second interface. On the second view, drawing and synthesizing are performed according to the second image to obtain an image to be displayed corresponding to the second interface. The second view is different from the first view, and the second view is used to draw and synthesize an image to be displayed of other interfaces different from the preview interface or the video shooting interface. The electronic device displays the second interface on the display screen according to the image to be displayed corresponding to the second interface.
[0029] Optionally, the first view includes a surface view SurfaceView.
[0030] In a second aspect, a display control method is provided. It is applied to an electronic device, and the electronic device is equipped with a display screen. A camera application is also installed in the electronic device. The method includes: the display screen of the electronic device displays a main interface, and the display frame rate is a second frame rate. A first operation of a user is received. In response to the first operation, the camera application is started, and a first interface is displayed on the display screen. The first interface is a preview interface of the camera application, or the first interface is a video shooting interface of the camera application. Before displaying the first interface, a frequency increase indication is generated and sent to the display screen, and the frequency increase indication is used to instruct the display screen to increase the display frame rate. In response to the frequency increase indication, the display screen displays the first interface, and the display frame rate is the first frame rate. The first frame rate is greater than the second frame rate.
[0031] Optionally, the method further includes: receiving a second operation of the user. In response to the second operation, the display screen displays a second interface, which is different from the preview interface or the video shooting interface. Before displaying the second interface, a frequency reduction instruction is generated and sent to the display screen, wherein the frequency reduction instruction is used to instruct the display screen to reduce the display frame rate. When displaying the second interface, the display screen has a display frame rate of the second frame rate.
[0032] Optionally, the electronic device is configured with a camera module, which is used to obtain image information of the shooting scene after the camera application is run. A buffer queue is configured in the memory of the electronic device, and the buffer queue is used to store the image to be displayed, and the image to be displayed is generated according to the image information obtained by the camera module. After receiving the first operation, the method also includes: the camera application controls the image information to be obtained by the camera module. The electronic device generates the image to be displayed according to the image information, and stores the image to be displayed in the buffer queue. This example provides a specific mechanism for image display. That is, the image is produced and consumed by the buffer queue configured in the memory, so that the final image is presented on the display screen. It can be understood that in the present application, after the display frame rate is increased, the corresponding rate of consuming images from the buffer queue is increased, so it is possible to avoid the situation where the frame image that has not yet been displayed is covered due to the production rate being greater than the consumption rate.
[0033] Optionally, the frequency at which the camera module acquires the image information is a third frame rate, and the first frame rate is greater than or equal to the third frame rate.
[0034] Optionally, the electronic device is configured with a display engine and a display driver module, and an enabling driver unit is configured in the display driver module. The method also includes: the camera application determines that a first view has been configured, and the first view is used to draw an image to be displayed of a composite preview interface or a video shooting interface. The camera application sends a first indication message to the enabling driver unit through the display engine, and the first indication message is used to instruct the enabling driver unit to enter a preset scene, and the preset scene includes a preview scene and / or a video shooting scene. The enabling driver generates a frequency increase indication based on the first indication information, and the frequency increase indication is used to instruct the display driver chip DDIC of the display screen to increase the display frame rate. The DDIC receives the frequency increase indication and adjusts the display frame rate of the display screen to the first frame rate based on the frequency increase indication.
[0035] In a third aspect, the present application also provides an electronic device, which includes: a memory and one or more processors and one or more display screens. The memory, the display screen and the processor are coupled. Among them, the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the technical solution provided in the above-mentioned first aspect and any possible implementation thereof. Or, the electronic device executes the technical solution provided in the above-mentioned second aspect and any possible implementation thereof. For example, when entering a preset scene, the electronic device can realize the increase of the display frame rate through the display control method provided in the present application. For another example, when exiting the preset scene, the electronic device can restore the display frame rate to the state before the frequency increase.
[0036] In a fourth aspect, the present application also provides a chip system, which is applied to an electronic device; the chip system may include one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line, and the interface circuit is used to receive a signal from a memory of the electronic device and send the signal to the processor, and the signal includes a computer instruction stored in the memory. When the processor executes the above-mentioned computer instruction, the electronic device executes the technical solution provided in the above-mentioned first aspect and any possible implementation thereof. Alternatively, the electronic device executes the technical solution provided in the above-mentioned second aspect and any possible implementation thereof.
[0037] In a fifth aspect, the present application also provides a computer-readable storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the technical solution provided in the above-mentioned first aspect and any possible implementation thereof.
[0038] In a sixth aspect, the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the technical solution provided in the first aspect and any possible implementation thereof. Alternatively, enables the computer to execute the technical solution provided in the second aspect and any possible implementation thereof.
[0039] It can be understood that the solutions provided in the second aspect to the sixth aspect of the present application can respectively correspond to the first aspect and any possible design thereof, so the beneficial effects that can be achieved are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of an interface interaction related to a camera application provided for an electronic device;
[0041] Figure 2 A schematic diagram of displaying a preview stream;
[0042] Figure 3A schematic diagram of a preview flow from acquisition to display;
[0043] Figure 4 Produce and consume logical schematic diagrams for an image;
[0044] Figure 5 A schematic diagram of the production and consumption logic of the Nth frame image;
[0045] Figure 6 A schematic diagram of the timing comparison of the production and consumption of a continuous multi-frame image;
[0046] Figure 7 A display comparison diagram in a frame loss situation;
[0047] Figure 8 A timing comparison diagram after a display control method provided by an embodiment of the present application takes effect;
[0048] Fig. 9 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application;
[0049] Fig.10 A schematic diagram of software composition of an electronic device provided in an embodiment of the present application;
[0050] Fig.11 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application;
[0051] Fig.12 A schematic diagram of the interaction between modules of a display control method provided in an embodiment of the present application;
[0052] Fig.13 A schematic diagram of the interaction between modules of a display control method provided in an embodiment of the present application;
[0053] Fig.14 A schematic diagram of the interaction between modules of a display control method provided in an embodiment of the present application;
[0054] Fig.15 A schematic diagram of the module interaction flow of a display control method provided in an embodiment of the present application;
[0055] Fig.16 A schematic diagram of the composition of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0057] Most current electronic devices can provide an image capture function. The image capture function may include image preview, image capture, video capture, etc. For example, a camera application may be installed in the electronic device, and after the camera application is run, the electronic device may provide the user with an image capture function through the camera application.
[0058] For example, the electronic device is a mobile phone. Figure 1 , the main interface 101 of the electronic device may include an icon 102 of a camera application. The user may input a click operation 103 on the icon 102 to instruct the electronic device to run the camera application.
[0059] In response to the click operation 103, the electronic device may run the camera application. In addition, the electronic device may also switch to display an interface 104 of the camera application.
[0060] In combination with the above description about the image capturing function, after the electronic device runs the camera application, the display interface 104 may correspond to one of the image capturing functions that can be provided.
[0061] For example, Figure 1 In the example of , the interface 104 may include a preview interface of the "image capture" function. The preview image of the current capture scene may be displayed to the user in the interface 104. As time goes by, if the person object or other object in the current capture scene moves, the electronic device may update the preview image accordingly.
[0062] The user can also instruct the electronic device to switch to display other image capture functions.
[0063] For example, the user may input an operation 106 on the “video” button 105 in the interface 104 to instruct the electronic device to switch to providing a video shooting function.
[0064] Correspondingly, the electronic device can switch to display the preview image corresponding to the video shooting function on the interface 104 .
[0065] For another example, the interface 104 may further include a button 107 for viewing images. When the user wants to view the captured images or videos, the user may input an operation 108 to the button 107. Correspondingly, the electronic device may switch to display a gallery interface. The gallery interface may include large images of recently captured images or videos, and / or thumbnails of images or videos stored in the gallery.
[0066] It is understandable that in the above implementation, when the electronic device provides functions such as image capture and video capture under the user's instruction, a corresponding preview interface can be displayed. In the preview interface, the electronic device can dynamically show the user the position and shape changes of each shooting object in the shooting scene. In the video shooting scene, after starting to shoot, the electronic device can obtain and store the position and shape changes of each shooting object during the shooting process, and can also display the video stream in real time on the display screen.
[0067] Take the preview interface of an electronic device displaying an image shooting or video shooting scene as an example.
[0068] refer to Figure 2 At time 1, the electronic device can display on the preview interface that the person object is located at position 1. Thereafter, the person starts to move. Then at time 2, the electronic device refreshes the preview interface and displays that the person object is located at position 2. Similarly, at time 3, the electronic device can display that the person object is located at position 3.
[0069] It is understandable that the continuous preview image stream may be composed of a plurality of continuous frame images. The electronic device may refresh the display content according to a certain period, providing Figure 2 The dynamic effects of various objects in the shooting scene are shown.
[0070] Figure 3 The logical process from generation to display of any frame image is shown.
[0071] In such Figure 3 In the example, the electronic device may be configured with a camera module (Camera) for acquiring image information of the current shooting scene, and the display screen is used to display the image.
[0072] The electronic device may also be configured with multiple software modules for performing internal related processing. For example, the electronic device may be provided with a camera service (CameraService), a buffer queue (BufferQueue), a display synthesis module (SurfaceFlinger), etc.
[0073] Take the acquisition and display of the Nth frame image as an example. The Nth frame image may correspond to Figure 2A preview image of the time 1, time 2 or time 3 shown, or any other time.
[0074] The camera module can collect the light signal of the current shooting scene, and obtain the RAW image information corresponding to the Nth frame image through the photoelectric conversion of the sound field. The camera module can send the RAW image information corresponding to the Nth frame image to the camera service. The camera service can process the RAW image information corresponding to the Nth frame image, so as to obtain the image information of the Nth frame image in the corresponding RGB format (such as the RGB image information of the Nth frame image). The camera service can store the RGB image information of the Nth frame image in a buffer queue for easy access by the display synthesis module. For example, the display synthesis module can obtain the RGB image information of the Nth frame image from the buffer queue, and obtain the display information of the Nth frame image through synthesis and other processing. Then, the display screen can display the Nth frame image according to the display information.
[0075] In this application, the camera service that generates the RGB image information of the Nth frame image can be called the producer of the RGB image information of the Nth frame image. Correspondingly, the display synthesis module that uses the RGB image information of the Nth frame image can be called the consumer of the RGB image information of the Nth frame image.
[0076] It should be understood that in existing image display mechanisms, the buffer queue-based production-consumption logic scheme is often used.
[0077] As an example, combining Figure 4 , the camera service can request a free buffer area from the buffer queue through the dequeueBuffer() function. Then, the camera service can fill the buffer area with the RGB image information of the Nth frame image through the euqueueBuffer() function and return it to the queue. This realizes the production process of the RGB image information of the Nth frame image.
[0078] In the consumption process, the display synthesis module can act as a consumer of the buffer content. Exemplarily, the display synthesis module can obtain the buffer area from the buffer queue through the acquireBuffer() function. The buffer area can store the RGB image information of the Nth frame image. Thus, the display synthesis module can display the corresponding Nth frame image on the display screen through synthesis and other operations of the content in the acquired buffer. In addition, the display synthesis module can also release the buffer through the releaseBuffer() function after sending it to the display.
[0079] It should be pointed out that in Figure 3In the illustrated solution, the camera service as a producer can complete the production of the RGB image information of the Nth frame image and put it into a buffer queue for subsequent consumption by the display synthesis module.
[0080] In some implementations, the RGB image information of the Nth frame image may be placed in the buffer queue. In this way, when the display synthesis module needs to send the image for display consumption, it can directly obtain the RGB image information of the Nth frame image that has been produced from the buffer queue, and then perform synthesis and other processing based on the RGB image information of the Nth frame image, and obtain the display information of the Nth frame image for display.
[0081] In other implementations, after the camera service completes the production of the RGB image information of the Nth frame image, it can store the RGB image information of the Nth frame image in a preconfigured position of the display of the electronic device. The address of the display storing the RGB image information of the Nth frame image can be identified by a corresponding file descriptor. In this way, the camera service can put the file descriptor corresponding to the Nth frame image into the buffer queue to complete the enqueue. When the display synthesis module needs to send the image for display consumption, it can obtain the file descriptor of the Nth frame image from the buffer queue. The display synthesis module can obtain the RGB image information of the Nth frame image from the corresponding position of the memory according to the file descriptor. In this way, synthesis and other processing are performed according to the RGB image information of the Nth frame image, and the display information of the Nth frame image is obtained for display.
[0082] As a specific implementation, Figure 5 shows that file descriptors are placed into a buffer queue to support Figure 4 An example of the logical implementation of production-consumption is shown. Here, the Nth frame image is taken as an example. The RAW image information of the Nth frame image can be called the original image information N, the RGB image information of the Nth frame image can be called the image information N, the storage space configured in the memory for storing the image information N is BufferN, the file descriptor corresponding to the image information N is file descriptor N, and the display image corresponding to the Nth frame image is display image N.
[0083] like Figure 5As shown, the camera module can send the original image information N to the camera service. Correspondingly, the camera service can process and obtain the corresponding image information N based on the original image information N and store it in bufferN. The camera service can also put the file descriptor N of BufferN into the buffer queue waiting for consumption. When it is necessary to switch to display a new preview image, the display synthesis module can obtain the file descriptor N from the buffer queue. According to the file descriptor N, the display synthesis module can perform synthesis and other processing to obtain the display image N corresponding to the Nth frame image. In this way, the display screen can display according to the display image N to achieve the switching display of the new preview image.
[0084] In the following example, Figure 5 The implementation of file descriptor enqueue consumption shown in FIG. 1 is used as an example to illustrate.
[0085] In this way, combined Figure 1 and Figure 2 In the scene example, after entering the preview or starting the video shooting, the electronic device can Figures 3 to 5 The solution provided in realizes the switching display of each frame image.
[0086] It should be noted that, in general, the effective buffer length of the buffer queue configuration is 1 buffer length. That is, in the buffer queue, there can be at most 1 buffer waiting to be consumed at the same time. In this application, the buffer in the buffer queue can be called an effective buffer.
[0087] Therefore, after the first frame of image is queued (i.e., the camera service obtains the RGB image information of the first frame of image and puts the corresponding file descriptor into the buffer queue), the display synthesis module can send the first frame of image for display consumption before the second frame of image is completed and queued. After the first frame of image is sent for display consumption and before the second frame of image is completed, the number of valid buffers in the buffer queue is 0. In this cycle, the normal sending and display of the first frame, the second frame, and so on of continuous frame images can be realized.
[0088] In each of the above implementations, the electronic device may periodically generate a synchronization signal (Vsync signal) so that each module can be triggered to perform corresponding processing according to the Vsync signal.
[0089] Among them, the Vsync signal can be generated by an application of the electronic device (such as a camera application) applying to the synthetic display module. After receiving the Vsync signal application sent by the reverse camera application, the synthetic display module can negotiate with the display screen (such as the display driver chip (DisplayDriverIC, DDIC) in the display screen), and the synthetic display module generates a Vsync signal corresponding to the display frame rate of the display screen. The generation frequency of the Vsync signal is the same as the display frame rate of the display screen.
[0090] For example, each time a Vsync signal is generated, the composite display module can trigger the acquisition of the generated frame image from the buffer queue for consumption and display. Since the generation frequency of the Vsync signal is the same as the display frame frequency (i.e., refresh rate) of the display screen, the consumption and display processing of the composite display module can smoothly support the switching display of each frame image in each preview stream or video stream.
[0091] In addition, in the present application, the frequency of the camera service producing frame images may be determined by the sampling frequency of the camera module. Each time the camera module obtains the raw image information of a frame image, the corresponding camera service may put the RGB image information of the frame image (or the corresponding file descriptor) into the buffer queue to realize the production of the frame image.
[0092] The higher the sampling frequency of the camera module, the faster the frame image is produced.
[0093] When the sampling frequency of the camera module is the same as or close to the display frame rate of the display screen (such as 60Hz, 90Hz, 120Hz, etc.), it is possible to consume and display one frame of image in the production interval of two adjacent frames of image, so that the number of valid buffers in the buffer queue does not exceed 1.
[0094] In the following description, it is taken as an example that the sampling frequency of the camera module is the same as the display frame rate of the display screen.
[0095] refer to Figure 6 , the time difference between producing the first frame image and producing the second frame image is the same as the time difference between consuming the first frame image and consuming the second frame image. The following is similar.
[0096] In this way, after the first frame of the image is produced and before the second frame of the image is produced, the consumption and display of the first frame of the image can be completed. Similarly, after the second frame of the image is produced and before the third frame of the image is produced, the consumption and display of the second frame of the image can be completed.
[0097] It can be seen that in the production and consumption process of the first frame to the third frame, all buffers in the buffer queue are sent to the display for consumption, which corresponds to the display of a smooth preview stream or video stream on the display screen.
[0098] In some cases, there may be a situation where no frame image is consumed within the production time period of two adjacent frame images.
[0099] In such Figure 6 In the example, after the 5th frame is produced and queued, it is not consumed, and the 6th frame is produced. Then, due to the queueing of the 6th frame, the 5th frame will be overwritten. In this way, the 6th frame will be directly sent for display at the next consumption. This will cause the loss of the 5th frame. Correspondingly, it is manifested as a frame loss in the preview stream or video stream on the display screen.
[0100] For example, combined with Figure 1 and Figure 2 Example of a scenario, Figure 7 Figure 2 shows the display situation when the frame is dropped. Figure 2 For example, the 4th frame image is displayed at time 1, the 5th frame image should be displayed at time 2, and the 6th frame image should be displayed at time 3.
[0101] Combination Figure 6 , the 4th frame image can be displayed normally, then, Figure 7 In the example, the 4th frame can be displayed normally at time 1. At time 2, when the free consumption is executed, the buffer queue stores the 6th frame covering the 5th frame. Then, at time 2, the display will jump to the 6th frame. In other words, the display will skip the display of the 5th frame and jump directly from the 4th frame to the 6th frame. The human object in the preview image will jump directly from position 1 to position 3. This frame loss will obviously affect the user's perception.
[0102] It is understandable that a variety of different situations may lead to the above problems.
[0103] For example, it is taken that the sampling frequency of the camera module and the display frame rate of the display screen are both 30 Hz.
[0104] In actual products, the camera module can achieve relatively accurate acquisition of frame images at a frequency of about 30 Hz (such as 30.01 Hz). Correspondingly, the camera service can produce frame images at a frequency of 30.01 Hz.
[0105] However, due to the limitation of the DDIC process in the display, when the display frame rate of the display is configured to 30Hz, the actual display frame rate will fluctuate to a certain extent. For example, after actual testing, the actual display frame rate will fluctuate between 29.8Hz-30.2Hz, with a fluctuation of about + / -5%.
[0106] Thus, when the actual display frame rate is lower than 30.01 Hz (the display time difference between two adjacent frames corresponds to Figure 6The consumption frequency will be lower than the production frequency. The frequency difference will gradually accumulate as the frame images are processed until the consumption of a frame image is later than the production of the next frame image. Figure 6 As shown, after the 5th frame image is produced and queued, it is covered by the 6th frame image before it can be consumed, resulting in frame loss.
[0107] In order to solve the above technical problems, the present application embodiment provides a display control method. The execution logic of the solution can refer to Figure 8 . Through this solution, the electronic device can identify the current continuous frame image display scene (such as identifying the preview / video scene), and automatically increase the display frame rate of the display screen in this scene, so as to increase the consumer display frequency and shorten the time between adjacent frames of consumer display. Therefore, even if the actual display frame rate fluctuates to a lower level (such as fluctuating to -5%), the display time difference T2 between two adjacent frames of the image is higher than the production queue time difference between two adjacent frames of the image. This ensures that the consumer display frequency will not be lower than the production queue frequency due to fluctuations in the display frame rate. This avoids the following problems. Figure 6 or Figure 7 Frame drop shown.
[0108] It can be understood that in the effective scenario of the solution provided by the present application, since the display frame rate (i.e., the display frequency) is improved, the display time difference T2 between two adjacent frames of images is less than the production queue time difference between two adjacent frames of images, and is less than the display time difference T1 between two adjacent frames of images in the scenario where the solution is not effective. Take the frame rate B before the display frame rate is improved and the frame rate A after the display frame rate is improved as an example. The corresponding time difference T2 can correspond to the frame rate A, and specifically, the time difference T2 can be equivalent to 1 / frame rate A. Similarly, the time difference T1 can correspond to the frame rate B, and specifically, the time difference T1 can be equivalent to 1 / frame rate B.
[0109] It should be noted that the solution provided in the embodiment of the present application can be applied to the user's electronic device. The electronic device may include a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR) device, a virtual reality (virtual reality, VR) device, an artificial intelligence (artificial intelligence, AI) device, a wearable device, a vehicle-mounted device, a smart home device, or at least one of a smart city device. The electronic device may be configured with a display screen and a camera module. The embodiment of the present application does not impose any special restrictions on the specific type of the electronic device.
[0110] As an example, the electronic device may include a processor, an external memory interface, an internal memory, a universal serial bus (USB) connector, a charging management module, a power management module, a battery, an antenna 1, an antenna 2, a mobile communication module, a wireless communication module, an audio module, a speaker, a receiver, a microphone, an earphone interface, a sensor module, a button, a motor, an indicator, a camera module, a display screen, and a subscriber identification module (SIM) card interface, etc. The sensor module may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor 180H, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
[0111] The processor may include one or more processing units, for example, the processor may include an application processor (AP), a modem processor (Modem), a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor (BP or BBP), and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0112] The processor can generate operation control signals based on instruction opcodes and timing signals to complete the control of instruction fetching and execution.
[0113] A memory may also be provided in the processor for storing instructions and data. In some embodiments, the memory in the processor may be a cache memory. The memory may store instructions or data that have been used by the processor or are frequently used. If the processor needs to use the instruction or data, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor, and thus improves the efficiency of the system.
[0114] In some embodiments, the processor may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. The processor may be connected to a touch sensor, an audio module, a wireless communication module, a display, a camera module, and the like through at least one of the above interfaces.
[0115] It is understandable that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0116] Electronic devices can realize camera functions through camera modules, ISP, video codec, GPU, display, application processor AP, neural network processor NPU, etc.
[0117] The camera module can be used to collect color image data and depth data of the photographed object. The ISP can be used to process the color image data collected by the camera module. For example, when taking a photo, the shutter is opened, and light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye.
[0118] The ISP can also perform algorithm optimization on the image noise, brightness, and skin color. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera module.
[0119] In some embodiments, the camera module may consist of a color camera module and a 3D sensing module.
[0120] In some embodiments, the photosensitive element of the camera of the color camera module can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.
[0121] In some embodiments, the 3D sensing module may be a time of flight (TOF) 3D sensing module or a structured light 3D sensing module. Among them, structured light 3D sensing is an active depth sensing technology, and the basic components of the structured light 3D sensing module may include an infrared emitter, an IR camera module, etc. The working principle of the structured light 3D sensing module is to first emit a light spot of a specific pattern to the object being photographed, and then receive the light spot pattern coding (light coding) on the surface of the object, and then compare the similarities and differences with the original projected light spot, and use the triangulation principle to calculate the three-dimensional coordinates of the object. The three-dimensional coordinates include the distance between the electronic device and the object being photographed. Among them, TOF 3D sensing may be an active depth sensing technology, and the basic components of the TOF 3D sensing module may include an infrared emitter, an IR camera module, etc. The working principle of the TOF 3D sensing module is to calculate the distance (i.e., depth) between the TOF 3D sensing module and the object being photographed by the time when the infrared rays return to obtain a 3D depth map.
[0122] Electronic devices can achieve display functions through GPU, display screen, and application processor. GPU is a microprocessor for image processing, connecting the display screen and application processor. GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor may include one or more GPUs, which execute program instructions to generate or change display information.
[0123] The display screen is used to display images, videos, etc. The display screen includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device may include one or more display screens.
[0124] It should be noted that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components, or combine certain components, or split certain components, or arrange the components differently. The above components may be implemented in hardware, software, or a combination of software and hardware.
[0125] As another example, Fig. 9 A schematic diagram of the composition of another electronic device is provided.
[0126] like Fig. 9 As shown, the electronic device may be provided with a processor (such as a central processing unit, etc.), a memory, a display screen, a camera module, etc.
[0127] The processor can respond to various instructions issued by the user to the electronic device by running a computer program. Alternatively, the processor can manage various hardware / software modules in the electronic device to implement corresponding functions by receiving instructions issued by an application running in the electronic device.
[0128] Exemplary, combined Figure 3 and Figure 5 , the camera service and display synthesis module can realize their respective functions by processing and running the corresponding codes.
[0129] In this example, the camera module in the electronic device may include a camera sensor and a lens. The lens is used to collect light information in the shooting scene, and the camera sensor is used to generate a corresponding electrical signal based on the light information. The electrical signal generated by the camera sensor may also correspond to the original image information (i.e., RAW image information) involved in the above description. Since the process of the camera service obtaining image information based on the original image information has almost no more delay, the frequency of the camera service producing image information (or producing a valid buffer) is equivalent to the image output frequency of the camera sensor.
[0130] The electronic device may also be provided with a display screen. The display screen may include a display driver chip (DisplayDriverIC, DDIC) and a display panel. The display driver chip may control the display panel to perform corresponding display under the control of the processor. The display driver chip may also interact with the processor so that the display synthesis module configured in the processor generates a Vsync signal equivalent to the display frame rate of the display screen. The Vsync signal may be used to implement the function of clock synchronization so that each processing operation performed in the electronic device may be performed in the correct timing.
[0131] like Fig. 9 As shown, the camera module, processor, and display screen in the electronic device can be coupled to the memory respectively. The memory can correspond to the external memory interface and internal memory in the aforementioned example. Alternatively, the memory can also include an on-chip storage space configured on a component with processing functions such as a processor and a DDIC.
[0132] Based on the solution provided in the embodiment of the present application, in the Fig. 9 When running in the electronic device shown, the processor of the electronic device can determine that it has entered a preset scene (such as a preview scene, a camera scene, etc.), and send corresponding indication information to the display driver chip, so that the display driver chip can increase the display frame rate (i.e., refresh rate) of the current display panel accordingly. In this way, the Vsync signal generation cycle determined by negotiation between the processor and the display driver chip is increased together with the display frame rate, thereby increasing the display screen's consumption rate of the buffer in the buffer queue, avoiding problems such as frame loss caused by the buffer consumption frequency being lower than the buffer production frequency due to reasons such as the DDIC process.
[0133] It is understandable that if Fig. 9 The implementation of the scheme shown does not constitute a limitation on the scheme provided in the embodiments of the present application. In some cases, the technical scheme provided in the embodiments of the present application can be applied to Fig. 9 In the electronic device shown.
[0134] In other embodiments, the embodiments of the present application also provide a software structure diagram of an electronic device.
[0135] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. The system is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime (ART) and native C / C++ library, hardware abstraction layer (HAL) and kernel layer.
[0136] The application layer can include a series of application packages.
[0137] like Fig.10 As shown, the application package may include applications such as camera, calendar, map, WLAN, music, SMS, call, navigation, Bluetooth, video, etc.
[0138] The application framework layer, referred to as the framework layer for short, provides an application programming interface (API) and programming framework for the applications in the application layer. The framework layer includes some predefined functions.
[0139] like Fig.10 As shown, the framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, an activity manager, an input manager, and the like.
[0140] The window manager provides window management services (WMS). WMS can be used for window management, window animation management, surface management, and as a transfer station for the input system.
[0141] Content providers are used to store and retrieve data and make it accessible to applications. This data can include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0142] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0143] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0144] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0145] The activity manager can provide activity management services (AMS), which can be used to start, switch, and schedule system components (such as activities, services, content providers, and broadcast receivers) as well as manage and schedule application processes.
[0146] The input manager can provide input management services (IMS), which can be used to manage system input, such as touch screen input, key input, sensor input, etc. IMS takes events from input device nodes and distributes them to appropriate windows through interaction with WMS.
[0147] The Android runtime includes the core library and the Android runtime. The Android runtime is responsible for converting source code into machine code. The Android runtime mainly uses the ahead of time (AOT) compilation technology and the just in time (JIT) compilation technology.
[0148] The core library is mainly used to provide basic Java class library functions, such as basic data structures, mathematics, IO, tools, databases, networks, etc. The core library provides an API for users to develop Android applications.
[0149] The native C / C++ library can include multiple functional modules, such as surface manager, media framework, libc, OpenGL ES, SQLite, Webkit, etc.
[0150] Among them, the surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media framework supports playback and recording of multiple common audio and video formats, as well as static image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. OpenGL ES provides drawing and operation of 2D and 3D graphics in applications. SQLite provides a lightweight relational database for electronic device applications.
[0151] The hardware abstraction layer is referred to as the abstraction layer, which runs in the user space, encapsulates the kernel layer driver, and provides a calling interface to the upper layer. Exemplarily, the abstraction layer may include a display module, an audio module, a camera module, a Bluetooth module, etc.
[0152] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and Bluetooth driver.
[0153] Combination Fig. 9 In the description, Fig.10 The kernel layer shown in FIG. 1 may also be configured with one or more hardware components that provide specific functions. For example, the kernel layer may be configured with the following: Fig. 9 The camera module, display screen, etc. shown.
[0154] Similar to Fig. 9 Instructions such as Fig.10 The software components shown are only examples and do not constitute a limitation on the electronic device involved in the embodiments of the present application. In other embodiments, the electronic device may also be configured with other software modules to support the implementation of the technical solutions provided in the embodiments of the present application.
[0155] As an example, refer to Fig.11 , is a schematic diagram of the composition of another electronic device provided in an embodiment of the present application.
[0156] like Fig.11 As shown, a camera application can be installed in the application layer. The camera application can be used to provide Figure 1-Figure 8 The image capture function involved in any one of the examples may include image preview, image capture, video capture, etc.
[0157] CameraService can be configured in the framework layer. The camera component supports the development of camera services. Developers can access, operate and develop new functions of camera hardware through the open interfaces. The most common operations are preview, photo taking and video recording. As an important part of the camera component, the CameraService service provides an IPC interface for the app layer and completes the creation of CameraDevice devices and session management.
[0158] A display synthesis module (SurfaceFlinger) can also be configured in the framework layer. Combined with the above description, SurfaceFlinger can be used to manage the image display consumption process. SurfaceFlinger can also interact with the DDIC in the display screen to generate a Vsync signal for managing the triggering of various specific operations.
[0159] When the camera application is running, different views can be created according to the current display elements. One or more views can form a view system. In some embodiments, when the camera application needs to display a preview stream or a video stream, a surface view can be created to store the corresponding frame images that need to be displayed at any time. It can be understood that SurfaceView is used as SurfaceView is a special view in SurfaceView. The biggest difference between it and other views (such as TextView, Button, etc.) is that SurfaceView and the corresponding view container are not on the same view layer. The UI display corresponding to SurfaceView can also be completed in a different thread. In this way, the drawing of SurfaceView will not affect the operation of the main thread. Therefore, SurfaceView is generally used to realize the display of dynamic or complex images and animations.
[0160] In an embodiment of the present application, the framework layer of the electronic device may also be configured with a display engine (DisplayEngine). The display engine may generate and issue corresponding indication information (such as indication 132) when the display is currently in a preset scene (such as a preview scene, a camera scene, etc.). This is to facilitate the improvement of the display frame rate of the display screen in the current scene. Correspondingly, in other cases, when exiting the preset scene, the display engine may generate and issue corresponding second indication information. This is to facilitate the display screen to reduce the display frame rate to a normal level.
[0161] In such Fig.11In the example, the abstraction layer may include a camera abstraction (CameraProvider), a hardware mixed renderer (hwcomposer, HWC), and a display interrupt module (DisSync).
[0162] Among them, CameraProvider can be used to cooperate with the camera service to realize the functions of discovering, querying and opening each camera device. The image information generated by the camera module and the control information sent to the camera module can be transmitted and uploaded through CameraProvider.
[0163] The hardware hybrid renderer is used to determine the buffer to be synthesized through the available hardware. Exemplarily, in some embodiments, the HWC can be used alone or in conjunction with SurfaceFlinger to implement the synthesis processing of the sent display image, thereby obtaining the relevant data of the sent display image. In another embodiment, the HWC can also be used to obtain information related to the display frame rate sent from the display screen, and perform transparent transmission of the information.
[0164] The display interrupt module (DisSync) can be used to obtain / determine the display frame rate of the display screen and send the display frame rate to SurfaceFlinger for processing so that SurfaceFlinger can generate the corresponding Vsync signal.
[0165] In an embodiment of the present application, SurfaceFlinger, as the generating entity of the Vsync signal, can generate one or more different types of Vsync signals. Each type of Vsync signal can be generated in a certain periodic cycle to guide the corresponding module / component to trigger the corresponding operation.
[0166] Exemplarily, in some embodiments, one or more different types of Vsync signals may include a first type of Vsync signal. The first type of Vsync signal can be used to instruct SurfaceFlinger that whenever the first type of Vsync signal is generated, SurfaceFlinger obtains the buffer from the buffer queue for consumption and display. In some implementations, the first type of Vsync signal can be generated based on the SurfaceFlinger Vsync event. For example, after obtaining the display frame rate of the display screen, the display interrupt module sends a SurfaceFlinger Vsync event to SurfaceFlinger. In response to the SurfaceFlinger Vsync event, SurfaceFlinger generates a first type of Vsync signal at the same frequency as the display frame rate. In other words, the first type of Vsync signal can be used to trigger SurfaceFlinger to consume and display.
[0167] In some embodiments, one or more different types of Vsync signals may include a second type of Vsync signal. The second type of Vsync signal can be used for the camera application to issue rendering instructions at the corresponding time. It is understandable that the camera application can apply for a second type of Vsync signal from SurfaceFlinger when an image interface display (such as a preview stream or a video stream) is required. Correspondingly, SurfaceFlinger can generate a second type of Vsync signal based on the app Vsync event from the display interrupt module at the same frequency as the display frame rate. The second type of Vsync signal can be sent to the camera application so that the camera application can issue instructions such as starting shooting and starting image acquisition according to the second type of Vsync signal. In other words, the second type of Vsync signal can be used to trigger the camera application to issue instructions corresponding to a new frame image.
[0168] Continue to combine Fig.11 , the kernel layer under the abstract layer may include multiple driver modules such as display driver. In this example, the display driver may be configured with an enabling driver module (referred to as enabling driver). The enabling driver may be used to send a frequency increase indication to the display screen. The frequency increase indication may carry frequency increase reference information, which is used to instruct the display screen to increase the display frame rate according to the frequency increase reference information. For example, the frequency increase reference information may include a frequency increase multiplier, and the frequency increase multiplier is greater than 1. Correspondingly, the display screen may increase the display frame rate after receiving the frequency increase indication, and the increased display frame rate may be obtained by increasing the current display frame rate by a multiplier corresponding to the frequency increase multiplier. For example, when the frequency increase multiplier is 1.2, the increased display frame rate (such as frame rate A) may be 1.2 times the display frame rate before the increase (such as frame rate B). In some implementations, the enabling driver may send the frequency increase indication when receiving an indication 132 from the display engine.
[0169] Correspondingly, in other scenarios, when the enabling driver receives the second indication information, it corresponds to exiting the preset scenario. Then the enabling driver can generate and send frequency reduction reference information. The frequency reduction reference information can be used to instruct the display screen to reduce the current display frame rate to the instructions before the frequency increase. For example, the display screen can adjust the current display frame rate (such as frame rate A) to the previous display frame rate (such as frame rate B) according to the frequency reduction reference information.
[0170] In such Fig.11 In the example, the various hardware components configured in the electronic device are given at the same time, and each hardware component can constitute a logical hardware layer. The hardware composition can correspond to Fig. 9Exemplarily, a buffer queue for storing already produced image information (or corresponding file identifiers) may be set in a memory of the hardware layer.
[0171] The solutions provided in the embodiments of the present application can be applied to Fig.11 In an electronic device composed as shown.
[0172] The following combination Fig.11 The composition shown is used to describe in detail the scheme provided in the embodiments of the present application.
[0173] Exemplary, reference Fig.12 , is a schematic diagram of the interaction between modules of a display control method provided in an embodiment of the present application. Fig.12 The solution shown can realize the production and queuing of images to be displayed in a preset scene (such as a preview scene, a video scene, etc.). The production and queuing of the Nth frame of image is taken as an example.
[0174] like Fig.12 As shown, the program may include:
[0175] S1201. The camera application sends an instruction 1201 to the camera service.
[0176] Instruction 1201 may be used to instruct the electronic device to capture a new image (such as the Nth frame image).
[0177] As an example, take the Nth frame image as the first frame image captured after the camera application is started.
[0178] After the camera application starts running, it can request a Vsync signal from SurfaceFlinger. Correspondingly, SurfaceFlinger can generate a second type of Vsync signal and send it to the camera application. Then, the camera application can send the instruction 1201 when the second type of Vsync signal arrives. The specific generation mechanism of the second type of Vsync signal will be described in detail later.
[0179] S1202. The camera service sends an indication 1202 to the camera abstraction.
[0180] S1203. The camera service sends instructions to the camera module S1203.
[0181] Among them, the indication 1202 can be obtained according to the indication 1201. Similarly, the indication 1203 can be obtained according to the indication 1202. Thus, the indication 1203 can be used to instruct the camera module to start (or continue) the acquisition of a new image.
[0182] S1204. The camera module obtains the original image information of the Nth frame image and sends it to the camera abstraction.
[0183] After receiving the instruction 1203, the camera module may send the electrical signal (ie, the original image information N) generated by the camera sensor and corresponding to the current scene to the camera abstraction.
[0184] It is understandable that in some implementations, after the light hole of the lens is opened, the lens will continuously irradiate the light signal to the camera sensor. Correspondingly, the camera sensor can generate an electrical signal corresponding to the current Nth frame image (i.e., the RAW image information of the Nth frame image, i.e., the original image information N) according to the light signal. Therefore, after obtaining the indication 1203, the camera sensor can send the original image information N to the camera abstraction.
[0185] S1205. The camera abstraction obtains processed image information N based on the original image information N and sends it to the camera service.
[0186] Processing image information N may correspond to Figure 5 The image information N shown is the RBG image data corresponding to the Nth frame image.
[0187] In this example, the camera abstraction directly sends the processed image information N to the camera service. Combined with the above description of the file descriptor, in other implementations, the camera abstraction can store the processed image information N in a buffer N of the memory, and send the file descriptor N corresponding to the buffer N to the camera service.
[0188] In this way, the camera service can obtain the processed image information N of the Nth frame image.
[0189] In other implementations, the camera abstraction may not process the raw image information N, but directly transmit the raw image data N to the camera service for processing, so that the camera service obtains the processed image information N. In some implementations, the transmission of the data may also be realized by relying on a file descriptor storing the corresponding information.
[0190] It can be understood that the execution process of S1201-S1204 can be applied to any scenario during the operation of the camera application, such as image capture scenario, preview scenario, video scenario, etc.
[0191] In the preview scene and the video scene, the camera application can execute the following S1206-S1208 to implement processing different from other scenes such as the shooting scene.
[0192] S1206. The camera application sends an indication to establish a SurfaceView.
[0193] Exemplarily, the camera application may send the Create SurfaceView indication when entering a preview scene (corresponding to the need to display a preview stream) or a video scene (corresponding to the need to display a video stream).
[0194] As a specific implementation, combined with Figure 1 When the user turns on the camera, that is, inputs operation 103, the camera enters the preview scene by default. Alternatively, when the user inputs operation 106 on button 105, the camera enters the video scene.
[0195] Correspondingly, the camera application may execute S1206 after receiving the user's operation 103. Alternatively, the camera application may execute S1206 after receiving the user's input operation 106.
[0196] The following takes entering the preview scene as an example.
[0197] Correspondingly, a SurfaceView can be established for the camera preview (CameraPreview) in the view system. It can be understood that only in the preview scene or video scene, the electronic device will establish the corresponding SurfaceView for the current scene. In other words, by establishing SurfaceView, it indicates that the electronic device enters the preview scene or video scene.
[0198] S1207. The camera service draws the processed image information N onto the SurfaceView.
[0199] Exemplarily, before the camera service obtains the processed image information N corresponding to the Nth frame image, the corresponding SurfaceView has been established. After executing S1205, the camera service can draw the Nth frame image to be drawn on the SurfaceView according to the processed image information N.
[0200] S1208. The camera service stores the file identifier N in the buffer queue.
[0201] Exemplary, combined Figure 5 As described in , the camera service can also store the file identifier N corresponding to the Nth frame image into the buffer queue after obtaining the processed image information N in S1205, thereby implementing the entry of the Nth frame image into the queue.
[0202] It is understandable that Fig.12In the example, the Nth frame image can be any frame image in the preview stream or video stream. If the Nth frame image is not the first frame image of the preview stream or video stream, the camera does not need to repeatedly execute S1206 to establish a new SurfaceView. After the camera service obtains the processed image information N of the Nth frame image, the new image can be directly drawn on the existing SurfaceView, covering the previous image.
[0203] Combined with the above description of the consumption of produced buffers and the triggering mechanism for the production of new buffers, the relevant operations can be performed through the Vsync signal generated by SurfaceFlinger.
[0204] Among them, the Vsync signal can include a first type of Vsync signal and a second type of Vsync signal according to function.
[0205] The first type of Vsync signal can be used to trigger the consumption display of SurfaceFlinger.
[0206] The second type of Vsync signal can be used to trigger the camera application to send related instructions. Fig.12 Instructions 1201 are shown.
[0207] Taking the first type of Vsync signal as an example, SurfaceFlinger can generate it repeatedly at a certain time interval.
[0208] The time interval between two adjacent first-type Vsync signals may be equal to the switching display time interval between two adjacent frame images of the current display screen provided by the DDIC of the display screen. That is, the generation frequency of the first-type Vsync signal is equal to the display frame rate of the current display screen from the DDIC.
[0209] Combined with the above description of the trigger mechanism for effective buffer consumption in the buffer queue, whenever a first-class Vsync signal arrives, the corresponding SurfaceFlinger obtains the buffer from the buffer queue for consumption and display.
[0210] In such Figure 6 In the problem scenario shown, due to the process error of DDIC and other reasons, the display frame rate (i.e., refresh rate) of the display screen is slightly lower than the frequency of the camera module acquiring new images. This will also cause the generation frequency of the first type of Vsync signal to be lower than the frequency of image entry, which will lead to the problem of frame loss.
[0211] In an embodiment of the present application, when entering a preset scene, the electronic device can automatically increase the display frame rate. The increased display frame rate corresponds to an increase in the generation frequency of the first type of Vsync signal. Therefore, even if the display frame rate is reduced to the limit due to the DDIC process (such as a display frame rate drop of -0.5%), it is possible to ensure that the generation frequency of the first type of Vsync signal is greater than or equal to the image output frequency of the camera sensor (that is, the frequency at which the camera service processes the image information for queue processing). This avoids the problem of loss caused by the image being overwritten before it is consumed.
[0212] As a specific example, Fig.13 A schematic diagram of the interaction between modules of another display control method is provided. Fig.13 The solution shown is implemented so that the electronic device can accurately identify preset scenes (such as preview scenes, video scenes, etc.), thereby triggering frequency increase processing.
[0213] like Fig.13 As shown, the program may include:
[0214] S1301. The camera application determines that a SurfaceView exists.
[0215] In combination with the above description, SurfaceView can be established when the camera application enters the preview scene or the video scene.
[0216] In this example, the camera application can determine that it has entered the preview scene or the video scene through the presence of the SurfaceView.
[0217] In other embodiments, the camera application may perform the following steps: Fig.12 In the case of S1206 shown, it is determined that a SurfaceView exists, and then it is determined to enter a preview scene or a video scene.
[0218] S1302. The camera application sends an indication 131 to the display engine. The indication 131 is used to indicate that a preset scene is currently entered. The preset scene includes a preview scene, a video scene, and other scenes that require continuous multi-frame image display based on the images collected by the camera module.
[0219] S1303. The display engine generates and sends an instruction 132 to the enabling driver.
[0220] Exemplarily, the first indication information may be used to instruct the enabling driver to configure the frequency increasing process to start.
[0221] In different implementations, the content of the first indication information may be different. According to the pre-agreed / configured correspondence, the enabling driver may determine that the frequency increase process needs to be configured to be started according to the first indication information.
[0222] For example, the first indication information may include "1" or "true". Correspondingly, after receiving "1" or "true", the enabling driver determines that the frequency increase process needs to be configured to start.
[0223] S1304. Enable the driver to generate a frequency increase instruction, and send the frequency increase instruction to the display driver chip of the display screen.
[0224] Exemplarily, the frequency increase indication may carry frequency increase reference information, and the frequency increase reference information may be used by DDIC to perform frequency increase processing accordingly.
[0225] In the present application, the enabling driver may be pre-configured with a frequency increase multiplier, and the frequency increase multiplier may be a number greater than 1. For example, the frequency increase multiplier may include one or more values such as 1, 1.2, 1.5, 1.8, 2, etc. The enabling driver may carry the frequency increase multiplier in the frequency increase reference information and send it to the DDIC.
[0226] In some implementations, the enabling driver may send the multiple frequency increase ratios to the DDIC after receiving the instruction 132, so that the DDIC can flexibly select an appropriate frequency increase level.
[0227] In some other implementations, the frequency increase ratio may also be determined by a camera application or a display engine.
[0228] For example, indications 131 and 132 may carry a frequency increase ratio determined by a camera application. In this way, the enabling driver may carry the frequency increase ratio carried therein in the frequency increase indication and send it to the DDIC after receiving indication 132. It is understandable that the camera application, as an upper-layer application of the preview stream / video stream, may be able to know the current shooting scene and / or the current relevant information of the electronic device. When the shooting scene is dim, the shooting object moves at a high speed (such as the displacement of the same object in adjacent frame images is greater than a preset distance), and / or the load of the electronic device is low, the camera application may select a higher frequency increase ratio so as to maximize the display frame rate of the display screen and the generation frequency of the first type of Vsync signal within a reasonable range. And then obtain a better viewing experience of the preview stream / video stream.
[0229] For another example, after receiving the indication 131 based on S1302 , the display engine may select a frequency increase to be carried in the indication 132 as needed.
[0230] S1305. The display driver chip sends the display frame rate A to the hardware hybrid renderer (HWC).
[0231] S1306. The hardware hybrid renderer sends a display frame rate A to the display interrupt module.
[0232] S1307. The display interruption module sends the display frame rate A to the display synthesis module.
[0233] Through S1305-S1307, SurfaceFlinger can obtain the display frame rate currently provided by DDIC.
[0234] It is understandable that after S1304 is executed, DDIC can receive a frequency boost indication carrying a frequency boost ratio. Correspondingly, DDIC can perform frequency boost processing on the current display frame rate according to the frequency boost ratio. For example, before the frequency boost processing, the current display frame rate is frame rate B. After the frequency boost processing, the display frame rate is frame rate A. Frame rate A / frame rate B=frequency boost ratio. Therefore, when SurfaceFlinger generates a first-class Vsync signal, or a first-class Vsync signal and a second-class Vsync signal, it can be generated according to frame rate A. The frequency of the corresponding generated first-class Vsync signal is equivalent to the higher frame rate A.
[0235] In some implementations, the execution of S1305 - S1307 may be performed under the instruction of SurfaceFlinger.
[0236] For example, refer to Fig.13 , SurfaceFlinger can directly or indirectly send a message to DDIC to obtain the current display frame rate after the camera application requests the Vsync signal. Correspondingly, DDIC can feed back the frame rate A after the frequency increase to SurfaceFlinger through S1305-S1307.
[0237] Therefore, according to Fig.13 In the scheme shown, under a preset scenario, DDIC can trigger frequency boost processing to improve the display frame rate of the display screen. Correspondingly, SurfaceFlinger can generate a first type of Vsync signal according to the improved display frame rate.
[0238] According to the generated first type of Vsync signal, SurfaceFlinger can execute the consumption and display of the existing frame image.
[0239] Exemplary, reference Fig.14 , this solution can realize the display processing of existing images. Fig.12 , taking the buffer queue including the file identifier N of the Nth frame image as an example.
[0240] like Fig.14 As shown, the program may include:
[0241] S1401. After the first type of Vsync signal arrives, SurfaceFlinger obtains the file identifier N from the buffer queue.
[0242] S1402. SurfaceFlinger obtains processed image information N according to file identifier N.
[0243] S1403. SurfaceFlinger sends the processed image information N to the hardware hybrid renderer (HWC) for synthesis processing to obtain the display image N.
[0244] S1404. The hardware hybrid renderer sends the display image N to the display driver chip.
[0245] S1405. The display driver chip controls the display panel to refresh the display according to the sent display image N.
[0246] It should be noted that in Fig.14 In the example, the synthesis processing of the Nth frame image by HWC is used as an example for explanation. In other embodiments, SurfaceFlinger can also be used to perform synthesis processing to obtain the corresponding display image N, or SurfaceFlinger can cooperate with HWC to complete the synthesis processing to obtain the corresponding display image N.
[0247] It is understandable that in Fig.14 In the example, a first type Vsync signal is used to realize the transmission and display of the Nth frame image. The Nth frame image can be any frame image in the preview stream / video stream.
[0248] Then, after the next first-type Vsync signal arrives, the electronic device can execute the corresponding subsequent frame image transmission and consumption.
[0249] Exemplarily, the first type of Vsync signal corresponding to S1401 is the first type of Vsync signal V0. After the first type of Vsync signal V0 arrives, SurfaceFlinger executes the display consumption of the Nth frame image.
[0250] The next first-type Vsync signal adjacent to the first-type Vsync signal V0 is the first-type Vsync signal V1. The corresponding electronic device may continue to repeatedly execute Fig.14 The solution shown is implemented so that subsequent images can be sent and displayed according to the first type of Vsync signal V1.
[0251] Take the case where the N+1th frame image has been completed and queued before the first type of Vsync signal V1 arrives. Then after the first type of Vsync signal V1 arrives, the electronic device can Fig.14The solution shown realizes the display consumption of the N+1th frame image.
[0252] In other scenarios, due to Fig.13 The frequency increase process of the display frame rate shown compresses the duration between the first type Vsync signal V1 and the first type Vsync signal V0, thereby enabling the electronic device to consume and display the existing image faster.
[0253] It is understandable that if Fig.13 In the implementation of the solution shown, the electronic device can process S1302-S1304 so that the DDIC can increase the frequency of the current display frame rate, thereby increasing the consumption display frequency in the corresponding scenario.
[0254] In other scenarios, the camera application can also exit the preset scene (such as exiting the preview scene, exiting the video scene, etc.) according to Fig.13 A similar solution is implemented by rolling back the frequency increase process, so that in non-preset scenarios, the display screen can use the frame rate before the frequency increase process to switch and display images.
[0255] For example, the camera application can determine to exit the preset scene according to the absence of SurfaceView in the current view system. Correspondingly, the camera application can instruct DDIC to perform a rollback operation through the display engine and the enable driver.
[0256] For example, the camera application may send an indication 1302 to the display engine to instruct the display engine to turn off the frequency boost. Correspondingly, the display engine may send a second indication message to the enabling driver. The enabling driver may generate and send frequency reduction reference information based on the received second indication message. The frequency reduction reference information may be used to instruct the display screen to reduce the current display frame rate to the instructions before the frequency boost. For example, the display screen may adjust the current display frame rate (such as frame rate A) down to the previous display frame rate (such as frame rate B) based on the frequency reduction reference information.
[0257] In order to more clearly illustrate the technical solution provided by the embodiment of the present application, the following Fig.15 The interaction flow diagram between the modules provided continues to illustrate the implementation of the solution provided in the embodiment of the present application.
[0258] like Fig.15 As shown, the program may include:
[0259] S1501. The camera application determines that a SurfaceView exists.
[0260] For example, the camera application may start running after receiving the operation 103 input by the user.
[0261] Combination Figure 1 In some embodiments, the camera application may enter the preview scene by default after starting to run. Correspondingly, the camera application may determine that it has entered a preset scene including the preview scene by executing S1501.
[0262] In other embodiments, Fig.15 As shown, the camera application may also receive an operation 106 input by the user, corresponding to entering a video shooting scene. Similar to the above description, the camera application may determine that it has entered a preset scene including a video shooting scene by executing S1501.
[0263] In this way, after determining that the preset scene has been entered, the electronic device can execute the following S1502.
[0264] S1502. The camera application sends an instruction 131 to the display engine.
[0265] Exemplarily, the indication 131 may correspond to Fig.13 Instruction 131 in S1302 in the embodiment. Through the instruction 131, the display engine can know that the frequency increase process needs to be triggered.
[0266] S1503. The display engine sends an instruction 132 to the enabling driver.
[0267] Exemplarily, the indication 132 may correspond to: Fig.13 Instructions 132.
[0268] S1504. The enable driver sends a frequency increase instruction to the display driver chip.
[0269] For example, the execution of S1504 can refer to Fig.13 S1304 in.
[0270] As an implementation, the frequency increase instruction may include frequency increase reference information, which is used to instruct the display screen to increase the display frame rate according to the frequency increase reference information. For example, the frequency increase reference information may include a frequency increase multiplier, and the frequency increase multiplier is greater than 1.
[0271] S1505. The display driver chip refreshes the display at a display frame rate A according to the frequency increase instruction.
[0272] like Fig.15 As shown, in this example, before receiving the frequency increase instruction, the display driver chip can control the display screen to refresh the display at the display frame rate B.
[0273] The display frame rate A is greater than the display frame rate B.
[0274] In the embodiment of the present application, the operations of S1501-S1505 can complete the configuration related to the frequency increase process. That is, the frequency increase process includes S1501-S1505.
[0275] S1506. The camera application sends a Vsync signal generation request 151 to the display synthesis module.
[0276] Combined with the above Figure 4 Regarding the description of the production and consumption of buffers in the buffer queue, when the scene switches (such as receiving operation 103 or operation 106), the camera application can also send a Vsync signal generation request 151 to SurfaceFlinger to trigger the issuance of commands and the consumption and display of new images based on the Vsync signal generated by the current scene.
[0277] S1507. The display synthesis module obtains the current display frame rate from the display driver chip.
[0278] S1508. The display driver chip sends the display frame rate A to the hardware hybrid renderer.
[0279] S1509. The hardware hybrid renderer sends the display frame rate A to the display interrupt module.
[0280] S1510. The display interruption module sends a display frame rate A to the display synthesis module.
[0281] In this way, through S1507-S1510, SurfaceFlinger can obtain the current actual display frame rate as display frame rate A from the DDIC of the display screen.
[0282] S1511. The display synthesis module generates a plurality of first-type Vsync signals and a plurality of second-type Vsync signals according to the time interval T2 corresponding to the display frame rate A.
[0283] Exemplarily, SurfaceFlinger can generate multiple first-class Vsync signals according to the display frame rate A. The first-class Vsync signal can be used to trigger the display of the new image. For example, SurfaceFlinger can sequentially generate the first-class Vsync signal V0, the first-class Vsync signal V1, and the like. The time interval between the generation of the first-class Vsync signal V1 and the generation of the first-class Vsync signal V0 can be T2.
[0284] SurfaceFlinger can also generate multiple second-class Vsync signals according to the display frame rate A. The second-class Vsync signal can be used to trigger the camera application to issue a rendering instruction for a new image. For example, SurfaceFlinger can sequentially generate the second-class Vsync signal V0, the second-class Vsync signal V1, and so on. The time interval between the generation of the second-class Vsync signal V1 and the generation of the second-class Vsync signal V0 can also be T2.
[0285] In some implementations, the time interval T2 may be the inverse of the display frame rate A. That is, T2 = 1 / A.
[0286] Thus, according to the arrival of the first type Vsync signal and the second type Vsync signal, the electronic device can trigger corresponding operations accordingly. For example, as shown in S1512-S1513:
[0287] S1512. Every time a first-type Vsync signal arrives, the display synthesis module obtains image information from the cache queue to synthesize and display it; the time interval between two adjacent first-type Vsync signals is T2.
[0288] S1513. Every time a second type Vsync signal arrives, the camera application sends a rendering instruction for a new image; the time interval between two adjacent second type Vsync signals is T2.
[0289] Therefore, through S1501-S1513, the electronic device can realize the frequency increase of the display frame rate for the preset scene. Therefore, when the camera sensor output frequency remains unchanged, by increasing the display frame rate, the interval between adjacent first-class Vsync signals is shortened, and the frequency of image consumption and display is increased. This avoids problems such as image frame loss caused by untimely display due to problems such as DDIC process.
[0290] In such Fig.15 In the example, the execution logic of the electronic device in the case of exiting the preset scene is also provided.
[0291] For example, as shown in S1514-S1526:
[0292] S1514. The camera application determines that the SurfaceView does not exist.
[0293] In some implementations of the present application, the camera application may determine whether a SurfaceView exists after each scene transition.
[0294] For example, in this example, the camera application may receive the user's operation 108 and correspondingly enter the gallery browsing scene.
[0295] Thus, due to the scene conversion, the camera application may execute S1514 to determine that there is no SurfaceView for supporting dynamic image stream display.
[0296] S1515. The camera application sends an instruction 133 to the display engine.
[0297] S1516. The display engine sends an instruction 134 to the enabling driver.
[0298] S1517. The enabling driver sends a frequency increase exit instruction to the display driver chip. In other embodiments, the frequency increase exit instruction may also be referred to as a frequency reduction instruction.
[0299] S1518. The display driver chip refreshes the display at a display frame rate B according to the frequency increase exit instruction.
[0300] Thus, through the execution of S1514-S1518, the electronic device can perform frequency increase exit processing (i.e. frequency reduction processing) after exiting the preset scene and entering the new display scene, thereby enabling the electronic device to produce and consume new images based on the display frame rate B before the frequency increase.
[0301] S1519. The camera application sends a Vsync signal generation request 152 to the display synthesis module.
[0302] S1520. The display synthesis module obtains the current display frame rate from the display driver chip.
[0303] S1521. The display driver chip sends a display frame rate B to the hardware hybrid renderer.
[0304] S1522. The hardware hybrid renderer sends the display frame rate B to the display interrupt module.
[0305] S1523. The display interrupt module sends the display frame rate B to the display synthesis module.
[0306] S1524. The display synthesis module generates a plurality of first-type Vsync signals and a plurality of second-type Vsync signals according to the time interval T1 corresponding to the display frame rate B.
[0307] S1525. Every time a first-type Vsync signal arrives, the display synthesis module obtains image information from the cache queue to synthesize and display it; the time interval between two adjacent first-type Vsync signals is T1.
[0308] S1526. Every time a second type Vsync signal arrives, the camera application sends a rendering instruction for a new image; the time interval between two adjacent second type Vsync signals is T1.
[0309] It is understandable that the execution of S1519-S1526 can refer to S1506-S1513 respectively. Thus, the electronic device can produce or consume based on the display frame rate B after the frequency reduction processing.
[0310] It is understandable that the electronic device provided in the embodiment of the present application includes a hardware structure and / or software module corresponding to each function in order to realize the above functions. Those skilled in the art should easily realize that, in conjunction with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiment of the present application.
[0311] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0312] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of each functional module. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0313] The above integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0314] Fig.16A schematic diagram of the composition of a chip system 1600 is shown. The chip system 1600 may include: a processor 1601 and a communication interface 1602, which are used to support related devices to implement the functions involved in the above embodiments. In a possible design, the chip system also includes a memory for storing program instructions and data necessary for the electronic device. The chip system may be composed of chips, or may include chips and other discrete devices. It should be noted that in some implementations of the present application, the communication interface 1602 may also be referred to as an interface circuit.
[0315] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0316] The functions or actions or operations or steps in the above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may include one or more servers, data centers and other data storage devices that can be integrated with the medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0317] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A display control method, characterized in that: Applied to an electronic device, the electronic device is equipped with a display screen; the electronic device is also installed with a camera application; the method comprises: Receiving a first operation from a user; In response to the first operation, the camera application is started, and a first interface is displayed on the display screen; the first interface is a preview interface of the camera application, or the first interface is a video shooting interface of the camera application; When the first interface is displayed, the display frame rate of the display screen is a first frame rate; receiving a second operation from the user; In response to the second operation, the display screen displays a second interface, where the second interface is different from the preview interface or the video shooting interface; When the second interface is displayed, the display frame rate of the display screen is a second frame rate; The first frame rate is greater than the second frame rate.
2. The method according to claim 1, characterized in that Before receiving the first operation of the user, the method further includes: The electronic device displays a third interface on the display screen, the third interface is the main interface of the electronic device, and the display frame rate of the electronic device is the second frame rate.
3. The method according to claim 1 or 2, characterized in that: The electronic device is equipped with a camera module, and the camera module is used to obtain image information of the shooting scene after the camera application is run; A buffer queue is configured in the memory of the electronic device, and the buffer queue is used to store images to be displayed, and the images to be displayed are generated according to the image information acquired by the camera module; After receiving the first operation, the method further includes: The camera application controls the image information to be acquired by the camera module; The electronic device generates the image to be displayed according to the image information, and stores the image to be displayed in the buffer queue.
4. The method according to claim 3, characterized in that The frequency at which the camera module acquires the image information is a third frame rate, and the first frame rate is greater than or equal to the third frame rate.
5. The method according to any one of claims 1 to 4, characterized in that After receiving the first operation of the user, the method further includes: The electronic device determines that a first view has been configured, and the first view is used to draw an image to be displayed on a composite preview interface or a video shooting interface.
6. The method according to claim 5, characterized in that Before displaying the first interface, the method further includes: The electronic device sends a frequency increase instruction to the display screen; The display screen configures the display frame rate to the first frame rate according to the frequency increase instruction, so as to display the first interface.
7. The method according to claim 6, characterized in that The frequency increase indication includes a frequency increase multiplier, and the frequency increase multiplier is greater than 1; The first frame rate is equal to the product of the second frame rate and the frequency increase ratio.
8. The method according to any one of claims 5 to 7, characterized in that: After receiving the first operation of the user and before displaying the first interface, the method further includes: The camera application sends a first Vsync signal generation request to the electronic device; The electronic device generates a plurality of first Vsync signals according to a first time interval based on a request generated by the first Vsync signal; the first Vsync signal is used to trigger drawing and synthesis of images in the buffer queue.
9. The method according to claim 8, characterized in that Before generating a plurality of first Vsync signals, the method further includes: The electronic device generates a request according to the first Vsync signal to obtain a current display frame rate from the display screen; The generating a plurality of first Vsync signals according to the first time interval comprises: The electronic device determines the first time interval according to the current display frame rate, and generates a first Vsync signal every time the first time interval passes.
10. The method according to any one of claims 8 to 9, characterized in that: The electronic device displays a first interface on the display screen, including: After the first Vsync signal is generated, the electronic device obtains first image information from the buffer queue, where the first image information corresponds to the first interface; On the first view, drawing and synthesizing is performed according to the first image to obtain an image to be displayed corresponding to the first interface; The electronic device displays the first interface on the display screen according to the image to be displayed.
11. The method according to any one of claims 1 to 4, characterized in that: The electronic device is provided with a display engine and a display driving module, and the display driving module is provided with an enabling driving unit; The method further comprises: The camera application determines that a first view has been configured, where the first view is used to draw an image to be displayed on a composite preview interface or a video capture interface; The camera application sends first indication information to the enabling driving unit through the display engine, where the first indication information is used to instruct the enabling driving unit to enter a preset scene, where the preset scene includes a preview scene and / or a video shooting scene; The enabling driver generates a frequency increase instruction according to the first instruction information, wherein the frequency increase instruction is used to instruct a display driver chip DDIC of the display screen to increase a display frame rate; The DDIC receives the frequency increase instruction, and adjusts the display frame rate of the display screen to the first frame rate according to the frequency increase instruction.
12. The method according to claim 11, characterized in that The electronic device is provided with a display synthesis module SurfaceFlinger; The method further comprises: The camera application sends a first Vsync signal generation request to the SurfaceFlinger; The SurfaceFlinger generates a request according to the first Vsync signal to obtain a current display frame rate of a first frame rate from the DDIC; The SurfaceFlinger generates a first Vsync signal at a first time interval, where the first time interval corresponds to the first frame rate; Whenever a first Vsync signal is generated, the SurfaceFlinger obtains image information from a buffer queue in a memory of the electronic device for drawing synthesis, and sends the image to be displayed obtained by the drawing synthesis to the display screen for display.
13. The method according to any one of claims 5 to 10, characterized in that: After receiving the second operation of the user, the method further includes: The electronic device determines that the configured views do not include the first view.
14. The method according to claim 13, characterized in that Before the electronic device switches to display the second interface, the method further includes: The electronic device sends a frequency reduction instruction to the display screen; The display screen configures the display frame rate to the second frame rate according to the frequency reduction indication so as to display the second interface.
15. The method according to claim 13 or 14, characterized in that After receiving the second operation of the user and before displaying the second interface, the method further includes: The camera application sends a second Vsync signal generation request to the electronic device; The electronic device generates a plurality of second Vsync signals according to a second time interval based on a request generated by the second Vsync signal; the second Vsync signal is used to trigger drawing and synthesis of the images in the buffer queue.
16. The method according to claim 15, characterized in that Before generating a plurality of second Vsync signals, the method further includes: The electronic device generates a request according to the second Vsync signal to obtain a current display frame rate from the display screen; Generating a plurality of second Vsync signals according to the second time interval comprises: The electronic device determines the second time interval according to the current display frame rate, and generates a second Vsync signal every second time interval.
17. The method according to any one of claims 14 to 16, characterized in that: The electronic device displays a second interface on the display screen, including: After the second Vsync signal is generated, the electronic device obtains second image information from the buffer queue, where the second image information corresponds to the second interface; On the second view, drawing and synthesizing is performed according to the second image to obtain an image to be displayed corresponding to the second interface; the second view is different from the first view, and the second view is used to draw and synthesize an image to be displayed of other interfaces different from the preview interface or the video shooting interface; The electronic device displays the second interface on the display screen according to the image to be displayed corresponding to the second interface.
18. The method according to any one of claims 5 to 10 or any one of claims 13 to 17, characterized in that: The first view includes a surface view SurfaceView.
19. An electronic device, characterized in that: The electronic device comprises: a memory, one or more processors and one or more display screens; the memory, the processor and the display screen are coupled; The memory is used to store computer program codes, and the computer program codes include computer instructions. When the processor executes the computer instructions, the electronic device executes the method as claimed in any one of claims 1 to 18.
20. A chip system, characterized in that: The chip system is applied to an electronic device; the chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through lines; the interface circuit is used to receive a signal from a memory of the electronic device and send the signal to the processor, the signal including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1-18.
Citation Information
Cited By
Display control method and electronic device
EP4668770A1
Display control method and electronic device
WO2025025604A1