Brightness control method and related device

By identifying and adjusting HDR and SDR layers in the display interface of electronic devices, the problem of limited HDR display and poor brightness adjustment in the existing technology is solved, and the user experience and display effect are improved.

CN117130511BActive Publication Date: 2024-09-20HONOR DEVICE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202310215932.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2024-09-20
Estimated Expiration
2043-02-24

AI Technical Summary

Technical Problem

When existing electronic devices display HDR images or videos, they are limited by the brightness of the screen and cannot fully express the details of light and dark parts, resulting in poor user experience. Moreover, when the brightness is adjusted, the display effects of HDR layers and SDR layers are difficult to satisfy at the same time. .

Method used

By identifying the HDR layer and SDR layer in the display interface, different brightness control strategies are used to adjust the brightness of the layer level to ensure that the brightness of the HDR layer is increased and the SDR layer is not dazzling, and the overall display effect is better.

Benefits of technology

It achieves better HDR layer brightness performance and SDR layer comfort on electronic devices, improving the user's visual experience and display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117130511B
    Figure CN117130511B
Patent Text Reader

Abstract

The present application provides a brightness control method and related equipment, which relates to the field of terminal technology. The method includes: displaying a third interface on a display screen; receiving a second operation; identifying a scene type in response to the second operation, wherein the scene type includes at least screenshot, rotation, and split screen; when the scene type is a screenshot scene, the SF service module generates a target screenshot based on the third interface; wherein the brightness of the area corresponding to the SDR layer in the target screenshot is the same as the brightness corresponding to the SDR layer in the third interface. The present application makes the brightness of the area corresponding to the SDR layer in the screenshot the same as the brightness corresponding to the SDR layer in the displayed third interface, thereby avoiding flickering of the area corresponding to the SDR layer during the screenshot process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a brightness control method and related equipment. Background Art

[0002] At present, with the development of terminal technology, there are more and more electronic devices with image display functions, such as mobile phones or tablets. However, when electronic devices are displayed, for example, the maximum screen brightness of the display is about 500nit, and in most cases it will be set to only support the display content in the brightness range of about 0 to 200nit. However, the production end of pictures, videos, etc. can already support the production of HDR pictures and HDR videos of 0 to 1000nit. When HDR pictures and videos of 0 to 1000nit are displayed using existing 0 to 200nit displays, due to the brightness set by the display, HDR pictures and videos that should express wider details of bright and dark parts will not be well displayed; users can only see pictures and videos with a maximum brightness of 200nit when watching, which is a very bad experience.

[0003] In addition, the display interface of the electronic device is usually composed of multiple layers, that is, multiple layers are superimposed to form the display interface of the electronic device. In this way, when the screen brightness of the display interface is adjusted, some layers may display better after the corresponding brightness adjustment, while some layers may display poorly after the corresponding brightness adjustment.

[0004] In this regard, how to adjust the brightness to simultaneously meet the display effects of HDR layers and SDR layers has become a problem that needs to be solved urgently. Summary of the invention

[0005] The present application provides a brightness control method and related equipment, which adjust the HDR layer and the SDR layer respectively to ensure that the overall display effect meets the visual requirements.

[0006] In a first aspect, a brightness control method is provided, which is applied to an electronic device including a display screen and an SF service module, and the method includes:

[0007] The display screen displays a third interface;

[0008] receiving a second operation;

[0009] In response to the second operation, identifying a scene type, the scene type at least including screenshot, rotation, and split screen;

[0010] When the scene type is a screenshot scene, the SF service module generates a target screenshot based on the third interface;

[0011] Among them, the brightness of the area corresponding to the SDR layer in the target screenshot is the same as the brightness corresponding to the SDR layer in the third interface.

[0012] In the native brightness control method for the screenshot scene of the Android system, the SDR layer will be dimmed, so the area corresponding to the SDR layer in the screenshot will be much darker than the SDR layer originally displayed at the same screen brightness. In view of this, the control method for the screenshot scene provided by this application will remove the dimming process for the SDR layer, so that the area corresponding to the SDR layer in the screenshot obtained has the same brightness as the SDR layer originally displayed at the same screen brightness, avoiding too dark display.

[0013] In combination with the first aspect, in some implementations of the first aspect, the electronic device further includes a WMS, and in response to the second operation, identifying the scene type includes:

[0014] In response to the second operation, the target application is configured with a first identifier for indicating different scenario types, and the target application corresponds to the third interface;

[0015] Based on the first identifier, the WMS identifies the scene type.

[0016] In the implementation, the target application configures different first identifiers for different scene types, so that the subsequent WMS can determine the scene type according to the first identifier, and then the SF service module can select different brightness control methods for different scene types.

[0017] In combination with the first aspect, in some implementations of the first aspect, when the scene type is screenshot, the SF service module generates a target screenshot based on the third interface, including:

[0018] In response to the second operation, a virtual screen is created, on which a fourth interface is displayed, the fourth interface being the same as the third interface;

[0019] According to the preset screen brightness of the display screen, tone mapping is performed on the HDR layer included in the fourth interface, and darkening is not performed on the included SDR layer;

[0020] Based on the processed HDR layer and the SDR layer without darkening processing, the target screenshot is obtained.

[0021] The dimming process refers to determining the dimming rate corresponding to the layer and processing the layer according to the determined dimming rate.

[0022] Optionally, the SF service module can obtain a first screenshot based on the processed HDR layer and the SDR layer without darkening processing, and then, based on the first screenshot, other layers can be synthesized to obtain a target screenshot.

[0023] In the implementation, for scenes where the scene type is screenshot, in order to avoid the process of obtaining the screenshot interfering with the normal display process on the display screen, in the present application, in response to the second operation, a virtual screen can be created separately, and the fourth interface displayed on the virtual screen is the same as the third interface displayed on the display screen. In this way, the present application can process the fourth interface on the virtual screen to obtain a screenshot that meets the display effect. For example, the HDR layer included in the fourth interface on the virtual screen can be tone mapped based on the preset screen brightness, and the SDR layer is not darkened. Therefore, after the GPU synthesizes the processed HDR layer and the SDR layer that is not darkened, the area corresponding to the SDR layer in the first screenshot obtained or the target screenshot obtained by further combining other layers can maintain the original brightness effect to avoid being darkened.

[0024] In combination with the first aspect, in some implementations of the first aspect, the method further includes:

[0025] The target application configures different second identifiers for the original image and the fused image, and the fused image is obtained after the original image is processed by an algorithm;

[0026] In response to the second operation, the SF service module identifies a second identifier;

[0027] The SF service module identifies the screen type, where the screen type includes a display screen and a virtual screen;

[0028] For the virtual screen, retain the original image, and generate the target screenshot based on the fused image and the original image superimposed on the fused image;

[0029] For the display screen, the original image is filtered out, and the fused image is displayed.

[0030] In the implementation method, the target application can configure different second identifiers for the original image that has not been processed by the algorithm and the fused image that has been processed by the algorithm to indicate the difference between the images. In response to the screenshot operation, the SF service module can determine the original image and the fused image by identifying the second identifier. Then, for the process of generating the screenshot, the original image is retained so that the original image is superimposed on the fused image, so that the obtained screenshot finally includes the original image; and for the process of sending and displaying, the original image is filtered out, and only the fused image is sent for synthesis and display with other layers. In this way, when displaying, the embodiment of the present application can use the fused image with better effect after algorithm processing; when generating a screenshot, the screenshot can be generated based on the original image, so that after the screenshot is sent to other electronic devices, it can also adapt to the brightness of other electronic devices for display, avoiding the situation that the opposite device does not have the brightness control method of the present application, so that when the screenshot is displayed, it will become very dark and cannot be displayed normally.

[0031] In combination with the first aspect, in some implementations of the first aspect, the electronic device further includes a brightness module, and the method further includes:

[0032] In response to a first operation on a first application, the display screen displays a first interface;

[0033] When the first application recognizes that the first interface includes an HDR layer, sending a first instruction to the brightness module;

