Video playback methods, devices, electronic equipment and storage media

CN118870084BActive Publication Date: 2026-08-14BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310409367.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-17
Publication Date
2026-08-14
Estimated Expiration
2043-04-17

AI Technical Summary

Technical Problem

相关技术中,部分移动终端对于HDR视频的支持能力不足,导致移动终端在播放HDR视频时效果不佳

Benefits of technology

[0046]本公开实施方式的视频播放方法,包括在HDR视频序列的每帧图像数据中设置预设标识信息,在对当前帧待显示图像进行图层合成时,响应于检测到待显示图像的至少一个图层对应的图层数据中包括有预设标识信息,增强待显示图像上目标图像区域的显示亮度。本公开实施方式中,在HDR视频中设置预设标识信息,通过检测该预设标识信息,使得电子设备可以准确识别HDR视频,进而正确支持针对HDR视频的局部HDR效果,改善由于无法正确支持局部HDR带来的闪屏和抖动问题,提高用户观影体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118870084B_ABST
    Figure CN118870084B_ABST
Patent Text Reader

Abstract

This disclosure relates to the field of electronic device technology, specifically providing a video playback method, apparatus, electronic device, and storage medium. A video playback method includes setting preset identification information in the image data of each frame of an HDR video sequence. When performing layer compositing on the current frame of the image to be displayed, in response to detecting that the layer data corresponding to at least one layer of the image to be displayed includes the preset identification information, the display brightness of the target image area on the image to be displayed is enhanced. In this disclosure, setting preset identification information in the HDR video allows the electronic device to accurately identify the HDR video, thereby correctly supporting local HDR effects for the HDR video, improving the flickering and jitter problems caused by the inability to correctly support local HDR, and enhancing the user's viewing experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of electronic equipment technology, specifically to a video playback method, apparatus, electronic device, and storage medium. Background Technology

[0002] HDR (High Dynamic Range) refers to an imaging technology with a wider dynamic range. HDR images can display more details in both bright and dark areas, bringing richer colors and more vivid and natural detail to the picture. However, some mobile devices lack sufficient support for HDR video, resulting in poor playback quality. Summary of the Invention

[0003] To improve the playback effect of HDR videos, this disclosure provides a video playback method, apparatus, electronic device, and storage medium.

[0004] In a first aspect, one or more embodiments of this disclosure provide a video playback method applied to an electronic device, the method comprising:

[0005] Set preset identification information in the image data of each frame of the HDR video sequence;

[0006] When performing layer composition on the image to be displayed in the current frame, in response to detecting that the layer data corresponding to at least one layer of the image to be displayed includes the preset identification information, the display brightness of the target image area on the image to be displayed is enhanced; the target image area is the area corresponding to the layer that includes the preset identification information, and the layer data corresponding to the layer that includes the preset identification information includes the image data.

[0007] In one or more embodiments of this disclosure, the step of enhancing the display brightness of the target image area on the image to be displayed in response to detecting that the layer data corresponding to at least one layer of the image to be displayed includes the preset identification information, includes:

[0008] The layer data of each layer included in the image to be displayed are detected, and in response to the detection that the layer data of at least one layer includes the preset identification information, the screen backlight of the electronic device is controlled to be enhanced to the target brightness;

[0009] For non-target layers corresponding to layer data that do not include the preset identification information, reduce the brightness of the image area corresponding to the non-target layer on the image to be displayed.

[0010] In one or more embodiments of this disclosure, controlling the screen backlight of the electronic device to enhance to a target brightness includes:

[0011] Based on a preset magnification parameter, the current brightness of the screen backlight of the electronic device is enhanced to the target brightness.

[0012] In one or more embodiments of this disclosure, reducing the brightness of the image area corresponding to the non-target layer on the image to be displayed includes:

[0013] Reduce the grayscale value of the non-target layer in the corresponding image area on the image to be displayed; and / or,

[0014] The preset mask layer is merged into the image area corresponding to the non-target layer on the image to be displayed.

[0015] In one or more embodiments of this disclosure, the inclusion of preset identification information in each frame of the HDR video sequence includes:

[0016] In response to detecting that the video to be played is an HDR video, the HDR video sequence corresponding to the video to be played is obtained;

[0017] The HDR video sequence is decoded to obtain image data for each frame of the HDR video sequence.

[0018] Each frame of image data is written into a preset cache, and the preset identification information is written into the preset cache for each frame of image data.

[0019] In one or more embodiments of this disclosure, the process of layer compositing for the current frame image to be displayed includes:

[0020] Obtain each layer of the image to be displayed, and the layer data corresponding to each layer; wherein, the image data corresponding to at least one of the layers includes the image data;

[0021] The images to be displayed are obtained by combining the layer data corresponding to each layer.

[0022] In one or more embodiments of this disclosure, the video to be played includes a Dolby format video.

[0023] Secondly, one or more embodiments of this disclosure provide a video playback device applied to an electronic device, the device comprising:

[0024] The information identification module is configured to set preset identification information in each frame of image data in an HDR video sequence;

[0025] The brightness adjustment module is configured to, when performing layer compositing on the current frame image to be displayed, enhance the display brightness of a target image area on the image to be displayed in response to detecting that the layer data corresponding to at least one layer of the image to be displayed includes the preset identification information; the target image area is the area corresponding to the layer that includes the preset identification information, and the layer data corresponding to the layer that includes the preset identification information includes the image data.

