Method and device for obtaining mapping curve parameters
By adjusting the mapping curve parameters to adapt to the brightness of the display device, the problem of information loss and large amount of dynamic mapping of data is solved, and more accurate tone adjustment and image display effect is achieved.
Patent Information
- Application Number
- CN202211470053.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-30
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2040-04-30
AI Technical Summary
In the prior art, in dynamic range mapping, static mapping methods lead to information loss, while dynamic mapping methods need to carry a large amount of scene information, affecting the image display effect.
By obtaining the maximum and minimum brightness parameters of the display device, combining the adjustment coefficients in the dynamic metadata, adjusting the mapping curve parameters, and dynamically adjusting the mapping curve to adapt to display devices with different brightnesses, providing more accurate tone adjustments.
It realizes that more accurate tone adjustments are provided for display devices with different brightness when the curve parameters are properly configured, which improves the flexibility and quality of image display effects.
Smart Images

Figure CN115883810B_ABST
Abstract
Description
[0001] This application is a divisional application of the Chinese application with application number 202010366684.2, application date April 30, 2020, and invention name “Method and device for obtaining mapping curve parameters”. Technical Field
[0002] The present application relates to the field of image processing, and in particular to a method and device for acquiring mapping curve parameters. Background Art
[0003] Dynamic range is used in many fields to express the ratio between the maximum and minimum values of a variable. In digital images, dynamic range is used to express the ratio between the maximum grayscale value and the minimum grayscale value within the displayable range of the image. In the same scene in the real world, the dynamic range is usually between 10 -3 Candela / square meter (cd / m 2 ) to 10 6 cd / m 2 In most color digital images, the dynamic range of the image is 0 to 255, which is called low dynamic range (LDR).
[0004] Since the illumination range of the display device is different from the dynamic range of the real world, it is necessary to map the dynamic range of the real world to the illumination range of the display device, which is called dynamic range mapping. Dynamic range mapping can be applied to the adaptation of the front-end HDR signal and the back-end HDR display device. For example, the front-end captures 4000cd / m 2 The HDR display capability of the back-end HDR display device is 500cd / m 2 , 4000cd / m 2 The light signal is mapped to 500cd / m 2 On the display device, it is a tone mapping (TM) process from high to low. Dynamic range mapping can also be applied to the adaptation of the front-end SDR signal and the back-end HDR display device. For example, the front-end captures 100cd / m 2 The HDR display capability of the back-end HDR display device is 2000cd / m 2 , 100cd / m 2 The light signal is mapped to 2000cd / m 2 On the display device, it is a TM process from low to high.
[0005] At present, the dynamic range mapping methods can be divided into two types: static and dynamic. The static mapping method is to perform the overall TM process based on the same video content or the same hard disk content with a single data, that is, for various scenes, the mapping curve is usually the same. The advantage of this method is that the image needs to carry less data and the processing flow is relatively simple; the disadvantage is that all scenes use the same mapping curve for TM, which will cause information loss in some scenes. For example, if the mapping curve focuses on protecting the bright area, some details will be lost in some extremely dark scenes, or simply invisible, which will affect the display effect of the image. The dynamic mapping method is to dynamically adjust the mapping curve for each scene or each frame according to a specific area. The advantage of this method is that it can achieve differentiated processing of different scenes or different frames; the disadvantage is that it is necessary to carry relevant scene information in each frame or each scene, and the amount of data required to be carried by the image is large. Summary of the invention
[0006] The embodiments of the present application provide a method and device for acquiring mapping curve parameters, which can provide more accurate tone adjustment for display devices with different brightness and have greater flexibility.
[0007] In a first aspect, an embodiment of the present application provides a method for obtaining mapping curve parameters, including: obtaining a first mapping curve parameter set and a first target system display maximum brightness, the first mapping curve parameter set corresponding to the first target system display maximum brightness, and the first mapping curve parameter set including one or more parameters related to the mapping curve; obtaining a display brightness parameter set, the display brightness parameter set including the maximum display brightness and / or the minimum display brightness of the display device; obtaining an adjustment coefficient set, the adjustment coefficient set including one or more adjustment coefficients, the one or more adjustment coefficients corresponding to the one or more parameters in the first mapping curve parameter set; adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness and the adjustment coefficient set to obtain a second mapping curve parameter set, the second mapping curve parameter set including one or more adjusted parameters; wherein, obtaining the adjustment coefficient set includes: obtaining the adjustment coefficient set from dynamic metadata of the content to be displayed.
[0008] The present application adjusts one or more parameters related to the mapping curve. The adjustment process is combined with the display capabilities of the backend, and can provide more precise color tone adjustment for display devices of different brightness. It has greater flexibility and can also achieve good presentation effects when the curve parameters are reasonably configured.
[0009] In a possible implementation, adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness, and the adjustment coefficient set to obtain the second mapping curve parameter set includes: calculating the adjusted first parameter according to formula (1), the first parameter being any one parameter in the first mapping curve parameter set, and the adjusted first parameter belonging to the second mapping curve parameter set:
[0010] P a =P b +k×P Δ (1)
[0011] Among them, P a represents the adjusted first parameter, P b represents the first parameter, P Δ represents the adjustment coefficient corresponding to the first parameter, or When MaxDisplay>M TPL When a=1, when MaxDisplay≤M TPL When a=-1, MaxDisplay represents the maximum display brightness, M TPL It indicates that the first target system displays the maximum brightness, N indicates the adjustment intensity control parameter, and M indicates the preset brightness value.
[0012] The adjustment coefficient is used to adjust one or more parameters related to the mapping curve. The adjustment process combines the display capabilities of the backend and can provide more precise tone adjustment for display devices of different brightness. It has greater flexibility and can also achieve good presentation effects when the curve parameters are reasonably configured.
[0013] In a possible implementation, before adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the maximum brightness displayed by the first target system, and the adjustment coefficient set to obtain the second mapping curve parameter set, the method further includes: obtaining one or more of the maximum brightness, the minimum brightness, the average value, and the variation range of the content to be displayed, and obtaining an intermediate value of the first parameter according to one or more of the maximum display brightness, the minimum display brightness, the maximum brightness, the minimum brightness, the average value, and the variation range, where the first parameter is any parameter in the first mapping curve parameter set; adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the maximum brightness displayed by the first target system, and the adjustment coefficient set to obtain the second mapping curve parameter set includes: calculating the adjusted first parameter according to formula (2), where the adjusted first parameter belongs to the second mapping curve parameter set:
[0014] P a =(1-w)×P b +w×P m (2)
[0015] Among them, P a represents the adjusted first parameter, P b represents the first parameter, or P Δ represents the adjustment coefficient corresponding to the first parameter, MaxDisplay represents the maximum display brightness, M TPL indicates that the first target system displays the maximum brightness, N indicates the adjustment intensity control parameter, M indicates the preset brightness value, P m represents the middle value of the first parameter.
[0016] One or more parameters related to the mapping curve are obtained in a weighted manner through multiple parameters. This process combines the display capabilities of the backend and can provide more precise color tone adjustment for display devices of different brightness. It has greater flexibility and can also achieve good presentation effects when the curve parameters are reasonably configured.
[0017] In a possible implementation, after calculating the adjusted first parameter according to the formula, it also includes: obtaining a first mapping curve according to the adjusted first parameter and other parameters in the first mapping curve parameter set except the first parameter, if the brightness of the content to be displayed obtained after tone mapping according to the first mapping curve is higher than the original brightness of the content to be displayed, continue to adjust the first parameter; or, analyze the adjusted first parameter according to a preset rule, if the adjusted first parameter meets the preset rule, continue to adjust the first parameter.
[0018] By gradually fine-tuning the parameters related to the mapping curve, the accuracy of the mapping curve parameters can be improved.
[0019] In a possible implementation, the adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness, and the adjustment coefficient set to obtain the second mapping curve parameter set includes: when the first mapping curve parameter set includes a scaling factor, calculating the adjusted scaling factor according to formula (3):
[0020]
[0021] Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents a function calculation related to the maximum brightness of the to-be-displayed content in the memory and one or more adjusted parameters in the second mapping curve parameter set, and MaxDisplay represents the maximum display brightness.
[0022] In a possible implementation, the adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness, and the adjustment coefficient set to obtain the second mapping curve parameter set includes: when the first mapping curve parameter set includes a scaling factor, calculating the adjusted scaling factor according to formula (4):
[0023]
[0024] Among them, r a represents the adjusted scaling factor, P1 a ,P2 a, ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, MinSource represents the minimum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the content to be displayed in the memory and one or more adjusted parameters in the second mapping curve parameter set, f(MinSource, P1 a ,P2 a , ...) represents the function calculation related to the minimum brightness of the to-be-displayed content in the memory and one or more adjusted parameters in the second mapping curve parameter set, MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.
[0025] In a possible implementation, the adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness, and the adjustment coefficient set to obtain the second mapping curve parameter set includes: when the first mapping curve parameter set includes a scaling factor, calculating the adjusted scaling factor according to formula (5):
[0026]
[0027] Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents a function calculation related to the maximum brightness of the content to be displayed in the memory and one or more adjusted parameters in the second mapping curve parameter set, MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.
[0028] In a possible implementation, the adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness, and the adjustment coefficient set to obtain the second mapping curve parameter set includes: when the first mapping curve parameter set includes a scaling factor, calculating the adjusted scaling factor according to formula (6):
[0029]
[0030] Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, MinSource represents the minimum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the content to be displayed in the memory and one or more adjusted parameters in the second mapping curve parameter set, f(MinSource, P1 a ,P2 a , ...) represents a function calculation related to the minimum brightness of the to-be-displayed content in the memory and one or more adjusted parameters in the second mapping curve parameter set, and MaxDisplay represents the maximum display brightness.
[0031] In a possible implementation, obtaining the first mapping curve parameter set and the first target system display maximum brightness includes: obtaining the first mapping curve parameter set and the first target system display maximum brightness from dynamic metadata of the content to be displayed; or obtaining the first mapping curve parameter set from the dynamic metadata, and obtaining the first target system display maximum brightness corresponding to the first mapping curve parameter set according to a set corresponding relationship.
[0032] In a possible implementation manner, acquiring the adjustment coefficient set includes: directly reading one or more adjustment coefficients; or acquiring an adjustment mode, and acquiring the one or more adjustment coefficients corresponding to the adjustment mode.
[0033] In a possible implementation manner, the acquiring the display brightness parameter set includes: acquiring the display brightness parameter set through device information; or acquiring the display brightness parameter set through preset information.
[0034] In a possible implementation, after adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness and the adjustment coefficient set to obtain the second mapping curve parameter set, it also includes: obtaining a mapping curve according to the one or more adjusted parameters in the second mapping curve parameter set.
[0035] In a second aspect, an embodiment of the present application provides a device for processing content to be displayed, including: an acquisition module, used to acquire a first mapping curve parameter set and a first target system display maximum brightness, the first mapping curve parameter set and the first target system display maximum brightness correspond, and the first mapping curve parameter set includes one or more parameters related to the mapping curve; acquire a display brightness parameter set, the display brightness parameter set includes the maximum display brightness and / or the minimum display brightness of the display device; acquire an adjustment coefficient set, the adjustment coefficient set includes one or more adjustment coefficients, and the one or more adjustment coefficients correspond to the one or more parameters in the first mapping curve parameter set; a processing module, used to adjust the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness and the adjustment coefficient set to obtain a second mapping curve parameter set, the second mapping curve parameter set includes one or more adjusted parameters; wherein the acquisition module is specifically used to acquire the adjustment coefficient set from dynamic metadata of the content to be displayed.
[0036] In a possible implementation, the processing module is specifically configured to calculate the adjusted first parameter according to formula (1), where the first parameter is any parameter in the first mapping curve parameter set, and the adjusted first parameter belongs to the second mapping curve parameter set:
[0037] P a =P b +k×P Δ (1)
[0038] Among them, P a represents the adjusted first parameter, P b represents the first parameter, P Δ represents the adjustment coefficient corresponding to the first parameter, or When MaxDisplay>M TPL When a=1, when MaxDisplay≤M TPL When a=-1, MaxDisplay represents the maximum display brightness, M TPL It indicates that the first target system displays the maximum brightness, N indicates the adjustment intensity control parameter, and M indicates the preset brightness value.
[0039] In a possible implementation, the acquisition module is further used to acquire one or more of the maximum brightness, the minimum brightness, the average value, and the variation range of the content to be displayed, and obtain an intermediate value of the first parameter according to one or more of the maximum display brightness, the minimum display brightness, the maximum brightness, the minimum brightness, the average value, and the variation range, where the first parameter is any parameter in the first mapping curve parameter set; the processing module is specifically used to calculate the adjusted first parameter according to formula (2), where the adjusted first parameter belongs to the second mapping curve parameter set:
[0040] P a =(1-w)×P b +w×P m (2)
[0041] Among them, P a represents the adjusted first parameter, P b represents the first parameter, or P Δ represents the adjustment coefficient corresponding to the first parameter, MaxDisplay represents the maximum display brightness, M TPL indicates that the first target system displays the maximum brightness, N indicates the adjustment intensity control parameter, M indicates the preset brightness value, P m represents the middle value of the first parameter.
[0042] In a possible implementation, the processing module is further used to obtain a first mapping curve based on the adjusted first parameter and other parameters in the first mapping curve parameter set except the first parameter; if the brightness of the content to be displayed obtained after tone mapping according to the first mapping curve is higher than the original brightness of the content to be displayed, continue to adjust the first parameter; or, analyze the adjusted first parameter according to a preset rule, and if the adjusted first parameter meets the preset rule, continue to adjust the first parameter.
[0043] In a possible implementation manner, the processing module is specifically configured to calculate the adjusted scaling factor according to formula (3) when the first mapping curve parameter set includes a scaling factor:
[0044]
[0045] Among them, r a represents the adjusted scaling factor, P1 a ,P2 a, ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents a function calculation related to the maximum brightness of the to-be-displayed content in the memory and one or more adjusted parameters in the second mapping curve parameter set, and MaxDisplay represents the maximum display brightness.
[0046] In a possible implementation manner, the processing module is specifically configured to calculate the adjusted scaling factor according to formula (4) when the first mapping curve parameter set includes a scaling factor:
[0047]
[0048] Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, MinSource represents the minimum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the content to be displayed in the memory and one or more adjusted parameters in the second mapping curve parameter set, f(MinSource, P1 a ,P2 a , ...) represents the function calculation related to the minimum brightness of the to-be-displayed content in the memory and one or more adjusted parameters in the second mapping curve parameter set, MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.
[0049] In a possible implementation manner, the processing module is specifically configured to calculate the adjusted scaling factor according to formula (5) when the first mapping curve parameter set includes a scaling factor:
[0050]
[0051] Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, f(MaxSource, P1a ,P2 a , ...) represents a function calculation related to the maximum brightness of the content to be displayed in the memory and one or more adjusted parameters in the second mapping curve parameter set, MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.
[0052] In a possible implementation manner, the processing module is specifically configured to calculate the adjusted scaling factor according to formula (6) when the first mapping curve parameter set includes a scaling factor:
[0053]
[0054] Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, MinSource represents the minimum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the content to be displayed in the memory and one or more adjusted parameters in the second mapping curve parameter set, f(MinSource, P1 a ,P2 a , ...) represents a function calculation related to the minimum brightness of the to-be-displayed content in the memory and one or more adjusted parameters in the second mapping curve parameter set, and MaxDisplay represents the maximum display brightness.
[0055] In a possible implementation, the acquisition module is specifically used to obtain the first mapping curve parameter set and the first target system display maximum brightness from dynamic metadata of the content to be displayed; or, obtain the first mapping curve parameter set from the dynamic metadata, and obtain the first target system display maximum brightness corresponding to the first mapping curve parameter set according to a set corresponding relationship.
[0056] In a possible implementation manner, the acquisition module is specifically configured to directly read one or more adjustment coefficients; or, to acquire an adjustment mode, and acquire the one or more adjustment coefficients corresponding to the adjustment mode.
[0057] In a possible implementation manner, the acquisition module is specifically configured to acquire the display brightness parameter set through device information; or acquire the display brightness parameter set through preset information.
[0058] In a possible implementation manner, the acquisition module is further configured to acquire a mapping curve according to the one or more adjusted parameters in the second mapping curve parameter set.
[0059] In a third aspect, an embodiment of the present application provides a terminal device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement a method as described in any one of the above-mentioned first aspects.
[0060] In a fourth aspect, an embodiment of the present application provides a video processing system, comprising: a front end and a back end; wherein the front end comprises a camera for collecting video data and obtaining dynamic metadata of the video data; the back end comprises the device described in any one of the above-mentioned first aspects.
[0061] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a program code, wherein the program code includes instructions for executing part or all of the steps of any one method of the first aspect.
[0062] In a sixth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute part or all of the steps of any one of the methods of the first aspect.
[0063] It should be understood that the second to sixth aspects of the present application are consistent with the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0065] Figure 1 An example diagram showing dynamic range mapping during real-world imaging;
[0066] Figure 2 A curve diagram of a PQ photoelectric transfer function is shown as an example;
[0067] Figure 3 A curve diagram of the HLG photoelectric transfer function is shown as an example;
[0068] Figure 4 A schematic diagram of a curve of the SLF photoelectric transfer function is shown exemplarily;
[0069] Figure 5 A schematic diagram of a sigmoidal curve is shown as an example;
[0070] Figure 6 A schematic diagram of a Bezier curve is shown as an example;
[0071] Figure 7 A schematic diagram of an S-shaped curve is shown as an example;
[0072] Figure 8 A schematic block diagram of a video processing system used in an embodiment of the present application is exemplarily given;
[0073] Fig. 9 An exemplary structural diagram of a terminal device 900 is shown;
[0074] Fig.10 This is a flow chart of an embodiment of a method for obtaining mapping curve parameters of the present application;
[0075] Fig.11 It is a structural block diagram of a video processing device 1100 for implementing an embodiment of the present application. DETAILED DESCRIPTION
[0076] The following is a description of the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. In the following description, reference is made to the drawings that form a part of the present disclosure and show the specific aspects of the embodiments of the present application or the specific aspects of the embodiments of the present application in an illustrative manner. It should be understood that the embodiments of the present application can be used in other aspects and may include structural or logical changes not depicted in the drawings. Therefore, the following detailed description should not be understood in a restrictive sense, and the scope of the present application is defined by the appended claims. For example, it should be understood that the disclosure of the described method can be equally applicable to the corresponding device or system for performing the method, and vice versa. For example, if one or more specific method steps are described, the corresponding device may include one or more units such as functional units to perform the one or more method steps described (for example, one unit performs one or more steps, or multiple units, each of which performs one or more of the multiple steps), even if such one or more units are not explicitly described or illustrated in the drawings. On the other hand, for example, if a specific device is described based on one or more units such as functional units, the corresponding method may include a step to perform the functionality of the one or more units (e.g., a step to perform the functionality of the one or more units, or multiple steps, each of which performs the functionality of one or more of the multiple units), even if such one or more steps are not explicitly described or illustrated in the drawings. Further, it should be understood that, unless otherwise explicitly stated, the features of the various exemplary embodiments and / or aspects described herein may be combined with each other.
[0077] The terms used in the implementation method of this application are only used to explain the specific embodiments of this application, and are not intended to limit this application. The following is a brief introduction to some concepts that may be involved in the embodiments of this application.
[0078] 1. Dynamic range
[0079] Dynamic range is used in many fields to express the ratio between the maximum and minimum values of a variable. In digital images, dynamic range is used to express the ratio between the maximum grayscale value and the minimum grayscale value within the displayable range of the image.
[0080] In nature, the brightness of a night scene under the stars is about 0.001cd / m 2 , the sun itself is as bright as 10 9 cd / m 2 , the dynamic range can reach 10 9 / 0.001=10 12 cd / m 2 However, in the real world, the brightness of the sun and the brightness of the stars are not obtained at the same time, so for the same scene in the real world, the dynamic range is usually 10 -3 cd / m 2 to 10 6 cd / m 2 In most color digital images, the grayscale of the three channels, red (R), green (G) and blue (B), are stored in one byte respectively, that is, the grayscale range of the three channels, R, G and B, is 0 to 255 respectively. The 0 to 255 is the dynamic range of the image, which is called low dynamic range (LDR).
[0081] 2. Optical-electro transfer function (OETF)
[0082] The imaging process of a digital camera is actually a mapping of the high dynamic range of the real world to the low dynamic range of digital images. Figure 1 An example diagram showing dynamic range mapping in a real-world imaging process is shown in Figure 1 As shown in the figure, in the real world, in addition to the brightness of starlight and the brightness of the sun, the brightness of moonlight is also 1cd / m 2 , the brightness of indoor lighting is 100cd / m 2 , the brightness of outdoor cloudy weather is 500cd / m 2 The brightness of outdoor sunny day is 2000cd / m2 The real world brightness range is 100cd / m 2 To 2000cd / m 2 The brightness range corresponding to the storage method of the display device is 1cd / m 2 Up to 200cd / m 2 Into a mapping relationship.
[0083] Since the storage method of the display device cannot reach the high brightness of the real world, an electro-optical transfer function (EOTF) is needed to express the brightness in the real world as the brightness corresponding to the storage method of the display device. For example, the brightness in the real world is 10000cd / m 2 , the display device uses 10 bits to store brightness information, so the maximum value that can be stored in this storage mode is 1023, so 10000cd / m 2 It is represented as 1023.
[0084] Early display devices were cathode ray tube (CRT) displays, whose photoelectric transfer function was the gamma function. The gamma function is defined in the ITU-R Recommendation BT.1886 standard:
[0085]
[0086] With the upgrade of display devices, the illumination range of display devices continues to increase. The illumination of existing HDR displays reaches 600cd / m 2 , the illumination of high-end HDR displays can reach 2000cd / m 2 Therefore, an improved photoelectric transfer function is needed to adapt to the upgrade of display devices. At present, there are three common photoelectric transfer functions: perception quantization (PQ) photoelectric transfer function, hybrid log-gamma (HLG) photoelectric transfer function and scene luminance fidelity (SLF) photoelectric transfer function.
[0087] (1) PQ photoelectric transfer function: Different from the traditional Gamma function, the PQ photoelectric transfer function is proposed based on the contrast perception model of the human eye at different brightness levels. The PQ photoelectric transfer function represents the conversion relationship between the linear signal value of the image frame pixel and the nonlinear signal value in the PQ domain. Figure 2 A curve diagram of the PQ photoelectric transfer function is shown as an example. The PQ photoelectric transfer function can be expressed as:
[0088]
[0089] The parameters corresponding to R, G and B in the above formula can be obtained by the formula Calculate, where L represents the linear signal value of the image frame pixel, and its value is normalized to [0,1]; L' represents the nonlinear signal value in the PQ domain, and its value range is [0,1]; m 1 、m 2 、c 1 、c 2 and c 3 are PQ photoelectric transfer coefficients,
[0090]
[0091]
[0092] (2) HLG photoelectric transfer function: It is an improvement on the traditional Gamma curve. The HLG photoelectric transfer function applies the traditional Gamma curve in the low segment and supplements the log curve in the high segment. The HLG photoelectric transfer function represents the conversion relationship between the linear signal value of the image frame pixel and the nonlinear signal value of the HLG domain. Figure 3 A curve diagram of the HLG photoelectric transfer function is shown as an example. The HLG photoelectric transfer function can be expressed as:
[0093]
[0094] Wherein, L represents the linear signal value of the image frame pixel, and its value range is [0,12]; L' represents the nonlinear signal value of the HLG domain, and its value range is [0,1]; a, b and c are all HLG photoelectric transfer coefficients, a = 0.17883277, b = 0.28466892, c = 0.55991073.
[0095] (3) SLF photoelectric transfer function: It is obtained based on the brightness distribution of the HDR scene under the premise of satisfying the optical characteristics of the human eye. The SLF photoelectric transfer function represents the conversion relationship between the linear signal value of the image frame pixel and the nonlinear signal value in the SLF domain. Figure 4 An exemplary curve diagram of the SLF photoelectric transfer function is shown. The SLF photoelectric transfer function can be expressed as:
[0096]
[0097] The parameters corresponding to R, G and B in the above formula can be obtained by the formula Calculation, where L represents the linear signal value of the image frame pixel, and its value is normalized to [0,1]; L' represents the PQ domain nonlinear signal value, and its value range is [0,1]; p, m, a and b are all SLF photoelectric transfer coefficients, p = 2.3, m = 0.14, a = 1.12762, b = -0.12762.
[0098] 3. Dynamic Range Mapping
[0099] Dynamic range mapping can be applied to the adaptation of front-end HDR signals and back-end HDR display devices. For example, the front-end captures 4000cd / m 2 The HDR display capability of the back-end HDR display device is 500cd / m 2 , 4000cd / m 2 The light signal is mapped to 500cd / m 2 On the display device, it is a tone mapping (TM) process from high to low. Dynamic range mapping can also be applied to the adaptation of the front-end SDR signal and the back-end HDR display device. For example, the front-end captures 100cd / m 2 The HDR display capability of the back-end HDR display device is 2000cd / m 2 , 100cd / m 2 The light signal is mapped to 2000cd / m 2 On the display device, it is a TM process from low to high.
[0100] At present, the dynamic range mapping methods can be divided into two types: static and dynamic. The static mapping method is to use a single data to perform the overall TM process based on the same video content or the same hard disk content, that is, the mapping curve is usually the same for various scenes. The advantage of this method is that the video needs to carry less data and the processing flow is relatively simple; the disadvantage is that all scenes use the same mapping curve for TM, which will cause information loss in some scenes. For example, if the mapping curve focuses on protecting the bright area, some details will be lost in some extremely dark scenes, or they will be completely invisible, which will affect the display effect of the video. The dynamic mapping method is to dynamically adjust the mapping curve for each scene or each frame according to a specific area. The advantage of this method is that it can achieve differentiated processing of different scenes or different frames; the disadvantage is that it is necessary to carry relevant scene information in each frame or each scene, and the amount of data required to be carried by the video is large.
[0101] 4. TM Technology
[0102] (1) TM process based on sigmoidal curve
[0103] Figure 5 A schematic diagram of a sigmoidal curve is shown as an example.
[0104] (2) TM process based on Bezier curve
[0105] Figure 6 A schematic diagram of a Bezier curve is shown as an example.
[0106] (3) TM process based on the S-curve of human eye perception
[0107] Figure 7 A schematic diagram of an S-curve is shown as an example. The photoelectric transfer function corresponding to the S-curve can be expressed as:
[0108]
[0109] Wherein, L and L' are normalized electrical signals or optical signals, respectively, and their value ranges are [0,1]; the value range of a is [0,1]; the value range of b is [0,1]; the value range of p, n and m is [0,N], N is a rational number greater than 0.1; k 1 , k 2 , k 3 All are rational numbers.
[0110] 5. Dynamic Metadata
[0111] The front end (video acquisition and / or production) will carry parameters related to the mapping curve in the dynamic metadata sent to the back end (video display).
[0112] (1) Sigmoidal curve
[0113] The dynamic metadata definition related to the sigmoidal curve proposed in St2094-10 not only includes statistical values such as the maximum value (Maximum PQ-encoded maxRGB), minimum value (Minimum PQ-encoded maxRGB), and average value (Average PQ-encoded maxRGB) of the video brightness, but also includes parameters related to the sigmoid curve such as tone mapping offset, tone mapping gain, and tone mapping gamma, which are used to directly generate the sigmoidal curve.
[0114] However, the generation method of the above parameters is relatively fixed, and the parameters included in the dynamic metadata cannot provide more flexibility for curve generation.
[0115] (2) Bezier curve
[0116] The dynamic metadata definition based on the Bezier curve proposed in St2094-40 includes histogram information (Distribution MaxRGB) and Bezier curve related parameters (bezier curve anchors) for directly generating the Bezier curve.
[0117] In addition, the ST2094 series of standards all include the target system display maximum (peak) brightness (targeted_system_display_maximum_luminance, TSDAPL).
[0118] However, the above parameters correspond to TSDAPL when generated on the front end, but different display devices on the back end use the same curve, which cannot achieve the best display effect.
[0119] (3) S-curve
[0120] The dynamic metadata may include statistical values such as the maximum, minimum, and average values of the video brightness, and may also include parameters related to the S-curve such as p, m, a, b, n, K1, K2, and K3.
[0121] The following describes the system architecture used in the embodiments of the present application. Figure 8 A schematic block diagram of a video processing system used in an embodiment of the present application is given as an example. Figure 8 As shown, the video processing system is divided into a front end and a back end, wherein the front end includes a module for collecting and / or producing videos, and the back end includes an HDR display module and / or an SDR display module. The front end transmits the collected video data to the back end after preprocessing, and also carries the dynamic metadata of the video data. The back end enhances the image frames in the video according to the video data and the corresponding dynamic metadata, obtains an image with excellent color, brightness and contrast, and displays it.
[0122] In the present application, the front end and the back end may be independent and different physical devices. For example, the front end may be a device with a video acquisition function such as a video camera, a camera, an image plotter, and the like, and the back end may be a device with a video playback function such as a mobile phone, a tablet, a set-top box, a TV, etc. At this time, a wireless connection or a wired connection may be established between the front end and the back end, wherein the wireless connection may adopt technologies such as long term evolution (LTE), fifth generation (5G) mobile communications, and future mobile communications. The wireless connection may also include technologies such as wireless fidelity (WiFi), Bluetooth, and near field communication (NFC). The wired connection may include Ethernet connection, local area network connection, etc. This is not specifically limited. The present application may also integrate the functions of the front end and the functions of the back end on the same physical device, for example, a mobile phone, a tablet, a set-top box, a TV, an image plotter, etc. with a video shooting function. The present application may also integrate some functions of the front end and some functions of the back end on the same physical device. This is not specifically limited.
[0123] The above-mentioned device integrating the functions of the front end and the back end can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted; it can also be deployed on the water surface (such as ships, etc.); it can also be deployed in the air (such as airplanes, balloons and satellites, etc.). The terminal device can be a mobile phone, a tablet computer (pad), a wearable device with wireless communication function (such as a smart watch), a location tracker with positioning function, a computer with wireless transceiver function, virtual reality (VR) equipment, augmented reality (AR) equipment, wireless devices in industrial control, wireless devices in self-driving, wireless devices in remote medical, wireless devices in smart grid, wireless devices in transportation safety, wireless devices in smart city, wireless devices in smart home, etc., and this application does not limit this.
[0124] Fig. 9 FIG. 9 is a schematic diagram showing an exemplary structure of a terminal device 900. Fig. 9As shown, the terminal device 900 includes: an application processor 901, a microcontroller unit (MCU) 902, a memory 903, a modem 904, a radio frequency (RF) module 905, a wireless fidelity (Wireless-Fidelity, Wi-Fi for short) module 906, a Bluetooth module 907, a sensor 908, an input / output (I / O) device 909, a positioning module 910 and other components. These components can communicate via one or more communication buses or signal lines. The aforementioned communication bus or signal line can be a CAN bus provided in the present application. It will be appreciated by those skilled in the art that the terminal device 900 may include more or fewer components than shown, or combine certain components, or arrange different components.
[0125] Combine the following Fig. 9 The various components of the terminal device 900 are described in detail:
[0126] The application processor 901 is the control center of the terminal device 900, and uses various interfaces and buses to connect various components of the terminal device 900. In some embodiments, the processor 901 may include one or more processing units.
[0127] The memory 903 stores computer programs such as Fig. 9 The operating system 911 and application program 912 shown in the figure. The application processor 901 is configured to execute the computer program in the memory 903, so as to implement the functions defined by the computer program, for example, the application processor 901 executes the operating system 911 to implement various functions of the operating system on the terminal device 900. The memory 903 also stores other data besides the computer program, such as data generated during the operation of the operating system 911 and the application program 912. The memory 903 is a non-volatile storage medium, generally including internal memory and external memory. The internal memory includes but is not limited to random access memory (RAM), read-only memory (ROM), or cache, etc. The external memory includes but is not limited to flash memory, hard disk, optical disk, universal serial bus (USB) disk, etc. The computer program is usually stored in the external memory, and the processor loads the program from the external memory to the internal memory before executing the computer program.
[0128] The memory 903 may be independent and connected to the application processor 901 via a bus; the memory 903 may also be integrated with the application processor 901 into a chip subsystem.
[0129] MCU 902 is a coprocessor for acquiring and processing data from sensor 908. The processing power and power consumption of MCU 902 are less than those of application processor 901, but it has the feature of "always on". It can continuously collect and process sensor data when application processor 901 is in sleep mode, and ensure the normal operation of the sensor with extremely low power consumption. In one embodiment, MCU 902 can be a sensor hub chip. Sensor 908 can include a light sensor and a motion sensor. Specifically, the light sensor can include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of display 9091 according to the brightness of the ambient light, and the proximity sensor can turn off the power of the display screen when the terminal device 900 moves to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary; the sensor 908 can also include other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., which will not be repeated here. The MCU 902 and the sensor 908 may be integrated into the same chip, or may be separate components connected via a bus.
[0130] The modem 904 and the radio frequency module 905 constitute the communication subsystem of the terminal device 900, which is used to implement the main functions of the wireless communication standard protocol. Among them, the modem 904 is used for encoding and decoding, modulation and demodulation of signals, equalization, etc. The radio frequency module 905 is used for receiving and sending wireless signals, and the radio frequency module 905 includes but is not limited to an antenna, at least one amplifier, a coupler, a duplexer, etc. The radio frequency module 905 cooperates with the modem 904 to implement the wireless communication function. The modem 904 can be used as a separate chip, or it can be combined with other chips or circuits to form a system-level chip or integrated circuit. These chips or integrated circuits can be applied to all terminal devices that implement wireless communication functions, including: mobile phones, computers, notebooks, tablets, routers, wearable devices, cars, home appliances, etc.
[0131] The terminal device 900 can also use Wi-Fi module 906, Bluetooth module 907, etc. to perform wireless communication. The Wi-Fi module 906 is used to provide the terminal device 900 with network access that complies with Wi-Fi related standard protocols. The terminal device 900 can access the Wi-Fi access point through the Wi-Fi module 906 to access the Internet. In some other embodiments, the Wi-Fi module 906 can also be used as a Wi-Fi wireless access point, which can provide Wi-Fi network access for other terminal devices. The Bluetooth module 907 is used to implement short-range communication between the terminal device 900 and other terminal devices (such as mobile phones, smart watches, etc.). The Wi-Fi module 906 in the embodiment of the present application can be an integrated circuit or a Wi-Fi chip, etc., and the Bluetooth module 907 can be an integrated circuit or a Bluetooth chip, etc.
[0132] The positioning module 910 is used to determine the geographical location of the terminal device 900. It is understandable that the positioning module 910 can specifically be a receiver of a positioning system such as a global positioning system (GPS) or a Beidou satellite navigation system or a Russian GLONASS.
[0133] The Wi-Fi module 906, the Bluetooth module 907 and the positioning module 910 can be separate chips or integrated circuits, or they can be integrated together. For example, in one embodiment, the Wi-Fi module 906, the Bluetooth module 907 and the positioning module 910 can be integrated into the same chip. In another embodiment, the Wi-Fi module 906, the Bluetooth module 907, the positioning module 910 and the MCU 902 can also be integrated into the same chip.
[0134] The input / output device 909 includes but is not limited to: a display 9091 , a touch screen 9092 , and an audio circuit 9093 and the like.
[0135] The touch screen 9092 can collect touch events of the user of the terminal device 900 on or near it (for example, the user uses a finger, a stylus or any other suitable object on the touch screen 9092 or near the touch screen 9092), and send the collected touch events to other devices (for example, the application processor 901). The operation of the user near the touch screen 9092 can be called floating touch; through floating touch, the user can select, move or drag the object (for example, an icon, etc.) without directly contacting the touch screen 9092. In addition, the touch screen 9092 can be implemented by various types such as resistive, capacitive, infrared and surface acoustic wave.
[0136] The display (also called display screen) 9091 is used to display information input by the user or information presented to the user. The display can be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The touch screen 9092 can cover the display 9091. When the touch screen 9092 detects a touch event, it is transmitted to the application processor 901 to determine the type of the touch event. Then, the application processor 901 can provide corresponding visual output on the display 9091 according to the type of the touch event. Although in Fig. 9 In the embodiment, the touch screen 9092 and the display 9091 are used as two independent components to implement the input and output functions of the terminal device 900, but in some embodiments, the touch screen 9092 and the display 9091 can be integrated to implement the input and output functions of the terminal device 900. In addition, the touch screen 9092 and the display 9091 can be configured in the form of a full panel on the front of the terminal device 900 to achieve a frameless structure.
[0137] The audio circuit 9093, the speaker 9094, and the microphone 9095 can provide an audio interface between the user and the terminal device 900. The audio circuit 9093 can transmit the electrical signal converted from the received audio data to the speaker 9094, which is converted into a sound signal for output; on the other hand, the microphone 9095 converts the collected sound signal into an electrical signal, which is received by the audio circuit 9093 and converted into audio data, and then the audio data is sent to, for example, another terminal device through the modem 904 and the radio frequency module 905, or the audio data is output to the memory 903 for further processing.
[0138] In addition, the terminal device 900 may also have a fingerprint recognition function. For example, a fingerprint acquisition device may be configured on the back of the terminal device 900 (e.g., below the rear camera), or a fingerprint acquisition device may be configured on the front of the terminal device 900 (e.g., below the touch screen 9092). For another example, a fingerprint acquisition device may be configured in the touch screen 9092 to implement the fingerprint recognition function, that is, the fingerprint acquisition device may be integrated with the touch screen 9092 to implement the fingerprint recognition function of the terminal device 900. In this case, the fingerprint acquisition device is configured in the touch screen 9092, may be a part of the touch screen 9092, or may be configured in the touch screen 9092 in other ways. The main component of the fingerprint acquisition device in the embodiment of the present application is a fingerprint sensor, which may use any type of sensing technology, including but not limited to optical, capacitive, piezoelectric or ultrasonic sensing technology.
[0139] Furthermore, the operating system 911 installed in the terminal device 900 may be Or other operating systems, the embodiments of the present application do not impose any limitations on this.
[0140] To carry Taking the terminal device 900 with an operating system as an example, the terminal device 900 can be logically divided into a hardware layer, an operating system 911, and an application layer. The hardware layer includes hardware resources such as the application processor 901, MCU 902, memory 903, modem 904, Wi-Fi module 906, sensor 908, and positioning module 910 as described above. The application layer includes one or more application programs, such as application program 912, which can be any type of application program such as a social application, an e-commerce application, a browser, etc. The operating system 911, as a software middleware between the hardware layer and the application layer, is a computer program that manages and controls hardware and software resources.
[0141] In one embodiment, the operating system 911 includes a kernel, a hardware abstraction layer (HAL), libraries and runtime, and a framework. The kernel is used to provide underlying system components and services, such as power management, memory management, thread management, hardware drivers, etc.; hardware drivers include Wi-Fi drivers, sensor drivers, positioning module drivers, etc. The hardware abstraction layer is an encapsulation of the kernel driver, providing an interface to the framework and shielding the implementation details of the lower layer. The hardware abstraction layer runs in the user space, while the kernel driver runs in the kernel space.
[0142] The library and runtime are also called runtime libraries, which provide the required library files and execution environment for the executable program at runtime. In one embodiment, the library and runtime include Android runtime (ART), library, and scene package runtime. ART is a virtual machine or virtual machine instance that can convert the bytecode of an application into machine code. The library is a program library that provides support for the executable program at runtime, including a browser engine (such as webkit), a script execution engine (such as JavaScript engine), a graphics processing engine, etc. The scene package runtime is the operating environment of the scene package, mainly including a page execution environment (page context) and a script execution environment (script context), wherein the page execution environment parses page codes in formats such as html and css by calling the corresponding library, and the script execution environment parses and executes codes or executable files implemented in scripting languages such as JavaScript by calling the corresponding function library.
[0143] The framework is used to provide various basic common components and services for the application programs in the application layer, such as window management, location management, etc. In one embodiment, the framework includes a geo-fence service, a policy service, a notification manager, etc.
[0144] The functions of the various components of the operating system 911 described above may be implemented by the application processor 901 executing the program stored in the memory 903 .
[0145] Those skilled in the art will appreciate that the terminal device 900 may include Fig. 9 Fewer or more components than shown, Fig. 9 The terminal device shown only includes components that are more relevant to the multiple implementations disclosed in this application.
[0146] The scheme of the embodiment of the present application is described in detail below:
[0147] Fig.10 This is a flow chart of an embodiment of a method for obtaining mapping curve parameters of the present application, such as Fig.10 As shown, the process 1000 can be applied to Figure 8 The video processing system shown can also be applied to Fig. 9 The terminal device shown in the figure, the execution subject includes the terminal device or the back end in the video processing system. The process 1000 is described as a series of steps or operations. It should be understood that the process 1000 can be executed in various orders and / or occur simultaneously, not limited to Fig.10 The execution order shown. The method for obtaining the mapping curve parameters of the present application includes:
[0148] Step 1001: Obtain a first mapping curve parameter set and a first target system display maximum brightness.
[0149] In this application, the front end can be the above Figure 8 The front end of the video processing system shown in the figure can be the back end of the above-mentioned Figure 8 The back end of the video processing system shown in the figure, in this case, the data of the front end can be transmitted to the back end via a wireless network or a wired network. The front end and the back end can also be integrated in Fig. 9 In the terminal device shown, the data of the front end can be transmitted to the back end through the transmission path inside the terminal device, such as the controller area network (CAN) bus. After receiving the data, the back end can store it in a buffer for subsequent processing. The buffer can be, for example, an RGB color domain pixel buffer of the frame to be processed and / or a metadata buffer of the frame to be processed.
[0150] After the front end obtains the video, it can pre-process the video, for example, including using the photoelectric transfer function to map the brightness in the real world to the brightness that matches the storage method, using the acquired information to adjust the brightness, chromaticity, contrast, etc. of the video, encoding the video to generate a bit stream, etc. The front end sends the processed data to the back end.
[0151] The data from the front end may include video data (also referred to as data of content to be displayed) and dynamic metadata, wherein the video data may be image frame related data in the video, such as pixel data; the dynamic metadata may include data related to the video data and data related to the mapping curve, the data related to the video data may include, for example, the format and characteristics of the video data, the first target system display maximum brightness (targeted_system_display_maximum_luminance), the maximum brightness MaxSource, the minimum brightness MinSource, the average brightness AvgSource that can be stored in the memory, the storable variation range, etc. The principle of the storable variation range is similar to the variance or the distributed confidence interval, which is used to describe the brightness aggregation range of the video signal. The data related to the mapping curve may include, for example, parameters related to the mapping curve, such as a contraction factor, an offset factor, and a bending shape factor. The first mapping curve parameter set includes one or more parameters in the data related to the mapping curve, for example, the data related to the S-curve includes a, b, p, n, m, k 1 , k 2 and k 3 There are eight parameters in total. The first mapping curve parameter set may include all of the eight parameters, or may include only some of the eight parameters. All of the parameters are rational numbers.
[0152] Optionally, the data related to the above video data can also be directly extracted from the video content without being transmitted through dynamic metadata.
[0153] The first mapping curve parameter set corresponds to the maximum brightness displayed by the first target system, that is, one or more parameters in the first mapping curve parameter set are generated with the maximum brightness displayed by the first target system as the target, or are related to the maximum brightness displayed by the first target system. The front end can carry the first mapping curve parameter set and the maximum brightness displayed by the first target system in the dynamic metadata; or only carry the first mapping curve parameter set in the dynamic metadata. In this case, the first mapping curve parameter set corresponds to the default maximum brightness displayed by the target system. The front end and the back end pre-agreed on the default maximum brightness displayed by the target system. Then, the front end only needs to carry the corresponding first mapping curve parameter set in the dynamic metadata. After the back end receives the first mapping curve parameter set, the maximum brightness displayed by the first target system can be known by default. If the back end needs to adjust the peak brightness displayed by the target system according to the actual situation, one or more parameters in the first mapping curve parameter set can be adjusted according to the relationship between the actual brightness and the default peak brightness displayed by the target system to obtain a new mapping curve parameter set corresponding to the actual brightness.
[0154] It should be noted that this application does not specifically limit the content and data format of the above-mentioned video data. For example, from the color space of the pixel data, the format of the video data can be YUV or RGB; from the bit width of the data, the video data can be 8 bits, 10 bits or 12 bits, etc. There is no specific limitation on the content contained in the dynamic metadata. For example, the data related to the mapping curve can be the parameters involved in the above-mentioned sigmoidal curve, the parameters involved in the above-mentioned Bezier curve, or the parameters involved in the S-curve.
[0155] Step 1002: Obtain a display brightness parameter set.
[0156] The present application can obtain a display brightness parameter set through device information, which includes the maximum display brightness (MaxDisplay) and / or minimum display brightness (MinDisplay) of the display device. The device information can be the parameters of the device written when the device leaves the factory, or it can be information provided by the manufacturer, which indicates the properties and performance of the device itself.
[0157] The maximum display brightness refers to the maximum illuminance that the device can present when displaying. The minimum display brightness refers to the minimum illuminance that the device can present when displaying. Usually, the minimum display brightness is set to 0cd / m 2 or 1cd / m 2 Depending on the display performance of the device, the minimum display brightness may also be set to other values, which is not specifically limited in this application.
[0158] Step 1003: Obtain an adjustment coefficient set.
[0159] The set of adjustment coefficients includes information indicating a need for adjustment of one or more parameters associated with the mapping curve.
[0160] The adjustment coefficient set includes one or more adjustment coefficients, and the one or more adjustment coefficients correspond to one or more parameters in the first mapping curve parameter set. As described above, the first mapping curve parameter set includes one or more parameters related to the mapping curve, and an adjustment coefficient in the adjustment coefficient set may correspond to a parameter in the first mapping curve parameter set, that is, each parameter related to the mapping curve corresponds to an adjustment coefficient; in addition, an adjustment coefficient in the adjustment coefficient set may also correspond to multiple parameters in the first mapping curve parameter set, that is, each adjustment coefficient corresponds to multiple parameters related to the mapping curve; the adjustment coefficient set may also not include an adjustment coefficient corresponding to one or more parameters in the first mapping curve parameter set, that is, one or more parameters related to the mapping curve in the first mapping curve parameter set do not have a corresponding adjustment coefficient in the adjustment coefficient set, indicating that the parameter does not need to be adjusted at this time; the first mapping curve parameter set may also include parameters that do not correspond to any adjustment coefficient in the adjustment coefficient set, that is, one or more adjustment coefficients do not have a corresponding parameter in the first mapping curve parameter set, indicating that the front end does not send the parameter to the back end at this time, but the parameter needs to be adjusted, and the back end can obtain the parameter through other methods.
[0161] In the present application, the device can obtain a set of adjustment coefficients from dynamic metadata. The front end sets the adjustment method of one or more parameters related to the mapping curve before sending the code stream, and can write it into the dynamic metadata and send it to the back end; or, the device obtains the set of adjustment coefficients according to a preset value. The preset value can correspond to one or more parameters related to the mapping curve, or it can be an adjustment mode index, and the device obtains the corresponding adjustment coefficients of one or more parameters related to the mapping curve based on the index.
[0162] Step 1004: adjust one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness and the adjustment coefficient set to obtain a second mapping curve parameter set.
[0163] The second mapping curve parameter set includes one or more adjusted parameters, which correspond to one or more parameters in the first mapping curve parameter set and are obtained after the latter is adjusted. It should be noted that the parameters included in the second mapping curve parameter set and the parameters included in the first mapping curve parameter set can correspond to each other one by one, that is, each parameter included in the first mapping curve parameter set is added to the second mapping curve parameter set after adjustment, and it can be applicable to the first mapping curve parameter set including all parameters related to the mapping curve; the parameters included in the second mapping curve parameter set can also be parameters not included in the first mapping curve parameter set, that is, each parameter included in the first mapping curve parameter set is added to the second mapping curve parameter set after adjustment, and some parameters are obtained by the device using other methods, and then these parameters are adjusted or not adjusted to be added to the second mapping curve parameter set, and it can be applicable to the first mapping curve parameter set including some parameters related to the mapping curve. In addition, the data included in the second mapping curve parameter set can also be a set of adjusted first mapping curve parameters and unadjusted first mapping curve parameters.
[0164] The following describes the method for obtaining the second mapping curve parameter set in the present application by taking the first parameter as an example, where the first parameter is any parameter in the first mapping curve parameter set.
[0165] Method 1: Calculate the adjusted first parameter according to formula (1):
[0166] P a =P b +k×P Δ (1)
[0167] Among them, P a represents the first parameter after adjustment, P b Represents the first parameter, P Δ represents the adjustment coefficient corresponding to the first parameter, or When MaxDisplay>M TPL When a=1, when MaxDisplay≤M TPL When a=-1, MaxDisplay indicates the maximum display brightness, M TPL represents the maximum brightness of the first target system display, N represents the adjustment intensity control parameter, which is a rational number greater than 0, such as 1, 2, etc., and M represents the preset brightness value, which is a rational number greater than 0, such as 100cd / m 2 , 50cd / m 2 Etc. Usually, M=1, N=100cd / m 2The functions of M and N are both used to control the speed of change of parameters related to the mapping curve. It should be noted that in order to adapt to hardware from different manufacturers, different content scenarios, etc., one or both of M and N can be passed as parameters through dynamic metadata. The following methods are also the same and will not be repeated here.
[0168] It should be noted that the value of MaxDisplay in this application can be an absolute brightness value, for example, 100cd / m 2 , 1000cd / m 2 ; The value of MaxDisplay can also be a normalized brightness value, which ranges from 0 to 1; The value of MaxDisplay can also be a brightness value in the PQ domain, for example, 0cd / m 2 -10000cd / m 2 In this application, TPL The value can be an absolute brightness value, for example, 100cd / m 2 , 1000cd / m 2 ;M TPL The value of can also be a normalized brightness value, which ranges from 0 to 1; TPL The value can also be the brightness value in the PQ domain, for example, 0cd / m 2 -10000cd / m 2 The value of M in this application may be an absolute brightness value, for example, 100 cd / m 2 , 1000cd / m 2 ; The value of M can also be a normalized brightness value, which ranges from 0 to 1; The value of M can also be a brightness value in the PQ domain, for example, 0cd / m 2 -10000cd / m 2 This application does not make any specific limitation on this. The following methods are also the same and will not be described in detail.
[0169] All or part of the parameters in the first mapping curve parameter set may be adjusted using the above formula (1), and the adjusted parameters are added to the second mapping curve parameter set.
[0170] Method 2: Calculate the adjusted first parameter according to formula (2):
[0171] P a =(1-w)×P b +w×P m (2)
[0172] Among them, P a represents the first parameter after adjustment, P b Represents the first parameter, or P ΔIndicates the adjustment coefficient corresponding to the first parameter, MaxDisplay indicates the maximum display brightness, M TPL Indicates the maximum brightness of the first target system display, N indicates the adjustment intensity control parameter, which is a rational number greater than 0, such as 1, 2, etc., and M indicates the preset brightness value, which is a rational number greater than 0, such as 100cd / m 2 , 50cd / m 2 etc., P. m It is an intermediate value of the first parameter obtained according to one or more parameters such as maximum display brightness, minimum display brightness, storable maximum brightness, storable minimum brightness, storable average value and storable variation range.
[0173] It should be noted that P m It can also be obtained based on more or fewer parameters than the above maximum display brightness, and / or minimum display brightness, and / or storable maximum brightness, and / or storable minimum brightness, and / or storable average value, and / or storable variation range, and this application does not specifically limit this. The following method is also the same and will not be repeated. This application is about P m The acquisition of can refer to the generation method of the mapping curve in the related art, and this application does not make any specific limitation on this.
[0174] It should be noted that in the second method, the device can obtain another set of parameter sets related to the mapping curve based on data related to the video data, such as the maximum brightness, and / or minimum brightness, and / or average brightness, and / or the storable range of variation of the video that can be stored in the memory, the maximum display brightness and the minimum display brightness of the device, and / or other parameters that are not directly related to the mapping curve. The parameters in the parameter set correspond one-to-one to the parameters in the first mapping curve parameter set, and there may also be parameters that are not in the first mapping curve parameter set. In this way, the device can obtain two sets of parameter sets related to the mapping curve, one of which comes from the front end, and the other is calculated by the device based on the characteristics of the video data. The two sets of parameter sets are then merged using a weighted method to obtain the final parameter set. In this way, by adjusting the weights of the two, a more flexible brightness processing method can be used at different positions in the video to obtain a video that better meets the display performance of the device.
[0175] In addition, regarding P m The calculation method can also be applied to parameters related to the mapping curve but not included in the first mapping curve parameter set. The above device uses other methods to obtain parameters in a similar manner.
[0176] In a possible implementation, the device may obtain the first mapping curve according to the adjusted first parameter and other parameters in the first mapping curve parameter set except the first parameter, and if the video brightness obtained after tone mapping according to the first mapping curve is higher than the original brightness of the video, the first parameter is further adjusted. This is to ensure that the mapping curve does not have a portion higher than the straight line x=y.
[0177] In a possible implementation, the adjusted first parameter is analyzed according to a preset rule, and if the adjusted first parameter meets the preset rule, the first parameter continues to be adjusted. a × a >Tp a , where p a is the first parameter, r a is the scaling factor, Tp a is the set threshold, for example, 3.2363, then p a Adjust to the upper limit value Tp, Tp = Tp a / r a You can also search for the same value as r in the pre-set table (Ta, Tp). a Corresponding Tp, if p a >Tp, then p a Adjust to the upper limit value Tp. It should be noted that if the same value cannot be found by looking up the table, the queried value can be determined by using adjacent values, weighted average of adjacent values, etc. The above two inequalities indicate that the mapping curve obtained according to the current set of parameters related to the mapping curve has a portion that is higher than the straight line x=y, so the corresponding parameters need to be reduced in dimension. It should be noted that in addition to the above two methods, the present application can also use other methods to ensure that the mapping curve does not have a portion that is higher than the straight line x=y, and there is no specific limitation on this.
[0178] In a possible implementation, when the first mapping curve parameter set includes a scaling factor, the adjusted scaling factor is calculated according to formula (3):
[0179]
[0180] Among them, r a Represents the adjusted scaling factor, P1 a ,P2 a ,... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness that the video can store in the memory, f(MaxSource,P1 a ,P2 a,...) represents the maximum brightness of the video that can be stored in the memory and the function calculation related to one or more adjusted parameters in the second mapping curve parameter set, the function includes the part related to the tone mapping function parameters, MaxDisplay represents the maximum display brightness. The storable value is related to the storage method of the memory. For example, if 10 bits are used for storage, the maximum value that can be stored in the memory is 2 1 0 = 1024, the minimum value that can be stored is 0; if 8 bits are used for storage, the maximum value that can be stored in the memory is 2 8 =256, the minimum value that can be stored is 0.
[0181] If a scaling factor is involved in obtaining the mapping curve, the device can use formula (3) to calculate the scaling factor based on one or more adjusted parameters in the second mapping curve parameter set that has been obtained, so that the scaling factor is obtained based on the adjusted parameters, so that the mapping curve finally generated is more consistent with the characteristics of the video. The scaling factor determines the degree of scaling of the linear signal value of the image frame pixel in the formula for calculating the mapping curve. For example, formula In the equation, a is the scaling factor.
[0182] In a possible implementation, when the first mapping curve parameter set includes a scaling factor, the adjusted scaling factor is calculated according to formula (4):
[0183]
[0184] Among them, r a Represents the adjusted scaling factor, P1 a ,P2 a ,... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness that the video can store in the memory, MinSource represents the minimum brightness that the video can store in the memory, f(MaxSource,P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the video that can be stored in the memory and one or more adjusted parameters in the second mapping curve parameter set, f(MinSource,P1 a ,P2 a , ...) represents a function calculation related to the minimum brightness that can be stored in the memory of the video and one or more adjusted parameters in the second mapping curve parameter set, MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.
[0185] In a possible implementation, when the first mapping curve parameter set includes a scaling factor, the adjusted scaling factor is calculated according to formula (5):
[0186]
[0187] Among them, r a Represents the adjusted scaling factor, P1 a ,P2 a ,... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness that the video can store in the memory, f(MaxSource,P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness that can be stored in the memory of the video and one or more adjusted parameters in the second mapping curve parameter set, MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.
[0188] In a possible implementation, when the first mapping curve parameter set includes a scaling factor, the adjusted scaling factor is calculated according to formula (6):
[0189]
[0190] Among them, r a Represents the adjusted scaling factor, P1 a ,P2 a ,... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness that the video can store in the memory, MinSource represents the minimum brightness that the video can store in the memory, f(MaxSource,P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the video that can be stored in the memory and one or more adjusted parameters in the second mapping curve parameter set, f(MinSource,P1 a ,P2 a , ...) represents a function calculation related to the minimum brightness of the video that can be stored in the memory and one or more adjusted parameters in the second mapping curve parameter set, and MaxDisplay represents the maximum display brightness.
[0191] In a possible implementation manner, when the first mapping curve parameter set includes an offset factor, the adjusted offset factor is determined according to the following manner:
[0192] r a=MinDisplay, MinDisplay represents the minimum display brightness; or,
[0193] r a =G, G represents the preset value, which can be a rational number such as 0 or 1.
[0194] If a scaling factor is involved when obtaining the mapping curve, the device can use any of the above formulas to calculate the scaling factor based on one or more adjusted parameters in the second mapping curve parameter set that has been obtained, so that the scaling factor is obtained based on the adjusted parameters, so that the finally generated mapping curve is more in line with the characteristics of the video.
[0195] Step 1005: Acquire a mapping curve according to one or more adjusted parameters in the second mapping curve parameter set.
[0196] Based on one or more adjusted parameters, the entire mapping curve or a portion of a segmented tone mapping curve can be obtained. The curve calculation can obtain a mapping from normalized HDR / SDR video data to normalized display data. The obtained mapping value is then reverse-normalized to the actual display data of the device according to the maximum display brightness and minimum display brightness of the device.
[0197] It should be noted that the above reverse normalization calculation can be a nonlinear space or a linear space normalized to 0-1. 2 -10000cd / m 2 , or 0.001cd / m 2 -100000cd / m 2 . The present application does not specifically limit the scope and process of inverse normalization. In addition, obtaining the mapping curve not only includes tone mapping, but also the mapped video can be further adjusted before display to adjust its saturation processing, or / and color gamut conversion processing, or / and denoising processing, or / and sharpening processing, etc., which are not specifically limited in the present application.
[0198] The present application adjusts one or more parameters related to the mapping curve. The adjustment process is combined with the display capabilities of the backend, and can provide more precise color tone adjustment for display devices of different brightness. It has greater flexibility and can also achieve good presentation effects when the curve parameters are reasonably configured.
[0199] The following are some specific examples. Fig.10 The scheme of the method embodiment shown is further explained.
[0200] Embodiment 1
[0201] For the S-shaped curve, the dynamic metadata may include statistical values such as the maximum brightness, minimum brightness, and average brightness of the video that can be stored in the memory, and may also include parameters related to the S-shaped curve such as p, m, a, b, n, K1, K2, and K3.
[0202] 1. Obtain a first mapping curve parameter set and a first target system display maximum brightness.
[0203] The dynamic metadata includes the format or characteristics of the video data, the first mapping curve parameter set Mb = {p b 、m b 、a b 、b b 、n b 、K1 b , K2 b 、K3 b}、Target system display maximum brightness (targeted_system_display_maximum_luminance) M TPL , and / or the maximum brightness MaxSource, and / or the minimum brightness MinSource, and / or the average brightness AvgSource, and / or the storable range of variation, etc., that can be stored in the memory of the video.
[0204] It should be noted that the present application does not specifically limit the content and data format of the above video data. For example, in terms of the color space of the pixel data, the format of the video data can be YUV or RGB; in terms of the bit width of the data, the video data can be 8 bits, 10 bits or 12 bits, etc.
[0205] 2. Get the display parameter set of the backend.
[0206] The display parameter set may include the maximum display brightness MaxDisplay of the backend, and / or the minimum display brightness MinDisplay, and / or the target system display maximum brightness (targeted_system_display_maximum_luminance) T TPL The maximum display brightness MaxDisplay can be obtained based on the device parameters or manufacturer's information, and the minimum display brightness MinDisplay can be set to 0cd / m 2 Or 1cd / m 2 Or 0cd / m 2 Or 1cd / m 2 The corresponding PQ value. Depending on the display performance of the device, the minimum display brightness can also be set to other values, which is not specifically limited in this application.
[0207] 3. Obtain a set of adjustment coefficients.
[0208] Corresponding to the first mapping curve parameter set Mb, the adjustment coefficient set M Δ It can be {p Δ 、m Δ 、a Δ 、b Δ 、n Δ 、K1 Δ , K2 Δ 、K3 Δ Usually the adjustment coefficient set can be obtained through metadata or can be pre-set.
[0209] Fourth, one or more parameters in the first mapping curve parameter set are adjusted according to the local maximum display brightness, the first target system maximum display brightness and the adjustment coefficient set to obtain the second mapping curve parameter set.
[0210] For the first mapping curve parameter set Mb = {p b 、m b 、a b 、b b 、n b 、K1 b , K2 b 、K3 b} to obtain an adjusted second mapping curve parameter set Ma={p a 、m a 、a a 、b a 、n a 、K1 a , K2 a 、K3 a}. It mainly includes the following steps:
[0211] A. Traverse the first mapping curve parameter set Mb = {p b 、m b 、a b 、b b 、n b 、K1 b , K2 b 、K3 b} parameter Q b (Q b is any parameter in Mb). If the adjustment coefficient set M Δ There is a corresponding adjustment coefficient Q Δ , then Q a =Q b +k×Q Δ , otherwise Q a =Q b ,in or When MaxDisplay>M TPL When a=1, when MaxDisplay≤M TPL When a=-1, M is the preset brightness value, which is a rational number greater than 0, such as 100cd / m 2 , 50cd / m 2 Or 100cd / m 2 The corresponding PQ value, etc., N is the adjustment intensity control parameter, which is a rational number greater than 0, such as 1, 2, etc.
[0212] B.Set b a =MinDisplay or b a =0.
[0213] C. Settings
[0214] D. If there is a portion higher than the straight line x=y in the mapping curve obtained according to the current second mapping curve parameter set, then p a Restricted to Tp. Mainly includes the following methods:
[0215] If p a ×a a >Tp a , then it is considered that the part of the mapping curve that is higher than the straight line x=y is higher than x=y, Tp a is the preset value. Tp=Tp a / a a .or,
[0216] Search the pre-set table (Ta, Tp) for the a Corresponding Tp, if p a >Tp, then p a It is adjusted to the upper limit value Tp. It should be noted that if the same value cannot be found by looking up the table, the queried value can be determined by using adjacent values, weighted average of adjacent values, etc.
[0217] At this time, the scaling factor a is calculated according to the following formula a :
[0218] or
[0219] or
[0220]
[0221] Among them, L=MaxSource, L1=MinSource.
[0222] About a aThe following method of calculation is also the same, so I will not go into details.
[0223] 5. Obtaining a mapping curve according to one or more adjusted parameters in the second mapping curve parameter set. The process of obtaining the mapping curve is essentially a process of obtaining a normalized light spot signal through the above parameter set.
[0224] A function calculation related to one or more adjusted parameters in the second mapping curve parameter set is obtained according to one or more adjusted parameters in the second mapping curve parameter set. The mapping curve can be obtained by using the following formula:
[0225] or
[0226] or
[0227] or
[0228]
[0229] The parameters {p, m, a, b, n, K1, K2, K3} in the formula are all from the second mapping curve parameter set. L and L' are both normalized electrical signals or optical signals, L' is a rational number ranging from 0.0 to 1.0, L is a rational number ranging from 0.0 to 1.0; a ranges from 0.0 to 1.0; b ranges from 0.0 to 1.0; p, n and m range from 0.1 to N; N is a rational number greater than 0.1; k1, k2, k3 are rational numbers. The following method for calculating L' is also the same, so I will not go into details.
[0230] It should be noted that the above four formulas can all be used to obtain mapping curves, and the difference lies in the one or more parameters related to the mapping curve and adjusted in the second mapping curve parameter set. The mapping curve obtained by the formula can be the entire curve or a segment or part of a segmented mapping curve.
[0231] Embodiment 2
[0232] For the S-shaped curve, the dynamic metadata may include statistical values such as the maximum brightness, minimum brightness, average brightness, and storable range of variation of the video that can be stored in the memory, and may also include parameters related to the S-shaped curve such as p, m, a, b, n, K1, K2, and K3.
[0233] 1. Obtain a first mapping curve parameter set and a first target system display maximum brightness.
[0234] 2. Get the display parameter set of the backend.
[0235] 3. Obtain a set of adjustment coefficients.
[0236] The technical principles of steps 1 to 3 in the second embodiment are similar to those of steps 1 to 3 in the first embodiment, and will not be repeated here.
[0237] Fourth, one or more parameters in the first mapping curve parameter set are adjusted according to the local maximum display brightness, the first target system maximum display brightness and the adjustment coefficient set to obtain the second mapping curve parameter set.
[0238] For the first mapping curve parameter set Mb = {p b 、m b 、a b 、b b 、n b 、K1 b , K2 b 、K3 b} to obtain an adjusted second mapping curve parameter set Ma={p a 、m a 、a a 、b a 、n a 、K1 a , K2 a 、K3 a}. It mainly includes the following steps:
[0239] A. According to the maximum display brightness MaxDisplay, and / or the minimum display brightness MinDisplay, and / or the storable maximum brightness MaxSource, and / or the storable minimum brightness MinSource, and / or the storable average value AvgSource, and / or the storable variation range, and / or other parameters not directly related to the mapping curve, etc. in the metadata, another set of parameter sets related to the mapping curve is obtained: Mm={p m 、m m 、a m 、b m 、n m 、K1 m , K2 m 、K3 m}, where one or more parameters in Mm can be used as the parameter P in formula (2) above. m .
[0240] B. Traverse the first mapping curve parameter set Mb = {p b 、m b 、a b 、b b 、n b 、K1 b , K2b , K3 b} parameter Q b (Q b is any parameter in Mb). If in the parameter set Mm={p m 、m m 、a m 、b m 、n m 、K1 m , K2 m 、K3 m} to find the corresponding parameter Q m , then Q a =(1-w)Q b +w×Q m , otherwise Q a =Q b ,in or M is the preset brightness value, which is a rational number greater than 0, such as 100cd / m 2 , 50cd / m 2 or 100cd / m 2 The PQ value corresponding to the linear brightness value is, and so on. N is the adjustment intensity control parameter, which is a rational number greater than 0, such as 1, 2, etc.
[0241] C.Set b a =MinDisplay or b a =0.
[0242] D. Scaling factor a a The calculation formula of can refer to the above-mentioned embodiment 1, and will not be repeated here.
[0243] 5. Obtain a mapping curve according to one or more adjusted parameters in the second mapping curve parameter set.
[0244] The technical principle of step five in embodiment two is similar to that of step five in embodiment one above, and will not be repeated here.
[0245] Embodiment 3
[0246] For the S-shaped curve, the dynamic metadata may include statistical values such as the maximum brightness, minimum brightness, average brightness, and storable range of variation of the video that can be stored in the memory, and may also include parameters related to the S-shaped curve such as p, m, a, b, n, K1, K2, and K3.
[0247] 1. Obtain a first mapping curve parameter set and a first target system display maximum brightness.
[0248] 2. Get the display parameter set of the backend.
[0249] 3. Obtain a set of adjustment coefficients.
[0250] The technical principles of steps 1 to 3 in Example 3 are similar to those of steps 1 to 3 in the above-mentioned Example 1, and will not be repeated here.
[0251] Fourth, one or more parameters in the first mapping curve parameter set are adjusted according to the local maximum display brightness, the first target system maximum display brightness and the adjustment coefficient set to obtain the second mapping curve parameter set.
[0252] For the first mapping curve parameter set Mb = {p b 、m b 、a b 、b b 、n b 、K1 b , K2 b 、K3 b} to obtain an adjusted second mapping curve parameter set Ma={p a 、m a 、a a 、b a 、n a 、K1 a , K2 a 、K3 a}. It mainly includes the following steps:
[0253] A. According to the maximum display brightness MaxDisplay, and / or the minimum display brightness MinDisplay, and / or the storable maximum brightness MaxSource, and / or the storable minimum brightness MinSource, and / or the storable average value AvgSource, and / or the storable variation range, and / or other parameters not directly related to the mapping curve, etc. in the metadata, another set of parameter sets related to the mapping curve is obtained: Mm={p m 、m m 、a m 、b m 、n m 、K1 m , K2 m 、K3 m}, where one or more parameters in Mm can be used as the parameter P in formula (2) above. m .
[0254] B. Traverse the first mapping curve parameter set Mb = {p b 、m b 、a b 、b b 、n b 、K1 b , K2b 、K3 b} parameter Q b (Q b is any parameter in Mb). If in the parameter set Mm={p m 、m m 、a m 、b m 、n m 、K1 m , K2 m 、K3 m} to find the corresponding parameter Q m , then Q a =(1-w)Q b +w×Q m , otherwise Q a =Q b ,in or M is the preset brightness value, which is a rational number greater than 0, such as 100cd / m 2 , 50cd / m 2 or 100cd / m 2 , 50cd / m 2 The corresponding PQ value, etc., N is the adjustment intensity control parameter, which is a rational number greater than 0, such as 1, 2, etc.
[0255] C.Set b a =MinDisplay or b a =0.
[0256] D. Settings or a a =a b .
[0257] E. If there is a portion higher than the straight line x=y in the mapping curve obtained according to the current second mapping curve parameter set, then p a Restricted to Tp. Mainly includes the following methods:
[0258] If p a ×a a >Tp a , then it is considered that the part of the mapping curve that is higher than the straight line x=y is higher than x=y, Tp a is the preset value. Tp=Tp a / a a .or,
[0259] Search the pre-set table (Ta, Tp) for the a Corresponding Tp, if p a >Tp, then p aIt is adjusted to the upper limit value Tp. It should be noted that if the same value cannot be found by looking up the table, the queried value can be determined by using adjacent values, weighted average of adjacent values, etc.
[0260] Scaling factor a a The calculation formula of can refer to the above-mentioned embodiment 1, and will not be repeated here.
[0261] 5. Obtain a mapping curve according to one or more adjusted parameters in the second mapping curve parameter set.
[0262] The technical principle of step five in embodiment three is similar to that of step five in embodiment one above, and will not be repeated here.
[0263] Embodiment 4
[0264] For the S-shaped curve, the dynamic metadata may include statistical values such as the maximum brightness, minimum brightness, and average brightness of the video that can be stored in the memory, and may also include parameters related to the S-shaped curve such as p, m, a, b, n, K1, K2, and K3.
[0265] 1. Obtain a first mapping curve parameter set and a first target system display maximum brightness.
[0266] 2. Get the display parameter set of the backend.
[0267] 3. Obtain a set of adjustment coefficients.
[0268] The technical principles of steps 1 to 3 in Example 4 are similar to those of steps 1 to 3 in the above-mentioned Example 1, and will not be repeated here.
[0269] Fourth, one or more parameters in the first mapping curve parameter set are adjusted according to the local maximum display brightness, the first target system maximum display brightness and the adjustment coefficient set to obtain the second mapping curve parameter set.
[0270] For the first mapping curve parameter set Mb = {p b 、m b 、a b 、b b 、n b 、K1 b , K2 b 、K3 b} to obtain an adjusted second mapping curve parameter set Ma={p a 、m a 、a a 、b a 、n a 、K1 a , K2 a 、K3 a}. It mainly includes the following steps:
[0271] A. Traverse the first mapping curve parameter set Mb = {p b 、m b 、a b 、b b 、n b 、K1 b , K2 b 、K3 b} parameter Q b (Q b is any parameter in Mb). If the adjustment coefficient set M Δ There is a corresponding adjustment coefficient Q Δ , then Q a =Q b +k×Q Δ , otherwise Q a =Q b ,in or When MaxDisplay>M TPL When a=1, when MaxDisplay≤M TPL When a=-1, M is the preset brightness value, which is a rational number greater than 0, such as 100cd / m 2 , 50cd / m 2 Or 100cd / m 2 The corresponding PQ value, etc., N is the adjustment intensity control parameter, which is a rational number greater than 0, such as 1, 2, etc.
[0272] B.Set b a =MinDisplay or b a =0.
[0273] C. Scaling factor a a The calculation formula of can refer to the above-mentioned embodiment 1, and will not be repeated here.
[0274] 5. Obtain a mapping curve according to one or more adjusted parameters in the second mapping curve parameter set.
[0275] The technical principle of step five in embodiment four is similar to that of step five in embodiment one above, and will not be repeated here.
[0276] Embodiment 5
[0277] This embodiment is used to illustrate the pre-operation steps in the process of obtaining the HDR basic curve (parameter) in any one of the first to fourth embodiments, which specifically includes:
[0278] 1. Get the basic curve parameter Stone_mapping from the dynamic metadata information.
[0279] According to the tone mapping identifier tone_mapping_mode and the base curve identifier base_flag in the metadata information, m_p, m_a, m_m, m_n, m_b, K1, K2, and K3 are obtained. For parameters that do not exist, they are set to unassigned N_A.
[0280] 2. Obtain the maximum brightness correction value max_lum of the frame to be processed and the minimum brightness min_lum of the frame to be processed from the metadata information.
[0281] Update the maximum brightness correction value max_lum of the frame to be processed.
[0282] 3. Update the unassigned parameters in the basic curve parameter Stone_mapping to obtain Ptone_mapping.
[0283] A. If tone_mapping_mode is 0, the following basic curve parameters are called to obtain the process update parameters;
[0284] The input is the maximum display brightness MaxDisplay (value of the PQ domain) of the display brightness range of the display device, the minimum display brightness MinDisplay (value of the PQ domain) of the display brightness range of the display device, and metadata information; the output is the basic curve parameter P tone_mapping , including m_p, m_a, m_m, m_n, m_b, K1, K2, K3.
[0285] 1. Set m_m, m_n, K1, K2, and K3 to the preset values of 2.4, 1, 1, 1, and 1 respectively. After the above parameters are preset, the curve becomes
[0286]
[0287] 2. Set m_b to MinDisplay.
[0288] 3. Calculate m_p based on average_maxrgb(avgL) in metadata information:
[0289]
[0290] in, P valueH0 , P valueL0、 TPH0 and TPL0 are preset values, the default values are 3.5, 4.0, 0.6, and 0.3 respectively, and g0() is y=x N , the default is y=x.
[0291] 4. Update m_p according to the maximum brightness correction value max_lum:
[0292]
[0293] in, P deltaH1 , P deltaL1 , TPH1 and TPL1 are preset values, and their default values are 0.6, 0.0, 0.9, and 0.75 respectively.
[0294] 5. Obtain H(L) based on m_p, m_m, m_n, m_b, K1, K2, K3
[0295]
[0296] Thus we get
[0297]
[0298] Among them, MaxSource represents the maximum brightness correction value max_lum (PQ domain) of the frame to be processed, and MinSource represents the minimum brightness min_lum (PQ domain) of the frame to be processed.
[0299] B, otherwise, if tone_mapping_mode is 1:
[0300] If the target system display maximum brightness targeted_system_display_maximum_luminance is equal to MaxDisplay, m_p, m_a, m_m, m_n, m_b, K1, K2, and K3 are set to m_p_0, m_a_0, m_m_0, m_n_0, m_b, K1_0, K2_0, and K3_0; otherwise, any of the schemes in embodiments one to four is used to adjust the basic curve parameters.
[0301] It should be noted that when entering the above-mentioned branch B, that is, otherwise, if tone_mapping_mode is 1, the judgment process "If the target system display maximum brightness targeted_system_display_maximum_luminance is equal to MaxDisplay, then set m_p, m_a, m_m, m_n, m_b, K1, K2, K3 to m_p_0, m_a_0, m_m_0, m_n_0, m_b, K1_0, K2_0, K3_0;" is an optional step, and the basic curve parameters can be adjusted by directly adopting any of the schemes in Examples 1 to 4, and the output results are consistent. By adopting the judgment process of "if the target system display maximum brightness targeted_system_display_maximum_luminance is equal to MaxDisplay, then set m_p, m_a, m_m, m_n, m_b, K1, K2, K3 to m_p_0, m_a_0, m_m_0, m_n_0, m_b, K1_0, K2_0, K3_0;", the complexity and calculation time in the actual hardware implementation process can be simplified.
[0302] Exemplarily, the implementation of the first embodiment may be as follows:
[0303] The input is the maximum display brightness MaxDisplay of the display brightness range of the display device (the value of the PQ domain), the minimum display brightness MinDisplay of the display brightness range of the display device (the value of the PQ domain), the RGB color domain pixel buffer f[Nframe][3] of the frame to be processed, and the metadata information m_p_0, m_a_0, m_m_0, m_n_0, m_b, K1_0, K2_0, K3_0, targeted_system_display_maximum_luminance (M TPL ), base_param_Delta; output is the basic curve parameter P tone_mapping , including m_p, m_a, m_m, m_n, m_b, K1, K2, K3.
[0304] 1. Set m_m, m_n, K1, K2, K3 to m_m_0, m_n_0, K1_0, K2_0, K3_0.
[0305] 2. Set m_b to MinDisplay.
[0306] 3. Settings
[0307] 4. Settings The default value of N is 1. If m_p is greater than Tm_p, set m_p = Tm_p, the default value of Tm_p is Tpa / m_a, and the default value of Tpa is 3.2363.
[0308] 5. Thus we get:
[0309]
[0310] 6. Substitute L equal to MaxSource into the following formula to get m_a:
[0311]
[0312] Exemplarily, the implementation of the second embodiment may be as follows:
[0313] The input is the maximum display brightness MaxDisplay of the display brightness range of the display device (the value of the PQ domain), the minimum display brightness MinDisplay of the display brightness range of the display device (the value of the PQ domain), average_maxrgb in the metadata, the RGB color domain pixel buffer f[Nframe][3] of the frame to be processed, and the metadata information m_p_0, m_m_0, m_n_0, m_a_0, m_b_0, K1_0, K2_0, K3_0, targeted_system_display_maximum_luminance (M TPL ), base_param_Delta; output is the basic curve parameter P tone_mapping , including m_p, m_m, m_n, m_a, m_b, K1, K2, K3.
[0314] 1. Generate basic curve parameters P1 tone_mapping , including m_p_1, m_m_1, m_n_1, m_a_1, m_b_1, K1_1, K2_1, K3_1.
[0315] 2. Calculation Where N is a number greater than 0, 1 is used by default, and w is greater than or equal to 0 and less than or equal to 1.
[0316] 3. Calculate m_p, m_m, m_n, K1, K2, and K3 according to the following formula:
[0317] m_p=(1-w)×m_p_0+w×m_p_1,
[0318] m_m=(1-w)×m_m_0+w×m_m_1,
[0319] m_n=(1-w)×m_n_0+w×m_n_1,
[0320] K1=(1-w)×K1_0+w×K1_1,
[0321] K2=(1-w)×K2_0+w×K2_1,
[0322] K3=(1-w)×K3_0+w×K3_1
[0323] 4. Set m_b to MinDisplay.
[0324] 5. Thus we get:
[0325]
[0326] 6. Substitute L equal to MaxSource into the following formula to get m_a:
[0327]
[0328] Based on the same inventive concept as the above method, the embodiment of the present application further provides a video processing device, Fig.11 is a structural block diagram of a video processing device 1100 for implementing an embodiment of the present application, such as Fig.11 As shown, the video processing device 1100 includes an acquisition module 1101 and a processing module 1102, wherein: the acquisition module 1101 is used to acquire a first mapping curve parameter set and a first target system display maximum brightness, the first mapping curve parameter set corresponds to the first target system display maximum brightness, and the first mapping curve parameter set includes one or more parameters related to the mapping curve; acquire a display brightness parameter set, the display brightness parameter set includes the maximum display brightness and / or the minimum display brightness of the display device; acquire an adjustment coefficient set, the adjustment coefficient set includes one or more adjustment coefficients, and the one or more adjustment coefficients correspond to the one or more parameters in the first mapping curve parameter set; the processing module 1102 is used to adjust the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness and the adjustment coefficient set to obtain a second mapping curve parameter set, the second mapping curve parameter set includes one or more adjusted parameters.
[0329] In a possible implementation, the processing module 1102 is specifically configured to calculate the adjusted first parameter according to formula (1), where the first parameter is any parameter in the first mapping curve parameter set:
[0330] P a =P b +k×P Δ (1)
[0331] Among them, P a represents the adjusted first parameter, P b represents the first parameter, P Δ represents the adjustment coefficient corresponding to the first parameter, or When MaxDisplay>M TPL When a=1, when MaxDisplay≤M TPL When a=-1, MaxDisplay represents the maximum display brightness, M TPL It indicates that the first target system displays the maximum brightness, N indicates the adjustment intensity control parameter, and M indicates the preset brightness value.
[0332] In a possible implementation, the acquisition module 1101 is further used to acquire one or more of a storable maximum brightness, a storable minimum brightness, a storable average value, and a storable variation range, and an intermediate value of a first parameter obtained according to one or more of the maximum display brightness, the minimum display brightness, the storable maximum brightness, the storable minimum brightness, the storable average value, and the storable variation range, where the first parameter is any parameter in the first mapping curve parameter set; the processing module 1102 is specifically used to calculate the adjusted first parameter according to formula (2):
[0333] P a =(1-w)×P b +w×P m (2)
[0334] Among them, P a represents the adjusted first parameter, P b represents the first parameter, or P Δ represents the adjustment coefficient corresponding to the first parameter, MaxDisplay represents the maximum display brightness, M TPL indicates that the first target system displays the maximum brightness, N indicates the adjustment intensity control parameter, M indicates the preset brightness value, P m represents the middle value of the first parameter.
[0335] In a possible implementation, the processing module 1102 is further used to obtain a first mapping curve based on the adjusted first parameter and other parameters in the first mapping curve parameter set except the first parameter, and if the video brightness obtained after tone mapping according to the first mapping curve is higher than the original brightness of the video, continue to adjust the first parameter; or, analyze the adjusted first parameter according to a preset rule, and if the adjusted first parameter meets the preset rule, continue to adjust the first parameter.
[0336] In a possible implementation, the processing module 1102 is specifically configured to calculate the adjusted scaling factor according to formula (3) when the first mapping curve parameter set includes a scaling factor:
[0337]
[0338] Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness that can be stored in the memory, f(MaxSource,P1 a ,P2 a , ...) represents a function calculation related to the maximum brightness of the video that can be stored in the memory and one or more adjusted parameters in the second mapping curve parameter set, and MaxDisplay represents the maximum display brightness.
[0339] In a possible implementation, the processing module 1102 is specifically configured to calculate the adjusted scaling factor according to formula (4) when the first mapping curve parameter set includes a scaling factor:
[0340]
[0341] Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the video that can be stored in the memory, MinSource represents the minimum brightness of the video that can be stored in the memory, f(MaxSource,P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the video that can be stored in the memory and one or more adjusted parameters in the second mapping curve parameter set, f(MinSource, P1a ,P2 a , ...) represents the function calculation related to the minimum brightness that can be stored in the memory of the video and one or more adjusted parameters in the second mapping curve parameter set, MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.
[0342] In a possible implementation, the processing module 1102 is specifically configured to calculate the adjusted scaling factor according to formula (5) when the first mapping curve parameter set includes a scaling factor:
[0343]
[0344] Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness that can be stored in the memory, f(MaxSource,P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the video that can be stored in the memory and one or more adjusted parameters in the second mapping curve parameter set, MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.
[0345] In a possible implementation, the processing module 1102 is specifically configured to calculate the adjusted scaling factor according to formula (6) when the first mapping curve parameter set includes a scaling factor:
[0346]
[0347] Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the video that can be stored in the memory, MinSource represents the minimum brightness of the video that can be stored in the memory, f(MaxSource,P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the video that can be stored in the memory and one or more adjusted parameters in the second mapping curve parameter set, f(MinSource, P1 a ,P2 a, ...) represents a function calculation related to the minimum brightness of the video that can be stored in the memory and one or more adjusted parameters in the second mapping curve parameter set, and MaxDisplay represents the maximum display brightness.
[0348] In a possible implementation, the acquisition module 1101 is specifically used to obtain the first mapping curve parameter set and the maximum brightness displayed by the first target system from dynamic metadata of the video; or, to obtain the first mapping curve parameter set from the dynamic metadata, and obtain the maximum brightness displayed by the first target system corresponding to the first mapping curve parameter set according to a set corresponding relationship.
[0349] In a possible implementation, the acquisition module 1101 is specifically configured to acquire the adjustment coefficient set from dynamic metadata of a video; or acquire the adjustment coefficient set according to a preset value.
[0350] In a possible implementation, the acquisition module 1101 is specifically configured to directly read one or more adjustment coefficients; or to acquire an adjustment mode and acquire the one or more adjustment coefficients corresponding to the adjustment mode.
[0351] In a possible implementation, the acquisition module 1101 is specifically configured to acquire the display brightness parameter set through device information; or acquire the display brightness parameter set through preset information.
[0352] In a possible implementation manner, the acquisition module 1101 is further configured to acquire a mapping curve according to the one or more adjusted parameters in the second mapping curve parameter set.
[0353] It should also be noted that the specific implementation process of the acquisition module 1101 and the processing module 1102 can be referred to Fig.10 For the sake of brevity, the detailed description of the embodiments will not be repeated here.
[0354] Those skilled in the art will appreciate that the functions described in conjunction with the various illustrative logic blocks, modules, and algorithm steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or includes any communication media that facilitates the transfer of computer programs from one place to another (e.g., according to a communication protocol). In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in this application. A computer program product may include computer-readable media.
[0355] As an example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and can be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwave are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are actually directed to non-temporary tangible storage media. As used herein, disks and optical disks include compact disks (CDs), laser optical disks, optical optical disks, digital versatile disks (DVDs), and Blu-ray disks, where disks typically reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0356] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor" as used herein may refer to any of the aforementioned structures or any other structures suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logic blocks, modules, and steps described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Moreover, the techniques may be fully implemented in one or more circuits or logic elements.
[0357] The techniques of the present application may be implemented in a variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this application to emphasize functional aspects of devices for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units may be combined in a codec hardware unit in conjunction with appropriate software and / or firmware, or provided by interoperating hardware units (including one or more processors as described above).
[0358] In the above embodiments, the description of each embodiment has different emphases. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0359] The above is only an exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for obtaining mapping curve parameters, It is characterized in that include: Acquire a first mapping curve parameter set and a maximum brightness displayed by a first target system, wherein the first mapping curve parameter set corresponds to the maximum brightness displayed by the first target system, and the first mapping curve parameter set includes one or more parameters related to the mapping curve; Acquire a display brightness parameter set, where the display brightness parameter set includes a maximum display brightness and / or a minimum display brightness of a display device; Acquire an adjustment coefficient set, where the adjustment coefficient set includes one or more adjustment coefficients, and the one or more adjustment coefficients correspond to the one or more parameters in the first mapping curve parameter set; The one or more parameters in the first mapping curve parameter set are adjusted according to the display brightness parameter set, the first target system display maximum brightness and the adjustment coefficient set to obtain a second mapping curve parameter set, wherein the second mapping curve parameter set includes one or more adjusted parameters, and the one or more adjusted parameters in the second mapping curve parameter set are used to obtain a mapping curve; The step of obtaining the adjustment coefficient set includes: The adjustment coefficient set is obtained from dynamic metadata of the content to be displayed.
2. The method according to claim 1, It is characterized in that The step of adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness, and the adjustment coefficient set to obtain a second mapping curve parameter set includes: The adjusted first parameter is calculated according to formula (1), where the first parameter is any parameter in the first mapping curve parameter set, and the adjusted first parameter belongs to the second mapping curve parameter set: P a =P b +k×P Δ (1) Among them, P a represents the adjusted first parameter, P b represents the first parameter, P Δ represents the adjustment coefficient corresponding to the first parameter, or When MaxDisplay>M TPL When a=1, when MaxDisplay≤M TPL When a=-1, MaxDisplay represents the maximum display brightness, M TPL It indicates that the first target system displays the maximum brightness, N indicates the adjustment intensity control parameter, and M indicates the preset brightness value.
3. The method according to claim 1, It is characterized in that Before adjusting the one or more parameters in the first mapping curve parameter set to obtain the second mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness and the adjustment coefficient set, the method further includes: Acquire one or more of a maximum brightness, a minimum brightness, an average value, and a variation range of the content to be displayed, and obtain an intermediate value of a first parameter according to one or more of the maximum display brightness, the minimum display brightness, the maximum brightness, the minimum brightness, the average value, and the variation range, where the first parameter is any parameter in the first mapping curve parameter set; The step of adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness, and the adjustment coefficient set to obtain a second mapping curve parameter set includes: The adjusted first parameter is calculated according to formula (2), and the adjusted first parameter belongs to the second mapping curve parameter set: P a =(1-w)×P b +w×P m (2) Among them, P a represents the adjusted first parameter, P b represents the first parameter, or P Δ represents the adjustment coefficient corresponding to the first parameter, MaxDisplay represents the maximum display brightness, M TPL indicates that the first target system displays the maximum brightness, N indicates the adjustment intensity control parameter, M indicates the preset brightness value, P m represents the middle value of the first parameter.
4. The method according to claim 2, It is characterized in that After calculating the adjusted first parameter according to formula (1), the following is also included: acquiring a first mapping curve according to the adjusted first parameter and other parameters in the first mapping curve parameter set except the first parameter, and if the brightness of the content to be displayed obtained after tone mapping according to the first mapping curve is higher than the original brightness of the content to be displayed, continuing to adjust the first parameter; or The adjusted first parameter is analyzed according to a preset rule, and if the adjusted first parameter meets the preset rule, the first parameter continues to be adjusted.
5. The method according to claim 3, It is characterized in that After calculating the adjusted first parameter according to formula (2), the following is also included: acquiring a first mapping curve according to the adjusted first parameter and other parameters in the first mapping curve parameter set except the first parameter, and if the brightness of the content to be displayed obtained after tone mapping according to the first mapping curve is higher than the original brightness of the content to be displayed, continuing to adjust the first parameter; or The adjusted first parameter is analyzed according to a preset rule, and if the adjusted first parameter meets the preset rule, the first parameter continues to be adjusted.
6. The method according to any one of claims 2 to 5, It is characterized in that The step of adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness, and the adjustment coefficient set to obtain a second mapping curve parameter set includes: When the first mapping curve parameter set includes a scaling factor, the adjusted scaling factor is calculated according to formula (3): Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents a function calculation related to the maximum brightness of the to-be-displayed content in the memory and one or more adjusted parameters in the second mapping curve parameter set, and MaxDisplay represents the maximum display brightness.
7. The method according to any one of claims 2 to 5, It is characterized in that The step of adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness, and the adjustment coefficient set to obtain a second mapping curve parameter set includes: When the first mapping curve parameter set includes a scaling factor, the adjusted scaling factor is calculated according to formula (4): Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, MinSource represents the minimum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the content to be displayed in the memory and one or more adjusted parameters in the second mapping curve parameter set, f(MinSource, P1 a ,P2 a , ...) represents the function calculation related to the minimum brightness of the to-be-displayed content in the memory and one or more adjusted parameters in the second mapping curve parameter set, MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.
8. The method according to any one of claims 2 to 5, It is characterized in that The step of adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness, and the adjustment coefficient set to obtain a second mapping curve parameter set includes: When the first mapping curve parameter set includes a scaling factor, the adjusted scaling factor is calculated according to formula (5): Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents a function calculation related to the maximum brightness of the content to be displayed in the memory and one or more adjusted parameters in the second mapping curve parameter set, MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.
9. The method according to any one of claims 2 to 5, It is characterized in that The step of adjusting the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness, and the adjustment coefficient set to obtain a second mapping curve parameter set includes: When the first mapping curve parameter set includes a scaling factor, the adjusted scaling factor is calculated according to formula (6): Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, MinSource represents the minimum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the content to be displayed in the memory and one or more adjusted parameters in the second mapping curve parameter set, f(MinSource, P1 a ,P2 a , ...) represents a function calculation related to the minimum brightness of the to-be-displayed content in the memory and one or more adjusted parameters in the second mapping curve parameter set, and MaxDisplay represents the maximum display brightness.
10. The method according to claim 4 or 5, It is characterized in that The obtaining of a first mapping curve parameter set and a first target system display maximum brightness includes: Acquire the first mapping curve parameter set and the first target system display maximum brightness from dynamic metadata of the content to be displayed; or, The first mapping curve parameter set is obtained from the dynamic metadata, and the first target system display maximum brightness corresponding to the first mapping curve parameter set is obtained according to a set corresponding relationship.
11. The method according to any one of claims 1 to 5, It is characterized in that The step of obtaining the adjustment coefficient set includes: Directly read one or more adjustment factors; or, An adjustment mode is acquired, and the one or more adjustment coefficients corresponding to the adjustment mode are acquired.
12. The method according to any one of claims 1 to 5, It is characterized in that The obtaining of a display brightness parameter set includes: Acquire the display brightness parameter set through device information; or, The display brightness parameter set is obtained through preset information.
13. The method according to any one of claims 1 to 5, It is characterized in that After the one or more parameters in the first mapping curve parameter set are adjusted according to the display brightness parameter set, the first target system display maximum brightness and the adjustment coefficient set to obtain a second mapping curve parameter set, the method further includes: A mapping curve is acquired according to the one or more adjusted parameters in the second mapping curve parameter set.
14. A video processing device, It is characterized in that include: an acquisition module, configured to acquire a first mapping curve parameter set and a first target system display maximum brightness, wherein the first mapping curve parameter set corresponds to the first target system display maximum brightness, and the first mapping curve parameter set includes one or more parameters related to the mapping curve; acquire a display brightness parameter set, wherein the display brightness parameter set includes a maximum display brightness and / or a minimum display brightness of a display device; and acquire an adjustment coefficient set, wherein the adjustment coefficient set includes one or more adjustment coefficients, and the one or more adjustment coefficients correspond to the one or more parameters in the first mapping curve parameter set; a processing module, configured to adjust the one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the first target system display maximum brightness, and the adjustment coefficient set to obtain a second mapping curve parameter set, wherein the second mapping curve parameter set includes one or more adjusted parameters, and the one or more adjusted parameters in the second mapping curve parameter set are used to obtain a mapping curve; The acquisition module is specifically configured to acquire the adjustment coefficient set from dynamic metadata of the content to be displayed.
15. The device according to claim 14, It is characterized in that The processing module is specifically configured to calculate the adjusted first parameter according to formula (1), wherein the first parameter is any parameter in the first mapping curve parameter set, and the adjusted first parameter belongs to the second mapping curve parameter set: P a =P b +k×P Δ (1) Among them, P a represents the adjusted first parameter, P b represents the first parameter, P Δ represents the adjustment coefficient corresponding to the first parameter, or When MaxDisplay>M TPL When a=1, when MaxDisplay≤M TPL When a=-1, MaxDisplay represents the maximum display brightness, M TPL It indicates that the first target system displays the maximum brightness, N indicates the adjustment intensity control parameter, and M indicates the preset brightness value.
16. The device according to claim 14, It is characterized in that The acquisition module is further used to acquire one or more of the maximum brightness, the minimum brightness, the average value and the variation range of the content to be displayed, and obtain an intermediate value of a first parameter according to one or more of the maximum display brightness, the minimum display brightness, the maximum brightness, the minimum brightness, the average value and the variation range, where the first parameter is any parameter in the first mapping curve parameter set; The processing module is specifically configured to calculate the adjusted first parameter according to formula (2), wherein the adjusted first parameter belongs to the second mapping curve parameter set: P a =(1-w)×P b +w×P m (2) Among them, P a represents the adjusted first parameter, P b represents the first parameter, or P Δ represents the adjustment coefficient corresponding to the first parameter, MaxDisplay represents the maximum display brightness, M TPL indicates that the first target system displays the maximum brightness, N indicates the adjustment intensity control parameter, M indicates the preset brightness value, P m represents the middle value of the first parameter.
17. The device according to claim 15, It is characterized in that The processing module is further used to obtain a first mapping curve according to the adjusted first parameter and other parameters in the first mapping curve parameter set except the first parameter, and if the brightness of the content to be displayed obtained after tone mapping according to the first mapping curve is higher than the original brightness of the content to be displayed, continue to adjust the first parameter; or, analyze the adjusted first parameter according to a preset rule, and if the adjusted first parameter meets the preset rule, continue to adjust the first parameter.
18. The device according to claim 16, It is characterized in that The processing module is further used to obtain a first mapping curve according to the adjusted first parameter and other parameters in the first mapping curve parameter set except the first parameter, and if the brightness of the content to be displayed obtained after tone mapping according to the first mapping curve is higher than the original brightness of the content to be displayed, continue to adjust the first parameter; or, analyze the adjusted first parameter according to a preset rule, and if the adjusted first parameter meets the preset rule, continue to adjust the first parameter.
19. The device according to any one of claims 15 to 18, It is characterized in that The processing module is specifically configured to calculate the adjusted scaling factor according to formula (3) when the first mapping curve parameter set includes a scaling factor: Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents a function calculation related to the maximum brightness of the to-be-displayed content in the memory and one or more adjusted parameters in the second mapping curve parameter set, and MaxDisplay represents the maximum display brightness.
20. The device according to any one of claims 15 to 18, It is characterized in that The processing module is specifically configured to calculate the adjusted scaling factor according to formula (4) when the first mapping curve parameter set includes a scaling factor: Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, MinSource represents the minimum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the content to be displayed in the memory and one or more adjusted parameters in the second mapping curve parameter set, f(MinSource, P1 a ,P2 a , ...) represents the function calculation related to the minimum brightness of the to-be-displayed content in the memory and one or more adjusted parameters in the second mapping curve parameter set, MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.
21. The device according to any one of claims 15 to 18, It is characterized in that The processing module is specifically configured to calculate the adjusted scaling factor according to formula (5) when the first mapping curve parameter set includes a scaling factor: Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents a function calculation related to the maximum brightness of the content to be displayed in the memory and one or more adjusted parameters in the second mapping curve parameter set, MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.
22. The device according to any one of claims 15 to 18, It is characterized in that The processing module is specifically configured to calculate the adjusted scaling factor according to formula (6) when the first mapping curve parameter set includes a scaling factor: Among them, r a represents the adjusted scaling factor, P1 a ,P2 a , ... represents the parameters in the second mapping curve parameter set, MaxSource represents the maximum brightness of the content to be displayed in the memory, MinSource represents the minimum brightness of the content to be displayed in the memory, f(MaxSource, P1 a ,P2 a , ...) represents the function calculation related to the maximum brightness of the content to be displayed in the memory and one or more adjusted parameters in the second mapping curve parameter set, f(MinSource, P1 a ,P2 a , ...) represents a function calculation related to the minimum brightness of the to-be-displayed content in the memory and one or more adjusted parameters in the second mapping curve parameter set, and MaxDisplay represents the maximum display brightness.
23. The device according to claim 17 or 18, It is characterized in that The acquisition module is specifically used to acquire the first mapping curve parameter set and the first target system display maximum brightness from the dynamic metadata of the content to be displayed; or, to acquire the first mapping curve parameter set from the dynamic metadata, and acquire the first target system display maximum brightness corresponding to the first mapping curve parameter set according to a set corresponding relationship.
24. The device according to any one of claims 14 to 18, It is characterized in that The acquisition module is specifically used to directly read one or more adjustment coefficients; or to acquire an adjustment mode and acquire the one or more adjustment coefficients corresponding to the adjustment mode.
25. The device according to any one of claims 14 to 18, It is characterized in that The acquisition module is specifically used to acquire the display brightness parameter set through device information; or acquire the display brightness parameter set through preset information.
26. The device according to any one of claims 14 to 18, It is characterized in that The acquisition module is further configured to acquire a mapping curve according to the one or more adjusted parameters in the second mapping curve parameter set.
27. A terminal device, It is characterized in that include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 13.
28. A video processing system, It is characterized in that include: Front-end and back-end; among them, The front end includes a camera for collecting video data and obtaining dynamic metadata of the video data; The back end comprises the apparatus of any one of claims 14-26.
29. A computer-readable storage medium, It is characterized in that The invention comprises a computer program, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 13.
