[go: up one dir, main page]

WO2021008390A1 - Image layer processing method and apparatus, electronic device, and computer-readable medium - Google Patents

Image layer processing method and apparatus, electronic device, and computer-readable medium Download PDF

Info

Publication number
WO2021008390A1
WO2021008390A1 PCT/CN2020/100199 CN2020100199W WO2021008390A1 WO 2021008390 A1 WO2021008390 A1 WO 2021008390A1 CN 2020100199 W CN2020100199 W CN 2020100199W WO 2021008390 A1 WO2021008390 A1 WO 2021008390A1
Authority
WO
WIPO (PCT)
Prior art keywords
layer
synthesized
electronic device
perform
multimedia display
Prior art date
Application number
PCT/CN2020/100199
Other languages
French (fr)
Chinese (zh)
Inventor
胡杰
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021008390A1 publication Critical patent/WO2021008390A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3212Monitoring battery levels, e.g. power saving mode being initiated when battery voltage goes below a certain level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3243Power saving in microcontroller unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining

Definitions

  • This application relates to the field of video processing technology, and more specifically, to a layer processing method, device, electronic equipment, and computer readable medium.
  • This application proposes a layer processing method, device, electronic equipment and computer readable medium to improve the above-mentioned defects.
  • an embodiment of the present application provides a layer processing method, which is applied to an electronic device, the electronic device includes a multimedia display processor, and the method includes: obtaining a layer to be synthesized; and obtaining information about the electronic device Battery power; determine whether the battery power is less than a preset threshold; if it is less than the preset threshold, call the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
  • the embodiments of the present application also provide a layer processing device, which is applied to an electronic device, the electronic device includes a multimedia display processor, and the layer processing device includes: an acquisition unit, a determination unit, a judgment unit, and Processing unit.
  • the obtaining unit is used to obtain the layer to be synthesized.
  • the determining unit is used to obtain the battery power of the electronic device.
  • the judging unit is used to judge whether the battery power is less than a preset threshold.
  • the processing unit is configured to call the multimedia display processor to perform a synthesis operation on the layer to be synthesized if it is less than a preset threshold.
  • an embodiment of the present application also provides an electronic device, including: one or more processors; a memory; a multimedia display processor; one or more application programs, wherein the one or more application programs are stored In the memory and configured to be executed by the one or more processors, the one or more programs are configured to execute the above method.
  • an embodiment of the present application also provides a computer-readable medium.
  • the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the foregoing method.
  • the layer processing method, device, electronic equipment, and computer readable medium provided in this application must also obtain the battery power of the electronic device when acquiring the layer to be synthesized. If the battery power is less than the expected If the threshold is set, the multimedia display processor is called to perform the synthesis operation on the layer to be synthesized. Since the power consumption of the multimedia display processor is lower, the layer to be synthesized is synthesized by the multimedia display processor It can reduce power consumption, make the battery more durable, and make the image synthesis method more reasonable.
  • Figure 1 shows a logical framework diagram of image processing provided by an embodiment of the present application
  • FIG. 2 shows a method flowchart of a layer processing method provided by an embodiment of the present application
  • FIG. 3 shows a schematic diagram of layers provided by an embodiment of the present application
  • FIG. 4 shows a method flowchart of a layer processing method provided by another embodiment of the present application.
  • FIG. 5 shows a method flowchart of a layer processing method provided by still another embodiment of the present application
  • FIG. 6 shows a schematic diagram of the location of a charging device provided by an embodiment of the present application.
  • Fig. 7 shows a block diagram of a layer processing apparatus provided by an embodiment of the present application.
  • FIG. 8 shows a block diagram of a layer processing apparatus provided by another embodiment of the present application.
  • FIG. 9 shows a structural block diagram of an electronic device provided by an embodiment of the present application.
  • Fig. 10 shows a storage unit for storing or carrying program code for implementing the layer processing method according to the embodiment of the present application.
  • FIG. 1 shows a logical framework diagram of image processing provided by an embodiment of the present application.
  • the application can create a window (window) through the window manager (Windows manager).
  • the window manager creates a Surface for each window to draw various elements that need to be displayed on it.
  • Each surface corresponds to a layer, namely You can draw a layer on each surface.
  • each layer is drawn on the corresponding surface, that is, the corresponding layer is drawn on each surface. Specifically, it can be performed on the canvas provided by the surface through the hardware accelerated renderer (HWUI) and/or the Skia graphics library. Layer drawing.
  • HWUI hardware accelerated renderer
  • the system then uses the layer transfer module (Surface Flinger) service to synthesize each surface, that is, synthesize each layer.
  • the SurfaceFlinger service runs in the system process and is used to manage the frame buffer (FrameBuffer) of the system.
  • SurfaceFlinger obtains all the layers, and can use the graphics processor (GPU, Graphics Processing Unit) to synthesize the layers and combine The result is saved to the frame buffer area.
  • GPU Graphics Processing Unit
  • the GPU can synthesize all or part of the layers.
  • the hardware layer mixer HWC, Hardware Composer
  • HWC can synthesize the result of SurfaceFlinger synthesized by the GPU together with other layers.
  • HWC can call the Multimedia Display Processor (MDP, Multimedia Display Processor) to synthesize the layer obtained after the GPU synthesis in the frame buffer and other uncomposited layers, and finally form the BufferQueue A Buffer, and then under the action of the display driver, the image synthesized in the Buffer is used for display.
  • MDP Multimedia Display Processor
  • the electronic device can synthesize layers through MDP, or combine layers through GPU, or combine layers through MDP and GPU.
  • the power consumption of the electronic device when compositing the layers directly determines the power usage speed of the electronic device.
  • the GPU is a general graphics processor, it can do 2D image processing, 3D image processing, special effects, etc. Therefore, GPU is generally used for image synthesis, and because the GPU power consumption is too high, it will cause the electronic device to consume too much power when playing video, especially when the power is too low, too fast power consumption will affect the normal operation of users Use electronic equipment.
  • An embodiment of the present application provides a layer processing method, which is applied to electronic equipment.
  • the method is used to solve the problem of setting the image composition reasonably when the battery power is too low. Strategies to reduce the power consumption speed.
  • the method includes: S201 to S204.
  • the layers to be synthesized are the respective layers corresponding to the images that currently need to be displayed on the screen of the electronic device.
  • the interface displayed on the current screen is the interface of a client.
  • the interface layer and content layer of the client are displayed in the interface.
  • the interface layer is the layer used to display the operation interface of the client. Specifically, it can be a layer including each UI in the client, as shown in layer L1, L2 and L3.
  • the interface layer is a static layer
  • the content layer is a dynamic layer. That is, in the current interface of the client, the image in the content layer may change, but the image in the interface layer Generally does not change.
  • the current client is a map APP
  • the map image is displayed in the area of the content layer of the client, and the data in the map image will change with the movement of the user's position, and the next frame of image displayed on the screen
  • the content layer of is different from the content layer of the previous frame, but the interface layer in the next frame of image is the same as the interface layer of the previous frame.
  • the client determines the content to be displayed, it can determine the multiple layers corresponding to the displayed content, so as to render and synthesize each layer for display.
  • the electronic device can obtain the battery power usage state, which is used to indicate the battery power of the electronic device. Therefore, the battery power of the electronic device can be obtained by acquiring the battery power usage state.
  • the battery power usage state may be a battery power percentage, for example, 50%.
  • the battery power percentage is used to represent the battery power, for example, the 50% means that the battery power is 50% of the total power.
  • S203 Determine whether the battery power is less than a preset threshold.
  • the preset threshold is used to indicate that the battery power of the electronic device is in a certain battery power use state, where the battery power use state includes a full power state, a low power state, and a normal power state. In the fully charged state, the battery power The power is greater than the first threshold. When the power is insufficient, the power of the battery is lower than the second threshold. When the power is normal, the power of the battery is greater than or equal to the second threshold and less than or equal to the first threshold.
  • the first threshold and the second threshold can be set according to actual use. For example, the first threshold is 80% and the second threshold is 20%.
  • the preset threshold is used to characterize that the battery power of the electronic device is in an insufficient state, and the preset threshold may be 20%.
  • the battery power is the remaining power of the battery, and when the remaining power of the battery is obtained, the remaining power of the battery is compared with a preset threshold, and if the remaining power of the battery is lower than the preset threshold , It is determined that the battery power usage state is an insufficient power state, and if the remaining power of the battery is greater than or equal to the preset threshold, it is determined that the battery power usage state is a full power state, that is, it is not an insufficient power state.
  • the battery power may be a preset status indicator, and when the current battery power of the battery is obtained, it is determined whether the battery power is less than a preset threshold.
  • the status is identified as a parameter value, for example, the fully-charged state, the low-charged state, and the normal-charged state are r1, r2, and r3, respectively, and the electronic device reads the parameter value, and if it reads r2, then It is determined that the battery power is less than the preset threshold, and if the read parameter value is r1 or r3, it is determined that the battery power is greater than or equal to the preset threshold.
  • S204 Invoke the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
  • MDP is a dedicated display image processing unit that can do conventional 2-dimensional image processing. Its main advantage is low power consumption, but high cost.
  • FIFO First Input First Output
  • an MDP has 8 FIFO pipelines, and up to 8 layers can be synthesized and superimposed at one time.
  • an MDP has only 4 FIFO pipelines, and up to 4 layers can be synthesized at a time.
  • GPU is a general-purpose graphics processor, which is much more powerful than MDP in graphics processing. In addition to 2D image processing, it can also do 3D image processing, special effects, etc., but the power consumption is relatively high, and it can be used at one time. Overlay multiple layers.
  • the multimedia display processor Since the power consumption of the MDP is less than the power consumption of the GPU, when the battery power is less than the preset threshold, the multimedia display processor is called to perform the synthesis operation on the layer to be synthesized, which can reduce the cost of layer synthesis.
  • the incoming power consumption further improves the battery life, thereby providing users with a user experience when the power of the electronic device is too low.
  • FIG. 4 shows a layer processing method provided by an embodiment of the present application.
  • the method is applied to electronic equipment.
  • the method is used to solve the problem of setting a reasonable image synthesis strategy when the battery power is too low, thereby reducing
  • the power consumption rate specifically, the method includes: S401 to S405.
  • S403 Determine whether the battery power is less than a preset threshold.
  • S404 Invoke the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
  • S405 Invoke the graphics processor to perform a synthesis operation on the layer to be synthesized, or perform a hybrid synthesis operation.
  • the hybrid synthesis operation is to simultaneously call the graphics processor and the multimedia display processor to perform the synthesis operation on the layer to be synthesized.
  • the system may have set a preset synthesis strategy. Specifically, the operating system of the electronic device determines the current synthesis strategy according to the number of layers. For example, if the number of FIFO channels of MDP is certain, it can be determined to use MDP or GPU or the combination of MDP and GPU according to the current number of layers. Hybrid synthesis strategy. When it is determined that the battery power is too low, the synthesis strategy needs to be switched in time.
  • the 2D image that the user finally sees is actually superimposed by multiple layers, such as wallpaper layer, status bar layer, navigation bar layer, APP layer, floating ball layer, Video layers and so on.
  • the number of these layers is different.
  • Some applications display only 4 layers in the interface, so you can choose to use MDP for composition.
  • the interface displayed by some applications has 7 layers or more, and it is impossible to complete the task by relying on only one MDP hardware to do the overlay synthesis. Therefore, when the MDP cannot complete the task, the GPU is used to jointly complete the synthesis task. This synthesis strategy is hybrid synthesis.
  • the synthesis strategy can be determined according to the size of the layer.
  • the GPU can be called to process a layer with a smaller size, and a layer with a larger size is synthesized by MDP, because if a larger layer is synthesized by the GPU, the power consumption will be higher.
  • the synthesis strategy may also be determined according to the content of the layer. If the content of the layer is dynamic content, that is, the content is easy to change, for example, video content layer, Camera preview layer, etc., you can choose to use MDP composition, and if the content of the layer is static, you can choose to use GPU composition For example, the status bar can be synthesized by GPU.
  • the static layer can be obtained by analyzing the interface layer of the client when the client is started, and the layer of the video content can be obtained through the video playback architecture.
  • the operating system is acquiring the data to be played When the time comes, the next job is to parse the audio and video data.
  • General video files are composed of two parts: video stream and audio stream. Different video formats have different audio and video packaging formats.
  • the process of synthesizing audio streams and video streams into files is called muxer, while the process of separating audio streams and video streams from media files is called demuxer.
  • muxer the process of separating audio streams and video streams from media files
  • demuxer demuxer
  • To play a video file you need to separate the audio stream and the video stream from the file stream and decode them separately.
  • the decoded video frame can be directly rendered, and the audio frame can be sent to the buffer of the audio output device for playback.
  • video rendering Synchronization must be controlled with the timestamp of audio playback.
  • video decoding can include hard decoding and soft decoding.
  • Hardware decoding is to hand over part of the video data that was originally processed by the Central Processing Unit (CPU) to the graphics processor (Graphics Processing Unit, GPU).
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the parallel computing power of GPU is much higher than that of CPU, which can greatly reduce the load on the CPU. After the CPU occupancy rate is lower, you can run some other programs at the same time.
  • processors such as i5 2320, or any quad-core processor from AMD, hardware solutions and software are selected according to requirements.
  • the decoded video data will be sent to the layer transfer module (SurfaceFlinger), and the decoded video data will be rendered and synthesized by SurfaceFlinger, and then displayed on the display .
  • SurfaceFlinger is an independent Service, it receives all Window's Surface as input, and calculates the position of each Surface in the final composite image based on ZOrder, transparency, size, position and other parameters, and then submits it to HWComposer or OpenGL to generate the final Display Buffer, and then display to a specific display device.
  • the battery power of the battery is first obtained, and if the battery power is less than a preset threshold, the multimedia display processor is called to execute the layer to be synthesized In the synthesis operation, if the battery power is greater than or equal to a preset threshold, the graphics processor is invoked or the graphics processor and the multimedia display processor are simultaneously invoked to perform the synthesis operation on the layer to be synthesized according to the above strategy.
  • the battery power usage state is an insufficient power state
  • the battery power is greater than or equal to the preset threshold
  • the battery power usage state is a full power state.
  • the multimedia display processor, the graphics processor, or the graphics processor and the multimedia display processing are called simultaneously according to the above strategy. The device performs the synthesis operation on the layer to be synthesized, and then obtains the battery power of the battery.
  • the multimedia display processor is called to perform the synthesis operation on the layer to be synthesized If the battery power usage state is insufficient, the multimedia display processor is called to perform the synthesis operation on the layer to be synthesized If the battery power usage state is a fully charged state, that is, a non-deficient state, then the graphics processor is called according to the above strategy or the graphics processor and the multimedia display processor are called at the same time for the layer to be synthesized Perform synthesis operations.
  • the system can configure a corresponding synthesis strategy for a client in advance, for example, determine the interface to be displayed by the client, and the interface corresponds to a synthesis strategy, which is the default synthesis strategy of the interface, for example, the interface
  • the default synthesis strategy is a mixed synthesis strategy of the graphics processor and the multimedia display processor.
  • the layer to be synthesized includes a first layer and a second layer, and the first layer is synthesized by the graphics processor.
  • the layers to be mixed are stored in the frame buffer.
  • the multimedia display processor mixes and synthesizes the layer to be mixed and the second layer in the frame buffer to obtain the final image to be displayed.
  • the image to be displayed is displayed.
  • the electronic device determines the synthesis strategy corresponding to the layer to be synthesized according to the preset corresponding relationship between the layer to be synthesized and the synthesis strategy, wherein the corresponding relationship may be the aforementioned
  • the compositing strategy corresponding to the client of the client can also be a pre-set compositing strategy corresponding to the layer information of the image to be displayed, where the layer information includes the size of the layer and the corresponding content static or dynamic .
  • the battery power is obtained again. If the power usage state is not the low power state, the synthesis strategy preset by the layer to be synthesized is directly used for synthesis. If the power is insufficient, the multimedia display processor is called to perform the synthesis.
  • the layer to be synthesized performs the synthesis operation.
  • FIG. 5 shows a method provided by an embodiment of the present application A layer processing method, which is applied to electronic devices. This method is used to set a reasonable image synthesis strategy when the battery power is too low, thereby reducing the power consumption speed.
  • the method includes: S501 to S506.
  • S503 Determine whether the battery power is less than a preset threshold.
  • S504 Acquire location information of the electronic device.
  • the location information of the electronic device can be obtained through a positioning module installed in the electronic device.
  • the location information is used to indicate the current location of the electronic device.
  • the location information may be latitude and longitude information of the electronic device.
  • the preset condition may be set according to user requirements, and is used to indicate that when the location information of the electronic device satisfies the preset condition, there is a high probability that the location of the electronic device cannot be charged. For example, when the location information of the electronic device meets the preset condition, there is no charging device within a certain range of the electronic device.
  • S506 Invoke the graphics processor or simultaneously invoke the graphics processor and the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
  • the specified location range is set according to the charging position of the electronic device, that is, the charging record of the electronic device is obtained in advance, and the charging record includes the charging position information when the electronic device is in the charging state, so as to count all the charging within a certain period of time Location information, so that a specified location range can be determined.
  • the designated location range includes the vicinity of the user's residential address or the vicinity of the user's company.
  • the current location information of the electronic device is within the specified range, it means that the user may be charged in the location range, and it is unnecessary to call the multimedia display processor to perform the synthesis operation on the layer to be synthesized. Waiting for the user to charge can avoid the frequent switching of threads calling the GPU and MDP of the electronic device, resulting in system stalls and excessive power consumption.
  • a first designated time period can be set. If the electronic device is not charged within the first designated time period, the multimedia display processor is used to perform a synthesis operation on the layer to be synthesized.
  • the multimedia display processor is called to execute the layer to be synthesized Synthesis operation.
  • the first designated time period may be a time period when it is determined that the location information of the electronic device is in the designated range as a starting point, and the time length is a designated length.
  • the time when it is determined that the location information of the electronic device is in the designated range is t1
  • the designated time period is 1 minute
  • the first designated time period is t1+1 minute.
  • the multimedia display processor is called to analyze the image to be synthesized.
  • the layer performs composition operations.
  • the electronic device can obtain the charging device within a preset range of the location information of the electronic device through the server of the charging device, where the preset range may be the location information of the electronic device
  • the center is within a specified distance range, for example, it can be within 500 meters.
  • the electronic device sends a query instruction to the server of the charging device, and the query instruction is used to instruct the server to return the charging devices within the preset range of the location information of the electronic device.
  • the acquired charging device corresponds to device location information, and the electronic device can display the device location information of the charging device on a map interface, as shown in FIG. 6, where the black circular dots are electronic
  • the location of the device, the location shown by the other inverted triangles is the device location information of the charging device, and the charging device in the vicinity of the electronic device can be determined through the displayed location interface of the charging device.
  • the electronic device If the electronic device is not located within the designated location range, but has a charging device within its preset range, then it is determined that the electronic device may use the charging device to charge, and the call to the multimedia display processor may not be executed temporarily.
  • the layer to be synthesized performs the synthesis operation, or it is determined whether it is necessary to call the multimedia display processor to perform the synthesis operation on the layer to be synthesized according to other strategies, and if charging equipment is not included in the preset range, Then, the multimedia display processor can be called to perform a synthesis operation on the layer to be synthesized.
  • the multimedia display processor is called to perform a synthesis operation on the layer to be synthesized ,
  • the starting point of the second specified time period is the time point at which the preset range of the position information of the electronic device includes the determination result of the charging device, then the setting of the second specified time period is the same as the setting of the first specified time period Similarly, for details, please refer to the setting of the first designated time period mentioned above.
  • the specific implementation manner of calling the multimedia display processor to perform the synthesis operation on the layer to be synthesized may also be to determine the Whether a charging device is included in the preset range of the position information of the electronic device; if the charging device is not included, the multimedia display processor is called to perform a synthesis operation on the layer to be synthesized.
  • a charging device it is determined whether the electronic device is charged within a specified time period; if it is not charged, the multimedia display processor is called to perform a synthesis operation on the layer to be synthesized.
  • the determination of the charging device can refer to the foregoing embodiment.
  • location information of the electronic device is within the specified location range and whether the electronic device’s location information includes a charging device can be freely combined to determine whether to call the multimedia display processor to The judgment basis for the layer to be synthesized to perform the synthesis operation.
  • the specific implementation manner of invoking the multimedia display processor to perform a synthesis operation on the layer to be synthesized may be to determine the location information of the electronic device Whether it is located outside the designated location range, where the historical charging position of the electronic device is located within the designated location range; if it is located outside the designated location range, it is determined whether the electronic device includes a charging device within the preset range of the location information of the electronic device If the charging device is not included, call the multimedia display processor to perform the synthesis operation on the layer to be synthesized.
  • the specific implementation manner of calling the multimedia display processor to perform the synthesis operation on the layer to be synthesized may also be to determine the Whether a charging device is included in the preset range of the location information of the electronic device; if the charging device is not included, it is determined whether the location information of the electronic device is outside the specified location range, wherein the historical charging location of the electronic device is located in the specified location Within the position range; if it is outside the designated position range, call the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
  • the location information of the electronic device is within the preset range of the location information of the electronic device.
  • the location information of the electronic device is within the preset range
  • the charger may not have a built-in positioning module and cannot determine the location of the charger.
  • the electronic device it is judged whether the electronic device is charged within the third specified time period. It can also be monitored when the battery is low. If it is detected that the battery of the electronic device is charged under the condition of low power, you can call the The graphics processor or simultaneously calls the graphics processor and the multimedia display processor to perform the synthesis operation on the layer to be synthesized, and if it has not been charged within the third specified time period, execute the subsequent acquisition
  • the location information of the electronic device if the location information of the electronic device meets a preset condition, the multimedia display processor is invoked to perform a synthesis operation on the layer to be synthesized.
  • the specific implementation of the third designated time period may refer to the aforementioned first designated time period and the second designated time period. The time starting point of the third designated time period is the moment when the determination result that the battery power is less than the preset threshold is obtained.
  • the layer processing device may include: an acquiring unit 701, a determining unit 702, a determining unit 703, and a processing unit 704.
  • the obtaining unit 701 is used to obtain the layer to be synthesized.
  • the determining unit 702 is configured to obtain the battery power of the electronic device.
  • the determining unit 703 is configured to determine whether the battery power is less than a preset threshold.
  • the processing unit 704 is configured to call the multimedia display processor to perform a synthesis operation on the layer to be synthesized if it is less than a preset threshold.
  • the layer processing apparatus may include: an acquisition unit 801, a determination unit 802, a judgment unit 803, a processing unit 804, and a composition Unit 805.
  • the obtaining unit 801 is used to obtain the layer to be synthesized.
  • the determining unit 802 is configured to obtain the battery power of the electronic device.
  • the determining unit 803 is configured to determine whether the battery power is less than a preset threshold.
  • the processing unit 804 is configured to call the multimedia display processor to perform a synthesis operation on the layer to be synthesized if it is less than a preset threshold.
  • the processing unit 804 is configured to obtain the location information of the electronic device if it is less than a preset threshold; if the location information of the electronic device satisfies a preset condition, call the multimedia display processor to compare the to-be-combined The layer performs compositing operations.
  • the processing unit 804 is further configured to determine whether the location information of the electronic device is outside the specified location range, wherein the historical charging position of the electronic device is within the specified location range; if it is outside the specified location range, then Call the multimedia display processor to perform the synthesis operation on the layer to be synthesized; if it is within a specified range, determine whether the electronic device is charged within the first specified time period; if it is not charged, call The multimedia display processor performs a synthesis operation on the layer to be synthesized.
  • the processing unit 804 is further configured to determine whether a charging device is included in the preset range of the location information of the electronic device if it is outside the designated location range; if the charging device is not included, call the multimedia display processor to perform The synthesized layer performs the synthesis operation; if the charging device is included, it is determined whether the electronic device is charged within the second specified time period; if it is not charged, the multimedia display processor is called to perform the synthesis operation on the The layer performs compositing operations.
  • the processing unit 804 is further configured to determine whether the electronic device is charged within the third specified time period if the battery power is less than the preset threshold, and if it is detected that the battery of the electronic device is charged under the condition of insufficient power, call the graphics processor Or call the graphics processor and the multimedia display processor at the same time to perform the synthesis operation on the layer to be synthesized, and if it has not been charged within the third specified time period, execute the subsequent acquisition of the electronic device Location information; if the location information of the electronic device meets a preset condition, call the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
  • the compositing unit 805 is configured to, if the battery power is greater than or equal to a preset threshold, call the graphics processor to perform a compositing operation on the layer to be composited, or perform a mixed synthesis operation, the mixed synthesis operation is to simultaneously call all The graphics processor and the multimedia display processor perform a synthesis operation on the layer to be synthesized.
  • the coupling between the modules may be electrical, mechanical or other forms of coupling.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
  • the electronic device 100 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, or an e-book.
  • the electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, a screen 140, and one or more application programs, of which one or more application programs may be stored in the memory 120 and configured To be executed by one or more processors 110, one or more programs are configured to execute the methods described in the foregoing method embodiments.
  • the processor 110 may include one or more processing cores.
  • the processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120.
  • Various functions and processing data of the electronic device 100 may use at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 110 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
  • the processor 110 may include one or a combination of a central processing unit (Central Processing Unit, CPU), a multimedia display processor 112, a graphics processing unit 111 (Graphics Processing Unit, GPU), a modem, and the like.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the CPU mainly processes the operating system, user interface and client, etc.
  • GPU is used for rendering and drawing of display content
  • the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
  • the memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 120 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions for implementing the following method embodiments, etc.
  • the storage data area can also store data (such as phone book, audio and video data, chat record data) created by the electronic device 100 during use.
  • the screen 140 is used to display information input by the user, information provided to the user, and various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, numbers, videos, and any combination thereof. In one example, a touch screen may be provided on the display panel so as to form a whole with the display panel.
  • FIG. 10 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 1000 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
  • the computer-readable storage medium 1000 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 1000 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 1000 has storage space for the program code 1010 for executing any method steps in the above-mentioned methods. These program codes can be read out from or written into one or more computer program products.
  • the program code 1010 may be compressed in an appropriate form, for example.