[0026] In one or more embodiments of this disclosure, the brightness adjustment module is configured to:

[0027] The layer data of each layer included in the image to be displayed are detected, and in response to the detection that the layer data of at least one layer includes the preset identification information, the screen backlight of the electronic device is controlled to be enhanced to the target brightness;

[0028] For non-target layers corresponding to layer data that do not include the preset identification information, reduce the brightness of the image area corresponding to the non-target layer on the image to be displayed.

[0029] In one or more embodiments of this disclosure, the brightness adjustment module is configured to:

[0030] Based on a preset magnification parameter, the current brightness of the screen backlight of the electronic device is enhanced to the target brightness.

[0031] In one or more embodiments of this disclosure, the brightness adjustment module is configured to:

[0032] Reduce the grayscale value of the non-target layer in the corresponding image area on the image to be displayed; and / or,

[0033] The preset mask layer is merged into the image area corresponding to the non-target layer on the image to be displayed.

[0034] In one or more embodiments of this disclosure, the information identification module is configured as follows:

[0035] In response to detecting that the video to be played is an HDR video, the HDR video sequence corresponding to the video to be played is obtained;

[0036] The HDR video sequence is decoded to obtain image data for each frame of the HDR video sequence.

[0037] Each frame of image data is written into a preset cache, and the preset identification information is written into the preset cache for each frame of image data.

[0038] In one or more embodiments of this disclosure, the apparatus further includes a layer compositing module configured to:

[0039] Obtain each layer of the image to be displayed, and the layer data corresponding to each layer; wherein, the image data corresponding to at least one of the layers includes the image data;

[0040] The images to be displayed are obtained by combining the layer data corresponding to each layer.

[0041] In one or more embodiments of this disclosure, the video to be played includes a Dolby format video.

[0042] Thirdly, one or more embodiments of this disclosure provide an electronic device, including:

[0043] processor; and

[0044] A memory storing computer instructions for causing the processor to perform the method according to any embodiment of the first aspect.

[0045] Fourthly, one or more embodiments of this disclosure provide a storage medium storing computer instructions for causing a computer to perform the method according to any embodiment of the first aspect.

[0046] The video playback method of this disclosure includes setting preset identification information in the image data of each frame of an HDR video sequence. When performing layer synthesis on the image to be displayed in the current frame, in response to detecting that the layer data corresponding to at least one layer of the image to be displayed includes the preset identification information, the display brightness of the target image area on the image to be displayed is enhanced. In this disclosure, setting preset identification information in the HDR video and detecting the preset identification information enables the electronic device to accurately identify the HDR video, thereby correctly supporting the local HDR effect for the HDR video, improving the flickering and jitter problems caused by the inability to correctly support local HDR, and enhancing the user's viewing experience. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0048] Figure 1 This is a schematic diagram of the display interface of an electronic device according to some embodiments of the present disclosure.

[0049] Figure 2This is an operating system architecture diagram of an electronic device according to some embodiments of the present disclosure.

[0050] Figure 3 This is a flowchart of a video playback method according to some embodiments of this disclosure.

[0051] Figure 4 This is a flowchart of a video playback method according to some embodiments of this disclosure.

[0052] Figure 5 This is a flowchart of a video playback method according to some embodiments of this disclosure.

[0053] Figure 6 This is a flowchart of a video playback method according to some embodiments of this disclosure.

[0054] Figure 7 This is a flowchart of a video playback method according to some embodiments of this disclosure.

[0055] Figure 8 This is a structural block diagram of a video playback device according to some embodiments of the present disclosure.

[0056] Figure 9 This is a structural block diagram of an electronic device according to some embodiments of the present disclosure. Detailed Implementation

[0057] The technical solutions of this disclosure will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure. Furthermore, the technical features involved in the different embodiments of this disclosure described below can be combined with each other as long as they do not conflict with each other.

[0058] HDR (High Dynamic Range) refers to an imaging technology with a wider dynamic range. Its basic principle is to capture multiple images with different exposures and fuse them into one image, thereby displaying more details in the bright and dark areas of the image, bringing richer colors and more vivid and natural details to the picture, making the picture closer to what the human eye sees.

[0059] In recent years, with the continuous development of electronic imaging technology, more and more mobile terminals have begun to support HDR video effects, enabling users to watch HDR videos on their mobile terminals. In order to accurately present the high dynamic range effect of HDR videos, it is necessary to brighten the screen when playing HDR videos.

[0060] To provide users with a better viewing experience, related technologies can support local HDR effects. For example, when users watch HDR videos on mobile devices, the device can brighten the HDR video playback window while darkening or maintaining the original brightness of non-HDR areas, thereby achieving precise brightening of HDR content and a better HDR video viewing experience.

[0061] However, observations revealed that mobile devices cannot accurately support partial HDR effects for some HDR video formats, resulting in screen flickering and jittering during video playback. For example, Dolby Vision, an HDR video format developed by Dolby Laboratories, exhibits screen flickering and jittering issues when playing Dolby videos on some Android phones.

[0062] The inventors of this case discovered through research that this is because Dolby Vision does not officially grant decoding permissions for Dolby videos. The underlying mobile phone system can only decode based on Dolby's official decoding library. Therefore, the Android underlying system cannot recognize Dolby video information and cannot correctly support local HDR effects for Dolby videos.

