Method and device for acquiring mapping curve parameters

文档序号:196211 发布日期:2021-11-02 浏览:39次 中文

阅读说明:本技术 映射曲线参数的获取方法和装置 (Method and device for acquiring mapping curve parameters ) 是由 徐巍炜 余全合 陈虎 王弋川 于 2020-04-30 设计创作,主要内容包括:本申请公开了映射曲线参数的获取方法和装置,该方法包括:获取第一映射曲线参数集合和第一目标系统显示最大亮度;获取显示亮度参数集合,显示亮度参数集合包括显示设备的最大显示亮度和/或最小显示亮度;获取调整系数集合,调整系数集合包括一个或多个调整系数,一个或多个调整系数和第一映射曲线参数集合中的一个或多个参数对应;根据显示亮度参数集合、第一目标系统显示最大亮度和调整系数集合对第一映射曲线参数集合中的一个或多个参数进行调整得到第二映射曲线参数集合,第二映射曲线参数集合包括一个或多个调整后的参数。实施本申请能够针对不同亮度的显示设备提供更精确地色调调整,具有较大的灵活性。(The application discloses a method and a device for acquiring mapping curve parameters, wherein the method comprises the following steps: acquiring a first mapping curve parameter set and the maximum display brightness of a first target system; acquiring a display brightness parameter set, wherein the display brightness parameter set comprises the maximum display brightness and/or the minimum display brightness of display equipment; acquiring an adjustment coefficient set, wherein the adjustment coefficient set comprises 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; and adjusting 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 a second mapping curve parameter set, wherein the second mapping curve parameter set comprises one or more adjusted parameters. By implementing the method and the device, more accurate tone adjustment can be provided for display equipment with different brightness, and the flexibility is higher.)

1. A method for obtaining mapping curve parameters is characterized by comprising the following steps:

acquiring 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 comprises one or more parameters related to a mapping curve;

acquiring a display brightness parameter set, wherein the display brightness parameter set comprises the maximum display brightness and/or the minimum display brightness of display equipment;

acquiring an adjustment coefficient set, wherein the adjustment coefficient set comprises 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;

and 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 a second mapping curve parameter set, wherein the second mapping curve parameter set comprises one or more adjusted parameters.

2. The method of claim 1, wherein said adjusting said one or more parameters of said first set of mapping curve parameters according to said set of display brightness parameters, said first target system display maximum brightness, and said set of adjustment coefficients, resulting in a second set of mapping curve parameters, comprises:

calculating an adjusted first parameter according to formula (1), where the first parameter is any one of the first mapping curve parameter set, and the adjusted first parameter belongs to the second mapping curve parameter set:

Pa=Pb+k×PΔ (1)

wherein, PaRepresenting said adjusted first parameter, PbRepresents said first parameter, PΔRepresenting the adjustment coefficient corresponding to the first parameter,orWhen MaxDisplay > MTPLWhen a is 1, M is less than or equal to MaxDisplayTPLWhen a is-1, MaxDisplay indicates the maximum display luminance, MTPLIndicating that the first target system displays maximum brightness, N indicating an adjusted intensity control parameter, and M indicating a preset brightness value.

3. The method of claim 1, wherein before said adjusting said one or more parameters of said first set of mapping curve parameters according to said set of display brightness parameters, said first target system display maximum brightness, and said set of adjustment coefficients to obtain a second set of mapping curve parameters, further comprising:

acquiring one or more of maximum brightness, minimum brightness, an average value and a variation range of content to be displayed, and obtaining a middle 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, wherein the first parameter is any one 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 first target system display maximum brightness, and the adjustment coefficient set to obtain a second mapping curve parameter set, including:

calculating an adjusted first parameter according to formula (2), the adjusted first parameter belonging to the second mapping curve parameter set:

Pa=(1-w)×Pb+w×Pm (2)

wherein, PaRepresenting said adjusted first parameter, PbIs indicative of the first parameter or parameters of the device,orPΔRepresenting the adjustment coefficient corresponding to the first parameter, MaxDisplay representing the maximum display brightness, MTPLRepresenting the first object systemUniformly displaying maximum brightness, N represents adjustment intensity control parameter, M represents preset brightness value, PmRepresenting an intermediate value of the first parameter.

4. The method of claim 2 or 3, wherein calculating the adjusted first parameter according to the formula further comprises:

obtaining a first mapping curve according to the adjusted first parameter and other parameters except the first parameter in the first mapping curve parameter set, and if the brightness of the content to be displayed, which is 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; alternatively, the first and second electrodes may be,

and analyzing the adjusted first parameter according to a preset rule, and if the adjusted first parameter accords with the preset rule, continuing to adjust the first parameter.

5. The method of any of claims 2-4, wherein said adjusting said one or more parameters of said first set of mapping curve parameters according to said set of display brightness parameters, said first target system display maximum brightness, and said set of adjustment coefficients, resulting in a second set of mapping curve parameters, comprises:

when a scaling factor is included in the first mapping curve parameter set, calculating the adjusted scaling factor according to formula (3):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second set of mapping curve parameters, MaxSource representing the maximum brightness in memory of the content to be displayed, f (MaxSource, P1)a,P2a,..) representing the maximum brightness in memory with the content to be displayed, and the second mapping curve parameterCalculating a function related to one or more adjusted parameters in the set, MaxDisplay representing the maximum display brightness.

6. The method of any of claims 2-4, wherein said adjusting said one or more parameters of said first set of mapping curve parameters according to said set of display brightness parameters, said first target system display maximum brightness, and said set of adjustment coefficients, resulting in a second set of mapping curve parameters, comprises:

when a scaling factor is included in the first mapping curve parameter set, calculating the adjusted scaling factor according to formula (4):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second mapping curve parameter set, MaxSource representing maximum brightness of the content to be displayed in the memory, MinSource representing minimum brightness of the content to be displayed in the memory, f (MaxSource, P1)a,P2a,..) representing a function calculation, f (MinSource, P1), relating to the maximum brightness of the content to be displayed in memory and one or more adjusted parameters of the second set of mapping curve parametersa,P2a,..) represents a function calculation related to the minimum brightness of the content to be displayed in memory and one or more adjusted parameters in the second set of mapping curve parameters, MaxDisplay represents the maximum display brightness and minidisplay represents the minimum display brightness.

7. The method of any of claims 2-4, wherein said adjusting said one or more parameters of said first set of mapping curve parameters according to said set of display brightness parameters, said first target system display maximum brightness, and said set of adjustment coefficients, resulting in a second set of mapping curve parameters, comprises:

when a scaling factor is included in the first mapping curve parameter set, calculating the adjusted scaling factor according to formula (5):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second set of mapping curve parameters, MaxSource representing the maximum brightness in memory of the content to be displayed, f (MaxSource, P1)a,P2a,..) represents a function calculation related to the maximum brightness of the content to be displayed in memory and one or more adjusted parameters in the second set of mapping curve parameters, MaxDisplay represents the maximum display brightness and minidisplay represents the minimum display brightness.

8. The method of any of claims 2-4, wherein said adjusting said one or more parameters of said first set of mapping curve parameters according to said set of display brightness parameters, said first target system display maximum brightness, and said set of adjustment coefficients, resulting in a second set of mapping curve parameters, comprises:

when a scaling factor is included in the first mapping curve parameter set, calculating the adjusted scaling factor according to formula (6):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second mapping curve parameter set, MaxSource representing maximum brightness of the content to be displayed in the memory, MinSource representing minimum brightness of the content to be displayed in the memory, f (MaxS)ource,P1a,P2a,..) representing a function calculation, f (MinSource, P1), relating to the maximum brightness of the content to be displayed in memory and one or more adjusted parameters of the second set of mapping curve parametersa,P2a,..) representing a functional calculation relating to a minimum brightness of the content to be displayed in memory and one or more adjusted parameters of the second set of mapping curve parameters, MaxDisplay representing the maximum display brightness.

9. The method of any one of claims 1-8, wherein said obtaining a first set of mapping curve parameters and a first target system display maximum brightness comprises:

acquiring the first mapping curve parameter set and the first target system display maximum brightness from dynamic metadata of content to be displayed; alternatively, the first and second electrodes may be,

and acquiring the first mapping curve parameter set from the dynamic metadata, and acquiring the maximum display brightness of the first target system corresponding to the first mapping curve parameter set according to the set corresponding relation.

10. The method according to any one of claims 1-9, wherein said obtaining a set of adjustment coefficients comprises:

acquiring the adjustment coefficient set from dynamic metadata of content to be displayed; alternatively, the first and second electrodes may be,

and acquiring the adjusting coefficient set according to a preset value.

11. The method of claim 10, wherein obtaining the set of adjustment coefficients comprises:

directly reading one or more adjustment coefficients; alternatively, the first and second electrodes may be,

and acquiring an adjustment mode, and acquiring the one or more adjustment coefficients corresponding to the adjustment mode.

12. The method according to any one of claims 1-11, wherein said obtaining a set of display brightness parameters comprises:

acquiring the display brightness parameter set through equipment information; alternatively, the first and second electrodes may be,

and acquiring the display brightness parameter set through preset information.

13. The method of any of claims 1-12, wherein after adjusting the one or more parameters in the first set of mapping curve parameters according to the set of display brightness parameters, the first target system display maximum brightness, and the set of adjustment coefficients to obtain a second set of mapping curve parameters, further comprising:

and acquiring a mapping curve according to the one or more adjusted parameters in the second mapping curve parameter set.

14. A video processing apparatus, comprising:

an obtaining module, configured to obtain a first mapping curve parameter set and a first target system display maximum brightness, where 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 a mapping curve; acquiring a display brightness parameter set, wherein the display brightness parameter set comprises the maximum display brightness and/or the minimum display brightness of display equipment; acquiring an adjustment coefficient set, wherein the adjustment coefficient set comprises 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;

and the processing module is used for 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, wherein the second mapping curve parameter set comprises one or more adjusted parameters.

15. The apparatus according to claim 14, wherein the processing module is specifically configured to calculate an adjusted first parameter according to formula (1), where the first parameter is any one of the first mapping curve parameter set, and the adjusted first parameter belongs to the second mapping curve parameter set:

Pa=Pb+k×PΔ (1)

wherein, PaRepresenting said adjusted first parameter, PbRepresents said first parameter, PΔRepresenting the adjustment coefficient corresponding to the first parameter,orWhen MaxDisplay > MTPLWhen a is 1, M is less than or equal to MaxDisplayTPLWhen a is-1, MaxDisplay indicates the maximum display luminance, MTPLIndicating that the first target system displays maximum brightness, N indicating an adjusted intensity control parameter, and M indicating a preset brightness value.

16. The apparatus according to claim 14, wherein the obtaining module is further configured to obtain 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 one parameter in the first mapping curve parameter set;

the processing module is specifically configured to calculate an adjusted first parameter according to a formula (2), where the adjusted first parameter belongs to the second mapping curve parameter set:

Pa=(1-w)×Pb+w×Pm (2)

wherein,PaRepresenting said adjusted first parameter, PbIs indicative of the first parameter or parameters of the device,orPΔRepresenting the adjustment coefficient corresponding to the first parameter, MaxDisplay representing the maximum display brightness, MTPLIndicating that the first target system displays maximum brightness, N indicating an adjusted intensity control parameter, M indicating a preset brightness value, PmRepresenting an intermediate value of the first parameter.

17. The apparatus according to claim 15 or 16, wherein the processing module is further configured to obtain a first mapping curve according to the adjusted first parameter and other parameters except the first parameter in the first mapping curve parameter set, and if brightness of the content to be displayed, which is obtained by performing tone mapping according to the first mapping curve, is higher than original brightness of the content to be displayed, continue to adjust the first parameter; or analyzing the adjusted first parameter according to a preset rule, and if the adjusted first parameter meets the preset rule, continuing to adjust the first parameter.

18. The apparatus according to any one of claims 15 to 17, wherein the processing module is specifically configured to, when a scaling factor is included in the first mapping curve parameter set, calculate the adjusted scaling factor according to formula (3):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second set of mapping curve parametersNumber, MaxSource, indicates the maximum brightness in memory of the content to be displayed, f (MaxSource, P1)a,P2a,..) representing a function calculation relating to a maximum brightness of the content to be displayed in memory, the maximum display brightness being represented by MaxDisplay, and one or more adjusted parameters of the second set of mapping curve parameters.

