[go: up one dir, main page]

CN118625962A - Brightness control method and related device - Google Patents

Brightness control method and related device Download PDF

Info

Publication number
CN118625962A
CN118625962A CN202410825410.3A CN202410825410A CN118625962A CN 118625962 A CN118625962 A CN 118625962A CN 202410825410 A CN202410825410 A CN 202410825410A CN 118625962 A CN118625962 A CN 118625962A
Authority
CN
China
Prior art keywords
layer
interface
screen
brightness
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410825410.3A
Other languages
Chinese (zh)
Inventor
黄建宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202410825410.3A priority Critical patent/CN118625962A/en
Publication of CN118625962A publication Critical patent/CN118625962A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The application provides a brightness control method and related equipment, relating to the technical field of terminals, wherein the method comprises the following steps: the display screen displays a third interface; receiving a second operation; responding to the second operation, and judging whether the screen direction of the display screen rotates or not by the WMS; when the screen direction rotates, the WMS sends a second mark for indicating the rotation of the screen direction to the SF service module; and the SF service module is combined with the second identifier, and does not carry out the dimming treatment on the first screenshot of which the layer property is the SDR layer. According to the application, the second mark is added, so that the first screenshot can be determined for rotation by combining with the second mark, and therefore, the first screenshot for rotation can be subjected to no dimming treatment, and flicker in the rotation process is avoided.

Description

亮度控制方法及其相关设备Brightness control method and related device

本申请是2023年02月24日提交国家知识产权局、申请号为202310207668.2、申请名称为“亮度控制方法及其相关设备”的中国专利申请的分案申请。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

本申请涉及终端技术领域,具体涉及一种亮度控制方法及其相关设备。The present application relates to the field of terminal technology, and in particular to a brightness control method and related equipment.

背景技术Background Art

目前,随着终端技术的发展,如手机或平板电脑等具有图像显示功能的电子设备越来越多。但是,电子设备在显示时,例如,显示器的最大屏幕亮度大约在500nit以内,在大多情况下会被设置成仅支持0~200nit左右亮度范围的显示内容的状态。然而,图片、视频等制作端已经可以支持制作0~1000nit的HDR图片、HDR视频。当0~1000nit的HDR图片、视频利用现有的0~200nit的显示器进行显示时,受限于显示器设置的亮度,本应表达更宽广的亮暗部细节的HDR图片、视频,将无法得到较好的展示;用户在观看时只能看到最大亮度为200nit的图片、视频,体验非常不好。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.

另外,电子设备显示的显示界面通常是由多个图层合成的,也即,多个图层通过叠加的方式组成电子设备的显示界面。这样,当针对显示界面的屏幕亮度进行调整时,还可能出现部分图层对应亮度调整后显示较好,部分图层对应亮度调整后反而显示效果不好的情况。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.

对此,如何调整亮度能同时满足HDR图层和SDR图层的显示效果,成为一个亟需解决的问题。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

本申请提供一种亮度控制方法及其相关设备,分别对HDR图层和SDR图层进行调节,保证整体的显示效果符合视觉需求。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.

第一方面,提供了一种亮度控制方法,应用于包括显示屏、WMS和SF服务模块的电子设备,所述方法包括: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:

所述显示屏显示第三界面;The display screen displays a third interface;

接收第二操作;receiving a second operation;

响应于第二操作,所述WMS判断所述显示屏的屏幕方向是否旋转;In response to a second operation, the WMS determines whether the screen direction of the display screen is rotated;

当所述屏幕方向旋转时,所述WMS发送用于指示屏幕方向旋转的第二标识给所述SF服务模块;When the screen direction is rotated, the WMS sends a second identifier for indicating the screen direction rotation to the SF service module;

所述SF服务模块结合所述第二标识,针对图层性质为SDR图层的第一截图不进行压暗处理。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.

安卓系统原生的对应旋转场景的亮度控制方法中,针对HDR图层只进行色调映射处理,不压暗,对SDR图层进行压暗处理,进一步由于得到的第一截图是一个普通的SDR图层,还会被整体压暗一次,这样,相当于对截图中的SDR图层对应的区域进行了两次压暗亮度的操作,对截图中的HDR图层对应的区域进行了一次压暗的操作,这样就会导致旋转的时候,给人眼造成视觉上的闪烁现象,不符合观看的需求。而本申请针对第一截图不再进行压暗,相当于保留了前面图层级亮度控制的效果,避免出现相关技术中旋转闪黑的现象。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 rotating flashing black in the related technology.

结合第一方面,在第一方面的某些实现方式中,所述方法还包括:In combination with the first aspect, in some implementations of the first aspect, the method further includes:

响应于所述第二操作,当所述屏幕方向旋转时,目标应用配置用于指示旋转场景的第一标识,所述目标应用与所述第三界面对应;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;

基于所述第一标识,所述WMS识别到场景类型为旋转场景;Based on the first identifier, the WMS identifies that the scene type is a rotating scene;

所述WMS通过第一接口发送所述用于指示旋转场景的第一标识给所述SF服务模块。The WMS sends the first identifier for indicating the rotating scene to the SF service module through the first interface.

在实现方式中,当屏幕方向旋转,则可以判断当前是旋转场景,针对旋转场景,WMS需要下发用于指示旋转场景的第一标识给SF服务模块,以使得SF服务模块可以基于第一标识确定根据旋转场景来对图层进行处理。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.

结合第一方面,在第一方面的某些实现方式中,所述SF服务模块结合所述第二标识,针对图层性质为SDR图层的第一截图不进行压暗处理之前,所述方法还包括: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:

响应于第二操作,创建虚拟屏,所述虚拟屏上显示第四界面,所述第四界面与所述第三界面相同;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;

结合接收到的所述第一标识,所述SF服务模块根据所述显示屏的最大屏幕亮度,对所述第四界面中包括的HDR图层进行色调映射处理,以及对包括的SDR图层进行压暗处理;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;

基于将处理后的HDR图层和处理后的SDR图层,得到所述第一截图。Based on the processed HDR layer and the processed SDR layer, the first screenshot is obtained.

其中,压暗处理指的是确定图层对应的调光率,根据确定出的调光率对图层进行处理。The dimming process refers to determining the dimming rate corresponding to the layer and processing the layer according to the determined dimming rate.

在实现方式中,针对旋转场景类型,为了避免获取截图的流程对显示屏上正常进行的显示流程进行干扰,在本申请中,响应于第二操作,可以另外创建虚拟屏,虚拟屏上显示的第四界面与显示屏上显示的第三界面相同,这样,本申请可以针对虚拟屏上的第四界面进行处理以得到符合显示效果的截图。例如,可以针对虚拟屏上的第四界面所包括的HDR图层可以基于预设屏幕亮度进行色调映射处理,针对SDR图层则进行压暗处理,再将处理后的HDR图层和SDR图层合成后,得到图层性质为SDR图层的第一截图。然后,针对第一截图不再进行压暗处理。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.

结合第一方面,在第一方面的某些实现方式中,所述电子设备还包括旋转动画模块,所述响应于第二操作,所述WMS判断所述显示屏的屏幕方向是否旋转,包括: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:

响应于第二操作,所述目标应用判断是否启动所述旋转动画模块;In response to the second operation, the target application determines whether to start the rotation animation module;

若是,所述WMS判断所述显示屏的屏幕方向是否旋转。If so, the WMS determines whether the screen direction of the display screen is rotated.

旋转动画模块用于控制屏幕进行旋转,通过旋转使得屏幕呈现竖屏或者横屏的布局。The rotation animation module is used to control the rotation of the screen, so that the screen presents a vertical or horizontal layout.

在实现方式中,通过判断是否启动旋转动画模块,当未启动时可以区分出截屏场景;当启动时,则需要继续判断屏幕方向是否旋转来区分分屏场景和旋转场景,其中,屏幕方向没有旋转,则是分屏场景,屏幕方向旋转则是旋转场景。通常场景类型的区分,后续可以针对不同场景进行不同的亮度控制。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.

结合第一方面,在第一方面的某些实现方式中,所述WMS发送用于指示屏幕方向旋转的第二标识给所述SF服务模块,包括: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:

所述WMS通过第二接口发送所述第二标识给所述SF服务模块,所述第二接口与所述第一接口不同。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.

在实现方式中,通过第二接口发送第二标识,SF服务模块可以通过识别第二标识确定下一帧送显图层用于分屏场景,避免对下一帧送显图层进行处理时处理流程选择错误。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.

结合第一方面,在第一方面的某些实现方式中,所述电子设备还包括亮度模块,所述方法还包括: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:

响应于针对第一应用的第一操作,所述显示屏显示第一界面;In response to a first operation on a first application, the display screen displays a first interface;

当第一应用识别到所述第一界面包括HDR图层时,发送第一指令至所述亮度模块;When the first application recognizes that the first interface includes an HDR layer, sending a first instruction to the brightness module;

所述亮度模块接收到所述第一指令后,确定目标策略,并传输至所述SF服务模块,所述目标策略包括HDR图层和SDR图层分别对应的亮度控制参数;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;

所述SF服务模块基于送显图层的图层性质和所述目标策略对所述送显图层进行亮度调整;The SF service module adjusts the brightness of the display layer based on the layer property of the display layer and the target strategy;

调整后发送至所述显示屏显示;After adjustment, the data are sent to the display screen for display;

其中,所述送显图层的图层性质包括HDR图层和/或SDR图层,亮度调整后性质为HDR图层的送显图层亮度大于亮度调整后性质为SDR图层的亮度。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.

在实现方式中,针对既包括HDR图层又包括SDR图层的第一界面,通过对图层性质进行识别,即通过识别图层性质为HDR图层还是SDR图层,对不同性质的图层确定不同的目标策略并进行图层级亮度的调整,从而既能提高HDR图层的亮度,又能压制SDR图层的亮度,保证HDR图层的显示效果提高以及SDR图层的显示效果不会刺眼,进而使得显示界面整体的显示效果更好,更符合视觉需求。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.

结合第一方面,在第一方面的某些实现方式中,所述电子设备还包括硬件合成器HWC,所述方法还包括: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:

所述SF服务模块通过所述HWC获取所述显示屏的最大屏幕亮度;The SF service module obtains the maximum screen brightness of the display screen through the HWC;

所述SF服务模块基于送显图层的图层性质和所述目标策略对所述送显图层进行亮度调整,包括: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:

所述SF服务模块基于所述目标策略和所述最大屏幕亮度,对图层性质为HDR图层的所述送显图层进行色调映射处理。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.

在实现方式中,通过结合最大屏幕亮度,可以发挥显示屏的最大能力,提高HDR图层的显示效果,使得HDR图层显示时亮部更亮,暗部更暗。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.

第二方面,提供了一种电子设备,所述电子设备包括:一个或多个处理器、存储器;所述存储器与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,所述一个或多个处理器调用所述计算机指令以使得所述电子设备执行第一方面中的任一种亮度控制方法。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.

应理解,在上述第一方面中对相关内容的扩展、限定、解释和说明也适用于第二方面中相同的内容。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.

第三方面,提供了一种亮度控制装置,包括用于执行第一方面中任一种亮度控制方法的单元。In a third aspect, a brightness control device is provided, comprising a unit for executing any one of the brightness control methods in the first aspect.

在一种可能的实现方式中,当该亮度控制装置是电子设备时,该处理单元可以是处理器,该输入单元可以是通信接口;该电子设备还可以包括存储器,该存储器用于存储计算机程序代码,当该处理器执行该存储器所存储的计算机程序代码时,使得该电子设备执行第一方面中的任一种方法。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.

第四方面,提供了一种芯片系统,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片系统的设备执行第一方面或第二方面中的任一种亮度控制方法。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.

第五方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序代码,当所述计算机程序代码被电子设备运行时,使得该电子设备执行第一方面中的任一种亮度控制方法或第二方面中的任一种亮度控制方法。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.

第六方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码被电子设备运行时,使得该电子设备执行第一方面中的任一种亮度控制方法或第二方面中的任一种亮度控制方法。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

图1是一种本申请实施例适用的一种场景示意图;FIG1 is a schematic diagram of a scenario applicable to an embodiment of the present application;

图2是本申请实施例提供的一种电子设备的硬件系统图;FIG2 is a hardware system diagram of an electronic device provided in an embodiment of the present application;

图3是本申请实施例提供的一种电子设备的软件系统图;FIG3 is a software system diagram of an electronic device provided in an embodiment of the present application;

图4是本申请实施例提供的一种显示流程的示意图;FIG4 is a schematic diagram of a display process provided in an embodiment of the present application;

图5是本申请实施例提供的一种亮度控制方法的流程示意图;FIG5 is a schematic flow chart of a brightness control method provided in an embodiment of the present application;

图6是图5对应的软件系统中的处理逻辑示意图;FIG6 is a schematic diagram of the processing logic in the software system corresponding to FIG5;

图7是本申请实施例提供的一种旋转场景的示意图;FIG7 is a schematic diagram of a rotating scene provided in an embodiment of the present application;

图8是本申请实施例提供的相关界面示意图;FIG8 is a schematic diagram of a related interface provided in an embodiment of the present application;

图9是本申请实施例提供的旋转场景下的亮度控制方法;FIG9 is a brightness control method in a rotating scene provided by an embodiment of the present application;

图10是本申请实施例提供的数据结构示意图;FIG10 is a schematic diagram of a data structure provided in an embodiment of the present application;

图11是本申请实施例提供的获取最大屏幕亮度的示意图;FIG11 is a schematic diagram of obtaining the maximum screen brightness provided by an embodiment of the present application;

图12是本申请实施例提供的另一种电子设备的软件系统图;FIG12 is a software system diagram of another electronic device provided in an embodiment of the present application;

图13是本申请实施例提供的一种投屏场景的示意图;FIG13 is a schematic diagram of a screen projection scenario provided in an embodiment of the present application;

图14是本申请实施例提供的开启投屏功能的相关界面示意图;FIG14 is a schematic diagram of a related interface for enabling the screen projection function provided in an embodiment of the present application;

图15是本申请实施例提供的开启录屏功能的相关界面示意图;FIG15 is a schematic diagram of an interface related to enabling the screen recording function provided in an embodiment of the present application;

图16是本申请实施例提供的投屏场景和录屏场景下的亮度控制方法;FIG16 is a brightness control method in a screen projection scenario and a screen recording scenario provided by an embodiment of the present application;

图17是本申请提供的一种电子设备的结构示意图。FIG17 is a schematic diagram of the structure of an electronic device provided in the present application.

具体实施方式DETAILED DESCRIPTION

下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

1、亮度,单位投影面积上的发光强度,量化单位为nit或cd/m21. Brightness: the luminous intensity per unit projection area, quantified in nit or cd/ m2 .

2、图层(surface),例如像是含有文字或图形等元素的胶片,需要按照一定顺序叠放在一起,组合起来形成页面的最终效果。图层可以将页面上的元素精确定位。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.

3、图层合成器(surface flinger,SF):控制合成的系统服务进程,在这里计算参与显示的图层、可视区域等。3. Surface flinger (SF): A system service process that controls the synthesis, where the layers involved in the display, visible areas, etc. are calculated.

4、系统应用程序(application,APP)和第三方APP,电子设备中的APP通常可以分成系统APP和第三方APP。系统APP可以只电子设备的生产商所提供或研发的APP,电子设备的生产商可以包括电子设备的制造商、供应商、提供商或运行商等。例如,电子设备中的系统APP可以包括电话、信息、联系人、相机、录音等等。第三方APP指的是除了电子设备的生产商之外其他软件应用开发者所提供或研发的APP。例如,优酷、抖音等。第三方APP可以通过调用电子设备中的一项或多项系统功能来为用户提供相应的功能。示例性地,优酷、抖音可以为用户提供观看影视作品的功能等。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.

5、应用界面(user interface,UI),UI指应用程序或操作系统与用户之间进行交互和信息交换的介质接口,可实现信息的内部形式与用户可以接收形式之间的转换。应用界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在电子设备上经过解析,渲染,最终呈现为用户可以识别的内容。应用界面常见的表现形式是图形应用界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的应用界面。它可以是在电子设备的显示屏中显示的文本、图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。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.

6、前台运行、后台运行和关闭,APP对应包括三种运行状态:前台运行、后台运行和关闭。其中,当APP在电子设备的前台运行时,电子设备可以在显示屏上显示该APP的应用界面,用户可以通过该APP的应用界面中的控件与该APP进行交互。APP在电子设备中运行,但不属于上述在前台运行的情况即为APP在电子设备的后台运行的情况。APP在电子设备的后台运行的情况可以包括电子设备中存在该APP的进程,但显示屏上未显示有该APP的应用界面。由于后台运行的APP的应用界面未显示在显示屏上,用户通常无法直接与后台运行的APP进行交互。关闭指APP未在电子设备上运行。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.

应理解,在电子设备前台运行的APP可以有一个或多个,在电子设备后台运行的APP也可以有一个或多个。其中,在有一个或多个APP在电子设备前台运行的同时,电子设备的后台也可以运行有一个或多个APP。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.

7、进程(process),进程是应用程序关于某数据集合上的一次运行活动,是操作系统(例如Android系统)进行资源分配和调度的基本单位。每一个进程都会占用一块内存空间,应用程序以一个或多个进程的形式运行在操作系统上,实现相应的功能。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.

以上是对本申请实施例所涉及的名词的简单介绍,以下不再赘述。The above is a brief introduction to the terms involved in the embodiments of the present application, which will not be repeated below.

目前,随着终端技术的发展,如手机或平板电脑等具有图像显示功能的电子设备越来越多。但是,电子设备在显示时,例如,显示器的最大屏幕亮度大约在500nit以内,在大多情况下会被设置成仅支持0~200nit左右亮度范围的显示内容的状态。然而,图片、视频等制作端为了接近人眼可感知的亮度,已经可以支持制作0~1000nit的HDR图片、HDR视频。当0~1000nit的HDR图片、视频利用现有的0~200nit的显示器进行显示时,受限于显示器设置的亮度,本应表达更宽广的亮暗部细节的HDR图片、视频,将无法得到较好的展示;用户在观看时只能看到最大亮度为200nit的图片、视频,体验非常不好。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, 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.

另外,电子设备显示的显示界面通常是由多个图层合成的,也即,多个图层通过叠加的方式组成电子设备的显示界面。这样,当针对显示界面的屏幕亮度进行调整时,还可能出现部分图层对应亮度调整后显示较好,部分图层对应亮度调整后反而显示效果不好的情况。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.

电子设备显示的显示界面是由多个图层合成的。例如,在非全屏显示HDR图片或视频的场景下,电子设备中合成的显示界面可以包括HDR图层和SDR图层。HDR图层用于指示显示HDR图片或视频的显示内容的图层。SDR图层通常包括显示界面中的其他图层,例如,状态栏图层、导航栏图层等。相比于SDR图层,HDR图层所能使用的颜色种类更多,颜色表示范围更广,能够支持更丰富的图像色彩表现和更生动的图像细节表现,特别是画面暗部和亮部可呈现更多细节。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.

应理解,上述以非全屏显示为例对图层合成显示界面进行说明,全屏显示时显示界面的图层也可以由多个图层合成,并且,也可以包括HDR图层和SDR图层,对此,本申请实施例对此不进行任何限制。通常全屏指的是显示的视频或图片在屏幕上对应占用的区域为整个物理显示屏区域,非全屏指的是显示的视频或图片在屏幕上对应占用的区域仅为整个物理显示屏的部分区域,非全屏和全屏是相对的。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.

示例性地,图1示出了一种HDR图层和SDR图层合成显示界面的示意图。参考图1,电子设备显示图库APP中的一个非全屏视频播放界面,该界面可以由图1中的(a)所示的状态栏图层、图库的UI界面、HDR视频对应的图层、音量调节图层等多个图层叠加而成,合成后的显示效果如图1中的(b)所示。在图1中的(a)所示的示意图中,除了HDR视频对应的图层为HDR图层外,其他图层均为SDR图层。Exemplarily, FIG1 shows a schematic diagram of a composite display interface of HDR layers and SDR layers. Referring to FIG1 , an electronic device displays a non-full-screen video playback interface in a gallery APP. The interface can be composed of multiple layers such as the status bar layer shown in FIG1 (a), the UI interface of the gallery, the layer corresponding to the HDR video, and the volume adjustment layer. The composite display effect is shown in FIG1 (b). In the schematic diagram shown in FIG1 (a), except for the layer corresponding to the HDR video, which is an HDR layer, all other layers are SDR layers.