[0063] Based on the deficiencies of the aforementioned related technologies, this disclosure provides a video playback method, apparatus, electronic device, and storage medium, aiming to enable mobile terminals to accurately support local HDR effects, improve the flickering and jitter problems caused by the inability to correctly support local HDR, enhance the playback effect of HDR videos, and improve the user's viewing experience.

[0064] Firstly, this disclosure provides a video playback method applicable to electronic devices, enabling the electronic device to achieve a local HDR effect for HDR video playback when executing the method. The electronic device in this disclosure can be any suitable device type, such as a smartphone, tablet computer, monitor, electronic screen, etc., and this disclosure does not limit it.

[0065] In some implementations, the electronic device is, for example, a smartphone. Figure 1 This shows an example of a smartphone's display interface during video playback. See also... Figure 1 As shown, during video playback, the mobile phone display interface is not entirely the video playback area, but includes the video playback area 110 and the non-video playback area 120. The video playback area 110 refers to the display area used to play the video screen, while the non-video playback area can be, for example, the introduction area, the comment area, or other display areas.

[0066] In this example scenario, when the phone is playing an HDR video, in order to provide users with a better HDR video viewing experience, the video playback area 110 needs to be brightened, while the non-video playback area 120 does not need to be brightened or its brightness reduced, thus achieving a local HDR effect.

[0067] Figure 2 A schematic diagram of the architecture of the Android operating system in an electronic device according to some embodiments of this disclosure is shown. For example... Figure 2 As shown, the system software architecture can be divided into four layers: the Applications layer, the Application Framework layer, the Libraries layer, and the Linux Kernel layer.

[0068] 1. Application Layer

[0069] The application layer is the layer in the Android system that interacts with the user. It includes various applications on the phone, such as system applications like Settings, Contacts, Messages, Calls, Gallery, Calendar, and Browser, as well as third-party applications like WeChat. The application layer can access services provided by the application framework layer, depending on the application. Generally, applications are developed using Java and accomplish this by calling the application programming interface (API) provided by the application framework layer. For example, in a video playback scenario, the user can select an HDR video to play through various video apps within the application layer.

[0070] 2. Application Framework Layer

[0071] The application framework layer primarily provides developers with APIs that allow them to access the various APIs used by their applications. The APIs and services provided by the application framework layer differ depending on the application. For example, in an HDR video playback scenario, the application framework layer can provide services such as HDR video encoding / decoding and layer compositing.

[0072] Specifically, developers can use application frameworks to interact with the underlying operating system (such as function libraries, the Linux kernel, etc.) to develop their own applications. This application framework can be a series of services and management systems within the operating system. The application framework mainly includes the following basic services:

[0073] The Window Manager module manages graphical user page resources used on the screen, including: creation and destruction of page objects, display and hiding of page objects, page layout, focus management, and input method and wallpaper management.

[0074] The Activity Manager module manages the lifecycle of each application. Applications typically run in the operating system as Activities. For each Activity, the Activity Manager maintains a corresponding Activity Record, which records the state of the application's Activities. The Activity Manager uses this Activity Record as an identifier to schedule the application's Activity processes.

[0075] Views: A rich, extensible collection of views that can be used to build an application, including lists, grids, textboxes, buttons, and embeddable web browsers.

[0076] The Notification Manager module controls how applications display prompts (such as alerts and notifications) to users in the status bar, lock screen, and other interfaces.

[0077] 3. Function library layer

[0078] The library layer supports the application framework and serves as a crucial link between it and the Linux kernel layer. It comprises libraries compiled from C or C++ languages, usable by various components of the operating system. These libraries provide services to developers through the application framework layer. Specifically, libraries may include the libc library, specifically designed for embedded Linux devices; the Media Framework, which supports playback and recording of audio and video in various encoding formats, as well as still image files and common audio and video encoding formats; and the SurfaceManager library, primarily responsible for managing access to the display system. Specifically, it manages the interaction between display and access operations when multiple applications are running, and also handles the compositing of 2D and 3D graphics.

[0079] The function library layer can also include other function libraries used to implement various functions of electronic devices, such as: Scalable Graphics Library (SGL): a 2D graphics and image processing engine based on Extensible Markup Language (XML) files; Secure Sockets Layer (SSL): located between the TVP / IP protocol and various application layer protocols, providing support for data communication; OpenGL / ES: a 3D graphics processing library that supports 3D effects; SQLite: a relational database engine; Webkit: a web browser engine; FreeType: bitmap and vector font support; and so on.

[0080] The Android Runtime is a runtime environment on an operating system; it's a new type of virtual machine used by the operating system. The Android Runtime employs AOT (Ahead-Of-Time) technology, meaning that when an application is first installed, its bytecode is pre-compiled into machine code, making the application a truly native application. Subsequent runs skip this compilation step, resulting in faster startup and execution.

[0081] In other embodiments of this disclosure, the Android Runtime can also be replaced by core libraries and the Dalvik Virtual Machine. The core libraries provide most of the functionality in the Java language API, primarily through the Java Native Interface (JNI) to provide the application framework layer with an interface to call the underlying libraries. They also include some core APIs of the operating system, such as android.os, android.net, and android.media. The Dalvik Virtual Machine uses a Just-in-Time (JIT) runtime compilation mechanism; each time a process is started, the virtual machine needs to recompile the bytecode in the background, which can impact startup speed. Each application runs within an instance of the Dalvik Virtual Machine, and each Dalvik Virtual Machine instance is an independent process space. The Dalvik Virtual Machine is designed to efficiently run multiple virtual machines on a single device. The Dalvik Virtual Machine executable file format is .dex, a compressed format specifically designed for Dalvik, suitable for systems with limited memory and processor speed. It should be noted that the Dalvik Virtual Machine relies on the Linux kernel to provide basic functionality (threads, low-level memory management). It is understandable that Android Runtime and Dalvik are different types of virtual machines, and those skilled in the art can choose different types of virtual machines in different situations.