[0034] After receiving the first instruction, the brightness module determines a target strategy and transmits it to the SF service module, where the target strategy includes brightness control parameters corresponding to the HDR layer and the SDR layer respectively;

[0035] The SF service module adjusts the brightness of the display layer based on the layer property of the display layer and the target strategy;

[0036] After adjustment, the data are sent to the display screen for display;

[0037] Among them, the layer properties of the display layer include HDR layer and / or SDR layer, and the brightness of the display layer whose property is HDR layer after brightness adjustment is greater than the brightness of the SDR layer whose property is SDR layer after brightness adjustment.

[0038] In the implementation method, for the first interface that includes both HDR layers and SDR layers, by identifying the nature of the layers, that is, by identifying whether the layer nature is an HDR layer or an SDR layer, different target strategies are determined for layers of different natures and the layer-level brightness is adjusted, thereby not only improving the brightness of the HDR layer, but also suppressing the brightness of the SDR layer, ensuring that the display effect of the HDR layer is improved and the display effect of the SDR layer is not dazzling, thereby making the overall display effect of the display interface better and more in line with visual needs.

[0039] In combination with the first aspect, in some implementations of the first aspect, the electronic device further includes a hardware synthesizer HWC, and the method further includes:

[0040] The SF service module obtains the maximum screen brightness of the display screen through the HWC;

[0041] The SF service module adjusts the brightness of the display layer based on the layer property of the display layer and the target strategy, including:

[0042] The SF service module performs tone mapping processing on the display layer whose layer property is an HDR layer based on the target strategy and the maximum screen brightness.

[0043] In the implementation method, by combining the maximum screen brightness, the maximum capacity of the display can be brought into play to improve the display effect of the HDR layer, so that the bright parts are brighter and the dark parts are darker when the HDR layer is displayed.

[0044] In a second aspect, an electronic device is provided, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions so that the electronic device executes any one of the brightness control methods in the first aspect.

[0045] It should be understood that the expansion, limitation, explanation and description of the relevant contents in the above-mentioned first aspect also apply to the same contents in the second aspect.

[0046] According to a third aspect, a brightness control device is provided, comprising a unit for executing any one of the brightness control methods according to the first aspect.

[0047] In one possible implementation, when the brightness control device is an electronic device, the processing unit may be a processor, and the input unit may be a communication interface; the electronic device may also include a memory, which is used to store computer program code, and when the processor executes the computer program code stored in the memory, the electronic device executes any one of the methods in the first aspect.

[0048] In a fourth aspect, a chip system is provided, comprising: a processor, configured to call and run a computer program from a memory, so that a device equipped with the chip system executes any one of the brightness control methods in the first aspect or the second aspect.

[0049] In a fifth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program code. When the computer program code is executed by an electronic device, the electronic device executes any one of the brightness control methods in the first aspect or any one of the brightness control methods in the second aspect.

[0050] In a sixth aspect, a computer program product is provided, the computer program product comprising: a computer program code, when the computer program code is executed by an electronic device, the electronic device executes any one of the brightness control methods in the first aspect or any one of the brightness control methods in the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 is a schematic diagram of a scenario to which the embodiments of the present application are applicable;

[0052] Figure 2 is a hardware system diagram of an electronic device provided in an embodiment of the present application;

[0053] Figure 3 is a software system diagram of an electronic device provided in an embodiment of the present application;

[0054] Figure 4 is a schematic diagram of a display process provided by an embodiment of the present application;

[0055] Figure 5 is a flow chart of a brightness control method provided in an embodiment of the present application;

[0056] Figure 6 yes Figure 5 Schematic diagram of processing logic in the corresponding software system;

[0057] Figure 7 is a schematic diagram of a screenshot scenario provided in an embodiment of the present application;

[0058] Figure 8 This is a brightness control method in the first screenshot scenario provided by an embodiment of the present application;

[0059] Fig. 9 It is a schematic diagram of the data structure provided in the embodiment of the present application;

[0060] Fig.10 is a schematic diagram of obtaining the maximum screen brightness provided in an embodiment of the present application;

[0061] Fig.11 This is the second screenshot scenario provided in the embodiment of the present application;

[0062] Fig.12 yes Fig.11 A schematic diagram of the effect of sending the obtained screenshot to another electronic device for display;

[0063] Fig.13 This is a brightness control method in the second screenshot scenario provided by an embodiment of the present application;

[0064] Fig.14 is another software system structure diagram provided in an embodiment of the present application;

[0065] Fig.15 It is a structural schematic diagram of an electronic device provided by this application. DETAILED DESCRIPTION

[0066] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0067] 1. Brightness, the luminous intensity per unit projection area, quantified in nit or cd / m 2 .

[0068] 2. Layers (surfaces), such as films containing text or graphics, need to be stacked together in a certain order to form the final effect of the page. Layers can accurately position elements on the page.

[0069] 3. Surfaceflinger (SF): A system service process that controls synthesis, where the layers involved in the display, visible areas, etc. are calculated.

[0070] 4. System applications (applications, APPs) and third-party APPs. APPs in electronic devices can generally be divided into system APPs and third-party APPs. System APPs may be APPs provided or developed by manufacturers of electronic devices. Manufacturers of electronic devices may include manufacturers, suppliers, providers or operators of electronic devices. For example, system APPs in electronic devices may include calls, messages, contacts, cameras, recordings, and so on. Third-party APPs refer to APPs provided or developed by software application developers other than the manufacturers of electronic devices. For example, Youku, Douyin, etc. Third-party APPs can provide users with corresponding functions by calling one or more system functions in electronic devices. For example, Youku and Douyin can provide users with the function of watching film and television works, etc.

[0071] 5. Application interface (UI): UI refers to the media interface for interaction and information exchange between applications or operating systems and users, which can realize the conversion between the internal form of information and the form that users can receive. The application interface is the source code written in specific computer languages ​​such as Java and extensible markup language (XML). The interface source code is parsed and rendered on the electronic device and finally presented as content that users can recognize. The common form of application interface is the graphical application interface (GUI), which refers to the application interface related to computer operations displayed in a graphical way. It can be visual interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of electronic devices.

[0072] 6. Foreground running, background running and closed, the APP corresponds to three running states: foreground running, background running and closed. Among them, when the APP runs in the foreground of an electronic device, the electronic device can display the application interface of the APP on the display screen, and the user can interact with the APP through the controls in the application interface of the APP. The APP runs in the electronic device, but it does not belong to the above-mentioned situation of running in the foreground, that is, the APP runs in the background of the electronic device. The situation where the APP runs in the background of the electronic device may include the existence of the APP process in the electronic device, but the application interface of the APP is not displayed on the display screen. Since the application interface of the APP running in the background is not displayed on the display screen, the user usually cannot directly interact with the APP running in the background. Closed means that the APP is not running on the electronic device.

[0073] It should be understood that there may be one or more APPs running in the foreground of the electronic device, and there may also be one or more APPs running in the background of the electronic device. Among them, when there are one or more APPs running in the foreground of the electronic device, there may also be one or more APPs running in the background of the electronic device.

[0074] 7. Process: A process is an application's running activity on a certain data set. It is the basic unit for resource allocation and scheduling in an operating system (such as the Android system). Each process occupies a piece of memory space. An application runs on the operating system in the form of one or more processes to achieve corresponding functions.

[0075] The above is a brief introduction to the terms involved in the embodiments of the present application, which will not be repeated below.

[0076] At present, with the development of terminal technology, there are more and more electronic devices with image display functions, such as mobile phones or tablets. However, when electronic devices are displayed, for example, the maximum screen brightness of the display is about 500nit, and in most cases it will be set to only support the display content with a brightness range of about 0 to 200nit. However, in order to approach the brightness that the human eye can perceive, the production end of pictures, videos, etc. can already support the production of 0-1000nit HDR pictures and HDR videos. When 0-1000nit HDR pictures and videos are displayed using existing 0-200nit displays, due to the brightness set by the display, HDR pictures and videos that should express wider bright and dark details will not be well displayed; users can only see pictures and videos with a maximum brightness of 200nit when watching, which is a very bad experience.

