SDR to HDR
Glossary

What is a LUT in video?

A LUT, or lookup table, maps input colour values to output colour values. A 3D LUT samples the whole RGB cube at a fixed grid, commonly 33 points per axis, and interpolates between the samples. It applies a fixed colour transform without needing the software to implement that transform itself.

Last updated

1D versus 3D

A 1D LUT holds one curve per channel. It can change contrast and per-channel balance, and it cannot change the relationship between channels, so it cannot do hue shifts or gamut work.

A 3D LUT samples the whole cube. A 33-point cube holds 33³, or 35,937, entries, each a full RGB triple, with interpolation filling the space between. That is enough to express an arbitrary colour transform, which is why tone mapping and gamut mapping both need 3D.

Why the .cube format keeps turning up

Portability. A .cube file is plain text with a fixed layout, and essentially every colour-capable tool reads it, including ffmpeg through its lut3d filter, which is present in every build.

That last point is not academic. The obvious filters for HDR to SDR conversion, zscale and libplacebo, are frequently missing from packaged ffmpeg builds, and the colorspace filter refuses smpte2084 outright. A generated .cube applied through lut3d works everywhere, which makes it the most reliable route on a machine you do not control.

One detail matters when applying one to HDR footage: convert to gbrp10le before the LUT so the YUV to RGB step uses the tagged BT.2020 matrix rather than defaulting to BT.709.

The limit

A LUT is a fixed transform. It cannot adapt to the content, so it cannot do anything scene-dependent. For a single consistent conversion that is exactly what you want; for content that varies widely it is a compromise.

Questions people ask

Can a LUT turn SDR footage into HDR?

No, and this is worth being clear about. A LUT is a fixed colour transform: it can remap what is in the file and cannot invent range that was never recorded. Applying an "HDR LUT" to SDR footage produces a differently graded SDR picture, sometimes with HDR tags attached, which renders wrong.

Which LUT size should I use?

33 points per axis is the common default and enough for tone and gamut work. 65 is more precise and four times larger for a difference most content will not show. 17 is small enough that interpolation error becomes visible in smooth gradients.

Related: converting HDR to SDR uses this method in full.

Read next

All glossary terms