假设当前电子设备在非全屏显示图片或视频时,受限于硬件的限制,所有图层对应的屏幕亮度均预先设定为150nit。若为了提高HDR视频的显示效果,在电子设备最大支持500nit的情况下,用户想将屏幕亮度提高到最大屏幕亮度500nit。此时,图1中所示SDR图层和HDR图层叠加最大屏幕亮度后,会被整体提高到500nit。这样,虽然实现了HDR视频的显示效果的提高,但是却会导致非显示HDR视频的区域,或者说显示SDR图层的区域变得很刺眼,SDR图层对应的显示效果将会给用户带来视觉上的不适、疲劳等负面影响。Assume that when the current electronic device displays pictures or videos in a non-full screen, due to hardware limitations, the screen brightness corresponding to all layers is pre-set to 150nit. In order to improve the display effect of HDR video, when the electronic device supports a maximum of 500nit, the user wants to increase the screen brightness to the maximum screen brightness of 500nit. At this time, after the SDR layer and the HDR layer shown in Figure 1 are superimposed with the maximum screen brightness, the overall 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, and the display effect corresponding to the SDR layer will bring negative effects such as visual discomfort and fatigue to the user.

因此,针对显示界面中既包括HDR图层又包括SDR图层的情况,如何调整亮度能同时满足HDR图层和SDR图层的显示效果,成为了一个亟需解决的问题。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.

有鉴于此,本申请实施例提供了一种亮度控制方法,针对既包括HDR图层又包括SDR图层的显示界面,通过对图层性质进行识别,即通过识别图层性质为HDR图层还是SDR图层,对不同性质的图层确定不同的目标策略并进行图层级亮度的调整,从而既能提高HDR图层的亮度,又能压制SDR图层的亮度,保证HDR图层的显示效果提高以及SDR图层的显示效果不会刺眼,进而使得显示界面整体的显示效果更好,更符合视觉需求。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.

本申请实施例提供的电子设备除了手机以外,还可以为平板电脑、个人计算机(personal computer,PC)、个人数字助理(personal digital assistant,PDA)、智能手表、上网本、可穿戴电子设备、增强现实技术(augmented reality,AR)设备、虚拟现实(virtualreality,VR)设备、车载设备、智能汽车、机器人、智能眼镜、智能电视等具有显示器,能实现显示功能的设备。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.

图2示出了一种适用于本申请的电子设备的硬件系统。FIG. 2 shows a hardware system of an electronic device suitable for the present application.

如图2所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户第一标识模块(subscriber identificationmodule,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。As shown in Figure 2, 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.

需要说明的是,图2所示的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图1所示的部件更多或更少的部件,或者,电子设备100可以包括图2所示的部件中某些部件的组合,或者,电子设备100可以包括图2所示的部件中某些部件的子部件。图2示的部件可以以硬件、软件、或软件和硬件的组合实现。It should be noted that the structure shown in FIG2 does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in FIG1, or the electronic device 100 may include a combination of some of the components shown in FIG2, or the electronic device 100 may include sub-components of some of the components shown in FIG2. The components shown in FIG2 may be implemented in hardware, software, or a combination of software and hardware.

处理器110可以包括一个或多个处理单元。例如,处理器110可以包括以下处理单元中的至少一个:应用处理器(application processor,AP)、调制解调处理器、图形处理器(graphics processing unit,GPU)、图像信号处理器(image signal processor,ISP)、控制器、视频编解码器、数字信号处理器(digital signal processor,DSP)、基带处理器、神经网络处理器(neural-network processing unit,NPU)。其中,不同的处理单元可以是独立的器件,也可以是集成的器件。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。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.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。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.

在一些实施例中,处理器110可以包括一个或多个接口。例如,处理器110可以包括以下接口中的至少一个:内部集成电路(inter-integrated circuit,I2C)接口、内部集成电路音频(inter-integrated circuit sound,I2S)接口、脉冲编码调制(pulse codemodulation,PCM)接口、通用异步接收传输器(universal asynchronous receiver/transmitter,UART)接口、移动产业处理器接口(mobile industry processor interface,MIPI)、通用输入输出(general-purpose input/output,GPIO)接口、SIM接口、USB接口。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.

示例性地,本申请实施例提供的处理器110可以执行以下方法:显示屏显示第三界面;接收第二操作;响应于第二操作,WMS判断显示屏的屏幕方向是否旋转;当屏幕方向旋转时,WMS发送用于指示屏幕方向旋转的第二标识给SF服务模块;SF服务模块结合第二标识,针对图层性质为SDR图层的第一截图不进行压暗处理。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 perform darkening processing on the first screenshot whose layer property is an SDR layer.

图2所示的各模块间的连接关系只是示意性说明,并不构成对电子设备100的各模块间的连接关系的限定。可选地,电子设备100的各模块也可以采用上述实施例中多种连接方式的组合。The connection relationship between the modules shown in Fig. 2 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.

电子设备100的无线通信功能可以通过天线1、天线2、移动通信模块150、无线通信模块160、调制解调处理器以及基带处理器等器件实现。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.

天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。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.

电子设备100可以通过GPU、显示屏194以及应用处理器实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。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.

显示屏194可以用于显示图像或视频。Display screen 194 may be used to display images or videos.

可选地,显示屏194可以用于显示图像或视频。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)、有源矩阵有机发光二极体(active-matrix organic light-emitting diode,AMOLED)、柔性发光二极管(flex light-emitting diode,FLED)、迷你发光二极管(mini light-emitting diode,Mini LED)、微型发光二极管(micro light-emitting diode,Micro LED)、微型OLED(Micro OLED)或量子点发光二极管(quantum dotlight emitting diodes,QLED)。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。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.

电子设备100可以通过ISP、摄像头193、视频编解码器、GPU、显示屏194以及应用处理器等实现拍摄功能。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.

ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过摄像头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP可以对图像的噪点、亮度和色彩进行算法优化,ISP还可以优化拍摄场景的曝光和色温等参数。在一些实施例中,ISP可以设置在摄像头193中。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.

摄像头193(也可以称为镜头)用于捕获静态图像或视频。可以通过应用程序指令触发开启,实现拍照功能,如拍摄获取任意场景的图像。摄像头可以包括成像镜头、滤光片、图像传感器等部件。物体发出或反射的光线进入成像镜头,通过滤光片,最终汇聚在图像传感器上。成像镜头主要是用于对拍照视角中的所有物体(也可以称为待拍摄场景、目标场景,也可以理解为用户期待拍摄的场景图像)发出或反射的光汇聚成像;滤光片主要是用于将光线中的多余光波(例如除可见光外的光波,如红外)滤去;图像传感器可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。图像传感器主要是用于对接收到的光信号进行光电转换,转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。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.

示例性地,数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。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.

示例性地,视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1、MPEG2、MPEG3和MPEG4。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.

示例性地,陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x轴、y轴和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。例如,当快门被按下时,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航和体感游戏等场景。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 scenarios such as navigation and somatosensory games.

示例性地,加速度传感器180E可检测电子设备100在各个方向上(一般为x轴、y轴和z轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。加速度传感器180E还可以用于识别电子设备100的姿态,作为横竖屏切换和计步器等应用程序的输入参数。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.

示例性地,距离传感器180F用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,例如在拍摄场景中,电子设备100可以利用距离传感器180F测距以实现快速对焦。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.

示例性地,环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。Exemplarily, the ambient light sensor 180L is used to sense the ambient light brightness. 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 touch.

示例性地,指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现解锁、访问应用锁、拍照和接听来电等功能。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.

示例性地,触摸传感器180K,也称为触控器件。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,触摸屏也称为触控屏。触摸传感器180K用于检测作用于其上或其附近的触摸操作。触摸传感器180K可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,并且与显示屏194设置于不同的位置。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.

上文详细描述了电子设备100的硬件系统,在上述硬件之上,运行有操作系统,操作系统层的操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。在操作系统上可以安装运行应用程序。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.

图3是本申请实施例提供的一种电子设备的软件系统图。FIG3 is a software system diagram of an electronic device provided in an embodiment of the present application.

分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层(applications),应用程序框架层(application framework),安卓运行时(AndroidRuntime)和系统库,以及内核层(kernel)。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).

其中,应用程序层可以包括一系列应用程序包。例如,应用程序层可以包括桌面APP、系统用户界面(systemUI)、游戏APP、图库APP,相机APP,浏览器APP等应用程序(应用程序可以简称为应用),本申请实施例对此不做任何限制。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.

应用程序层中的应用可以分为系统应用和非系统应用,其中,系统应用具体可以包括桌面启动器(launcher)、系统用户界面(systemUI)、图库APP、相机APP和浏览器APP等,非系统应用可以包括游戏APP等。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.

这些APP一般是用java语言编写的,每个APP包括一个或多个类(class)文件。每个APP可以以进程的形式在应用程序中运行各自的类文件。用户在APP中操作时,APP可通过调用应用程序框架中的相关API或服务(service),与系统库或内核层进行交互,实现与该操作相对应动能。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.

应用程序层包括的launcher用于启动应用activity。The application layer includes a launcher that is used to start the application activity.

示例性地,launcher响应于用户点击相机应用对应的图标的操作,下发启动应用activity请求至活动管理器(activity manager service,AMS)。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).

图库APP用于为用户提供图片显示功能及视频播放功能。The gallery APP is used to provide users with picture display and video playback functions.

示例性地,图库APP响应于用户点击视频播放的操作,调用编解码器对视频进行解码,并下发启动视频播放activity的请求至activity管理器。Exemplarily, in response to a user clicking on a video to play, the gallery APP calls a codec to decode the video, and sends a request to start a video playback activity to the activity manager.

应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图3所示,应用程序框架层可以包括活动管理器,窗口管理器(window managerservice,WMS),视图系统(view system service,VSS)等,本申请实施例对此不做任何限制。The application framework layer provides an application programming interface (API) and a programming framework for the application programs of the application layer. The application framework layer includes some predefined functions. As shown in FIG3 , 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.

活动管理器用于管理各个应用程序的生命周期以及导航回退功能,负责Android的主线程创建,各个应用程序的生命周期的维护。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.

窗口管理器用于管理窗口程序,窗口管理器可以获取显示屏尺寸以及音量条尺寸和形状,判断是否需要调整音量条尺寸和形状等。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.

在本申请实施例中,窗口管理器例如可以截屏、分屏等。截屏指示截取屏幕上显示的内容,对应生成一帧图像;分屏指示将显示屏分割成多个显示区域,并同时显示不同的内容。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.

