Brightness control method and related equipment thereof

By identifying the layer properties and performing targeted brightness control, it solves the problem of brightness adjustment when electronic devices display HDR and SDR layers, improves user experience, and ensures the overall consistency and visual satisfaction of the display effect.

CN118625962APending Publication Date: 2024-09-10HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410825410.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2024-09-10

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 adjusting brightness, some layers have good display effects while some layers have poor effects, making it difficult to adjust the brightness. Meets the display needs of HDR and SDR layers at the same time.

Method used

By identifying whether the layer is HDR or SDR, brightness control is performed respectively, tone mapping is performed on the HDR layer, and darkening is performed on the SDR layer to ensure that the display effect meets the visual requirements and avoid visual flickering in rotating scenes.

Benefits of technology

It improves the brightness and dark detail performance of HDR layers, while avoiding the problem of over-brightness of SDR layers, ensuring a better overall display effect and meeting the visual needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118625962A
    Figure CN118625962A
Patent Text Reader

Abstract

The invention provides a brightness control method and related equipment thereof, and relates to the technical field of terminals, and the method comprises the steps that a display screen displays a third interface; receiving a second operation; in response to the second operation, the WMS judges whether the screen direction of the display screen is rotated or not; when the direction of the screen is rotated, the WMS sends a second identifier for indicating the direction rotation of the screen to the SF service module; the SF service module is combined with the second identifier, and the first screenshot of which the layer property is the SDR layer is not subjected to pressure darkening processing. By adding the second identifier, the first screenshot can be subsequently determined to be used for rotation in combination with the second identifier, so that the first screenshot used for rotation can be not subjected to pressure darkening treatment, and flickering in the rotation process is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the Chinese patent application submitted to the State Intellectual Property Office on February 24, 2023, with application number 202310207668.2 and application name "Brightness Control Method and Related Equipment". Technical Field

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

[0003] 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.

[0004] 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.

[0005] 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

[0006] 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.

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

[0008] The display screen displays a third interface;

[0009] receiving a second operation;

[0010] In response to the second operation, the WMS determines whether the screen direction of the display screen is rotated;

[0011] When the screen direction is rotated, the WMS sends a second identifier for indicating the screen direction rotation to the SF service module;

[0012] The SF service module combines the second identifier and does not perform darkening processing on the first screenshot whose layer property is an SDR layer.

[0013] In the native brightness control method for rotating scenes in the Android system, only tone mapping is performed on the HDR layer without dimming, and the SDR layer is dimmed. Furthermore, since the first screenshot obtained is an ordinary SDR layer, it will be dimmed once as a whole. In this way, it is equivalent to dimming the brightness of the area corresponding to the SDR layer in the screenshot twice, and dimming the area corresponding to the HDR layer in the screenshot once. This will cause visual flickering to the human eye during rotation, which does not meet viewing requirements. However, this application no longer dims the first screenshot, which is equivalent to retaining the effect of the previous layer-level brightness control, avoiding the phenomenon of flashing black during rotation in the related art.

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

[0015] In response to the second operation, when the screen direction is rotated, the target application is configured with a first identifier for indicating a rotation scene, and the target application corresponds to the third interface;

[0016] Based on the first identifier, the WMS identifies that the scene type is a rotating scene;

[0017] The WMS sends the first identifier for indicating the rotating scene to the SF service module through the first interface.

[0018] In the implementation method, when the screen direction rotates, it can be determined that the current scene is a rotating scene. For the rotating scene, the WMS needs to send a first identifier for indicating the rotating scene to the SF service module, so that the SF service module can determine to process the layer according to the rotating scene based on the first identifier.

[0019] In combination with the first aspect, in certain implementations of the first aspect, before the SF service module combines the second identifier and does not perform darkening processing on the first screenshot whose layer property is an SDR layer, the method further includes:

[0020] 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;

[0021] In combination with the received first identifier, the SF service module performs tone mapping processing on the HDR layer included in the fourth interface and performs darkening processing on the included SDR layer according to the maximum screen brightness of the display screen;

[0022] Based on the processed HDR layer and the processed SDR layer, the first screenshot is obtained.

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