19. The apparatus according to any one of claims 15 to 17, wherein the processing module is specifically configured to, when a scaling factor is included in the first mapping curve parameter set, calculate the adjusted scaling factor according to formula (4):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second mapping curve parameter set, MaxSource representing maximum brightness of the content to be displayed in the memory, MinSource representing minimum brightness of the content to be displayed in the memory, f (MaxSource, P1)a,P2a,..) representing a function calculation, f (MinSource, P1), relating to the maximum brightness of the content to be displayed in memory and one or more adjusted parameters of the second set of mapping curve parametersa,P2a,..) represents a function calculation related to the minimum brightness of the content to be displayed in memory and one or more adjusted parameters in the second set of mapping curve parameters, MaxDisplay represents the maximum display brightness and minidisplay represents the minimum display brightness.

20. The apparatus according to any one of claims 15 to 17, wherein the processing module is specifically configured to, when a scaling factor is included in the first mapping curve parameter set, calculate the adjusted scaling factor according to formula (5):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second set of mapping curve parameters, MaxSource representing the maximum brightness in memory of the content to be displayed, f (MaxSource, P1)a,P2a,..) represents a function calculation related to the maximum brightness of the content to be displayed in memory and one or more adjusted parameters in the second set of mapping curve parameters, MaxDisplay represents the maximum display brightness and minidisplay represents the minimum display brightness.

21. The apparatus according to any one of claims 15 to 17, wherein the processing module is specifically configured to, when a scaling factor is included in the first mapping curve parameter set, calculate the adjusted scaling factor according to formula (6):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second mapping curve parameter set, MaxSource representing maximum brightness of the content to be displayed in the memory, MinSource representing minimum brightness of the content to be displayed in the memory, f (MaxSource, P1)a,P2a,..) representing a function calculation, f (MinSource, P1), relating to the maximum brightness of the content to be displayed in memory and one or more adjusted parameters of the second set of mapping curve parametersa,P2a,..) representing a functional calculation relating to a minimum brightness of the content to be displayed in memory and one or more adjusted parameters of the second set of mapping curve parameters, MaxDisplay representing the maximum display brightness.

22. The apparatus according to any of the claims 14 to 21, wherein the obtaining module is specifically configured to obtain the first mapping curve parameter set and the first target system display maximum luminance from dynamic metadata of a 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 the set corresponding relation.

23. The apparatus according to any of claims 14 to 22, wherein the obtaining module is specifically configured to obtain the set of adjustment coefficients from dynamic metadata of content to be displayed; or acquiring the adjusting coefficient set according to a preset value.

24. The apparatus according to claim 23, wherein the obtaining module is specifically configured to directly read one or more adjustment coefficients; or, an adjustment mode is obtained, and the one or more adjustment coefficients corresponding to the adjustment mode are obtained.

25. The apparatus according to any one of claims 14 to 24, wherein the obtaining module is specifically configured to obtain the set of display brightness parameters through device information; or, the display brightness parameter set is obtained through preset information.

26. The apparatus according to any of claims 14-25, wherein the obtaining module is further configured to obtain a mapping curve according to the one or more adjusted parameters in the second mapping curve parameter set.

27. A terminal device, comprising:

one or more processors;

a memory for storing one or more programs;

when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-13.

28. A computer-readable storage medium, comprising a computer program which, when executed on a computer, causes the computer to perform the method of any one of claims 1-13.

Technical Field

The present application relates to the field of image processing, and in particular, to a method and an apparatus for obtaining mapping curve parameters.

Background

Dynamic range (dynamic range) is used in many fields to represent a changeThe ratio of the maximum and minimum values of the quantity. In digital images, the dynamic range is used to represent the ratio between the maximum gray value and the minimum gray value within the range in which the image can be displayed. In the same real world scene, the dynamic range is usually 10-3Candela per square meter (cd/m)2) To 106cd/m2And is called High Dynamic Range (HDR). In most color digital images, 0 to 255 is the dynamic range of the image, which is called Low Dynamic Range (LDR).

Since the luminance range of the display device and the dynamic range of the real world are different, it is necessary to map the dynamic range of the real world to the luminance range of the display device, which is referred to as mapping of the dynamic range. The mapping of dynamic range may be applied on adaptation of the display device for front-end HDR signals and back-end HDR, e.g. front-end acquisition to 4000cd/m2The HDR display capability of the display device of the rear end HDR is 500cd/m24000cd/m2Is mapped to 500cd/m2Is a Tone Mapping (TM) process from high to low. The mapping of dynamic range may also be applied to the adaptation of the display device to the front-end SDR signal and the back-end HDR, e.g. 100cd/m acquisition by the front-end2The HDR display capability of the display device of the rear end HDR is 2000cd/m2100cd/m2Illumination signal mapping to 2000cd/m2Is a low to high TM process.

The current mapping method of dynamic range can be divided into static and dynamic. The static mapping method is to perform an integral TM process from a single data according to the same video content or the same hard disk content, that is, mapping curves are generally the same for various scenes. The method has the advantages that the image needs to carry less data, and the processing flow is simpler; the disadvantage is that all scenes use the same mapping curve for TM, which may result in information loss in some scenes, for example, if the mapping curve is focused on protecting bright areas, some details may be lost in some extremely dark scenes, or may be invisible, which may affect the display effect of the image. The dynamic mapping method is to dynamically adjust the mapping curve according to the content of each scene or each frame according to a specific area, and has the advantages that the method can realize the differentiation processing of different scenes or different frames; the disadvantage is that each frame or each scene needs to carry relevant scene information, and the amount of data that the image needs to carry is large.

Disclosure of Invention

The embodiment of the application provides a method and a device for acquiring mapping curve parameters, which can provide more accurate tone adjustment for display equipment with different brightness and have higher flexibility.

In a first aspect, an embodiment of the present application provides a method for obtaining a mapping curve parameter, including: acquiring 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 comprises one or more parameters related to a mapping curve; acquiring a display brightness parameter set, wherein the display brightness parameter set comprises the maximum display brightness and/or the minimum display brightness of display equipment; acquiring an adjustment coefficient set, wherein the adjustment coefficient set comprises 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; and 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 a second mapping curve parameter set, wherein the second mapping curve parameter set comprises one or more adjusted parameters.

According to the method and the device, one or more parameters related to the mapping curve are adjusted, the adjusting process is combined with the display capability of the rear end, more accurate tone adjustment can be provided for display equipment with different brightness, the flexibility is high, and a good presenting effect can be achieved under the condition that the curve parameters are reasonably configured.

In a possible implementation manner, 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 a second mapping curve parameter set includes: calculating an adjusted first parameter according to formula (1), where the first parameter is any one of the first mapping curve parameter set, and the adjusted first parameter belongs to the second mapping curve parameter set:

Pa=Pb+k×PΔ (1)

wherein, PaRepresenting said adjusted first parameter, PbRepresents said first parameter, PΔRepresenting the adjustment coefficient corresponding to the first parameter,orWhen MaxDisplay > MTPLWhen a is 1, M is less than or equal to MaxDisplayTPLWhen a is-1, MaxDisplay indicates the maximum display luminance, MTPLIndicating that the first target system displays maximum brightness, N indicating an adjusted intensity control parameter, and M indicating a preset brightness value.

The adjustment coefficient is adopted to adjust one or more parameters related to the mapping curve, the adjustment process combines the display capability of the rear end, more accurate tone adjustment can be provided for display equipment with different brightness, the flexibility is higher, and a good presentation effect can be achieved under the condition of reasonably configuring the curve parameters.

In a possible implementation manner, before 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 a second mapping curve parameter set, the method further includes: acquiring one or more of maximum brightness, minimum brightness, an average value and a variation range of content to be displayed, and obtaining a middle 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, wherein the first parameter is any one 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 first target system display maximum brightness, and the adjustment coefficient set to obtain a second mapping curve parameter set, including: calculating an adjusted first parameter according to formula (2), the adjusted first parameter belonging to the second mapping curve parameter set:

Pa=(1-w)×Pb+w×Pm (2)

wherein, PaRepresenting said adjusted first parameter, PbIs indicative of the first parameter or parameters of the device,orPΔRepresenting the adjustment coefficient corresponding to the first parameter, MaxDisplay representing the maximum display brightness, MTPLIndicating that the first target system displays maximum brightness, N indicating an adjusted intensity control parameter, M indicating a preset brightness value, PmRepresenting an intermediate value of the first parameter.

One or more parameters related to the mapping curve are obtained in a weighting mode through a plurality of parameters, the process combines the display capability of the rear end, more accurate tone adjustment can be provided for display equipment with different brightness, the flexibility is higher, and a good presentation effect can be achieved under the condition that the curve parameters are reasonably configured.

In a possible implementation manner, after calculating the adjusted first parameter according to the formula, the method further includes: obtaining a first mapping curve according to the adjusted first parameter and other parameters except the first parameter in the first mapping curve parameter set, and if the brightness of the content to be displayed, which is 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 analyzing the adjusted first parameter according to a preset rule, and if the adjusted first parameter meets the preset rule, continuing to adjust the first parameter.

The parameters related to the mapping curve are gradually finely adjusted, so that the accuracy of the parameters of the mapping curve can be improved.

In a possible implementation manner, 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 a second mapping curve parameter set includes: when a scaling factor is included in the first mapping curve parameter set, calculating the adjusted scaling factor according to formula (3):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second set of mapping curve parameters, MaxSource representing the maximum brightness in memory of the content to be displayed, f (MaxSource, P1)a,P2a,..) representing a function calculation relating to a maximum brightness of the content to be displayed in memory, the maximum display brightness being represented by MaxDisplay, and one or more adjusted parameters of the second set of mapping curve parameters.

In a possible implementation manner, 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 a second mapping curve parameter set includes: when a scaling factor is included in the first mapping curve parameter set, calculating the adjusted scaling factor according to formula (4):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second mapping curve parameter set, MaxSource representing maximum brightness of the content to be displayed in the memory, MinSource representing minimum brightness of the content to be displayed in the memory, f (MaxSource, P1)a,P2a,..) representing a function calculation, f (MinSource, P1), relating to the maximum brightness of the content to be displayed in memory and one or more adjusted parameters of the second set of mapping curve parametersa,P2a,..) represents a function calculation related to the minimum brightness of the content to be displayed in memory and one or more adjusted parameters in the second set of mapping curve parameters, MaxDisplay represents the maximum display brightness and minidisplay represents the minimum display brightness.

In a possible implementation manner, 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 a second mapping curve parameter set includes: when a scaling factor is included in the first mapping curve parameter set, calculating the adjusted scaling factor according to formula (5):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second set of mapping curve parameters, MaxSource representing the maximum brightness in memory of the content to be displayed, f (MaxSource, P1)a,P2a,..) represents the maximum brightness in memory with the content to be displayed, andand calculating a function related to one or more adjusted parameters in the second mapping curve parameter set, wherein MaxDisplay represents the maximum display brightness, and MinDisplay represents the minimum display brightness.

In a possible implementation manner, 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 a second mapping curve parameter set includes: when a scaling factor is included in the first mapping curve parameter set, calculating the adjusted scaling factor according to formula (6):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second mapping curve parameter set, MaxSource representing maximum brightness of the content to be displayed in the memory, MinSource representing minimum brightness of the content to be displayed in the memory, f (MaxSource, P1)a,P2a,..) representing a function calculation, f (MinSource, P1), relating to the maximum brightness of the content to be displayed in memory and one or more adjusted parameters of the second set of mapping curve parametersa,P2a,..) representing a functional calculation relating to a minimum brightness of the content to be displayed in memory and one or more adjusted parameters of the second set of mapping curve parameters, MaxDisplay representing the maximum display brightness.

In one possible implementation, the obtaining the first mapping curve parameter set and the first target system display maximum brightness includes: acquiring the first mapping curve parameter set and the first target system display maximum brightness from dynamic metadata of 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 the set corresponding relation.

In a possible implementation manner, the obtaining the set of adjustment coefficients includes: acquiring the adjustment coefficient set from dynamic metadata of content to be displayed; or acquiring the adjusting coefficient set according to a preset value.

In a possible implementation manner, the obtaining the set of adjustment coefficients includes: directly reading one or more adjustment coefficients; or, an adjustment mode is obtained, and the one or more adjustment coefficients corresponding to the adjustment mode are obtained.

