Display control method and electronic equipment
Patent Information
- Application Number
- CN202480012218.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-02
- Filing Date
- 2024-03-11
- Publication Date
- 2025-10-03
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.
It provides a display control method, which automatically increases the display frame rate by identifying the preview/video shooting scene, ensuring that the display frame rate is greater than the output frequency of the camera module, thereby avoiding frame drop problems caused by the image being covered.
It realizes accurate identification and increase display frame rate in preview/video shooting scenes, avoids frame loss problems and improves user experience.
Smart Images

Figure CN120752925A_ABST
Abstract
Description
Display control method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on August 2, 2023, with application number 202310967414.0 and invention name “A Display Control Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] 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
[0003] When the camera application of the electronic device is running, a preview image can be displayed on the display screen so that the user can intuitively see the current shooting scene.
[0004] The preview screen may be composed of a plurality of continuous frame images, which may be captured by a camera module of an electronic device and displayed on a display screen controlled by a display driver chip of the electronic device.
[0005] Currently, due to process limitations of display driver chips, the display's switching frequency doesn't accurately match the camera module's image acquisition frequency. This can cause some images captured by the camera module to be overwritten by subsequent images before they appear on the display. This can lead to issues like frame dropouts and skipped preview frames.
[0006] Summary of the Invention
[0007] The present application provides a display control method and electronic device that can accurately identify preview / video shooting scenes and improve the display frame rate in the scenes to avoid frame loss problems caused by non-displayed images being covered.
[0008] To achieve the above technical objectives, this application adopts the following technical solutions:
[0009] In a first aspect, a display control method is provided for an electronic device equipped with a display screen. The electronic device also includes a camera application. The method includes: receiving a first user operation; in response to the first operation, launching the camera application and displaying a first interface on the display screen. The first interface is a preview interface of the camera application, or the first interface is a video capture interface of the camera application. When displaying the first interface, the display screen has a display frame rate of a first frame rate. A second user operation 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 capture interface. When displaying the second interface, the display screen has a display frame rate of a second frame rate. The first frame rate is greater than the second frame rate. For example, the first operation may be a user clicking a camera application icon on the display screen of the electronic device. For another example, the second operation may include a user instructing the user to exit the preview interface or the video capture interface. For example, the second operation may include instructing the electronic device to enter the home interface, or instructing the camera application to enter the gallery interface.
[0010] 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 will also solve the problem of frame images being overwritten and lost due to a low display frame rate.
[0011] Optionally, before receiving the first operation from the user, the method further includes: the electronic device displaying a third interface on the display screen, the third interface being the main interface of the electronic device, and the display frame rate of the electronic device being the second frame rate. In this implementation, before entering the preset scene, the electronic device may use the configured second frame rate as the display frame rate. That is, after entering the preset scene, the electronic device may increase the display frame rate for display.
[0012] 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 based on the image information obtained by the camera module. After receiving the first operation, the method also includes: the camera application controls the camera module to obtain the image information. The electronic device generates the image to be displayed based on the image information and stores the image to be displayed in the buffer queue. This example provides a specific image display mechanism. That is, the production and consumption of images are performed through the buffer queue configured in the memory to achieve the presentation of the final image 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 overwritten due to the production rate being greater than the consumption rate.
[0013] Optionally, the camera module acquires the image information at 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.
[0014] Optionally, after receiving the first user operation, the method further includes: the electronic device determining that a first view has been configured, where the first view is used to draw the image to be displayed in the composite preview interface or the video capture interface. In this example, a specific implementation of determining whether to enter a preset scene is provided. For example, the electronic device may determine that the preset scene has been entered if the first view has been configured in the view system.
[0015] 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 configuring a display frame rate to the first frame rate according to the frequency increase instruction to display the first interface.
[0016] 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. This provides a specific solution for increasing the display frame rate.
[0017] Optionally, after receiving the first user operation and before displaying the first interface, the method further includes: the camera application sending a first Vsync signal generation request to the electronic device. The electronic device generates multiple first Vsync signals at first time intervals based on the first Vsync signal generation request. The first Vsync signals are used to trigger the drawing and synthesis of the images in the buffer queue.
[0018] Optionally, before generating the plurality of first Vsync signals, the method further includes: the electronic device generating a request based on the first Vsync signal to obtain a current display frame rate from the display screen. Generating the plurality of first Vsync signals at a first time interval includes: the electronic device determining the first time interval based on the current display frame rate, and generating a first Vsync signal at each first time interval.
[0019] 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.
[0020] 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, where the first image information corresponds to the first interface. On the first view, drawing and synthesizing based on 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 based on the image to be displayed.
[0021] 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.
[0022] 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 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 the existing display driver in the kernel layer, the effect of the preset scene frequency increase in the display control method provided by the present application can be achieved.
[0023] Optionally, the electronic device is configured with a display synthesis module SurfaceFlinger. The method also 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 as the first frame rate from the DDIC. The SurfaceFlinger generates a first Vsync signal at a 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 and synthesis, and sends the image to be displayed obtained by the drawing and synthesis to the display screen for display.
[0024] The present application also provides the following examples, so that when exiting a preset scene, the display frame rate is restored to the value before the frequency increase. For example, the exiting preset scene may correspond to exiting a video shooting scene, or exiting a preview scene.
[0025] Optionally, after receiving the second operation of the user, the method further includes: the electronic device determining that the configured views do not include the first view.
[0026] Optionally, before the electronic device switches to displaying the second interface, the method further includes: the electronic device sending 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.
[0027] Optionally, after receiving the second user operation and before displaying the second interface, the method further includes: the camera application sending a second Vsync signal generation request to the electronic device. The electronic device generates multiple second Vsync signals at second time intervals based on the second Vsync signal generation request. The second Vsync signals are used to trigger the drawing and synthesis of the images in the buffer queue.
[0028] Optionally, before generating the plurality of second Vsync signals, the method further includes: the electronic device generating a request based on the second Vsync signal to obtain a current display frame rate from the display screen. Generating the plurality of second Vsync signals at the second time interval includes: the electronic device determining the second time interval based on the current display frame rate, and generating a second Vsync signal at each second time interval.
[0029] 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.
[0030] 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 based on the second image to obtain the 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 images 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.
[0031] Optionally, the first view includes a surface view SurfaceView.
[0032] In a second aspect, a display control method is provided. The method is applied to an electronic device, wherein the electronic device is equipped with a display screen. The electronic device also has a camera application installed therein. The method comprises: 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 the 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, wherein 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.
[0033] Optionally, the method further includes: receiving a second user operation. In response to the second operation, the display screen displays a second interface, which is different from the preview interface or the video capture interface. Before displaying the second interface, generating and sending a frame reduction instruction to the display screen, the frame reduction instruction is used to instruct the display screen to reduce the display frame rate. When displaying the second interface, the display screen displays the frame rate at the second frame rate.
[0034] 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 based on the image information obtained by the camera module. After receiving the first operation, the method also includes: the camera application controls the camera module to obtain the image information. The electronic device generates the image to be displayed based on the image information and stores the image to be displayed in the buffer queue. This example provides a specific image display mechanism. That is, the production and consumption of images are performed through the buffer queue configured in the memory to achieve the presentation of the final image 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 overwritten due to the production rate being greater than the consumption rate.
[0035] 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.
[0036] 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 the image to be displayed of the composite preview interface or the 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 according to the frequency increase indication.
[0037] In a third aspect, the present application further provides an electronic device, comprising: a memory, one or more processors, and one or more display screens. The memory, the display screen, and the processor are coupled. 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. Alternatively, 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 increase 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.
[0038] In a fourth aspect, the present application further 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 the memory of the electronic device and send the signal to the processor, where 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.
[0039] In a fifth aspect, the present application also provides a computer-readable storage medium comprising 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.
[0040] In a sixth aspect, the present application further provides a computer program product that, when executed on a computer, causes the computer to execute the technical solution provided in the first aspect and any possible implementation thereof. Alternatively, causes the computer to execute the technical solution provided in the second aspect and any possible implementation thereof.
[0041] It can be understood that the solutions provided in the second to sixth aspects 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
[0042] FIG1 is a schematic diagram of an interface interaction related to a camera application provided by an electronic device;
[0043] FIG2 is a schematic diagram showing a preview stream;
[0044] FIG3 is a logic diagram of a preview stream from acquisition to display;
[0045] Figure 4 is a schematic diagram of image production and consumption logic;
[0046] FIG5 is a schematic diagram of the production and consumption logic of an N-th frame image;
[0047] FIG6 is a schematic diagram showing a time sequence comparison of the production and consumption of a continuous multi-frame image;
[0048] FIG7 is a schematic diagram showing a display comparison in a frame loss situation;
[0049] FIG8 is a timing comparison diagram of a display control method provided by an embodiment of the present application after it takes effect;
[0050] FIG9 is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application;
[0051] FIG10 is a schematic diagram of software composition of an electronic device provided in an embodiment of the present application;
[0052] FIG11 is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application;
[0053] FIG12 is a schematic diagram of the interaction between modules of a display control method provided in an embodiment of the present application;
[0054] FIG13 is a schematic diagram of the interaction between modules of a display control method provided in an embodiment of the present application;
[0055] FIG14 is a schematic diagram of the interaction between modules of a display control method provided in an embodiment of the present application;
[0056] FIG15 is a schematic diagram of an inter-module interaction flow of a display control method provided in an embodiment of the present application;
[0057] FIG16 is a schematic diagram showing the composition of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, 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.
[0059] Most current electronic devices can provide image capture functions. These functions may include image preview, image capture, video capture, etc. For example, a camera application may be installed in an electronic device. After running the camera application, the electronic device can provide the user with the image capture function through the camera application.
[0060] For example, taking the electronic device as a mobile phone, referring to Figure 1 , a main interface 101 of the electronic device may include a camera application icon 102. The user may input a click operation 103 on the icon 102 to instruct the electronic device to run the camera application.
[0061] In response to the click operation 103 , the electronic device may run a camera application. In addition, the electronic device may also switch to display an interface 104 of the camera application.
[0062] 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.
[0063] For example, as shown in FIG1 , interface 104 may include a preview interface for the “Image Capture” function. A preview image of the current capture scene may be displayed to the user in interface 104. Over time, if a person or other object in the current capture scene moves, the electronic device may update the preview image accordingly.
[0064] The user can also instruct the electronic device to switch to display other image capture functions.
[0065] 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.
[0066] Correspondingly, the electronic device can switch to display the preview image corresponding to the video shooting function on the interface 104 .
[0067] For another example, the interface 104 may also include a button 107 for viewing images. When the user wishes to view previously captured images or videos, they may input an operation 108 into the button 107. Accordingly, the electronic device may switch to displaying 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.
[0068] It is understood that in the above implementation, when the electronic device provides functions such as image capture and video capture under the user's instruction, it can display a corresponding preview interface. In this preview interface, the electronic device can dynamically show the user the position and shape changes of each subject in the shooting scene. In the video shooting scene, after starting shooting, the electronic device can obtain and store the position and shape changes of each subject during the shooting process, and can also display the video stream in real time on the display screen.
[0069] Take the preview interface of an electronic device displaying image shooting and video shooting scenes as an example.
[0070] Referring to Figure 2, at time 1, the electronic device may display on the preview interface that the person object is located at position 1. Thereafter, the person begins to move. At time 2, the electronic device refreshes the preview interface to display the person object at position 2. Similarly, at time 3, the electronic device may display the person object at position 3.
[0071] It is understandable that the continuous preview image stream may be composed of multiple continuous frame images. The electronic device may refresh the display content according to a certain period to provide a dynamic effect of each object in the shooting scene as shown in FIG2 .
[0072] FIG3 shows the logical process from generation to display of any frame image.
[0073] In the example shown in FIG3 , the electronic device may be configured with a camera module for acquiring image information of a current shooting scene, and a display screen for displaying the image.
[0074] 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.
[0075] Taking the acquisition and display of the Nth frame image as an example, the Nth frame image may correspond to the preview image at time 1, time 2, or time 3 as shown in FIG2 , or any other time.
[0076] 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 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, thereby obtaining 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.
[0077] 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.
[0078] It should be understood that in existing image display mechanisms, the buffer queue-based production-consumption logic scheme is often used.
[0079] As an example, referring to Figure 4 , the camera service can request a free buffer from the buffer queue using the dequeueBuffer() function. Next, the camera service can use the euqueueBuffer() function to fill the buffer with the RGB image information for the Nth frame and return it to the queue. This completes the process of producing the RGB image information for the Nth frame.
[0080] During the consumption process, the display synthesis module can act as a consumer of the buffer content. For example, the display synthesis module can obtain a buffer area from the buffer queue using the acquireBuffer() function. This buffer area can store the RGB image information of the Nth frame. Thus, the display synthesis module can use the acquired buffer content, such as synthesis, to display the corresponding Nth frame image on the display screen. Furthermore, after sending the buffer to the display, the display synthesis module can release the buffer using the releaseBuffer() function.
[0081] It should be noted that in the solution description shown in FIG3 , the camera service as a producer can complete the production of the RGB image information of the Nth frame image and put it into the buffer queue for subsequent consumption by the display synthesis module.
[0082] In some implementations, the RGB image information of the Nth frame can be placed in the buffer queue. In this way, when the display synthesis module needs to send the Nth frame for consumption, it can directly obtain the RGB image information of the Nth frame from the buffer queue, perform synthesis and other processing based on the RGB image information of the Nth frame, and obtain the display information of the Nth frame for display.
[0083] 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 location on 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 location of the memory based on the file descriptor. In this way, synthesis and other processing are performed based on the RGB image information of the Nth frame image, and the display information of the Nth frame image is obtained for display.
[0084] As a specific implementation, FIG5 illustrates an example of placing a file descriptor into a buffer queue to support the production-consumption logic shown in FIG4 . Continuing with the example of the Nth frame image, the RAW image information of the Nth frame image can be referred to as raw image information N, the RGB image information of the Nth frame image can be referred to as image information N, the storage space configured in the memory for storing image information N is Buffer N, the file descriptor corresponding to image information N is file descriptor N, and the image to be displayed corresponding to the Nth frame image is displayed as image N.
[0085] As shown in Figure 5, 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 buffer N. The camera service can also put the file descriptor N of Buffer N into the buffer queue 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. Based on 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, realizing the switching display of the new preview image.
[0086] The following example uses the implementation of file descriptor enqueue consumption as shown in Figure 5 as an example.
[0087] In this way, in combination with the scene examples in Figures 1 and 2, after entering the preview or starting video shooting, the electronic device can implement switching display of each frame image according to the solutions provided in Figures 3 to 5.
[0088] 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.
[0089] Therefore, after the first frame is queued (i.e., the camera service obtains the RGB image information for the first frame and places the corresponding file descriptor in the buffer queue), the display synthesis module can consume the first frame before the second frame is completed and queued. After the first frame is consumed and before the second frame is produced, the number of valid buffers in the buffer queue is 0. This cycle ensures the normal display of consecutive frames, such as the first and second frames.
[0090] 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.
[0091] The Vsync signal can be generated by an application (such as a camera application) of an electronic device requesting a composite display module. After receiving the Vsync signal request sent by the reverse camera application, the composite display module can negotiate with the display (such as the display driver IC (DDIC) in the display) and generate a Vsync signal corresponding to the display frame rate of the display. The generation frequency of the Vsync signal is the same as the display frame rate of the display.
[0092] For example, each time a Vsync signal is generated, the composite display module can trigger the acquisition of the already generated frame image from the buffer queue for consumption and display. Because 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 preview stream or each frame image in the video stream.
[0093] Furthermore, in this application, the frequency at which the camera service produces frame images can be determined by the sampling frequency of the camera module. Each time the camera module acquires raw image information for a frame, the corresponding camera service can place the RGB image information (or the corresponding file descriptor) of that frame into a buffer queue, thereby queuing the frame image.
[0094] The higher the sampling frequency of the camera module, the faster the frame image is produced.
[0095] If the camera module's sampling frequency is the same as or close to the display frame rate (e.g., 60Hz, 90Hz, 120Hz, etc.), one frame can be consumed and displayed between the production intervals of two adjacent frames, thus ensuring that the number of valid buffers in the buffer queue does not exceed one.
[0096] In the following description, it is assumed that the sampling frequency of the camera module is the same as the display frame rate of the display screen.
[0097] 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.
[0098] In this way, the consumption and display of the first frame of image can be completed after the first frame of image is produced and before the second frame of image is produced. Similarly, the consumption and display of the second frame of image can be completed after the second frame of image is produced and before the third frame of image is produced.
[0099] It can be seen that during the production and consumption process of the first to third frames, 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.
[0100] In some cases, there may be a situation where no frame image is consumed within the production time period of two adjacent frame images.
[0101] In the example shown in Figure 6, after the fifth frame is produced and queued, it is not consumed, and the sixth frame is produced. The queueing of the sixth frame overwrites the fifth frame. As a result, the sixth frame will be directly displayed the next time it is consumed. This results in the loss of the fifth frame. This manifests on the display as a dropped frame in the preview or video stream.
[0102] For example, in combination with the scene examples of Figures 1 and 2, Figure 7 shows the display situation under the frame loss situation. For example, in Figure 2, the 4th frame image is displayed at time 1, the 5th frame image should be displayed at time 2, and the 6th frame image is displayed at time 3.
[0103] In Figure 6, the fourth frame can be displayed normally. Therefore, in Figure 7, the fourth frame can be displayed normally at time 1. At time 2, when the bonus consumption is executed, the buffer queue stores the sixth frame, which overwrites the fifth frame. Therefore, at time 2, the display will jump to the sixth frame. In other words, the display will skip the fifth frame and jump directly from the fourth frame to the sixth 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 viewing experience.
[0104] It is understood that a variety of different situations may lead to the above problems.
[0105] For example, take the sampling frequency of the camera module and the display frame rate of the display screen as 30 Hz.
[0106] In actual products, the camera module can achieve relatively accurate frame image acquisition at a frequency of around 30 Hz (e.g., 30.01 Hz). Correspondingly, the camera service can produce frame images at a frequency of 30.01 Hz.
[0107] However, due to limitations in the DDIC process used in displays, when the display frame rate is configured at 30Hz, the actual display frame rate will fluctuate. For example, in actual testing, the actual display frame rate fluctuates between 29.8Hz and 30.2Hz, with a fluctuation of approximately + / -5%.
[0108] Therefore, if the actual display frame rate is lower than 30.01Hz (the time difference between adjacent frames corresponds to duration T1 as shown in Figure 6), the consumption frequency will be lower than the production frequency. This frequency difference gradually accumulates as frames are processed, until one frame is consumed later than the next. This can cause a frame dropout, as shown in Figure 6, where the fifth frame is produced and queued but then overwritten by the sixth frame before it can be consumed.
[0109] In order to solve the above technical problems, an embodiment of the present application provides a display control method. The execution logic of the scheme can refer to Figure 8. Through this scheme, 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. As a result, 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 image is higher than the production queue time difference between two adjacent frames of 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 frame loss as shown in Figure 6 or Figure 7.
[0110] It is understandable 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 the 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 example of frame rate B before the display frame rate is improved and frame rate A after the display frame rate is improved. The corresponding time difference T2 can correspond to frame rate A. Specifically, time difference T2 can be equivalent to 1 / frame rate A. Similarly, time difference T1 can correspond to frame rate B. Specifically, time difference T1 can be equivalent to 1 / frame rate B.
[0111] 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 (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an 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.
[0112] 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, antenna 1, 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, 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.
[0113] The processor may include one or more processing units, for example, an application processor (AP), a modem processor (Modem), a graphics processing unit (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). Different processing units may be independent devices or integrated into one or more processors.
[0114] The processor can generate operation control signals based on instruction opcodes and timing signals to complete the control of instruction fetching and execution.
[0115] The processor may also include a memory for storing instructions and data. In some embodiments, the memory in the processor may be a cache memory. This memory can store instructions or data that have been used by the processor or that are frequently used. When the processor needs to use the instruction or data, it can directly access it from the memory. This avoids duplicate accesses, reduces processor latency, and thus improves system efficiency.
[0116] In some embodiments, the processor may include one or more interfaces. The interface may include an integrated circuit (IC) interface, an integrated circuit built-in audio (IC 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. The processor can be connected to modules such as a touch sensor, an audio module, a wireless communication module, a display, and a camera module through at least one of the above interfaces.
[0117] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only for illustrative purposes 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 from the above embodiments, or a combination of multiple interface connection methods.
[0118] Electronic devices can realize camera functions through camera modules, ISP, video codec, GPU, display, application processor AP, neural network processor NPU, etc.
[0119] The camera module can be used to capture color image data and depth data of the subject. The ISP can be used to process the color image data captured by the camera module. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then transmitted to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin color. The ISP can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be installed in the camera module.
[0120] In some embodiments, the camera module may consist of a color camera module and a 3D sensing module.
[0121] In some embodiments, the photosensitive element of the camera of the color camera module can be a charge coupled device (CCD) or complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the ISP for conversion 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 format such as RGB or YUV.
[0122] In some embodiments, the 3D sensing module can be a time of flight (TOF) 3D sensing module or a structured light 3D sensing module. Structured light 3D sensing is an active depth sensing technology, and its basic components may include an infrared emitter, an IR camera module, and so on. The operating principle of a structured light 3D sensing module is to first emit a specific pattern of light spots at the object being photographed, then receive the light spot pattern coding on the object's surface, compare the similarities and differences with the original projected light spot, and calculate the object's three-dimensional coordinates using triangulation principles. These three-dimensional coordinates include the distance between the electronic device and the object being photographed. TOF 3D sensing can be an active depth sensing technology, and its basic components may include an infrared emitter, an IR camera module, and so on. The operating principle of a TOF 3D sensing module is to calculate the distance (i.e., depth) between the TOF 3D sensing module and the object being photographed based on the time it takes for the infrared light to return, thereby generating a 3D depth map.
[0123] Electronic devices can implement display functions through a combination of GPUs, displays, and application processors. A GPU is a microprocessor for image processing that connects the display and application processor. The GPU performs mathematical and geometric calculations for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.
[0124] A display screen is used to display images, videos, and the like. 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, an electronic device may include one or more display screens.
[0125] It should be noted that the structures illustrated in the embodiments of this application do not constitute specific limitations on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components, or combine or separate certain components, or have different component arrangements. The above components may be implemented in hardware, software, or a combination of software and hardware.
[0126] As yet another example, FIG9 provides a schematic diagram of the composition of yet another electronic device.
[0127] As shown in FIG9 , 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.
[0128] The processor can respond to various instructions issued by the user to the electronic device by running a computer program. Alternatively, the processor can receive instructions issued by an application running on the electronic device and manage various hardware / software modules in the electronic device to implement corresponding functions.
[0129] For example, in conjunction with FIG. 3 and FIG. 5 , the camera service and the display synthesis module can both implement their respective functions by processing and running corresponding codes.
[0130] 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.
[0131] The electronic device may also be configured 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 that is equivalent to the display frame rate of the display screen. The Vsync signal may be used to implement a clock synchronization function so that the various processing operations performed in the electronic device can be performed in the correct timing.
[0132] As shown in Figure 9, the camera module, processor, and display screen in the electronic device can be coupled to a memory. This memory can correspond to the external memory interface and internal memory in the aforementioned examples. Alternatively, the memory can also include on-chip storage space configured on a component with processing functions such as a processor or DDIC.
[0133] Based on the solution provided by the embodiment of the present application, when running in the electronic device shown in Figure 9, 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 instruction 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 period negotiated and determined by 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.
[0134] It is understood that the implementation of the solution shown in Figure 9 does not constitute a limitation on the solution provided in the embodiments of the present application. In some cases, the technical solution provided in the embodiments of the present application can be applied to the electronic device shown in Figure 9.
[0135] In other embodiments, the embodiments of the present application also provide a software structure diagram of an electronic device.
[0136] 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. In some embodiments, 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.
[0137] The application layer can include a series of application packages.
[0138] As shown in FIG10 , the application package may include applications such as camera, calendar, map, WLAN, music, SMS, call, navigation, Bluetooth, video, etc.
[0139] The application framework layer, referred to as the framework layer, provides an application programming interface (API) and programming framework for applications in the application layer. The framework layer includes some predefined functions.
[0140] As shown in FIG10 , 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.
[0141] 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.
[0142] Content providers are used to store and retrieve data and make it accessible to applications. This data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0143] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0144] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0145] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0146] The Activity Manager can provide Activity Management Service (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.
[0147] The Input Manager provides Input Management Service (IMS), which manages system inputs, such as touch screen input, key input, and sensor input. The IMS retrieves events from input device nodes and, through interaction with the WMS, distributes the events to the appropriate window.
[0148] The Android runtime consists of the core libraries and the Android runtime. The Android runtime is responsible for converting source code into machine code. It primarily utilizes ahead-of-time (AOT) and just-in-time (JIT) compilation technologies.
[0149] 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.
[0150] Native C / C++ libraries can include multiple functional modules, such as surface manager, media framework, libc, OpenGL ES, SQLite, Webkit, etc.
[0151] The surface manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media framework supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library supports a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. OpenGL ES provides 2D and 3D graphics drawing and manipulation within applications. SQLite provides a lightweight relational database for electronic device applications.
[0152] The hardware abstraction layer (HAL), also known as the abstraction layer, runs in user space, encapsulates kernel drivers, and provides a calling interface to upper layers. For example, the abstraction layer can include a display module, an audio module, a camera module, a Bluetooth module, and so on.
[0153] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and Bluetooth driver.
[0154] 9, one or more hardware components providing specific functions may also be configured under the kernel layer as shown in FIG10. For example, a camera module, a display screen, etc. as shown in FIG9 may be configured under the kernel layer.
[0155] Similar to the description in Figure 9, the software composition shown in Figure 10 is only an example and does 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.
[0156] As an example, refer to FIG11 , which is a schematic diagram of the composition of another electronic device provided in an embodiment of the present application.
[0157] As shown in Figure 11, a camera application may be installed in the application layer. The camera application may be used to provide the image capture functions involved in any of the examples in Figures 1 to 8. The image capture functions may include image preview, image capture, video capture, etc.
[0158] The framework layer can configure a camera service (CameraService). The camera component supports camera business development. Developers can access and operate camera hardware and develop new features through open interfaces. Common operations include previewing, taking photos, and recording videos. As a key component of the camera component, the CameraService provides an IPC interface to the app layer and completes CameraDevice device creation and session management.
[0159] The framework layer also includes a display compositing module (SurfaceFlinger). As previously explained, SurfaceFlinger manages the image delivery and consumption process. SurfaceFlinger also interacts with the display's DDIC to generate Vsync signals, which are used to manage the triggering of specific operations.
[0160] 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 (SurfaceView) can be created to store the corresponding frame image that needs to be displayed at any time. It can be understood that SurfaceView is used as a A SurfaceView is a special view. Its biggest difference from other views (such as TextView and Button) is that it is not on the same view layer as its corresponding view container. The UI display corresponding to a SurfaceView can also be completed in a different thread. This way, drawing to the SurfaceView does not affect the execution of the main thread. Therefore, SurfaceView is generally used to display dynamic or complex images and animations.
[0161] 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 instruction information (such as instruction 132) when the display is currently in a preset scene (such as a preview scene, a camera scene, etc.). This is to facilitate improving 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 instruction information. This is to facilitate the display screen to reduce the display frame rate to a normal level.
[0162] In the example shown in FIG11 , the abstraction layer may include a camera abstraction (CameraProvider), a hardware compositing renderer (hwcomposer, HWC), and a display interrupt module (DisSync).
[0163] The CameraProvider can be used in conjunction with the camera service to discover, query, and open various camera devices. The image information generated by the camera module and the control information sent to the camera module can be transmitted and uploaded through the CameraProvider.
[0164] The hardware composite renderer is used to determine the buffer to be synthesized using the available hardware. For example, in some embodiments, the HWC can be used alone or in conjunction with SurfaceFlinger to implement the synthesis processing of the image to be displayed, thereby obtaining relevant data of the image to be displayed. In another embodiment, the HWC can also be used to obtain information related to the display frame rate sent from the display and transmit the information through the transparent transmission process.
[0165] The display interrupt module (DisSync) can be used to obtain / determine the display frame rate of the display and send the display frame rate to SurfaceFlinger for processing so that SurfaceFlinger can generate the corresponding Vsync signal.
[0166] In an embodiment of the present application, SurfaceFlinger, as the generator 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.
[0167] For example, 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.
[0168] 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 the second type of Vsync signal from SurfaceFlinger when an image interface display (such as preview stream, video stream display) 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.
[0169] Continuing with Figure 11, the kernel layer under the abstract layer may include multiple driver modules such as a display driver. In this example, the display driver may be configured with an enabling driver module (referred to as enabling driver for short). The enabling driver may be used to send a frequency increase instruction to the display screen. The frequency increase instruction may carry frequency increase reference information, 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 instruction, 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, if 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 instruction upon receiving an instruction 132 from the display engine.
[0170] 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.
[0171] In the example shown in Figure 11, various hardware components configured in the electronic device are also shown. These hardware components can constitute a logical hardware layer. This hardware composition can correspond to the example shown in Figure 9. For example, a buffer queue for storing generated image information (or corresponding file identifiers) can be set in the memory of the hardware layer.
[0172] The solutions provided in the embodiments of the present application can all be applied to an electronic device having the composition shown in FIG11 .
[0173] The following describes in detail the solution provided in the embodiment of the present application in conjunction with the composition shown in FIG11 .
[0174] For example, refer to Figure 12, which is a schematic diagram of the inter-module interaction of a display control method provided in an embodiment of the present application. By implementing the solution shown in Figure 12, it is possible to queue images to be displayed in preset scenarios (such as preview scenarios, video scenarios, etc.). The queueing of the Nth frame of image is used as an example.
[0175] As shown in Figure 12, the solution may include:
[0176] S1201. The camera application sends an instruction 1201 to the camera service.
[0177] Instruction 1201 may be used to instruct the electronic device to capture a new image (such as the Nth frame image).
[0178] As an example, it is assumed that the Nth frame image is the first frame image captured after the camera application is started.
[0179] After the camera application starts running, it can request a Vsync signal from SurfaceFlinger. In response, SurfaceFlinger can generate a second type of Vsync signal and send it to the camera application. Then, when the second type of Vsync signal arrives, the camera application can issue the instruction 1201. The specific generation mechanism of the second type of Vsync signal will be described in detail later.
[0180] S1202. The camera service sends an indication 1202 to the camera abstraction.
[0181] S1203. The camera service sends instructions to the camera module S1203.
[0182] Among them, instruction 1202 can be obtained according to instruction 1201. Similarly, instruction 1203 can be obtained according to instruction 1202. Thus, instruction 1203 can be used to instruct the camera module to start (or continue) collecting new images.
[0183] S1204. The camera module obtains the original image information of the Nth frame image and sends it to the camera abstraction.
[0184] 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.
[0185] It is understood that in some implementations, after the lens aperture is opened, the lens will continuously irradiate the light signal onto the camera sensor. Correspondingly, the camera sensor can generate an electrical signal corresponding to the current N-th frame image (i.e., the RAW image information of the N-th frame image, i.e., the original image information N) based on the light signal. Therefore, after obtaining the instruction 1203, the camera sensor can send the original image information N to the camera abstraction.
[0186] S1205. The camera abstraction obtains processed image information N based on the original image information N and sends it to the camera service.
[0187] The processed image information N may correspond to the image information N shown in FIG5 , that is, to the RBG image data of the Nth frame image.
[0188] In this example, the camera abstraction directly sends the processed image information N to the camera service. Combined with the aforementioned description of file descriptors, in other implementations, the camera abstraction can store the processed image information N in a buffer N in memory and send the file descriptor N corresponding to the buffer N to the camera service.
[0189] In this way, the camera service can obtain the processed image information N of the Nth frame image.
[0190] 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 data transmission may also be implemented by relying on a file descriptor that stores the corresponding information.
[0191] It is understandable 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.
[0192] 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.
[0193] S1206. The camera application sends an instruction to create a SurfaceView.
[0194] 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).
[0195] As a specific implementation, referring to Figure 1 , when the user turns on the camera, i.e., 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.
[0196] 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.
[0197] The following takes entering the preview scene as an example.
[0198] Correspondingly, a SurfaceView can be established in the view system for the camera preview (CameraPreview). It is understandable that only in the preview scene or video scene will the electronic device establish the corresponding SurfaceView for the current scene. In other words, by establishing the SurfaceView, it indicates that the electronic device has entered the preview scene or video scene.
[0199] S1207. The camera service draws the processed image information N onto the SurfaceView.
[0200] For example, 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.
[0201] S1208. The camera service stores the file identifier N in the buffer queue.
[0202] 5 , the camera service may further store the file identifier N corresponding to the Nth frame image in the buffer queue after obtaining the processed image information N in S1205 , thereby enqueuing the Nth frame image.
[0203] It is understood that, in the example of Figure 12 , 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 in 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, it can directly draw the new image in the existing SurfaceView, overwriting the previous image.
[0204] 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.
[0205] The Vsync signal may include a first type of Vsync signal and a second type of Vsync signal according to its function.
[0206] The first type of Vsync signal can be used to trigger SurfaceFlinger's consumer display.
[0207] The second type of Vsync signal can be used to trigger the camera application to send related instructions, such as the instruction 1201 shown in FIG12 .
[0208] Taking the first type of Vsync signal as an example, SurfaceFlinger can generate it repeatedly at a certain time interval.
[0209] The time interval between two adjacent first-type Vsync signals can 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. In other words, the generation frequency of the first-type Vsync signal is equal to the display frame rate of the current display screen from the DDIC.
[0210] 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.
[0211] In the problematic scenario shown in Figure 6, due to factors such as DDIC process tolerances, the display's frame rate (i.e., refresh rate) is slightly lower than the camera module's frequency of acquiring new images. This results in the frequency of the first-type Vsync signal being generated being lower than the frequency of image queueing, leading to frame dropout.
[0212] 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. Thus, even if the display frame rate is reduced to a limit due to the DDIC process (such as a drop in the display frame rate 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.
[0213] As a specific example, Figure 13 provides a schematic diagram of the inter-module interaction of another display control method. By implementing the solution shown in Figure 13, the electronic device can accurately identify preset scenes (such as preview scenes, video scenes, etc.) and trigger the frequency increase process.
[0214] As shown in Figure 13, the solution may include:
[0215] S1301. The camera application determines that a SurfaceView exists.
[0216] In combination with the above description, SurfaceView can be established when the camera application enters the preview scene or video scene.
[0217] In this example, the camera application can determine whether it enters the preview scene or the video scene through the presence of the SurfaceView.
[0218] In other embodiments, the camera application may determine the existence of a SurfaceView when executing S1206 as shown in FIG. 12 , and further determine to enter a preview scene or a video scene.
[0219] S1302. The camera application sends an instruction 131 to the display engine. Instruction 131 is used to indicate that a preset scene is currently being entered. Preset scenes include preview scenes, video scenes, and other scenes that require continuous multi-frame image display based on images captured by the camera module.
[0220] S1303. The display engine generates and sends an instruction 132 to the enabling driver.
[0221] Illustratively, the first indication information may be used to instruct the enabling driver to configure the frequency increasing process to start.
[0222] In different implementations, the content of the first indication information may be different. According to a pre-agreed / configured correspondence, the enabling driver may determine that the frequency increase process needs to be configured to be enabled according to the first indication information.
[0223] For example, the first indication information may include “1” or “true.” Correspondingly, after receiving “1” or “true,” the enabling driver determines that the frequency boosting process needs to be configured to be enabled.
[0224] 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.
[0225] For example, the frequency increase indication may include frequency increase reference information, which may be used by the DDIC to perform frequency increase processing accordingly.
[0226] In this application, the enabling driver may be pre-configured with a frequency boost ratio, which may be a number greater than 1. For example, the frequency boost ratio may include one or more values such as 1, 1.2, 1.5, 1.8, or 2. The enabling driver may include the frequency boost ratio in the frequency boost reference information sent to the DDIC.
[0227] In some implementations, the enabling driver may send the multiple frequency boosting ratios to the DDIC after receiving the instruction 132 , so that the DDIC can flexibly select an appropriate frequency boosting level.
[0228] In other implementations, the frequency boost ratio may also be determined by a camera application or a display engine.
[0229] For example, indications 131 and 132 may carry a frequency boost ratio determined by a camera application. In this way, the enabling driver may, after receiving indication 132, carry the frequency boost ratio carried therein in the frequency boost indication and send it to the DDIC. 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 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 boost 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. In this way, a better viewing experience of the preview stream / video stream is obtained.
[0230] For another example, after receiving the instruction 131 based on S1302 , the display engine may select a frequency boosting frequency to be carried in the instruction 132 as needed.
[0231] S1305. The display driver chip sends the display frame rate A to the hardware compositing renderer (HWC).
[0232] S1306. The hardware hybrid renderer sends the display frame rate A to the display interrupt module.
[0233] S1307. The display interrupt module sends the display frame rate A to the display synthesis module.
[0234] Through S1305-S1307, SurfaceFlinger can obtain the display frame rate provided by the current DDIC.
[0235] 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.
[0236] In some implementations, the execution of S1305 - S1307 may be performed under the instruction of SurfaceFlinger.
[0237] For example, referring to Figure 13, after the camera application requests a Vsync signal, SurfaceFlinger can directly or indirectly send a message to DDIC to obtain the current display frame rate. Correspondingly, DDIC can feed back the increased frame rate A to SurfaceFlinger through S1305-S1307.
[0238] Therefore, according to the scheme shown in Figure 13, in a preset scenario, DDIC can trigger the frequency increase process to improve the display frame rate of the display. Correspondingly, SurfaceFlinger can generate the first type of Vsync signal based on the increased display frame rate.
[0239] Based on the generated first type of Vsync signal, SurfaceFlinger can execute the consumption and display of the existing frame image.
[0240] For example, referring to Figure 14, the solution can realize the display processing of existing images. For example, referring to Figure 12, take the buffer queue including the file identifier N of the Nth frame image as an example.
[0241] As shown in Figure 14, the solution may include:
[0242] S1401. After the first type of Vsync signal arrives, SurfaceFlinger obtains the file identifier N from the buffer queue.
[0243] S1402. SurfaceFlinger obtains processed image information N based on file identifier N.
[0244] S1403. SurfaceFlinger sends the processed image information N to the hardware compositing renderer (HWC) for synthesis processing to obtain the display image N.
[0245] S1404. The hardware hybrid renderer sends the display image N to the display driver chip.
[0246] S1405. The display driver chip controls the display panel to refresh the display according to the sent display image N.
[0247] It should be noted that in the example shown in Figure 14, the synthesis processing of the Nth frame image by the 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 the HWC to complete the synthesis processing to obtain the corresponding display image N.
[0248] It is understandable that, in the example of Figure 14, a first-type Vsync signal is used to transmit and display the Nth frame image, which may be any frame image in the preview stream / video stream.
[0249] Then, after the next first-class Vsync signal arrives, the electronic device can execute the corresponding subsequent frame image transmission and display consumption.
[0250] For example, 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.
[0251] The next first-class Vsync signal adjacent to the first-class Vsync signal V0 is the first-class Vsync signal V1. The corresponding electronic device can continue to repeatedly execute the solution shown in Figure 14 to transmit and display subsequent images according to the first-class Vsync signal V1.
[0252] For example, before the arrival of the first type of Vsync signal V1, the N+1 frame image has been completed and queued. Then, after the arrival of the first type of Vsync signal V1, the electronic device can realize the transmission and display of the N+1 frame image according to the solution shown in FIG14.
[0253] In other scenarios, due to the frequency-increasing processing of the display frame rate as shown in FIG13 , the duration between the first type Vsync signal V1 and the first type Vsync signal V0 is compressed, thereby enabling the electronic device to display the existing image faster.
[0254] It is understandable that in the implementation of the solution shown in FIG13 , the electronic device can, through the processing of S1302 to S1304 , enable the DDIC to increase the current display frame rate, thereby increasing the consumption display frequency in the corresponding scenario.
[0255] In other scenarios, the camera application can also implement a scheme similar to Figure 13 to rewind the frequency boosting process when it determines to exit a preset scene (such as exiting a preview scene, exiting a video scene, etc.), so that in non-preset scenarios, the display screen can use the frame rate before the frequency boosting process to switch and display images.
[0256] For example, the camera application can determine to exit the preset scene based on the absence of SurfaceView in the current view system. Correspondingly, the camera application can instruct the DDIC to perform a fallback operation through the display engine and the enable driver.
[0257] For example, the camera application can send an instruction 1302 to the display engine to instruct the display engine to turn off the frequency boost. Correspondingly, the display engine can send a second instruction message to the enabling driver. The enabling driver can generate and send frequency reduction reference information based on the received second instruction message. 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 boost. 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) based on the frequency reduction reference information.
[0258] In order to more clearly illustrate the technical solution provided by the embodiment of the present application, the following continues to illustrate the implementation of the solution provided by the embodiment of the present application in combination with the interaction flow diagram between the modules provided in Figure 15.
[0259] As shown in Figure 15, the solution may include:
[0260] S1501. The camera application determines that a SurfaceView exists.
[0261] For example, the camera application may start running after receiving the operation 103 of the user input.
[0262] 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 .
[0263] In other embodiments, as shown in Figure 15, 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.
[0264] In this way, after determining that the preset scene has been entered, the electronic device can execute the following S1502.
[0265] S1502. The camera application sends an instruction 131 to the display engine.
[0266] Exemplarily, the indication 131 may correspond to the indication 131 in S1302 in Figure 13. Through the indication 131, the display engine may know that the frequency increase process needs to be triggered.
[0267] S1503. The display engine sends an instruction 132 to the enabling driver.
[0268] Exemplarily, the indication 132 may correspond to the indication 132 in FIG. 13 .
[0269] S1504. Enable the driver to send a frequency increase instruction to the display driver chip.
[0270] Exemplarily, the execution of S1504 may refer to S1304 in FIG. 13 .
[0271] 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 magnification, and the frequency increase magnification is greater than 1.
[0272] S1505. The display driver chip refreshes the display at a display frame rate A according to the frequency increase instruction.
[0273] As shown in FIG15 , in this example, before receiving the frequency increase instruction, the display driver chip can control the display screen to perform display refresh at a display frame rate B.
[0274] Display frame rate A is greater than display frame rate B.
[0275] In the embodiment of the present application, the operations of S1501 to S1505 can complete the configuration related to the frequency increase process. That is, the frequency increase process includes S1501 to S1505.
[0276] S1506 . The camera application sends a Vsync signal generation request 151 to the display composition module.
[0277] In combination with the description of the production and consumption of buffers in the buffer queue in the aforementioned Figure 4, 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 in the current scene.
[0278] S1507. The display synthesis module obtains the current display frame rate from the display driver chip.
[0279] S1508. The display driver chip sends the display frame rate A to the hardware hybrid renderer.
[0280] S1509. The hardware hybrid renderer sends the display frame rate A to the display interrupt module.
[0281] S1510. The display interrupt module sends the display frame rate A to the display synthesis module.
[0282] In this way, through S1507-S1510, SurfaceFlinger can obtain the current actual display frame rate from the DDIC of the display screen as display frame rate A.
[0283] 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.
[0284] For example, SurfaceFlinger can generate multiple first-class Vsync signals based on the display frame rate A. The first-class Vsync signal can be used to trigger the display of a new image. For example, SurfaceFlinger can sequentially generate the first-class Vsync signal V0, the first-class Vsync signal V1, and so on. 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.
[0285] SurfaceFlinger can also generate multiple second-type Vsync signals based on the display frame rate A. The second-type Vsync signal can be used to trigger the camera application to issue rendering instructions for a new image. For example, SurfaceFlinger can sequentially generate the second-type Vsync signal V0, the second-type Vsync signal V1, and so on. The time interval between the generation of the second-type Vsync signal V1 and the generation of the second-type Vsync signal V0 can also be T2.
[0286] In some implementations, the time interval T2 may be the inverse of the display frame rate A. That is, T2 = 1 / A.
[0287] Thus, according to the arrival of the first type Vsync signal and the second type Vsync signal, the electronic device can trigger corresponding operations. For example, as shown in S1512-S1513:
[0288] S1512. Every time a first-type Vsync signal arrives, the display synthesis module obtains image information from the buffer queue, synthesizes it, and sends it for display; the time interval between two adjacent first-type Vsync signals is T2.
[0289] 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.
[0290] Thus, through S1501-S1513, the electronic device can achieve a higher display frame rate for a preset scenario. Thus, while the camera sensor's image output frequency remains unchanged, by increasing the display frame rate, the interval between adjacent first-class Vsync signals is shortened, thereby increasing the frequency of image display. This avoids problems such as frame dropout caused by delayed display due to issues with the DDIC process.
[0291] In the example of FIG. 15 , the execution logic of the electronic device in the case of exiting the preset scene is also provided.
[0292] For example, as shown in S1514-S1526:
[0293] S1514. The camera application determines that the SurfaceView does not exist.
[0294] In some implementations of the present application, the camera application may determine whether a SurfaceView exists after each scene transition.
[0295] For example, in this example, the camera application may receive the user's operation 108 and enter the gallery browsing scene accordingly.
[0296] In this way, due to the scene conversion, the camera application can execute S1514 to determine that there is no SurfaceView for supporting the dynamic image stream display.
[0297] S1515. The camera application sends an instruction 133 to the display engine.
[0298] S1516. The display engine sends an instruction 134 to the enabling driver.
[0299] 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.
[0300] S1518. The display driver chip refreshes the display at a display frame rate B according to the frequency increase exit instruction.
[0301] Thus, by executing 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. This allows the electronic device to produce and consume new images based on the display frame rate B before the frequency increase.
[0302] S1519. The camera application sends a Vsync signal generation request 152 to the display composition module.
[0303] S1520. The display synthesis module obtains the current display frame rate from the display driver chip.
[0304] S1521. The display driver chip sends the display frame rate B to the hardware hybrid renderer.
[0305] S1522. The hardware hybrid renderer sends the display frame rate B to the display interrupt module.
[0306] S1523. The display interrupt module sends the display frame rate B to the display synthesis module.
[0307] 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.
[0308] S1525. Every time a first-type Vsync signal arrives, the display synthesis module obtains image information from the buffer queue, synthesizes it, and sends it for display; the time interval between two adjacent first-type Vsync signals is T1.
[0309] 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.
[0310] It is understandable that the execution of S1519-S1526 may refer to S1506-S1513 respectively, thereby enabling the electronic device to produce or consume based on the display frame rate B after the frequency reduction process.
[0311] It is understandable that the electronic device provided in the embodiment of the present application includes a hardware structure and / or software module for performing each function in order to realize the above functions. Those skilled in the art should easily appreciate that, in combination 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 a hardware or computer software driven hardware manner 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.
[0312] 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.
[0313] 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 appreciate 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 a hardware or computer software driven hardware manner 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 this application.
[0314] The above-mentioned 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 embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods.
[0315] Figure 16 shows a schematic diagram of the composition of a chip system 1600. 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 one possible design, the chip system also includes a memory for storing program instructions and data necessary for electronic devices. The chip system can be composed of chips, or it can 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.
[0316] 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.
[0317] The functions, actions, operations, steps, etc. 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, they 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 processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center 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)).
[0318] Although the present application has been described with reference to specific features and embodiments thereof, it is apparent 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 illustrative of the present application as defined by the appended claims and are deemed to cover 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, the present application is intended to include such modifications and variations as fall within the scope of the claims of the present application and their equivalents.
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, performing drawing synthesis 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.