Video production method and apparatus, electronic device, and storage medium
By writing ambient light-related metadata into the header information of video files, brightness and color mapping curves adapted to different ambient lights are generated, solving the problem of poor display effect of HDR technology under different ambient lights and achieving better video display effect.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2024-10-28
- Publication Date
- 2026-05-07
AI Technical Summary
Existing HDR technology cannot achieve optimal display effects under different ambient light conditions, resulting in poor readability of video files in bright environments, unclear dark areas, and insufficient display clarity.
Metadata related to ambient light, including a first value, a first identifier, and a second value, is written into the header information of the video file. Brightness and color mapping curves are generated, and the brightness and color mapping of the video file are adjusted to adapt to different ambient light conditions.
It improves the display effect of video files under different ambient light conditions and enhances the usability and readability of HDR technology.
Smart Images

Figure CN2024127854_07052026_PF_FP_ABST
Abstract
Description
Video production methods and apparatus, electronic devices and storage media Technical Field
[0001] This disclosure relates to the field of image processing, and more particularly to video production methods and apparatus, electronic devices, and storage media. Background Technology
[0002] High Dynamic Range Imaging (HDRI or HDR) is a set of techniques used in computer graphics and cinematography to achieve a greater dynamic range of exposure (i.e., a greater difference between light and dark areas) than ordinary digital imaging techniques.
[0003] Summary of the Invention
[0004] To improve the usability of HDR technology, this disclosure provides a video production method and apparatus, an electronic device, and a storage medium.
[0005] According to a first aspect of the present disclosure, a video production method is provided, the method comprising:
[0006] When creating a video file using high dynamic range imaging technology, first metadata information is determined, which is metadata information related to ambient light.
[0007] The first metadata information is written into the header information of the video file.
[0008] According to a second aspect of the present disclosure, a video production apparatus is provided, the apparatus comprising:
[0009] The processing module is configured to determine first metadata information when producing a video file using high dynamic range imaging technology, wherein the first metadata information is metadata information related to ambient light.
[0010] The processing module is also configured to write the first metadata information into the header information of the video file.
[0011] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0012] One or more processors;
[0013] The processor is used to execute the video production method described in any one of the first aspects.
[0014] According to a fourth aspect of the present disclosure, a storage medium is provided that stores instructions that, when executed on an electronic device, cause the electronic device to perform the video production method as described in any one of the first aspects.
[0015] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, is used to implement the video production method described in any one of the first aspects.
[0016] In this embodiment of the disclosure, when creating video files using HDR technology, first metadata information related to ambient light can be written into the header information, which expands the metadata information of the video file, improves the display effect of video files created under different ambient light conditions, and enhances the usability of HDR technology.
[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0019] Figure 1 is an exemplary flowchart of a video production method provided according to an embodiment of the present disclosure.
[0020] Figure 2 is another exemplary flowchart of a video production method provided according to an embodiment of the present disclosure.
[0021] Figure 3 is an exemplary block diagram of an electronic device provided according to an embodiment of the present disclosure.
[0022] Figure 4A is an exemplary interactive schematic diagram of an electronic device provided according to an embodiment of the present disclosure.
[0023] Figure 4B is an exemplary interactive schematic diagram of a chip provided according to an embodiment of the present disclosure. Detailed Implementation
[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0025] This disclosure provides a video production method and apparatus, electronic device, and storage medium.
[0026] In a first aspect, embodiments of this disclosure propose a video production method, the method comprising: when producing a video file using high dynamic range imaging technology, determining first metadata information, wherein the first metadata information is metadata information related to ambient light; and writing the first metadata information into the header information of the video file.
[0027] In the above embodiments, the metadata information of the video file is expanded, the display effect of video files produced under different ambient light conditions is improved, and the usability of HDR technology is enhanced.
[0028] In conjunction with some embodiments of the first aspect, in some embodiments, the first metadata information includes at least one of the following: a first value, the first value being used to indicate the ratio of the maximum values of the three primary color RGB components in each frame of the video file to different grayscale intervals; a first identifier, the first identifier being used to identify whether the first metadata information needs to be considered when playing the video file to adjust the brightness mapping curve of the video file; a second identifier, the second identifier being used to identify whether the first metadata information needs to be considered when playing the video file to adjust the color mapping curve of the video file; and a second value, the second value being used to indicate the illuminance value of the ambient light when the video file was created.
[0029] In the above embodiments, the specific content of the first metadata information is determined, which improves the usability of HDR technology under different ambient light conditions.
[0030] In conjunction with some embodiments of the first aspect, in some embodiments, determining the first value includes: dividing the grayscale range supported by the video file to obtain multiple grayscale intervals; calculating the ratio of the maximum value of the RBG component on each frame of the video file belonging to different grayscale intervals to obtain the first value; wherein each grayscale interval corresponds to one first value.
[0031] In the above embodiments, the electronic device can determine the first value in the above manner, which is simple to implement and highly usable.
[0032] In conjunction with some embodiments of the first aspect, in some embodiments, the method further includes: generating a first brightness mapping curve under the ambient light conditions for creating the video file; the first identifier is used to identify that the brightness mapping curve of the video file needs to be adjusted by considering the first metadata information when playing the video file; generating a brightness adjustment coefficient based on the second value and the first value; segmenting the first brightness mapping curve according to the grayscale intervals to obtain multiple segmented brightness mapping curves; wherein the number of segmented brightness mapping curves is equal to the number of grayscale intervals; and generating a second brightness mapping curve based on each segmented brightness mapping curve and the corresponding brightness adjustment coefficient.
[0033] In the above embodiments, the electronic device can generate the second luminance mapping curve using the above method. This improves the display effect of video files created under different ambient light conditions.
[0034] In some embodiments of the first aspect, if the second value is greater than or equal to the illuminance threshold and the first value corresponding to the first grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval is the largest; if the second value is greater than or equal to the illuminance threshold and the first value corresponding to the second grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval and the second grayscale interval is greater than the weight value of the brightness adjustment coefficient corresponding to the third grayscale interval; if the second value is greater than or equal to the illuminance threshold and the first value corresponding to the third grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the second grayscale interval and the third grayscale interval is greater than the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval; wherein, the maximum value of the first grayscale interval is less than the first grayscale threshold, the minimum value of the third grayscale interval is greater than the second grayscale threshold, the minimum value of the second grayscale interval is greater than the first grayscale threshold and the maximum value of the second grayscale interval is less than the second grayscale threshold, and the first grayscale threshold is less than the second grayscale threshold.
[0035] In the above embodiments, the weight values of the brightness adjustment coefficients for the corresponding grayscale ranges can be determined based on the above method, which has high usability.
[0036] In conjunction with some embodiments of the first aspect, in some embodiments, if the second value is less than the illuminance threshold and the first value corresponding to the first grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval is the largest; if the second value is less than the illuminance threshold and the first value corresponding to the second grayscale interval is the largest, then the weight values of the brightness adjustment coefficients corresponding to the first grayscale interval, the second grayscale interval, and the third grayscale interval are equal; if the second value is less than the illuminance threshold and the first value corresponding to the third grayscale interval is the largest, then the weight value of the brightness adjustment coefficients corresponding to the second grayscale interval and the first grayscale interval is greater than the weight value of the brightness adjustment coefficient corresponding to the third grayscale interval; wherein, the maximum value of the first grayscale interval is less than the first grayscale threshold, the minimum value of the third grayscale interval is greater than the second grayscale threshold, the minimum value of the second grayscale interval is greater than the first grayscale threshold and the maximum value of the second grayscale interval is less than the second grayscale threshold, and the first grayscale threshold is less than the second grayscale threshold.
[0037] In the above embodiments, the weight values of the brightness adjustment coefficients for the corresponding grayscale ranges can be determined based on the above method, which has high usability.
[0038] In conjunction with some embodiments of the first aspect, in some embodiments, the method further includes: for any grayscale value, determining the fourth grayscale interval to which the grayscale value belongs; determining the maximum grayscale value of the fourth grayscale interval and the minimum grayscale value of the fifth grayscale interval in the second brightness mapping curve; wherein the fifth grayscale interval is adjacent to the fourth grayscale interval, and the maximum grayscale value of the fifth grayscale interval is greater than or equal to the maximum grayscale value of the fourth grayscale interval; calculating a fitting curve based on the brightness values corresponding to the maximum grayscale value of the fourth grayscale interval and the minimum grayscale value of the fifth grayscale interval; substituting the grayscale value into the fitting curve to obtain a third brightness mapping curve after smoothing the second brightness mapping curve.
[0039] In the above embodiments, the second brightness mapping curve can be smoothed. While writing the first metadata information, a smoother, more usable brightness mapping curve is provided, resulting in high usability.
[0040] In conjunction with some embodiments of the first aspect, in some embodiments, the method further includes: the second identifier being used to identify that the color mapping curve of the video file needs to be adjusted by considering the first metadata information when playing the video file, and calculating a color adjustment coefficient based on the second value; wherein, different brightness and / or different hue grayscale values correspond to different color adjustment coefficients; the first identifier being used to identify that the brightness mapping curve of the video file does not need to be adjusted by considering the first metadata information when playing the video file, and generating a first color mapping curve based on the color adjustment coefficient and the first brightness mapping curve; or the first identifier being used to identify that the brightness mapping curve of the video file needs to be adjusted by considering the first metadata information when playing the video file, and generating a second color mapping curve based on the color adjustment coefficient and the second brightness mapping curve; or the first identifier being used to identify that the brightness mapping curve of the video file needs to be adjusted by considering the first metadata information when playing the video file, and generating a third color mapping curve based on the color adjustment coefficient and the third brightness mapping curve.
[0041] In the above embodiments, the electronic device can generate different color mapping curves corresponding to ambient light, which is simple to implement and highly usable.
[0042] In conjunction with some embodiments of the first aspect, in some embodiments, the color adjustment coefficient is at its maximum and equal to the third value when the saturation is greater than the saturation threshold; and / or the color is a memory color, the color adjustment coefficient is 1; and / or the saturation is less than or equal to the saturation threshold and / or the color is not a memory color, the color adjustment coefficient is greater than 1 and less than the third value.
[0043] In the above embodiments, the availability of color adjustment coefficients is improved, and the display effect of video files produced using HDR technology is enhanced.
[0044] Secondly, embodiments of this disclosure provide a video production apparatus, the apparatus comprising: a processing module configured to determine first metadata information when producing a video file using high dynamic range imaging technology, the first metadata information being metadata information related to ambient light; the processing module is further configured to write the first metadata information into the header information of the video file.
[0045] Thirdly, embodiments of this disclosure provide an electronic device comprising: one or more processors; wherein the processors are configured to perform the video production method described in any one of the first aspects.
[0046] Fourthly, embodiments of this disclosure provide a storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform the video production method as described in any one of the first aspects.
[0047] Fifthly, embodiments of this disclosure provide a program product comprising at least one of a program and instructions, wherein the program and instructions, when executed by an electronic device, implement the video production method as described in any one of the first aspects.
[0048] It is understood that the aforementioned electronic devices, storage media, program products, etc., are all used to execute the methods proposed in the embodiments of this disclosure. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0049] This disclosure is not exhaustive, but merely illustrative of some embodiments, and is not intended to limit the scope of protection of this disclosure. Unless otherwise specified, each step in a particular embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment can be arbitrarily interchanged. Furthermore, the optional implementation methods in a particular embodiment can be arbitrarily combined; moreover, the embodiments can be arbitrarily combined, for example, some or all steps of different embodiments can be arbitrarily combined, and a particular embodiment can be arbitrarily combined with the optional implementation methods of other embodiments. In all embodiments of this disclosure, unless otherwise specified or logically conflicting, the terminology and / or descriptions between the embodiments are consistent and can be mutually referenced. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0050] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure.
[0051] In this embodiment of the disclosure, unless otherwise stated, elements expressed in the singular form, such as "a," "an," "the," "the," "the," "the," "the," "the," "this," etc., can mean "one and only one," or "one or more," "at least one," etc. For example, when using articles such as "a," "an," "the," etc. in translation, the noun following the article can be understood as either a singular expression or a plural expression.
[0052] In the embodiments disclosed herein, "multiple" refers to two or more.
[0053] In some embodiments, the terms “at least one of A or B, at least one of A and B”, “one or more”, “a plurality of”, “multiple”, etc., may be used interchangeably.
[0054] In some embodiments, the notation "at least one of A and B", "A and / or B", "A in one case, B in another", "in response to one case A, in response to another case B", etc., may include the following technical solutions depending on the situation: in some embodiments, A (execute A regardless of whether there is a branch B); in some embodiments, B (execute B regardless of whether there is a branch A); in some embodiments, execution is selected from A and B (A and B are selectively executed); in some embodiments, both A and B are executed. The same applies when there are more branches such as A, B, C, etc.
[0055] In some embodiments, the notation "A or B" may include the following technical solutions, depending on the situation: in some embodiments, A (execute A regardless of whether a branch B exists); in some embodiments, B (execute B regardless of whether a branch A exists); in some embodiments, execution is selected from A and B (A and B are selectively executed). The same applies when there are more branches such as A, B, and C.
[0056] The prefixes "first," "second," etc., used in the embodiments of this disclosure are merely for distinguishing different descriptive objects and do not impose restrictions on the position, order, priority, quantity, or content of the descriptive objects. The description of the descriptive objects is found in the claims or the context of the embodiments, and the use of prefixes should not constitute unnecessary restrictions. For example, if the descriptive object is a "field," the ordinal numbers preceding "field" in "first field" and "second field" do not restrict the position or order of the "fields." "First" and "second" do not restrict whether the "fields" they modify are in the same message, nor do they restrict the order of "first field" and "second field." Similarly, if the descriptive object is a "level," the ordinal numbers preceding "level" in "first level" and "second level" do not restrict the priority between "levels." Furthermore, the number of descriptive objects is not limited by ordinal numbers and can be one or more. For example, in "first device," the number of "devices" can be one or more. Furthermore, the objects modified by different prefixes can be the same or different. For example, if the object being described is "device", then "first device" and "second device" can be the same device or different devices, and their types can be the same or different. Similarly, if the object being described is "information", then "first information" and "second information" can be the same information or different information, and their content can be the same or different.
[0057] In some embodiments, “including A,” “containing A,” “for indicating A,” and “carrying A” can be interpreted as directly carrying A or indirectly indicating A.
[0058] In some embodiments, terms such as "time / frequency" and "time-frequency domain" refer to the time domain and / or frequency domain.
[0059] In some embodiments, terms such as “in response to…”, “in response to determining…”, “in the case of…”, “when…”, “when…”, “if…”, etc. can be used interchangeably. These descriptions all refer to the device making a corresponding action under certain objective circumstances. They do not necessarily limit the time, nor do they require the device to make a judgment action when implementing it, nor do they mean that there must be other limitations.
[0060] In some embodiments, the terms “greater than,” “greater than or equal to,” “not less than,” “more than,” “more than or equal to,” “not less than,” “higher than,” “higher than or equal to,” “not lower than,” and “above” can be used interchangeably, as can the terms “less than,” “less than or equal to,” “not greater than,” “less than,” “less than or equal to,” “not more than,” “lower than,” “lower than or equal to,” “not higher than,” and “below”.
[0061] In some embodiments, devices, etc., may be interpreted as physical or virtual, and their names are not limited to those described in the embodiments. Terms such as “device,” “equipment,” “circuit,” “network element,” “network function,” “network device,” “function,” “node,” “unit,” “section,” “system,” “network,” “chip,” “chip system,” “entity,” and “subject” are interchangeable.
[0062] In some embodiments, the terms "terminal", "terminal device", "user equipment (UE)", "user terminal", "mobile station (MS)", "mobile terminal (MT)", "subscriber station", "mobile unit", "subscriber unit", "wireless unit", "remote unit", "mobile device", "wireless device", "wireless communication device", "remote device", "mobile subscriber station", "access terminal", "mobile terminal", "wireless terminal", "remote terminal", "handset", "user agent", "mobile client", and "client" can be used interchangeably.
[0063] In some embodiments, the acquisition of data, information, etc., may comply with the laws and regulations of the country where the location is situated.
[0064] In some embodiments, data, information, etc., may be obtained with the user's consent.
[0065] Furthermore, each element, each row, or each column in the table of this disclosure can be implemented as an independent embodiment, and any combination of any element, any row, or any column can also be implemented as an independent embodiment.
[0066] In some embodiments, the purpose of high dynamic range imaging is to accurately represent a wide range of brightness in the real world, from direct sunlight to the darkest shadows.
[0067] Among various HDR display standards, the HDR Vivid standard defines the process of processing ultra-high-definition video for HDR presentation, ensuring faithful reproduction of high-quality video through its methodology. Building upon existing HDR standards, it adds dynamic metadata to provide display terminals with a more accurate dynamic range mapping method, thereby maximizing the restoration of the original artistic effects of HDR content. Simultaneously, HDR Vivid embeds dynamic metadata from the beginning of production, ensuring feasibility on the terminal and controllable and predictable processing effects. Compared to proprietary HDR technologies in the industry, this approach represents a more open and universal technical standard and solution.
[0068] In some embodiments, HDR vivid adds dynamic metadata based on HDR video content without modifying the original HDR video content; it supports Perceptual Quantizer (PQ) and Hybrid Log Gamma (HLG) technologies for input display. PQ technology uses actual brightness as the coordinate for input display, while HLG technology uses relative brightness.
[0069] Dynamic metadata can be manually adjusted or automatically generated using post-processing tools. Dynamic metadata includes, but is not limited to, various primary color (Red, Green, Blue, RGB) component parameters, tone mapping parameters, basic curve parameters, and cubic spline curve parameters. The curve can have 4 segmented intervals and 6 interpolation points, providing finer brightness mapping in bright and dark areas, thereby obtaining clearer and richer texture details.
[0070] HDR vivid is produced and played out in a darkroom, with stringent regulations for both production and viewing environments stipulated in the alliance standard. However, when users actually watch HDR videos on electronic devices, the viewing environment typically varies, including nighttime, indoor daytime, and outdoor daytime. In these complex environments, the effect of HDR vivid doesn't change accordingly, failing to meet the need for optimal subjective viewing in every situation. For example, in brighter environments, the HDR vivid mapping curve is still generated based on the effect in a darkroom, resulting in poor readability of the HDR vivid image in bright environments, with unclear shadows and insufficient image clarity.
[0071] To improve the usability of HDR technology, this disclosure provides the following video production methods and apparatus, electronic devices and storage media.
[0072] Figure 1 is a flowchart illustrating a video production method according to an embodiment of the present disclosure. As shown in Figure 1, the present disclosure relates to a video production method, which can be executed by an electronic device, such as an image processing device, an image processing system, a video production device, a video production system, a video production server, etc. The method includes:
[0073] Step S1101: Determine the first metadata information.
[0074] In some embodiments, the electronic device may determine first metadata information when creating a video file using HDR technology.
[0075] In some embodiments, the first metadata information may be metadata information related to ambient light.
[0076] In one example, metadata can refer to data about data; metadata information is used to describe relevant information about the data. Metadata information can not only represent information such as the type, name, and value of the data, but also describe or reflect certain characteristics or properties of a particular data.
[0077] In one example, the first metadata information can be used to characterize ambient light-related properties.
[0078] In one example, the first metadata information may include, but is not limited to, at least one of the following: a first value; a first identifier; a second identifier; and a second value.
[0079] For example, the first value can be used to indicate the ratio of the maximum values of the three primary color RBG components in each frame of the video file to different grayscale intervals.
[0080] The grayscale range supported by the video file can be 0-1024 or 64-940. The specific range depends on the video file format, and this disclosure does not limit the grayscale range supported by the video file.
[0081] The electronic device can calculate the ratio of the maximum value of the RBG component in each frame of the video file to different grayscale intervals, thereby obtaining the first value.
[0082] The electronic device can divide the grayscale range supported by the video file to obtain multiple grayscale intervals.
[0083] For example, the grayscale range [64, 940] can be divided into N grayscale intervals, where N is a positive integer greater than 1.
[0084] The electronic device can divide the grayscale range supported by the video file into multiple grayscale intervals. For example, dividing the grayscale range [64, 940] into seven grayscale intervals are obtained, namely [64, 192], [192, 320], [320, 448], [448, 576], [576, 704], [704, 832], and [832, 960].
[0085] Alternatively, the electronic device can divide the grayscale range supported by the video file into multiple grayscale intervals, such as [64, 300], [300, 704], and [704, 960].
[0086] The above is merely an illustrative example, and the method for determining grayscale ranges in this disclosure is not limited.
[0087] Here, the first value is a first-order array, and each gray level interval can correspond to an element in the first-order array, which is a corresponding first value.
[0088] The first value can be represented as "max_rgb_ratio[i]", where i can be the grayscale interval index.
[0089] For example, the first value can be as shown in Table 1.
[0090] Table 1
[0091] The sum of ratio[i] is 1.
[0092] For example, if N is 7, then
[0093] For example, the first identifier can be used to identify whether the first metadata information needs to be considered when playing the video file to adjust the brightness mapping curve of the video file.
[0094] The first identifier can be represented as “Curve_ambient_adaptive_tag”, and its value can be “0” or “1”.
[0095] When the first identifier is "0", it can be used to indicate that the brightness mapping curve of the video file does not need to be considered when playing the video file.
[0096] When the first identifier is "1", it indicates that the brightness mapping curve of the video file needs to be adjusted by taking the first metadata information into account when playing the video file.
[0097] Among them, the brightness mapping curve can refer to the mapping relationship curve between grayscale values and brightness values.
[0098] The name of the brightness mapping curve is not limited and can be interchanged with "brightness value mapping curve" or "brightness and grayscale mapping curve", and this disclosure does not limit it.
[0099] The electronic device can determine the first identifier based on the instructions of the video producer or administrator.
[0100] For example, the second identifier can be used to identify whether the first metadata information needs to be considered when adjusting the color mapping curve of the video file during playback. The second identifier can be represented as "Color_ambient_adaptive_tag", and its value can be "0" or "1".
[0101] When the second identifier is "0", it can be used to indicate that the color mapping curve of the video file does not need to be adjusted by considering the first metadata information when playing the video file.
[0102] When the second identifier is "1", it indicates that the first metadata information needs to be considered when playing the video file to adjust the color mapping curve of the video file.
[0103] Among them, the color mapping curve can refer to the curve obtained by adjusting the brightness mapping curve based on hue, saturation, etc.
[0104] The name of the color mapping curve is not limited and can be interchanged with "color mapping curve", "saturation and hue adjustment curve", etc. This disclosure does not limit it.
[0105] The electronic device can determine the second identifier based on instructions from the video producer or administrator.
[0106] For example, the second value is used to indicate the illuminance value of the ambient light when the video file was created.
[0107] Illuminance values can be expressed in lux (Lux).
[0108] The range of the second value can be [0, 16383].
[0109] The electronic device can determine the second value using an ambient light sensor.
[0110] Step S1102: Write the first metadata information into the header file information.
[0111] In some embodiments, the header information may include, but is not limited to, at least one of the following: the type information of the video file, the data information of the video file, the format information of the video file, and the metadata information of the video file.
[0112] In some embodiments, the electronic device may write first metadata information into the header information of the video file.
[0113] Step S1103: Determine the brightness mapping curve.
[0114] In some embodiments, the electronic device can generate a first luminance mapping curve under ambient light conditions when the video file is created using HDR technology.
[0115] The electronic device can generate a first brightness mapping curve based on metadata information other than the first metadata information, under the ambient light conditions in which the video file is created.
[0116] The first luminance mapping curve can also be called the "base luminance mapping curve", which can be represented as "base_tone_mapping_curve" and will be abbreviated as "b_c" thereafter.
[0117] Furthermore, the electronic device can generate a brightness adjustment coefficient based on the second value and the first value. The brightness adjustment coefficient can refer to a coefficient used to adjust the brightness of the first brightness mapping curve based on the second value.
[0118] The brightness adjustment coefficient can be represented as “curve_adapt_param_coff[i]” or “coff[i]”, where i is the grayscale interval index.
[0119] N brightness adjustment coefficients coff[i] can form a set of brightness adjustment coefficients, where N is equal to the number of grayscale intervals.
[0120] For example, different second values can correspond to different sets of brightness adjustment coefficients.
[0121] For example, different first values can correspond to different sets of brightness adjustment coefficients, as shown in Table 2.
[0122] Table 2
[0123] The electronic device can determine the brightness coefficient curve_adapt_param_coff[i] (i.e., coff[i]) in the following way:
[0124] If the second value is greater than or equal to the illuminance threshold, which can be a positive integer, such as 8191, meaning the ambient light illuminance value during video file creation is greater than or equal to the illuminance threshold, then:
[0125] a. When a large portion of the video content is allocated to the low bit value area, the coff value of the low bit value area will correspond to a higher weight value.
[0126] For example, if the first value corresponding to the first gray level interval is the largest, and the first gray level interval is a low (code value) gray level interval, then the weight value of the brightness adjustment coefficient corresponding to the first gray level interval is the largest.
[0127] Among them, the maximum value of the first gray level interval is less than the first gray level threshold.
[0128] b. When a large portion of the video content is allocated to the medium bit value area, the coff value in the low-medium bit value area will correspond to a relatively high weight value.
[0129] For example, if the first value corresponding to the second grayscale interval is the largest, and the second grayscale interval is a medium (code value) grayscale interval, then the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval and the second grayscale interval is larger, and can be greater than the weight value of the brightness adjustment coefficient corresponding to the third grayscale interval.
[0130] In this configuration, the maximum value of the first grayscale interval is less than the first grayscale threshold, the minimum value of the third grayscale interval is greater than the second grayscale threshold, the minimum value of the second grayscale interval is greater than the first grayscale threshold, and the maximum value of the second grayscale interval is less than the second grayscale threshold. The first grayscale threshold is less than the second grayscale threshold. In other words, the first grayscale interval is a low (code value) grayscale interval, the second grayscale interval is a medium (code value) grayscale interval, and the third grayscale interval is a high (code value) grayscale interval.
[0131] c. When there is a lot of video content in the high bit value area, the coff in the medium and high bit value area will correspond to a relatively high weight value.
[0132] For example, if the first value corresponding to the third grayscale interval is the largest, and the third grayscale interval is a high (code value) grayscale interval, then the weight value of the brightness adjustment coefficient corresponding to the second grayscale interval and the third grayscale interval is larger, which can be greater than the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval.
[0133] In this configuration, the maximum value of the first grayscale interval is less than the first grayscale threshold, the minimum value of the third grayscale interval is greater than the second grayscale threshold, the minimum value of the second grayscale interval is greater than the first grayscale threshold, and the maximum value of the second grayscale interval is less than the second grayscale threshold. The first grayscale threshold is less than the second grayscale threshold. In other words, the first grayscale interval is a low (code value) grayscale interval, the second grayscale interval is a medium (code value) grayscale interval, and the third grayscale interval is a high (code value) grayscale interval.
[0134] If the second value is less than the illuminance threshold (which can be a positive integer, such as 8191), meaning the ambient light illuminance during video file creation is less than the illuminance threshold, then:
[0135] a. When a large portion of the video content is allocated to the low bit value area, the coff value of the low bit value area will correspond to a higher weight value.
[0136] For example, if the first value corresponding to the first gray level interval is the largest, and the first gray level interval is a low (code value) gray level interval, then the weight value of the brightness adjustment coefficient corresponding to the first gray level interval is the largest.
[0137] Among them, the maximum value of the first gray level interval is less than the first gray level threshold.
[0138] b. When a large portion of the video content is allocated to the medium bit value area, the coff values in the low, medium, and high bit value areas will correspond to roughly equal weight values.
[0139] For example, if the first value corresponding to the second grayscale interval is the largest, and the second grayscale interval is a medium (code value) grayscale interval, then the weight values of the brightness adjustment coefficients corresponding to the first grayscale interval, the second grayscale interval, and the third grayscale interval are equal, or the difference is less than or equal to a preset value (i.e., basically equal).
[0140] In this configuration, the maximum value of the first grayscale interval is less than the first grayscale threshold, the minimum value of the third grayscale interval is greater than the second grayscale threshold, the minimum value of the second grayscale interval is greater than the first grayscale threshold, and the maximum value of the second grayscale interval is less than the second grayscale threshold. The first grayscale threshold is less than the second grayscale threshold. In other words, the first grayscale interval is a low (code value) grayscale interval, the second grayscale interval is a medium (code value) grayscale interval, and the third grayscale interval is a high (code value) grayscale interval.
[0141] c. When there is a lot of video content in the high bit value area, the coff in the low and medium bit value area will correspond to a relatively high weight value.
[0142] For example, if the first value corresponding to the third grayscale interval is the largest, and the third grayscale interval is a high (code value) grayscale interval, then the weight value of the brightness adjustment coefficient corresponding to the second grayscale interval and the first grayscale interval is larger, and can be greater than the weight value of the brightness adjustment coefficient corresponding to the third grayscale interval.
[0143] In this configuration, the maximum value of the first grayscale interval is less than the first grayscale threshold, the minimum value of the third grayscale interval is greater than the second grayscale threshold, the minimum value of the second grayscale interval is greater than the first grayscale threshold, and the maximum value of the second grayscale interval is less than the second grayscale threshold. The first grayscale threshold is less than the second grayscale threshold. In other words, the first grayscale interval is a low (code value) grayscale interval, the second grayscale interval is a medium (code value) grayscale interval, and the third grayscale interval is a high (code value) grayscale interval.
[0144] For example, the brightness adjustment coefficient coff[i] can be calculated using the following formula 1:
[0145] Here, am_v refers to the second value, ratio[i] is the corresponding first value, alpha can be set based on a predefined method, and max(∪ratio[i]) can refer to the set of the first values corresponding to the current second value.
[0146] The above is merely an illustrative example. Electronic devices can calculate the brightness adjustment coefficient based on the weight values of the brightness adjustment coefficient and Formula 1. Of course, this disclosure does not limit the scheme for determining the brightness adjustment coefficient.
[0147] Furthermore, the electronic device can segment the first brightness mapping curve b_c according to the aforementioned grayscale intervals to obtain multiple segmented brightness mapping curves. In this case, the number of segmented brightness mapping curves is equal to the number of grayscale intervals N.
[0148] Furthermore, the electronic device can generate a second brightness mapping curve based on each of the segmented brightness mapping curves and the corresponding brightness adjustment coefficients.
[0149] For example, an electronic device can multiply each segmented brightness curve by its corresponding brightness adjustment coefficient to obtain a second brightness mapping curve.
[0150] The second luminance mapping curve can be called the "adjusted luminance mapping curve", and can be subsequently represented as "adaptive_tone_mapping_curve" or "a_c".
[0151] Where a_c can be calculated based on Formula 2: a_c[i]=∫b_c[i]×coff[i] Formula 2
[0152] Where i is the grayscale interval index, b_c[i] is the segmented brightness mapping curve obtained after segmenting according to each grayscale interval, and coff[i] is the brightness adjustment coefficient corresponding to each grayscale interval.
[0153] It is understandable that, in order to avoid grayscale reversal, such as the low grayscale range becoming the medium grayscale range or high grayscale range after the brightness adjustment coefficient is adjusted, a_c[6]>a_c[5]>....>a_c[0].
[0154] If the first identifier is used to identify that the brightness mapping curve of the video file does not need to be considered when playing the video file, for example, if the first identifier is "0", then the electronic device can determine that the brightness adjustment curve is the first brightness adjustment curve mentioned above.
[0155] If the first identifier is used to identify that the brightness mapping curve of the video file does not need to be considered when playing the video file, for example, if the first identifier is "1", then the electronic device can determine that the brightness adjustment curve is the second brightness adjustment curve mentioned above.
[0156] Step S1104: Smooth the second brightness mapping curve.
[0157] In some embodiments, for any gray level value, the fourth gray level interval to which the gray level value belongs can be determined among the above N gray level intervals.
[0158] For example, if the gray level value is 190, then its fourth gray level interval is [64, 192].
[0159] Furthermore, the electronic device determines the maximum grayscale value of the fourth grayscale interval and the minimum grayscale value of the fifth grayscale interval in the second brightness mapping curve.
[0160] The fifth grayscale interval is adjacent to the fourth grayscale interval, and the maximum grayscale value of the fifth grayscale interval is greater than or equal to the maximum grayscale value of the fourth grayscale interval.
[0161] For example, if the fourth grayscale interval is [64, 192], then the fifth grayscale interval is [192, 320]. In this case, the maximum value of the fourth grayscale interval is 192, and the minimum value of the fifth grayscale interval is also 192.
[0162] Furthermore, the electronic device can calculate a fitting curve based on the brightness value corresponding to the maximum gray level value in the fourth gray level range and the brightness value corresponding to the minimum gray level value in the fifth gray level range.
[0163] The electronic device can substitute the grayscale value m into the above-mentioned fitting curve to obtain a third brightness mapping curve after smoothing the second brightness mapping curve.
[0164] For example, a higher-order function, such as a third-order function, can be used as the fitting curve to determine the third brightness mapping curve, as shown in Equation 3: a_c[m]=a[i]+b[i](mm[i])+c[i](mm[i]) 2 +d[i](mm[i]) 3 Formula 3
[0165] Where m represents the grayscale value mentioned above. The values of parameters a, b, c, d, etc. in Formula 3 can vary to some extent across different grayscale intervals.
[0166] Step S1105: Determine the color mapping curve.
[0167] In some embodiments, the electronic device may calculate the color adjustment coefficient based on the second value.
[0168] In one example, the color adjustment coefficient can be represented as "color_adapt_param_coff[i][j]" or "coff[i][j]", which can be a second-order array where i and j represent different brightness and hue, respectively.
[0169] Among them, the color condition coefficient refers to the adjustment coefficient of color performance in response to environmental factors.
[0170] For example, the color adjustment coefficient can be calculated using the following formula 4:
[0171] The third value can be 2. Other cases may include, but are not limited to, a color protection degree less than or equal to 0.6, and / or cases that are not memory colors. The corresponding coff[i][j] can be 1.5. This disclosure does not limit the specific value.
[0172] Among them, "memory colors" can refer to the deep memories that people form of certain colors through long-term practice. Memory colors can include, but are not limited to, skin color, the color of the blue sky, and the color of the grass.
[0173] If the second identifier is used to identify that the first metadata information needs to be considered when playing the video file to adjust the color mapping curve of the video file, for example, the second identifier is "1", and the first identifier is used to identify that the first metadata information does not need to be considered when playing the video file to adjust the brightness mapping curve of the video file, for example, the first identifier is "0", then the electronic device can generate the first color mapping curve based on the color adjustment coefficient and the first brightness mapping curve b_c.
[0174] If the second identifier is used to identify that the first metadata information needs to be considered when playing the video file to adjust the color mapping curve of the video file, for example, the second identifier is "1", and the first identifier is used to identify that the first metadata information needs to be considered when playing the video file to adjust the brightness mapping curve of the video file, for example, the first identifier is "1", then the electronic device can generate a second color mapping curve based on the color adjustment coefficient and the second brightness mapping curve a_c or the smoothed third brightness mapping curve.
[0175] The color mapping curve can be represented as c_c[i], as shown in Formula 5.
[0176] If the second identifier is used to identify that the color mapping curve of the video file does not need to be adjusted by considering the first metadata information when playing the video file, for example, if the second identifier is "0", then the electronic device can determine that the color mapping curve is the same as the aforementioned first brightness mapping curve.
[0177] In some embodiments, steps S1101 to S1105 are optional, and one or more of these steps may be omitted or substituted in different embodiments.
[0178] In some embodiments, the execution order of steps S1101 to S1105 is not limited.
[0179] In the above embodiments, when creating video files using HDR technology, first metadata information related to ambient light can be written into the header information, and based on this first metadata information, the corresponding luminance mapping curve and color mapping curve can be determined. This expands the metadata information of the video file, improves the display effect of video files created under different ambient light conditions, and enhances the usability of HDR technology.
[0180] Figure 2 is a flowchart illustrating a video production method according to an embodiment of the present disclosure. As shown in Figure 2, the present disclosure relates to a video production method, which can be executed by an electronic device and includes the following steps:
[0181] Step S2101: Determine the first metadata information.
[0182] In some embodiments, the first metadata information may be metadata information related to ambient light.
[0183] In some embodiments, reference can be made to the steps in other embodiments described before or after this embodiment, such as step S1101 in FIG1 and its optional implementation, and other related parts in the specification, which will not be repeated here.
[0184] Step S2102: Write the first metadata information.
[0185] In some embodiments, reference can be made to the steps in other embodiments described before or after this embodiment, such as step S1102 in FIG1 and its optional implementation, and other related parts in the specification, which will not be repeated here.
[0186] In some embodiments, steps S2101 to S2102 are optional, and one or more of these steps may be omitted or substituted in different embodiments.
[0187] In some embodiments, the execution order of steps S2101 to S2102 is not limited.
[0188] In the above embodiments, when creating video files using HDR technology, first metadata information related to ambient light can be written into the header information, which expands the metadata information of the video file, improves the display effect of video files created under different ambient light conditions, and enhances the usability of HDR technology.
[0189] The above process is further illustrated with examples below.
[0190] During the HDR vivid production process, ambient light parameters can be added to the dynamic metadata. During HDR vivid playback, the ambient light parameters in the metadata are taken into account to achieve different display effects under different environments.
[0191] 1. Definition of relevant parameters
[0192] - The average value of the maximum value of the RGB components can be expressed as average_maxrgb_pq;
[0193] - The proportion of each code value with a maximum value in the RGB component from 64 to 940, max_rgb_ratio[i] (divided into N segments, with a larger proportion of low grayscale);
[0194] - Brightness curve adjustment effective flag, curve_ambient_adaptive_tag(0 / 1);
[0195] - Color adjustment activation flag, color_ambient_adaptive_tag(0 / 1);
[0196] - Write the ambient light value, ambient_value (0~16383), which will be represented by am_v later. This is the actual ambient light value during the HDR adaptation process (containing multiple sets of ambient light values; different mapping curves are generated when different ambient light values are written).
[0197] - The basic curve parameter, base_tone_mapping_curve, the process of obtaining the basic curve will not be described in detail here;
[0198] - The base curve adjusts to follow ambient light, curve_adapt_param_coff[i] (divided into N segments, corresponding to the coefficients of each content at different gray levels);
[0199] - Color performance is adjusted according to ambient light, color_adapt_param_coff[i][j] (a two-dimensional array, corresponding to the adjustment coefficients of different hues under different brightness levels).
[0200] -When the device is actually playing, the ambient light value sensed by the sensor, real_ambient_value (the actual ambient light value and the ambient light value in the metadata are weighted in a certain way to generate a new ambient light value and generate a new mapping curve).
[0201] 2. During the production of HDR vivid video, a new space is created in the metadata information to write ambient light dynamic metadata information such as max_rgb_ratio[i], curve_ambient_adaptive_tag(0 / 1), color_ambient_adaptive_tag(0 / 1), ambient_value(0~16383), etc.
[0202] Max_rgb_ratio[i]: During the production of HDR vivid video, the proportion of each bit value in each frame is statistically analyzed and written into the dynamic metadata using max_rgb_ratio[i]. The pixel resolution 64-940 is divided into 7 intervals of 128 steps. ratio[i] represents the proportion within the current pixel interval, and the sum of the proportions of all intervals is 1. That is:
[0203] Curve_ambient_adaptive_tag: A new value added to the dynamic metadata to determine whether the brightness needs to follow changes in ambient light. Setting this value to 1 means that ambient light information needs to be considered when adjusting the HDR vivid brightness mapping curve during playback; setting it to 0 means that no ambient light information is considered.
[0204] Color_ambient_adaptive_tag: Add a new value to the dynamic metadata to determine whether the color needs to follow changes in ambient light; if the value is set to 1, it means that ambient light information needs to be considered to change the color mapping curve of HDR vivid during playback, and if it is set to 0, no ambient light information is considered.
[0205] Ambient_value: During the HDR vivid production process, the illumination value (unit: Lux) of the current production environment is recorded. This illumination value is added to the dynamic metadata to represent the reference ambient illumination during the production of the HDR source video.
[0206] 3. First, generate the base curve parameter base_tone_mapping_curve for the darkroom scenario, which will be denoted as b_c thereafter.
[0207] 4. When Curve_ambient_adaptive_tag is 1, the grayscale ratio of each range of the current image is obtained according to Max_rgb_ratio[i] in the metadata. Based on the value of ambient_value, the adjustment coefficients curve_adapt_param_coff[i] of the basic curve under each grayscale range as a function of ambient light are generated. This coefficient may correspond to N groups. Different ambient_values have different coefficient combinations, and different max_rgb_ratio[i] also have different coefficient combinations.
[0208] The value of curve_adapt_param_coff[i] is calculated and assigned based on the values of ambient_value and Max_rgb_ratio[i].
[0209] 1) The higher the ambient_value (above 8191), the better.
[0210] a. When a large portion of the video content is allocated to the low bit value region, the coff value of the low bit value region will correspond to a higher weight.
[0211] b. When a large portion of the video content is allocated to the medium bit value region, the coff value in the low-to-medium bit value region will correspond to a relatively higher weight.
[0212] c. When video content is predominantly found in the high bitrate region, the coff value in the mid-to-high bitrate region will correspond to a relatively higher weight.
[0213] 2) The lower the ambient_value (below 8191), the better.
[0214] a. When a large portion of the video content is allocated to the low bit value region, the coff value of the low bit value region will correspond to a higher weight.
[0215] b. When a large portion of the video content is allocated to the medium bit value region, the coff values in the low, medium, and high bit value regions will receive roughly equal weight.
[0216] c. When video content is distributed more in the high bit value region, the coff in the low and medium bit value region will have a relatively higher weight.
[0217] The brightness adjustment coefficient coff[i] can be calculated using the following formula 1:
[0218] 5. When playing HDR video, the Base_tone_mapping_curve is divided into seven segments according to the above code values. For each segment, the mapping curve adaptive_tone_mapping_curve under each code value is regenerated according to the ratio and am_v values. It is denoted as a_c. The adjusted a_c[i] should follow the size relationship between the subscripts, that is, a_c[6]>a_c[5]>....>a_c[0].
[0219] Where a_c can be calculated based on Formula 2: a_c[i]=∫b_c[i]×coff[i] Formula 2
[0220] 6. Based on the above calculations, generate the a_c[i] curve for each code value. The connection points of each code value need to be smoothed to ensure the continuity of the grayscale. Let a_c[m] represent the entire mapping curve, and m represent any code value from 0 to 1024. For example, when m is 190, it is necessary to first calculate the fitting curve that makes the curves connect smoothly based on the endpoint values of a_c[0] and a_c[1], and then substitute the m value to obtain the final mapping curve target. The curve fitting changes with different code value intervals. The values of parameters a, b, c, d, etc. in Formula 3 have certain differences in each interval. a_c[j]=a[i]+b[i](jj[i])+c[i](jj[i]) 2 +d[i](jj[i]) 3 Formula 3
[0221] 7. When the value of Color_ambient_adaptive_tag is 1, calculate the HDR color adjustment parameter color_adapt_param_coff[i][j] under the current ambient light parameters based on the value of am_v in the metadata. Generate different color adjustment coefficients for different brightness and different hue HDR code values, as shown in Formula 4:
[0222] 8. Based on the above adjustment coefficients, generate adaptive_tone_mapping_curve on the basis of b_c or a_c, hereinafter referred to as c_c; the larger the am_v value, the more the HDR part of the displayed color needs to be enhanced to ensure the consistency of color effect under different ambient light conditions. c_c can be calculated using formula 5:
[0223] In the above embodiments, ambient light information can be added to the HDR vivid dynamic metadata, laying the foundation for subsequent calculation of the brightness mapping curve based on ambient light information during HDR decoding and playback, and ensuring the optimization of HDR vivid display effect in various environments. This disclosure specifies the degree of influence of ambient light information on brightness and color in the dynamic metadata, thus improving the HDR vivid dynamic metadata information.
[0224] This disclosure also proposes an apparatus (also referred to as an electronic device, etc.) for implementing any of the above methods. For example, an apparatus is proposed that includes units or modules for implementing the steps performed by the electronic device in any of the above methods.
[0225] It should be understood that the division of units or modules in the above device is only a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, the units or modules in the device can be implemented by a processor calling software: for example, the device includes a processor connected to a memory containing instructions. The processor calls the instructions stored in the memory to implement any of the above methods or to implement the functions of the units or modules in the above device. The processor can be, for example, a general-purpose processor, such as a Central Processing Unit (CPU) or a microprocessor, and the memory can be internal or external to the device. Alternatively, the units or modules in the device can be implemented in the form of hardware circuits. The functionality of some or all of the units or modules can be achieved through the design of these hardware circuits, which can be understood as one or more processors. For example, in one implementation, the hardware circuit is an application-specific integrated circuit (ASIC). The functionality of some or all of the units or modules is achieved through the design of the logical relationships between the components within the circuit. In another implementation, the hardware circuit can be implemented using a programmable logic device (PLD). Taking a field-programmable gate array (FPGA) as an example, it can include a large number of logic gates. The connection relationships between the logic gates are configured through configuration files, thereby achieving the functionality of some or all of the units or modules. All units or modules of the above device can be implemented entirely through processor-called software, entirely through hardware circuits, or partially through processor-called software with the remaining parts implemented through hardware circuits.
[0226] In this embodiment, the processor is a circuit with signal processing capabilities. In one implementation, the processor can be a circuit with instruction read and execute capabilities, such as a Central Processing Unit (CPU), a microprocessor, a graphics processing unit (GPU) (which can be understood as a microprocessor), or a digital signal processor (DSP). In another implementation, the processor can implement certain functions through the logical relationships of hardware circuits. The logical relationships of the aforementioned hardware circuits are fixed or reconfigurable. For example, the processor is a hardware circuit implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document and configuring the hardware circuit can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units or modules. Furthermore, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as a Neural Network Processing Unit (NPU), a Tensor Processing Unit (TPU), or a Deep Learning Processing Unit (DPU).
[0227] Figure 3 is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. The electronic device 3100 is used to perform any of the above methods. In some embodiments, as shown in Figure 3, the electronic device 3100 may include a processing module 3101.
[0228] In some embodiments, the processing module 3101 is used to determine first metadata information when creating a video file using high dynamic range imaging technology. The first metadata information is metadata information related to ambient light. The first metadata information is written into the header information of the video file.
[0229] Optionally, the processing module 3101 is used to perform at least one of the other steps (such as steps S1101 to S1105, but not limited thereto) performed by the electronic device 3100 in any of the above methods, which will not be described in detail here.
[0230] In some embodiments, the processing module may be a single module or may include multiple sub-modules. Optionally, the multiple sub-modules may each perform all or part of the steps required by the processing module.
[0231] In some embodiments, the processing module may be interchangeable with the processor.
[0232] Figure 4A is a schematic diagram of the structure of the electronic device 4100 proposed in an embodiment of this disclosure. The electronic device 4100 can be a terminal (e.g., a user equipment), or a chip, chip system, or processor that supports the terminal in implementing any of the above methods. The electronic device 4100 can be used to implement the methods described in the above method embodiments; for details, please refer to the descriptions in the above method embodiments.
[0233] As shown in Figure 4A, the electronic device 4100 is used to execute any of the above methods. In some embodiments, the electronic device 4100 includes one or more processors 4101. The processor 4101 may be a general-purpose processor or a special-purpose processor, such as a baseband processor or a central processing unit. The baseband processor may be used to process communication protocols and communication data, and the central processing unit may be used to control the electronic device (e.g., a base station, a baseband chip, a terminal device, a terminal device chip, a DU or CU, etc.), execute programs, and process program data. Optionally, the electronic device 4100 is used to execute any of the above methods. Optionally, one or more processors 4101 are used to invoke instructions to cause the electronic device 4100 to execute any of the above methods.
[0234] In some embodiments, the electronic device 4100 further includes one or more transceivers 4103. When the electronic device 4100 includes one or more transceivers 4103, the transceiver 4103 performs at least one of the communication steps such as sending and / or receiving in the above method, and the processor 4101 performs at least one of other steps (e.g., steps S1101 to S1105, but not limited thereto). In optional embodiments, the transceiver may include a receiver and / or a transmitter, which may be separate or integrated. Optionally, the terms transceiver, transceiver unit, transceiver, transceiver circuit, interface circuit, interface, etc., can be used interchangeably; the terms transmitter, transmitting unit, transmitter, transmitting circuit, etc., can be used interchangeably; the terms receiver, receiving unit, receiver, receiving circuit, etc., can be used interchangeably.
[0235] In some embodiments, the electronic device 4100 further includes one or more memories 4102 for storing data and / or instructions. Optionally, one or more processors 4101 are used to invoke instructions stored in the memory 4102 to cause the electronic device 4100 to perform any of the above methods. Optionally, all or part of the memory 4102 may also be located outside the electronic device 4100. In optional embodiments, the electronic device 4100 may include one or more interface circuits 4104. Optionally, the interface circuit 4104 is connected to the memory 4102 and can be used to receive data and / or instructions from the memory 4102 or other devices, and can be used to send data and / or instructions to the memory 4102 or other devices. For example, the interface circuit 4104 can read data and / or instructions stored in the memory 4102 and send the data and / or instructions to the processor 4101.
[0236] The electronic device 4100 described in the above embodiments may be a network device or a terminal, but the scope of the electronic device 4100 described in this disclosure is not limited thereto, and the structure of the electronic device 4100 may not be limited by FIG4A. The electronic device may be a standalone device or may be part of a larger device. For example, the electronic device may be: (1) a standalone integrated circuit IC, or chip, or chip system or subsystem; (2) a collection of one or more ICs, optionally, the IC collection may also include storage components for storing data, programs and / or instructions; (3) an ASIC, such as a modem; (4) a module that can be embedded in other devices; (5) a receiver, terminal device, smart terminal device, cellular phone, wireless device, handheld device, mobile unit, vehicle device, network device, cloud device, artificial intelligence device, etc.; (6) others, etc.
[0237] Figure 4B is a schematic diagram of the structure of chip 4200 according to an embodiment of this disclosure. For cases where the electronic device 4100 can be a chip or a chip system, the schematic diagram of chip 4200 shown in Figure 4B can be referenced, but is not limited thereto.
[0238] Chip 4200 includes one or more processors 4201. Chip 4200 is used to perform any of the above methods.
[0239] In some embodiments, chip 4200 further includes one or more interface circuits 4202. Optionally, terms such as interface circuit, interface, and transceiver pin can be used interchangeably. In some embodiments, chip 4200 further includes one or more memories 4203 for storing data and / or instructions. Optionally, all or part of the memories 4203 may be located outside of chip 4200. Optionally, the interface circuits 4202 are connected to the memories 4203, and the interface circuits 4202 can be used to receive data and / or instructions from the memories 4203 or other devices, and can be used to send data and / or instructions to the memories 4203 or other devices. For example, the interface circuits 4202 can read data and / or instructions stored in the memories 4203 and send the data and / or instructions to the processor 4201.
[0240] In some embodiments, the interface circuit 4202 performs at least one of the communication steps such as sending and / or receiving in the above-described method. For example, the interface circuit 4202 performing the communication steps such as sending and / or receiving in the above-described method means that the interface circuit 4202 performs data and / or instruction interaction between the processor 4201, the chip 4200, the memory 4203, or the transceiver device. In some embodiments, the processor 4201 performs at least one of other steps (e.g., steps S1101 to S1105, but not limited thereto).
[0241] The modules and / or devices described in the various embodiments, such as virtual devices, physical devices, and chips, can be combined or separated arbitrarily as needed. Optionally, some or all steps can also be performed collaboratively by multiple modules and / or devices, which is not limited here.
[0242] This disclosure also proposes a storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform any of the above methods. Optionally, the storage medium is an electronic storage medium. Optionally, the storage medium is a computer-readable storage medium, but not limited thereto; it may also be a storage medium readable by other devices. Optionally, the storage medium may be a non-transitory storage medium, but not limited thereto; it may also be a temporary storage medium.
[0243] This disclosure also proposes a program product, including a program and / or instructions, which, when executed by an electronic device, cause the electronic device to perform any of the above methods. Optionally, the program product is a computer program product. Optionally, the program product is stored on the storage medium.
[0244] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A video production method, characterized in that, The method includes: When creating a video file using high dynamic range imaging technology, first metadata information is determined, which is metadata information related to ambient light. The first metadata information is written into the header information of the video file.
2. The method according to claim 1, characterized in that, The first metadata information includes at least one of the following: The first value indicates the ratio of the maximum values of the three primary color RGB components in each frame of the video file to different grayscale intervals. A first identifier is used to identify whether the first metadata information needs to be considered when adjusting the brightness mapping curve of the video file during playback. The second identifier is used to identify whether the first metadata information needs to be considered when adjusting the color mapping curve of the video file when playing the video file; The second value indicates the ambient light illuminance value when the video file was created.
3. The method according to claim 2, characterized in that, Determine the first value, including: The grayscale range supported by the video file is divided to obtain multiple grayscale intervals; The first value is obtained by calculating the ratio of the maximum value of the RGB component in each frame of the video file to different grayscale intervals; wherein each grayscale interval corresponds to one first value.
4. The method according to claim 2 or 3, characterized in that, The method further includes: A first luminance mapping curve is generated under the ambient light conditions used to create the video file. The first identifier is used to identify that when playing the video file, the first metadata information needs to be considered to adjust the brightness mapping curve of the video file, and a brightness adjustment coefficient is generated based on the second value and the first value; The first brightness mapping curve is segmented according to the grayscale intervals to obtain multiple segmented brightness mapping curves; wherein the number of segmented brightness mapping curves is equal to the number of grayscale intervals; A second brightness mapping curve is generated based on each of the segmented brightness mapping curves and the corresponding brightness adjustment coefficients.
5. The method according to claim 4, characterized in that, If the second value is greater than or equal to the illuminance threshold, and the first value corresponding to the first grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval is the largest. If the second value is greater than or equal to the illuminance threshold, and the first value corresponding to the second grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval and the second grayscale interval is greater than the weight value of the brightness adjustment coefficient corresponding to the third grayscale interval. If the second value is greater than or equal to the illuminance threshold, and the first value corresponding to the third grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the second grayscale interval and the third grayscale interval is greater than the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval. Wherein, the maximum value of the first grayscale interval is less than the first grayscale threshold, and the third grayscale... The minimum value of the interval is greater than the second gray level threshold, the minimum value of the second gray level interval is greater than the first gray level threshold, and the maximum value of the second gray level interval is less than the second gray level threshold, and the first gray level threshold is less than the second gray level threshold.
6. The method according to claim 4, characterized in that, If the second value is less than the illuminance threshold and the first value corresponding to the first grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval is the largest. If the second value is less than the illuminance threshold and the first value corresponding to the second grayscale interval is the largest, then the weight values of the brightness adjustment coefficients corresponding to the first grayscale interval, the second grayscale interval, and the third grayscale interval are equal. If the second value is less than the illuminance threshold and the first value corresponding to the third grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the second grayscale interval and the first grayscale interval is greater than the weight value of the brightness adjustment coefficient corresponding to the third grayscale interval. Wherein, the maximum value of the first gray level interval is less than the first gray level threshold, the minimum value of the third gray level interval is greater than the second gray level threshold, the minimum value of the second gray level interval is greater than the first gray level threshold and the maximum value of the second gray level interval is less than the second gray level threshold, and the first gray level threshold is less than the second gray level threshold.
7. The method according to any one of claims 4-6, characterized in that, The method further includes: For any gray level value, determine the fourth gray level interval to which the gray level value belongs; In the second brightness mapping curve, the maximum gray level value of the fourth gray level interval and the minimum gray level value of the fifth gray level interval are determined; wherein, the fifth gray level interval is adjacent to the fourth gray level interval, and the maximum gray level value of the fifth gray level interval is greater than or equal to the maximum gray level value of the fourth gray level interval. Based on the brightness values corresponding to the maximum gray level value in the fourth gray level interval and the minimum gray level value in the fifth gray level interval, a fitting curve is calculated. Substituting the grayscale values into the fitted curve yields a third brightness mapping curve after smoothing the second brightness mapping curve.
8. The method according to any one of claims 4-7, characterized in that, The method further includes: The second identifier is used to identify that when playing the video file, the first metadata information needs to be considered to adjust the color mapping curve of the video file. Based on the second value, a color adjustment coefficient is calculated; wherein, different brightness and / or different hue grayscale values correspond to different color adjustment coefficients. The first identifier is used to identify that when playing the video file, it is not necessary to consider the first metadata information to adjust the brightness mapping curve of the video file, and a first color mapping curve is generated based on the color adjustment coefficient and the first brightness mapping curve; or The first identifier is used to identify that when playing the video file, the first metadata information needs to be considered to adjust the brightness mapping curve of the video file, and a second color mapping curve is generated based on the color adjustment coefficient and the second brightness mapping curve; or The first identifier is used to identify whether the first metadata needs to be considered when playing the video file. The information is used to adjust the brightness mapping curve of the video file, and a third color mapping curve is generated based on the color adjustment coefficient and the third brightness mapping curve.
9. The method according to claim 8, characterized in that, When the saturation is greater than the saturation threshold, the color adjustment coefficient is at its maximum and equal to the third value; and / or The color is a memory color, and the color adjustment coefficient is 1; and / or The saturation is less than or equal to the saturation threshold and / or the color is not a memory color, and the color adjustment coefficient is greater than 1 and less than the third value.
10. A video production apparatus, characterized in that, The device includes: The processing module is configured to determine first metadata information when producing a video file using high dynamic range imaging technology, wherein the first metadata information is metadata information related to ambient light. The processing module is also configured to write the first metadata information into the header information of the video file.
11. An electronic device, characterized in that, include: One or more processors; The processor is used to execute the video production method according to any one of claims 1-9.
12. A storage medium storing instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the video production method as described in any one of claims 1-9.
13. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program is used to implement the video production method according to any one of claims 1-9.
Citation Information
Patent Citations
Image processing method and device of terminal equipment, electronic equipment and storage medium
CN113870368A
Display screen brightness adjusting method and device, electronic equipment and readable storage medium
CN117558252A
Tone mapping method and device
CN118540447A
Display method and apparatus
WO2024045871A1
Video processing method, display device and storage medium
WO2024119922A1