In one possible implementation manner, the obtaining a set of display brightness parameters includes: acquiring the display brightness parameter set through equipment information; or, the display brightness parameter set is obtained through preset information.

In a possible implementation manner, after 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 a second mapping curve parameter set, the method further includes: and acquiring a mapping curve according to the one or more adjusted parameters in the second mapping curve parameter set.

In a second aspect, an embodiment of the present application provides a device for processing content to be displayed, including: an obtaining module, configured to obtain a first mapping curve parameter set and a first target system display maximum brightness, where 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 a mapping curve; acquiring a display brightness parameter set, wherein the display brightness parameter set comprises the maximum display brightness and/or the minimum display brightness of display equipment; acquiring an adjustment coefficient set, wherein the adjustment coefficient set comprises 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; and the processing module is used for 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, wherein the second mapping curve parameter set comprises one or more adjusted parameters.

In a possible implementation manner, the processing module is specifically configured to calculate an adjusted first parameter according to formula (1), where the first parameter is any one of the parameters in the first mapping curve parameter set, and the adjusted first parameter belongs to the second mapping curve parameter set:

Pa=Pb+k×PΔ (1)

wherein, PaRepresenting said adjusted first parameter, PbRepresents said first parameter, PΔRepresenting the adjustment coefficient corresponding to the first parameter,orWhen MaxDisplay > MTPLWhen a is 1, M is less than or equal to MaxDisplayTPLWhen a is-1, MaxDisplay indicates the maximum display luminance, MTPLIndicating that the first target system displays maximum brightness, N indicating an adjusted intensity control parameter, and M indicating a preset brightness value.

In a possible implementation manner, the obtaining module is further configured to obtain one or more of a maximum brightness, a minimum brightness, an average value, and a variation range of a 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 one parameter in the first mapping curve parameter set; the processing module is specifically configured to calculate an adjusted first parameter according to a formula (2), where the adjusted first parameter belongs to the second mapping curve parameter set:

Pa=(1-w)×Pb+w×Pm (2)

wherein, PaRepresenting said adjusted first parameter, PbIs indicative of the first parameter or parameters of the device,orPΔRepresenting the adjustment coefficient corresponding to the first parameter, MaxDisplay representing the maximum display brightness, MTPLIndicating that the first target system displays maximum brightness, N indicating an adjusted intensity control parameter, M indicating a preset brightness value, PmRepresenting an intermediate value of the first parameter.

In a possible implementation manner, the processing module is further configured to obtain a first mapping curve according to the adjusted first parameter and other parameters except the first parameter in the first mapping curve parameter set, and if the brightness of the content to be displayed, which is obtained after performing 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 analyzing the adjusted first parameter according to a preset rule, and if the adjusted first parameter meets the preset rule, continuing to adjust the first parameter.

In a possible implementation manner, the processing module is specifically configured to, when a scaling factor is included in the first mapping curve parameter set, calculate the adjusted scaling factor according to a formula (3):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second set of mapping curve parameters, MaxSource representing the maximum brightness in memory of the content to be displayed, f (MaxSource, P1)a,P2a,..) representing a function calculation relating to a maximum brightness of the content to be displayed in memory, the maximum display brightness being represented by MaxDisplay, and one or more adjusted parameters of the second set of mapping curve parameters.

In a possible implementation manner, the processing module is specifically configured to, when a scaling factor is included in the first mapping curve parameter set, calculate the adjusted scaling factor according to a formula (4):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second mapping curve parameter set, MaxSource representing maximum brightness of the content to be displayed in the memory, MinSource representing minimum brightness of the content to be displayed in the memory, f (MaxSource, P1)a,P2a,..) representing a function calculation, f (MinSource, P1), relating to the maximum brightness of the content to be displayed in memory and one or more adjusted parameters of the second set of mapping curve parametersa,P2a,..) represents a function calculation related to the minimum brightness of the content to be displayed in memory and one or more adjusted parameters in the second set of mapping curve parameters, MaxDisplay represents the maximum display brightness and minidisplay represents the minimum display brightness.

In a possible implementation manner, the processing module is specifically configured to, when a scaling factor is included in the first mapping curve parameter set, calculate the adjusted scaling factor according to a formula (5):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing the second mapping curve parameterThe parameter in the set, MaxSource, indicates the maximum brightness in memory of the content to be displayed, f (MaxSource, P1)a,P2a,..) represents a function calculation related to the maximum brightness of the content to be displayed in memory and one or more adjusted parameters in the second set of mapping curve parameters, MaxDisplay represents the maximum display brightness and minidisplay represents the minimum display brightness.

In a possible implementation manner, the processing module is specifically configured to, when a scaling factor is included in the first mapping curve parameter set, calculate the adjusted scaling factor according to a formula (6):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second mapping curve parameter set, MaxSource representing maximum brightness of the content to be displayed in the memory, MinSource representing minimum brightness of the content to be displayed in the memory, f (MaxSource, P1)a,P2a,..) representing a function calculation, f (MinSource, P1), relating to the maximum brightness of the content to be displayed in memory and one or more adjusted parameters of the second set of mapping curve parametersa,P2a,..) representing a functional calculation relating to a minimum brightness of the content to be displayed in memory and one or more adjusted parameters of the second set of mapping curve parameters, MaxDisplay representing the maximum display brightness.

In a possible implementation manner, the obtaining module is specifically configured to obtain the first mapping curve parameter set and the first target system display maximum brightness from dynamic metadata of 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 the set corresponding relation.

In a possible implementation manner, the obtaining module is specifically configured to obtain the adjustment coefficient set from dynamic metadata of content to be displayed; or acquiring the adjusting coefficient set according to a preset value.

In a possible implementation manner, the obtaining module is specifically configured to directly read one or more adjustment coefficients; or, an adjustment mode is obtained, and the one or more adjustment coefficients corresponding to the adjustment mode are obtained.

In a possible implementation manner, the obtaining module is specifically configured to obtain the display brightness parameter set through device information; or, the display brightness parameter set is obtained through preset information.

In a possible implementation manner, the obtaining module is further configured to obtain a mapping curve according to the one or more adjusted parameters in the second mapping curve parameter set.

In a third aspect, an embodiment of the present application provides a terminal device, including: one or more processors; a memory for storing one or more programs; when executed by the one or more processors, cause the one or more processors to implement the method of any one of the first aspects as described above.

In a fourth aspect, the present application provides a computer-readable storage medium storing program code, where the program code includes instructions for performing part or all of the steps of any one of the methods of the first aspect.

In a fifth aspect, embodiments of the present application provide a computer program product, which when run on a computer causes the computer to perform some or all of the steps of any one of the methods of the first aspect.

It should be understood that the second to fifth aspects of the present application are consistent with the technical solution of the first aspect of the present application, and the beneficial effects obtained by the aspects and the corresponding possible implementation are similar, and are not described again.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present application, the drawings required to be used in the embodiments or the background art of the present application will be described below.

FIG. 1 shows an exemplary diagram of dynamic range mapping in a real world imaging process;

FIG. 2 is a graph schematically illustrating an example PQ photoelectric transfer function;

FIG. 3 schematically shows a graph of an HLG photoelectric transfer function;

FIG. 4 is a graph schematically illustrating an SLF photoelectric transfer function;

FIG. 5 shows an exemplary sigmoidal curve;

FIG. 6 schematically illustrates a schematic diagram of a Belzier curve;

FIG. 7 is a schematic diagram illustrating an exemplary sigmoid curve;

FIG. 8 is a schematic block diagram of a video processing system to which embodiments of the present application are applied;

fig. 9 shows an exemplary structural diagram of a terminal device 900;

FIG. 10 is a flowchart illustrating an embodiment of a method for obtaining mapping curve parameters according to the present application;

fig. 11 is a block diagram of a video processing apparatus 1100 for implementing an embodiment of the present application.

Detailed Description

The embodiments of the present application will be described below with reference to the drawings. In the following description, reference is made to the accompanying drawings which form a part hereof and in which is shown by way of illustration specific aspects of embodiments of the application or in which specific aspects of embodiments of the application may be employed. It should be understood that embodiments of the present application may be used in other ways and may include structural or logical changes not depicted in the drawings. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present application is defined by the appended claims. For example, it should be understood that the disclosure in connection with the described methods may equally apply to the corresponding apparatus or system for performing the methods, and vice versa. For example, if one or more particular method steps are described, the corresponding apparatus may comprise one or more units, such as functional units, to perform the described one or more method steps (e.g., a 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 figures. On the other hand, for example, if a particular apparatus is described based on one or more units, such as functional units, the corresponding method may comprise one step to perform the functionality of the one or more units (e.g., one step performs the functionality of the one or more units, or multiple steps, each of which performs the functionality of one or more of the plurality of units), even if such one or more steps are not explicitly described or illustrated in the figures. Further, it is to be understood that features of the various exemplary embodiments and/or aspects described herein may be combined with each other, unless explicitly stated otherwise.

The terminology used in the description of the embodiments section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application. Some concepts that may be involved in embodiments of the present application are briefly described below.

Dynamic range (dynamic range)

Dynamic range is used in many fields to represent the ratio of the maximum and minimum values of a variable. In digital images, the dynamic range is used to represent the ratio between the maximum gray value and the minimum gray value within the range in which the image can be displayed.

In nature, the night scene brightness under the starry sky is about 0.001cd/m2The sun itself has a brightness of up to 109cd/m2Dynamic range of up to 109/0.001=1012cd/m2Magnitude. However, in the real world of the natural world, the brightness of the sun and the brightness of the starlight are not obtained at the same time, so that the dynamic range of the same scene in the real world is usually 10-3cd/m2To 106cd/m2In between, called high dynamic range (high dynamic range)range, HDR). In most of the current color digital images, the grayscales of the three channels of red (R), green (G) and blue (B) are stored by one byte, that is, the grayscale ranges of R, G and B are 0 to 255 respectively, where 0 to 255 are the dynamic range of the image, called Low Dynamic Range (LDR).

Second, photoelectric transfer function (OETF)

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 the digital image. FIG. 1 shows an exemplary diagram of dynamic range mapping in real world imaging, as shown in FIG. 1, including moonlight with a brightness of 1cd/m in addition to starlight and sun light2Luminance of indoor lighting of 100cd/m2And brightness in outdoor cloudy weather is 500cd/m2And the brightness of outdoor on sunny day is 2000cd/m2. Luminance range of 100cd/m in real world2To 2000cd/m2Luminance range 1cd/m corresponding to storage mode of display device2To 200cd/m2Into a mapping relationship.

Since the storage mode of the display device cannot achieve high brightness in the real world, an electro-optical transfer function (EOTF) is required to express the brightness in the real world as the brightness corresponding to the storage mode of the display device. For example, the luminance in the real world is 10000cd/m2And the display device stores luminance information with 10 bits, the maximum value storable in the storage mode is 1023, therefore 10000cd/m can be used2Denoted as 1023.

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:

with display deviceThe luminance range of the display device is continuously increased, and the luminance of the conventional HDR display reaches 600cd/m2The illumination of the high-end HDR display can reach 2000cd/m2. Therefore, improved photoelectric transfer functions are needed to adapt to the upgrade of the display device, and at present, three types of common photoelectric transfer functions are a Perceptual Quantization (PQ) photoelectric transfer function, a hybrid log-gamma (HLG) photoelectric transfer function, and a Scene Luminance Fidelity (SLF) photoelectric transfer function.

(1) PQ photoelectric transfer function: different from the traditional Gamma function, the PQ photoelectric transfer function is provided according to the contrast perception model of human eyes under different brightness. The PQ photoelectric transfer function represents the conversion of linear signal values of pixels of an image frame into PQ domain nonlinear signal values, and fig. 2 schematically shows a curve of the PQ photoelectric transfer function. The PQ photoelectric transfer function can be expressed as:

the parameters corresponding to R, G and B in the above formula can be represented by the formulaCalculation, where L represents a linear signal value of a pixel of an image frame, normalized to [0,1]](ii) a L' represents a PQ domain nonlinear signal value with a value range of [0,1];m1、m2、c1、c2And c3Are all PQ photoelectric transfer coefficients,