[0077] In addition, the display interface of the electronic device is usually composed of multiple layers, that is, multiple layers are superimposed to form the display interface of the electronic device. In this way, when the screen brightness of the display interface is adjusted, some layers may display better after the corresponding brightness adjustment, while some layers may display poorly after the corresponding brightness adjustment.

[0078] The display interface displayed by the electronic device is composed of multiple layers. For example, in the scenario of non-full-screen display of HDR pictures or videos, the display interface synthesized in the electronic device may include an HDR layer and an SDR layer. The HDR layer is used to indicate the layer of display content that displays the HDR picture or video. The SDR layer usually includes other layers in the display interface, such as the status bar layer, the navigation bar layer, etc. Compared with the SDR layer, the HDR layer can use more types of colors and a wider range of color representation, which can support richer image color expression and more vivid image detail expression, especially the dark and bright parts of the picture can present more details.

[0079] It should be understood that the above description of the layer synthesis display interface takes non-full screen display as an example. When in full screen display, the layers of the display interface can also be synthesized by multiple layers, and can also include HDR layers and SDR layers. In this regard, the embodiments of the present application do not impose any restrictions on this. Usually, full screen means that the area occupied by the displayed video or picture on the screen is the entire physical display area, and non-full screen means that the area occupied by the displayed video or picture on the screen is only a part of the entire physical display area. Non-full screen and full screen are relative.

[0080] For example, Figure 1 A schematic diagram showing a composite display interface of an HDR layer and an SDR layer is shown. Figure 1 , the electronic device displays a non-full-screen video playback interface in the gallery APP, which can be Figure 1 The status bar layer, gallery UI interface, HDR video corresponding layer, volume adjustment layer and other layers are superimposed, and the display effect after synthesis is as follows Figure 1 As shown in (b) in Figure 1 In the schematic diagram shown in (a), except for the layer corresponding to the HDR video which is an HDR layer, all other layers are SDR layers.

[0081] Assume that when the current electronic device displays images or videos in non-full screen mode, due to hardware limitations, the screen brightness of all layers is preset to 150 nit. If the user wants to increase the screen brightness to the maximum screen brightness of 500 nit in order to improve the display effect of HDR video, when the electronic device supports a maximum of 500 nit, Figure 1 As shown in the figure, after the SDR layer and HDR layer are superimposed, the maximum screen brightness will be increased to 500nit. In this way, although the display effect of HDR video is improved, the area where the HDR video is not displayed, or the area where the SDR layer is displayed, becomes very dazzling. The display effect corresponding to the SDR layer will bring negative effects such as visual discomfort and fatigue to users.

[0082] Therefore, in the case where the display interface includes both HDR layers and SDR layers, how to adjust the brightness to simultaneously meet the display effects of both HDR layers and SDR layers has become an urgent problem that needs to be solved.

[0083] In view of this, an embodiment of the present application provides a brightness control method. For a display interface that includes both HDR layers and SDR layers, the properties of the layers are identified, that is, by identifying whether the layer properties are HDR layers or SDR layers, different target strategies are determined for layers of different properties and layer-level brightness is adjusted, thereby not only improving the brightness of the HDR layer, but also suppressing the brightness of the SDR layer, ensuring that the display effect of the HDR layer is improved and the display effect of the SDR layer is not dazzling, thereby making the overall display effect of the display interface better and more in line with visual needs.

[0084] In addition to mobile phones, the electronic devices provided in the embodiments of the present application can also be tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, netbooks, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, smart cars, robots, smart glasses, smart televisions, and other devices with displays that can realize display functions.

[0085] Figure 2 A hardware system of an electronic device suitable for the present application is shown.

[0086] like Figure 2 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0087] It should be noted that Figure 2 The structure shown does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include Figure 1 More or fewer components than those shown, or the electronic device 100 may include Figure 2 Combinations of some of the components shown, or the electronic device 100 may include Figure 2 Subassemblies of some of the components shown. Figure 2 The components shown may be implemented in hardware, software, or a combination of software and hardware.

[0088] The processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and a neural-network processing unit (NPU). Among them, different processing units may be independent devices or integrated devices. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.

[0089] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0090] In some embodiments, the processor 110 may include one or more interfaces. For example, the processor 110 may include at least one of the following interfaces: an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and a USB interface.

[0091] Exemplarily, the processor 110 provided in an embodiment of the present application can execute the following method: the display screen displays a third interface; receives a second operation; in response to the second operation, identifies a scene type, the scene type including at least screenshot, rotation and split screen; when the scene type is a screenshot scene, the SF service module generates a target screenshot based on the third interface; wherein the brightness of the area corresponding to the SDR layer in the target screenshot is the same as the brightness corresponding to the SDR layer in the third interface.

[0092] Figure 2 The connection relationship between the modules shown is only a schematic illustration and does not constitute a limitation on the connection relationship between the modules of the electronic device 100. Optionally, the modules of the electronic device 100 may also adopt a combination of multiple connection modes in the above embodiments.

[0093] The wireless communication function of the electronic device 100 can be implemented through components such as the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.

[0094] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0095] The electronic device 100 can realize the display function through the GPU, the display screen 194 and the application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0096] Display screen 194 may be used to display images or videos.

[0097] Optionally, the display screen 194 can be used to display images or videos. The display screen 194 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 mini light-emitting diode (Mini LED), a micro light-emitting diode (Micro LED), a micro OLED (Micro OLED) or a quantum dot light emitting diode (QLED). In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0098] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.

[0099] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted to the camera photosensitive element through the camera. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can perform algorithm optimization on the noise, brightness and color of the image. The ISP can also optimize the exposure and color temperature of the shooting scene and other parameters. In some embodiments, the ISP can be set in the camera 193.

[0100] The camera 193 (also referred to as a lens) is used to capture static images or videos. It can be triggered to start by application instructions to realize the photo function, such as taking pictures of any scene. The camera may include components such as an imaging lens, a filter, and an image sensor. The light emitted or reflected by the object enters the imaging lens, passes through the filter, and finally converges on the image sensor. The imaging lens is mainly used to focus the light emitted or reflected by all objects in the camera angle (also referred to as the scene to be photographed, the target scene, or the scene image that the user expects to shoot) to form an image; the filter is mainly used to filter out excess light waves in the light (for example, light waves other than visible light, such as infrared); the image sensor can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The image sensor is mainly used to perform photoelectric conversion on the received light signal, convert it into an electrical signal, and then transmit the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, etc. format.

[0101] Exemplarily, the digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0102] Exemplarily, a video codec is used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0103] Exemplarily, the gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x-axis, the y-axis, and the z-axis) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used in scenes such as navigation and somatosensory games.

[0104] For example, the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally the x-axis, y-axis, and z-axis). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor 180E can also be used to identify the posture of the electronic device 100 as an input parameter for applications such as horizontal and vertical screen switching and pedometers.

[0105] Exemplarily, the distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, for example, in a shooting scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0106] Exemplarily, the ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0107] For example, the fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement functions such as unlocking, accessing application locks, taking photos, and answering calls.

[0108] Exemplarily, the touch sensor 180K is also referred to as a touch control device. The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also referred to as a touch control screen. The touch sensor 180K is used to detect a touch operation acting on or near it. The touch sensor 180K may pass the detected touch operation to the application processor to determine the type of touch event. A visual output related to the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, and may be disposed at a different position from the display screen 194.

[0109] The hardware system of the electronic device 100 is described in detail above. An operating system is run on the above hardware. The operating system of the operating system layer can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system or Windows operating system, etc. Applications can be installed and run on the operating system.

[0110] Figure 3 It is a software system diagram of an electronic device provided in an embodiment of the present application.

[0111] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer (applications), application framework layer (application framework), Android runtime (AndroidRuntime) and system library, and kernel layer (kernel).

[0112] The application layer may include a series of application packages. For example, the application layer may include desktop APP, system user interface (systemUI), game APP, gallery APP, camera APP, browser APP and other applications (applications may be referred to as applications for short), and the present application embodiment does not impose any restrictions on this.