[0082] 4. Linux kernel layer

[0083] The Linux kernel layer provides core system services for the operating system, such as security, memory management, process management, network protocol stack, and driver model. The Linux kernel also serves as an abstraction layer between the hardware and software stacks. This layer contains many drivers related to electronic devices, including: display drivers; Linux-based framebuffer drivers; keyboard drivers as input devices; Flash drivers for memory-based devices; camera drivers; audio drivers; Bluetooth drivers; and Wi-Fi drivers.

[0084] Based on the aforementioned operating system architecture, Figure 3 The flowchart shown below illustrates the process of an electronic device playing video. Figure 3 This section explains the process of implementing video playback at the underlying level of an electronic device system.

[0085] like Figure 3As shown, when a user selects a video to play through a video app on an electronic device, the system receives the user's operation at the application layer, calls the corresponding hardware decoder at the application framework layer to decode the video data, and then passes the decoded data to the corresponding layer (Surface).

[0086] Surfaceflinger is a special process in the system that is mainly responsible for compositing all the layers (Surface) used for display into the Frame buffer. Then, the DDIC (Display Driver Integrated Circuit) of the screen component reads the Frame buffer to realize the display of the interface.

[0087] For example, with Figure 1 Taking the displayed interface as an example, each component in the display interface corresponds to a layer (Surface). After the system Framework layer decodes the video data, it transmits the video data to the layer corresponding to the video window, obtaining the layer data corresponding to the video layer. Simultaneously, it combines the image data corresponding to other layers to perform layer compositing, obtaining the image data corresponding to the image to be displayed. This image data is then sent to the Frame buffer. The DDIC of the screen component reads the image data from the Frame buffer and... Figure 1 The display interface shown is displayed on the screen.

[0088] The principles and processes by which video playback is implemented at the operating system level are undoubtedly understood and fully implemented by those skilled in the art in conjunction with relevant technologies, and this disclosure will not elaborate further on them.

[0089] like Figure 4 As shown, in some embodiments, the video playback method exemplified in this disclosure includes:

[0090] S410. Set preset identification information in the image data of each frame of the HDR video sequence.

[0091] S420. When performing layer composition on the image to be displayed in the current frame, in response to detecting that the layer data corresponding to at least one layer of the image to be displayed includes preset identification information, the display brightness of the target image area on the image to be displayed is enhanced.

[0092] In this embodiment of the disclosure, the image to be displayed refers to the display interface image on the screen of an electronic device. It can be understood that a video is formed by a series of consecutive frames, and the display interface on the screen of an electronic device is also a series of single frames. The display interface to be displayed in this disclosure is the single frame image displayed on the screen of an electronic device.

[0093] An HDR video sequence refers to the HDR video data to be played. For example, when a user selects to play an HDR video on an electronic device, the system can obtain the video data corresponding to that HDR video. This video data includes image data from multiple consecutive frames. Figure 3 As shown, after obtaining the HDR video sequence, the electronic device system can call the corresponding decoder to decode the HDR video sequence and obtain the image data corresponding to each frame.

[0094] As mentioned above, for Dolby format HDR videos, since Dolby does not grant decoding permissions, the system can only call Dolby's official decoding library for decoding. The resulting image data is no different from regular SDR (Standard Dynamic Range) image data, so the system cannot recognize Dolby videos at the underlying level and therefore cannot accurately support local HDR effects.

[0095] Therefore, in this embodiment of the present disclosure, after decoding the HDR video sequence, preset identification information can be written into each frame of image data obtained by decoding. The preset identification information is used to identify the image data as HDR image data.

[0096] For example, in some implementations, a new buffer can be created at the application framework layer, and each frame of image data after decoding can be written into the buffer. During the writing process, preset identification information can be added to each frame of image data.

[0097] It is understood that the preset identification information can be any data information that can provide identification capabilities, such as strings, and this disclosure does not limit the specific data content of the preset identification information.

[0098] Combination Figure 3 As shown, taking a frame of image data as an example, after writing preset identification information to the image data, the image data is sent to the layer (Surface) corresponding to the video window to obtain the layer data corresponding to that layer.

[0099] Combination Figure 1 As the example shows, the image to be displayed includes not only the video playback area 110, but also the non-video playback area 120. Therefore, the layers (Surface) required to composite the image to be displayed include not only the layer corresponding to the video window, but also the layers corresponding to other image areas.

[0100] In this embodiment of the disclosure, for ease of explanation, the video playback area 110 on the image to be displayed is defined as the "target image area", and one or more layers (Surfaces) corresponding to the target image area are defined as "target layers"; the non-video playback area 120 is defined as the "non-target image area", and one or more layers (Surfaces) corresponding to the non-target image area are defined as "non-target layers".

[0101] When compositing an image to be displayed, the system can obtain all the layers included in the image and the layer data corresponding to each layer. These layers include target layers and non-target layers. The process of obtaining non-target layers and their layer data can be understood and implemented by those skilled in the art by referring to relevant technologies, and will not be described in detail here.