[0024] In the implementation, for the rotating scene type, 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 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 can be darkened. After the processed HDR layer and the SDR layer are synthesized, a first screenshot with the layer property of the SDR layer is obtained. Then, the first screenshot is no longer darkened.

[0025] In combination with the first aspect, in some implementations of the first aspect, the electronic device further includes a rotation animation module, and in response to the second operation, the WMS determines whether the screen direction of the display screen is rotated, including:

[0026] In response to the second operation, the target application determines whether to start the rotation animation module;

[0027] If so, the WMS determines whether the screen direction of the display screen is rotated.

[0028] The rotation animation module is used to control the rotation of the screen, so that the screen presents a vertical or horizontal layout.

[0029] In the implementation, by judging whether the rotation animation module is started, the screenshot scene can be distinguished when it is not started; when it is started, it is necessary to continue to judge whether the screen direction is rotated to distinguish the split screen scene from the rotation scene. If the screen direction is not rotated, it is a split screen scene, and if the screen direction is rotated, it is a rotation scene. Usually, the scene type is distinguished, and different brightness controls can be performed for different scenes later.

[0030] In combination with the first aspect, in some implementations of the first aspect, the WMS sending a second identifier for indicating screen direction rotation to the SF service module includes:

[0031] The WMS sends the second identifier to the SF service module through a second interface, where the second interface is different from the first interface.

[0032] In the implementation method, the second identifier is sent through the second interface, and the SF service module can determine the next frame display layer for the split-screen scenario by identifying the second identifier, thereby avoiding incorrect processing flow selection when processing the next frame display layer.

[0033] 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:

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

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

[0036] 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;

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

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

[0039] 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.

[0040] 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.

[0041] 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:

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

[0043] 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:

[0044] 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.

[0045] 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.

[0046] 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.

[0047] 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.

[0048] 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.

[0049] 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.

[0050] 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.

[0051] 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.

[0052] 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

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

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

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

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

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

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

[0059] Figure 7 is a schematic diagram of a rotating scene provided in an embodiment of the present application;

[0060] Figure 8 It is a schematic diagram of the relevant interface provided in the embodiment of the present application;

[0061] Fig. 9 This is a brightness control method in a rotating scene provided by an embodiment of the present application;

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

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

[0064] Fig.12 is a software system diagram of another electronic device provided in an embodiment of the present application;

[0065] Fig.13 is a schematic diagram of a screen projection scenario provided in an embodiment of the present application;

[0066] Fig.14 This is a schematic diagram of the relevant interface for starting the screen projection function provided in an embodiment of the present application;

[0067] Fig.15 This is a schematic diagram of the interface for starting the screen recording function provided in an embodiment of the present application;

[0068] Fig.16 This is a brightness control method in screen projection and screen recording scenarios provided by an embodiment of the present application;

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

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

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

[0072] 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.

[0073] 3. Surface compositor (SF): A system service process that controls the composition, where the layers involved in the display, visible areas, etc. are calculated.

[0074] 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.

[0075] 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.

[0076] 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.

[0077] 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.

[0078] 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.

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

[0080] 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.

[0081] 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.

[0082] 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.

[0083] 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.

[0084] 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.

[0085] 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.

[0086] 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.

[0087] 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.

[0088] 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.

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

[0090] 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.

[0091] 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.

[0092] 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.

[0093] 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.

[0094] 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.

[0095] Exemplarily, the processor 110 provided in the embodiment of the present application can execute the following method: the display screen displays a third interface; a second operation is received; in response to the second operation, the WMS determines whether the screen direction of the display screen is rotated; when the screen direction is rotated, the WMS sends a second identifier for indicating the rotation of the screen direction to the SF service module; the SF service module combines the second identifier and does not darken the first screenshot whose layer property is an SDR layer.

[0096] 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.

[0097] 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.

[0098] 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.

[0099] 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.

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

[0101] 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.

[0102] 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.

[0103] 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.

[0104] 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.

[0105] 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.

[0106] 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.

[0107] 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.

[0108] 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.

[0109] 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.

[0110] 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.

[0111] 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.

[0112] 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.

[0113] 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.

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