视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,在本申请实施例中,视图系统可用于显示非全屏的视频播放界面。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.

在本申请实施例中,应用程序框架层还可以包括亮度模块,该亮度模块用于进行亮度策略调整,例如,针对显示界面包括的HDR图层和SDR图层选择不同的亮度策略。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.

示例性地,本申请实施例会识别出不同的图层性质,判断该图层对应为HDR图层或SDR图层,然后,会压制SDR图层的亮度,只单独提高HDR图层的亮度。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.

Android Runtime包括核心库和虚拟机。Android Runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.

核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。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.

应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。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.

系统库可以包括多个功能模块。例如:SF服务模块(surface flinger service),媒体库(media libraries),三维图形处理库(例如:openGL ES),二维图形引擎(例如:SGL)等。SF服务模块用于对显示子系统进行管理,并且为多个应用程序提供了二维图层和三维图层的融合。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.

示例性地,如图3所示,SF服务模块可以包括SF、Libtonemap、Libsharder等。SF用于控制合成的系统服务进程,在本申请实施例中参与计算显示的图层、可视区域等。Libtonemap用于控制HDR tonemap算法的模块。Libsharder在GPU合成过程中负责生成Sksl语言,按照生成的sharder调用GPU进行相应的处理。Exemplarily, as shown in FIG3 , 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 layers, visible areas, 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.

示例性地,系统库还可以包括中央处理器分散处理单元(data processing unit,DPU)、Skia、Sksl。Skia指示2D渲染引擎,提供适用于各种硬件和软件平台的通用API。Sksl指示Skia 2D渲染引擎使用着色器语言,经过Skia转化成opengl,再经过编译、链接生成的program是GPU可以直接识别的语言;在本申请实施例中,可以直接把Sksl当做GPU可直接识别的程序语言。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.

内核层是硬件和软件之间的层。内核层至少包含硬件合成器(hwcomposer,HWC)驱动、图形处理器(graphics processing unit,GPU)驱动,显示(display)驱动,图形缓冲区管理器(gralloc)驱动,摄像头驱动,音频驱动,传感器驱动等。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.

GPU为一种通用的图像处理设备,用于合成。HWC为一种专用图像处理设备,在本申请实施例中,用于对GPU无法合成的图层进行合成,或者说,用于基于GPU合成的图层与其他图层进行合成。HWC还可以进行后处理。例如,后处理可以包括:视频防抖、色彩增强(colorenhancement,CE)、3D查找表,即,风格变换(3dimensional look up table,3DLUT)、超分辨重建等。Gralloc可以理解为图形内存分配器,用来分配和管理图像生产者请求的内存。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.

需要说明的是,本申请实施例虽然以Android系统为例进行说明,但是其基本原理同样适用于基于iOS或Windows等操作系统的电子设备。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.

下面以电子设备为手机为例,操作系统为上述Android系统为例,对电子设备的显示流程进行简单说明。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.

图4示出了一种显示流程的示意图。如图4所示,针对图1所示的非全屏视频播放界面,所有SDR图层对应的显示流程一般分为:绘制、渲染、合成、硬件刷新显示四个阶段;播放的HDR视频(也即HDR图层)对应的显示流程一般分为:视频文件解析、视频解码、合成、硬件刷新显示四个阶段。硬件刷新显示用于指示显示屏进行刷新显示。FIG4 shows a schematic diagram of a display process. As shown in FIG4, for the non-full-screen video playback interface shown in FIG1, 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.

两者对比可知,SDR图层和HDR图层对应的显示流程都需要经过合成阶段的处理,而合成阶段通常由图3所示的Android系统中的SF服务模块来进行实现。因此,为了对HDR图层和SDR图层都能进行调整和优化,本申请实施例提供的亮度控制方法,可以应用在合成阶段,也即应用于SF服务模块上。当本申请实施例提供的亮度控制方法应用在SF服务模块中时,可以实现对SDR图层和HDR图层进行图层级亮度控制的目的。By comparing the two, it can be seen that the display processes corresponding to the SDR layer and the HDR layer need to be processed in the synthesis stage, and the synthesis stage is usually implemented by the SF service module in the Android system shown in Figure 3. Therefore, in order to adjust and optimize both the HDR layer and the SDR layer, 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 the SDR layer and the HDR layer can be achieved.

结合图1至图4,图5示出了本申请实施例提供的一种亮度控制方法,图6是图5对应的软件系统中的处理逻辑示意图。如图5所示,该亮度控制方法10应用于上述所述的电子设备,该亮度控制方法10可以包括以下S11至S15,下面对步骤S11至S15分别进行介绍。In combination with Figures 1 to 4, Figure 5 shows a brightness control method provided by an embodiment of the present application, and Figure 6 is a schematic diagram of the processing logic in the software system corresponding to Figure 5. As shown in Figure 5, the brightness control method 10 is applied to the electronic device described above, and the brightness control method 10 may include the following S11 to S15, and steps S11 to S15 are introduced respectively below.

S11、响应于针对第一应用的第一操作,显示屏显示第一界面。S11. In response to a first operation on a first application, a display screen displays a first interface.

应理解,第一应用可以指示图库、视频等系统应用,还可以指示微信、优酷、抖音等非系统应用。第一操作可以包括点击操作、双击操作、滑动操作,还可以为语音操作等其他操作,本申请对此不进行任何限定。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.

应理解,第一界面可以包括视频播放界面和/或图片显示界面。图片可以是HDR图片或SDR图片,视频可以是HDR视频或SDR视频。其中,该第一界面在电子设备的显示屏上可以是全屏显示的,也可以是非全屏显示的,显示屏为物理上的屏幕。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.

示例性地,响应于用户针对图库APP中一个用于指示视频的视频图标的点击操作,电子设备可以显示如图1中的(b)所示的第一界面,第一界面包括非全屏的视频播放界面。此处,非全屏的视频播放界面由3个SDR界面和1个HDR界面叠加合成而成。For example, in response to a user clicking a video icon in the gallery APP for indicating a video, the electronic device may display a first interface as shown in (b) of FIG1 , wherein the first interface 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 on each other.

S12、当第一应用识别到第一界面中包括HDR图层时,发送第一指令至亮度模块。S12: When the first application recognizes that the first interface includes an HDR layer, a first instruction is sent to the brightness module.

第一指令用于指示基于第一界面包括的图层的性质选择对应的亮度策略,其中,当第一应用识别到第一界面中包括HDR图层时,第一指令可以携带指示第一界面中包括HDR图层的第一标识。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.

应理解,第一应用用于识别第一界面中是否包括HDR图层的识别方法,以及亮度策略可以是预先设定的,具体内容可以根据需要进行设置和调整,本申请实施例对此不进行任何限定。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.

S13、亮度模块接收到第一指令后,确定目标策略,并传输至SF服务模块。S13. After receiving the first instruction, the brightness module determines the target strategy and transmits it to the SF service module.

可选地,亮度模块接收到第一指令后,确定目标策略,然后,可以将目标策略通过窗口管理服务器(Window Manager Service,WMS)的setDisplayBrightness接口传输至SF服务模块。进一步地,亮度模块可以将目标策略传输至SF服务模块中的SF。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.

应理解,目标策略可以包括多个亮度控制参数。例如,目标策略可以包括针对第一界面中的HDR图层的亮度控制参数和针对第一界面中的SDR图层的亮度控制参数,或者,可以包括针对第一界面中每个图层的亮度控制参数,其中,可以包括针对第一界面中每个HDR图层的亮度控制参数和SDR图层的亮度控制参数。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 an HDR layer in the first interface and a brightness control parameter for an 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 an SDR layer.

也就是说,目标策略可以基于HDR图层和SDR图层的图层性质进行划分,针对不同的图层性质设定不同的亮度控制参数,以在后续调整时使得显示出的HDR图层和SDR图层的亮度不同。或者,目标策略还可以针对每个图层设置不同的亮度控制参数,这样若第一界面中包括有多个HDR图层和多个SDR图层,该多个HDR图层可以基于设置的不同的亮度控制参数调整成不同的亮度,该多个SDR图层也可以基于设置的不同亮度控制参数调整成不同的亮度。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.

HDR图层的亮度控制参数和SDR图层的亮度控制参数包括SDR白点亮度和当前屏幕亮度,单位是nit。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.

示例性地,假设预设的亮度策略包括第一策略和第二策略,当第一界面包括HDR图层时,需利用第一策略进行调整,第一应用可以下发第一指令至亮度模块后,第一指令可以携带用于指示第一界面包括HDR图层的标识。这样,亮度模块接收到第一指令后,可以基于第一指令确定第一界面中包括有HDR图层,然后可以确定HDR图层所对应的目标策略为第一策略。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. After the first application sends a first instruction to the brightness module, 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.

当第一界面不包括HDR图层或包括的为SDR图层时,需利用第二策略进行调整,第一应用可以下发第二指令至亮度模块,第二指令可以携带用于指示第一界面中不包括HDR图层的标识或者第二指令可以不携带用于指示第一界面包括HDR图层的标识即可。这样,第一应用下发第二指令至亮度模块后,亮度模块可以基于第二指令确定第一界面中没有包括HDR图层,然后可以确定不包括HDR图层所对应的目标策略为第二策略。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.

S14、SF服务模块基于送显图层的性质和目标策略,对送显图层的亮度进行调整。亮度调整后性质为HDR图层的送显图层的亮度大于性质为SDR图层的送显图层的亮度。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.

应理解,送显图层可以指示在第一界面之后,电子设备即将显示的下一个显示界面在合成阶段所需进行合成的图层。该用于合成的多个送显图层可以包括HDR图层和SDR图层,HDR图层和SDR图层的数量均可以包括一个或多个,本申请实施例对此不进行任何限定。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.

示例性地,如图6所示,当送显图层的性质为SDR图层时,SF可以将接收到的SDR图层对应的亮度控制参数发送给skiaGlenderEngine,再利用skiaGlenderEngine基于亮度控制参数确定SDR图层的调光率(dimming ratio);然后,在Libsharder中基于确定的调光率大小对该SDR图层进行处理,处理后的SDR图层再传输至GPU或HWC进行合成。应理解,skiaGlenderEngine负责进行GPU合成。Exemplarily, as shown in FIG6 , 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.