[0102] After obtaining the layer data of the image to be displayed, the system can perform layer compositing based on the aforementioned Surfaceflinger process to obtain the image to be displayed. For example, the image to be displayed uses... Figure 1 For example, the image to be displayed includes non-target images corresponding to non-target image areas and target images corresponding to target image areas. Then, the SurfaceFlinger process performs layer compositing on the non-target images and target layers to obtain the image data corresponding to the image to be displayed. Subsequently, the DDIC of the screen component is implemented based on the image data. Figure 1 The screen display shown indicates that the user can see the image to be displayed on the screen.

[0103] In this embodiment of the disclosure, while performing layer compositing on each layer, the system also detects the layer data of each layer to determine whether the layer data includes preset identification information. It can be understood that if the layer data of a certain layer carries preset identification information, it indicates that the image region corresponding to that layer is an HDR region, which is the target image region described in this disclosure. Conversely, if the layer data of a certain layer does not carry preset identification information, it indicates that the image region corresponding to that layer is a non-HDR region, which is the non-target image region described in this disclosure.

[0104] If one or more layers of the image to be displayed are detected to contain preset identification information, it indicates that the image to be displayed in the current frame is an HDR image. In this case, the HDR area on the image to be displayed can be brightened, that is, the display brightness of the target image area can be increased, thereby achieving a local HDR effect.

[0105] The above implementation describes the display process of a frame of image to be displayed. For each frame of image in the HDR video sequence, the above process is repeated sequentially to achieve frame-by-frame playback of each frame of image to be displayed on the electronic device screen, so that the user can watch the HDR video through the electronic device screen.

[0106] As can be understood from the foregoing, taking Dolby video playback as an example, in traditional solutions, the system's underlying layer cannot accurately identify the frame images of Dolby video, resulting in the inability to correctly achieve local HDR effects during Dolby video playback. However, in the embodiments of this disclosure, preset identification information can be written into the image data of the Dolby video. By identifying this preset identification information, each frame image of the Dolby video can be accurately identified, thereby accurately achieving local HDR effects. The process of locally brightening the display brightness of the target image area will be described in the following embodiments of this disclosure and will not be detailed here.

[0107] As can be seen from the above, in this embodiment of the disclosure, preset identification information is set in the HDR video. By detecting the preset identification information, the electronic device can accurately identify the HDR video, thereby correctly supporting the local HDR effect for the HDR video, improving the screen flickering and jitter problems caused by the inability to correctly support local HDR, and improving the user's viewing experience.

[0108] like Figure 5 As shown, in some embodiments, the video playback method of this disclosure, the process of setting preset identification information in each frame of image data of an HDR video sequence, includes:

[0109] S411. In response to detecting that the video to be played is an HDR video, obtain the HDR video sequence corresponding to the video to be played.

[0110] S412. Decode the HDR video sequence to obtain the image data of each frame included in the HDR video sequence.

[0111] S413. Write each frame of image data into a preset cache, and write preset identification information into the preset cache for each frame of image data.

[0112] Combination Figure 3 As shown, in a video playback scenario, users can select the video they want to watch through a video app, i.e., the video to be played. After the user selects the video to be played, the system's application layer obtains the video data corresponding to the video to be played based on the user's operation.

[0113] For example, in one instance, the video to be played is a video stored locally on the electronic device. After the user selects the video to be played, the system can read the video data of the video to be played from the memory of the electronic device.

[0114] For example, in another instance, the video to be played is an online video. After the user selects the video to be played, the electronic device can receive the video data from the server via the network, and the system can then obtain the video data of the video to be played based on the data received by the electronic device.

[0115] It's understandable that the video data played by the user can be an HDR video in HDR format, or a regular video in a non-HDR format (such as an SDR video). Therefore, after obtaining the video data of the video to be played, the video data can be detected to determine whether the video to be played is an HDR video.

[0116] In one example, it can be determined whether the video to be played is an HDR video by detecting the video data format. For example, HDR video formats mainly include HDR 10, HDR 10+, HDR Vivid, and Dolby Vision. It can be determined whether the video to be played is an HDR video by detecting whether the video data of the video to be played is in one of these formats.

[0117] If it is determined that the video to be played is an HDR video, it means that it is necessary to achieve a local HDR effect when playing the video using the method of the present disclosure, so that the video data of the HDR video can be determined as the aforementioned HDR video sequence.

[0118] After obtaining the HDR video sequence, the system calls the corresponding decoder at the application framework layer to decode the HDR video sequence, obtaining the image data corresponding to each frame of video image. As can be seen from the foregoing, in this embodiment of the disclosure, preset identification information needs to be written into each frame of image data to identify that the image corresponding to the current image data is an HDR image.

[0119] In some implementations, the system can create a new buffer after the decoding service. This buffer is the preset buffer described in this disclosure. Its function is to write preset identification information into each frame of image data during the process of writing the decoded image data into the buffer.

[0120] Taking a single video frame as an example, the image data corresponding to the decoded video frame can be written into a pre-established buffer. When writing the data, preset identification information is added to the front of the image data, thereby realizing the writing of preset identification information.

[0121] After the preset identification information is written into the image data, the system needs to obtain the image to be displayed based on the data of each layer of the image to be displayed. The following section combines... Figure 6 Please provide an explanation.

