Luma Hdrv

Perceptual encoding of high dynamic range video.

More Details

Open source HDR video compression software

A perceptual approach for encoding of high dynamic range video.

The Luma HDRv codec uses a perceptually motivated method to store high dynamic range (HDR) video with a limited number of bits. The method, as originally described in the HDR Extension for MPEG-4, ensures that the quantized video stream will be visually indistinguishable from the input HDR. The stream is then compressed using Google's VP9 video codec, which provides a 12 bit encoding depth. This is more than enough to ensure that quantization errors are invisible.

Having an HDR video stream, distributed at a low bandwidth, with the same flexibility as standard encoding schemes, enables a range of possible new applications. HDR displays are becoming more and more available, and to be used they need a solution for broadcasting of HDR video in an efficient way. Also for standard displays, HDR video material increases the possibility to perform post-processing on location, where for example a TV could be tuned for optimal experience, e.g. in terms of the tone reproduction utilized.

The Luma HDRv project is released as open source, under the BSD license. It provides both libraries for including the HDR video encoding and decoding functionality into any project, as well as applications to perform encoding and decoding with a number of different settings, and for playback of encoded HDR video material:

HDRv codec library

The Luma HDRv library provides a C++ API for encoding and decoding of HDR video. The video compression is performed with Google's VP9 video codec. The encoded stream is stored using the Matroska (.mkv) containter format, for flexibility and compatibility.

HDRv coding applications

Included in the Luma HDRv project are command line applications to encode and decode HDR video sequences with a large number of different settings. The input and output HDR frames could be in OpenEXR, or be passed from the PFStools HDR image application package.

HDRv player

The Luma HDRv project also provides an HDR video player, which can load and playback the encoded HDR streams in real-time. The player interface has features for performing manipulations such as changing the exposure and applying tone-mapping algorithms.


An open source, perception-motivated HDR video format

Luma HDRv - coding of HDR video

Luma HDRv samples

HDR videos encoded with Luma HDRv.

The videos have been encoded at quantization scalings 2 (qs2) and 6 (qs6), providing different trade-offs between quality and size. These can be downloaded and played with the provided lumaplayer application. The original data is available as separate OpenEXR frames at the HDR repository provided by Jan Fröhlich et al., and may be used freely for research purposes:

Froehlich J., Grandinetti S., Eberhardt B., Walter S., Schilling A., Brendel H. (2014). Creating Cinematic Wide Gamut HDR-Video for the Evaluation of Tone Mapping Operators and HDR-Displays. In Proc. SPIE 9023, Digital Photography X, pp. 90230X–90230X–10.

Beerfest Lightshow 01

1920x1080 pixels, 94 frames

Small [qs6, 0.91 MB]

Large [qs2, 32 MB]

Beerfest Lightshow 02

1920x1080 pixels, 188 frames

Small [qs6, 4.9 MB]

Large [qs2, 58 MB]

Beerfest Lightshow 03

1920x1080 pixels, 90 frames

Small [qs6, 0.72 MB]

Large [qs2, 31 MB]

Beerfest Lightshow 04

1920x1080 pixels, 861 frames

Small [qs6, 45 MB]

Large [qs2, 327 MB]

Beerfest Lightshow 05

1920x1080 pixels, 96 frames

Small [qs6, 1.7 MB]

Large [qs2, 28 MB]

Beerfest Lightshow 06

1920x1080 pixels, 317 frames

Small [qs6, 8.7 MB]

Large [qs2, 79 MB]

Beerfest Lightshow 07

1920x1080 pixels, 192 frames

Small [qs6, 4.1 MB]

Large [qs2, 41 MB]

Bistro 01

1920x1080 pixels, 151 frames

Small [qs6, 2.6 MB]

Large [qs2, 62 MB]

Bistro 02

1920x1080 pixels, 630 frames

Small [qs6, 7.6 MB]

Large [qs2, 294 MB]

Bistro 03

1920x1080 pixels, 170 frames

Small [qs6, 3.3 MB]

Large [qs2, 42 MB]

Carousel Fireworks 01

1920x1080 pixels, 439 frames

Small [qs6, 23 MB]

Large [qs2, 226 MB]

Carousel Fireworks 02

1920x1080 pixels, 258 frames

Small [qs6, 16 MB]

Large [qs2, 109 MB]

Carousel Fireworks 03

1920x1080 pixels, 186 frames

Small [qs6, 19 MB]

Large [qs2, 119 MB]

Carousel Fireworks 04

1920x1080 pixels, 208 frames

Small [qs6, 22 MB]

Large [qs2, 110 MB]

Carousel Fireworks 05

