1. A method to encode a high dynamic range (HDR) image with a processor, the method comprising: computing a histogram of logarithmic (log) luminance pixel values in the HDR image; generating a tone mapped curve based on the histogram; computing a log global tone-mapped luminance image based on the log luminance pixel values in the HDR image and the tone mapped curve; computing a downscaled log global tone-mapped luminance image based on the log global tone-mapped luminance image; computing a log ratio image based on the log luminance pixel values in the HDR image and the log global tone-mapped luminance image; performing multi-scale resolution filtering to the log ratio image to generate a log multi-scale ratio image; generating a second log tone-mapped image based on the log multi-scale ratio image and the log luminance pixel values in the HDR image; normalizing the second log tone-mapped image to generate an output tone-mapped image based on the downscaled log global tone-mapped luminance image and the second log tone-mapped image; generating a second ratio image based on the input HDR image and the output tone-mapped image; and quantizing the second ratio image to generate a quantized second ratio image.