Video playing method and device, electronic equipment and storage medium
By setting preset identification information in the HDR video sequence and detecting and processing it in electronic devices, the problem of poor local HDR effects on mobile terminals when playing HDR videos is solved, achieving better picture performance and user experience.
Patent Information
- Application Number
- CN202310409367.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-17
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-04-17
AI Technical Summary
Mobile terminals cannot accurately support local HDR effects when playing HDR videos, resulting in screen flickering and jitter problems.
Set the preset identification information in each frame of image data of the HDR video sequence, and detect the identification information during layer synthesis, enhance the display brightness of the target image area, and reduce the brightness of the non-target image area. Through this method, the electronic device Able to accurately identify HDR videos and support local HDR effects.
It improves the flickering and jittering problems caused by the inability to correctly support local HDR, and improves the user's viewing experience and the playback effect of HDR videos.
Smart Images

Figure CN118870084A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of electronic devices, and in particular to a video playback method, device, electronic device and storage medium. Background Art
[0002] HDR (High Dynamic Range) refers to an imaging technology with a larger dynamic range. HDR images can show more details in bright and dark areas, bringing richer colors and more vivid and natural details to the picture. In related technologies, some mobile terminals have insufficient support for HDR videos, resulting in poor results when playing HDR videos on mobile terminals. Summary of the invention
[0003] In order to improve the playback effect of HDR video, the embodiments of the present disclosure provide a video playback method, device, electronic device and storage medium.
[0004] In a first aspect, one or more embodiments of the present disclosure provide a video playback method, applied to an electronic device, the method comprising:
[0005] Setting preset identification information in each frame of image data of the HDR video sequence;
[0006] When performing layer synthesis 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 including the preset identification information, and the layer data corresponding to the layer including the preset identification information includes the image data.
[0007] In one or more embodiments of the present disclosure, 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, enhancing the display brightness of the target image area on the image to be displayed includes:
[0008] Detecting 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 the preset identification information, controlling the screen backlight of the electronic device to be enhanced to a target brightness;
[0009] For a non-target layer corresponding to the layer data that does not include the preset identification information, the brightness of an image area corresponding to the non-target layer on the image to be displayed is reduced.
[0010] In one or more embodiments of the present disclosure, controlling the screen backlight of the electronic device to be enhanced to a target brightness includes:
[0011] Based on the 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 the present disclosure, reducing the brightness of the image area corresponding to the non-target layer on the image to be displayed includes:
[0013] reducing the grayscale value of the image area corresponding to the non-target layer 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 the present disclosure, the preset identification information is included in each frame of image data of the HDR video sequence, including:
[0016] In response to detecting that the video to be played is an HDR video, obtaining an HDR video sequence corresponding to the video to be played;
[0017] Decoding the HDR video sequence to obtain image data of each frame included in 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 the present disclosure, the process of performing layer synthesis on the current frame of the image to be displayed includes:
[0020] Acquire each layer included in the image to be displayed, and layer data corresponding to each layer; wherein the image data corresponding to at least one layer among the each layer includes the image data;
[0021] The layers are synthesized based on the layer data corresponding to the layers to obtain the image to be displayed.
[0022] In one or more implementations of the present disclosure, the video to be played includes a Dolby format video.
[0023] In a second aspect, one or more embodiments of the present disclosure provide a video playback device, applied to an electronic device, the device comprising:
[0024] An information identification module is configured to set preset identification information in each frame of image data of the HDR video sequence;
[0025] The brightness adjustment module is configured to enhance the display brightness of a target image area on the image to be displayed when performing layer synthesis 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 target image area is the area corresponding to the layer including the preset identification information, and the layer data corresponding to the layer including the preset identification information includes the image data.
[0026] In one or more embodiments of the present disclosure, the brightness adjustment module is configured as follows:
[0027] Detecting 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 the preset identification information, controlling the screen backlight of the electronic device to be enhanced to a target brightness;
[0028] For a non-target layer corresponding to the layer data that does not include the preset identification information, the brightness of an image area corresponding to the non-target layer on the image to be displayed is reduced.
[0029] In one or more embodiments of the present disclosure, the brightness adjustment module is configured as follows:
[0030] Based on the 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 the present disclosure, the brightness adjustment module is configured as follows:
[0032] reducing the grayscale value of the image area corresponding to the non-target layer 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 the present disclosure, the information identification module is configured as follows:
[0035] In response to detecting that the video to be played is an HDR video, obtaining an HDR video sequence corresponding to the video to be played;
[0036] Decoding the HDR video sequence to obtain image data of each frame included in 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 the present disclosure, the device further includes a layer synthesis module configured to:
[0039] Acquire each layer included in the image to be displayed, and layer data corresponding to each layer; wherein the image data corresponding to at least one layer among the each layer includes the image data;
[0040] The layers are synthesized based on the layer data corresponding to the layers to obtain the image to be displayed.
[0041] In one or more implementations of the present disclosure, the video to be played includes a Dolby format video.
[0042] In a third aspect, one or more embodiments of the present disclosure provide an electronic device, including:
[0043] Processor; and
[0044] A memory storing computer instructions, wherein the computer instructions are used to enable the processor to execute the method according to any embodiment of the first aspect.
[0045] In a fourth aspect, one or more embodiments of the present disclosure provide a storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method according to any embodiment of the first aspect.
[0046] The video playback method of the disclosed embodiment includes setting preset identification information in each frame of image data of an HDR video sequence, and when performing layer synthesis 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, enhancing the display brightness of the target image area on the image to be displayed. In the disclosed embodiment, the preset identification information is set in the HDR video, and by detecting the preset identification information, the electronic device can accurately identify the HDR video, and then correctly support the local HDR effect for the HDR video, improve the screen flickering and jitter problems caused by the inability to correctly support the local HDR, and improve the user's viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] Figure 1 It is a schematic diagram of a display interface of an electronic device according to some embodiments of the present disclosure.
[0049] Figure 2It is a diagram of the operating system architecture of an electronic device according to some embodiments of the present disclosure.
[0050] Figure 3 It is a flowchart of a video playback method according to some implementations of the present disclosure.
[0051] Figure 4 It is a flowchart of a video playback method according to some implementations of the present disclosure.
[0052] Figure 5 It is a flowchart of a video playback method according to some implementations of the present disclosure.
[0053] Figure 6 It is a flowchart of a video playback method according to some implementations of the present disclosure.
[0054] Figure 7 It is a flowchart of a video playback method according to some implementations of the present disclosure.
[0055] Figure 8 It is a structural block diagram of a video playback device in some implementation modes of the present disclosure.
[0056] Fig. 9 It is a structural block diagram of an electronic device according to some implementations of the present disclosure. DETAILED DESCRIPTION
[0057] The technical solution of the present disclosure will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described implementation is a part of the implementation of the present disclosure, rather than all the implementations. Based on the implementation in the present disclosure, all other implementations obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure. In addition, the technical features involved in the different implementations of the present 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 larger dynamic range. Its basic principle is to collect multiple images with different exposures and fuse them into one image, so as to show more details of the bright and dark parts of the image, bring richer colors and more vivid and natural details to the picture, and make 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, allowing users to watch HDR videos on mobile terminals. In order to accurately present the high dynamic range effect of HDR videos, it is necessary to brighten the screen brightness when playing HDR videos.
[0060] In order to provide users with a better viewing experience, relevant technologies can support local HDR effects. For example, when users use mobile terminals to watch HDR videos, the terminal can brighten the HDR video playback window and dim the non-HDR areas or maintain the original brightness, thereby accurately brightening the HDR content and achieving better HDR video viewing effects.
[0061] However, it has been observed that mobile terminals cannot accurately support partial HDR effects for some HDR format videos, resulting in flickering and jittering problems in video playback. For example, Dolby Vision (Dolby for short) is an HDR video format launched by Dolby Laboratories. When playing Dolby videos, some Android phones will experience flickering and jittering problems.
[0062] Through research, the inventors of this case discovered that this is because Dolby Vision officially does not open decoding permissions for Dolby videos. The underlying system of the mobile phone can only decode based on Dolby's official decoding library. Therefore, the underlying Android system cannot recognize Dolby video information, and cannot correctly support local HDR effects for Dolby videos.
[0063] Based on the defects of the above-mentioned related technologies, the embodiments of the present disclosure provide a video playback method, device, electronic device and storage medium, which aim to enable mobile terminals to accurately support local HDR effects, improve the screen flickering and jitter problems caused by the inability to correctly support local HDR, improve the playback effect of HDR videos, and improve the user's viewing experience.
[0064] In a first aspect, an embodiment of the present disclosure provides a video playback method, which can be applied to an electronic device, so that the electronic device can achieve a local HDR effect for HDR video playback when executing the method of the present disclosure. The electronic device of the embodiment of the present disclosure can be any type of device suitable for implementation, such as a smart phone, a tablet computer, a display, an electronic screen, etc., and the present disclosure does not limit this.
[0065] In some implementations, the electronic device takes a smart phone as an example. Figure 1 An example of the display interface of a smartphone during video playback is shown. Figure 1 As shown, when a video is playing, the mobile phone display interface is not entirely a video playback area, but includes a video playback area 110 and a non-video playback area 120. The video playback area 110 refers to a display area for playing video images, and the non-video playback area can be, for example, an introduction area, a comment area, or other display areas.
[0066] In this example scenario, when the mobile phone plays 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 dimmed, so as to achieve a local HDR effect.
[0067] Figure 2 FIG. 1 shows a schematic diagram of the architecture of the Android operating system of an electronic device in some embodiments of the present disclosure. Figure 2 As shown in the figure, the system software architecture can be divided into four layers, namely, the application layer, the application framework layer, the library layer and the Linux kernel layer.
[0068] 1. Application layer
[0069] The application layer is the layer that interacts with the user in the Android system. The application layer includes various applications of the mobile phone, such as system applications such as settings, contacts, text messages, calls, gallery, calendar, browser, or third-party applications such as WeChat. The application layer can access the services provided by the application framework layer according to different applications. Generally speaking, applications are developed in Java language and completed by calling the application programming interface (API) provided by the application framework layer. For example, in the video playback scenario, users can select the HDR video to be played through various video APPs (Application) in the application layer.
[0070] 2. Application framework layer
[0071] The application framework layer (Framework) mainly provides developers with access to various APIs used by applications. For different applications, the application framework layer provides different APIs and services to the application layer. For example, in the HDR video playback scenario, the application framework layer can provide services such as encoding and decoding, layer synthesis, etc. for HDR videos.
[0072] Specifically, developers can interact with the underlying operating system (such as function libraries, Linux kernel, etc.) through the application framework to develop their own applications. The application framework can be a series of services and management systems of the operating system. The application framework mainly includes the following basic services:
[0073] Page Manager (Window Manager) module: used to manage the graphical user page resources used on the screen, which may include: creation and destruction of page objects, display and hiding of page objects, page layout, focus management, input method and wallpaper management, etc.
[0074] Activity Manager module: used to manage the life cycle of each application. Applications usually run in the operating system in the form of Activities. For each Activity, there is a corresponding application record in the Activity Manager, which records the status of the Activity of the application. The Activity Manager can use this Activity Record as an identifier to schedule the Activity process of the application.
[0075] View: A rich, extensible set of views that can be used to build an application, including lists, grids, text boxes, buttons, and embeddable web browsers.
[0076] Notification Manager module: used to control the application to display prompt information (such as alerts, notifications, etc.) to the user in the status bar, lock screen interface, etc.
[0077] 3. Library layer
[0078] The function library layer is the support of the application framework and is an important link between the application framework layer and the Linux kernel layer. The function library layer includes some function libraries compiled by computer program C language or C++ language. These function libraries can be used by different components in the operating system, and they provide services to developers through the application framework layer. Specifically, the function library can include the libc function library, which is specially customized for devices based on embedded Linux; the function library can also include a multimedia library (Media Framework), which supports the playback and recording of audio or video in multiple encoding formats, and supports static image files, as well as common audio or video encoding formats. The function library also includes an interface management library (SurfaceManager), which is mainly responsible for managing access to the display system. Specifically, it is responsible for managing the interaction between display and access operations when executing multiple applications. It is also responsible for display synthesis of 2D and 3D graphics.
[0079] The function library layer may also include other function libraries for realizing various functions of electronic devices, such as: scalable graphics library (SGL): a 2D graphics image processing engine based on extensible markup language (XML) files; secure sockets layer (SSL): located between TVP / IP protocol and various application layer protocols, providing support for data communication; three-dimensional graphics processing library (OpenGL / ES): support for 3D effects; lightweight database (SQLite): relational database engine; Webkit: Web browser engine; FreeType: bitmap and vector font support; and so on.
[0080] Android Runtime is a running environment on the operating system and a new virtual machine used by the operating system. In Android Runtime, AOT (Ahead-Of-Time) technology is used. When an application is installed for the first time, the bytecode of the application will be pre-compiled into machine code, making the application a truly local application. When it is run again, the compilation step is omitted, and the startup and execution will become faster.
[0081] In some other embodiments of the present disclosure, Android Runtime can also be replaced by core libraries (CoreLibraries) and Dalvik virtual machines (Dalvik Virtual Machine). The core library provides most of the functions in the Java language API, mainly providing the application framework layer with an interface for calling the underlying library through the Java native interface (Java native interface, JNI). It also includes some core APIs of the operating system, such as android.os, android.net, android.media, etc. The Dalvik virtual machine uses a JIT (Just-in-Time) runtime compilation mechanism. Each time a process is started, the virtual machine needs to recompile the bytecode in the background, which will have a certain impact on the startup speed. Each application runs in 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 device. The Dalvik virtual machine executable file format is .dex, and the dex format is a compression format designed specifically for Dalvik, which is suitable for systems with limited memory and processor speed. It should be pointed out that the Dalvik virtual machine relies on the Linux kernel to provide basic functions (threads, underlying memory management). It is understandable that Android Runtime and Dalvik belong to different types of virtual machines, and those skilled in the art may select different forms of virtual machines in different situations.
[0082] 4. Linux kernel layer
[0083] The Linux kernel layer provides the core system services of the operating system, such as security, memory management, process management, network protocol stack and driver model, which are all based on the Linux kernel. The Linux kernel also serves as an abstraction layer between the hardware and software stacks. This layer has many drivers related to electronic devices, the main drivers are: display driver; Linux-based frame buffer driver; keyboard driver as input device; Flash driver based on memory technology devices; camera driver; audio driver; Bluetooth driver; Wi-Fi driver, etc.
[0084] Based on the above operating system architecture, Figure 3 The flowchart of the electronic device playing the video is shown below. Figure 3 The process of implementing video playback at the bottom layer of the electronic device system is explained.
[0085] like Figure 3As shown, the user selects a video to play through the video APP of the electronic device. After the system receives the user operation at the application layer, it can call the corresponding hardware decoder at the application framework layer to decode the video data and pass the decoded data to the corresponding layer (Surface).
[0086] Surfaceflinger is a special process in the system, which is mainly responsible for synthesizing all layers (Surface) used for display into the Frame buffer, and then the DDIC (Display Driver Integrated Circuit) of the screen component reads the Frame buffer to display the interface.
[0087] For example, Figure 1 Taking the display interface shown in the figure as an example, each component in the display interface corresponds to a layer (Surface). After decoding and obtaining the video data, the system Framework layer transmits the video data to the layer corresponding to the video window to obtain the layer data corresponding to the video layer, and combines the image data corresponding to other layers to perform layer synthesis to obtain the image data corresponding to the image to be displayed, and sends the image data to the Frame buffer. The DDIC of the screen component reads the image data in the Framebuffer and Figure 1 The display interface shown displays output on the screen.
[0088] As for the principles and processes of implementing video playback at the bottom layer of the operating system, those skilled in the art can undoubtedly understand and fully implement them in combination with relevant technologies, and the present disclosure will not elaborate on them.
[0089] like Figure 4 As shown, in some implementations, the video playback method of the present disclosure example includes:
[0090] S410: Set preset identification information in each frame of image data of the HDR video sequence.
[0091] S420. When performing layer synthesis on the current frame of the image to be displayed, in response to detecting that layer data corresponding to at least one layer of the image to be displayed includes preset identification information, enhancing the display brightness of the target image area on the image to be displayed.
[0092] In the embodiments of the present disclosure, the image to be displayed refers to a display interface image on the screen of an electronic device. It can be understood that a video is formed by continuous frames of images, and the display interface on the screen of an electronic device is also a single-frame image displayed continuously. The interface to be displayed described in the present disclosure is a single-frame image displayed on the display interface of the screen of an electronic device.
[0093] HDR video sequence refers to the HDR video data to be played. For example, when a user chooses to play a HDR video on an electronic device, the system can obtain the video data corresponding to the HDR video, which includes multiple consecutive frames of image data. Figure 3 As shown, after obtaining the HDR video sequence, the electronic device system can call a corresponding decoder to decode the HDR video sequence to obtain image data corresponding to each frame of the image.
[0094] From the above, we can know that for HDR videos in Dolby format, since Dolby officially does not open decoding permissions, the system can only call Dolby official decoding library for decoding. The image data obtained after decoding is no different from conventional SDR (Standard Dynamic Range) image data. Therefore, the system bottom layer cannot recognize Dolby video, and cannot accurately support local HDR effects.
[0095] Therefore, in the embodiments of the present disclosure, after the HDR video sequence is decoded, preset identification information may be written into each frame of image data obtained by decoding, and the preset identification information is used to identify the image data as HDR image data.
[0096] For example, in some implementations, a new Buffer may be created at the application framework layer, and each frame of decoded image data may be written into the Buffer, and preset identification information may be added to each frame of image data during the writing process.
[0097] It can be understood that the preset identification information can be any data information that can provide identification capabilities, such as a character string, etc. The present 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 the layer.
[0099] Combination Figure 1 As can be seen from the example, 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 synthesize the image to be displayed include not only the layers corresponding to the above-mentioned video window, but also the layers corresponding to other image areas.
[0100] In the embodiment of the present disclosure, for ease of explanation, the video playback area 110 on the image to be displayed is defined as the "target image area", so that one or more layers (Surface) corresponding to the target image area are "target layers"; the non-video playback area 120 is defined as the "non-target image area", so that one or more layers (Surface) corresponding to the non-target image area are "non-target layers".
[0101] When the system synthesizes the image to be displayed, it can obtain all layers included in the image to be displayed, and the layer data corresponding to each layer, which includes the target layer and the non-target layer. The process of obtaining the non-target layer and its layer data can be understood and implemented by those skilled in the art with reference to the relevant technology, and this disclosure will not elaborate on this.
[0102] After obtaining the data of each layer of the image to be displayed, the system can perform layer synthesis on each layer of the data based on the aforementioned Surfaceflinger process to obtain the image to be displayed. Figure 1 For example, the image to be displayed includes a non-target image corresponding to the non-target image area and a target image corresponding to the target image area. Then the Surfaceflinger process performs layer synthesis on the non-target image and the target layer to obtain the image data corresponding to the image to be displayed. Then the DDIC of the screen component is implemented based on the image data. Figure 1 The screen shown is displayed, and the user can see the image to be displayed on the screen.
[0103] In the embodiment of the present disclosure, while synthesizing each layer, the system will also detect 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 the preset identification information, it means that the image area corresponding to the layer is an HDR area, that is, the target image area described in the present disclosure. On the contrary, if the layer data of a certain layer does not carry the preset identification information, it means that the image area corresponding to the layer is a non-HDR area, that is, the non-target image area described in the present disclosure.
[0104] If it is detected that one or more layer data of the image to be displayed includes preset identification information, indicating that the current frame image to be displayed is an HDR image, then 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] In the above implementation process, the display process of a frame of image to be displayed is explained. For each frame of image in the HDR video sequence, the above process is repeated in sequence to achieve frame-by-frame playback of each frame of image to be displayed on the screen of the electronic device, and then the user can watch the HDR video through the screen of the electronic device.
[0106] In combination with the above, it can be understood that, taking Dolby video playback as an example, in the traditional solution, the bottom layer of the system cannot accurately identify the frame image of the Dolby video, resulting in the inability of Dolby video playback to correctly achieve the local HDR effect. In the embodiment of the present disclosure, preset identification information can be written into the image data of the Dolby video, and each frame image of the Dolby video can be accurately identified by identifying the preset identification information, thereby accurately achieving the local HDR effect. The process of locally brightening the display brightness of the target image area is described in the following embodiment of the present disclosure and will not be described in detail here.
[0107] From the above, it can be seen that in the embodiment of the present 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, and then correctly support the local HDR effect for the HDR video, improve the screen flickering and jitter problems caused by the inability to correctly support local HDR, and improve the user's viewing experience.
[0108] like Figure 5 As shown, in some embodiments, the video playback method of the present disclosure example, the process of setting preset identification information in each frame of image data of the HDR video sequence includes:
[0109] S411: In response to detecting that the video to be played is an HDR video, obtaining an HDR video sequence corresponding to the video to be played.
[0110] S412: Decode the HDR video sequence to obtain image data of each frame included in the HDR video sequence.
[0111] S413, writing each frame of image data into a preset cache, and writing preset identification information for each frame of image data into the preset cache.
[0112] Combination Figure 3 As shown, in the video playback scenario, the user can select the video he wants to watch through the video APP, that is, the video to be played. After the user selects the video to be played, the application program layer of the system obtains the video data corresponding to the video to be played based on the user operation.
[0113] For example, in one example, the video to be played is a video stored locally in the electronic device, so 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 example, the video to be played is an online video, so after the user selects the video to be played, the electronic device can receive the video data from the server through the network, and the system can obtain the video data of the video to be played based on the received data of the electronic device.
[0115] It is understandable that the video data played by the user can be an HDR video in HDR format or an ordinary video in non-HDR format (such as SDR video). Therefore, after obtaining the video data of the video to be played, the video data can be detected to determine whether the current video to be played is an HDR video.
[0116] In one example, whether the video to be played is an HDR video can be determined by detecting the video data format. For example, HDR video formats mainly include HDR 10, HDR 10+, HDR Vivid and Dolby Vision. Whether the video to be played is an HDR video can be determined by detecting whether the video data of the video to be played is in the above format.
[0117] When 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 during video playback through the method of the embodiment 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 to obtain the image data corresponding to each frame of the video image. In combination with the foregoing, it can be seen that in the embodiment of the present disclosure, it is necessary to write preset identification information in each frame of image data to identify that the image corresponding to the current image data is an HDR image.
[0119] In some embodiments, the system may create a new cache Buffer after the decoding service. The cache Buffer is the preset cache described in the present disclosure, and its function is to write preset identification information into each frame of image data during the process of writing the image data obtained after decoding into the cache Buffer.
[0120] Taking a frame of video image as an example, the image data corresponding to the frame of video image obtained by decoding can be written into a pre-established cache Buffer. When the data is written, the preset identification information is added in front of the image data, thereby realizing the writing of the 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 according to the data of each layer of the image to be displayed. Figure 6 Provide explanation.
[0122] like Figure 6As shown, in some implementations, the video playback method of the example of the present disclosure, the process of performing layer synthesis on the current frame to be displayed image includes:
[0123] S610: Acquire each layer included in the image to be displayed, and layer data corresponding to each layer.
[0124] S620: synthesize each layer based on the layer data corresponding to each layer to obtain an image to be displayed.
[0125] For example, in one example, the image to be displayed is Figure 1 Taking the figure as an example, it can be seen that the image to be displayed includes multiple image areas, each image area corresponds to a layer (Surface), that is, the image to be displayed is synthesized from multiple layers (Surface).
[0126] After the layers are synthesized, the various layers (Surfaces) included in the image to be displayed can be determined based on the image to be displayed, and then the layer data corresponding to each layer can be obtained. Figure 1 For example, the video play area 110 in the video playback area 110 corresponds to a target layer. For the current frame of the image to be displayed, the layer data in the target layer is the image data of a frame after the preset identification information is written. At the same time, the non-video play 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 synthesized based on the layer data to obtain the image data corresponding to the image to be displayed, and then the system sends the image data to the Frame buffer. The DDIC of the screen component reads the image data in the Frame buffer and controls the screen of the electronic device to display the image to be displayed corresponding to the image data. The display effect can be as follows: Figure 1 shown.
[0128] The above only illustrates the display process of one frame of video image in the HDR video. Those skilled in the art can understand that the HDR video can be played by repeating the above process for each frame of video image, and the present disclosure will not go into details about this.
[0129] In combination with the above, it can be seen that in the embodiment of the present disclosure, while synthesizing each layer (Surface) of the image to be displayed, it is also necessary to detect whether the layer data includes preset identification information. Figure 7 Provide explanation.
[0130] like Figure 7As shown, in some embodiments, the video playback method of the example of the present disclosure, in response to detecting that at least one layer data includes preset identification information, enhances the display brightness of the target image area on the image to be displayed, including:
[0131] S710: Detect 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 a target brightness.
[0132] S720: For a non-target layer corresponding to the layer data that does not include preset identification information, reduce the brightness of an image area corresponding to the non-target layer on the image to be displayed.
[0133] In combination with the above, it can be known that after obtaining the layer data of each layer included in the image to be displayed, the system can perform data detection on each layer data to detect whether the preset identification information is included in each layer data. Taking a layer data as an example, if the layer data carries the preset identification information, it means that the layer is the target layer, and the image area corresponding to it on the image to be displayed is the target image area, that is, the HDR area.
[0134] Therefore, when it is detected that any layer data carries preset identification information, that is, it is identified that the current frame image to be displayed includes an HDR area, the screen backlight of the electronic device can be controlled to be enhanced to the target brightness to improve the HDR display effect.
[0135] It is understandable that at the system software level, it is not possible to directly brighten the hardware pixels in a local area of the screen. Therefore, the overall backlight brightness of the screen can be increased, and then the brightness of the non-HDR area can be dimmed by masking or adjusting the grayscale of the non-HDR area to brighten the HDR area.
[0136] In some embodiments, through the aforementioned process, when it is detected that the layer data carries preset identification information, the layer corresponding to the layer data is determined as the target layer; when it is detected that the layer data does not carry the 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 in each layer of the image to be displayed, it means that the image to be displayed contains an HDR area, and 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 L to the target brightness L based on the preset magnification parameter n. 0 Increase to n*L 0 , the preset ratio parameter n can take values from 1 to 10.
[0138] In the case of enhancing the overall backlight of the screen, it is also necessary to darken the non-target image area corresponding to the non-target layer. For example, in one example, the grayscale value of the non-target image area corresponding to each non-target layer can be directly reduced. As the grayscale value is reduced, the brightness of the image presented in the non-target image area will be reduced. For example, in another example, a mask layer can be pre-set, and the mask layer is a grayscale layer. The grayscale layer is merged with the non-target layer, which can also achieve the effect of reducing the brightness of the non-target image area. Of course, those skilled in the art will understand that it is also possible to simultaneously reduce the grayscale value of the non-target layer and merge the mask layer, and the present disclosure will not go into details about this.
[0139] In the disclosed embodiment, the screen backlight is brightened as a whole to increase the screen brightness, while the non-target image area is dimmed to reduce the brightness of the non-HDR area of the image to be displayed. After the two are superimposed, the screen presentation effect of the electronic device is that the brightness of the HDR area of the image to be displayed is improved, thereby achieving a local HDR effect for the video playback area, thereby obtaining a better HDR video effect.
[0140] From the above, it can be seen that in the embodiment of the present 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, and then correctly support the local HDR effect for the HDR video, improve the screen flickering and jitter problems caused by the inability to correctly support local HDR, and improve the user's viewing experience.
[0141] It is worth noting that in the above Figure 1 In the video playback scene shown, the display interface includes a video playback area 110 and a non-video playback area 120, so that when the layer synthesis is performed on the current frame image to be displayed, it includes the target layer corresponding to the video playback area 110 and the non-target layer corresponding to the non-video playback area 120. Therefore, through the method process of the above implementation method, the preset identification information carried in the layer data of the target layer can be detected to achieve a local HDR effect.
[0142] Similarly, for the full-screen video playback scenario, that is, the display interface only includes the video playback area 110, but not the non-video playback area 120, when the layer synthesis is performed on the current frame image to be displayed, that is, only the target layer corresponding to the video playback area 110 is included. Therefore, through the method process of the above-mentioned implementation method, the preset identification information carried in the layer data of the target layer can be detected, and the layer data that does not carry the preset identification information will not be detected, so that the entire display interface can be brightened to achieve a full-screen HDR effect. The principle is the same as above, and those skilled in the art can understand this.
[0143] On the second aspect, an embodiment of the present disclosure provides a video playback device, which can be applied to an electronic device. The electronic device of the embodiment of the present disclosure can be any type of device suitable for implementation, such as a smart phone, a tablet computer, a display, an electronic screen, etc., and the present disclosure does not limit this.
[0144] like Figure 8 As shown, in some embodiments, the video playback device of the present disclosure example 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 a target image area on the image to be displayed when performing layer synthesis 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 preset identification information; the target image area is the area corresponding to the layer including the preset identification information, and the layer data corresponding to the layer including the preset identification information includes image data.
[0147] In one or more embodiments of the present disclosure, the brightness adjustment module 20 is configured as follows:
[0148] Detecting 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, controlling the screen backlight of the electronic device to be enhanced to a target brightness;
[0149] For a non-target layer corresponding to the layer data that does not include the preset identification information, the brightness of the image area corresponding to the non-target layer on the image to be displayed is reduced.
[0150] In one or more embodiments of the present disclosure, the brightness adjustment module 20 is configured as follows:
[0151] Based on the preset magnification parameters, the current brightness of the screen backlight of the electronic device is enhanced to the target brightness.
[0152] In one or more embodiments of the present disclosure, the brightness adjustment module 20 is configured as follows:
[0153] Reducing the grayscale value of the image area corresponding to the non-target layer on the image to be displayed; and / or,
[0154] The preset mask layer is merged into the image area corresponding to the non-target layer on the image to be displayed.
[0155] In one or more embodiments of the present 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, obtaining an HDR video sequence corresponding to the video to be played;
[0157] Decoding the HDR video sequence to obtain image data of each frame included in the HDR video sequence;
[0158] Each frame of image data is written into a preset cache, and preset identification information is written into the preset cache for each frame of image data.
[0159] In one or more embodiments of the present disclosure, the device further includes a layer synthesis module configured to:
[0160] Acquire each layer included in the image to be displayed, and layer data corresponding to each layer; wherein the image data corresponding to at least one layer among the layers includes image data;
[0161] Each layer is synthesized based on the layer data corresponding to each layer to obtain an image to be displayed.
[0162] In one or more implementations of the present disclosure, the video to be played includes a Dolby format video.
[0163] From the above, it can be seen that in the embodiment of the present 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, and then correctly support the local HDR effect for the HDR video, improve the screen flickering and jitter problems caused by the inability to correctly support local HDR, and improve the user's viewing experience.
[0164] In a third aspect, one or more embodiments of the present disclosure provide an electronic device, including:
[0165] Processor; and
[0166] The memory stores computer instructions, where the computer instructions are used to enable the processor to execute the method of any of the above embodiments.
[0167] In a fourth aspect, one or more embodiments of the present disclosure provide a storage medium storing computer instructions, where the computer instructions are used to enable a computer to execute a method of any of the above embodiments.
[0168] Fig. 9 The structure block diagram of the electronic device in some embodiments of the present disclosure is shown in FIG. The electronic device may be any electronic device in the aforementioned embodiments. Fig. 9 The principles related to electronic devices and storage media in some embodiments of the present disclosure are described.
[0169] Reference Fig. 9, the electronic device 1800 may include one or more of the following components: a processing component 1802 , a memory 1804 , a power 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] The processing component 1802 generally controls the overall operation of the electronic device 1800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1802 may include one or more processors 1820 to execute instructions. In addition, the processing component 1802 may include one or more modules to facilitate interaction between the processing component 1802 and other components. For example, the processing component 1802 may include a multimedia module to facilitate interaction between the multimedia component 1808 and the processing component 1802. For another example, the processing component 1802 may read executable instructions from a memory to implement electronic device related functions.
[0171] The memory 1804 is configured to store various types of data to support operations on the electronic device 1800. Examples of such data include instructions for any application or method operating on the electronic device 1800, contact data, phone book data, messages, pictures, videos, etc. The 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 memory, flash memory, magnetic disk or optical disk.
[0172] The power supply component 1806 provides power to the various components of the electronic device 1800. The 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 the electronic device 1800.
[0173] The multimedia component 1808 includes a display screen that provides an output interface between the electronic device 1800 and the user. In some embodiments, the multimedia component 1808 includes a front camera and / or a rear camera. When the electronic device 1800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0174] The audio component 1810 is configured to output and / or input audio signals. For example, the audio component 1810 includes a microphone (MIC), and when the electronic device 1800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1804 or sent via the communication component 1818. In some embodiments, the 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 button, volume button, start button, and lock button.
[0176] The sensor assembly 1816 includes one or more sensors for providing various aspects of status assessment for the electronic device 1800. For example, the sensor assembly 1816 can detect the open / closed state of the electronic device 1800, the relative positioning of components, such as the display and keypad of the electronic device 1800, and the sensor assembly 1816 can also detect the position change of the electronic device 1800 or a component of the electronic device 1800, the presence or absence of user contact with the electronic device 1800, the orientation or acceleration / deceleration of the electronic device 1800, and the temperature change of the electronic device 1800. The sensor assembly 1816 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1816 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1816 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0177] The communication component 1818 is configured to facilitate wired or wireless communication between the electronic device 1800 and other devices. The electronic device 1800 can access a wireless network based on a communication standard, such as Wi-Fi, 2G, 3G, 4G, 5G or 6G, or a combination thereof. In an exemplary embodiment, the communication component 1818 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1818 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can 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 the purpose of clear explanation, and are not intended to limit the embodiments. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.
Claims
1. A video playback method, characterized in that: Applied to electronic equipment, the method comprises: Setting preset identification information in each frame of image data of the HDR video sequence; When performing layer synthesis 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 including the preset identification information, and the layer data corresponding to the layer including the preset identification information includes the image data.
2. The method according to claim 1, characterized in that 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, enhancing the display brightness of the target image area on the image to be displayed includes: Detecting 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 the preset identification information, controlling the screen backlight of the electronic device to be enhanced to a target brightness; For a non-target layer corresponding to the layer data that does not include the preset identification information, the brightness of an image area corresponding to the non-target layer on the image to be displayed is reduced.
3. The method according to claim 2, characterized in that Controlling the screen backlight of the electronic device to be enhanced to a target brightness includes: Based on the 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: The step of reducing the brightness of the image area corresponding to the non-target layer on the image to be displayed includes: reducing the grayscale value of the image area corresponding to the non-target layer 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 of the HDR video sequence includes: In response to detecting that the video to be played is an HDR video, obtaining an HDR video sequence corresponding to the video to be played; Decoding the HDR video sequence to obtain image data of each frame included in 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 compositing the layers of the image to be displayed in the current frame includes: Acquire each layer included in the image to be displayed, and layer data corresponding to each layer; wherein the image data corresponding to at least one layer among the each layer includes the image data; The layers are synthesized based on the layer data corresponding to the layers to obtain the image to be displayed.
7. The method according to claim 5, characterized in that The video to be played includes a Dolby format video.
8. A video playback device, characterized in that: Applied to electronic equipment, the device comprises: An information identification module is configured to set preset identification information in each frame of image data of the HDR video sequence; The brightness adjustment module is configured to enhance the display brightness of a target image area on the image to be displayed when performing layer synthesis 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 target image area is the area corresponding to the layer including the preset identification information, and the layer data corresponding to the layer including the preset identification information includes the image data.
9. An electronic device, characterized in that: include: processor; and A memory storing computer instructions, wherein the computer instructions are used to enable the processor to execute the method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: Computer instructions are stored, and the computer instructions are used to make a computer execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Reverse tone mapping algorithm based on frequency domain
CN104463820A
Layer processing method, layer processing device, electronic equipment and computer readable medium
CN110362186A
Image display method and device, electronic equipment and storage medium
CN111338744A
Image tone mapping method and device, electronic equipment and storage medium
CN115409717A
Cited By
Image display method and apparatus, and device and medium
WO2026189228A1