[0113] Applications in the application layer can be divided into system applications and non-system applications. System applications can specifically include a desktop launcher (launcher), a system user interface (systemUI), a gallery APP, a camera APP, and a browser APP, etc. Non-system applications can include a game APP, etc.

[0114] These apps are generally written in Java, and each app includes one or more class files. Each app can run its own class file in the application as a process. When a user operates in the app, the app can interact with the system library or kernel layer by calling the relevant API or service in the application framework to achieve the corresponding kinetic energy.

[0115] The application layer includes a launcher that is used to start the application activity.

[0116] Exemplarily, in response to a user clicking an icon corresponding to a camera application, the launcher sends a request to start the application activity to an activity manager service (AMS).

[0117] The gallery APP is used to provide users with picture display and video playback functions.

[0118] Exemplarily, in response to the user clicking on the video play operation, the gallery APP calls the codec to decode the video, and sends a request to start the video playback activity to the activity manager.

[0119] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 3 As shown, the application framework layer may include an activity manager, a window manager service (WMS), a view system service (VSS), etc., and the embodiments of the present application do not impose any restrictions on this.

[0120] The activity manager is used to manage the life cycle of each application and the navigation fallback function. It is responsible for creating the Android main thread and maintaining the life cycle of each application.

[0121] The window manager is used to manage window programs. The window manager can obtain the display screen size and the size and shape of the volume bar, and determine whether the size and shape of the volume bar needs to be adjusted.

[0122] In the embodiment of the present application, the window manager can, for example, take screenshots, split the screen, etc. The screenshot indicates capturing the content displayed on the screen and correspondingly generating a frame of image; the split screen indicates dividing the display screen into multiple display areas and displaying different content at the same time.

[0123] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, in an embodiment of the present application, the view system can be used to display a non-full-screen video playback interface.

[0124] In an embodiment of the present application, the application framework layer may further include a brightness module, which is used to adjust the brightness strategy, for example, selecting different brightness strategies for the HDR layer and SDR layer included in the display interface.

[0125] Exemplarily, the embodiment of the present application will identify different layer properties, determine whether the layer corresponds to an HDR layer or an SDR layer, and then suppress the brightness of the SDR layer and only increase the brightness of the HDR layer.

[0126] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.

[0127] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0128] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0129] The system library can include multiple functional modules, such as SF service module (surface flinger service), media libraries, 3D graphics processing library (such as openGL ES), 2D graphics engine (such as SGL), etc. The SF service module is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

[0130] For example, Figure 3 As shown, the SF service module may include SF, Libtonemap, Libsharder, etc. SF is used to control the system service process of synthesis, and in the embodiment of the present application, participates in calculating the displayed layer, visible area, etc. Libtonemap is a module for controlling the HDR tonemap algorithm. Libsharder is responsible for generating sksl language during GPU synthesis, and calling GPU for corresponding processing according to the generated sharder.

[0131] Exemplarily, the system library may also include a CPU distributed processing unit (data processing unit, DPU), Skia, and Sksl. Skia indicates a 2D rendering engine, providing a general API applicable to various hardware and software platforms. Sksl indicates that the Skia 2D rendering engine uses a shader language, which is converted into opengl by Skia, and then compiled and linked to generate a program that is a language that can be directly recognized by the GPU; in the embodiment of the present application, Sksl can be directly regarded as a program language that can be directly recognized by the GPU.

[0132] The kernel layer is the layer between hardware and software. The kernel layer includes at least the hardware synthesizer (hwcomposer, HWC) driver, graphics processing unit (graphics processing unit, GPU) driver, display driver, graphics buffer manager (gralloc) driver, camera driver, audio driver, sensor driver, etc.

[0133] GPU is a general-purpose image processing device used for synthesis. HWC is a special-purpose image processing device, which is used to synthesize layers that cannot be synthesized by GPU in the embodiment of the present application, or to synthesize layers synthesized based on GPU with other layers. HWC can also perform post-processing. For example, post-processing may include: video stabilization, color enhancement (CE), 3D lookup table, i.e., style transformation (3D look up table, 3DLUT), super-resolution reconstruction, etc. Gralloc can be understood as a graphics memory allocator, which is used to allocate and manage memory requested by image producers.

[0134] It should be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to electronic devices based on operating systems such as iOS or Windows.

[0135] The following takes the electronic device as a mobile phone as an example, and the operating system as the above-mentioned Android system as an example, and briefly describes the display process of the electronic device.

[0136] Figure 4 A schematic diagram of a display process is shown. Figure 4 As shown, for Figure 1 In the non-full-screen video playback interface shown, the display process corresponding to all SDR layers is generally divided into four stages: drawing, rendering, synthesis, and hardware refresh display; the display process corresponding to the played HDR video (i.e., HDR layer) is generally divided into four stages: video file parsing, video decoding, synthesis, and hardware refresh display. Hardware refresh display is used to instruct the display screen to refresh the display.

[0137] By comparing the two, we can see that the display processes corresponding to SDR layers and HDR layers need to go through the synthesis stage, and the synthesis stage is usually Figure 3 The SF service module in the Android system shown in the figure is used for implementation. Therefore, in order to adjust and optimize both HDR layers and SDR layers, the brightness control method provided in the embodiment of the present application can be applied in the synthesis stage, that is, applied to the SF service module. When the brightness control method provided in the embodiment of the present application is applied in the SF service module, the purpose of layer-level brightness control of SDR layers and HDR layers can be achieved.

[0138] Combination Figures 1 to 4 , Figure 5 A brightness control method provided by an embodiment of the present application is shown. Figure 6 yes Figure 5 The corresponding processing logic diagram in the software system. Figure 5As shown, the brightness control method 10 is applied to the electronic device described above. The brightness control method 10 may include the following steps S11 to S15. Steps S11 to S15 are respectively introduced below.

[0139] S11. In response to a first operation on a first application, a display screen displays a first interface.

[0140] It should be understood that the first application can indicate system applications such as gallery and video, and can also indicate non-system applications such as WeChat, Youku, and Douyin. The first operation can include a click operation, a double-click operation, a slide operation, and can also be other operations such as voice operation, and this application does not make any limitation on this.

[0141] It should be understood that the first interface may include a video playback interface and / or a picture display interface. The picture may be an HDR picture or an SDR picture, and the video may be an HDR video or an SDR video. The first interface may be displayed in full screen or in non-full screen on the display screen of the electronic device, and the display screen is a physical screen.

[0142] For example, in response to a user clicking on a video icon in the gallery APP for indicating a video, the electronic device may display the following: Figure 1 The first interface shown in (b) in FIG. 1 includes a non-full-screen video playback interface. Here, the non-full-screen video playback interface is composed of three SDR interfaces and one HDR interface superimposed and synthesized.

[0143] S12: When the first application recognizes that the first interface includes an HDR layer, a first instruction is sent to the brightness module.

[0144] The first instruction is used to instruct selection of a corresponding brightness strategy based on properties of a layer included in the first interface, wherein, when the first application recognizes that the first interface includes an HDR layer, the first instruction may carry a first identifier indicating that the first interface includes an HDR layer.

[0145] It should be understood that the identification method used by the first application to identify whether the first interface includes an HDR layer and the brightness strategy can be pre-set, and the specific content can be set and adjusted as needed. The embodiments of the present application do not impose any limitations on this.

[0146] S13: After receiving the first instruction, the brightness module determines the target strategy and transmits it to the SF service module.

[0147] Optionally, after receiving the first instruction, the brightness module determines the target policy, and then transmits the target policy to the SF service module through the setDisplayBrightness interface of the Window Manager Service (WMS). Further, the brightness module can transmit the target policy to the SF in the SF service module.

[0148] It should be understood that the target policy may include multiple brightness control parameters. For example, the target policy may include a brightness control parameter for the HDR layer in the first interface and a brightness control parameter for the SDR layer in the first interface, or may include a brightness control parameter for each layer in the first interface, wherein the target policy may include a brightness control parameter for each HDR layer in the first interface and a brightness control parameter for the SDR layer.