Landscapes

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

Abstract

An image layer processing method and apparatus, an electronic device, and a computer-readable medium, relating to the technical field of video processing. The method comprises: obtaining image layers to be synthesized; obtaining the battery power of an electronic device; determining whether the battery power is below a preset threshold; and if yes, invoking a multimedia display processor to perform a synthesis operation on the image layers to be synthesized. Because power consumption of a multimedia display processor is lower, using a multimedia display processor to synthesize image layers to be synthesized can reduce electricity consumption, thereby making the battery more durable and the image synthesis mode more reasonable.

Description

图层处理方法、装置、电子设备及计算机可读介质Layer processing method, device, electronic equipment and computer readable medium
相关申请的交叉引用Cross references to related applications
本申请要求于2019年07月17日提交中国专利局的申请号为CN201910647104.4、名称为“一种图层处理方法、装置、电子设备及计算机可读介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 17, 2019, with the application number CN201910647104.4 and titled "a layer processing method, device, electronic equipment and computer readable medium". The entire content is incorporated into this application by reference.
技术领域Technical field
本申请涉及视频处理技术领域,更具体地,涉及一种图层处理方法、装置、电子设备及计算机可读介质。This application relates to the field of video processing technology, and more specifically, to a layer processing method, device, electronic equipment, and computer readable medium.
背景技术Background technique
随着电子技术和信息技术的发展,越来越多的设备能够播放视频。设备在视频播放的过程中,需要对视频执行解码、渲染以及合成等操作,再在显示屏上显示,其中,可以使用图形处理器(Graphics Processing Unit,GPU)或者多媒体显示处理器(Multimedia Display Processor,MDP)执行图像合成的操作。但是,现有的视频播放技术中,图像合成方式不够合理。With the development of electronic technology and information technology, more and more devices can play video. In the process of video playback, the device needs to perform operations such as decoding, rendering, and compositing on the video, and then display it on the display. Among them, you can use a graphics processor (Graphics Processing Unit, GPU) or a multimedia display processor (Multimedia Display Processor). , MDP) to perform image synthesis operations. However, in the existing video playback technology, the image synthesis method is not reasonable enough.
发明内容Summary of the invention
本申请提出了一种图层处理方法、装置、电子设备及计算机可读介质,以改善上述缺陷。This application proposes a layer processing method, device, electronic equipment and computer readable medium to improve the above-mentioned defects.
第一方面,本申请实施例提供了一种图层处理方法,应用于电子设备,所述电子设备包括多媒体显示处理器,所述方法包括:获取待合成的图层;获取所述电子设备的电池电量;判断所述电池电量是否小于预设阈值;若小于预设阈值,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。In the first aspect, an embodiment of the present application provides a layer processing method, which is applied to an electronic device, the electronic device includes a multimedia display processor, and the method includes: obtaining a layer to be synthesized; and obtaining information about the electronic device Battery power; determine whether the battery power is less than a preset threshold; if it is less than the preset threshold, call the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
第二方面,本申请实施例还提供了一种图层处理装置,应用于电子设备,所述电子设备包括多媒体显示处理器,所述图层处理装置包括:获取 单元、确定单元、判断单元和处理单元。获取单元,用于获取待合成的图层。确定单元,用于获取所述电子设备的电池电量。判断单元,用于判断所述电池电量是否小于预设阈值。处理单元,用于若小于预设阈值,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。In the second aspect, the embodiments of the present application also provide a layer processing device, which is applied to an electronic device, the electronic device includes a multimedia display processor, and the layer processing device includes: an acquisition unit, a determination unit, a judgment unit, and Processing unit. The obtaining unit is used to obtain the layer to be synthesized. The determining unit is used to obtain the battery power of the electronic device. The judging unit is used to judge whether the battery power is less than a preset threshold. The processing unit is configured to call the multimedia display processor to perform a synthesis operation on the layer to be synthesized if it is less than a preset threshold.
第三方面,本申请实施例还提供了一种电子设备,包括:一个或多个处理器;存储器;多媒体显示处理器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述方法。In a third aspect, an embodiment of the present application also provides an electronic device, including: one or more processors; a memory; a multimedia display processor; one or more application programs, wherein the one or more application programs are stored In the memory and configured to be executed by the one or more processors, the one or more programs are configured to execute the above method.
第四方面,本申请实施例还提供了一种计算机可读介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述方法。In a fourth aspect, an embodiment of the present application also provides a computer-readable medium. The computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the foregoing method.
相对于现有技术,本申请提供的图层处理方法、装置、电子设备及计算机可读介质,在获取待合成的图层的时候,还要获取电子设备的电池电量,如果该电池电量小于预设阈值,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作,由于多媒体显示处理器所消耗的功耗更低,因此,通过多媒体显示处理器对待合成的图层进行合成能够减少电量的消耗,使电池更加耐用,进而使得图像合成方式更加合理。Compared with the prior art, the layer processing method, device, electronic equipment, and computer readable medium provided in this application must also obtain the battery power of the electronic device when acquiring the layer to be synthesized. If the battery power is less than the expected If the threshold is set, the multimedia display processor is called to perform the synthesis operation on the layer to be synthesized. Since the power consumption of the multimedia display processor is lower, the layer to be synthesized is synthesized by the multimedia display processor It can reduce power consumption, make the battery more durable, and make the image synthesis method more reasonable.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
图1示出了本申请实施例提供的图像处理的逻辑框架图;Figure 1 shows a logical framework diagram of image processing provided by an embodiment of the present application;
图2示出了本申请一实施例提供的图层处理方法的方法流程图;FIG. 2 shows a method flowchart of a layer processing method provided by an embodiment of the present application;
图3示出了本申请实施例提供的图层的示意图;FIG. 3 shows a schematic diagram of layers provided by an embodiment of the present application;
图4示出了本申请另一实施例提供的图层处理方法的方法流程图;FIG. 4 shows a method flowchart of a layer processing method provided by another embodiment of the present application;
图5示出了本申请再一实施例提供的图层处理方法的方法流程图FIG. 5 shows a method flowchart of a layer processing method provided by still another embodiment of the present application
图6示出了本申请实施例提供的充电设备的位置的示意图;FIG. 6 shows a schematic diagram of the location of a charging device provided by an embodiment of the present application;
图7示出了本申请一实施例提供的图层处理装置的模块框图;Fig. 7 shows a block diagram of a layer processing apparatus provided by an embodiment of the present application;
图8示出了本申请另一实施例提供的图层处理装置的模块框图;FIG. 8 shows a block diagram of a layer processing apparatus provided by another embodiment of the present application;
图9示出了本申请实施例提供的电子设备的结构框图;FIG. 9 shows a structural block diagram of an electronic device provided by an embodiment of the present application;
图10示出了本申请实施例的用于保存或者携带实现根据本申请实施例的图层处理方法的程序代码的存储单元。Fig. 10 shows a storage unit for storing or carrying program code for implementing the layer processing method according to the embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
请参阅图1,示出了本申请实施例提供的图像处理的逻辑框架图。Please refer to FIG. 1, which shows a logical framework diagram of image processing provided by an embodiment of the present application.
应用程序(application)可以通过窗口管理器(Windows manager)创建窗口(window),窗口管理器为每一个窗口创建Surface用于在上面绘制各种需要显示的元素,每个surface对应一个图层,即可以在每个surface绘制一个图层。The application (application) can create a window (window) through the window manager (Windows manager). The window manager creates a Surface for each window to draw various elements that need to be displayed on it. Each surface corresponds to a layer, namely You can draw a layer on each surface.
在显示界面(如Activity)中,可以包括多个图层,如导航栏、状态栏、程序界面等。每个图层在相应的surface进行绘制,即在每个surface进行对应的图层的绘制,具体可以通过硬件加速渲染器(HWUI)和/或Skia图形库等在surface提供的画布(cavas)进行图层绘制。In the display interface (such as Activity), multiple layers can be included, such as navigation bar, status bar, program interface, etc. Each layer is drawn on the corresponding surface, that is, the corresponding layer is drawn on each surface. Specifically, it can be performed on the canvas provided by the surface through the hardware accelerated renderer (HWUI) and/or the Skia graphics library. Layer drawing.
系统(System)再使用图层传递模块(Surface Flinger)服务将各个surface进行合成,即将各个图层进行合成。其中,SurfaceFlinger服务运行在系统进程中,用来统一管理系统的帧缓冲区(FrameBuffer),SurfaceFlinger获取所有的图层,可以使用图像处理器(GPU,Graphics Processing Unit)对图层进行合成,将合成的结果保存到帧缓存区。The system then uses the layer transfer module (Surface Flinger) service to synthesize each surface, that is, synthesize each layer. Among them, the SurfaceFlinger service runs in the system process and is used to manage the frame buffer (FrameBuffer) of the system. SurfaceFlinger obtains all the layers, and can use the graphics processor (GPU, Graphics Processing Unit) to synthesize the layers and combine The result is saved to the frame buffer area.
在本申请实施例中,GPU可以对所有或者部分图层进行合成。其中,当GPU对一个待显示的显示界面中的部分图层进行合成时,硬件图层混合器(HWC,Hardware composer)可以将SurfaceFlinger通过GPU合成的结果与其他图层一起合成,具体的,如图1所示,HWC可以调用多媒体显示处理器(MDP,Multimedia Display Processor),对帧缓冲区中GPU合成后获得的图层与其他尚未合成的图层进行图层的合成,最终形成BufferQueue中的一个Buffer,再在显示驱动的作用下,将Buffer中合成的图像用于显示。In this embodiment of the application, the GPU can synthesize all or part of the layers. Among them, when the GPU synthesizes part of the layers in a display interface to be displayed, the hardware layer mixer (HWC, Hardware Composer) can synthesize the result of SurfaceFlinger synthesized by the GPU together with other layers. Specifically, such as As shown in Figure 1, HWC can call the Multimedia Display Processor (MDP, Multimedia Display Processor) to synthesize the layer obtained after the GPU synthesis in the frame buffer and other uncomposited layers, and finally form the BufferQueue A Buffer, and then under the action of the display driver, the image synthesized in the Buffer is used for display.
因此,电子设备可以通过MDP对图层合成,也可以通过GPU对图层合成,还可以通过MDP与GPU混合的方式对图层合成。Therefore, the electronic device can synthesize layers through MDP, or combine layers through GPU, or combine layers through MDP and GPU.
目前在播放视频的时候,如果电子设备的电量过低,电子设备对图层合成时候所导致的功耗,直接决定了电子设备的电量使用速度,发明人在研究中发现,导致电量消耗过快的原因是,由于GPU是一个通用的图形处理器,能够做2维图像处理,还能做3维图像处理,特效等。因此,目前普遍使用GPU进行图像合成,而由于GPU功耗过高,会导致电子设备播放视频的时候电量消耗过快,尤其是在电量过低的时候,过快的耗电量会影响用户正常使用电子设备。At present, when the video is playing, if the power of the electronic device is too low, the power consumption of the electronic device when compositing the layers directly determines the power usage speed of the electronic device. The inventor found in the research that the power consumption is too fast The reason is that because the GPU is a general graphics processor, it can do 2D image processing, 3D image processing, special effects, etc. Therefore, GPU is generally used for image synthesis, and because the GPU power consumption is too high, it will cause the electronic device to consume too much power when playing video, especially when the power is too low, too fast power consumption will affect the normal operation of users Use electronic equipment.
因此,为了解决上述缺陷,请参阅图2,本申请实施例提供了一种图层处理方法,该方法应用于电子设备,该方法用于解决在电池电量过低的时候,合理设置图像合成的策略,从而降低电量消耗速度,具体地,该方法包括:S201至S204。Therefore, in order to solve the above-mentioned defects, please refer to FIG. 2. An embodiment of the present application provides a layer processing method, which is applied to electronic equipment. The method is used to solve the problem of setting the image composition reasonably when the battery power is too low. Strategies to reduce the power consumption speed. Specifically, the method includes: S201 to S204.
S201:获取待合成的图层。S201: Obtain a layer to be synthesized.
其中,所述待合成的图层为当前需要在电子设备的屏幕上显示的图像对应的各个图层,如图3所示,当前屏幕上所显示的界面为一个客户端的界面,在该客户端的界面内显示有客户端的界面图层和内容图层,其中,界面图层为用于显示客户端的操作界面的图层,具体,可以是包括客户端内各个UI的图层,如图层L1、L2和L3,通常情况下,该界面图层为静态图层,内容图层为动态图层,即在客户端的当前界面下,内容图层内的图像可能会改变,而界面图层内的图像一般不会变。例如,当期的客户端为地图APP,在该客户端的内容图层的区域显示地图图像,且地图图像内的数据会随着用户位置的移动而改变,而在屏幕上显示的下一帧图像中的内容图层与上一帧的内容图层是不同的,但是,下一帧图像中的界面图层与上一帧的界面图层相同。Wherein, the layers to be synthesized are the respective layers corresponding to the images that currently need to be displayed on the screen of the electronic device. As shown in FIG. 3, the interface displayed on the current screen is the interface of a client. The interface layer and content layer of the client are displayed in the interface. Among them, the interface layer is the layer used to display the operation interface of the client. Specifically, it can be a layer including each UI in the client, as shown in layer L1, L2 and L3. Normally, the interface layer is a static layer, and the content layer is a dynamic layer. That is, in the current interface of the client, the image in the content layer may change, but the image in the interface layer Generally does not change. For example, the current client is a map APP, and the map image is displayed in the area of the content layer of the client, and the data in the map image will change with the movement of the user's position, and the next frame of image displayed on the screen The content layer of is different from the content layer of the previous frame, but the interface layer in the next frame of image is the same as the interface layer of the previous frame.
因此,客户端在确定要显示的内容的时候,就能够确定该显示内容所对应的多个图层,以便对各个图层渲染合成之后进行显示。Therefore, when the client determines the content to be displayed, it can determine the multiple layers corresponding to the displayed content, so as to render and synthesize each layer for display.
S202:获取所述电子设备的电池电量。S202: Obtain the battery power of the electronic device.
具体地,电子设备能够获取电池电量使用状态,该电池电量使用状态用于表示电子设备的电池电量,因此,通过获取到电池电量使用状态就能够获取电子设备的电池电量。Specifically, the electronic device can obtain the battery power usage state, which is used to indicate the battery power of the electronic device. Therefore, the battery power of the electronic device can be obtained by acquiring the battery power usage state.
具体地,该电池电量使用状态可以是电池电量百分比,例如,50%。则电池电量百分比用于表示电池电量,如该50%表示电池电量为总电量的50%。Specifically, the battery power usage state may be a battery power percentage, for example, 50%. The battery power percentage is used to represent the battery power, for example, the 50% means that the battery power is 50% of the total power.
S203:判断所述电池电量是否小于预设阈值。S203: Determine whether the battery power is less than a preset threshold.
其中,预设阈值用于表征电子设备的电池电量处于某个电池电量使用状态,其中,该电池电量使用状态包括电量充足状态、电量不足状态和电量正常状态,其中,电量充足状态时,电池的电量大于第一阈值,电量不足状态时,电池的电量低于第二阈值,电量正常状态时,电池的电量大于或等于第二阈值且小于或等于第一阈值。其中,第一阈值和第二阈值可以根据实际使用而设定,例如,该第一阈值为80%,第二阈值为20%。作为一种实施方式,于本申请实施例中,预设阈值用于表征电子设备的电池电量处于电量不足状态,则预设阈值可以是20%。Among them, the preset threshold is used to indicate that the battery power of the electronic device is in a certain battery power use state, where the battery power use state includes a full power state, a low power state, and a normal power state. In the fully charged state, the battery power The power is greater than the first threshold. When the power is insufficient, the power of the battery is lower than the second threshold. When the power is normal, the power of the battery is greater than or equal to the second threshold and less than or equal to the first threshold. The first threshold and the second threshold can be set according to actual use. For example, the first threshold is 80% and the second threshold is 20%. As an implementation manner, in the embodiment of the present application, the preset threshold is used to characterize that the battery power of the electronic device is in an insufficient state, and the preset threshold may be 20%.
作为一种实施方式,该电池电量为电池的剩余电量,在获取到该电池的剩余电量的时候,将该电池的剩余电量与预设阈值比较,如果该电池的剩余电量低于该预设阈值,则判定该电池电量使用状态为电量不足状态,如果该电池的剩余电量大于或等于该预设阈值,则判定该电池电量使用状态为电量充足状态,即不为电量不足状态。As an implementation manner, the battery power is the remaining power of the battery, and when the remaining power of the battery is obtained, the remaining power of the battery is compared with a preset threshold, and if the remaining power of the battery is lower than the preset threshold , It is determined that the battery power usage state is an insufficient power state, and if the remaining power of the battery is greater than or equal to the preset threshold, it is determined that the battery power usage state is a full power state, that is, it is not an insufficient power state.
作为另一种实施方式,该电池电量可以是预设的状态标识,在获取到电池当前的电池电量时,判断该电池电量是否小于预设阈值。具体地,该状态标识为一个参数值,例如,电量充足状态、电量不足状态和电量正常状态分别为r1、r2和r3,则电子设备读取该参数值,如果读取到的是r2,则判定该电池电量小于预设阈值,如果读取到的参数值为r1或r3,则判定 该电池电量大于或等于预设阈值。As another implementation manner, the battery power may be a preset status indicator, and when the current battery power of the battery is obtained, it is determined whether the battery power is less than a preset threshold. Specifically, the status is identified as a parameter value, for example, the fully-charged state, the low-charged state, and the normal-charged state are r1, r2, and r3, respectively, and the electronic device reads the parameter value, and if it reads r2, then It is determined that the battery power is less than the preset threshold, and if the read parameter value is r1 or r3, it is determined that the battery power is greater than or equal to the preset threshold.
S204:调用所述多媒体显示处理器对所述待合成的图层执行合成操作。S204: Invoke the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
若小于预设阈值,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。其中,MDP是一个专用的显示图像处理单元,能够做常规的2维图像处理,其主要优点是功耗低,但是成本较高。MDP一次性能够叠加的图层越多,在其内部需要更多的FIFO(First Input First Output,先进先出)管道。在高通的高端平台,一个MDP有8个FIFO管道,一次性最多能够合成叠加8个图层。而在高通的中低端平台,一个MDP只有4个FIFO管道,一次性最多能够合成4个图层。If it is less than the preset threshold, call the multimedia display processor to perform a synthesis operation on the layer to be synthesized. Among them, MDP is a dedicated display image processing unit that can do conventional 2-dimensional image processing. Its main advantage is low power consumption, but high cost. The more layers that an MDP can overlay at one time, the more FIFO (First Input First Output) pipelines are needed inside it. On Qualcomm's high-end platform, an MDP has 8 FIFO pipelines, and up to 8 layers can be synthesized and superimposed at one time. In Qualcomm's low-end and mid-range platforms, an MDP has only 4 FIFO pipelines, and up to 4 layers can be synthesized at a time.
而GPU是一个通用的图形处理器,在图形处理上比MDP功能要强大很多,除了能够做2维图像处理,还能做3维图像处理,特效等,但是功耗相对较高,一次性可以叠加多个图层。GPU is a general-purpose graphics processor, which is much more powerful than MDP in graphics processing. In addition to 2D image processing, it can also do 3D image processing, special effects, etc., but the power consumption is relatively high, and it can be used at one time. Overlay multiple layers.
由于MDP的功耗要小于GPU的功耗,因此,在电池电量小于预设阈值的时候,调用所述多媒体显示处理器对所述待合成的图层执行合成操作,能够降低图层合成所带来的电量消耗,进而提高电池的续航能力,从而提供用户在电子设备的电量过低的时候的用户体验度。Since the power consumption of the MDP is less than the power consumption of the GPU, when the battery power is less than the preset threshold, the multimedia display processor is called to perform the synthesis operation on the layer to be synthesized, which can reduce the cost of layer synthesis. The incoming power consumption further improves the battery life, thereby providing users with a user experience when the power of the electronic device is too low.
请参阅图4,示出了本申请实施例提供的一种图层处理方法,该方法应用于电子设备,该方法用于解决在电池电量过低的时候,合理设置图像合成的策略,从而降低电量消耗速度,具体地,该方法包括:S401至S405。Please refer to FIG. 4, which shows a layer processing method provided by an embodiment of the present application. The method is applied to electronic equipment. The method is used to solve the problem of setting a reasonable image synthesis strategy when the battery power is too low, thereby reducing The power consumption rate, specifically, the method includes: S401 to S405.
S401:获取待合成的图层。S401: Acquire a layer to be synthesized.
S402:获取所述电子设备的电池电量。S402: Obtain the battery power of the electronic device.
S403:判断所述电池电量是否小于预设阈值。S403: Determine whether the battery power is less than a preset threshold.
S404:调用所述多媒体显示处理器对所述待合成的图层执行合成操作。S404: Invoke the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
S405:调用所述图形处理器对所述待合成的图层执行合成操作,或执行混合合成操作。S405: Invoke the graphics processor to perform a synthesis operation on the layer to be synthesized, or perform a hybrid synthesis operation.
其中,混合合成操作为同时调用所述图形处理器和所述多媒体显示处理器对所述待合成的图层执行合成操作,在图层合成之前,系统可能已经设置了预设的合成策略。具体地,电子设备的操作系统根据图层的数量确定当前的合成策略,例如,MDP的FIFO通道的数量是一定的,则可以根据当前的图层数量确定使用MDP还是GPU或者是MDP与GPU的混合合成策略。则在确定电池电量过低的时候,需要及时切换合成策略。Wherein, the hybrid synthesis operation is to simultaneously call the graphics processor and the multimedia display processor to perform the synthesis operation on the layer to be synthesized. Before the layer synthesis, the system may have set a preset synthesis strategy. Specifically, the operating system of the electronic device determines the current synthesis strategy according to the number of layers. For example, if the number of FIFO channels of MDP is certain, it can be determined to use MDP or GPU or the combination of MDP and GPU according to the current number of layers. Hybrid synthesis strategy. When it is determined that the battery power is too low, the synthesis strategy needs to be switched in time.
对于Android系统来说,用户最终看到的2维图像其实是由多个图层合成叠加出来的,比如壁纸图层,状态栏图层,导航栏图层,APP图层,悬浮球图层,视频图层等等。在不同的应用场景下,这些图层的数量是不一样的,有的应用所显示的界面只有4个图层,则可以选择使用MDP去做合成。但是有的应用所显示的界面,有7个图层,甚至更多,只靠一个MDP硬件去做叠加合成无法完成任务。所以在MDP无法完成任务的时候,用GPU来共同完成合成任务,这种合成策略为混合合成。For the Android system, the 2D image that the user finally sees is actually superimposed by multiple layers, such as wallpaper layer, status bar layer, navigation bar layer, APP layer, floating ball layer, Video layers and so on. In different application scenarios, the number of these layers is different. Some applications display only 4 layers in the interface, so you can choose to use MDP for composition. However, the interface displayed by some applications has 7 layers or more, and it is impossible to complete the task by relying on only one MDP hardware to do the overlay synthesis. Therefore, when the MDP cannot complete the task, the GPU is used to jointly complete the synthesis task. This synthesis strategy is hybrid synthesis.
作为一种实施方式,可以先去确定MDP的FIFO管道数量,如果该FIFIO管道数量比当前所需要显示的图像对应的图层的数量多的话,则可以选择将全部待合成的图层交给MDP合成,如果该FIFIO管道数量比当前所需要显示的图像对应的图层的数量少的话,则可以选择使用GPU做图层合成,也可以选择使用MDP和GPU混合的方式进行图层合成。As an implementation, you can first determine the number of MDP FIFO pipelines. If the number of FIFIO pipelines is more than the number of layers corresponding to the image that needs to be displayed currently, you can choose to hand over all the layers to be synthesized to MDP For composition, if the number of FIFIO pipelines is less than the number of layers corresponding to the image that needs to be displayed currently, you can choose to use GPU for layer composition, or you can choose to use a hybrid of MDP and GPU for layer composition.
作为另一种实施方式,可以根据图层的大小确定合成策略。具体地,可以调用GPU处理尺寸比较小的图层,而尺寸比较大的图层通过MDP合成,因为,比较大的图层如果通过GPU合成的话,功耗会比较高。As another implementation manner, the synthesis strategy can be determined according to the size of the layer. Specifically, the GPU can be called to process a layer with a smaller size, and a layer with a larger size is synthesized by MDP, because if a larger layer is synthesized by the GPU, the power consumption will be higher.
作为又一种实施方式,还可以是根据图层的内容确定合成策略。如果图层内的内容属于动态内容,即内容容易变化,例如,视频内容图层,Camera预览图层等,可以选择使用MDP合成,而如果图层的内容是静态的,则可以选择使用GPU合成,例如,状态栏可以通过GPU合成。As yet another implementation manner, the synthesis strategy may also be determined according to the content of the layer. If the content of the layer is dynamic content, that is, the content is easy to change, for example, video content layer, Camera preview layer, etc., you can choose to use MDP composition, and if the content of the layer is static, you can choose to use GPU composition For example, the status bar can be synthesized by GPU.
其中,静态图层可以是在客户端启动的时候,解析该客户端的界面图层而获取的,而视频内容的图层可以通过视频播放架构获取,具体地,操作系统在获取到待播放的数据的时候,接下来的工作就是解析音视频数据了。一般的视频文件都有视频流和音频流两部分组成,不同的视频格式音视频的封装格式肯定不一样。将音频流和视频流合成文件的过程称为muxer,反之从媒体文件中分离音频流和视频流的过程称为demuxer。播放视频文件就需要从文件流中分离出音频流和视频流,分别对其进行解码,解码后的视频帧可以直接渲染,音频帧可以送到音频输出设备的缓冲区进行播放,当然,视频渲染和音频播放的时间戳一定要控制同步。Among them, the static layer can be obtained by analyzing the interface layer of the client when the client is started, and the layer of the video content can be obtained through the video playback architecture. Specifically, the operating system is acquiring the data to be played When the time comes, the next job is to parse the audio and video data. General video files are composed of two parts: video stream and audio stream. Different video formats have different audio and video packaging formats. The process of synthesizing audio streams and video streams into files is called muxer, while the process of separating audio streams and video streams from media files is called demuxer. To play a video file, you need to separate the audio stream and the video stream from the file stream and decode them separately. The decoded video frame can be directly rendered, and the audio frame can be sent to the buffer of the audio output device for playback. Of course, video rendering Synchronization must be controlled with the timestamp of audio playback.
具体地,视频解码可以包括硬解码和软解码,硬件解码是将原来全部交由中央处理器(Central Processing Unit,CPU)来处理的视频数据的一部分交由图像处理器(Graphics Processing Unit,GPU)来做,而GPU的并行运算能力要远远高于CPU,这样可以大大的降低对CPU的负载,CPU的占用率较低了之后就可以同时运行一些其他的程序了,当然,对于较好的处理器来说,比如i5 2320,或者AMD任何一款四核心处理器来说,硬解和软件依据需求而选定。Specifically, video decoding can include hard decoding and soft decoding. Hardware decoding is to hand over part of the video data that was originally processed by the Central Processing Unit (CPU) to the graphics processor (Graphics Processing Unit, GPU). However, the parallel computing power of GPU is much higher than that of CPU, which can greatly reduce the load on the CPU. After the CPU occupancy rate is lower, you can run some other programs at the same time. Of course, for better For processors, such as i5 2320, or any quad-core processor from AMD, hardware solutions and software are selected according to requirements.
不论是硬解码还是软解码,在将视频数据解码之后,会将解码后的视频数据发送至图层传递模块(SurfaceFlinger),由SurfaceFlinger将解码后的视频数据渲染和合成之后,在显示屏上显示。其中,SurfaceFlinger是一个独立的Service,它接收所有Window的Surface作为输入,根据ZOrder、透明度、大小、位置等参数,计算出每个Surface在最终合成图像中的位置,然后交由HWComposer或OpenGL生成最终的显示Buffer,然后显示到特定的显示设备上。Whether it is hard or soft decoding, after decoding the video data, the decoded video data will be sent to the layer transfer module (SurfaceFlinger), and the decoded video data will be rendered and synthesized by SurfaceFlinger, and then displayed on the display . Among them, SurfaceFlinger is an independent Service, it receives all Window's Surface as input, and calculates the position of each Surface in the final composite image based on ZOrder, transparency, size, position and other parameters, and then submits it to HWComposer or OpenGL to generate the final Display Buffer, and then display to a specific display device.
作为一种实施方式,可以是在获取到待合成的图层之后,先获取电池的电池电量,如果电池电量小于预设阈值,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作,如果电池电量大于或等于预设阈值, 则根据上述策略调用所述图形处理器或同时调用所述图形处理器和所述多媒体显示处理器对所述待合成的图层执行合成操作。As an implementation manner, after obtaining the layer to be synthesized, the battery power of the battery is first obtained, and if the battery power is less than a preset threshold, the multimedia display processor is called to execute the layer to be synthesized In the synthesis operation, if the battery power is greater than or equal to a preset threshold, the graphics processor is invoked or the graphics processor and the multimedia display processor are simultaneously invoked to perform the synthesis operation on the layer to be synthesized according to the above strategy.
于本申请实施例中,电池电量小于预设阈值,可以判定该电池电量使用状态为电量不足状态,而电池电量大于或等于预设阈值,可以判定该电池电量使用状态为电量充足状态。作为另一种实施方式,还可以是在获取到待合成的图层的时候,先根据上述策略调用所述多媒体显示处理器、图形处理器或同时调用所述图形处理器和所述多媒体显示处理器对所述待合成的图层执行合成操作,然后再获取电池的电池电量,如果电池电量使用状态为电量不足状态,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作,如果电池电量使用状态为电量充足状态,即非电量不足状态,则根据上述策略调用所述图形处理器或同时调用所述图形处理器和所述多媒体显示处理器对所述待合成的图层执行合成操作。In the embodiment of the present application, if the battery power is less than a preset threshold, it can be determined that the battery power usage state is an insufficient power state, and if the battery power is greater than or equal to the preset threshold, it can be determined that the battery power usage state is a full power state. As another implementation manner, when the layer to be synthesized is obtained, the multimedia display processor, the graphics processor, or the graphics processor and the multimedia display processing are called simultaneously according to the above strategy. The device performs the synthesis operation on the layer to be synthesized, and then obtains the battery power of the battery. If the battery power usage state is insufficient, the multimedia display processor is called to perform the synthesis operation on the layer to be synthesized If the battery power usage state is a fully charged state, that is, a non-deficient state, then the graphics processor is called according to the above strategy or the graphics processor and the multimedia display processor are called at the same time for the layer to be synthesized Perform synthesis operations.
也就是说,系统预先可以为某个客户端配置对应的合成策略,例如,确定该客户端要显示的界面,而该界面对应有合成策略,即为该界面的默认合成策略,例如,该界面的默认合成策略为图形处理器和所述多媒体显示处理器混合合成的策略,具体地,该待合成图层包括第一图层和第二图层,第一图层通过图形处理器合成之后得到待混合图层,并且存入帧缓冲区内,然后,多媒体显示处理器将帧缓冲区内的待混合图层和第二图层混合合成得到最终待显示的图像,然后,在通过屏幕将该待显示的图像显示。In other words, the system can configure a corresponding synthesis strategy for a client in advance, for example, determine the interface to be displayed by the client, and the interface corresponds to a synthesis strategy, which is the default synthesis strategy of the interface, for example, the interface The default synthesis strategy is a mixed synthesis strategy of the graphics processor and the multimedia display processor. Specifically, the layer to be synthesized includes a first layer and a second layer, and the first layer is synthesized by the graphics processor. The layers to be mixed are stored in the frame buffer. Then, the multimedia display processor mixes and synthesizes the layer to be mixed and the second layer in the frame buffer to obtain the final image to be displayed. The image to be displayed is displayed.
则电子设备在获取到待合成的图层之后,根据预设的待合成的图层与合成策略的对应关系,确定该待合成的图层所对应的合成策略,其中,该对应关系可以是前述的客户端所对应的合成策略,也可以是,预先设定的待显示的图像的图层信息所对应的合成策略,其中,该图层信息包括图层的大小和所对应的内容静态还是动态。然后,再获取电池电量,如果电量使用状态不是电量不足状态,则直接使用待合成的图层所预设的合成策略进行合成,若为电量不足状态,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。Then, after acquiring the layer to be synthesized, the electronic device determines the synthesis strategy corresponding to the layer to be synthesized according to the preset corresponding relationship between the layer to be synthesized and the synthesis strategy, wherein the corresponding relationship may be the aforementioned The compositing strategy corresponding to the client of the client can also be a pre-set compositing strategy corresponding to the layer information of the image to be displayed, where the layer information includes the size of the layer and the corresponding content static or dynamic . Then, the battery power is obtained again. If the power usage state is not the low power state, the synthesis strategy preset by the layer to be synthesized is directly used for synthesis. If the power is insufficient, the multimedia display processor is called to perform the synthesis. The layer to be synthesized performs the synthesis operation.
另外,如果电子设备的电量不足的情况下,可以不必立刻调用多媒体显示处理器对所述待合成的图层执行合成操作,避免在切换至多媒体显示处理器对图像合成之后,电子设备立刻充电,而又切换回原来的合成策略,而导致频繁切换调用GPU和MDP的线程,而导致系统卡顿和功耗过高,具体地,请参阅图5,示出了本申请实施例提供的一种图层处理方法,该方法应用于电子设备,该方法用于解决在电池电量过低的时候,合理设置图像合成的策略,从而降低电量消耗速度,具体地,该方法包括:S501至S506。In addition, if the power of the electronic device is insufficient, there is no need to call the multimedia display processor to perform the synthesis operation on the layer to be synthesized, so as to avoid the electronic device being charged immediately after switching to the multimedia display processor to synthesize the image. And switching back to the original synthesis strategy, resulting in frequent switching of threads calling GPU and MDP, resulting in system freezes and high power consumption. Specifically, please refer to FIG. 5, which shows a method provided by an embodiment of the present application A layer processing method, which is applied to electronic devices. This method is used to set a reasonable image synthesis strategy when the battery power is too low, thereby reducing the power consumption speed. Specifically, the method includes: S501 to S506.
S501:获取待合成的图层。S501: Obtain a layer to be synthesized.
S502:获取所述电子设备的电池电量。S502: Obtain the battery power of the electronic device.
S503:判断所述电池电量是否小于预设阈值。S503: Determine whether the battery power is less than a preset threshold.
S504:获取所述电子设备的位置信息。S504: Acquire location information of the electronic device.
电子设备的位置信息可以通过安装在电子设备内的定位模块获取,具体地,该位置信息用于表示当前电子设备所处的位置。例如,该位置信息可以是电子设备的经纬度信息。The location information of the electronic device can be obtained through a positioning module installed in the electronic device. Specifically, the location information is used to indicate the current location of the electronic device. For example, the location information may be latitude and longitude information of the electronic device.
S505:若所述电子设备的位置信息满足预设条件,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。S505: If the position information of the electronic device meets a preset condition, call the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
其中,预设条件可以是根据用户需求而设定的,用于表示当电子设备的位置信息满足预设条件的时候,该电子设备所处的位置有很大的概率是无法充电的。例如,该电子设备位置信息满足预设条件的时候,该电子设备的一定范围内不存在充电设备。The preset condition may be set according to user requirements, and is used to indicate that when the location information of the electronic device satisfies the preset condition, there is a high probability that the location of the electronic device cannot be charged. For example, when the location information of the electronic device meets the preset condition, there is no charging device within a certain range of the electronic device.
S506:调用所述图形处理器或同时调用所述图形处理器和所述多媒体显示处理器对所述待合成的图层执行合成操作。S506: Invoke the graphics processor or simultaneously invoke the graphics processor and the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
作为一种实施方式,判断所述电子设备的位置信息是否位于指定位置范围外,其中,所述电子设备的历史充电位置位于所述指定位置范围内;若位于指定位置范围外,则判定电子设备的位置信息满足预设条件。其中,指定位置范围内是根据电子设备的充电位置而设定,即预先获取电子设备的充电记录,该充电记录包括电子设备处于充电状态时的充电位置信息,从而统计在一定时间内的所有充电位置信息,从而能够确定一个指定位置范围。例如,该指定位置范围包括用户的住址附近或者用户的公司附近等。As an implementation manner, it is determined whether the location information of the electronic device is outside the specified location range, wherein the historical charging location of the electronic device is within the specified location range; if it is outside the specified location range, the electronic device is determined The location information meets the preset conditions. Among them, the specified location range is set according to the charging position of the electronic device, that is, the charging record of the electronic device is obtained in advance, and the charging record includes the charging position information when the electronic device is in the charging state, so as to count all the charging within a certain period of time Location information, so that a specified location range can be determined. For example, the designated location range includes the vicinity of the user's residential address or the vicinity of the user's company.
则如果电子设备当前的位置信息在该指定范围内,则表示用户有可能会在该位置范围内充电,则可以不必执行调用所述多媒体显示处理器对所述待合成的图层执行合成操作,而等待用户充电,从而能够避免电子设备的频繁切换调用GPU和MDP的线程,而导致系统卡顿和功耗过高。If the current location information of the electronic device is within the specified range, it means that the user may be charged in the location range, and it is unnecessary to call the multimedia display processor to perform the synthesis operation on the layer to be synthesized. Waiting for the user to charge can avoid the frequent switching of threads calling the GPU and MDP of the electronic device, resulting in system stalls and excessive power consumption.
另外,在电子设备的位置信息位于指定范围内时,说明用户有可能会对电子设备充电,但是,如果用户一直不对电子设备充电,而电子设备又持续使用GPU进行图层的合成,则会导致电量消耗过快,因此,可以设定第一指定时间段,如果在该第一指定时间段内电子设备没有被充电,则使用多媒体显示处理器对所述待合成的图层执行合成操作。In addition, when the location information of the electronic device is within the specified range, it indicates that the user may charge the electronic device. However, if the user has not charged the electronic device and the electronic device continues to use the GPU for layer synthesis, it will cause The power consumption is too fast. Therefore, a first designated time period can be set. If the electronic device is not charged within the first designated time period, the multimedia display processor is used to perform a synthesis operation on the layer to be synthesized.
则具体地,若位于指定范围内,则判定在第一指定时间段内,所述电子设备是否被充电;若未被充电,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。Specifically, if it is within a specified range, it is determined whether the electronic device is charged within the first specified time period; if it is not charged, the multimedia display processor is called to execute the layer to be synthesized Synthesis operation.
其中,第一指定时间段可以是在判定电子设备的位置信息位于指定范围的时刻为起点,时间长度为指定长度的时间段。例如,判定电子设备的位置信息位于指定范围的时刻为t1,则指定时长为1分钟,则该第一指定时间段为t1+1分钟。Wherein, the first designated time period may be a time period when it is determined that the location information of the electronic device is in the designated range as a starting point, and the time length is a designated length. For example, the time when it is determined that the location information of the electronic device is in the designated range is t1, and the designated time period is 1 minute, then the first designated time period is t1+1 minute.
另外,如果电子设备在指定位置范围外,确定所述电子设备的位置信息的预设范围内是否包括充电设备;若不包括充电设备,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。In addition, if the electronic device is outside the designated location range, it is determined whether the charging device is included in the preset range of the location information of the electronic device; if the charging device is not included, the multimedia display processor is called to analyze the image to be synthesized. The layer performs composition operations.
其中,充电设备内设置有定位模块,则电子设备可以通过该充电设备 的服务器获取该电子设备的位置信息的预设范围内的充电设备,其中,该预设范围可以是该电子设备的位置信息为中心的指定距离范围内,例如,可以是500米范围内。则电子设备发送查询指令至充电设备的服务器,该查询指令用于指示服务器返回电子设备的位置信息的预设范围内的充电设备。作为一种实施方式,所获取的充电设备对应有设备位置信息,则电子设备可以在一个地图界面上显示该充电设备的设备位置信息,如图6所示,其中,黑色的圆形点为电子设备的位置,其他的倒三角锥所示的位置为充电设备的设备位置信息,通过所显示的充电设备的位置界面能够确定电子设备附近范围内的充电设备。Where a positioning module is provided in the charging device, the electronic device can obtain the charging device within a preset range of the location information of the electronic device through the server of the charging device, where the preset range may be the location information of the electronic device The center is within a specified distance range, for example, it can be within 500 meters. The electronic device sends a query instruction to the server of the charging device, and the query instruction is used to instruct the server to return the charging devices within the preset range of the location information of the electronic device. As an implementation manner, the acquired charging device corresponds to device location information, and the electronic device can display the device location information of the charging device on a map interface, as shown in FIG. 6, where the black circular dots are electronic The location of the device, the location shown by the other inverted triangles is the device location information of the charging device, and the charging device in the vicinity of the electronic device can be determined through the displayed location interface of the charging device.
而如果电子设备虽然没有位于指定位置范围内,但是,其预设范围内具有充电设备,则判定电子设备有可能会使用该充电设备充电,则可以暂时不执行调用所述多媒体显示处理器对所述待合成的图层执行合成操作,或者,根据其他的策略判断是否需要调用所述多媒体显示处理器对所述待合成的图层执行合成操作,而如果该预设范围内不包括充电设备,则可以调用所述多媒体显示处理器对所述待合成的图层执行合成操作。If the electronic device is not located within the designated location range, but has a charging device within its preset range, then it is determined that the electronic device may use the charging device to charge, and the call to the multimedia display processor may not be executed temporarily. The layer to be synthesized performs the synthesis operation, or it is determined whether it is necessary to call the multimedia display processor to perform the synthesis operation on the layer to be synthesized according to other strategies, and if charging equipment is not included in the preset range, Then, the multimedia display processor can be called to perform a synthesis operation on the layer to be synthesized.
具体地,若包括充电设备,则判定在第二指定时间段内,所述电子设备是否被充电;若未被充电,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作,其中,第二指定时间段的起点为得到电子设备的位置信息的预设范围包括充电设备的判定结果的时间点,则第二指定时间段的设定与前述第一指定时间段的设定类似,具体可以参考前述第一指定时间段的设定。Specifically, if a charging device is included, it is determined whether the electronic device is charged within the second specified time period; if it is not charged, the multimedia display processor is called to perform a synthesis operation on the layer to be synthesized , Wherein the starting point of the second specified time period is the time point at which the preset range of the position information of the electronic device includes the determination result of the charging device, then the setting of the second specified time period is the same as the setting of the first specified time period Similarly, for details, please refer to the setting of the first designated time period mentioned above.
作为另一种实施方式,若所述电子设备的位置信息满足预设条件,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作的具体实施方式还可以是,确定所述电子设备的位置信息的预设范围内是否包括充电设备;若不包括充电设备,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。另外,若包括充电设备,则判定在指定时间段内,所述电子设备是否被充电;若未被充电,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。其中对充电设备的判定可以参考前述实施方式。As another implementation manner, if the location information of the electronic device satisfies a preset condition, the specific implementation manner of calling the multimedia display processor to perform the synthesis operation on the layer to be synthesized may also be to determine the Whether a charging device is included in the preset range of the position information of the electronic device; if the charging device is not included, the multimedia display processor is called to perform a synthesis operation on the layer to be synthesized. In addition, if a charging device is included, it is determined whether the electronic device is charged within a specified time period; if it is not charged, the multimedia display processor is called to perform a synthesis operation on the layer to be synthesized. The determination of the charging device can refer to the foregoing embodiment.
需要说明的是,电子设备的位置信息是否位于指定位置范围内与电子设备的位置信息的预设范围内是否包括充电设备,可以自由组合以作为确定是否要调用所述多媒体显示处理器对所述待合成的图层执行合成操作的判断依据。It should be noted that whether the location information of the electronic device is within the specified location range and whether the electronic device’s location information includes a charging device can be freely combined to determine whether to call the multimedia display processor to The judgment basis for the layer to be synthesized to perform the synthesis operation.
具体地,若所述电子设备的位置信息满足预设条件,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作的具体实施方式可以是,判断所述电子设备的位置信息是否位于指定位置范围外,其中,所述电子设备的历史充电位置位于所述指定位置范围内;若位于指定位置范围外,则确定所述电子设备的位置信息的预设范围内是否包括充电设备;若不包 括充电设备,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。Specifically, if the location information of the electronic device meets a preset condition, the specific implementation manner of invoking the multimedia display processor to perform a synthesis operation on the layer to be synthesized may be to determine the location information of the electronic device Whether it is located outside the designated location range, where the historical charging position of the electronic device is located within the designated location range; if it is located outside the designated location range, it is determined whether the electronic device includes a charging device within the preset range of the location information of the electronic device If the charging device is not included, call the multimedia display processor to perform the synthesis operation on the layer to be synthesized.
作为另一种实施方式,若所述电子设备的位置信息满足预设条件,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作的具体实施方式还可以是,确定所述电子设备的位置信息的预设范围内是否包括充电设备;若不包括充电设备,判断所述电子设备的位置信息是否位于指定位置范围外,其中,所述电子设备的历史充电位置位于所述指定位置范围内;若位于指定位置范围外,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。由此,在电子设备的位置信息的预设范围内没有充电设备的时候,如果该电子设备位于指定位置范围内,例如,该充电设备为共享充电宝,在电子设备的位置信息的预设范围内没有共享充电宝,但是,用户在公司或者在家中,用户可以使用充电器充电,而该充电器可能并未内置定位模块而无法确定该充电器的位置。As another implementation manner, if the location information of the electronic device satisfies a preset condition, the specific implementation manner of calling the multimedia display processor to perform the synthesis operation on the layer to be synthesized may also be to determine the Whether a charging device is included in the preset range of the location information of the electronic device; if the charging device is not included, it is determined whether the location information of the electronic device is outside the specified location range, wherein the historical charging location of the electronic device is located in the specified location Within the position range; if it is outside the designated position range, call the multimedia display processor to perform a synthesis operation on the layer to be synthesized. Thus, when there is no charging device within the preset range of the location information of the electronic device, if the electronic device is located within the specified location range, for example, the charging device is a shared power bank, the location information of the electronic device is within the preset range There is no shared power bank, but if the user is in the company or at home, the user can use the charger to charge, and the charger may not have a built-in positioning module and cannot determine the location of the charger.
另外,判断电子设备在第三指定时间段内是否被充电,还可以是在判定电量不足状态的时候就开始监测,如果监测到电子设备的电池在电量不足的情况下被充电,则可以调用所述图形处理器或同时调用所述图形处理器和所述多媒体显示处理器对所述待合成的图层执行合成操作,如果在第三指定时间段内还没有被充电,则执行后续的获取所述电子设备的位置信息;若所述电子设备的位置信息满足预设条件,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。其中,第三指定时间段的具体实施方式可以参考前述的第一指定时间段和第二指定时间段,该第三指定时间段的时间起点为得到电池电量小于预设阈值的判定结果的时刻。In addition, it is judged whether the electronic device is charged within the third specified time period. It can also be monitored when the battery is low. If it is detected that the battery of the electronic device is charged under the condition of low power, you can call the The graphics processor or simultaneously calls the graphics processor and the multimedia display processor to perform the synthesis operation on the layer to be synthesized, and if it has not been charged within the third specified time period, execute the subsequent acquisition The location information of the electronic device; if the location information of the electronic device meets a preset condition, the multimedia display processor is invoked to perform a synthesis operation on the layer to be synthesized. The specific implementation of the third designated time period may refer to the aforementioned first designated time period and the second designated time period. The time starting point of the third designated time period is the moment when the determination result that the battery power is less than the preset threshold is obtained.
请参阅图7,其示出了本申请实施例提供的一种图层处理装置的结构框图,该图层处理装置可以包括:获取单元701、确定单元702、判断单元703和处理单元704。Please refer to FIG. 7, which shows a structural block diagram of a layer processing device provided by an embodiment of the present application. The layer processing device may include: an acquiring unit 701, a determining unit 702, a determining unit 703, and a processing unit 704.
获取单元701,用于获取待合成的图层。The obtaining unit 701 is used to obtain the layer to be synthesized.
确定单元702,用于获取所述电子设备的电池电量。The determining unit 702 is configured to obtain the battery power of the electronic device.
判断单元703,用于判断所述电池电量是否小于预设阈值。The determining unit 703 is configured to determine whether the battery power is less than a preset threshold.
处理单元704,用于若小于预设阈值,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。The processing unit 704 is configured to call the multimedia display processor to perform a synthesis operation on the layer to be synthesized if it is less than a preset threshold.
请参阅图8,其示出了本申请实施例提供的一种图层处理装置的结构框图,该图层处理装置可以包括:获取单元801、确定单元802、判断单元803、处理单元804、合成单元805。Please refer to FIG. 8, which shows a structural block diagram of a layer processing apparatus provided by an embodiment of the present application. The layer processing apparatus may include: an acquisition unit 801, a determination unit 802, a judgment unit 803, a processing unit 804, and a composition Unit 805.
获取单元801,用于获取待合成的图层。The obtaining unit 801 is used to obtain the layer to be synthesized.
确定单元802,用于获取所述电子设备的电池电量。The determining unit 802 is configured to obtain the battery power of the electronic device.
判断单元803,用于判断所述电池电量是否小于预设阈值。The determining unit 803 is configured to determine whether the battery power is less than a preset threshold.
处理单元804,用于若小于预设阈值,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。The processing unit 804 is configured to call the multimedia display processor to perform a synthesis operation on the layer to be synthesized if it is less than a preset threshold.
进一步地,处理单元804用于若小于预设阈值,获取所述电子设备的位置信息;若所述电子设备的位置信息满足预设条件,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。Further, the processing unit 804 is configured to obtain the location information of the electronic device if it is less than a preset threshold; if the location information of the electronic device satisfies a preset condition, call the multimedia display processor to compare the to-be-combined The layer performs compositing operations.
具体地,处理单元804还用于判断所述电子设备的位置信息是否位于指定位置范围外,其中,所述电子设备的历史充电位置位于所述指定位置范围内;若位于指定位置范围外,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作;若位于指定范围内,则判定在第一指定时间段内,所述电子设备是否被充电;若未被充电,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。Specifically, the processing unit 804 is further configured to determine whether the location information of the electronic device is outside the specified location range, wherein the historical charging position of the electronic device is within the specified location range; if it is outside the specified location range, then Call the multimedia display processor to perform the synthesis operation on the layer to be synthesized; if it is within a specified range, determine whether the electronic device is charged within the first specified time period; if it is not charged, call The multimedia display processor performs a synthesis operation on the layer to be synthesized.
处理单元804还用于若位于指定位置范围外,则确定所述电子设备的位置信息的预设范围内是否包括充电设备;若不包括充电设备,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作;若包括充电设备,则判定在第二指定时间段内,所述电子设备是否被充电;若未被充电,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。The processing unit 804 is further configured to determine whether a charging device is included in the preset range of the location information of the electronic device if it is outside the designated location range; if the charging device is not included, call the multimedia display processor to perform The synthesized layer performs the synthesis operation; if the charging device is included, it is determined whether the electronic device is charged within the second specified time period; if it is not charged, the multimedia display processor is called to perform the synthesis operation on the The layer performs compositing operations.
处理单元804还用于若电池电量小于预设阈值,判断电子设备在第三指定时间段内是否被充电,如果监测到电子设备的电池在电量不足的情况下被充电,调用所述图形处理器或同时调用所述图形处理器和所述多媒体显示处理器对所述待合成的图层执行合成操作,如果在第三指定时间段内还没有被充电,则执行后续的获取所述电子设备的位置信息;若所述电子设备的位置信息满足预设条件,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。The processing unit 804 is further configured to determine whether the electronic device is charged within the third specified time period if the battery power is less than the preset threshold, and if it is detected that the battery of the electronic device is charged under the condition of insufficient power, call the graphics processor Or call the graphics processor and the multimedia display processor at the same time to perform the synthesis operation on the layer to be synthesized, and if it has not been charged within the third specified time period, execute the subsequent acquisition of the electronic device Location information; if the location information of the electronic device meets a preset condition, call the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
合成单元805,用于若电池电量大于或等于预设阈值,则调用所述图形处理器对所述待合成的图层执行合成操作,或执行混合合成操作,所述混合合成操作为同时调用所述图形处理器和所述多媒体显示处理器对所述待合成的图层执行合成操作。The compositing unit 805 is configured to, if the battery power is greater than or equal to a preset threshold, call the graphics processor to perform a compositing operation on the layer to be composited, or perform a mixed synthesis operation, the mixed synthesis operation is to simultaneously call all The graphics processor and the multimedia display processor perform a synthesis operation on the layer to be synthesized.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the device and module described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In the several embodiments provided in this application, the coupling between the modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
请参考图9,其示出了本申请实施例提供的一种电子设备的结构框图。该电子设备100可以是智能手机、平板电脑、电子书等能够运行应用程序的电子设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120、屏幕140以及一个或多个应用程序,其中一个或多 个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 9, which shows a structural block diagram of an electronic device provided by an embodiment of the present application. The electronic device 100 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, or an e-book. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, a screen 140, and one or more application programs, of which one or more application programs may be stored in the memory 120 and configured To be executed by one or more processors 110, one or more programs are configured to execute the methods described in the foregoing method embodiments.
处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120. Various functions and processing data of the electronic device 100. Optionally, the processor 110 may use at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). A kind of hardware form to realize. The processor 110 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
具体地,处理器110可以包括中央处理器(Central Processing Unit,CPU)、多媒体显示处理器112和图形处理器111(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和客户端等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。Specifically, the processor 110 may include one or a combination of a central processing unit (Central Processing Unit, CPU), a multimedia display processor 112, a graphics processing unit 111 (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly processes the operating system, user interface and client, etc.; GPU is used for rendering and drawing of display content; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions for implementing the following method embodiments, etc. The storage data area can also store data (such as phone book, audio and video data, chat record data) created by the electronic device 100 during use.
所述屏幕140用于显示由用户输入的信息、提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、数字、视频和其任意组合来构成,在一个实例中,触摸屏可设置于所述显示面板上从而与所述显示面板构成一个整体。The screen 140 is used to display information input by the user, information provided to the user, and various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, numbers, videos, and any combination thereof. In one example, a touch screen may be provided on the display panel so as to form a whole with the display panel.
请参考图10,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质1000中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 10, which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable medium 1000 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
计算机可读存储介质1000可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质1000包括非易失性计算机可读介质(non-transitory  computer-readable storage medium)。计算机可读存储介质1000具有执行上述方法中的任何方法步骤的程序代码1010的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码1010可以例如以适当形式进行压缩。The computer-readable storage medium 1000 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 1000 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 1000 has storage space for the program code 1010 for executing any method steps in the above-mentioned methods. These program codes can be read out from or written into one or more computer program products. The program code 1010 may be compressed in an appropriate form, for example.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application, not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种图层处理方法,其特征在于,应用于电子设备,所述电子设备包括多媒体显示处理器,所述方法包括:A layer processing method, characterized in that it is applied to an electronic device, the electronic device includes a multimedia display processor, and the method includes:
    获取待合成的图层;Get the layer to be synthesized;
    获取所述电子设备的电池电量;Obtaining the battery power of the electronic device;
    判断所述电池电量是否小于预设阈值;Judging whether the battery power is less than a preset threshold;
    若小于预设阈值,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。If it is less than the preset threshold, call the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
  2. 根据权利要求1所述的方法,其特征在于,所述电子设备还包括图形处理器,所述方法还包括:The method according to claim 1, wherein the electronic device further comprises a graphics processor, and the method further comprises:
    若大于或等于预设阈值,则调用所述图形处理器对所述待合成的图层执行合成操作,或执行混合合成操作,所述混合合成操作为同时调用所述图形处理器和所述多媒体显示处理器对所述待合成的图层执行合成操作。If it is greater than or equal to the preset threshold, call the graphics processor to perform a composite operation on the layer to be composited, or perform a hybrid composite operation, where the hybrid composite operation is to simultaneously call the graphics processor and the multimedia The display processor performs a synthesis operation on the layer to be synthesized.
  3. 根据权利要求1或2所述的方法,其特征在于,所述若小于预设阈值,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作,包括:The method according to claim 1 or 2, wherein if the value is less than a preset threshold, calling the multimedia display processor to perform a synthesis operation on the layer to be synthesized, comprising:
    判断在第三指定时间段内所述电子设备是否未被充电,其中,所述第三指定时间段的时间起点为得到所述电池电量小于预设阈值的判定结果的时刻;Judging whether the electronic device has not been charged within a third specified time period, wherein the time starting point of the third specified time period is the moment when the determination result that the battery power is less than a preset threshold is obtained;
    如果在第三指定时间段内所述电子设备未被充电,则获取所述电子设备的位置信息;If the electronic device is not charged within the third specified time period, acquiring location information of the electronic device;
    若所述电子设备的位置信息满足预设条件,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。If the position information of the electronic device satisfies a preset condition, the multimedia display processor is called to perform a synthesis operation on the layer to be synthesized.
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method according to claim 3, wherein the method further comprises:
    如果在第三指定时间段内所述电子设备被充电,则调用图形处理器对所述待合成的图层执行合成操作,或执行混合合成操作,所述混合合成操作为同时调用所述图形处理器和所述多媒体显示处理器对所述待合成的图层执行合成操作。If the electronic device is charged within the third specified period of time, the graphics processor is called to perform a synthesis operation on the layer to be synthesized, or a mixed synthesis operation is performed, and the mixed synthesis operation is to simultaneously call the graphics processing The multimedia display processor and the multimedia display processor perform a synthesis operation on the layer to be synthesized.
  5. 根据权利要求1或2所述的方法,其特征在于,所述若小于预设阈值,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作,包括:The method according to claim 1 or 2, wherein if the value is less than a preset threshold, calling the multimedia display processor to perform a synthesis operation on the layer to be synthesized, comprising:
    若小于预设阈值,获取所述电子设备的位置信息;If it is less than the preset threshold, obtain the location information of the electronic device;
    若所述电子设备的位置信息满足预设条件,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。If the position information of the electronic device satisfies a preset condition, the multimedia display processor is called to perform a synthesis operation on the layer to be synthesized.
  6. 根据权利要求3-5任一所述的方法,其特征在于,所述若所述电子设备的位置信息满足预设条件,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作,包括:The method according to any one of claims 3-5, wherein if the position information of the electronic device meets a preset condition, the multimedia display processor is called to perform synthesis on the layer to be synthesized Operations, including:
    判断所述电子设备的位置信息是否位于指定位置范围外,其中,所述电子设备的历史充电位置位于所述指定位置范围内;Determining whether the location information of the electronic device is outside a designated location range, wherein the historical charging location of the electronic device is located within the designated location range;
    若位于指定位置范围外,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。If it is outside the designated position range, the multimedia display processor is called to perform a synthesis operation on the layer to be synthesized.
  7. 根据权利要求6所述的方法,其特征在于,还包括:The method according to claim 6, further comprising:
    若位于指定范围内,则判定在第一指定时间段内,所述电子设备是否被充电;If it is within the specified range, it is determined whether the electronic device is charged within the first specified time period;
    若未被充电,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。If it is not charged, call the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
  8. 根据权利要求6所述的方法,其特征在于,所述若位于指定位置范围外,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作,包括:7. The method according to claim 6, wherein the calling the multimedia display processor to perform a synthesis operation on the layer to be synthesized if it is located outside the designated position range comprises:
    若位于指定位置范围外,则确定所述电子设备的位置信息的预设范围内是否包括充电设备;If it is outside the designated location range, determining whether a charging device is included in the preset range of the location information of the electronic device;
    若不包括充电设备,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。If the charging device is not included, the multimedia display processor is called to perform the synthesis operation on the layer to be synthesized.
  9. 根据权利要求8所述的方法,其特征在于,还包括:The method according to claim 8, further comprising:
    若包括充电设备,则判定在第二指定时间段内,所述电子设备是否被充电;If charging equipment is included, it is determined whether the electronic equipment is charged within the second specified time period;
    若未被充电,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。If it is not charged, call the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
  10. 根据权利要求6所述的方法,其特征在于,所述判断所述电子设备的位置信息是否位于指定位置范围外之前,还包括:The method according to claim 6, characterized in that, before determining whether the position information of the electronic device is outside a designated position range, the method further comprises:
    获取所述电子设备的充电记录,所述充电记录包括所述电子设备处于充电状态时的充电位置信息;Acquiring a charging record of the electronic device, the charging record including charging location information when the electronic device is in a charging state;
    统计在预设时间段内的多个充电位置信息,并根据所述多个充电位置信息确定所述指定位置范围。Counting multiple pieces of charging location information within a preset time period, and determining the designated location range according to the multiple pieces of charging location information.
  11. 根据权利要求2所述的方法,其特征在于,所述若大于或等于预设阈值,则调用所述图形处理器对所述待合成的图层执行合成操作,或执行混合合成操作,包括:The method according to claim 2, wherein if the value is greater than or equal to a preset threshold, calling the graphics processor to perform a synthesis operation on the layer to be synthesized, or perform a hybrid synthesis operation, comprising:
    若大于或等于预设阈值,确定所述多媒体显示处理器的先进先出管道的数量;If it is greater than or equal to the preset threshold, determining the number of first-in first-out channels of the multimedia display processor;
    当所述先进先出管道的数量小于所述待合成的图层的数量时,执行所述混合合成操作。When the number of the first-in first-out pipeline is less than the number of the layers to be synthesized, the hybrid synthesis operation is performed.
  12. 根据权利要求11所述的方法,其特征在于,所述方法还包括:The method of claim 11, wherein the method further comprises:
    当所述先进先出管道的数量大于或者等于所述待合成的图层的数量时,调用所述多媒体显示处理器对所述待合成的图层执行合成操作。When the number of the first-in first-out pipelines is greater than or equal to the number of the layers to be synthesized, the multimedia display processor is invoked to perform a synthesis operation on the layers to be synthesized.
  13. 根据权利要求2所述的方法,其特征在于,所述若大于或等于预设 阈值,则调用所述图形处理器对所述待合成的图层执行合成操作,或执行混合合成操作,包括:The method according to claim 2, characterized in that, if the value is greater than or equal to a preset threshold, invoking the graphics processor to perform a synthesis operation on the layer to be synthesized, or perform a hybrid synthesis operation, comprises:
    若大于或等于预设阈值,获取所述待合成的图层的尺寸,并判断所述图层的尺寸是否小于尺寸阈值;If it is greater than or equal to the preset threshold, obtain the size of the layer to be synthesized, and determine whether the size of the layer is less than the size threshold;
    如果所述图层的尺寸小于尺寸阈值,则调用所述图形处理器对所述待合成的图层执行合成操作。If the size of the layer is smaller than the size threshold, the graphics processor is called to perform a synthesis operation on the layer to be synthesized.
  14. 根据权利要求13所述的方法,其特征在于,所述方法还包括:The method of claim 13, wherein the method further comprises:
    如果所述图层的尺寸大于或者等于尺寸阈值,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。If the size of the layer is greater than or equal to the size threshold, calling the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
  15. 根据权利要求2所述的方法,其特征在于,所述若大于或等于预设阈值,则调用所述图形处理器对所述待合成的图层执行合成操作,或执行混合合成操作,包括:The method according to claim 2, wherein if the value is greater than or equal to a preset threshold, calling the graphics processor to perform a synthesis operation on the layer to be synthesized, or perform a hybrid synthesis operation, comprising:
    若大于或等于预设阈值,确定所述待合成的图层是否为静态图层;If it is greater than or equal to the preset threshold, determining whether the layer to be synthesized is a static layer;
    如果所述待合成的图层是静态图层,则调用所述图形处理器对所述待合成的图层执行合成操作。If the layer to be synthesized is a static layer, the graphics processor is called to perform a synthesis operation on the layer to be synthesized.
  16. 根据权利要求15所述的方法,其特征在于,所述方法还包括:The method according to claim 15, wherein the method further comprises:
    如果所述待合成的图层不是静态图层,确定所述待合成的图层是否为动态图层;If the layer to be synthesized is not a static layer, determining whether the layer to be synthesized is a dynamic layer;
    如果所述待合成的图层是动态图层,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。If the layer to be synthesized is a dynamic layer, call the multimedia display processor to perform a synthesis operation on the layer to be synthesized.
  17. 一种图层处理装置,其特征在于,应用于电子设备,所述电子设备包括多媒体显示处理器,所述图层处理装置包括:A layer processing device, characterized in that it is applied to an electronic device, the electronic device includes a multimedia display processor, and the layer processing device includes:
    获取单元,用于获取待合成的图层;The obtaining unit is used to obtain the layer to be synthesized;
    确定单元,用于获取所述电子设备的电池电量;A determining unit for obtaining the battery power of the electronic device;
    判断单元,用于判断所述电池电量是否小于预设阈值;A judging unit for judging whether the battery power is less than a preset threshold;
    处理单元,用于若小于预设阈值,则调用所述多媒体显示处理器对所述待合成的图层执行合成操作。The processing unit is configured to call the multimedia display processor to perform a synthesis operation on the layer to be synthesized if it is less than a preset threshold.
  18. 根据权利要求17所述的装置,其特征在于,所述电子设备还包括图形处理器,所述装置还包括:The apparatus according to claim 17, wherein the electronic device further comprises a graphics processor, and the apparatus further comprises:
    合成单元,用于若大于或等于预设阈值,则调用所述图形处理器对所述待合成的图层执行合成操作,或执行混合合成操作,所述混合合成操作为同时调用所述图形处理器和所述多媒体显示处理器对所述待合成的图层执行合成操作。The compositing unit is configured to call the graphics processor to perform a compositing operation on the layer to be composited if it is greater than or equal to a preset threshold, or perform a hybrid composition operation, where the hybrid composition operation is to simultaneously call the graphics processing The multimedia display processor and the multimedia display processor perform a synthesis operation on the layer to be synthesized.
  19. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    一个或多个处理器;One or more processors;
    存储器;Memory
    多媒体显示处理器;Multimedia display processor;
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存 储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行如权利要求1-16任一项所述的方法。One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute such as The method of any one of claims 1-16.
  20. 一种计算机可读介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行所述权利要求1-16任一项所述方法。A computer readable medium, wherein the computer readable storage medium stores program code, and the program code can be called by a processor to execute the method according to any one of claims 1-16.
PCT/CN2020/100199 2019-07-17 2020-07-03 Image layer processing method and apparatus, electronic device, and computer-readable medium WO2021008390A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910647104.4 2019-07-17
CN201910647104.4A CN110362186B (en) 2019-07-17 2019-07-17 Layer processing method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
WO2021008390A1 true WO2021008390A1 (en) 2021-01-21

Family

ID=68220217

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/100199 WO2021008390A1 (en) 2019-07-17 2020-07-03 Image layer processing method and apparatus, electronic device, and computer-readable medium

Country Status (2)

Country Link
CN (1) CN110362186B (en)
WO (1) WO2021008390A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362186B (en) * 2019-07-17 2021-02-02 Oppo广东移动通信有限公司 Layer processing method and device, electronic equipment and computer readable medium
CN116075804A (en) * 2020-06-15 2023-05-05 华为技术有限公司 Image data processing device and method
CN114327312B (en) * 2020-09-25 2023-10-20 华为技术有限公司 Screen throwing control method and device
CN113012263B (en) * 2021-03-16 2024-10-01 维沃移动通信有限公司 Configuration method of layer synthesis mode and electronic equipment
CN112767231B (en) * 2021-04-02 2021-06-22 荣耀终端有限公司 Layer synthesis method and equipment
CN113625983B (en) * 2021-08-10 2024-08-27 Oppo广东移动通信有限公司 Image display method, device, computer equipment and storage medium
CN113986162B (en) * 2021-09-22 2022-11-11 荣耀终端有限公司 Layer composition method, device and computer readable storage medium
CN114546513B (en) * 2022-01-04 2025-04-25 合肥杰发科技有限公司 Display method and display system based on operating system
CN116795197A (en) * 2022-03-17 2023-09-22 华为技术有限公司 Layer processing method and electronic equipment
CN118860118A (en) * 2023-04-26 2024-10-29 华为技术有限公司 Layer synthesis method and terminal device
CN118173058B (en) * 2024-04-19 2024-10-22 广州文石信息科技有限公司 Display device and electronic apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107102716A (en) * 2017-03-29 2017-08-29 深圳天珑无线科技有限公司 Mobile terminal power-economizing method and mobile terminal
CN107422835A (en) * 2017-08-03 2017-12-01 四川长虹通信科技有限公司 A kind of terminal video plays scene adaptive power-economizing method and device
CN107589822A (en) * 2017-08-23 2018-01-16 深圳市沃特沃德股份有限公司 Electricity-saving control method, device and mobile terminal
CN108279764A (en) * 2017-01-04 2018-07-13 北京搜狗科技发展有限公司 A kind of application control method, device and mobile terminal
CN109324903A (en) * 2018-09-21 2019-02-12 深圳前海达闼云端智能科技有限公司 Display resource regulating method and device for embedded system
CN110362186A (en) * 2019-07-17 2019-10-22 Oppo广东移动通信有限公司 Layer processing method and device, electronic equipment and computer readable medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639768B (en) * 2013-11-11 2017-05-03 中国移动通信集团公司 Intelligent power management method and equipment
WO2016014295A1 (en) * 2014-07-22 2016-01-28 Qualcomm Incorporated Method and system for optimizing a core voltage level and enhancing frequency performance of individual subcomponents for reducing power consumption within a pcd
KR102277353B1 (en) * 2014-02-21 2021-07-15 삼성전자주식회사 Video processing method and electronic device
CN104932659B (en) * 2015-07-15 2020-01-07 京东方科技集团股份有限公司 Image display method and display system
CN106919402B (en) * 2017-03-10 2020-08-28 Oppo广东移动通信有限公司 A mobile terminal control method, device and mobile terminal
CN107066326A (en) * 2017-03-27 2017-08-18 深圳市金立通信设备有限公司 The method and terminal of a kind of scheduler task
CN107680029A (en) * 2017-08-31 2018-02-09 深圳天珑无线科技有限公司 Image processing method, electronic equipment and the device with store function
CN107783749A (en) * 2017-11-09 2018-03-09 青岛海信移动通信技术股份有限公司 A kind of display methods of view data, device and mobile terminal
CN109379627B (en) * 2018-11-27 2020-12-04 Oppo广东移动通信有限公司 Video processing method, device, electronic device, and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108279764A (en) * 2017-01-04 2018-07-13 北京搜狗科技发展有限公司 A kind of application control method, device and mobile terminal
CN107102716A (en) * 2017-03-29 2017-08-29 深圳天珑无线科技有限公司 Mobile terminal power-economizing method and mobile terminal
CN107422835A (en) * 2017-08-03 2017-12-01 四川长虹通信科技有限公司 A kind of terminal video plays scene adaptive power-economizing method and device
CN107589822A (en) * 2017-08-23 2018-01-16 深圳市沃特沃德股份有限公司 Electricity-saving control method, device and mobile terminal
CN109324903A (en) * 2018-09-21 2019-02-12 深圳前海达闼云端智能科技有限公司 Display resource regulating method and device for embedded system
CN110362186A (en) * 2019-07-17 2019-10-22 Oppo广东移动通信有限公司 Layer processing method and device, electronic equipment and computer readable medium

Also Published As

Publication number Publication date
CN110362186A (en) 2019-10-22
CN110362186B (en) 2021-02-02

Similar Documents

Publication Publication Date Title
WO2021008390A1 (en) Image layer processing method and apparatus, electronic device, and computer-readable medium
WO2021008373A1 (en) Display method and apparatus, electronic device, and computer-readable medium
WO2021008424A1 (en) Method and device for image synthesis, electronic apparatus and storage medium
WO2021008420A1 (en) Layer synthesis method and apparatus, electronic device, and storage medium
KR102154456B1 (en) Exploiting frame to frame coherency in a sort-middle architecture
WO2021008427A1 (en) Image synthesis method and apparatus, electronic device, and storage medium
KR101952983B1 (en) System and method for layering using tile-based renderers
KR20140053934A (en) Mirroring graphics content to an external display
US10613814B2 (en) Low latency wireless display
WO2020108099A1 (en) Video processing method, device, electronic device and computer-readable medium
CN110782387A (en) Image processing method and device, image processor and electronic equipment
JP6182225B2 (en) Color buffer compression
CN104737198B (en) The result of visibility test is recorded in input geometric object granularity
CN120226071A (en) Display Processing Unit (DPU) pixel rate based on display region of interest (ROI) geometry
CN116740254A (en) An image processing method and terminal
EP4229586A1 (en) Optimizing gpu kernel with simo approach for downscaling utilizing gpu cache
US11727631B2 (en) Dynamic variable rate shading
WO2024044936A1 (en) Composition for layer roi processing
WO2024198633A1 (en) Video switching method and electronic device
CN117616446A (en) Optimization of depth and shadow channel rendering in tile-based architecture
CN119604894A (en) Density-driven variable rate shading
WO2022119681A1 (en) Plane planning for overlay composition
CN118509643A (en) Playing processing method and device, electronic equipment and storage medium
CN114245138A (en) Video frame processing method and device
CN119579417A (en) Image processing method and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20840154

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20840154

Country of ref document: EP

Kind code of ref document: A1