[0115] 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).

[0116] 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.

[0117] 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.

[0118] 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.

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

[0120] 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).

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

[0122] 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.

[0123] 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.

[0124] 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.

[0125] 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.

[0126] 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.

[0127] 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.

[0128] 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.

[0129] 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.

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

[0131] 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.

[0132] 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.

[0133] 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.

[0134] 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 the Sksl language during the GPU synthesis process, and calling the GPU for corresponding processing according to the generated sharder.

[0135] 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.

[0136] 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.

[0137] 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.

[0138] 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.

[0139] 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.

[0140] 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.

[0141] 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.

[0142] 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.

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

[0144] 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.

[0145] 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.

[0146] 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.

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

[0148] 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.

[0149] 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.

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

[0151] 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.

[0152] 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.

[0153] 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.

[0154] 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.

[0155] 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.

[0156] 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.

[0157] 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.

[0158] 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.

[0159] 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.

[0160] 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.

[0161] 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.

[0162] 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.

[0163] 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.

[0164] 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.

[0165] 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.

[0166] 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.

[0167] 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.

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

[0169] 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.

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

[0171] 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.

[0172] 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.

[0173] 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.

[0174] Combine the following Figures 7 to 11 , a detailed introduction is given to the rotating scene and the brightness control method under the rotating scene.

[0175] For example, Figure 7 A schematic diagram of a rotating scene is shown. Taking a mobile phone as an example, when the mobile phone receives a trigger operation from a user for an icon indicating a video in a gallery APP, the following may be displayed: Figure 7 The interface shown in (a) in FIG. 1 may be a non-full-screen video playback interface 201. The interface may include a status bar, a playback interface corresponding to the HDR video, a volume adjustment control, a rotation icon 202, etc. The rotation icon 202 is used to indicate that the playback interface is rotated. In response to a user clicking the rotation icon 202, the non-full-screen playback interface 201 may be rotated 90 degrees, and the display mode after rotation may be as follows: Figure 7 As shown in (b) in .

[0176] For example, Figure 8 A schematic diagram of a related interface is shown. Figure 8 As shown in (a) of FIG. 1 , the interface 203 of the drop-down menu of the electronic device may include a control 203 for controlling screen rotation; in response to a user's click operation on the control 203, the control 203 may be in a selected state, and accordingly, the screen rotation function is enabled. Figure 8 As shown in (b) of FIG. 1 , the setting interface 205 of the electronic device may also include an icon for controlling screen rotation and a corresponding switch control 206. For example, on the setting interface 205, when the user clicks the switch control 206, the switch control 206 may be turned on, and accordingly, the screen rotation function is turned on. Subsequently, when the user rotates the phone, the interface displayed on the electronic device may be switched from the portrait mode to the landscape mode, or from the landscape mode to the portrait mode.

[0177] Combination Figure 7 and Figure 8 The rotation scene shown and the related display interface for turning on the screen rotation function, Fig. 9 A brightness control method in a rotating scene is shown, such as Fig. 9 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 S28, and the following will respectively describe the steps S21 to S28 in detail.

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

[0179] 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.

[0180] 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.

[0181] 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.

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

[0183] 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.

[0184] 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.

[0185] For example, the screenshot operation may be a click operation on a rotation icon displayed on the display screen, such as Figure 7 Alternatively, the screenshot operation may be a rotation operation on the display screen, which rotates the display screen from a horizontal screen posture by 90 degrees in physical space to a vertical screen posture, or from a vertical screen posture by 90 degrees to a horizontal screen posture.

[0186] 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, and split screen.

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

[0188] Fig.10 A schematic diagram of a data structure is shown. Fig.10As 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.

[0189] 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.

[0190] 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.

[0191] 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.

[0192] 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.

[0193] 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.

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

[0195] 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).

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

[0197] The WMS sends a first identifier for indicating a rotating scene to the SF service module.

[0198] For example, the WMS may use the first interface in the native path of the Android system to send the first identifier to the SF service module; for example, the first interface may indicate the setDisplayBrightness interface.

[0199] 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.

[0200] 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.

[0201] 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.

[0202] 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.