(2) HLG photoelectric transfer function: the HLG photoelectric transfer function is obtained by improvement on the basis of a traditional Gamma curve, the traditional Gamma curve is applied to the HLG photoelectric transfer function at a low section, and a log curve is supplemented at a high section. The HLG photoelectric transfer function represents the conversion relationship from linear signal values of pixels of an image frame to HLG domain nonlinear signal values, and fig. 3 schematically shows a curve diagram of the HLG photoelectric transfer function. The HLG photoelectric transfer function can be expressed as:

wherein, L represents the linear signal value of the image frame pixel, and the value range is [0,12 ]; l' represents a HLG domain nonlinear signal value, and the value range is [0,1 ]; a. b and c are both HLG photoelectric transfer coefficients, a is 0.17883277, b is 0.28466892, and c is 0.55991073.

(3) SLF photoelectric transfer function: on the premise of meeting the optical characteristics of human eyes, the luminance distribution of the HDR scene is obtained. The SLF photoelectric transfer function represents a conversion relationship from a linear signal value of an image frame pixel to an SLF domain nonlinear signal value, and fig. 4 schematically shows a graph of the SLF photoelectric transfer function. The SLF photoelectric transfer function can be expressed as:

the parameters corresponding to R, G and B in the above formula can be represented by the formulaCalculation, where L represents a linear signal value of a pixel of an image frame, normalized to [0,1]](ii) a L' represents a PQ domain nonlinear signal value with a value range of [0,1](ii) a p, m, a and b are all SLF photoelectric transfer coefficients, p is 2.3, m is 0.14, a is 1.12762, and b is-0.12762.

Three, mapping of dynamic Range

The mapping of dynamic range may be applied on adaptation of the display device for front-end HDR signals and back-end HDR, e.g. front-end acquisition to 4000cd/m2Is detected in the light emission signal of the light source,the HDR display capability of the display device of the rear end HDR is 500cd/m24000cd/m2Is mapped to 500cd/m2Is a Tone Mapping (TM) process from high to low. The mapping of dynamic range may also be applied to the adaptation of the display device to the front-end SDR signal and the back-end HDR, e.g. 100cd/m acquisition by the front-end2The HDR display capability of the display device of the rear end HDR is 2000cd/m2100cd/m2Illumination signal mapping to 2000cd/m2Is a low to high TM process.

The current mapping method of dynamic range can be divided into static and dynamic. The static mapping method is to perform an integral TM process from a single data according to the same video content or the same hard disk content, that is, mapping curves are generally the same for various scenes. The method has the advantages that the video needs to carry less data, and the processing flow is simpler; the disadvantage is that all scenes use the same mapping curve for TM, which may result in information loss in some scenes, for example, if the mapping curve is focused on protecting bright areas, some details may be lost in some extremely dark scenes, or completely invisible, which may affect the display effect of the video. The dynamic mapping method is to dynamically adjust the mapping curve according to the content of each scene or each frame according to a specific area, and has the advantages that the method can realize the differentiation processing of different scenes or different frames; the disadvantage is that each frame or each scene needs to carry related scene information, and the amount of data that the video needs to carry is large.

Four, TM technique

(1) Sigmoidal curve-based TM process

Fig. 5 shows an exemplary schematic diagram of a sigmoidal curve.

(2) Belzel curve based TM process

Fig. 6 shows an exemplary illustration of a bezier curve.

(3) TM process based on S-shaped curve perceived by human eyes

Fig. 7 schematically shows a diagram of an S-curve, and the photoelectric transfer function corresponding to the S-curve can be expressed as:

wherein, L and L' are normalized electrical signals or optical signals respectively, and the value ranges are [0,1](ii) a a has a value range of [0,1]](ii) a The value range of b is [0,1]](ii) a The value ranges of p, N and m are all [0, N]N is a rational number greater than 0.1; k is a radical of1、k2、k3Are all rational numbers.

Fifth, dynamic metadata

The front end (video acquisition and/or production) will carry the parameters associated with the mapping curve in the dynamic metadata sent to the back end (video display).

(1) sigmoidal curve

The dynamic metadata definition related to the sigmoidal curve proposed by St2094-10 includes not only statistics such as a Maximum value (Maximum PQ-encoded maxRGB), a Minimum value (Minimum PQ-encoded maxRGB), and an Average value (Average PQ-encoded maxRGB) of video luminance, but also parameters related to the sigmoidal curve such as tone mapping offset (tone mapping offset), tone mapping gain (tone mapping gain), and tone mapping gamma (tone mapping gamma), and is used to directly generate the sigmoidal curve.

However, the generation manner of the parameters is relatively fixed, and the parameters included in the dynamic metadata cannot provide more flexibility for curve generation.

(2) Bezier curve

The dynamic metadata definition proposed in St2094-40 based on the bezier curve correlation includes histogram information (Distribution MaxRGB) and bezier curve-related parameters (bezier curve anchors) for directly generating the bezier curve.

In addition, the ST2094 series of standards include target _ system _ display _ maximum _ luminance (TSDAPL) as a target system display maximum (peak) luminance.

However, the above parameters correspond to tspapl when generated at the front end, and the same curve is used for different display devices at the back end, and the best display effect cannot be achieved.

(3) Curve of S shape

The motion metadata may include statistics such as a maximum value, a minimum value, and an average value of video luminance, or may include parameters related to an S-shaped curve such as p, m, a, b, n, K1, K2, and K3.

The system architecture to which the embodiments of the present application apply is described below. Fig. 8 is a schematic block diagram of a video processing system to which an embodiment of the present application is applied. As shown in fig. 8, the video processing system is divided into a front end and a back end, wherein the front end includes a module for capturing and/or producing video 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 simultaneously carries dynamic metadata of the video data. And the back end performs enhancement processing on the image frames in the video by combining the corresponding dynamic metadata according to the video data to obtain and display images with good color, brightness, contrast and the like.

The front end and the back end can be independent and different physical devices, for example, the front end can be a device with a video acquisition function, such as a video camera, a camera and an image drawing machine, and the back end can be a device with a video playing function, such as a mobile phone, a flat panel, a set-top box and a television. At this time, a wireless connection or a wired connection may be established between the front end and the back end, where the wireless connection may adopt technologies including, for example, Long Term Evolution (LTE), fifth generation (5G) mobile communication, and future mobile communication. The wireless connection may also include wireless-fidelity (WiFi), bluetooth, Near Field Communication (NFC), and other technologies. The wired connection may include an ethernet connection, a local area network connection, and the like. This is not particularly limited. The method and the device can integrate the functions of the front end and the functions of the back end on the same physical equipment, such as a mobile phone, a flat panel, a set-top box, a television, an image drawing machine and the like with a video shooting function. Partial functions of the front end and partial functions of the back end can be integrated on the same physical device. This is not particularly limited.

The above-described device integrating the front-end function and the back-end function can be deployed on land, including indoors or outdoors, hand-held or vehicle-mounted; can also be deployed on the water surface (such as a ship and the like); and may also be deployed in the air (e.g., airplanes, balloons, satellites, etc.). The terminal device may be a mobile phone (mobile phone), a tablet computer (pad), a wearable device with a wireless communication function (e.g., a smart watch), a location tracker with a positioning function, a computer with a wireless transceiving function, a Virtual Reality (VR) device, an Augmented Reality (AR) device, a wireless device in industrial control (industrial control), a wireless device in self driving (self driving), a wireless device in remote medical (remote medical), a wireless device in smart grid (smart grid), a wireless device in transportation safety (transportation safety), a wireless device in smart city (smart city), a wireless device in smart home (smart home), and the like, which is not limited in this application.

Fig. 9 shows an exemplary structural diagram of the terminal device 900. As shown in fig. 9, the terminal apparatus 900 includes: an application processor 901, a Micro Controller Unit (MCU) 902, a memory 903, a modem (modem)904, a Radio Frequency (RF) module 905, a Wireless-Fidelity (Wi-Fi) module 906, a bluetooth module 907, a sensor 908, an input/output (I/O) device 909, a positioning module 910, and the like. These components may communicate over one or more communication buses or signal lines. The aforementioned communication bus or signal line may be a CAN bus as provided herein. Those skilled in the art will appreciate that terminal device 900 may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.

The following describes the components of the terminal device 900 in detail with reference to fig. 9:

the application processor 901 is a control center of the terminal apparatus 900, and connects the respective components of the terminal apparatus 900 by using various interfaces and buses. In some embodiments, processor 901 may include one or more processing units.

The memory 903 has stored therein computer programs such as an operating system 911 and application programs 912 shown in fig. 9. The application processor 901 is configured to execute computer programs in the memory 903 to implement the functions defined by the computer programs, e.g., the application processor 901 executes an operating system 911 to implement various functions of the operating system on the terminal device 900. The memory 903 may also store data in addition to computer programs, such as data generated during operation of the operating system 911 and application programs 912. The storage 903 is a non-volatile storage medium, and typically includes both memory and external storage. Memory includes, but is not limited to, Random Access Memory (RAM), read-only memory (ROM), or cache, among others. External memory includes, but is not limited to, flash memory (flash memory), hard disks, optical disks, Universal Serial Bus (USB) disks, and the like. The computer program is typically stored on an external memory, from which the processor loads the program into the internal memory before executing the computer program.

The memory 903 may be independent and connected to the application processor 901 through a bus; the memory 903 may also be integrated with the application processor 901 into a chip subsystem.

The MCU 902 is a co-processor for acquiring and processing data from the sensor 908, the processing power and power consumption of the MCU 902 are smaller than those of the application processor 901, but the MCU 902 has a feature of "always on", which can continuously collect and process sensor data when the application processor 901 is in a sleep mode, and thus, the normal operation of the sensor can be guaranteed with extremely low power consumption. In one embodiment, the MCU 902 may be a sensor hub chip. The sensor 908 may include a light sensor, a motion sensor. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display 9091 according to the brightness of ambient light, and a proximity sensor that turns off the power of the display screen when the terminal device 900 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally, three axes), and can detect the magnitude and direction of gravity when the accelerometer sensor is stationary; the sensors 908 may also include other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein. MCU 902 and sensor 908 may be integrated on the same chip or may be separate components connected by a bus.

The modem 904 and radio frequency module 905 form the communication subsystem of the terminal device 900 for implementing the main functions of the wireless communication standard protocol. Wherein the modem 904 is used for codec, signal modem, equalization, etc. The radio frequency module 905 is used for receiving and transmitting a wireless signal, and the radio frequency module 905 includes, but is not limited to, an antenna, at least one amplifier, a coupler, a duplexer, and the like. Radio frequency module 905 cooperates with modem 904 to implement wireless communication functions. modem 904 can be provided as a separate chip or can be combined with other chips or circuits to form a system-on-chip or integrated circuit. These chips or integrated circuits are applicable to all terminal devices implementing wireless communication functions, including: mobile phones, computers, notebooks, tablets, routers, wearable devices, automobiles, home appliances, and the like.