1920x1080 pixels, 174 frames

Small [qs6, 22 MB]

Large [qs2, 114 MB]

Carousel Fireworks 06

1920x1080 pixels, 528 frames

Small [qs6, 143 MB]

Large [qs2, 501 MB]

Carousel Fireworks 07

1920x1080 pixels, 146 frames

Small [qs6, 7.0 MB]

Large [qs2, 73 MB]

Carousel Fireworks 08

1920x1080 pixels, 339 frames

Small [qs6, 22 MB]

Large [qs2, 136 MB]

Carousel Fireworks 09

1920x1080 pixels, 528 frames

Small [qs6, 30 MB]

Large [qs2, 251 MB]

Cars Closeshot

1920x1080 pixels, 414 frames

Small [qs6, 6.7 MB]

Large [qs2, 89 MB]

Cars Fullshot

1920x1080 pixels, 442 frames

Small [qs6, 11 MB]

Large [qs2, 148 MB]

Cars Longshot

1920x1080 pixels, 820 frames

Small [qs6, 7.1 MB]

Large [qs2, 153 MB]

Fireplace 01

1920x1080 pixels, 491 frames

Small [qs6, 43 MB]

Large [qs2, 268 MB]

Fireplace 02

1920x1080 pixels, 461 frames

Small [qs6, 154 MB]

Large [qs2, 465 MB]

Fishing Closeshot

1920x1080 pixels, 371 frames

Small [qs6, 16 MB]

Large [qs2, 96 MB]

Fishing Longshot

1920x1080 pixels, 834 frames

Small [qs6, 50 MB]

Large [qs2, 324 MB]

Hdr Testimage

1920x1080 pixels, 480 frames

Small [qs6, 39 MB]

Large [qs2, 292 MB]

Poker Fullshot

1920x1080 pixels, 600 frames

Small [qs6, 12 MB]

Large [qs2, 282 MB]

Poker Travelling Slowmotion

1920x1080 pixels, 1947 frames

Small [qs6, 54 MB]

Large [qs2, 879 MB]

Showgirl 01

1920x1080 pixels, 776 frames

Small [qs6, 21 MB]

Large [qs2, 298 MB]

Showgirl 02

1920x1080 pixels, 341 frames

Small [qs6, 45 MB]

Large [qs2, 196 MB]

Smith Hammering

1920x1080 pixels, 467 frames

Small [qs6, 95 MB]

Large [qs2, 405 MB]

Smith Welding

1920x1080 pixels, 1102 frames

Small [qs6, 196 MB]

Large [qs2, 893 MB]

Download Luma HDRv

Luma HDRv (currently beta) is an open source project hosted on GitHub, and it can be downloaded from its project page. The project page also provides information on how to setup, install and use the libraries and applications.

GitHub project


Frequently asked questions about Luma HDRv.

Luma is an open source implementation of lossy high dynamic range (HDR) video compression. HDR video can represent the full range of colors and brightness levels that can be found in the real-world, and is therefore a much more accurate representation of real-world scenes. HDR video is especially important for upcoming HDR displays, which can take advantage of the additional range of colors and brightness stored in HDR video files.

To learn more on HDR, you can check a free review article.

Luma is the name used for achromatic (black and white channel) pixel values used in video compression. For improved efficiency of video compression, red green and blue color channels are converted into one luma channel (black and white) and two color channels (red-green and blue-yellow). One of the main challenges of HDR video compression is the transformation from very a large range of physical luminance (contrast up to 100,000,000:1) into 12 bits or less (contrast 4096:1) that can be encoded in video, hence the name Luma for the codec.

The color and luminance encoding used in the Luma HDRv coded was derived from human visual performance data so that the color encoding is aligned with the sensitivity of the eye. In this way, the loss of information introduced by converting 32-bit floating point values of the original HDR frames into 12-bit luma and 8-bit chroma channels is not visible to the human eye.

The encoding and decoding command line tools support OpenEXR frames. However, almost any imaginable HDR formats is supported if the encoder is used in combination with pfstools. Check the manual page of lumaenc and lumadec for more details.

Yes and no. In order for perceptual encoding to function properly, the input frames must be scaled in physical units of cd/m^2. Most HDR frames are given in relative units, where a value of 1 is either the brightest or close to the brightest pixel value, much lower than the corresponding physical value. Such frames will be encoded with very poor quality as the codec will assume that those pixels are very dark (1 cd/m^2 is the luminance of relatively dark shadow), and the human eye will not be able to notice much difference for those dark pixels anyway.

