CN117376715A - Video editing method and device and electronic equipment - Google Patents

Video editing method and device and electronic equipment Download PDF

Info

Publication number
CN117376715A
CN117376715A CN202311372749.4A CN202311372749A CN117376715A CN 117376715 A CN117376715 A CN 117376715A CN 202311372749 A CN202311372749 A CN 202311372749A CN 117376715 A CN117376715 A CN 117376715A
Authority
CN
China
Prior art keywords
color value
dynamic range
editing
high dynamic
display information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311372749.4A
Other languages
Chinese (zh)
Inventor
钟昌勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202311372749.4A priority Critical patent/CN117376715A/en
Publication of CN117376715A publication Critical patent/CN117376715A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors

Abstract

The application discloses a video editing method and device and electronic equipment, and belongs to the technical field of image processing. The method comprises the following steps: receiving an editing input of the high dynamic range video, wherein the editing input is used for indicating to edit a target multimedia resource in the high dynamic range video, responding to the editing input, acquiring first display information of the target multimedia resource in a standard dynamic range under the condition that an editing function corresponding to the editing input is a first type of editing function, adjusting the target multimedia resource in the high dynamic range video based on the first display information, so that the display information of the target multimedia resource in the high dynamic range video is adjusted from the first display information to second display information, and editing the high dynamic range video by utilizing the adjusted target multimedia resource.

Description