当送显图层的性质为HDR图层时,SF可以将接收到的HDR图层对应的亮度控制参数和预设屏幕亮度发送给Libsharder,然后,在Libsharder中可基于亮度控制参数、预设屏幕亮度、以及Libtonemap提供的色调映射参数对HDR图层进行处理,处理后的HDR图层再传输至GPU或HWC进行合成。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.

可选地,如图6所示,SF服务模块中的SF还可以通过HWC获取显示屏的最大亮度(或称为最大屏幕亮度),然后,SF服务模块基于接收到的亮度控制参数、以及接收到的最大屏幕亮度,以及Libtonemap提供的色调映射参数对HDR图层进行色调映射处理,也即对HDR图层的亮度进行调整。Optionally, as shown in Figure 6, 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.

色调映射是在有限动态范围媒介上近似显示高动态范围图像的一项计算机图形学技术。色调映射的算法中会根据性质为HDR的送显图层的色彩空间和显示屏输出的色彩空间,以及获取到的显示屏的最大屏幕亮度对性质为HDR的送显图层进行优化,以保证性质为HDR图层的内容可以更好的适应不同的显示屏,从而得到更好的显示效果。Tone mapping is a computer graphics technology that approximates the display of high dynamic range images on limited dynamic range media. 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.

当利用Libsharder对性质为SDR图层和HDR图层的送显图层进行处理之后,可以将处理后的图层发送至GPU进行合成,然后,GPU对应的图层合成结果无需进行其他处理时,可以经HWC传输后发送给显示屏进行显示;或者,GPU对应的图层合成结果还可以传输至SF服务模块包括的Frame buffer中进行暂存,后续HWC可以从Frame buffer中调用暂存的图层合成结果与其他图层进一步进行合成,再将最终合成的结果发送给显示屏进行显示。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.

可选地,如图6所示,在对HDR图层的送显图层进行色调映射之前,AGP services还可以读取上一帧HWC调用3D LUT生成显示结果时所对应的参数,并将其通过Libtonemap也发送给Libsharder,以在下一帧针对送显图层进行色调映射处理时将该参数结合起来处理。Optionally, as shown in FIG6 , 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 the HWC calls the 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.

应理解,在色调映射时结合HWC调用3D LUT生成的显示界面所对应的参数进行调整,可以使得调整后的送显图层,与GPU、DPU处理效果保持一致,避免显示效果跳变。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.

应理解,结合亮度控制参数、最大屏幕亮度和3D LUT提供的参数,针对性质为SDR图层或HDR图层的送显图层进行调整时,还可以基于送显图层具体的显示内容对亮度控制参数进行动态变化,以适应显示内容的显示需求。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.

调整后,送显图层性质为HDR图层的亮度大于送显图层性质为SDR图层的亮度,这样,后续在显示时,既能满足HDR图层的显示效果,提高细节的呈现和明暗的对比,也能满足SDR图层的显示需求,不会太突兀,避免用户在观看时视觉上产生不适、疲劳。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.

S15、SF服务模块将调整后的送显图层发送至显示屏进行显示。S15. The SF service module sends the adjusted display layer to the display screen for display.

可选地,SF服务模块可以将调整后的送显图层发送给GPU进行合成后再传输至显示屏进行显示,或者,将调整后的送显图层发送给GPU、HWC进行合成后再传输至显示屏进行显示。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.

应理解,调整后的送显图层在显示屏进行显示时,可以称为第二界面。It should be understood that the adjusted display layer can be called the second interface when displayed on the display screen.

在本申请实施例提供的亮度控制方法中,通过识别显示的第一界面中包括有HDR图层,来触发亮度模块进行目标策略的选择并将目标策略传输给SF服务模块;然后,SF服务模块可以基于目标策略(SDR图层对应的亮度控制参数)计算SDR图层对应的调光率,然后,结合该调光率对性质为SDR图层的送显图层进行调整;SF服务模块还可以结合目标策略(HDR图层对应的亮度控制参数)、预设屏幕亮度或获取的最大屏幕亮度、Libtonemap发送的参数等,结合起来对性质为SDR图层的送显图层进行调整。调整后,性质为HDR图层的送显图层的亮度大于性质为SDR图层的送显图层的亮度。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.

这样,针对调整后的HDR图层和SDR图层进行图层合成后在显示屏显示时,既能提高HDR图层的亮度,保证HDR图层的显示效果,又能使得HDR图层的亮度比SDR图层的亮度高,从而不会使得SDR图层的显示过于突兀,影响用户观看时的视觉体验。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.

在上述基础上,由于电子设备在进行显示过程中,还会涉及截屏、分屏、旋转、录屏、投屏等多种显示场景,对此,为了提高每种场景下的显示效果,本申请针对每种场景分别提供了相应的亮度控制方法,以对每种场景对应的显示效果适应性调整和优化,解决一些诸如闪烁、图片和视频投屏或发送到对端设备后效果不对等问题,保证每种场景下的显示都能满足视觉要求。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.

下面结合图7至图11,对旋转场景和旋转场景下的亮度控制方法进行详细的介绍。The following describes in detail the rotating scene and the brightness control method in the rotating scene in conjunction with FIG. 7 to FIG. 11 .

示例性地,图7示出了一种旋转场景的示意图。以电子设备为手机为例,当手机接收到用户针对图库APP中用于指示视频的图标的触发操作时,可以显示如图7中的(a)所示的界面,该界面可以为非全屏视频播放界面201。该界面可以包括状态栏、HDR视频对应的播放界面、音量调节控件、旋转图标202等,旋转图标202用于指示对播放界面进行旋转。响应于用户针对旋转图标202的点击操作,该非全屏播放界面201可以旋转90度,旋转后显示的方式可以如图7中的(b)所示。Exemplarily, FIG7 shows a schematic diagram of a rotation scene. Taking the electronic device as 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, an interface as shown in (a) of FIG7 may be displayed, which may be a non-full-screen video playback interface 201. The interface may include a status bar, a playback interface corresponding to an HDR video, a volume adjustment control, a rotation icon 202, etc., and the rotation icon 202 is used to indicate that the playback interface is rotated. In response to a user's click operation on the rotation icon 202, the non-full-screen playback interface 201 can be rotated 90 degrees, and the display method after rotation can be shown in (b) of FIG7.

示例性地,图8示出了一种相关界面示意图。如图8中的(a)所示,在电子设备的下拉菜单的界面203中可以包括控制屏幕旋转的控件203;后续响应于用户针对该控件203的点击操作,可以使得该控件203处于被选中的状态,相应地,屏幕旋转的功能被开启。如图8中的(b)所示,电子设备的设置界面205也可以包括控制屏幕旋转的图标以及对应的开关控件206。如在设置界面205上,当用户针对开关控件206进行点击操作,可以使得该开关控件206处于开启状态,相应地,屏幕旋转的功能被开启。后续当用户旋转手机时,电子设备上显示的界面可以从竖屏模式切换成横屏模式,或者,可以从横屏模式切换成竖屏模式。Exemplarily, FIG8 shows a schematic diagram of a related interface. As shown in (a) of FIG8 , a control 203 for controlling screen rotation may be included in the interface 203 of the drop-down menu of the electronic device; subsequently, in response to a user's click operation on the control 203, the control 203 may be in a selected state, and accordingly, the function of screen rotation is turned on. As shown in (b) of FIG8 , 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 on the switch control 206, the switch control 206 may be in an on state, and accordingly, the function of screen rotation is turned on. Subsequently, when the user rotates the mobile phone, the interface displayed on the electronic device may switch from portrait mode to landscape mode, or may switch from landscape mode to portrait mode.

结合图7和图8所示的旋转场景以及开启屏幕旋转功能的相关显示界面,图9示出了一种旋转场景下的亮度控制方法,如图9所示,该方法20应用于包括显示屏的电子设备。该方法20可以包括以下S21至S28,下面分别对步骤S21至S28进行详细说明。In combination with the rotation scenes shown in FIG. 7 and FIG. 8 and the related display interface for turning on the screen rotation function, FIG. 9 shows a brightness control method in a rotation scene. As shown in FIG. 9 , the method 20 is applied to an electronic device including a display screen. The method 20 may include the following S21 to S28, and steps S21 to S28 are described in detail below.

S21、显示屏显示第三界面。S21. The display screen displays the third interface.

该第三界面用于指示视频播放界面或图片显示界面,该视频播放界面或图片显示界面可以是非全屏显示的,也可以是全屏显示的。图片可以是HDR图片或SDR图片,视频可以是HDR视频或SDR视频。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.

第三界面可以与第一界面相同,也可以不相同。若第三界面与第一界面相同,可以参考针对图1中的(b)所示的第一界面的描述,在此不再赘述。The third interface may be the same as the first interface or may be different. If the third interface is the same as the first interface, reference may be made to the description of the first interface shown in (b) of FIG1 , which will not be repeated here.

此外,第三界面可以是单任务界面或多任务界面。单任务界面可以为一个显示图片或视频的界面,如图1中的(b)所示的非全屏的视频播放界面。多任务界面可以为多个图层叠加排列或分区排列显示的界面,例如分屏后,屏幕上半部分区域显示HDR视频,下半部分区域显示微信APP中的聊天界面。In addition, the third interface may be a single-task interface or a multi-task interface. The single-task interface may be an interface for displaying pictures or videos, such as a non-full-screen video playback interface as shown in (b) of FIG1. The multi-task interface may be an interface in which multiple layers are arranged in a superimposed or partitioned manner. For example, after the screen is split, the upper half of the screen displays an HDR video, and the lower half displays a chat interface in the WeChat APP.

S22、接收用户的第二操作。S22: Receive a second operation from the user.

示例性地,第二操作可以为针对实体按键的按压操作,针对虚拟按键的点击操作,针对显示屏的指关节双击操作、滑动操作,针对显示屏上显示的图标的拖拽操作,针对显示屏物理空间上的旋转操作,或者,还可以为语音操作等,本申请实施例对此不进行任何限定。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.

需要说明的是,此处第二操作可以称为截屏操作,该截屏操作可以包括用于触发截屏、触发旋转、触发分屏的操作。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.

例如,截屏操作可以为针对显示屏上显示的旋转图标的点击操作,例如如图7中的(a)所示的对旋转图标201的点击操作。或者,截屏操作可以为针对显示屏的旋转操作,将显示屏上从横屏姿态在物理空间上旋转90度,旋转成竖屏姿态,或者,从竖屏姿态旋转90度,旋转成横屏姿态。For example, the screenshot operation may be a click operation on a rotation icon displayed on the display screen, such as a click operation on the rotation icon 201 as shown in (a) of FIG7 . Alternatively, the screenshot operation may be a rotation operation on the display screen, rotating the display screen from a horizontal screen posture by 90 degrees in physical space to a vertical screen posture, or rotating from a vertical screen posture by 90 degrees to a horizontal screen posture.