[0122] like Figure 6As shown, in some embodiments, the video playback method of this disclosure, in the process of performing layer composition on the image to be displayed in the current frame, includes:

[0123] S610. Obtain the layers included in the image to be displayed, and the layer data corresponding to each layer.

[0124] S620. Based on the layer data corresponding to each layer, the layers are combined to obtain the image to be displayed.

[0125] For example, in one example, the image to be displayed is... Figure 1 As shown in the example, the image to be displayed includes multiple image regions, each corresponding to a layer (Surface). In other words, the image to be displayed is composed of multiple layers (Surfaces).

[0126] After layer compositing, the individual layers (Surfaces) of the image to be displayed can be determined, and then the layer data corresponding to each layer can be obtained. For example, using... Figure 1 Taking the video playback area 110 as an example, the video playback area 110 corresponds to a target layer. For the image to be displayed in the current frame, the layer data in this target layer is the image data of the frame after the preset identification information is written, as mentioned above. At the same time, the non-video playback area 120 corresponds to one or more non-target layers, and the layer data in each non-target layer is the data corresponding to the displayed interface component.

[0127] Therefore, after obtaining the layer data of each layer of the image to be displayed, all layers can be composited based on the layer data to obtain the image data corresponding to the image to be displayed. The system then sends this image data to the frame buffer. The DDIC of the screen component reads the image data from the frame buffer and controls the screen of the electronic device to display the image corresponding to the image data. The display effect can be as follows: Figure 1 As shown.

[0128] The above description only illustrates the display process of one frame of an HDR video. Those skilled in the art will understand that by repeating the above process for each frame of the video, the playback of the HDR video can be achieved. This disclosure will not elaborate further on this point.

[0129] As described above, in this embodiment of the disclosure, while compositing the various layers (Surfaces) of the image to be displayed, it is also necessary to detect whether the layer data includes preset identification information. The following section will discuss this further. Figure 7 Please provide an explanation.

[0130] like Figure 7As shown, in some embodiments, the video playback method of this disclosure, in response to detecting that at least one layer of data includes preset identification information, enhances the display brightness of a target image region on an image to be displayed, including:

[0131] S710, Detect the layer data of each layer included in the image to be displayed, and in response to detecting that the layer data of at least one layer includes preset identification information, control the screen backlight of the electronic device to be enhanced to the target brightness.

[0132] S720. For non-target layers corresponding to layer data that do not include preset identification information, reduce the brightness of the corresponding image area of ​​the non-target layer on the image to be displayed.

[0133] As described above, after obtaining the layer data of each layer in the image to be displayed, the system can perform data detection on each layer to check whether each layer contains preset identification information. Taking a layer as an example, if the layer data carries preset identification information, it means that the layer is the target layer, and the corresponding image area on the image to be displayed is the target image area, that is, the HDR area.

[0134] Therefore, if any layer of data is detected to carry preset identification information, that is, if it indicates that the current frame of the image to be displayed includes an HDR region, the screen backlight of the electronic device can be controlled to be enhanced to the target brightness in order to improve the HDR display effect.

[0135] It's understandable that the system software cannot directly brighten the hardware pixels of a specific area of ​​the screen. Therefore, the overall backlight brightness of the screen can be increased, and then the brightness of the non-HDR areas can be darkened by masking or adjusting the grayscale of the non-HDR areas, thus presenting a brightening effect on the HDR areas.

[0136] In some implementations, through the aforementioned process, when the detected layer data carries preset identification information, the layer corresponding to the layer data is determined as the target layer; when the detected layer data does not carry preset identification information, the layer corresponding to the layer data is determined as a non-target layer.

[0137] Then, if at least one target layer is included among the layers of the image to be displayed, indicating that the image contains an HDR region, the system can control the screen backlight of the electronic device to be enhanced to the target brightness. For example, in one example, the screen backlight of the electronic device can be increased from the current brightness L0 to n*L0 based on a preset magnification parameter n, where the preset magnification parameter n can take values ​​from 1 to 10.

[0138] While enhancing the overall screen backlight, it is also necessary to darken the non-target image areas corresponding to the non-target layers. For example, in one example, the grayscale value of the non-target image areas corresponding to each non-target layer can be directly reduced. As the grayscale value is reduced, the brightness of the image in the non-target image area will be reduced. In another example, a mask layer can be pre-set. The mask layer is a grayscale layer, and merging this grayscale layer with the non-target layers can also achieve the effect of reducing the brightness of the non-target image areas. Of course, those skilled in the art will understand that the grayscale value of the non-target layers can be reduced and the mask layer can be merged at the same time, which will not be elaborated on in this disclosure.

[0139] In this embodiment of the disclosure, the overall brightness of the screen backlight is increased, while the brightness of the non-HDR areas of the image to be displayed is decreased by darkening the non-HDR areas of the image to be displayed. After the two are combined, the screen display effect of the electronic device is that the brightness of the HDR areas of the image to be displayed is increased, thereby achieving a local HDR effect for the video playback area and thus obtaining a better HDR video effect.

[0140] As can be seen from the above, in this embodiment of the disclosure, preset identification information is carried in the HDR video. By detecting the preset identification information, the electronic device can accurately identify the HDR video, thereby correctly supporting the local HDR effect for the HDR video, improving the screen flickering and jitter problems caused by the inability to correctly support local HDR, and enhancing the user's viewing experience.

[0141] It is worth noting that, in the above Figure 1 In the video playback scenario shown, the display interface includes a video playback area 110 and a non-video playback area 120. Therefore, when performing layer compositing on the image to be displayed in the current frame, it includes both the target layer corresponding to the video playback area 110 and the non-target layer corresponding to the non-video playback area 120. Thus, through the method process of the above-described embodiment, the preset identification information carried in the layer data of the target layer can be detected, thereby achieving a local HDR effect.

[0142] Similarly, in a full-screen video playback scenario, where the display interface only includes the video playback area 110 and not the non-video playback area 120, when performing layer compositing on the image to be displayed in the current frame, only the target layer corresponding to the video playback area 110 is included. Thus, through the method process described above, the preset identification information carried in the layer data of the target layer can be detected, and layer data without preset identification information will not be detected. This allows the entire display interface to be brightened, achieving a full-screen HDR effect. The principle is the same as described above, and those skilled in the art can understand this.

[0143] Secondly, this disclosure provides a video playback device that can be applied to an electronic device. The electronic device in this disclosure can be any type of device suitable for implementation, such as a smartphone, tablet computer, monitor, electronic screen, etc. This disclosure does not limit it.

[0144] like Figure 8 As shown, in some embodiments, the video playback device of this disclosure includes:

[0145] The information identification module 10 is configured to set preset identification information in each frame of image data of the HDR video sequence;

[0146] The brightness adjustment module 20 is configured to enhance the display brightness of the target image area on the image to be displayed in response to detecting that the layer data corresponding to at least one layer of the image to be displayed includes preset identification information when performing layer compositing on the current frame image to be displayed; the target image area is the area corresponding to the layer that includes the preset identification information, and the layer data corresponding to the layer that includes the preset identification information includes image data.

[0147] In one or more embodiments of this disclosure, the brightness adjustment module 20 is configured to:

[0148] The layer data of each layer of the image to be displayed is detected, and in response to the detection that the layer data of at least one layer includes preset identification information, the screen backlight of the electronic device is controlled to be enhanced to the target brightness.

[0149] For non-target layers corresponding to layer data that do not include preset identification information, reduce the brightness of the corresponding image area of ​​the non-target layer on the image to be displayed.

[0150] In one or more embodiments of this disclosure, the brightness adjustment module 20 is configured to:

[0151] Based on preset magnification parameters, the current brightness of the electronic device's screen backlight is enhanced to the target brightness.

[0152] In one or more embodiments of this disclosure, the brightness adjustment module 20 is configured to:

[0153] Reduce the grayscale value of the corresponding image region on the image to be displayed for the non-target layer; and / or,

[0154] Merge the preset mask layer into the image area corresponding to the non-target layer on the image to be displayed.

[0155] In one or more embodiments of this disclosure, the information identification module 10 is configured as follows:

[0156] In response to detecting that the video to be played is an HDR video, obtain the HDR video sequence corresponding to the video to be played;

[0157] Decode the HDR video sequence to obtain the image data of each frame included in the HDR video sequence;

[0158] Each frame of image data is written to a preset cache, and preset identification information is written to each frame of image data in the preset cache.

[0159] In one or more embodiments of this disclosure, the apparatus further includes a layer compositing module configured to:

[0160] Obtain the layers of the image to be displayed, and the layer data corresponding to each layer; wherein, the image data corresponding to at least one of the layers includes image data;

[0161] The layers are composited based on their corresponding layer data to obtain the image to be displayed.

[0162] In one or more embodiments of this disclosure, the video to be played includes a Dolby format video.

[0163] As can be seen from the above, in this embodiment of the disclosure, preset identification information is set in the HDR video. By detecting the preset identification information, the electronic device can accurately identify the HDR video, thereby correctly supporting the local HDR effect for the HDR video, improving the screen flickering and jitter problems caused by the inability to correctly support local HDR, and improving the user's viewing experience.

[0164] Thirdly, one or more embodiments of this disclosure provide an electronic device, including:

[0165] processor; and

[0166] The memory stores computer instructions that cause the processor to execute the methods of any of the above-described embodiments.

[0167] Fourthly, one or more embodiments of this disclosure provide a storage medium storing computer instructions for causing a computer to perform the methods of any of the above embodiments.

[0168] Figure 9 The diagram shows a structural block diagram of an electronic device according to some embodiments of this disclosure. This electronic device can be any of the electronic devices described in the foregoing embodiments. The following is a description of its structure in conjunction with... Figure 9 The principles related to the electronic devices and storage media of some embodiments of this disclosure will be explained.

[0169] Reference Figure 9The electronic device 1800 may include one or more of the following components: a processing component 1802, a memory 1804, a power supply component 1806, a multimedia component 1808, an audio component 1810, an input / output (I / O) interface 1812, a sensor component 1816, and a communication component 1818.

[0170] Processing component 1802 typically controls the overall operation of electronic device 1800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 1802 may include one or more processors 1820 to execute instructions. Furthermore, processing component 1802 may include one or more modules to facilitate interaction between processing component 1802 and other components. For example, processing component 1802 may include a multimedia module to facilitate interaction between multimedia component 1808 and processing component 1802. As another example, processing component 1802 may read executable instructions from memory to implement relevant functions of the electronic device.