[0149] That is to say, the target strategy can be divided based on the layer properties of the HDR layer and the SDR layer, and different brightness control parameters can be set for different layer properties, so that the brightness of the displayed HDR layer and the SDR layer is different during subsequent adjustments. Alternatively, the target strategy can also set different brightness control parameters for each layer, so that if the first interface includes multiple HDR layers and multiple SDR layers, the multiple HDR layers can be adjusted to different brightness based on the different brightness control parameters that are set, and the multiple SDR layers can also be adjusted to different brightness based on the different brightness control parameters that are set.

[0150] The brightness control parameters of the HDR layer and the brightness control parameters of the SDR layer include the SDR white point brightness and the current screen brightness, and the unit is nit.

[0151] For example, assuming that the preset brightness strategy includes a first strategy and a second strategy, when the first interface includes an HDR layer, the first strategy needs to be used for adjustment. The first application can send a first instruction to the brightness module, and the first instruction can carry an identifier for indicating that the first interface includes an HDR layer. In this way, after receiving the first instruction, the brightness module can determine that the first interface includes an HDR layer based on the first instruction, and then determine that the target strategy corresponding to the HDR layer is the first strategy.

[0152] When the first interface does not include an HDR layer or includes an SDR layer, the second strategy needs to be used for adjustment. The first application can send a second instruction to the brightness module. The second instruction can carry an identifier for indicating that the first interface does not include an HDR layer, or the second instruction can not carry an identifier for indicating that the first interface includes an HDR layer. In this way, after the first application sends the second instruction to the brightness module, the brightness module can determine that the first interface does not include an HDR layer based on the second instruction, and then determine that the target strategy corresponding to not including the HDR layer is the second strategy.

[0153] S14. The SF service module adjusts the brightness of the display layer based on the properties of the display layer and the target strategy. After the brightness adjustment, the brightness of the display layer whose properties are HDR layers is greater than the brightness of the display layer whose properties are SDR layers.

[0154] It should be understood that the display layer may indicate the layer that needs to be synthesized in the synthesis stage for the next display interface that the electronic device is about to display after the first interface. The multiple display layers used for synthesis may include HDR layers and SDR layers, and the number of HDR layers and SDR layers may include one or more, and the embodiments of the present application do not impose any limitation on this.

[0155] For example, Figure 6 As shown, when the nature of the display layer is an SDR layer, SF can send the brightness control parameters corresponding to the received SDR layer to skiaGlenderEngine, and then use skiaGlenderEngine to determine the dimming ratio of the SDR layer based on the brightness control parameters; then, the SDR layer is processed in Libsharder based on the determined dimming ratio, and the processed SDR layer is then transmitted to the GPU or HWC for synthesis. It should be understood that skiaGlenderEngine is responsible for GPU synthesis.

[0156] When the nature of the display layer is an HDR layer, SF can send the brightness control parameters and preset screen brightness corresponding to the received HDR layer to Libsharder. Then, Libsharder can process the HDR layer based on the brightness control parameters, preset screen brightness, and tone mapping parameters provided by Libtonemap. The processed HDR layer is then transmitted to the GPU or HWC for synthesis.

[0157] Alternatively, if Figure 6As shown, the SF in the SF service module can also obtain the maximum brightness of the display screen (or maximum screen brightness) through HWC, and then the SF service module performs tone mapping on the HDR layer based on the received brightness control parameters, the received maximum screen brightness, and the tone mapping parameters provided by Libtonemap, that is, adjusts the brightness of the HDR layer.

[0158] Tone mapping is a computer graphics technology that approximates the display of high dynamic range images on a limited dynamic range medium. The tone mapping algorithm will optimize the HDR display layer according to the color space of the HDR display layer and the color space of the display output, as well as the maximum screen brightness of the display, to ensure that the content of the HDR layer can better adapt to different displays, thereby obtaining better display effects.

[0159] After using Libsharder to process the display layers of SDR layers and HDR layers, the processed layers can be sent to the GPU for synthesis. Then, when the layer synthesis results corresponding to the GPU do not need to be processed further, they can be sent to the display screen for display after being transmitted via the HWC; or, the layer synthesis results corresponding to the GPU can also be transmitted to the Frame buffer included in the SF service module for temporary storage. Subsequently, the HWC can call the temporarily stored layer synthesis results from the Frame buffer for further synthesis with other layers, and then send the final synthesis results to the display screen for display.

[0160] Alternatively, if Figure 6 As shown, before tone mapping is performed on the display layer of the HDR layer, AGP services can also read the parameters corresponding to the previous frame when HWC calls 3D LUT to generate the display result, and send it to Libsharder through Libtonemap, so that the parameters can be combined and processed when tone mapping is performed on the display layer in the next frame.

[0161] It should be understood that by adjusting the parameters corresponding to the display interface generated by HWC calling 3D LUT during tone mapping, the adjusted display layer can be kept consistent with the GPU and DPU processing effects, avoiding display effect jumps.

[0162] It should be understood that when adjusting the display layer that is an SDR layer or an HDR layer in nature, in combination with the brightness control parameters, the maximum screen brightness and the parameters provided by the 3D LUT, the brightness control parameters can also be dynamically changed based on the specific display content of the display layer to adapt to the display requirements of the display content.

[0163] After adjustment, the brightness of the HDR layer is greater than the brightness of the SDR layer. In this way, when it is displayed subsequently, it can not only meet the display effect of the HDR layer, improve the presentation of details and the contrast between light and dark, but also meet the display requirements of the SDR layer without being too abrupt, thus avoiding visual discomfort and fatigue for users when watching.

[0164] S15. The SF service module sends the adjusted display layer to the display screen for display.

[0165] Optionally, the SF service module may send the adjusted display layer to the GPU for synthesis and then transmit it to the display screen for display, or send the adjusted display layer to the GPU and HWC for synthesis and then transmit it to the display screen for display.

[0166] It should be understood that the adjusted display layer can be called the second interface when displayed on the display screen.

[0167] In the brightness control method provided in the embodiment of the present application, by identifying that the first displayed interface includes an HDR layer, the brightness module is triggered to select a target strategy and transmit the target strategy to the SF service module; then, the SF service module can calculate the dimming rate corresponding to the SDR layer based on the target strategy (brightness control parameters corresponding to the SDR layer), and then adjust the display layer of the SDR layer in combination with the dimming rate; the SF service module can also adjust the display layer of the SDR layer in combination with the target strategy (brightness control parameters corresponding to the HDR layer), the preset screen brightness or the maximum screen brightness obtained, the parameters sent by Libtonemap, etc. After adjustment, the brightness of the display layer of the HDR layer is greater than the brightness of the display layer of the SDR layer.

[0168] In this way, after the adjusted HDR layer and SDR layer are synthesized and displayed on the display screen, the brightness of the HDR layer can be improved to ensure the display effect of the HDR layer, and the brightness of the HDR layer can be made higher than that of the SDR layer, so that the display of the SDR layer will not be too abrupt and affect the user's visual experience when watching.

[0169] On the basis of the above, since electronic devices may involve various display scenarios such as screenshots, split screens, rotation, screen recording, and screen projection during the display process, in order to improve the display effect in each scenario, this application provides corresponding brightness control methods for each scenario, so as to adaptively adjust and optimize the display effect corresponding to each scene, solve some problems such as flickering, and uneven effects after pictures and videos are projected or sent to the opposite device, and ensure that the display in each scenario can meet the visual requirements.

[0170] Combine the following Figures 7 to 10 , a detailed introduction is given to the screenshot scenario and the brightness control method in the screenshot scenario.

[0171] For example, Figure 7 A schematic diagram of a screenshot scenario is shown. Figure 7 As shown in (a) of FIG. 1 , in response to the user's screen capture operation, the electronic device may generate a Figure 7 The screenshot shown in (b) in the figure is stored. The screenshot operation may be an operation of double-clicking the display screen with a finger joint.

