To enable better quality decoding of HDR images which are communicated as corresponding LDR images plus luma mapping functions, applicant teaches an
encoder for encoding a
high dynamic range image (Im_HDR_PSEU), which
high dynamic range image is represented firstly by a matrix of pixel colors (Y_SDR, Cb_SDR, Cr_SDR) of an image of lower
dynamic range (Im_SDR) than the
high dynamic range image, which image of lower
dynamic range gets compressed for communication as a compressed lower
dynamic range image (Im_C), and also represented secondly by
metadata (SEI) of the image which comprises a luma mapping function for calculating high dynamic range pixel lumas (Y_HDR) of the high dynamic range image by applying the function to pixel lumas of the image of lower dynamic range, wherein the
encoder comprises an input (997) for receiving the luma mapping function (LMF) from an
inverse tone mapping system (200), which is arranged to derive said luma mapping function based on analyzed properties of a master
low dynamic range image (Im_LDR_mastr) for constructing the corresponding high dynamic range image (Im_HDR_PSEU), characterized in that the
encoder comprises a mapping splitting unit (901) arranged to transform the luma mapping function into a stretched luma mapping function (LMF_HS) which has a shape which maps a maximum normalized input to a maximum normalized output, and arranged to determine a scaling value (SCAL), the encoder having a formatter (104) arranged to output this stretched luma mapping function (LMF_HS) and this scaling value (SCAL) as
metadata of the image of lower dynamic range (Im_SDR) which is also output.