[0171] Memory 1804 is configured to store various types of data to support the operation of electronic device 1800. Examples of this data include instructions for any application or method operating on electronic device 1800, contact data, phonebook data, messages, pictures, videos, etc. Memory 1804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0172] Power supply component 1806 provides power to various components of electronic device 1800. Power supply component 1806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 1800.

[0173] Multimedia component 1808 includes a display screen that provides an output interface between electronic device 1800 and user. In some embodiments, multimedia component 1808 includes a front-facing camera and / or a rear-facing camera. When electronic device 1800 is in an operating mode, such as shooting mode or video mode, the front-facing camera and / or rear-facing camera can receive external multimedia data. Each front-facing camera and rear-facing camera can be a fixed optical lens system or have focal length and optical zoom capabilities.

[0174] Audio component 1810 is configured to output and / or input audio signals. For example, audio component 1810 includes a microphone (MIC) configured to receive external audio signals when electronic device 1800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 1804 or transmitted via communication component 1818. In some embodiments, audio component 1810 also includes a speaker for outputting audio signals.

[0175] I / O interface 1812 provides an interface between processing component 1802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0176] Sensor assembly 1816 includes one or more sensors for providing state assessments of various aspects of electronic device 1800. For example, sensor assembly 1816 may detect the on / off state of electronic device 1800, the relative positioning of components such as the display and keypad of electronic device 1800, changes in position of electronic device 1800 or a component of electronic device 1800, the presence or absence of user contact with electronic device 1800, the orientation or acceleration / deceleration of electronic device 1800, and temperature changes of electronic device 1800. Sensor assembly 1816 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1816 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1816 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0177] Communication component 1818 is configured to facilitate wired or wireless communication between electronic device 1800 and other devices. Electronic device 1800 can access wireless networks based on communication standards, such as Wi-Fi, 2G, 3G, 4G, 5G, or 6G, or combinations thereof. In one exemplary embodiment, communication component 1818 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 1818 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0178] In an exemplary embodiment, the electronic device 1800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.

[0179] Obviously, the above embodiments are merely examples for clear illustration and are not intended to limit the embodiments. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all embodiments here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this disclosure.

Claims

1. A video playback method, characterized in that, Applied to electronic devices, the method includes: Set preset identification information in the image data of each frame of the HDR video sequence; When performing layer composition on the current frame image to be displayed, in response to detecting that the layer data corresponding to at least one layer of the image to be displayed includes the preset identification information, the display brightness of the target image area on the image to be displayed is enhanced; the target image area is the area corresponding to the layer that includes the preset identification information, and the layer data corresponding to the layer that includes the preset identification information includes the image data; the image to be displayed is the image displayed on the screen display interface of the electronic device.

2. The method according to claim 1, characterized in that, The step of enhancing the display brightness of the target image area on the image to be displayed in response to detecting that at least one layer of the image to be displayed includes the preset identification information in the layer data, including: The layer data of each layer included in the image to be displayed are detected, and in response to the detection that the layer data of at least one layer includes the preset identification information, the screen backlight of the electronic device is controlled to be enhanced to the target brightness; For non-target layers corresponding to layer data that do not include the preset identification information, reduce the brightness of the image area corresponding to the non-target layer on the image to be displayed.

3. The method according to claim 2, characterized in that, Controlling the screen backlight of the electronic device to enhance to a target brightness includes: Based on a preset magnification parameter, the current brightness of the screen backlight of the electronic device is enhanced to the target brightness.

4. The method according to claim 2, characterized in that, Reducing the brightness of the image area corresponding to the non-target layer on the image to be displayed includes: Reduce the grayscale value of the non-target layer in the corresponding image area on the image to be displayed; and / or, The preset mask layer is merged into the image area corresponding to the non-target layer on the image to be displayed.

5. The method according to any one of claims 1 to 4, characterized in that, The step of setting preset identification information in each frame of image data in the HDR video sequence includes: In response to detecting that the video to be played is an HDR video, the HDR video sequence corresponding to the video to be played is obtained; The HDR video sequence is decoded to obtain image data for each frame of the HDR video sequence. Each frame of image data is written into a preset cache, and the preset identification information is written into the preset cache for each frame of image data.

6. The method according to any one of claims 1 to 4, characterized in that, The process of layer compositing for the image to be displayed in the current frame includes: Obtain each layer of the image to be displayed, and the layer data corresponding to each layer; wherein, the image data corresponding to at least one of the layers includes the image data; The images to be displayed are obtained by combining the layer data corresponding to each layer.

7. The method according to claim 5, characterized in that, The video to be played includes Dolby format videos.

8. A video playback device, characterized in that, Applied to electronic devices, the device includes: The information identification module is configured to set preset identification information in each frame of image data in an HDR video sequence; The brightness adjustment module is configured to, when performing layer compositing on the current frame image to be displayed, enhance the display brightness of a target image area on the image to be displayed in response to detecting that the layer data corresponding to at least one layer of the image to be displayed includes the preset identification information; the target image area is the area corresponding to the layer that includes the preset identification information, and the layer data corresponding to the layer that includes the preset identification information includes the image data; the image to be displayed is an image displayed on the screen display interface of the electronic device.

9. An electronic device, characterized in that, include: processor; and A memory storing computer instructions for causing the processor to perform the method according to any one of claims 1 to 7.

10. A storage medium, characterized in that, The computer contains computer instructions for causing the computer to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image display method and device, electronic equipment and storage medium

    CN111338744A

  • Image tone mapping method and device, electronic equipment and storage medium

    CN115409717A