[0172] In the present application, the screenshot scene can be divided into a common screenshot scene and a special screenshot scene. The common screenshot scene can be referred to as a first screenshot scene, and the special screenshot scene can be referred to as a second screenshot scene.

[0173] The normal screenshot scenario refers to the process of synthesizing the layers on the display interface (including HDR layers and SDR layers) into a screenshot in response to the user's screenshot operation. Among them, the layer corresponding to the video frame or picture on the display interface is the original image that has not been processed by the algorithm, for example, Figure 7 The display interface shown in (a) includes multiple SDR layers and HDR layers, and the video frame or picture corresponding to the HDR layer is the original image that has not been processed by special algorithms such as fusion calculation; in response to the screenshot operation, after being processed by the brightness control method corresponding to the ordinary screenshot scene provided by the present application, the screenshot obtained is Figure 7 The synthesis shown in (b) is a screenshot.

[0174] The special screenshot scenario refers to the process of responding to the user's screenshot operation, identifying the second identifier of the layer configured with the second identifier (which may include the original image that has not been processed by the algorithm, and the fused image that has been processed by the algorithm), and then distinguishing and processing the generated screenshot and the sent display in combination with different images.

[0175] Combination Figure 7 The screenshot scene shown, Figure 8 A brightness control method in a first screenshot scenario is shown, such as Figure 8 As shown, the method 20 is applied to an electronic device including a display screen. The method 20 may include the following steps S21 to S27, and the following will respectively describe the steps S21 to S27 in detail.

[0176] S21. The display screen displays the third interface.

[0177] The third interface is used to indicate a video playback interface or a picture display interface, and the video playback interface or the picture display interface can be displayed in a non-full screen or in a full screen. The picture can be an HDR picture or an SDR picture, and the video can be an HDR video or an SDR video.

[0178] The third interface can be the same as the first interface or different. If the third interface is the same as the first interface, you can refer to Figure 1 The description of the first interface shown in (b) will not be repeated here.

[0179] In addition, the third interface can be a single-task interface or a multi-task interface. The single-task interface can be an interface that displays pictures or videos, such as Figure 1 The non-full-screen video playback interface shown in (b) in the figure. The multi-task interface can be an interface in which multiple layers are superimposed or arranged in partitions. For example, after splitting the screen, the upper half of the screen displays HDR video, and the lower half displays the chat interface in the WeChat APP.

[0180] S22: Receive a second operation from the user.

[0181] Exemplarily, the second operation can be a pressing operation on a physical button, a clicking operation on a virtual button, a double-click operation with a knuckle on the display screen, a sliding operation, a dragging operation on an icon displayed on the display screen, a rotation operation on the physical space of the display screen, or a voice operation, etc. The embodiments of the present application do not impose any limitations on this.

[0182] It should be noted that the second operation here can be called a screenshot operation, and the screenshot operation can include operations for triggering screenshot, triggering rotation, and triggering split screen.

[0183] S23. In response to the second operation, the target application is configured with a first identifier for indicating different scene types; the scene types at least include screenshot, rotation, split screen, etc.

[0184] Here, the target application is used to indicate the application program corresponding to the third interface.

[0185] Fig. 9 A schematic diagram of a data structure is shown. Fig. 9 As shown, the target application can modify the data structure included in the electronic device and add an int type flag in CaptrueArgs to mark different scene types, wherein the flag value can default to 0 to indicate that the scene type defaults to the screenshot scene.

[0186] Exemplarily, if the WMS does not start the rotation animation module, there is no need to modify the flag value, that is, the flag value continues to be configured as 0 to indicate that the scene type is a screenshot scene.

[0187] In response to the second operation, if WMS starts the rotation animation module, the target application can continue to determine whether the screen is rotated. If so, it can determine that the scene type is a rotation scene and configure the flag value corresponding to mScreenShotFlag to 1 to indicate that the current scene is a rotation scene.

[0188] If there is no rotation, it can be determined that the scene type is a split-screen scene, and the flag value corresponding to mScreenShotFlag is set to 2 to indicate that the current scene is a split-screen scene.

[0189] It should be understood that the size of the flag value corresponding to mScreenShotFlag and the corresponding schematic relationship with the scene type can be set and adjusted as needed, and the embodiments of the present application do not impose any limitations on this.

[0190] It should be understood that the present application is based on configuring different first identifiers for different scene types, so that the subsequent SF service module can identify the scene type based on the first identifier and can perform different brightness controls for different scenes.

[0191] S24. The WMS identifies the scene type by identifying the first identifier.

[0192] The WMS can obtain the flag value corresponding to mScreenShotFlag in CaptrueArgs, and then identify the type of scene triggered by the user based on the size of the value (ie, the first identifier).

[0193] For example, when WMS obtains that the flag value corresponding to mScreenShotFlag in CaptrueArgs is 0, it can be determined that the current scene type is a screenshot scene.

[0194] S25. In response to the second operation, the SF service module creates a virtual screen, and the interface on the virtual screen is the fourth interface.

[0195] It should be understood that the virtual screen is a simulated screen, such as a display instance (display), and the interface on the virtual screen is not displayed to the user. The display screen described previously in this application is a physical screen, and the virtual screen corresponds to the display screen, that is, the size and resolution of the virtual screen and the display screen are the same. In the embodiment of the present application, the fourth interface corresponds to the third interface, the only difference is that the third interface is displayed to the user, and the fourth interface is not displayed to the user. Apart from this, the fourth interface and the third interface are the same.

[0196] It should be understood that the interface on the virtual screen created by the SF service module is the same as the interface on the display screen, including multiple SDR layers and / or HDR layers. For example, when the third interface displayed on the display screen is formed by superimposing 3 SDR layers and 1 HDR layer, the interface on the virtual screen created by the SF service module should also be formed by superimposing the same 3 SDR layers and 1 HDR layer. Here, in order not to affect the normal display of the display screen, the SF service module can be used to create a virtual screen, and the subsequent processing can be carried out with the help of the data on the virtual screen that is not displayed to the user.

[0197] It should also be understood that step S24 and step S25 may be performed in a certain order during the actual processing, and step S24 is usually performed first and step S25 is performed later.

[0198] S26. According to S24, when the WMS identifies that the scene type is a screenshot scene, tone mapping is performed on all HDR layers in the fourth interface according to a preset screen brightness, and no darkening is performed on all SDR layers.

[0199] Among them, dimming processing refers to determining the dimming rate corresponding to the SDR layer, and then processing the SDR layer according to the determined dimming rate.

[0200] Optionally, a GPU is used to synthesize all processed HDR layers and SDR layers that are not subjected to shading processing to obtain a first screenshot; then, the synthesized first screenshot is transferred to a cache and returned to SF.

[0201] For example, the Android system has a built-in screenshot command screencap. In response to the trigger operation, the application can send the screenshot command to the SF service module. After executing the command, the SF service module can process the HDR layer included in the fourth interface displayed on the virtual screen in combination with the preset screen brightness, and does not perform dimming and other processing on the SDR layer, that is, does not dim the SDR layer; in this way, the processed HDR layer and the SDR layer without dimming processing can be synthesized into a picture through GPU synthesis and saved in the Frame Buffer. The synthesized picture can be called the first screenshot, and the property corresponding to the first screenshot is the SDR layer.

[0202] The preset screen brightness can be set and adjusted as needed, and the present application embodiment does not impose any restrictions on this. For example, the screen brightness range supported by the display screen is 0 to 1000 nit, and the preset screen brightness is set to 500 nit. The preset screen brightness can be selected based on historical data and combined with experience.

[0203] S27. Obtain a target screenshot based on the processed HDR layer and the SDR layer that is not subjected to darkening processing.

[0204] For example, the SF service module can obtain a first screenshot based on the processed HDR layer and the SDR layer without darkening processing, and then, based on the first screenshot, other layers can be synthesized to obtain a target screenshot.