The terminal device 900 may also use a Wi-Fi module 906, a bluetooth module 907, etc. for wireless communication. The Wi-Fi module 906 is used for providing network access for the terminal device 900 according to Wi-Fi related standard protocols, and the terminal device 900 can access to a Wi-Fi access point through the Wi-Fi module 906 so as to access the Internet. In other embodiments, the Wi-Fi module 906 may also act as a Wi-Fi wireless access point and may 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 (e.g., a mobile phone, a smart watch, 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.

The location module 910 is used to determine the geographic location of the terminal device 900. It is understood that the positioning module 910 may specifically be a receiver of a Global Positioning System (GPS) or a positioning system such as the beidou satellite navigation system, russian GLONASS, and the like.

The Wi-Fi module 906, the bluetooth module 907, and the positioning module 910 may be separate chips or integrated circuits, respectively, or may be integrated together. For example, in one embodiment, the Wi-Fi module 906, the bluetooth module 907, and the positioning module 910 may be integrated onto the same chip. In another embodiment, the Wi-Fi module 906, the bluetooth module 907, the positioning module 910, and the MCU 902 may also be integrated into the same chip.

Input/output devices 909 include, but are not limited to: a display 9091, a touch screen 9092, and audio circuitry 9093, and so on.

Among other things, the touch screen 9092 may capture touch events on or near the terminal device 900 by a user (e.g., operations of the user on or near the touch screen 9092 using any suitable object such as a finger, a stylus, etc.) and send the captured touch events to other devices (e.g., the application processor 901). The operation of the user near the touch screen 9092 may be referred to as floating touch; with the hover touch, the user may select, move, or drag a destination (e.g., an icon, etc.) without directly contacting the touchscreen 9092. In addition, the touch screen 9092 can be implemented by various types such as resistive, capacitive, infrared, and surface acoustic wave.

The display (also referred to as a display screen) 9091 is used to display information entered by the user or presented to the user. The display may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The touch screen 9092 may be overlaid on the display 9091, and when the touch screen 9092 detects a touch event, the touch event is transmitted to the application processor 901 to determine the type of the touch event, and then the application processor 901 may provide a corresponding visual output on the display 9091 according to the type of the touch event. Although in fig. 9 the touch screen 9092 and the display 9091 are implemented as two separate components to implement the input and output functions of the terminal device 900, in some embodiments the touch screen 9092 and the display 9091 may be integrated to implement the input and output functions of the terminal device 900. In addition, the touch screen 9092 and the display 9091 may be disposed on the front surface of the terminal device 900 in a full-panel manner, so as to implement a bezel-less configuration.

The audio circuitry 9093, speaker 9094, and microphone 9095 may provide an audio interface between a user and the terminal device 900. The audio circuit 9093 can transmit the electric signal obtained by converting the received audio data to the speaker 9094, and the electric signal is converted into a sound signal by the speaker 9094 and output; on the other hand, the microphone 9095 converts the collected sound signals into electric signals, converts the electric signals into audio data after being received by the audio circuit 9093, and then transmits the audio data to, for example, another terminal device through the modem 904 and the radio frequency module 905, or outputs the audio data to the memory 903 for further processing.

In addition, the terminal apparatus 900 may also have a fingerprint recognition function. For example, the fingerprint acquisition device may be disposed on the back side of the terminal device 900 (e.g., below the rear camera), or the fingerprint acquisition device may be disposed on the front side 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 a fingerprint identification function, that is, the fingerprint acquisition device may be integrated with the touch screen 9092 to implement the fingerprint identification 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, and may be configured in the touch screen 9092 in other manners. The main component of the fingerprint acquisition device in the embodiments of the present application is a fingerprint sensor, which may employ any type of sensing technology, including but not limited to optical, capacitive, piezoelectric, or ultrasonic sensing technologies, etc.

Further, the operating system 911 installed on the terminal device 900 may beOr other operating system, to which the embodiments of the present application do not impose any limitations.

To be carried withThe terminal device 900 of the operating system is an example, and the terminal device 900 can be logically divided into a hardware layer, an operating system 911, and an application layer. The hardware layer includes the application processor 901, as described above,Hardware resources such as a MCU 902, memory 903, modem 904, Wi-Fi module 906, sensors 908, positioning module 910, and the like. The application layer includes one or more applications, such as application 912, and application 912 may be any type of application, such as a social-type application, an e-commerce-type application, a browser, and so on. The operating system 911, acting as software middleware between a hardware layer and an application layer, is a computer program that manages and controls hardware and software resources.

In one embodiment, the operating system 911 includes a kernel, Hardware Abstraction Layer (HAL), libraries and runtimes (libraries and runtimes), and framework (framework). Wherein, the kernel is used for providing the components and services of the bottom system, such as: power management, memory management, thread management, hardware drivers, etc.; the hardware driving program comprises a Wi-Fi driving program, a sensor driving program, a positioning module driving program and the like. The hardware abstraction layer is used for encapsulating the kernel driver, providing an interface for the framework and shielding the implementation details of the lower layer. The hardware abstraction layer runs in user space and the kernel driver runs in kernel space.

Libraries and runtimes, also called runtime libraries, provide the required library files and execution environment for the executable program at runtime. In one embodiment, the libraries and runtimes include Android Runtimes (ART), libraries, and scene package runtimes. An ART is a virtual machine or virtual machine instance that is capable of converting the bytecode of an application into machine code. Libraries are libraries that provide support for executable programs at runtime, including browser engines (e.g., webkit), script execution engines (e.g., JavaScript engines), graphics processing engines, and so forth. The scene package operation is an operation environment of the scene package, and mainly comprises a page execution environment (page context) and a script execution environment (script context), wherein the page execution environment analyzes page codes in formats such as html and css by calling a corresponding library, and the script execution environment analyzes codes or executable files realized by executing scripting languages such as JavaScript by calling a corresponding function library.

The framework is used to provide various underlying common components and services for applications in the application layer, such as window management, location management, and the like. In one embodiment, the framework includes a geo-fencing service, a policy service, a notification manager, and the like.

The functions of the various components of the operating system 911 described above may be implemented by the application processor 901 executing programs stored in the memory 903.

Those skilled in the art will appreciate that terminal device 900 may include fewer or more components than shown in fig. 9, which terminal device shown in fig. 9 includes only components more pertinent to the various implementations disclosed herein.

The scheme of the embodiment of the application is explained in detail as follows:

fig. 10 is a flowchart of an embodiment of the method for obtaining the mapping curve parameter in the present application, and as shown in fig. 10, the process 1000 may be applied to the video processing system shown in fig. 8, or may be applied to the terminal device shown in fig. 9, where an execution main body of the process includes the terminal device or a back end in the video processing system. The process 1000 is described as a series of steps or operations, it being understood that the process 1000 may be performed in various orders and/or concurrently, and is not limited to the order of execution shown in fig. 10. The method for acquiring the mapping curve parameters comprises the following steps:

and 1001, acquiring a first mapping curve parameter set and the maximum display brightness of the first target system.

In this application, the front end may be the front end in the video processing system shown in fig. 8, and the back end may be the back end in the video processing system shown in fig. 8, where data of the front end may be transmitted to the back end through a wireless network or a wired network. The front end and the back end may also be integrated into the terminal device shown in fig. 9, and at this time, data of the front end may transmit the back end of the value through a transmission path inside the terminal device, for example, a Controller Area Network (CAN) bus. The backend, upon receiving the data, may store it in a buffer for later reading during subsequent processing. The buffer may be, for example, an RGB gamut pixel buffer for the frame to be processed and/or a metadata buffer for the frame to be processed.

After the front end acquires the video, the front end may pre-process the video, for example, the method includes mapping the brightness in the real world to the brightness matched with the storage mode by using a photoelectric transfer function, adjusting the brightness, the chromaticity, the contrast, and the like of the video by using the acquired information, encoding the video to generate a code stream, and the like, and sending the processed data to the back end.

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 video data and data related to a mapping curve, the data related to video data may include, for example, format and characteristics of the video data, maximum luminance (target _ system _ display _ maximum _ luminance), maximum luminance MaxSource, minimum luminance MinSource, average luminance AvgSource, storable variation range of the video in the memory, and the like, and the principle of the storable variation range is similar to a variance or a distribution confidence interval for describing a luminance aggregation range of the video signal. The mapping curve related data may include, for example, a shrinkage factor, a shift factor, a curved shape factor, etc. mapping curve related parameters. The first set of mapping curve parameters comprises one or more parameters of the data relating to the mapping curve, e.g. the sigmoid curve-related data comprises a, b, p, n, m, k1、k2And k3The first mapping curve parameter set may include all the eight parameters, or only some of the eight parameters may be rational numbers.

Optionally, the data related to the video data may also be extracted directly from the video content without being transmitted through dynamic metadata.

The first set of mapping curve parameters corresponds to a first target system display maximum brightness, i.e., one or more parameters in the first set of mapping curve parameters are generated with or associated with the first target system display maximum brightness. The front end may carry a first set of mapping curve parameters and a first target system display maximum luminance in the dynamic metadata; or only the first mapping curve parameter set is carried in the dynamic metadata, the first mapping curve parameter set at this time corresponds to the maximum brightness of the display of the default target system, the maximum brightness of the display of the default target system is agreed in advance at the front end and the rear end, then the front end only needs to carry the first mapping curve parameter set corresponding to the first mapping curve parameter set in the dynamic metadata, and the rear end knows the maximum brightness of the display of the first target system by default after receiving the first mapping curve parameter set. If the rear end needs to adjust the display peak brightness of the target system according to actual conditions, one or more parameters in the first mapping curve parameter set can be adjusted according to the relation between the actual brightness and the default display peak brightness of the target system to obtain a new mapping curve parameter set corresponding to the actual brightness.

Note that the content and data format included in the video data are not specifically limited in the present application. For example, the format of the video data may be YUV or RGB in terms of the color space of the pixel data; the video data may be 8 bits, 10 bits, 12 bits, or the like in terms of bit width of the data. The content included in the dynamic metadata is not particularly limited. For example, the data related to the mapping curve may be parameters related to the sigmoidal curve, parameters related to the bezier curve, or parameters related to the sigmoid curve.

Step 1002, acquiring a display brightness parameter set.

The display brightness parameter set can be obtained through the device information, and the display brightness parameter set includes maximum display brightness (MaxDisplay) and/or minimum display brightness (minidisplay) of the display device. The device information may be a parameter of the device written when the device is shipped from the factory, or may be information provided by the manufacturer and indicating the attribute and performance of the device itself.

Maximum display brightness refers to the maximum illumination that the device can exhibit when displaying. The minimum display luminance is the minimum luminance that the device can exhibit when displaying, and is typically set to 0cd/m2Or 1cd/m2. According to the display performance of the device, mostThe small display luminance may be set to other values, which is not particularly limited in the present application.

And step 1003, obtaining an adjustment coefficient set.

The set of adjustment coefficients includes information indicative of the need for adjustment of one or more parameters associated with the mapping curve.

The set of adjustment coefficients includes one or more adjustment coefficients corresponding to one or more parameters of the first set of mapping curve parameters. As mentioned above, the first set of mapping curve parameters comprises one or more parameters related to the mapping curve, and one of the adjustment coefficients of the set of adjustment coefficients may correspond to one of the parameters of the first set of mapping curve parameters, i.e. one adjustment coefficient for each parameter related to the mapping curve; in addition, one adjustment coefficient in the adjustment coefficient set may also correspond to a plurality of parameters in the first mapping curve parameter set, that is, each adjustment coefficient corresponds to a plurality of parameters related to the mapping curve; the adjustment coefficient set may 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 an adjustment coefficient corresponding thereto in the adjustment coefficient set, which means 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 the adjustment coefficients in the adjustment coefficient set, that is, one or more adjustment coefficients do not have a parameter corresponding to the adjustment coefficient in the first mapping curve parameter set, which indicates that the front end does not send the parameter to the back end at this time, but needs to adjust the parameter, and the back end may obtain the parameter by other methods.

In this application, the device may obtain the adjustment coefficient set from the dynamic metadata. The front end sets an adjusting mode of one or more parameters related to the mapping curve before sending the code stream, and can write the parameters into dynamic metadata and send the dynamic metadata to the back end; or the equipment acquires the adjusting coefficient set according to a preset value. The preset value may correspond to one or more parameters related to the mapping curve respectively, or may be an adjustment mode index, and the device obtains an adjustment coefficient of the one or more parameters related to the mapping curve based on the index.

And 1004, adjusting one or more parameters in the first mapping curve parameter set according to the display brightness parameter set, the maximum brightness of the display of the first target system and the adjustment coefficient set to obtain a second mapping curve parameter set.

The second set of mapping curve parameters comprises one or more adjusted parameters corresponding to one or more parameters of the first set of mapping curve parameters, which are obtained after the latter are adjusted. It should be noted that the parameters included in the second mapping curve parameter set may correspond to the parameters included in the first mapping curve parameter set 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 being adjusted, and at this time, the method is applicable to the case where the first mapping curve parameter set includes all the parameters related to the mapping curve; the parameters included in the second mapping curve parameter set may also be parameters that are 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 being adjusted, or part of the parameters are obtained by the device using other methods, and then the part of the parameters is adjusted or not adjusted to be added to the second mapping curve parameter set, which may be applicable to the case where the first mapping curve parameter set includes part of parameters related to the mapping curve. Furthermore, the data comprised in the second set of mapping curve parameters may also be a set of adjusted first mapping curve parameters and unadjusted first mapping curve parameters.

The method for acquiring the second mapping curve parameter set according to the present application is described below by taking the first parameter as an example, where the first parameter is any one of the first mapping curve parameter set.

The first method is that the adjusted first parameter is calculated according to the formula (1):

Pa=Pb+k×PΔ (1)

wherein, PaIndicating adjustedA first parameter, PbDenotes a first parameter, PΔIndicating the adjustment coefficient corresponding to the first parameter,orWhen MaxDisplay > MTPLWhen a is 1, M is less than or equal to MaxDisplayTPLWhen a is-1, MaxDisplay indicates maximum display luminance, MTPLIndicating that the first target system displays the maximum brightness, N indicating that the intensity control parameter is adjusted, is a rational number greater than 0, such as 1, 2, etc., M indicating that the preset brightness value is greater than 0, such as 100cd/M2、50cd/m2And the like. In general, M may be set to 1, N to 100cd/M2. The role of both M and N is to control the rate of change of the parameter associated with the mapping curve. It should be noted that, in order to adapt to hardware of different vendors, different content scenes, and the like, one or both of M and N may be passed through dynamic metadata as parameters. The following method is also the same, and will not be described in detail.

It should be noted that the value of MaxDisplay in the present application may be an absolute luminance value, for example, 100cd/m2、1000cd/m2(ii) a The MaxDisplay value can also be a normalized brightness value, and the value range of the normalized brightness value is 0-1; the value of MaxDisplay may also be the luminance value of PQ domain, e.g., 0cd/m2-10000cd/m2. In this application MTPLThe value of (D) may be an absolute luminance value, e.g. 100cd/m2、1000cd/m2;MTPLThe value of (a) may also be a normalized luminance value, which ranges from 0 to 1; mTPLThe value of (D) may also be the luminance value of the PQ domain, e.g., 0cd/m2-10000cd/m2. The value of M in this application may be an absolute luminance value, e.g. 100cd/M2、1000cd/m2(ii) a The value of M can also be a normalized brightness value, and the value range of M is 0-1; the value of M may also be the luminance value of the PQ domain, e.g., 0cd/M2-10000cd/m2. This is not a particular limitation of the present application. The following method is alsoThus, the description is omitted.

All or part of the parameters in the first mapping curve parameter set can be adjusted by adopting the formula (1) to obtain adjusted parameters, and the adjusted parameters are added into the second mapping curve parameter set.

Calculating the adjusted first parameter according to a formula (2):

Pa=(1-w)×Pb+w×Pm (2)

wherein, PaRepresenting the adjusted first parameter, PbWhich is indicative of a first parameter of the image,orPΔIndicating the adjustment coefficient corresponding to the first parameter, MaxDisplay indicating the maximum display brightness, MTPLIndicating that the first target system displays the maximum brightness, N indicating that the intensity control parameter is adjusted, is a rational number greater than 0, such as 1, 2, etc., M indicating that the preset brightness value is greater than 0, such as 100cd/M2、50cd/m2Etc. PmThe intermediate value of the first parameter is obtained according to one or more of the parameters of the maximum display brightness, the minimum display brightness, the storable maximum brightness, the storable minimum brightness, the storable average value, the storable variation range and the like.

In addition, P ismIt is also possible to obtain more or less 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, which is not specifically limited in this application. The following method is also the same, and will not be described in detail. This application relates to PmReference may be made to a generation method of a mapping curve in the related art, which is not specifically limited in this application.

It should be noted that, in the second method, the device may obtain another set of parameter sets related to the mapping curve according to data related to the video data, for example, the maximum brightness, the minimum brightness, and/or the average brightness, and/or the storable variation range of the video, the maximum display brightness and the minimum display brightness of the device, and/or other parameters not directly related to the mapping curve, where the parameters in the parameter sets correspond to the parameters in the first mapping curve parameter set one to one, and there may be no parameters in the first mapping curve parameter set. In this way, the device can obtain two groups of parameter sets related to the mapping curve, wherein one group is from the front end, the other group is obtained by the device according to the feature calculation of the video data, and the two groups of parameter sets are fused by adopting a weighting method to obtain a final parameter set, so that a more flexible brightness processing method can be adopted at different positions of the video by adjusting the weights of the two groups of parameter sets, and the video more conforming to the display performance of the device is obtained.

In addition, regarding PmThe calculation method of (2) may also be applied to parameters associated with the mapping curve but not included in the first set of mapping curve parameters, and the apparatus may similarly acquire the parameters by other methods.

In a possible implementation manner, the device may obtain the first mapping curve according to the adjusted first parameter and other parameters except the first parameter in the first mapping curve parameter set, and if the brightness of the video obtained by performing tone mapping according to the first mapping curve is higher than the original brightness of the video, continue to adjust the first parameter. This is to ensure that there is no portion of the mapping curve above the line x-y.

In a possible implementation manner, the adjusted first parameter is analyzed according to a preset rule, and if the adjusted first parameter meets the preset rule, the first parameter is continuously adjusted. For example, pa×ra>TpaWherein p isaIs a first parameter, raFor scaling factors, TpaTo set a threshold, e.g. 3.2363, then paAdjusted to an upper limit Tpa/ra. Or can be looked up in a preset table (Ta, Tp)aCorresponding to Tp, if paIf > Tp, then p isaAdjusted to the upper limit Tp. It should be noted that if the same value cannot be found by the lookup table, the value of the query can be determined by using the proximity value, the weighted average of the proximity values, and the like. The two inequalities indicate that a mapping curve obtained from a current parameter set related to the mapping curve has a portion higher than a straight line of x-y, and therefore, the corresponding parameter needs to be subjected to dimension reduction processing. It should be noted that, in addition to the above two methods, the present application may also adopt other methods to ensure that there is no portion of the mapping curve higher than the straight line of x-y, and this is not particularly limited.

In one possible implementation, when the first mapping curve parameter set includes a scaling factor, the adjusted scaling factor is calculated according to formula (3):

wherein r isaIndicating the adjusted scaling factor, P1a,P2a,.. representing the parameters in the second set of mapping curve parameters, MaxSource representing the maximum luminance that the video can store in memory, f (MaxSource, P1)a,P2a,..) represents the calculation of a function relating to the maximum brightness that the video can store in memory, and one or more adjusted parameters of the second set of mapping curve parameters, the function being included as part of the tone mapping function parameters, MaxDisplay representing the maximum display brightness. The value that can be stored is related to the storage mode of the memory, for example, if 10 bits are used for storage, the maximum value that can be stored by the memory is 2101024, the minimum value that can be stored is 0; if the storage is carried out in an 8-bit mode, the maximum value storable by the storage is 28The minimum value that can be stored is 0, 256.

If a scaling factor is involved in the acquisition of the mapping curve, the device may calculate the scaling factor according to equation (3) using one or more adjusted parameters of the already acquired second set of mapping curve parameters, such that the scaling factor isAnd the finally generated mapping curve is more consistent with the characteristics of the video based on the adjusted parameters. The scaling factor determines the degree of scaling of the linear signal values of the pixels of the image frame in a formula for calculating the mapping curve, e.g. a formulaWhere a is the scaling factor.

In one possible implementation, when the first mapping curve parameter set includes a scaling factor, the adjusted scaling factor is calculated according to formula (4):

wherein r isaIndicating the adjusted scaling factor, P1a,P2a,.. representing parameters in the second set of mapping curve parameters, MaxSource representing the maximum brightness that the video can store in the memory, MinSource representing the minimum brightness that the video can store in the memory, f (MaxSource, P1)a,P2a,..) represents a function calculation related to the maximum luminance storable in memory of the video and one or more adjusted parameters of the second set of mapping curve parameters, f (MinSource, P1)a,P2a,..) represents a function calculation related to a minimum brightness that the video can store in memory, MaxDisplay representing a maximum display brightness, and minidisplay representing a minimum display brightness, and one or more adjusted parameters of the second set of mapping curve parameters.

In one possible implementation, when the first mapping curve parameter set includes a scaling factor, the adjusted scaling factor is calculated according to formula (5):

wherein r isaIndicating the adjusted scaling factor, P1a,P2a,.. shows a second mapping curveThe parameter in the parameter set, MaxSource, represents the maximum brightness that the video can store in the memory, f (MaxSource, P1)a,P2a,..) represents the functional calculation relating to the maximum brightness that the video can store in memory, MaxDisplay representing the maximum display brightness, and minidisplay representing the minimum display brightness, and one or more of the adjusted parameters in the second set of mapping curve parameters.

In one possible implementation, when the first mapping curve parameter set includes a scaling factor, the adjusted scaling factor is calculated according to formula (6):

wherein r isaIndicating the adjusted scaling factor, P1a,P2a,.. representing parameters in the second set of mapping curve parameters, MaxSource representing the maximum brightness that the video can store in the memory, MinSource representing the minimum brightness that the video can store in the memory, f (MaxSource, P1)a,P2a,..) represents a function calculation related to the maximum luminance storable in memory of the video and one or more adjusted parameters of the second set of mapping curve parameters, f (MinSource, P1)a,P2a,..) represents a function calculation related to the minimum brightness that the video can store in memory, and one or more adjusted parameters in the second set of mapping curve parameters, MaxDisplay represents the maximum display brightness.

In one possible implementation, when the offset factor is included in the first mapping curve parameter set, the adjusted offset factor is determined according to the following manner:

ramin display, which represents the minimum display brightness; alternatively, the first and second electrodes may be,

rag denotes a preset value and may be a rational number such as 0,1, etc.

If a scaling factor is involved in acquiring the mapping curve, the device may calculate the scaling factor according to one or more adjusted parameters in the acquired second mapping curve parameter set by using any one of the formulas, so that the scaling factor is obtained based on the adjusted parameters, so that the finally generated mapping curve better conforms to the characteristics of the video.

Step 1005, obtaining the mapping curve according to one or more adjusted parameters in the second mapping curve parameter set.

All of the mapping curve or a portion of the segmented tone mapping curve may be obtained based on the one or more adjusted parameters, and the curve calculation is a mapping between the mapping from the normalized HDR/SDR video data to the normalized display data may be obtained. And reversely normalizing the obtained mapping value to actual display data of the equipment according to the maximum display brightness and the minimum display brightness of the equipment.

It should be noted that the above inverse normalization calculation may be a non-linear space, or a linear space normalized by 0-1. The inverse normalization may be 0cd/m2-10000cd/m2It may be 0.001cd/m2-100000cd/m2. The application is not particularly limited with respect to the scope and process of reverse normalization. In addition, the obtained mapping curve not only includes tone-mapping (tone-mapping), and the mapped video may be further adjusted to adjust its saturation processing, or/and color gamut conversion processing, or/and denoising processing, or/and sharpening processing, etc. before being displayed, which is not particularly limited in this application.

According to the method and the device, one or more parameters related to the mapping curve are adjusted, the adjusting process is combined with the display capability of the rear end, more accurate tone adjustment can be provided for display equipment with different brightness, the flexibility is high, and a good presenting effect can be achieved under the condition that the curve parameters are reasonably configured.

The scheme of the embodiment of the method shown in fig. 10 is further illustrated below by means of several specific examples.

Example one

For the S-shaped curve, the dynamic metadata may include statistics such as maximum luminance, minimum luminance, and average luminance that can be stored in the memory of the video, and may also include parameters related to the S-shaped curve such as p, m, a, b, n, K1, K2, and K3.

Firstly, acquiring a first mapping curve parameter set and a first target system display maximum brightness.

The dynamic metadata includes a format or a feature of the video data, and the first mapping curve parameter set Mb ═ pb、mb、ab、bb、nb、K1b、K2b、K3bTarget system display maximum brightness (target system display maximum brightness) MTPLAnd/or a maximum luminance MaxSource, and/or a minimum luminance MinSource, and/or an average luminance AvgSource, and/or a storable variation range, etc. of the video that can be stored in the memory.

Note that the content and data format included in the video data are not specifically limited in the present application. For example, the format of the video data may be YUV or RGB in terms of the color space of the pixel data; the video data may be 8 bits, 10 bits, 12 bits, or the like in terms of bit width of the data.

And secondly, acquiring a display parameter set of the rear end.

The display parameter set may include a maximum display brightness MaxDisplay and/or a minimum display brightness minidisplay of the back end, and/or a target system display maximum brightness (target _ system _ display _ maximum _ luminance) TTPL. The maximum display brightness MaxDisplay can be obtained according to the parameters of the equipment or the information of the manufacturer, and the minimum display brightness minidisplay can be set to be 0cd/m2Or 1cd/m2Or 0cd/m2Or 1cd/m2Corresponding PQ value. The minimum display brightness may also be set to other values according to the display performance of the device, and this application is not particularly limited thereto.

And thirdly, acquiring an adjusting coefficient set.

A set of adjustment coefficients M corresponding to the first set of mapping curve parameters MbΔMay be { pΔ、mΔ、aΔ、bΔ、nΔ、K1Δ、K2Δ、K3ΔEither a subset or a full set of. The adjustment coefficient set may be obtained by metadata or may be preset.

And fourthly, adjusting one or more parameters in the first mapping curve parameter set according to the local maximum display brightness, the first target system display maximum brightness and the adjustment coefficient set to obtain a second mapping curve parameter set.

For the first mapping curve parameter set Mb ═ pb、mb、ab、bb、nb、K1b、K2b、K3bAdjusting one or more parameters in the mapping curve to obtain an adjusted second mapping curve parameter set Ma ═ pa、ma、aa、ba、na、K1a、K2a、K3a}. Mainly comprises the following steps:

A. traverse a first mapping curve parameter set Mb ═ pb、mb、ab、bb、nb、K1b、K2b、K3bParameter Q inb(QbIs any one parameter in Mb). If the set of coefficients M is adjustedΔIn which there is a corresponding adjustment coefficient QΔThen Q isa=Qb+k×QΔElse Qa=QbWhereinOrWhen MaxDisplay > MTPLWhen a is 1, M is less than or equal to MaxDisplayTPLWhen a is-1, M is a predetermined luminance value and is a rational number greater than 0, e.g. 100cd/M2,50cd/m2Or 100cd/m2Corresponding PQ values, etc., and N is a rational number greater than 0, such as 1, 2, etc., for adjusting the strength control parameter.

B. Set up baMinDisplay or ba=0。

C. Is provided with

D. If a part of the mapping curve obtained from the current second mapping curve parameter set has a straight line higher than x-y, p is addedaLimited to Tp. The method mainly comprises the following steps:

if p isa×aa>TpaThen, the part of the mapping curve where the straight line higher than x-y exists is judged to be higher than x-y, and Tp is judged to be higher than x-yaIs a preset value. Tp to Tpa/aa. Alternatively, the first and second electrodes may be,

looking up and a in a preset table (Ta, Tp)aCorresponding to Tp, if paIf > Tp, then p isaAdjusted to the upper limit Tp. It should be noted that if the same value cannot be found by the lookup table, the value of the query can be determined by using the proximity value, the weighted average of the proximity values, and the like.

At this time, the scaling factor a is calculated according to the following formulaa

Or

Or

Wherein, L is MaxSource, L1 is MinSource.

In respect of aaThe following method is also used for calculation, and is not described in detail.

And fifthly, acquiring the mapping curve according to one or more adjusted parameters in the second mapping curve parameter set. The process of acquiring the mapping curve is substantially the process of acquiring the normalized spot signal through the above parameter set.

Obtaining a function calculation related to one or more adjusted parameters in the second mapping curve parameter set according to the one or more adjusted parameters in the second mapping curve parameter set, and obtaining a mapping curve by adopting the following formula:

or

Or

Or

The parameters { p, m, a, b, n, K1, K2, K3} in the formula are all from the second set of mapping curve parameters. L and L 'are normalized electrical signals or optical signals, L' is a rational number with the value range of 0.0-1.0, and L is a rational number with the value range of 0.0-1.0; the value range of a is between 0.0 and 1.0; the value range of b is between 0.0 and 1.0; the value ranges of p, N and m are between 0.1 and N; n is a rational number greater than 0.1; k1, k2 and k3 are rational numbers. The following method for calculating L' is also the same and will not be described in detail.

It should be noted that all of the above four formulas can be used to obtain the mapping curve, and the difference is 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 may be a whole curve or a segment or a part of a segmented mapping curve.

Example two

For the S-shaped curve, the dynamic metadata may include statistics such as maximum luminance, minimum luminance, average luminance, and storable variation range 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.

Firstly, acquiring a first mapping curve parameter set and a first target system display maximum brightness.

And secondly, acquiring a display parameter set of the rear end.

And thirdly, acquiring an adjusting coefficient set.

The technical principles of the first to third steps in the second embodiment are similar to those of the first to third steps in the first embodiment, and are not described herein again.

And fourthly, adjusting one or more parameters in the first mapping curve parameter set according to the local maximum display brightness, the first target system display maximum brightness and the adjustment coefficient set to obtain a second mapping curve parameter set.

For the first mapping curve parameter set Mb ═ pb、mb、ab、bb、nb、K1b、K2b、K3bAdjusting one or more parameters in the mapping curve to obtain an adjusted second mapping curve parameter set Ma ═ pa、ma、aa、ba、na、K1a、K2a、K3a}. Mainly comprises the following steps:

A. obtaining another group of mapping curve-related parameter set Mm { p } according to the maximum display brightness MaxDisplay, the minimum display brightness MinDisplay, the storable maximum brightness MaxSource, the storable minimum brightness MinSource, the storable average value AvgSource, the storable variation range, and/or other mapping curve-non-directly related parameters in the metadatam、mm、am、bm、nm、K1m、K2m、K3mWhere one or more of the parameters Mm can be used as the parameter P in the above formula (2)m

B. Traverse a first mapping curve parameter set Mb ═ pb、mb、ab、bb、nb、K1b、K2b、K3bParameter Q inb(QbIs any one of MbIndividual parameters). If in the parameter set Mm ═ pm、mm、am、bm、nm、K1m、K2m、K3mFind the corresponding parameter Q inmThen Q isa=(1-w)Qb+w×QmElse Qa=QbWhereinOrM is a predetermined luminance value and is a rational number greater than 0, e.g. 100cd/M2,50cd/m2Or 100cd/m2PQ values corresponding to the equal linear brightness values, and the like, wherein N is a rational number which is greater than 0 and is 1, 2 and the like for adjusting the intensity control parameter.

C. Set up baMinDisplay or ba=0。

D. Scaling factor aaThe calculation formula of (a) can refer to the first embodiment, and details are not repeated here.

And fifthly, acquiring the mapping curve according to one or more adjusted parameters in the second mapping curve parameter set.

The technical principle of step five in the second embodiment is similar to that of step five in the first embodiment, and is not described herein again.

EXAMPLE III

For the S-shaped curve, the dynamic metadata may include statistics such as maximum luminance, minimum luminance, average luminance, and storable variation range 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.

Firstly, acquiring a first mapping curve parameter set and a first target system display maximum brightness.

And secondly, acquiring a display parameter set of the rear end.

And thirdly, acquiring an adjusting coefficient set.

The technical principles of the first to third steps in the third embodiment are similar to those of the first to third steps in the first embodiment, and are not described herein again.

And fourthly, adjusting one or more parameters in the first mapping curve parameter set according to the local maximum display brightness, the first target system display maximum brightness and the adjustment coefficient set to obtain a second mapping curve parameter set.

For the first mapping curve parameter set Mb ═ pb、mb、ab、bb、nb、K1b、K2b、K3bAdjusting one or more parameters in the mapping curve to obtain an adjusted second mapping curve parameter set Ma ═ pa、ma、aa、ba、na、K1a、K2a、K3a}. Mainly comprises the following steps:

A. obtaining another group of mapping curve-related parameter set Mm { p } according to the maximum display brightness MaxDisplay, the minimum display brightness MinDisplay, the storable maximum brightness MaxSource, the storable minimum brightness MinSource, the storable average value AvgSource, the storable variation range, and/or other mapping curve-non-directly related parameters in the metadatam、mm、am、bm、nm、K1m、K2m、K3mWhere one or more of the parameters Mm can be used as the parameter P in the above formula (2)m

B. Traverse a first mapping curve parameter set Mb ═ pb、mb、ab、bb、nb、K1b、K2b、K3bParameter Q inb(QbIs any one parameter in Mb). If in the parameter set Mm ═ pm、mm、am、bm、nm、K1m、K2m、K3mFind the corresponding parameter Q inmThen Q isa=(1-w)Qb+w×QmElse Qa=QbWhereinOrM is a predetermined luminance value and is a rational number greater than 0, e.g. 100cd/M2,50cd/m2Or 100cd/m2,50cd/m2Corresponding PQ values, etc., and N is a rational number greater than 0, such as 1, 2, etc., for adjusting the strength control parameter.

C. Set up baMinDisplay or ba=0。

D. Is provided withOr aa=ab

E. If a part of the mapping curve obtained from the current second mapping curve parameter set has a straight line higher than x-y, p is addedaLimited to Tp. The method mainly comprises the following steps:

if p isa×aa>TpaThen, the part of the mapping curve where the straight line higher than x-y exists is judged to be higher than x-y, and Tp is judged to be higher than x-yaIs a preset value. Tp to Tpa/aa. Alternatively, the first and second electrodes may be,

looking up and a in a preset table (Ta, Tp)aCorresponding to Tp, if paIf > Tp, then p isaAdjusted to the upper limit Tp. It should be noted that if the same value cannot be found by the lookup table, the value of the query can be determined by using the proximity value, the weighted average of the proximity values, and the like.

Scaling factor aaThe calculation formula of (a) can refer to the first embodiment, and details are not repeated here.

And fifthly, acquiring the mapping curve according to one or more adjusted parameters in the second mapping curve parameter set.

The technical principle of step five in the third embodiment is similar to that of step five in the first embodiment, and is not described here again.

Example four

For the S-shaped curve, the dynamic metadata may include statistics such as maximum luminance, minimum luminance, and average luminance that can be stored in the memory of the video, and may also include parameters related to the S-shaped curve such as p, m, a, b, n, K1, K2, and K3.

Firstly, acquiring a first mapping curve parameter set and a first target system display maximum brightness.

And secondly, acquiring a display parameter set of the rear end.

And thirdly, acquiring an adjusting coefficient set.

The technical principles of the first to third steps in the fourth embodiment are similar to those of the first to third steps in the first embodiment, and are not described herein again.

And fourthly, adjusting one or more parameters in the first mapping curve parameter set according to the local maximum display brightness, the first target system display maximum brightness and the adjustment coefficient set to obtain a second mapping curve parameter set.

For the first mapping curve parameter set Mb ═ pb、mb、ab、bb、nb、K1b、K2b、K3bAdjusting one or more parameters in the mapping curve to obtain an adjusted second mapping curve parameter set Ma ═ pa、ma、aa、ba、na、K1a、K2a、K3a}. Mainly comprises the following steps:

A. traverse a first mapping curve parameter set Mb ═ pb、mb、ab、bb、nb、K1b、K2b、K3bParameter Q inb(QbIs any one parameter in Mb). If the set of coefficients M is adjustedΔIn which there is a corresponding adjustment coefficient QΔThen Q isa=Qb+k×QΔElse Qa=QbWhereinOrWhen MaxDisplay > MTPLWhen a is 1, M is less than or equal to MaxDisplayTPLWhen a is-1, M is a predetermined luminance value and is a rational number greater than 0, e.g. 100cd/M2,50cd/m2Or 100cd/m2Corresponding PQ values, etc., and N is a rational number greater than 0, such as 1, 2, etc., for adjusting the strength control parameter.

B. Set up baMinDisplay or ba=0。

C. Scaling factor aaThe calculation formula of (a) can refer to the first embodiment, and details are not repeated here.

And fifthly, acquiring the mapping curve according to one or more adjusted parameters in the second mapping curve parameter set.

The technical principle of step five in the fourth embodiment is similar to that of step five in the first embodiment, and is not described here again.

EXAMPLE five

This embodiment is used to illustrate the pre-operation step in the HDR basic curve (parameter) acquisition process in any one of the first to fourth embodiments, and specifically includes:

firstly, a base curve parameter, Stone _ mapping, is obtained from dynamic metadata (metadata) information.

And obtaining m _ p, m _ a, m _ m, m _ N, m _ b, K1, K2 and K3 according to the tone mapping identifier tone _ mapping _ mode and the base curve identifier base _ flag in the metadata information, and setting the nonexistent parameters as non-assigned values N _ A.

And secondly, acquiring 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.

The maximum luminance correction value max _ lum for the frame to be processed is updated.

And thirdly, updating the unassigned parameters in the base curve parameter Stone _ mapping to obtain Ptone _ mapping.

A. If the tone _ mapping _ mode is 0, calling the following basic curve parameters to obtain process updating parameters;

wherein the input is a maximum display brightness MaxDisplay (value of PQ field) of a display brightness range of the display apparatus, a minimum display brightness minidisplay (value of PQ field) of a display brightness range of the display apparatus, and a metadata signalInformation; the curve parameter P of the output-based curvetone_mappingAnd includes m _ p, m _ a, m _ m, m _ n, m _ b, K1, K2, K3.