Therefore, all input frames should be at least approximately scaled in order to make them closer to physical luminance values. This can be done either manually by passing the --pre-scaling parameter to lumaenc (a value between 1000 and 10000 should work well in most cases), or automatically using, for example, the display adaptive tone-mapping operator from pfstools:

pfsin relative_frame_%04d.exr | pfstmo_mantiuk08 -e 1 -d l=4000:b=0.01:a=0 | pfsdisplayfunction -d l=4000:b=0.01:a=0 -l | lumaenc --output video.mkv

The above command will tone-map the video for an HDR display with the peak luminance of 4000 cd/m^2 and black level of 0.01 cd/m^2. pfsdisplayfunction is used to convert values from luma to luminance.

The codec and its design is described in our recent paper, which was presented at ICIP 2016, and as a talk at Siggraph 2016:

Eilertsen G., Mantiuk R.K., and Unger J. (2016). A high dynamic range video codec optimized by large-scale testing. 2016 IEEE International Conference on Image Processing (ICIP).

Eilertsen G., Mantiuk R.K., and Unger J. (2016). Luma HDRv: an open source high dynamic range video codec optimized by large-scale testing. ACM SIGGRAPH 2016 Talks.

The luma encoding is based on the concept from the paper:

Mantiuk, R., Krawczyk, G., Myszkowski, K., and Seidel, H.-P. (2004). Perception-motivated high dynamic range video encoding. ACM Transactions on Graphics (Proc. of SIGGRAPH), 23(3), 733. doi:10.1145/1015706.1015794 (project page)

The default encoding function comes from the more recent paper:

Miller, S., Nezamabadi, M., and Daly, S. (2013). Perceptual Signal Coding for More Efficient Usage of Bit Codes. SMPTE Motion Imaging Journal, 122(4), 52–59. doi:10.5594/j18290

which was demonstrated to perform very well in terms of hiding quantization artifacts:

Boitard, R., Mantiuk, R. K., and Pouli, T. (2015). Evaluation of color encodings for high dynamic range pixels. In Human Vision and Electronic Imaging (p. 93941K). doi:10.1117/12.2077715

The color encoding is based on the idea from the paper:

Ward-Larson, G. (1998). LogLuv Encoding for Full-Gamut, High-Dynamic Range Images. Journal of Graphics Tools, 3(1), 15–31. doi:10.1080/10867651.1998.10487485

At the time of writing, we are not aware of any free HDR video codecs that are publicly available.

There exist commercial HDR video codecs, for example from the goHDR company. The code, however, is not freely available.

HDR video compression is actively discussed within standarization committees, such as MPEG. It may, however, take some time before HDR video format is standardized and software becomes easily available. This project is meant to provide a viable solution to efficient HDR video encoding before HDR video becomes standardized and widely adopted.

Certainly yes. The BSD software license was selected to simplify the integration of the encoding/decoding library with both Open Source and commercial software. However, as this is the first release of the project and the library interface may still be altered, we recommend that you contact us before you put effort into integration with the library.

The codec uses Google's VP9 codec as the base encoder, and Matroska for packaging the encoded video and metadata into .mkv files. If any of those three libraries is missing on the system, the build script will compile a static version of the library, which is bundled with the code.

We performed an extensive evaluation of the codec using HDR-VDP-2.2. The evaluation is reported in detail in our recent paper, which is to be presented at ICIP 2016 in September, and as a talk at Siggraph 2016 in July:

Eilertsen G., Mantiuk R.K., and Unger J. (2016). A high dynamic range video codec optimized by large-scale testing. 2016 IEEE International Conference on Image Processing (ICIP).

Eilertsen G., Mantiuk R.K., and Unger J. (2016). Luma HDRv: an open source high dynamic range video codec optimized by large-scale testing. ACM SIGGRAPH 2016 Talks.

The evaluation enabled us to optimize different aspects of the coded and choose the best encoding options for HDR video. As compared to the legacy code of the MPEG-4 HDR video codec (proprietary), Luma offers a substantial improvement in compression efficiency.

Gabriel Eilertsen - Ph.D. candidate at the Visual Computing Laboratory, Linköping University (Sweden) and main author of the codec.

Jonas Unger - Assistant professor at Linköping University, has been active in the fields of HDR-video capture and tone mapping for over a decade.

Rafal K. Mantiuk - Senior Lecturer at the University Cambridge (UK), the (co-)author of the first HDR video codec, the backward-compatible HDR video compression, pfstools and the HDR-VDP.


Luma HDRv contact details.

Questions and answers forum

Questions, comments and bug reports are most welcome at the Luma HDRV google group

Visual Computing Laboratory

For direct contact, contact information for Gabriel Eilertsen can be found at the Visual Computing Laboratory (VCL)

Back to top