Video editing method and device and electronic equipment
Technical Field
The application belongs to the technical field of image processing, and particularly relates to a video editing method and device and electronic equipment.
Background
Nowadays, with the continuous development of the performance and imaging capabilities of terminal devices, more and more users choose to shoot high dynamic range (High Dynamic Range, HDR) video with more color rendering capabilities through the terminal devices than simple standard dynamic range (Standard Dynamic Range, SDR) video.
However, since many terminal devices are equipped with only an editing function for adapting to the SDR video, if the HDR video needs to be edited on the terminal device, the HDR video needs to be converted into the SDR video and then edited, so that the color quality of the HDR video is reduced by editing the HDR video.
Disclosure of Invention
The embodiment of the application aims to provide a video editing method, a video editing device and electronic equipment, which can solve the technical problem that the color quality of a video is easy to be reduced in the existing editing operation of a high-dynamic-range video.
In a first aspect, an embodiment of the present application provides a method for editing video, where the method includes:
receiving an editing input to a high dynamic range video, the editing input being used to indicate editing of a target multimedia asset in the high dynamic range video;
responding to the editing input, and acquiring first display information of the target multimedia resource in a standard dynamic range under the condition that an editing function corresponding to the editing input is a first type editing function, wherein the first type editing function is an editing function related to the bit depth of a color channel of the target multimedia resource;
Adjusting the target multimedia resources in the high dynamic range video based on the first display information, so that the display information of the target multimedia resources in the high dynamic range video is adjusted from the first display information to second display information, wherein the second display information is in a high dynamic range;
and editing the high dynamic range video by utilizing the adjusted target multimedia resource.
In a second aspect, an embodiment of the present application provides an editing apparatus for video, including:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving editing input of a high dynamic range video, and the editing input is used for indicating editing of a target multimedia resource in the high dynamic range video;
the response module is used for responding to the editing input, and acquiring first display information of the target multimedia resource in a standard dynamic range under the condition that the editing function corresponding to the editing input is a first type editing function, wherein the first type editing function is an editing function related to the bit depth of a color channel of the target multimedia resource;
the adjustment module is used for adjusting the target multimedia resources in the high dynamic range video based on the first display information so as to adjust the display information of the target multimedia resources in the high dynamic range video from the first display information to second display information, wherein the second display information is the display information in the high dynamic range;
And the editing module is used for editing the high dynamic range video by utilizing the adjusted target multimedia resource.
In a third aspect, embodiments of the present application provide an electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the method as provided in the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of the method as provided in the first aspect.
In a fifth aspect, embodiments of the present application provide a chip comprising a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to execute programs or instructions to implement a method as provided in the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executable by at least one processor to implement a method as provided in the first aspect.
In the video editing method, device and electronic equipment, the editing input of the high dynamic range video can be received and responded, and under the condition that the editing function corresponding to the editing input is a first editing function related to the bit depth of the color channel of the target multimedia resource, the first display information of the target multimedia resource in the standard dynamic range of the editing input is acquired; adjusting the target multimedia resource in the high dynamic range video based on the first display information, so that the display information of the target multimedia resource in the high dynamic range video is adjusted from the first display information to second display information, wherein the second display information is in the high dynamic range; and then editing the high dynamic range video by utilizing the adjusted target multimedia resources. In this way, the dynamic range of the display information of the target multimedia resource can be adjusted from the standard dynamic range to the high dynamic range, and the adjusted target multimedia resource is used for editing the high dynamic range video. The high dynamic range video can be edited without converting the high dynamic range video into a standard dynamic range video, so that the loss of color quality and color accuracy of the video can be eliminated or reduced.
Drawings
Fig. 1 is a flowchart of a video editing method according to an embodiment of the present application;
fig. 2 is a flowchart of a video editing method according to another embodiment of the present application;
fig. 3 is a schematic structural diagram of an editing apparatus for video according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to another embodiment of the present application;
fig. 5 is a schematic hardware structure of an electronic device provided in an embodiment of the present application.
Detailed Description
Technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application are within the scope of the protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or otherwise described herein, and that the objects identified by "first," "second," etc. are generally of a type and do not limit the number of objects, for example, the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
In order to solve the technical problems, the application provides a video editing method. The video editing method provided by the embodiment of the application is described in detail below through specific embodiments and application scenes thereof with reference to the accompanying drawings.
As shown in fig. 1, fig. 1 is a flowchart of a video editing method according to an embodiment of the present application, where the method may include:
s101, receiving editing input of a high dynamic range video, wherein the editing input is used for indicating editing of a target multimedia resource in the high dynamic range video;
in this embodiment, the video editing method is applied to a terminal device capable of editing only SDR video. The user may add the target multimedia asset to the high dynamic range video by making an edit input to the high dynamic range video. The target multimedia assets may include text, pictures, frame animations, and the like.
S102, responding to the editing input, and acquiring first display information of the target multimedia resource in a standard dynamic range under the condition that an editing function corresponding to the editing input is a first type editing function, wherein the first type editing function is an editing function related to the bit depth of a color channel of the target multimedia resource;
In this embodiment, editing of video includes a plurality of editing functions, and different editing functions have different features. Specifically, the editing functions may be divided into a first type editing function and a second type editing function. The first editing function bit is sensitive to the bit depth of the color channel, for example, editing operation of mapping adjustment to each brightness level or color level of the target multimedia resource one by one is needed. The second class editing function is an editing function which is irrelevant to the specific numerical value of the bit depth of the color channel of the target multimedia resource, that is, the second class editing function is insensitive to the bit depth of the color channel, and in the process of realizing the second class editing function, each brightness level of the target multimedia resource can be normalized to a numerical value between 0 and 1 no matter the bit depth of the target multimedia resource is 8 bits, 16 bits or 32 bits for editing operation. Illustratively, the second type of editing function includes enlarging, reducing, cropping, or entirely reducing or increasing the brightness of the target multimedia asset by a fixed factor.
After receiving the editing input, if the editing function corresponding to the editing input is detected to be the second type editing function, the target multimedia resource can be directly edited into the high dynamic range video according to the same processing mode as the SDR video; if the editing function corresponding to the editing input is detected to be the first editing function, first display information of the target multimedia resource in the standard dynamic range needs to be adjusted, so that the adjusted target multimedia resource is adapted to the dynamic range of the HDR video, and the display information can comprise color or brightness.
And S103, adjusting the target multimedia resources in the high dynamic range video based on the first display information, so that the display information of the target multimedia resources in the high dynamic range video is adjusted from the first display information to second display information, wherein the second display information is in a high dynamic range.
In this embodiment of the present application, if it is detected that the editing function corresponding to the editing input is a first type editing function, in order to enable the target multimedia resource to adapt to the dynamic range of the HDR video, the display information of the target multimedia resource may be adjusted from the first display information to the second display information, where the first display information is display information in the standard dynamic range, and the second display information is display information in the high dynamic range. The adjusted target multimedia resource can thus be adapted to the HDR video.
S104, editing the high dynamic range video by utilizing the adjusted target multimedia resource.
In the embodiment of the application, after the display information of the target multimedia resource is adjusted, the target multimedia resource can be edited into the high dynamic range video according to the same processing mode as the SDR video.
As an optional embodiment, the terminal device includes an editing application program for editing the video, where the editing application program may receive an input video file, determine whether the video file is an SDR video or an HDR video, and if the video is an SDR video, directly perform an editing operation on the SDR video based on the editing input; if the video is an HDR video, it is necessary to further determine whether the editing function corresponding to the editing input is the first type editing function or the second type editing function. If the second editing function is the second editing function, the target multimedia resource can be edited into the high dynamic range video in the same processing mode as the SDR video; if the editing function is the first editing function, the display information of the target multimedia resource is required to be adjusted from the first display information of the SDR to the second display information of the HDR, and then the adjusted target multimedia resource can be edited into the high dynamic range video according to the same processing mode as the SDR video.
In the application, the first display information of the target multimedia resource in the standard dynamic range can be obtained by receiving and responding to the editing input of the high dynamic range video, and under the condition that the editing function corresponding to the editing input is a first type of editing function irrelevant to the bit depth of the color channel of the target multimedia resource; adjusting the target multimedia resource in the high dynamic range video based on the first display information, so that the display information of the target multimedia resource in the high dynamic range video is adjusted from the first display information to second display information, wherein the second display information is in the high dynamic range; and then editing the high dynamic range video by utilizing the adjusted target multimedia resources. In this way, the dynamic range of the display information of the target multimedia resource can be adjusted from the standard dynamic range to the high dynamic range, and the adjusted target multimedia resource is used for editing the high dynamic range video. The high dynamic range video can be edited without converting the high dynamic range video into a standard dynamic range video, so that the loss of color quality and color accuracy of the video can be eliminated or reduced.
In some embodiments, S103 comprises:
and under the condition that the target multimedia resource is a character, adjusting the color value of the character from a first color value to a second color value based on a preset first mapping relation, wherein the display information comprises the color value, the first color value is a color value in a standard dynamic range, and the second color value is a color value in a high dynamic range.
In this embodiment, the target multimedia resource may be text, and the display information may be a color value of the text. The first mapping relationship may be a mapping relationship related to a color value of the text, which is set in advance by a user.
And under the condition that the target multimedia resource is a character, the first color value of the character is a color value in a standard dynamic range, and a second color value corresponding to the first color value can be inquired in a first mapping relation set in advance, wherein the second color value is a color value in a high dynamic range. The text of the second color value is then edited into the HDR video.
In addition, in the process of converting text from SDR to HDR in the related art, the color of the text is directly stretched, for example, the color bit depth in the SDR range is 8 bits, so that the text has 256 color levels, and the color bit depth in the HDR range is 10 bits, so that the text has 1024 color levels. If the first color value of the text is 255, the color value of the text is adjusted to 1023 by direct stretching. In this way, too high brightness of the text on the screen may cause poor display effect.
Therefore, adjusting the color value of the text through the first mapping relation is equivalent to performing dark processing on the basis of directly stretching the color value, so as to reduce the overall brightness level of the stretched color value.
In this embodiment, the color of the text may be adjusted based on the first mapping relationship, so as to improve the color range of the text, so that the adjusted text may be adapted to the HDR video, and the color value of the text is prevented from being directly stretched to a higher level, so that the brightness of the text on the screen is too high, and the display effect is poor.
In some embodiments, S103 further comprises:
and when the target multimedia resource is a frame animation, adjusting the color value of the frame animation from a first color value interval to a second color value interval based on a preset second mapping relation, wherein the display information comprises color values, the first color value interval is a color value interval in a standard dynamic range, and the second color value interval is a color value interval in a high dynamic range.
In this embodiment, the target multimedia resource may be a frame animation, and the display information may be a color value interval of the frame animation. The second mapping relationship may be a mapping relationship related to a color value of the frame animation, which is set in advance by a user.
When the target multimedia resource is the frame animation, the first color value interval of the frame animation comprises a plurality of third color values, and the plurality of third color values are all color values in the standard dynamic range, so that the first color value interval is the color value interval in the standard dynamic range, and a plurality of fourth color values corresponding to the plurality of third color values in the first color value interval can be queried in a second mapping relation set in advance, wherein the fourth color values are all color values in the high dynamic range. Therefore, the second color value interval corresponding to the plurality of fourth color values is also a color value interval in the high dynamic range.
In this embodiment, the color of the frame animation may be adjusted based on the second mapping relationship, so as to improve the color range of the frame animation, so that the adjusted frame animation can be adapted to the HDR video.
In some embodiments, the frame animation includes a plurality of image frames, and the adjusting the color value of the frame animation from the first color value interval to the second color value interval based on the preset second mapping relationship includes:
separating a target image frame including a transparency channel into a transparency channel layer and a color channel layer in the case that the target image frame exists among the plurality of image frames;
Adjusting the color value of the color channel layer from a first color value interval to a second color value interval based on a preset second mapping relation;
fusing the transparency channel image layer and the adjusted color channel image layer to obtain a target image frame with a high dynamic range;
and generating a high dynamic range frame animation according to the high dynamic range target image frame.
In this embodiment, the frame animation is composed of a plurality of image frames, and the dynamic effect generated by fast switching of the plurality of image frames is the frame animation. Therefore, the color value intervals of the frame animation, that is, the color value intervals of the plurality of image frames are adjusted.
For each image frame, a color channel, and possibly a transparency channel, is included. The color channel refers to a channel containing color information in an image. Typically, the color channels include red (R), green (G), and blue (B) channels. Each channel represents the brightness level of the corresponding color. By combining the brightness levels of these channels, various colors in the image can be created. The transparency channel is an additional channel for controlling the transparency level of each pixel in the image. Illustratively, the value of the transparency channel is typically between 0 and 1, where 0 indicates complete transparency and 1 indicates complete opacity.
For each target image frame containing a transparency channel in the frame animation, if the color value of the target image frame is directly adjusted, the value of the transparency channel cannot be completely saved in the adjustment process, so that the transparency information of the target image frame is lost in the color value adjustment process.
In order to avoid the loss of transparency information, each target image frame may be separated into a transparency channel layer containing transparency information and a color channel layer containing color information, and then the color value of the color channel layer is adjusted from a first color value interval to a second color value interval based on a preset second mapping relationship, and the adjusted color channel layer and the transparency channel layer are fused.
For example, the conversion of the frame animation from the first color value interval to the second color value interval may be implemented by a 3D Lut algorithm.
Therefore, the dynamic range of the frame animation can be ensured to be converted from SDR to HDR, so that a wider illumination range and a better color expression effect are displayed, the HDR video is adapted, and the loss of transparency information is avoided.
In some embodiments, the frame animation includes a plurality of image frames, the adjusting the color value of the frame animation from the first color value interval to the second color value interval based on the preset second mapping relationship, further includes:
And when the target image frames containing the transparency channels do not exist in the plurality of image frames, adjusting the color values of the frame animation from the first color value interval to the second color value interval based on a preset second mapping relation.
In this embodiment, if the frame animation does not include the target image frame including the transparency channel, the color value of the frame animation may be directly adjusted from the first color value interval to the second color value interval based on the preset second mapping relationship, so as to adapt to the editing operation of the HDR video.
In an embodiment, the present embodiment provides a video editing method, as shown in fig. 2, the method may include:
s201, input video: video input from an external application may be received.
S202, HDR or SDR: after receiving a video input by an external application, it is necessary to determine whether the video is an SDR video or an HDR video.
S203, selecting an editing function: if the input video is an HDR video, a further selection of an edit function corresponding to the edit input to the HDR video is required.
S204, whether special processing is required: after determining the editing function, it is determined whether special processing is required for the target multimedia asset to be edited into the HDR video before the HDR video is edited by applying the editing function.
S205, whether the text is: if special processing is needed, whether the target multimedia resource is text is further judged.
S206, whether the animation is frame animation: if the target multimedia resource is not text, judging whether the target multimedia resource is frame animation.
S207, whether transparency is included: if the target multimedia resource is a frame animation, further judging whether the frame animation contains transparency.
S208, transparency separation: if the frame animation contains transparency, the color channel and the transparency channel of the frame animation can be separated, then the color value of the separated color value channel is adjusted, and the transparency channel and the color channel are combined after the adjustment.
S209, brightness is darkened: if the target multimedia resource is a character, the color value of the character is adjusted, and compared with the color mapping from SDR to HDR, the color value of the character is subjected to dark processing;
s210, SDR2HDR: in a color channel, the color values of the color channel layer are changed by an SDR2HDR algorithm.
S211, general processing: if the target multimedia resource is neither text nor frame animation, the effect of the editing target multimedia resource algorithm indicated by editing input on the HDR video or the SDR video is consistent, and the display information of the target multimedia resource in the high dynamic range video is not required to be adjusted, and the corresponding algorithm processing of editing input is directly carried out on the HDR video according to the general editing algorithm.
Similarly, when the input video is the SDR video, the input video is directly edited and input corresponding algorithm processing is carried out on the SDR video according to a general editing algorithm.
S212, storing video: after editing the target multimedia resource in the video, storing the edited video.
Fig. 3 is a schematic structural diagram of a video editing apparatus according to another embodiment of the present application, and as shown in fig. 3, the video editing apparatus may include:
a receiving module 301, configured to receive an editing input for a high dynamic range video, where the editing input is used to instruct editing of a target multimedia resource in the high dynamic range video;
the response module 302 is configured to respond to the editing input, and obtain, when an editing function corresponding to the editing input is a first type editing function, first display information of the target multimedia resource in a standard dynamic range, where the first type editing function is an editing function related to a bit depth of a color channel of the target multimedia resource;
the adjustment module 303 is configured to adjust, based on the first display information, the target multimedia resource in the high dynamic range video, so that the display information of the target multimedia resource in the high dynamic range video is adjusted from the first display information to second display information, where the second display information is display information in the high dynamic range;
And the editing module 304 is configured to edit the high dynamic range video by using the adjusted target multimedia resource.
In the application, the first display information of the target multimedia resource in the standard dynamic range can be obtained under the condition that the editing function corresponding to the editing input is a first type editing function irrelevant to the bit depth of the color channel of the target multimedia resource; adjusting the target multimedia resource in the high dynamic range video based on the first display information, so that the display information of the target multimedia resource in the high dynamic range video is adjusted from the first display information to second display information, wherein the second display information is in the high dynamic range; and then editing the high dynamic range video by utilizing the adjusted target multimedia resources. In this way, the dynamic range of the display information of the target multimedia resource can be adjusted from the standard dynamic range to the high dynamic range, and the adjusted target multimedia resource is used for editing the high dynamic range video. The high dynamic range video can be edited without converting the high dynamic range video into a standard dynamic range video, so that the loss of color quality and color accuracy of the video can be eliminated or reduced.
In another alternative example, the adjustment module 303 includes:
and the first adjusting unit is used for adjusting the color value of the text from a first color value to a second color value based on a preset first mapping relation when the target multimedia resource is the text, wherein the display information comprises the color value, the first color value is the color value in the standard dynamic range, and the second color value is the color value in the high dynamic range.
In another alternative example, the adjustment module 303 includes:
and the second adjusting unit is used for adjusting the color value of the frame animation from a first color value interval to a second color value interval based on a preset second mapping relation when the target multimedia resource is the frame animation, wherein the display information comprises the color value, the first color value interval is a color value interval in a standard dynamic range, and the second color value interval is a color value interval in a high dynamic range.
In another alternative example, the second adjusting unit includes:
a separation subunit configured to, in a case where a target image frame including a transparency channel exists among the plurality of image frames, separate the target image frame into a transparency channel layer and a color channel layer;
The first adjusting subunit is used for adjusting the color value of the color channel layer from a first color value interval to a second color value interval based on a preset second mapping relation;
a fusion subunit, configured to fuse the transparency channel layer and the adjusted color channel layer to obtain a target image frame with a high dynamic range;
and the generation subunit is used for generating a frame animation with high dynamic range according to the target image frame with high dynamic range.
In another alternative example, the second adjusting unit includes:
and a second adjustment subunit, configured to adjust, when a target image frame including a transparency channel does not exist in the plurality of image frames, a color value of the frame animation from a first color value interval to a second color value interval based on a preset second mapping relationship.
The video editing apparatus in the embodiment of the present application may be an electronic device, or may be a component in an electronic device, for example, an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. The electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a mobile internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., a server, a network attached storage (NetworkAttached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which are not limited in particular embodiments of the present application.
The video editing apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
The video editing apparatus provided in the embodiment of the present application can implement each process implemented by the method embodiment of fig. 1, and in order to avoid repetition, a description is omitted here.
Optionally, as shown in fig. 4, the embodiment of the present application further provides an electronic device 400, including a processor 410, a memory 409, and a program or an instruction stored in the memory 409 and capable of being executed on the processor 410, where the program or the instruction implements each process of the embodiment of the video editing method when executed by the processor 410, and the same technical effects are achieved, and for avoiding repetition, a description is omitted herein.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device.
Referring to fig. 5 in combination, fig. 5 is a schematic hardware structure of an electronic device implementing an embodiment of the present application. The electronic device 500 includes, but is not limited to: radio frequency unit 501, network module 502, audio output unit 503, input unit 504, sensor 505, display unit 506, user input unit 507, interface unit 508, memory 509, and processor 510.
Those skilled in the art will appreciate that the electronic device 500 may further include a power source (e.g., a battery) for powering the various components, and that the power source may be logically coupled to the processor 510 via a power management system to perform functions such as managing charging, discharging, and power consumption via the power management system. The electronic device structure shown in fig. 5 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
Wherein the input unit 504 is configured to receive an editing input for a high dynamic range video, the editing input being configured to instruct editing of a target multimedia asset in the high dynamic range video;
the processor 510 is configured to respond to the editing input, and obtain, when an editing function corresponding to the editing input is a first type editing function, first display information of the target multimedia resource in a standard dynamic range, where the first type editing function is an editing function related to a bit depth of a color channel of the target multimedia resource;
the processor 510 is configured to adjust, based on the first display information, the target multimedia resource in the high dynamic range video, so that the display information of the target multimedia resource in the high dynamic range video is adjusted from the first display information to second display information, where the second display information is display information in the high dynamic range;
And a processor 510, configured to edit the high dynamic range video by using the adjusted target multimedia resource.
In the application, the first display information of the target multimedia resource in the standard dynamic range can be obtained under the condition that the editing function corresponding to the editing input is a first type editing function irrelevant to the bit depth of the color channel of the target multimedia resource; adjusting the target multimedia resource in the high dynamic range video based on the first display information, so that the display information of the target multimedia resource in the high dynamic range video is adjusted from the first display information to second display information, wherein the second display information is in the high dynamic range; and then editing the high dynamic range video by utilizing the adjusted target multimedia resources. In this way, the dynamic range of the display information of the target multimedia resource can be adjusted from the standard dynamic range to the high dynamic range, and the adjusted target multimedia resource is used for editing the high dynamic range video. The high dynamic range video can be edited without converting the high dynamic range video into a standard dynamic range video, so that the loss of color quality and color accuracy of the video can be eliminated or reduced.
In another alternative example, the processor 510 includes:
and the first adjusting unit is used for adjusting the color value of the text from a first color value to a second color value based on a preset first mapping relation when the target multimedia resource is the text, wherein the display information comprises the color value, the first color value is the color value in the standard dynamic range, and the second color value is the color value in the high dynamic range.
In another alternative example, the processor 510 includes:
and the second adjusting unit is used for adjusting the color value of the frame animation from a first color value interval to a second color value interval based on a preset second mapping relation when the target multimedia resource is the frame animation, wherein the display information comprises the color value, the first color value interval is a color value interval in a standard dynamic range, and the second color value interval is a color value interval in a high dynamic range.
In another alternative example, the second adjusting unit includes:
a separation subunit configured to, in a case where a target image frame including a transparency channel exists among the plurality of image frames, separate the target image frame into a transparency channel layer and a color channel layer;
The first adjusting subunit is used for adjusting the color value of the color channel layer from a first color value interval to a second color value interval based on a preset second mapping relation;
a fusion subunit, configured to fuse the transparency channel layer and the adjusted color channel layer to obtain a target image frame with a high dynamic range;
and the generation subunit is used for generating a frame animation with high dynamic range according to the target image frame with high dynamic range.
In another alternative example, the second adjusting unit includes:
and a second adjustment subunit, configured to adjust, when a target image frame including a transparency channel does not exist in the plurality of image frames, a color value of the frame animation from a first color value interval to a second color value interval based on a preset second mapping relationship.
It should be appreciated that in embodiments of the present application, the input unit 504 may include a graphics processor (Graphics Processing Unit, GPU) 5051 and a microphone 5042, with the graphics processor 5051 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 507 includes at least one of a touch panel 5071 and other input devices 5072. Touch panel 5071, also referred to as a touch screen. Touch panel 5071 may include two parts, a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
The memory 509 may be used to store software programs as well as various data. The memory 509 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 509 may include volatile memory or nonvolatile memory, or the memory 509 may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (RandomAccess Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). Memory 129 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
Processor 510 may include one or more processing units; optionally, the processor 510 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, etc., and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 510.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored, where the program or the instruction implements each process of the video editing method embodiment when executed by a processor, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here.
The processor is a processor in the electronic device in the above embodiment. Readable storage media include computer readable storage media such as computer readable memory ROM, random access memory RAM, magnetic or optical disks, and the like.
The embodiment of the application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running a program or instructions, each process of the video editing method embodiment is implemented, the same technical effect can be achieved, and in order to avoid repetition, the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
The embodiments of the present application provide a computer program product stored in a storage medium, where the program product is executed by at least one processor to implement the respective processes of the video editing method embodiment as described above, and achieve the same technical effects, and are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (11)

1. A method of editing video, comprising:
receiving an editing input to a high dynamic range video, the editing input being used to indicate editing of a target multimedia asset in the high dynamic range video;
responding to the editing input, and acquiring first display information of the target multimedia resource in a standard dynamic range under the condition that an editing function corresponding to the editing input is a first type editing function, wherein the first type editing function is an editing function related to the bit depth of a color channel of the target multimedia resource;
adjusting the target multimedia resources in the high dynamic range video based on the first display information, so that the display information of the target multimedia resources in the high dynamic range video is adjusted from the first display information to second display information, wherein the second display information is in a high dynamic range;
and editing the high dynamic range video by utilizing the adjusted target multimedia resource.
2. The method of claim 1, wherein adjusting the target multimedia asset in the high dynamic range video based on the first display information comprises:
And under the condition that the target multimedia resource is a character, adjusting the color value of the character from a first color value to a second color value based on a preset first mapping relation, wherein the display information comprises the color value, the first color value is a color value in a standard dynamic range, and the second color value is a color value in a high dynamic range.
3. The method of claim 1, wherein adjusting the target multimedia asset in the high dynamic range video based on the first display information comprises:
and when the target multimedia resource is a frame animation, adjusting the color value of the frame animation from a first color value interval to a second color value interval based on a preset second mapping relation, wherein the display information comprises color values, the first color value interval is a color value interval in a standard dynamic range, and the second color value interval is a color value interval in a high dynamic range.
4. A method according to claim 3, wherein the frame animation comprises a plurality of image frames, and the adjusting the color value of the frame animation from the first color value interval to the second color value interval based on the preset second mapping relationship comprises:
Separating a target image frame including a transparency channel into a transparency channel layer and a color channel layer in the case that the target image frame exists among the plurality of image frames;
adjusting the color value of the color channel layer from a first color value interval to a second color value interval based on a preset second mapping relation;
fusing the transparency channel image layer and the adjusted color channel image layer to obtain a target image frame with a high dynamic range;
and generating a high dynamic range frame animation according to the high dynamic range target image frame.
5. The method of claim 3, wherein the frame animation comprises a plurality of image frames, wherein the adjusting the color value of the frame animation from a first color value interval to a second color value interval based on a preset second mapping relationship further comprises:
and when the target image frames containing the transparency channels do not exist in the plurality of image frames, adjusting the color values of the frame animation from the first color value interval to the second color value interval based on a preset second mapping relation.
6. An editing apparatus for video, comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving editing input of a high dynamic range video, and the editing input is used for indicating editing of a target multimedia resource in the high dynamic range video;
The response module is used for responding to the editing input, and acquiring first display information of the target multimedia resource in a standard dynamic range under the condition that the editing function corresponding to the editing input is a first type editing function, wherein the first type editing function is an editing function related to the bit depth of a color channel of the target multimedia resource;
the adjustment module is used for adjusting the target multimedia resources in the high dynamic range video based on the first display information so as to adjust the display information of the target multimedia resources in the high dynamic range video from the first display information to second display information, wherein the second display information is the display information in the high dynamic range;
and the editing module is used for editing the high dynamic range video by utilizing the adjusted target multimedia resource.
7. The apparatus of claim 6, wherein the adjustment module comprises:
and the first adjusting unit is used for adjusting the color value of the text from a first color value to a second color value based on a preset first mapping relation when the target multimedia resource is the text, wherein the display information comprises the color value, the first color value is the color value in the standard dynamic range, and the second color value is the color value in the high dynamic range.
8. The apparatus of claim 6, wherein the adjustment module comprises:
and the second adjusting unit is used for adjusting the color value of the frame animation from a first color value interval to a second color value interval based on a preset second mapping relation when the target multimedia resource is the frame animation, wherein the display information comprises the color value, the first color value interval is a color value interval in a standard dynamic range, and the second color value interval is a color value interval in a high dynamic range.
9. The apparatus of claim 8, wherein the second adjustment unit comprises:
a separation subunit configured to, in a case where a target image frame including a transparency channel exists among the plurality of image frames, separate the target image frame into a transparency channel layer and a color channel layer;
the first adjusting subunit is used for adjusting the color value of the color channel layer from a first color value interval to a second color value interval based on a preset second mapping relation;
a fusion subunit, configured to fuse the transparency channel layer and the adjusted color channel layer to obtain a target image frame with a high dynamic range;
And the generation subunit is used for generating a frame animation with high dynamic range according to the target image frame with high dynamic range.
10. The apparatus of claim 8, wherein the second adjustment unit comprises:
and a second adjustment subunit, configured to adjust, when a target image frame including a transparency channel does not exist in the plurality of image frames, a color value of the frame animation from a first color value interval to a second color value interval based on a preset second mapping relationship.
11. An electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the video editing method of any of claims 1-5.
CN202311372749.4A 2023-10-20 2023-10-20 Video editing method and device and electronic equipment Pending CN117376715A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311372749.4A CN117376715A (en) 2023-10-20 2023-10-20 Video editing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311372749.4A CN117376715A (en) 2023-10-20 2023-10-20 Video editing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN117376715A true CN117376715A (en) 2024-01-09

Family

ID=89388758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311372749.4A Pending CN117376715A (en) 2023-10-20 2023-10-20 Video editing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN117376715A (en)

Similar Documents

Publication Publication Date Title
US10593018B2 (en) Picture processing method and apparatus, and storage medium
WO2020063030A1 (en) Theme color adjusting method and apparatus, storage medium, and electronic device
US20190313071A1 (en) Dynamic chroma key for video background replacement
US11190653B2 (en) Techniques for capturing an image within the context of a document
US10613622B2 (en) Method and device for controlling virtual reality helmets
CN113362426B (en) Image editing method and image editing device
CN109859328B (en) Scene switching method, device, equipment and medium
CN117376715A (en) Video editing method and device and electronic equipment
CN113805709A (en) Information input method and device
CN113379866A (en) Wallpaper setting method and device
CN113364915A (en) Information display method and device and electronic equipment
CN114390205B (en) Shooting method and device and electronic equipment
CN113923367B (en) Shooting method and shooting device
US20160284050A1 (en) Display apparatus and display method thereof
CN117793513A (en) Video processing method and device
CN114242023A (en) Display screen brightness adjusting method, display screen brightness adjusting device and electronic equipment
CN117011124A (en) Gain map generation method and device, electronic equipment and medium
CN114363507A (en) Image processing method and device
CN117097855A (en) Video playing method, device, electronic equipment and readable storage medium
CN115866314A (en) Video playing method and device
CN114928765A (en) Control method, control device, electronic equipment and readable storage medium
CN114299014A (en) Image processing architecture, method, electronic device and storage medium
CN117641114A (en) Video processing method and device and electronic equipment
CN114170117A (en) Image processing method and device
CN116501225A (en) Image capturing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination