Content-optimized ambient light HDR video adaptation
The luminances of an image are not only optimized for a particular maximum displayable luminance of a display, but also for a particular amount of light in the viewing environment in which the display is watched. A method of processing an input image to obtain an output image includes receiving a reference luminance mapping function as metadata associated with an input image, calculating an adapted luminance mapping function on the reference luminance mapping function; calculating a control parameter that specifies how much the adapted luminance mapping function deviates from the reference luminance function and is based on a maximum luminance of a display and a black level of the display; and applying the adapted luminance mapping function to at least a portion of the input pixel luminances so as to obtain output luminances for at least a portion of pixels of the output image.
1 . A method of calculating an output image comprising:
receiving a reference luminance mapping function as metadata associated with an input image,
wherein the reference luminance mapping function specifies a relationship between luminances of the input image and luminances of a reference image,
wherein the input image has an input maximum luminance and the reference image has a reference maximum luminance,
wherein the input image has pixels,
wherein the pixels have input luminances,
wherein the input luminances fall within an input luminance dynamic range,
wherein input luminance dynamic range is bounded by the input maximum luminance;
calculating a locus of points so as to form an adapted luminance mapping function,
wherein each point on the locus is a point on a metric,
wherein the metric has a first endpoint and a second endpoint,
wherein the first endpoint is on the reference luminance mapping function,
wherein the second endpoint is on a diagonal,
wherein the locus of points depends on a control parameter;
calculating the control parameter, wherein the control parameter specifies how much the adapted luminance mapping function deviates from the reference luminance function;
wherein the control parameter is based on a maximum luminance of a display and a black level of the display,
wherein the maximum luminance of the display is provided with the output image,
wherein the calculating of the control parameter comprises:
applying an inverse of an electro-optical transfer function to the maximum luminance of the display to produce a first result;
subtracting the black level from the first result to produce a second result; and
applying the electro-optical transfer function to the second result; and
applying the adapted luminance mapping function to at least a portion of the input pixel luminances so as to obtain output luminances for at least a portion of pixels of the output image.
2 . The method as claimed in claim 1 , wherein the electro-optical transfer function is a Perceptual Quantizer function.
3 . The method as claimed in claim 1 ,
wherein the output luminances are represented as output lumas in a luma domain of a Perceptual Quantizer,
wherein the black level is added to the output lumas, to obtain adjusted output lumas.
4 . A device arranged to calculate an output image comprising:
an input circuit,
wherein the input circuit is arranged to receive a reference luminance mapping function as metadata associated with an input image;
wherein the reference luminance mapping function specifies a relationship between luminances of the input image and luminances of a reference image,
wherein the input image has an input maximum luminance and the reference image has a reference maximum luminance,
wherein the input image has pixels,
wherein the pixels have input luminances,
wherein the input luminances fall within an input luminance dynamic range,
wherein input luminance dynamic range is bounded by the input maximum luminance;
a color calculation circuit,
wherein the color calculation circuit comprises a luminance mapping function calculation circuit; and
an output circuit,
wherein the output circuit is arranged to output the output image,
wherein the output image is calculated by the color calculation circuit on the basis of the input image,
wherein the luminance mapping function calculation circuit is arranged to calculate a locus of points so as to form an adapted luminance mapping function,
wherein each point on the locus is a point on a metric,
wherein the metric has a first endpoint and a second endpoint,
wherein the first endpoint is on a reference luminance mapping function,
wherein the second endpoint is on a diagonal,
wherein the locus of points depends on a control parameter,
wherein the adapted luminance mapping function is applied to the input pixel luminances so as to obtain output luminances of the output image,
wherein luminance mapping function calculation circuit is arranged to receive a maximum luminance of a display and a black level of the display,
wherein the color calculation circuit is arranged to calculate the control parameter,
wherein the control parameter specifies how much the adapted luminance mapping function deviates from the reference luminance function,
wherein the control parameter is defined based on a maximum luminance of a display and a black level of the display,
wherein the calculating of the control parameter comprises:
applying an inverse of an electro-optical transfer function to the maximum luminance of the display to produce a first result;
subtracting the black level from the first result to produce a second result; and
applying the electro-optical transfer function to the second result.
5 . The device as claimed in claim 4 , wherein the electro-optical transfer function is a Perceptual Quantizer function.
6 . The device claim 4 , further comprising a display mapping circuit,
wherein the display mapping circuit is arranged to add the black level to lumas of the output luminances,
wherein the output luminances are represented as lumas in a luma domain of a Perceptual Quantizer.
7 . A computer program stored on a non-transitory medium, wherein the computer program when executed on a processor performs the method as claimed in claim 1 .