1. Setting m _ m, m _ n, K1, K2 and K3 as preset values of 2.4, 1 and 1, respectively, and changing the curve into a curve after the preset parameters are set

2. M _ b is set to MinDisplay.

3. Calculating m _ p according to average _ maxrgb (avgl) in metadata information:

wherein the content of the first and second substances,PvalueH0、PvalueL0TPH0 and TPL0 are preset values with default values of 3.5, 4.0, 0.6, 0.3, respectively, and g0() is xNDefault is y ═ x.

4. Updating m _ p according to the maximum brightness correction value max _ lum:

wherein the content of the first and second substances,PdeltaH1,PdeltaL1TPH1 and TPL1 are preset values with defaults of 0.6, 0.0, 0.9, 0.75, respectively.

5. Obtaining H (L) according to m _ p, m _ m, m _ n, m _ b, K1, K2 and K3

Thereby obtaining

Wherein, 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.

B, otherwise, if the tone _ mapping _ mode is 1:

if the target system displays maximum brightness targeted _ system _ display _ maximum _ luminance equal to MaxDisplay, 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; otherwise, the basic curve parameters are adjusted by adopting any scheme from the first to the fourth embodiments.

It should be noted that, when entering the branch B, that is, otherwise, if the tone _ mapping _ mode is 1, the determining process "if the target system displays the maximum brightness targeted _ system _ display _ maximum _ luminance _ equal to MaxDisplay, set m _ p, m _ a, m _ m, m _ n, m _ B, K1, K2, and K3 to m _ p _0, m _ a _0, m _ m _0, m _ n _0, m _ B, K1_0, K2_0, and K3_ 0; "is an optional step, the adjustment of the basic curve parameters can be performed by directly adopting any scheme of the first to the fourth embodiments, and the output results are consistent. However, with this determination process, "if the target system displays the maximum brightness targeted _ system _ display _ maximum _ luminance equal to MaxDisplay, then 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; ", may simplify the complexity and computation time in an actual hardware implementation.

Illustratively, the implementation manner of the first embodiment may be as follows:

the input is the maximum display luminance MaxDisplay (value of PQ domain) of the display luminance range of the display device, the minimum display luminance minidisplay (value of PQ domain) of the display luminance range of the display device, the RGB gamut pixel buffer f [ Nframe ] of the frame to be processed][3]And 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 _ p _0, M _ a _0, M _ M _0, M _ n _0, M _ b _ MTPL)、base_paramDelta; the curve parameter P of the output-based curvetone_mappingAnd includes m _ p, m _ a, m _ m, m _ n, m _ b, K1, K2, K3.

1. M _ m, m _ n, K1, K2, and K3 are defined as m _ m _0, m _ n _0, K1_0, K2_0, and K3_ 0.

2. M _ b is set to MinDisplay.

3. Is provided with

4. Is provided withWhere N defaults to 1. If m _ p is greater than Tm _ p, set m _ p to Tm _ p, Tm _ p default to Tpa/m _ a, Tpa default to 3.2363.

5. Thereby obtaining:

6. substituting L equal to MaxSource into m _ a as follows:

illustratively, the implementation of the second embodiment may be as follows:

the input is the maximum display brightness MaxDisplay (the value of the PQ field) of the display brightness range of the display device, the minimum display brightness minidisplay (the value of the PQ field) of the display brightness range of the display device, average _ maxrgb in the metadata, the RGB gamut pixel buffer f [ Nframe ] of the frame to be processed][3]And 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 _ p _0, M _ M _0, M _ n _0, M _ a _0, M _ b _0, K _ M _ b _0, M _ MTPL) Base _ param _ Delta; the curve parameter P of the output-based curvetone_mappingAnd includes m _ p, m _ m, m _ n, m _ a, m _ b, K1, K2, K3.

1. Generating base curve parameters P1tone_mappingIncludes m _ p _1, m _ m _1,m_n_1、m_a_1、m_b_1、K1_1、K2_1、K3_1。

2. ComputingWhere N is a number greater than 0,1 is used by default, w is greater than or equal to 0 and less than or equal to 1.

3. M _ p, m _ m, m _ n, K1, K2, K3 are calculated according to the following formulas:

m_p=(1-w)×m_p_0+w×m_p_1,

m_m=(1-w)×m_m_0+w×m_m_1,

m_n=(1-w)×m_n_0+w×m_n_1,

K1=(1-w)×K1_0+w×K1_1,

K2=(1-w)×K2_0+w×K2_1,

K3=(1-w)×K3_0+w×K3_1

4. m _ b is set to MinDisplay.

5. Thereby obtaining:

6. substituting L equal to MaxSource into m _ a as follows:

based on the same inventive concept as the above method, the present application embodiment further provides a video processing apparatus, fig. 11 is a block diagram of a structure of a video processing apparatus 1100 for implementing the present application embodiment, and as shown in fig. 11, the video processing apparatus 1100 includes an obtaining module 1101 and a processing module 1102, where: an obtaining module 1101, configured to obtain a first mapping curve parameter set and a first target system display maximum luminance, where the first mapping curve parameter set corresponds to the first target system display maximum luminance, and the first mapping curve parameter set includes one or more parameters related to a mapping curve; acquiring a display brightness parameter set, wherein the display brightness parameter set comprises the maximum display brightness and/or the minimum display brightness of display equipment; acquiring an adjustment coefficient set, wherein the adjustment coefficient set comprises 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 1102, 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, where the second mapping curve parameter set includes one or more adjusted parameters.

In a possible implementation manner, the processing module 1102 is specifically configured to calculate an adjusted first parameter according to formula (1), where the first parameter is any one parameter in the first mapping curve parameter set:

Pa=Pb+k×PΔ (1)

wherein, PaRepresenting said adjusted first parameter, PbRepresents said first parameter, PΔRepresenting the adjustment coefficient corresponding to the first parameter,orWhen MaxDisplay > MTPLWhen a is 1, M is less than or equal to MaxDisplayTPLWhen a is-1, MaxDisplay indicates the maximum display luminance, MTPLIndicating that the first target system displays maximum brightness, N indicating an adjusted intensity control parameter, and M indicating a preset brightness value.

In a possible implementation manner, the obtaining module 1101 is further configured to obtain one or more of a storable maximum luminance, a storable minimum luminance, a storable average value, and a storable variation range, where the first parameter is any one of the parameters in the first mapping curve parameter set, and an intermediate value of a first parameter obtained according to one or more of the maximum display luminance, the minimum display luminance, the storable maximum luminance, the storable minimum luminance, the storable average value, and the storable variation range; the processing module 1102 is specifically configured to calculate the adjusted first parameter according to formula (2):

Pa=(1-w)×Pb+w×Pm (2)

wherein, PaRepresenting said adjusted first parameter, PbIs indicative of the first parameter or parameters of the device,orPΔRepresenting the adjustment coefficient corresponding to the first parameter, MaxDisplay representing the maximum display brightness, MTPLIndicating that the first target system displays maximum brightness, N indicating an adjusted intensity control parameter, M indicating a preset brightness value, PmRepresenting an intermediate value of the first parameter.

In a possible implementation manner, the processing module 1102 is further configured to obtain a first mapping curve according to the adjusted first parameter and other parameters except the first parameter in the first mapping curve parameter set, and if the brightness of a video obtained after performing tone mapping according to the first mapping curve is higher than the original brightness of the video, continue to adjust the first parameter; or analyzing the adjusted first parameter according to a preset rule, and if the adjusted first parameter meets the preset rule, continuing to adjust the first parameter.

In a possible implementation manner, the processing module 1102 is specifically configured to, when a scaling factor is included in the first mapping curve parameter set, calculate the adjusted scaling factor according to formula (3):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second set of mapping curve parameters, MaxSource representing the maximum luminance storable in memory for the video, f (MaxSource, P1)a,P2a,..) representing a function calculation related to a maximum luminance storable in memory for the video and one or more adjusted parameters of the second set of mapping curve parameters, MaxDisplay representing the maximum display luminance.

In a possible implementation manner, the processing module 1102 is specifically configured to, when a scaling factor is included in the first mapping curve parameter set, calculate the adjusted scaling factor according to formula (4):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,., MaxSource represents the maximum brightness of the video stored in the memory, MinSource represents the minimum brightness of the video stored in the memory, f (MaxSource, P1)a,P2a,..) representing a function calculation, f (MinSource, P1), related to the maximum luminance storable in memory of the video and one or more adjusted parameters of the second set of mapping curve parametersa,P2a,..) representing a function calculation related to a minimum brightness storable in memory for the video and one or more adjusted parameters of the second set of mapping curve parameters, MaxDisplay representing the maximum display brightness and minidisplay representing the minimum display brightness.

In a possible implementation manner, the processing module 1102 is specifically configured to, when a scaling factor is included in the first mapping curve parameter set, calculate the adjusted scaling factor according to formula (5):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,.. representing parameters in the second set of mapping curve parameters, MaxSource representing the maximum luminance storable in memory for the video, f (MaxSource, P1)a,P2a,..) representing a function calculation related to a maximum luminance storable in memory for the video and one or more adjusted parameters of the second set of mapping curve parameters, MaxDisplay representing the maximum display luminance and minidisplay representing the minimum display luminance.

In a possible implementation manner, the processing module 1102 is specifically configured to, when a scaling factor is included in the first mapping curve parameter set, calculate the adjusted scaling factor according to formula (6):

wherein r isaRepresenting said adjusted scaling factor, P1a,P2a,., MaxSource represents the maximum brightness of the video stored in the memory, MinSource represents the minimum brightness of the video stored in the memory, f (MaxSource, P1)a,P2a,..) representing a function calculation, f (MinSource, P1), related to the maximum luminance storable in memory of the video and one or more adjusted parameters of the second set of mapping curve parametersa,P2a,..) representing a function calculation related to a minimum brightness at which the video is storable in memory and one or more adjusted parameters of the second set of mapping curve parameters, MaxDisplay representing the maximum display brightness.

In a possible implementation manner, the obtaining module 1101 is specifically configured to obtain the first mapping curve parameter set and the first target system display maximum brightness from dynamic metadata of a video; 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 the set corresponding relation.

In a possible implementation manner, the obtaining module 1101 is specifically configured to obtain the set of adjustment coefficients from dynamic metadata of a video; or acquiring the adjusting coefficient set according to a preset value.

In a possible implementation manner, the obtaining module 1101 is specifically configured to directly read one or more adjustment coefficients; or, an adjustment mode is obtained, and the one or more adjustment coefficients corresponding to the adjustment mode are obtained.

In a possible implementation manner, the obtaining module 1101 is specifically configured to obtain the display brightness parameter set through device information; or, the display brightness parameter set is obtained through preset information.

In a possible implementation manner, the obtaining module 1101 is further configured to obtain a mapping curve according to the one or more adjusted parameters in the second mapping curve parameter set.

It should be further noted that, for the specific implementation process of the obtaining module 1101 and the processing module 1102, reference may be made to the detailed description of the embodiment in fig. 10, and for simplicity of the description, details are not repeated here.

Those of skill in the art will appreciate that the functions described in connection with the various illustrative logical blocks, modules, and algorithm steps described in the disclosure herein may be implemented as hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logical blocks, modules, and steps may be stored on or transmitted over as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium, which corresponds to a tangible medium, such as a data storage medium, or any communication medium including a medium that facilitates transfer of a computer program from one place to another (e.g., according to a communication protocol). In this manner, a computer-readable medium may generally correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium, such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code and/or data structures for implementing the techniques described herein. The computer program product may include a computer-readable medium.

By way of example, and not limitation, such computer-readable storage media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the 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 medium. It should be understood, however, that the computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but are instead directed to non-transitory tangible storage media. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

The 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 circuitry. Thus, the term "processor," as used herein may refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logical 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. Also, the techniques may be fully implemented in one or more circuits or logic elements.

The techniques of this application may be implemented in a wide 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 means for performing the disclosed techniques, but do not necessarily require realization by different hardware units. Indeed, as described above, the various units may be combined in a codec hardware unit, in conjunction with suitable software and/or firmware, or provided by an interoperating hardware unit (including one or more processors as described above).

In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

The above description is only an exemplary embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

44页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:像素点对选择方法、设备及计算机可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类