S23、响应于第二操作,目标应用配置用于指示不同场景类型的第一标识;该场景类型至少包括截屏、旋转、分屏。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.

此处,目标应用用于指示第三界面对应的应用程序。Here, the target application is used to indicate the application program corresponding to the third interface.

图10示出了一种数据结构示意图。如图10所示,目标应用可以对电子设备中包括的数据结构进行修改,在CaptrueArgs中增加一个int类型的flag,用以标记不同的场景类型,其中,flag值可以默认为0,用于指示场景类型默认为截屏场景。Figure 10 shows a schematic diagram of a data structure. As shown in Figure 10, 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.

示例性地,若WMS没有启动旋转动画模块,则不需要修改flag值,也即flag值继续被配置为0,用以指示场景类型为截屏场景。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.

响应于第二操作,若WMS启动了旋转动画模块,此时,目标应用可以继续判断屏幕有没有旋转,若有旋转,则可以确定场景类型为旋转场景,并将mScreenShotFlag对应的flag值配置为1,以表示当前场景为旋转场景。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.

若没有旋转,则可以确定场景类型为分屏场景,并将mScreenShotFlag对应的flag值为设置2,以表示当前场景为分屏场景。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.

应理解,mScreenShotFlag对应的flag值的大小,以及与场景类型的对应示意关系可以根据需要进行设置和调整,本申请实施例对此不进行任何限定。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.

应理解,本申请基于对不同场景类型配置不同的第一标识,从而使得后续SF服务模块可以基于第一标识,对场景类型进行识别并且可以针对不同的场景进行不同的亮度控制。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.

S24、WMS通过识别第一标识来识别场景类型。S24. The WMS identifies the scene type by identifying the first identifier.

WMS可以通过获取CaptrueArgs中的mScreenShotFlag对应的flag值,然后,基于该值的大小(即第一标识)可以识别出用户所触发的场景类型。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).

例如,当WMS获取到CaptrueArgs中的mScreenShotFlag对应的flag值为1时,可以确定当前场景类型为旋转场景。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.

WMS下发用于指示旋转场景的第一标识给SF服务模块。The WMS sends a first identifier for indicating a rotating scene to the SF service module.

例如,WMS可以利用安卓系统的原生通路中的第一接口来下发第一标识给SF服务模块;比如,第一接口可以指示setDisplayBrightness接口。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.

S25、响应于第二操作,SF服务模块创建虚拟屏,该虚拟屏上的界面为第四界面。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.

应理解,虚拟屏是一个模拟屏幕,比如是一个显示实例(display),虚拟屏上的界面不对用户显示。本申请之前所述的显示屏是一个物理屏幕,虚拟屏与显示屏对应,即虚拟屏与显示屏的尺寸、分辨率均相同。在本申请实施例中,第四界面和第三界面对应,区别仅在于第三界面向用户显示,第四界面不向用户显示,除此之外,第四界面和第三界面均相同。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.

应理解,SF服务模块创建的虚拟屏上的界面与显示屏上的界面相同,包括多个SDR图层和/或HDR图层。例如,当显示屏显示的第三界面由3个SDR图层和1个HDR图层叠加形成时,SF服务模块创建的虚拟屏上的界面也应由相同的3个SDR图层和1个HDR图层叠加形成。此处,为了不影响显示屏正常显示,因此,可以利用SF服务模块创建虚拟屏,并借助不对用户显示的虚拟屏上的数据来进行后续的处理。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 data on the virtual screen that is not displayed to the user can be used for subsequent processing.

还应理解,步骤S24和步骤S25在实际处理过程中,会有先后次序,通常步骤S24在前,步骤S25在后。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.

S26、当识别出的场景类型为旋转场景时,针对第四界面中的所有HDR图层根据最大屏幕亮度进行色调映射处理,对所有SDR图层进行压暗处理。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.

其中,压暗处理指的是确定SDR图层对应的调光率,再根据确定出的调光率对SDR图层进行处理。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.

可选地,利用GPU针对处理后的所有HDR图层和压暗处理后的SDR图层进行合成,得到第一截图;然后,将合成的第一截图传输到一个缓存中返回给SF。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.

例如,Android系统内置了一个截屏命令screencap,响应于触发操作应用可以下发截屏命令至SF服务模块,SF服务模块执行命令后可以对虚拟屏显示的第四界面所包括的HDR图层结合最大屏幕亮度进行处理,而对SDR图层做dimming等处理,也即对SDR图层进行压暗;这样,针对处理后的HDR图层和进行压暗处理的SDR图层可以通过GPU合成的方式,合成为一张图片,并保存到Frame Buffer中。该合成后的图片可以称为第一截图,该第一截图对应的性质为SDR图层。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.

可选地,本申请提供的方法还可以包括以下步骤S28。Optionally, the method provided in the present application may further include the following step S28.

S28、SF服务模块获取最大屏幕亮度。S28. The SF service module obtains the maximum screen brightness.

示例性地,底层会根据屏幕能力配置好屏幕参数,会额外增加最大屏幕亮度的配置项,然后,可以通过图11所示的通路,在SF启动的时候可以进行读取,并将最大屏幕亮度保存在sOEMMaxLumiance,比如屏幕可支持的最大屏幕亮度为1000nit,则可以将1000nit保存在sOEMMaxLumiance中,以便后续需要时进行调用。Exemplarily, the bottom layer will configure the screen parameters according to the screen capabilities, and will additionally add the configuration item of the maximum screen brightness. Then, through the path shown in FIG11 , it 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.

例如,如图11所示,SF可以从HWC获取最大屏幕亮度,由驱动配置;将最大屏幕亮度发送给mDisplayColorProfile;然后,通过mDisplayColorProfile的getDesiredMaxLuminance可以获取最大屏幕亮度。For example, as shown in FIG11 , SF can obtain the maximum screen brightness from HWC, which is configured by the driver; send the maximum screen brightness to mDisplayColorProfile; and then, obtain the maximum screen brightness through getDesiredMaxLuminance of mDisplayColorProfile.

当识别出的场景类型为分屏场景时,可以通过获取sOEMMaxLumiance的值来确定最大屏幕亮度,然后,结合最大屏幕亮度来对HDR图层进行色调映射处理,使得处理后的HDR图层对应区域的亮度高于SDR图层对应区域的亮度,从而可以有效发挥出屏幕的能力。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.

S27、基于处理后的HDR图层和处理后的SDR图层得到图层性质为SDR图层的第一截图,对第一截图不进行压暗处理。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.

应理解,在安卓系统原生的旋转场景的控制方法中,针对HDR图层只进行色调映射处理,不压暗,对SDR图层进行压暗处理,进一步由于得到的第一截图是一个普通的SDR图层,还会被整体压暗一次,这样,相当于对截图中的SDR图层对应的区域进行了两次压暗亮度的操作,对截图中的HDR图层对应的区域进行了一次压暗的操作,这样就会导致旋转的时候,给人眼造成视觉上的闪烁现象,不符合观看的需求。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.

因此,针对上述情况,本申请实施例提供的亮度控制方法中,针对旋转场景,为了保留原有的界面效果,对HDR图层只进行色调映射处理,不压暗,对SDR图层进行压暗处理,而后,针对得到的性质为SDR图层的第一截图,不再会进行整体的压暗,这样就相当于保留了亮度图层控制的效果,避免出现相关技术中旋转闪黑的现象。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.

可选地,在确定屏幕方向有旋转时,WMS还可以下发用于指示屏幕方向旋转的第二标识给SF服务模块。然后,SF服务模块结合第二标识,确定第一截图用于旋转场景,因此,不会对第一截图进行压暗处理。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.

示例性地,WMS可以通过增设的setExtensionLayerFlag接口下发用于指示屏幕方向旋转的第二标识给SF服务模块。换句说话,SF服务模块可以通过增设的setExtensionLayerFlag接口识别第二标识。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.

图12示出了的本申请提供的增加了setExtensionLayerFlag接口的软件系统结构图,基于此,在响应于截屏操作后,SF服务模块通过setExtensionLayerFlag接口识别第二标识。FIG12 shows a software system structure diagram provided by the present application with the setExtensionLayerFlag interface added. Based on this, after responding to the screenshot operation, the SF service module identifies the second identifier through the setExtensionLayerFlag interface.

应理解,SF服务模块通过识别第二标识,可以确定当前场景类型为旋转场景,从而基于该第二标识,可以对rotationLayer存放的图层性质为SDR图层的第一截图不进行压暗处理。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 thus based on the second identifier, the first screenshot whose layer property is an SDR layer stored in rotationLayer may not be darkened.

在上述本申请实施例提供的亮度控制方法中,首先目标应用通过识别场景类型,对不同的场景类型配置不同的第一标识,从而可以使得WMS根据第一标识确定出场景类型,进而使得SF服务模块可以对不同的场景类型选择进行不同的亮度控制。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.

针对场景类型为旋转的场景,为了避免获取截图的流程对显示屏上正常进行的显示流程进行干扰,在本申请中,响应于截屏操作,可以另外创建虚拟屏,虚拟屏上显示的第四界面与显示屏上显示的第三界面相同,这样,本申请可以针对虚拟屏上的第四界面进行处理以得到符合显示效果的截图。例如,可以针对虚拟屏上的第四界面所包括的HDR图层可以基于最大屏幕亮度进行色调映射处理,针对SDR图层做压暗处理,再将处理后的HDR图层和SDR图层合成后,得到图层性质为SDR图层的第一截图。然后,针对第一截图不再进行压暗处理。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.

应理解,安卓系统原生的对应旋转场景的亮度控制方法中,针对HDR图层只进行色调映射处理,不压暗,对SDR图层进行压暗处理,进一步由于得到的第一截图是一个普通的SDR图层,还会被整体压暗一次,这样,相当于对截图中的SDR图层对应的区域进行了两次压暗亮度的操作,对截图中的HDR图层对应的区域进行了一次压暗的操作,这样就会导致旋转的时候,给人眼造成视觉上的闪烁现象,不符合观看的需求。而本申请针对第一截图不再进行压暗,相当于保留了前面图层级亮度控制的效果,避免出现相关技术中旋转闪黑的现象。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 the 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.

下面结合图13至图16,对投屏场景、录屏场景、以及投屏和录屏场景下的亮度控制方法进行详细的介绍。The following is a detailed introduction to the screen projection scenario, screen recording scenario, and brightness control method in the screen projection and screen recording scenarios in conjunction with Figures 13 to 16.

示例性地,图13示出了一种投屏场景的示意图。投屏场景通常包括作为投送端的第一电子设备和作为接收端的第二电子设备,第一电子设备可以通过投屏技术将自身的显示内容(包括图片、视频、音频等待投送影像数据)显示在第二电子设备上。例如,当无线投屏技术为镜像投屏Miracast时,利用镜像投屏,第一电子设备(如图13中所示的手机)可以将自身的显示内容进行截屏录制,并将录制的截屏数据同步发送至第二电子设备(如图13中所示的电视200),由第二电子设备进行播放以完成投屏。Exemplarily, FIG13 shows a schematic diagram of a screen projection scenario. The screen projection scenario generally includes a first electronic device as a transmitting 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 waiting for image data to be projected) on the second electronic device through screen projection technology. For example, when the wireless screen projection technology is Miracast, using the mirror projection, the first electronic device (such as the mobile phone shown in FIG13) can take screenshots and record its own display content, and synchronously send the recorded screenshot data to the second electronic device (such as the TV 200 shown in FIG13), which is played by the second electronic device to complete the screen projection.

示例性地,图14示出了一种相关界面示意图。如图14所示,以手机为投送端的第一电子设备为例,在第一电子设备的下拉菜单的界面203中可以包括控制投屏的控制207;后续响应于用户针对该空间207的点击操作,可以使得该控件207处于被选中的状态,相应地,投屏的功能被开启。如图14中的(b)所示,第一电子设备的设置界面205也可以包括控制投屏的图标以及对应的开关控件208。如在设置界面205上,当用户针对开关控件208进行点击操作时,可以使得该开关控件208处于开启状态,相应地,投屏功能被开启。后续当用户选择出接收端的第二电子设备后,可以将第一电子设备上的待投屏影像数据投送到接收端上进行显示。Exemplarily, FIG14 shows a schematic diagram of a related interface. As shown in FIG14, taking the first electronic device with a mobile phone as the transmitting end as an example, the interface 203 of the drop-down menu of the first electronic device may include a control 207 for controlling screen projection; subsequently, in response to the user's click operation on the space 207, the control 207 can be placed in a selected state, and accordingly, the screen projection function is turned on. As shown in (b) of FIG14, 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 on the switch control 208, the switch control 208 can be placed in an on state, 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 can be projected to the receiving end for display.

示例性地,图15示出了一种相关界面示意图。如图15所示,在电子设备的下拉菜单的界面203中可以包括录制屏幕的控件209;后续响应于用户针对该控件209的点击操作,可以使得该控件209处于被选中的状态,相应地,录屏制品的功能被开启,开始对电子设备显示的界面上的内容进行录制。For example, a schematic diagram of a related interface is shown in Figure 15. As shown in Figure 15, the interface 203 of the drop-down menu of the electronic device may include a control 209 for recording the screen; in response to a user's click operation on the control 209, the control 209 may be in a selected state, and accordingly, the function of the screen recording product is turned on, and the content on the interface displayed by the electronic device is recorded.

结合图13和图14所示的投屏场景以及开启投屏功能的相关显示界面、图15所示的开启录屏功能的相关界面,图16示出了一种亮度控制方法,可以适应于投屏场景和录屏场景。Combined with the screen projection scenes shown in Figures 13 and 14 and the related display interfaces for turning on the screen projection function, and the related interfaces for turning on the screen recording function shown in Figure 15, Figure 16 shows a brightness control method that can be adapted to screen projection scenes and screen recording scenes.

如图16所示,该方法30可以包括以下S31至S35,下面分别对步骤S31至S35进行详细说明。As shown in FIG. 16 , the method 30 may include the following S31 to S35 , and steps S31 to S35 are described in detail below.

S31、显示屏显示第五界面。S31. The display screen displays the fifth interface.

S32、接收用户的第三操作。S32: Receive a third operation from the user.

第五界面与第三界面可以相同,也可以不同;第三操作与第二操作可以相同,也可以不同。当第五界面与第三界面相同,第三操作与第二操作相同时,针对S31和S32的描述,可以参考上述针对S21和S22的描述。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.

S33、响应于第三操作,目标应用配置用于指示不同场景类型的第一标识;该场景类型至少包括截屏、旋转、分屏、投屏、录屏。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.

此处,目标应用用于指示第五界面对应的应用程序。Here, the target application is used to indicate the application program corresponding to the fifth interface.

如图10所示,目标应用可以对电子设备中包括的数据结构进行修改,在CaptrueArgs中增加一个int类型的flag,用以标记不同的场景类型,其中,flag值可以默认为0,用于指示场景类型默认为截屏场景。As shown in FIG. 10 , the target application may 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 may default to 0 to indicate that the scene type defaults to the screenshot scene.

示例性地,当第三操作为投屏操作时,响应于第三操作,目标应用可以将mScreenShotFlag对应的flag值配置为5,以表示当前场景为投屏场景。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.

示例性地,当第三操作为录屏操作时,响应于第三操作,目标应用可以将mScreenShotFlag对应的flag值配置为6,以表示当前场景为录屏场景。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.

S34、WMS通过识别第一标识来识别场景类型。S34. The WMS identifies the scene type by identifying the first identifier.

S35、当识别出的场景类型为投屏或录屏时,SF服务模块关闭亮度控制方法,对所有图层不做处理。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.

可选地,SF服务模块中可以在SF和Libsharder之间还包括有称为Output的开关,当识别出场景类型为投屏或录屏时,SF服务模块可以控制Output关闭,从而实现不对图层进行任何图层级亮度调整的目的。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.

应理解,在投屏、录屏场景下,由于作为接收端的设备不一定支持HDR图片、HDR视频,为了避免经过图层级亮度控制导致送显的数据与源数据差异过大,所以,本申请实施例提供的亮度控制方法中,在SF服务模块中识别出场景类型为投屏场景或录屏场景时,将会关闭图层级亮度控制的通路,也即使说,将不会对送显的HDR图层和SDR图层进行任何亮度调整。由此,可以保证投屏或录屏的源数据在其他电子设备上也可以正常显示。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.

上文结合图1至图16,描述了本申请提供的亮度控制方法以及软件系统、硬件系统。下面将结合图17,描述本申请适用的电子设备的芯片系统。应理解,本申请实施例中的芯片系统可以执行前述本申请实施例的各种方法,即以下各种产品的具体工作过程,可以参考前述方法实施例中的对应过程。The brightness control method, software system, and hardware system provided by the present application are described above in conjunction with Figures 1 to 16. The chip system of the electronic device to which the present application is applicable will be described below in conjunction with Figure 17. It should be understood that the chip system in the embodiment of the present application can execute the various methods of the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments.

图17示出了本申请提供的一种电子设备的结构示意图。图17中的虚线表示该单元或该模块为可选的,电子设备400可用于实现上述方法实施例中描述的亮度控制方法。Fig. 17 shows a schematic diagram of the structure of an electronic device provided by the present application. The dotted lines in Fig. 17 indicate 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.

电子设备400包括一个或多个处理器401,该一个或多个处理器401可支持电子设备400实现方法实施例中的方法。处理器401可以是通用处理器或者专用处理器。例如,处理器401可以是中央处理器(central processing unit,CPU)、数字信号处理器(digitalsignal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其它可编程逻辑器件,如分立门、晶体管逻辑器件或分立硬件组件。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.

处理器401可以用于对电子设备400进行控制,执行软件程序,处理软件程序的数据。电子设备400还可以包括通信单元405,用以实现信号的输入(接收)和输出(发送)。The processor 401 may be used to control the electronic device 400, execute software programs, and process data of the software programs. The electronic device 400 may also include a communication unit 405 to implement input (reception) and output (transmission) of signals.

例如,电子设备400可以是芯片,通信单元405可以是该芯片的输入和/或输出电路,或者,通信单元405可以是该芯片的通信接口,该芯片可以作为电子设备或其它电子设备的组成部分。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.

又例如,电子设备400可以是电子设备,通信单元405可以是该电子设备的收发器,或者,通信单元405可以是该电子设备的收发电路。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.

电子设备400中可以包括一个或多个存储器402,其上存有程序404,程序404可被处理器401运行,生成指令403,使得处理器401根据指令403执行上述方法实施例中描述的亮度控制方法。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.

可选地,存储器402中还可以存储有数据。可选地,处理器401还可以读取存储器402中存储的数据,该数据可以与程序404存储在相同的存储地址,该数据也可以与程序404存储在不同的存储地址。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.

处理器401和存储器402可以单独设置,也可以集成在一起;例如,集成在电子设备的系统级芯片(system on chip,SOC)上。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.

示例性地,存储器402可以用于存储本申请实施例中提供的亮度控制方法的相关程序404,处理器401可以用于在升级时调用存储器402中存储的亮度控制方法的相关程序404,执行本申请实施例的亮度控制方法。例如: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:

显示屏显示第三界面;接收第二操作;响应于第二操作,WMS判断显示屏的屏幕方向是否旋转;当屏幕方向旋转时,WMS发送用于指示屏幕方向旋转的第二标识给SF服务模块;SF服务模块结合第二标识,针对图层性质为SDR图层的第一截图不进行压暗处理。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.

本申请还提供了一种计算机程序产品,该计算机程序产品被处理器401执行时实现本申请中任一方法实施例所述的亮度控制方法。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.

该计算机程序产品可以存储在存储器402中,例如是程序404,程序404经过预处理、编译、汇编和链接等处理过程最终被转换为能够被处理器401执行的可执行目标文件。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.

本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被计算机执行时实现本申请中任一方法实施例所述的亮度控制方法。该计算机程序可以是高级语言程序,也可以是可执行目标程序。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.

可选地,该计算机可读存储介质例如是存储器402。存储器402可以是易失性存储器或非易失性存储器,或者,存储器402可以同时包括易失性存储器和非易失性存储器。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(doubledata rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlinkDRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。Optionally, the computer-readable storage medium is, for example, a memory 402. The memory 402 may be a volatile memory or a non-volatile memory, or the memory 402 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

本领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置和设备的具体工作过程以及产生的技术效果,可以参考前述方法实施例中对应的过程和技术效果,在此不再赘述。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.

在本申请所提供的几个实施例中,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的方法实施例的一些特征可以忽略,或不执行。以上所描述的装置实施例仅仅是示意性的,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,多个单元或组件可以结合或者可以集成到另一个系统。另外,各单元之间的耦合或各个组件之间的耦合可以是直接耦合,也可以是间接耦合,上述耦合包括电的、机械的或其它形式的连接。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.

应理解,在本申请的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。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.

另外,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中的术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。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.

总之,以上所述仅为本申请技术方案的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。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 (11)

1.一种亮度控制方法,其特征在于,应用于包括显示屏、WMS和SF服务模块的电子设备,所述方法包括:1. A brightness control method, characterized in that it is applied to an electronic device including a display screen, a WMS and a SF service module, and the method comprises: 所述显示屏显示第三界面;The display screen displays a third interface; 接收针对所述显示屏的第二操作;receiving a second operation for the display screen; 响应于所述第二操作,所述WMS判断所述显示屏的屏幕方向是否旋转;In response to the second operation, the WMS determines whether the screen direction of the display screen is rotated; 当判断到所述屏幕方向旋转时,所述SF服务模块对为SDR图层的第一截图不进行压暗处理。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.根据权利要求1所述的亮度控制方法,其特征在于,当判断到所述屏幕方向旋转时,所述SF服务模块对为SDR图层的第一截图不进行压暗处理,包括:2. The brightness control method according to claim 1, wherein 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, comprising: 当判断到所述屏幕方向旋转时,所述WMS发送用于指示屏幕方向旋转的第二标识给所述SF服务模块;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; 在收到所述第二标识之后,所述SF服务模块对为SDR图层的第一截图不进行压暗处理。After receiving the second identifier, the SF service module does not perform darkening processing on the first screenshot of the SDR layer. 3.根据权利要求2所述的亮度控制方法,其特征在于,所述方法还包括: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; 基于所述第一标识,所述WMS识别到场景类型为旋转场景;Based on the first identifier, the WMS identifies that the scene type is a rotating scene; 所述WMS通过第一接口发送所述第一标识给所述SF服务模块。The WMS sends the first identifier to the SF service module through a first interface. 4.根据权利要求3所述的亮度控制方法,其特征在于,在接收到所述第二标识之后,所述SF服务模块对为SDR图层的第一截图不进行压暗处理之前,所述方法还包括: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 comprises: 响应于所述第二操作,创建虚拟屏,所述虚拟屏上显示第四界面,所述第四界面与所述第三界面相同;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; 在接收到所述第一标识之后,所述SF服务模块根据所述显示屏的最大屏幕亮度,对所述第四界面中包括的HDR图层进行色调映射处理,以及对包括的SDR图层进行压暗处理;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; 基于处理后的HDR图层和处理后的SDR图层,得到所述第一截图。Based on the processed HDR layer and the processed SDR layer, the first screenshot is obtained. 5.根据权利要求3或4所述的亮度控制方法,其特征在于,所述电子设备还包括旋转动画模块,所述响应于所述第二操作,所述WMS判断所述显示屏的屏幕方向是否旋转,包括:5. The brightness control method according to claim 3 or 4, characterized in that the electronic device further comprises a rotation animation module, wherein in response to the second operation, the WMS determines whether the screen direction of the display screen is rotated, comprising: 响应于所述第二操作,所述目标应用判断是否启动所述旋转动画模块;In response to the second operation, the target application determines whether to start the rotation animation module; 若是,所述WMS判断所述显示屏的屏幕方向是否旋转。If so, the WMS determines whether the screen direction of the display screen is rotated. 6.根据权利要求3至5中任一项所述的亮度控制方法,其特征在于,所述WMS发送用于指示屏幕方向旋转的第二标识给所述SF服务模块,包括: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, comprising: 所述WMS通过第二接口发送所述第二标识给所述SF服务模块,所述第二接口与所述第一接口不同;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; 其中,所述第一接口为所述WMS的setDisplayBrightness接口;所述第二接口为所述WMS的setExtensionLayerFlag接口。The first interface is the setDisplayBrightness interface of the WMS; the second interface is the setExtensionLayerFlag interface of the WMS. 7.根据权利要求3至6中任一项所述的亮度控制方法,其特征在于,所述电子设备还包括亮度模块,所述方法还包括:7. The brightness control method according to any one of claims 3 to 6, wherein the electronic device further comprises a brightness module, and the method further comprises: 响应于针对第一应用的第一操作,所述显示屏显示第一界面,所述第一应用包括所述目标应用;当所述第一应用为所述目标应用时,所述第一界面包括所述第三界面;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; 当所述第一应用识别到所述第一界面包括HDR图层时,发送第一指令至所述亮度模块;When the first application recognizes that the first interface includes an HDR layer, sending a first instruction to the brightness module; 所述亮度模块接收到所述第一指令后,确定目标策略,并传输所述目标策略至所述SF服务模块,所述目标策略包括HDR图层和SDR图层分别对应的亮度控制参数;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; 所述SF服务模块基于所述目标策略对送显图层进行亮度调整;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; 其中,所述送显图层包括HDR图层和/或SDR图层;当所述送显图层包括所述HDR图层和所述SDR图层时,在亮度调整后的送显图层中,为所述HDR图层的送显图层的亮度大于为所述SDR图层的送显图层的亮度。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.根据权利要求7所述的亮度控制方法,其特征在于,所述电子设备还包括硬件合成器HWC,所述方法还包括:8. The brightness control method according to claim 7, wherein the electronic device further comprises a hardware synthesizer HWC, and the method further comprises: 所述SF服务模块通过所述HWC获取所述显示屏的最大屏幕亮度;The SF service module obtains the maximum screen brightness of the display screen through the HWC; 所述SF服务模块基于所述目标策略对所述送显图层进行亮度调整,包括:The SF service module adjusts the brightness of the display layer based on the target strategy, including: 所述SF服务模块基于所述目标策略和所述最大屏幕亮度,对为HDR图层的所述送显图层进行色调映射处理。The SF service module performs tone mapping processing on the display layer which is the HDR layer based on the target strategy and the maximum screen brightness. 9.一种电子设备,其特征在于,包括处理器和存储器;9. An electronic device, comprising a processor and a memory; 所述存储器,用于存储可在所述处理器上运行的计算机程序;The memory is used to store a computer program executable on the processor; 所述处理器,用于执行如权利要求1至8中任一项所述的亮度控制方法。The processor is used to execute the brightness control method according to any one of claims 1 to 8. 10.一种芯片系统,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求1至8中任一项所述的亮度控制方法。10. A chip system, comprising: 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.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时,使所述处理器执行如权利要求1至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 executes the brightness control method according to any one of claims 1 to 8.
CN202410825410.3A 2023-02-24 2023-02-24 Brightness control method and related device Pending CN118625962A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410825410.3A CN118625962A (en) 2023-02-24 2023-02-24 Brightness control method and related device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310207668.2A CN117130509B (en) 2023-02-24 2023-02-24 Brightness control method and related equipment
CN202410825410.3A CN118625962A (en) 2023-02-24 2023-02-24 Brightness control method and related device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202310207668.2A Division CN117130509B (en) 2023-02-24 2023-02-24 Brightness control method and related equipment

Publications (1)

Publication Number Publication Date
CN118625962A true CN118625962A (en) 2024-09-10

Family

ID=88861645

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202310207668.2A Active CN117130509B (en) 2023-02-24 2023-02-24 Brightness control method and related equipment
CN202410825410.3A Pending CN118625962A (en) 2023-02-24 2023-02-24 Brightness control method and related device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202310207668.2A Active CN117130509B (en) 2023-02-24 2023-02-24 Brightness control method and related equipment

Country Status (1)

Country Link
CN (2) CN117130509B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9607364B2 (en) * 2013-11-22 2017-03-28 Dolby Laboratories Licensing Corporation Methods and systems for inverse tone mapping
US10402952B2 (en) * 2017-06-02 2019-09-03 Apple Inc. Perceptual tone mapping of SDR images for an HDR display
CN110867172B (en) * 2019-11-19 2021-02-26 苹果公司 Electronic device for dynamically controlling standard dynamic range and high dynamic range content
CN115398902A (en) * 2020-04-08 2022-11-25 高通股份有限公司 High Dynamic Range (HDR) video rotation animation
CN112767231B (en) * 2021-04-02 2021-06-22 荣耀终端有限公司 Layer synthesis method and equipment
CN114138218B (en) * 2021-11-30 2024-02-13 北京达佳互联信息技术有限公司 Content display method and content display device

Also Published As

Publication number Publication date
CN117130509A (en) 2023-11-28
CN117130509B (en) 2024-07-12

Similar Documents

Publication Publication Date Title
CN112558825B (en) Information processing method and electronic device
US20230419570A1 (en) Image Processing Method and Electronic Device
CN112269527B (en) Application interface generation method and related device
CN113805745B (en) Control method of suspension window and electronic equipment
CN112527174B (en) Information processing method and electronic equipment
WO2022105445A1 (en) Browser-based application screen projection method and related apparatus
CN112527222A (en) Information processing method and electronic equipment
US20240312109A1 (en) Interface generation method and electronic device
EP4390643A1 (en) Preview method, electronic device, and system
CN116166256A (en) Interface generation method and electronic equipment
WO2023066165A1 (en) Animation effect display method and electronic device
WO2023066177A1 (en) Animation effect display method and electronic device
CN117130509B (en) Brightness control method and related equipment
CN117130511B (en) Brightness control method and related equipment
CN117130510B (en) Brightness control method and related device
CN115361468B (en) Display optimization method, device and storage medium when screen rotates
CN115022527B (en) Method and electronic device for enabling collaborative function
WO2023035868A1 (en) Photographing method and electronic device
CN111479075B (en) Photographing terminal and image processing method thereof
CN116719587A (en) Screen display method, electronic device and computer-readable storage medium
CN116166257A (en) Interface generation method and electronic equipment
CN114302203A (en) Image display method and display device
CN116737291B (en) Desktop application processing method and electronic equipment
CN116700555B (en) Motion effect processing method and electronic equipment
CN116700655B (en) Interface display method and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Applicant after: Honor Terminal Co.,Ltd.

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Applicant before: Honor Device Co.,Ltd.

Country or region before: China