[0205] The target screenshot can be stored as a picture; or, subsequently, in response to a user clicking on the thumbnail corresponding to the target screenshot, it can be sent to a display screen for display (it should be understood that at this time the target screenshot corresponds to a layer with the nature of an SDR layer, so when displayed, dimming continues according to the brightness control method corresponding to the display); or, it can also be sent to a peer device for display, which refers to another one or more electronic devices connected to the local device that generates the target screenshot.

[0206] In the brightness control method provided in the above-mentioned embodiment of the present application, the target application first identifies the scene type and configures a first identifier for indicating different scene types for different scene types, so that the WMS can determine the current scene type according to the first identifier, and then the SF service module can select different brightness control methods for different scene types for control.

[0207] For scenes where the scene type is screenshot, in order to avoid the process of obtaining screenshots interfering with the normal display process on the display screen, in the present application, in response to the screenshot operation, a virtual screen can be created separately, and the fourth interface displayed on the virtual screen is the same as the third interface displayed on the display screen. In this way, the present application can process the fourth interface on the virtual screen to obtain a screenshot that meets the display effect. For example, the HDR layer included in the fourth interface on the virtual screen can be tone mapped based on the preset screen brightness, and the SDR layer is not darkened. Therefore, after the GPU synthesizes the processed HDR layer and the SDR layer that is not darkened, the area corresponding to the SDR layer in the first screenshot obtained or the target screenshot obtained by further combining other layers can maintain the original brightness effect to avoid being darkened.

[0208] It should be understood that in the native brightness control method of the Android system corresponding to the screenshot scene, the SDR layer will be dimmed, and the area corresponding to the SDR layer in the resulting screenshot will be much darker than the SDR layer originally displayed at the same screen brightness. In view of this, the control method for the screenshot scene provided by this application will remove the dimming process for the SDR layer, so that the area corresponding to the SDR layer in the resulting screenshot has the same brightness as the SDR layer originally displayed at the same screen brightness, avoiding too dark display.

[0209] Optionally, the method provided in the present application may further include the following step S28.

[0210] S28. The SF service module obtains the maximum screen brightness.

[0211] For example, the bottom layer will configure the screen parameters according to the screen capabilities, and will add an additional configuration item for the maximum screen brightness. Then, you can Fig.10 The path shown can be read when SF is started, and the maximum screen brightness can be saved in sOEMMaxLumiance. For example, if the maximum screen brightness supported by the screen is 1000nit, 1000nit can be saved in sOEMMaxLumiance for subsequent call when needed.

[0212] For example, Fig.10 As shown, SF can obtain the maximum screen brightness from HWC, which is configured by the driver; the maximum screen brightness is sent to mDisplayColorProfile; then, the maximum screen brightness can be obtained through getDesiredMaxLuminance of mDisplayColorProfile.

[0213] However, when the identified scene type is a screenshot scene, if the layers included in the fourth interface are adjusted in combination with the maximum screen brightness, the HDR layer in the fourth interface may be significantly brighter than the corresponding areas of other SDR layers at the same screen brightness after tonemap processing. Therefore, in order to avoid the situation in which the maximum screen brightness is used when taking screenshots in the screenshot scene, resulting in the corresponding area of ​​the HDR layer being significantly brighter than the corresponding area of ​​the SDR layer after tonemap processing, in an embodiment of the present application, the preset screen brightness is selected to perform tone mapping processing on the HDR layer. In other words, although the embodiment of the present application can obtain the maximum screen brightness, when it is determined that the current scene type is a screenshot scene, the maximum screen brightness is not used when adjusting the brightness of the layer, but the preset screen brightness is used.

[0214] The above describes the process of adjusting the brightness of the layer in the synthesis stage in the screenshot scenario. Fig.11 Introducing a special screenshot scenario.

[0215] Fig.11 (a) in the figure shows the layer originally used for display, which may include the original image of HDR picture or HDR video. In the related art, the target application performs a series of algorithm processing on the original image, for example, after adjusting the brightness at the pixel level, the bright part of the image is made brighter and the dark part is made darker, and the processing results are as follows: Fig.11 The fused image shown in (b) in FIG. Figure 5The brightness control method shown may be more in line with visual requirements and have a better display effect. Fig.11 As shown in (c) in .

[0216] However, after the fused image is displayed, the following can be obtained in response to the screenshot operation: Fig.11 If the screenshot shown in (d) is sent to the electronic device 200, the screenshot may be very dark and cannot be displayed normally because the electronic device 200 is not equipped with the brightness control method of the present application. Fig.12 shown.

[0217] Therefore, an embodiment of the present application provides a brightness control method in a special screenshot scenario, which distinguishes between the screenshot and display processing of the fused image, so that the display can continue to use the fused image for display, and the screenshot can retain the original image, obtaining a screenshot with the original image and the fused image superimposed.

[0218] Fig.13 A brightness control method in a second screenshot scenario is shown, such as Fig.13 As shown, the method 30 is applied to an electronic device including a display screen. The method 30 may include the following steps S31 to S35, and the following will respectively describe the steps S31 to S35 in detail.

[0219] S31. The target application configures different second identifiers for the original image and the fused image.

[0220] Optionally, the target application performs algorithm processing on the original image to obtain a fused image.

[0221] Based on this, different second identifiers may be configured for the original image and the fused image. For example, the second identifier may be set to "3" for the original image and the second identifier may be set to "4" for the fused image.

[0222] S32: In response to the second operation, the SF service module identifies the second identifier.

[0223] The second operation may be the same as the second operation in the above S23, that is, a screenshot operation.

[0224] Optionally, the SF service module may identify the second identifier corresponding to the original image and the fused image through the setExtensionLayerFlag interface added in the present application.

[0225] Fig.14The software system structure diagram provided by the present application with the setExtensionLayerFlag interface added is shown. Based on this, after responding to the screenshot operation, the SF service module identifies the second identifiers corresponding to the original image and the fused image respectively through the setExtensionLayerFlag interface.

[0226] It should be understood that the SF service module can identify which image is the original image and which image is the fused image by identifying the second identifier, so as to facilitate the selection of the original image and the fused image when generating screenshots and sending them for display.

[0227] S33: Identify the screen type, which includes a display screen and a virtual screen.

[0228] It should be understood that in S25, in response to the second operation, the SF service module also creates a virtual screen, so that the screen type can be identified to facilitate subsequent processing of different screen types in combination with different images.

[0229] S34, for the virtual screen, retain the original image, and generate a target screenshot based on the superimposed original image, fused image and other layers.

[0230] It should be understood that since the original image is retained and superimposed on the fused image (it can be understood as overlapping and the fused image is completely covered), when generating the target screenshot, the content of the same area captured is the top original image at the area corresponding to the original image and the fused image. Of course, the target screenshot also includes the area corresponding to other layers.

[0231] It should be understood that the layer level corresponding to the original image can be set above the layer level corresponding to the fused image, so that the original image displayed on the virtual screen is above the fused image. Based on this, when generating the target screenshot, it is equivalent to the fused image being completely covered by the original image, with no visible area, so there is no additional load.

[0232] It should also be understood that since the results of the virtual screen may be sent to other electronic devices for display, and other electronic devices may not be able to support the fused image well, this application chooses to set the original image layer level at the top to ensure that the original effect is seen.

[0233] Optionally, in S34, for the virtual screen, the fused image may be filtered out, and a target screenshot may be generated based only on the original image and other layers.

[0234] S35, for the display screen, filter out the original image, and display based on the fused image and other layers.

[0235] Optionally, in the rebuildLayerStacks stage, the original images superimposed on the fused image are filtered out, leaving only the fused image and other layers to be composited and displayed.

[0236] It should be understood that since the original image and the fused image may be quite different, it is still desirable to use the fused image for display when sending for display.