[0203] S26. When the identified scene type is a rotating scene, tone mapping is performed on all HDR layers in the fourth interface according to the maximum screen brightness, and darkening is performed on all SDR layers.

[0204] 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.

[0205] Optionally, a GPU is used to synthesize all processed HDR layers and darkened SDR layers to obtain a first screenshot; then, the synthesized first screenshot is transferred to a cache and returned to SF.

[0206] 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 maximum screen brightness, and perform dimming and other processing on the SDR layer, that is, darken the SDR layer; in this way, the processed HDR layer and the darkened SDR layer 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.

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

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

[0209] 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.11 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.

[0210] For example, Fig.11 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.

[0211] When the identified scene type is a split-screen scene, the maximum screen brightness can be determined by obtaining the value of sOEMMaxLumiance. Then, the HDR layer is tone mapped in combination with the maximum screen brightness, so that the brightness of the corresponding area of ​​the processed HDR layer is higher than that of the corresponding area of ​​the SDR layer, thereby effectively bringing into play the capabilities of the screen.

[0212] S27. Obtain a first screenshot whose layer property is an SDR layer based on the processed HDR layer and the processed SDR layer, and do not perform darkening processing on the first screenshot.

[0213] It should be understood that in the native rotation scene control method of the Android system, only tone mapping is performed on the HDR layer without dimming, while the SDR layer is dimmed. Furthermore, since the first screenshot obtained is an ordinary SDR layer, it will be dimmed as a whole once. In this way, it is equivalent to dimming the brightness of the area corresponding to the SDR layer in the screenshot twice, and dimming the area corresponding to the HDR layer in the screenshot once. This will cause visual flickering to the human eye during rotation, which does not meet viewing requirements.

[0214] Therefore, in response to the above situation, in the brightness control method provided in the embodiment of the present application, for the rotating scene, in order to retain the original interface effect, the HDR layer is only subjected to tone mapping processing without dimming, and the SDR layer is subjected to dimming processing. Then, for the first screenshot obtained as an SDR layer, the overall dimming will no longer be performed. This is equivalent to retaining the effect of the brightness layer control and avoiding the phenomenon of rotating flashing black in the related art.

[0215] Optionally, when determining that the screen direction is rotated, the WMS may also send a second identifier for indicating the screen direction rotation to the SF service module. Then, the SF service module determines that the first screenshot is for a rotated scene based on the second identifier, and therefore does not darken the first screenshot.

[0216] For example, the WMS may send the second flag for indicating screen direction rotation to the SF service module through the newly added setExtensionLayerFlag interface. In other words, the SF service module may identify the second flag through the newly added setExtensionLayerFlag interface.

[0217] Fig.12 The 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 identifier through the setExtensionLayerFlag interface.

[0218] It should be understood that the SF service module can determine that the current scene type is a rotation scene by identifying the second identifier, and based on the second identifier, the first screenshot whose layer property is an SDR layer stored in rotationLayer may not be darkened.

[0219] 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 different first identifiers for different scene types, so that the WMS can determine the scene type according to the first identifier, and then the SF service module can select different brightness controls for different scene types.

[0220] For scenes with rotating scene types, in order to avoid the process of obtaining screenshots interfering with the normal display process on the display screen, in this 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, this 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 maximum screen brightness, and the SDR layer can be darkened. After the processed HDR layer and the SDR layer are synthesized, a first screenshot with an SDR layer property is obtained. Then, the first screenshot is no longer darkened.

[0221] It should be understood that in the native brightness control method of the Android system corresponding to the rotating scene, only tone mapping is performed on the HDR layer without dimming, and the SDR layer is dimmed. Furthermore, since the first screenshot obtained is an ordinary SDR layer, it will be dimmed once as a whole. In this way, it is equivalent to dimming the brightness of the area corresponding to the SDR layer in the screenshot twice, and dimming the area corresponding to the HDR layer in the screenshot once. This will cause visual flickering to the human eye during rotation, which does not meet viewing requirements. However, this application no longer dims the first screenshot, which is equivalent to retaining the effect of the previous layer-level brightness control, avoiding the phenomenon of rotating flashing black in the related art.