[0237] In the special screenshot scenario provided by the above-mentioned embodiment of the present application, the target application can configure different second identifiers for the original image that has not been processed by the algorithm and the fused image that has been processed by the algorithm to indicate the difference in the image. In response to the screenshot operation, the SF service module can determine the original image and the fused image by identifying the second identifier. Then, for the process of generating the screenshot, the original image is retained so that the original image is superimposed on the fused image, so that the obtained screenshot finally includes the original image; and for the process of sending and displaying, the original image is filtered out, and only the fused image is sent for synthesis and display with other layers. In this way, when displaying, the embodiment of the present application can use the fused image with better effect after algorithm processing; when generating a screenshot, the screenshot can be generated based on the original image, so that the screenshot can be adapted to other electronic devices for display after being sent to other electronic devices, avoiding the situation that the opposite device does not have the brightness control method of the present application, so that when the screenshot is displayed, it will become very dark and cannot be displayed normally.

[0238] Combination of the above Figures 1 to 14 , describes the brightness control method, software system, and hardware system provided by this application. Fig.15 , describing the chip system of the electronic device to which the present application is applicable. It should be understood that the chip system in the embodiment of the present application can execute the various methods of the aforementioned embodiment of the present application, that is, the specific working process of the following various products can refer to the corresponding process in the aforementioned method embodiment.

[0239] Fig.15 A structural schematic diagram of an electronic device provided by the present application is shown. Fig.15 The dotted line in indicates that the unit or the module is optional, and the electronic device 400 can be used to implement the brightness control method described in the above method embodiment.

[0240] The electronic device 400 includes one or more processors 401, which can support the electronic device 400 to implement the method in the method embodiment. The processor 401 can be a general-purpose processor or a special-purpose processor. For example, the processor 401 can be a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0241] The processor 401 can be used to control the electronic device 400, execute the software program, and process the data of the software program. The electronic device 400 can also include a communication unit 405 to implement the input (reception) and output (transmission) of signals.

[0242] For example, the electronic device 400 may be a chip, the communication unit 405 may be an input and / or output circuit of the chip, or the communication unit 405 may be a communication interface of the chip, and the chip may be a component of the electronic device or other electronic devices.

[0243] For another example, the electronic device 400 may be an electronic device, and the communication unit 405 may be a transceiver of the electronic device, or the communication unit 405 may be a transceiver circuit of the electronic device.

[0244] The electronic device 400 may include one or more memories 402 on which a program 404 is stored. The program 404 can be executed by the processor 401 to generate instructions 403, so that the processor 401 executes the brightness control method described in the above method embodiment according to the instructions 403.

[0245] Optionally, data may be stored in the memory 402. Optionally, the processor 401 may read data stored in the memory 402. The data may be stored at the same storage address as the program 404, or may be stored at a different storage address than the program 404.

[0246] The processor 401 and the memory 402 may be provided separately or integrated together; for example, integrated on a system on chip (SOC) of the electronic device.

[0247] Exemplarily, the memory 402 can be used to store the program 404 related to the brightness control method provided in the embodiment of the present application, and the processor 401 can be used to call the program 404 related to the brightness control method stored in the memory 402 during the upgrade to execute the brightness control method of the embodiment of the present application. For example: the display screen displays the third interface; receives the second operation; in response to the second operation, identifies the scene type, and the scene type includes at least screenshot, rotation and split screen; when the scene type is a screenshot scene, the SF service module generates a target screenshot based on the third interface; wherein the brightness of the area corresponding to the SDR layer in the target screenshot is the same as the brightness corresponding to the SDR layer in the third interface.

[0248] The present application also provides a computer program product, which, when executed by the processor 401, implements the brightness control method described in any method embodiment of the present application.

[0249] The computer program product may be stored in the memory 402 , for example, a program 404 , which is converted into an executable target file that can be executed by the processor 401 after preprocessing, compiling, assembling, and linking.

[0250] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the brightness control method described in any method embodiment of the present application is implemented. The computer program can be a high-level language program or an executable target program.

[0251] Optionally, the computer-readable storage medium is, for example, a memory 402. The memory 402 may be a volatile memory or a non-volatile memory, or the memory 402 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0252] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described devices and equipment and the technical effects produced can refer to the corresponding processes and technical effects in the aforementioned method embodiments, and will not be repeated here.

[0253] In several embodiments provided in the present application, the disclosed systems, devices and methods can be implemented in other ways. For example, some features of the method embodiments described above can be ignored or not performed. The device embodiments described above are merely schematic, and the division of units is only a logical function division. There may be other division methods in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the above coupling includes electrical, mechanical or other forms of connection.

[0254] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0255] In addition, the terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0256] In short, the above is only a preferred embodiment of the technical solution of this application, and is not intended to limit the protection scope of this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application should be included in the protection scope of this application.

Claims

1. A brightness control method, characterized in that: Applied to an electronic device including a display screen and an SF service module, the method comprises: The display screen displays a third interface; receiving a second operation; In response to the second operation, identifying a scene type, the scene type at least including screenshot, rotation, and split screen; When the scene type is a screenshot scene, the SF service module generates a target screenshot based on the third interface; Among them, the brightness of the area corresponding to the SDR layer in the target screenshot is the same as the brightness corresponding to the SDR layer in the third interface, and the SDR layer in the target screenshot is synthesized based on the HDR layer and the SDR layer in the third interface.

2. The brightness control method according to claim 1, characterized in that: The electronic device also includes a WMS; In response to the second operation, identifying the scene type includes: In response to the second operation, the target application is configured with a first identifier for indicating different scenario types, and the target application corresponds to the third interface; Based on the first identifier, the WMS identifies the scene type.

3. The brightness control method according to claim 1 or 2, characterized in that: When the scene type is screenshot, the SF service module generates a target screenshot based on the third interface, including: In response to the second operation, a virtual screen is created, on which a fourth interface is displayed, the fourth interface being the same as the third interface; According to the preset screen brightness of the display screen, tone mapping is performed on the HDR layer included in the fourth interface, and darkening is not performed on the included SDR layer; Based on the processed HDR layer and the SDR layer without darkening processing, the target screenshot is obtained.

4. The brightness control method according to claim 3, characterized in that: The method further comprises: The target application configures different second identifiers for the original image and the fused image, and the fused image is obtained after the original image is processed by an algorithm; In response to the second operation, the SF service module identifies a second identifier; The SF service module identifies the screen type, where the screen type includes a display screen and a virtual screen; For the virtual screen, retain the original image, and generate the target screenshot based on the fused image and the original image superimposed on the fused image; For the display screen, the original image is filtered out, and the fused image is displayed.

5. The brightness control method according to claim 1, characterized in that: The electronic device further includes a brightness module, and the method further includes: In response to a first operation on a first application, the display screen displays a first interface; When the first application recognizes that the first interface includes an HDR layer, sending a first instruction to the brightness module; After receiving the first instruction, the brightness module determines a target strategy and transmits it to the SF service module, where the target strategy includes brightness control parameters corresponding to the HDR layer and the SDR layer respectively; The SF service module adjusts the brightness of the display layer based on the layer property of the display layer and the target strategy; After adjustment, the data are sent to the display screen for display; Among them, the layer properties of the display layer include HDR layer and / or SDR layer, and the brightness of the display layer whose property is HDR layer after brightness adjustment is greater than the brightness of the SDR layer whose property is SDR layer after brightness adjustment.

6. The brightness control method according to claim 5, characterized in that: The electronic device further comprises a hardware synthesizer HWC, and the method further comprises: The SF service module obtains the maximum screen brightness of the display screen through the HWC; The SF service module adjusts the brightness of the display layer based on the layer property of the display layer and the target strategy, including: The SF service module performs tone mapping processing on the display layer whose layer property is an HDR layer based on the target strategy and the maximum screen brightness.

7. An electronic device, characterized in that: including a processor and a memory; The memory is used to store a computer program executable on the processor; The processor is used to execute the brightness control method according to any one of claims 1 to 6.

8. A chip system, characterized in that: The device comprises: a processor, configured to call and run a computer program from a memory, so that a device equipped with the chip executes the brightness control method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to execute the brightness control method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image display method under shooting scene and electronic device

    CN109496423A

  • Mixed layer processing method and apparatus

    CN112805745A

  • Compensation method and electronic equipment

    CN112825232A

  • Point light source image detection method and electronic equipment

    CN113810603A

  • Display device and AI enhanced display method

    CN114296841A