[0222] Combine the following Figures 13 to 16 , provides a detailed introduction to screen projection scenarios, screen recording scenarios, and brightness control methods in screen projection and recording scenarios.

[0223] For example, Fig.13 A schematic diagram of a screen projection scenario is shown. The screen projection scenario generally includes a first electronic device as a projection end and a second electronic device as a receiving end. The first electronic device can display its own display content (including pictures, videos, audio and other image data to be projected) on the second electronic device through the screen projection technology. For example, when the wireless screen projection technology is Miracast, the first electronic device (such as Fig.13 The mobile phone shown in FIG. 1 can capture and record its own display content, and synchronously send the recorded capture data to the second electronic device (such as FIG. Fig.13 The television 200 shown in the figure is played by the second electronic device to complete the screen projection.

[0224] For example, Fig.14 A schematic diagram of a related interface is shown. Fig.14As shown, taking a mobile phone as the first electronic device for projection as an example, the first electronic device's drop-down menu interface 203 may include a control 207 for controlling screen projection; in response to a user's click operation on the space 207, the control 207 may be in a selected state, and accordingly, the screen projection function is enabled. Fig.14 As shown in (b) of FIG. 1 , the setting interface 205 of the first electronic device may also include an icon for controlling screen projection and a corresponding switch control 208. For example, on the setting interface 205, when the user clicks the switch control 208, the switch control 208 may be turned on, and accordingly, the screen projection function is turned on. Subsequently, when the user selects the second electronic device at the receiving end, the image data to be projected on the first electronic device may be projected to the receiving end for display.

[0225] For example, Fig.15 A schematic diagram of a related interface is shown. Fig.15 As shown, the interface 203 of the drop-down menu of the electronic device may include a control 209 for recording the screen; subsequently, in response to a user's click operation on the control 209, the control 209 may be placed in a selected state, and accordingly, the function of the screen recording product is turned on to start recording the content on the interface displayed on the electronic device.

[0226] Combination Fig.13 and Fig.14 The screen projection scene shown and the related display interface for turning on the screen projection function, Fig.15 The related interface for starting the screen recording function is shown. Fig.16 A brightness control method is shown, which can be adapted to screen projection scenarios and screen recording scenarios.

[0227] like Fig.16 As shown, the method 30 may include the following S31 to S35, and steps S31 to S35 are described in detail below.

[0228] S31. The display screen displays the fifth interface.

[0229] S32: Receive a third operation from the user.

[0230] The fifth interface may be the same as or different from the third interface; the third operation may be the same as or different from the second operation. When the fifth interface is the same as the third interface, and the third operation is the same as the second operation, the description of S31 and S32 may refer to the description of S21 and S22.

[0231] S33. In response to the third operation, the target application is configured with a first identifier for indicating different scene types; the scene types include at least screenshot, rotation, split screen, screen projection, and screen recording.

[0232] Here, the target application is used to indicate the application program corresponding to the fifth interface.

[0233] like Fig.10 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.

[0234] Exemplarily, when the third operation is a screen projection operation, in response to the third operation, the target application may configure the flag value corresponding to mScreenShotFlag to 5 to indicate that the current scene is a screen projection scene.

[0235] Exemplarily, when the third operation is a screen recording operation, in response to the third operation, the target application may configure the flag value corresponding to mScreenShotFlag to 6 to indicate that the current scene is a screen recording scene.

[0236] S34. The WMS identifies the scene type by identifying the first identifier.

[0237] S35. When the identified scene type is screen projection or screen recording, the SF service module turns off the brightness control method and does not process all layers.

[0238] Optionally, the SF service module may further include a switch called Output between SF and Libsharder. When the scene type is identified as screen projection or screen recording, the SF service module may control the Output to be closed, thereby achieving the purpose of not performing any layer-level brightness adjustment on the layer.

[0239] It should be understood that in the screen projection and screen recording scenarios, since the device as the receiving end does not necessarily support HDR images and HDR videos, in order to avoid the large difference between the data sent and the source data due to the layer-level brightness control, in the brightness control method provided in the embodiment of the present application, when the scene type is identified as a screen projection scene or a screen recording scene in the SF service module, the layer-level brightness control path will be closed, that is, no brightness adjustment will be made to the HDR layer and SDR layer sent for display. In this way, it can be ensured that the source data of the screen projection or screen recording can also be displayed normally on other electronic devices.

[0240] Combination of the above Figures 1 to 16 , describes the brightness control method, software system, and hardware system provided by this application. Fig.17, 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.

[0241] Fig.17 A structural schematic diagram of an electronic device provided by the present application is shown. Fig.17 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.

[0242] 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.

[0243] 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.

[0244] 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.

[0245] 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.

[0246] 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.

[0247] 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.

[0248] 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.

[0249] Exemplarily, the memory 402 may 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 may 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 in the embodiment of the present application. For example:

[0250] The display screen displays a third interface; a second operation is received; in response to the second operation, the WMS determines whether the screen direction of the display screen is rotated; when the screen direction is rotated, the WMS sends a second identifier for indicating the rotation of the screen direction to the SF service module; the SF service module combines the second identifier and does not darken the first screenshot whose layer property is an SDR layer.

[0251] 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.

[0252] 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.

[0253] 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.

[0254] 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 DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0255] 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.

[0256] 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.

[0257] 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.

[0258] 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.

[0259] 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, a WMS and a SF service module, the method comprises: The display screen displays a third interface; receiving a second operation for the display screen; In response to the second operation, the WMS determines whether the screen direction of the display screen is rotated; When it is determined that the screen direction is rotated, the SF service module does not perform darkening processing on the first screenshot of the SDR layer.

2. The brightness control method according to claim 1, characterized in that: When it is determined that the screen direction is rotated, the SF service module does not perform darkening processing on the first screenshot of the SDR layer, including: When it is determined that the screen direction is rotated, the WMS sends a second identifier for indicating the screen direction rotation to the SF service module; After receiving the second identifier, the SF service module does not perform darkening processing on the first screenshot of the SDR layer.

3. The brightness control method according to claim 2, characterized in that: The method further comprises: When it is determined that the screen direction is rotated, a first identifier is configured for the target application corresponding to the third interface, where the first identifier is used to indicate a rotation scene; Based on the first identifier, the WMS identifies that the scene type is a rotating scene; The WMS sends the first identifier to the SF service module through a first interface.

4. The brightness control method according to claim 3, characterized in that: After receiving the second identifier, before the SF service module does not perform darkening processing on the first screenshot of the SDR layer, the method further includes: 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; After receiving the first identifier, the SF service module performs tone mapping processing on the HDR layer included in the fourth interface and performs darkening processing on the included SDR layer according to the maximum screen brightness of the display screen; Based on the processed HDR layer and the processed SDR layer, the first screenshot is obtained.

5. The brightness control method according to claim 3 or 4, characterized in that: The electronic device further includes a rotation animation module, and in response to the second operation, the WMS determines whether the screen direction of the display screen is rotated, including: In response to the second operation, the target application determines whether to start the rotation animation module; If so, the WMS determines whether the screen direction of the display screen is rotated.

6. The brightness control method according to any one of claims 3 to 5, characterized in that: The WMS sends a second identifier for indicating screen direction rotation to the SF service module, including: The WMS sends the second identifier to the SF service module through a second interface, where the second interface is different from the first interface; The first interface is the setDisplayBrightness interface of the WMS; the second interface is the setExtensionLayerFlag interface of the WMS.

7. The brightness control method according to any one of claims 3 to 6, 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, the first application includes the target application; when the first application is the target application, the first interface includes the third 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 the target strategy 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 target strategy; Sending the display layer after brightness adjustment to the display screen for display; Among them, the display layer includes an HDR layer and / or an SDR layer; when the display layer includes the HDR layer and the SDR layer, in the display layer after brightness adjustment, the brightness of the display layer that is the HDR layer is greater than the brightness of the display layer that is the SDR layer.

8. The brightness control method according to claim 7, 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 target strategy, including: The SF service module performs tone mapping processing on the display layer which is an HDR layer based on the target strategy and the maximum screen brightness.

9. 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 8.

10. 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 8.

11. 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 8.