A transfer function is the formula that translates between the brightness of light in the real world and the numbers stored in a video file. Without it, the code value "120" in a pixel would be meaningless — the player wouldn't know how bright to make it on screen. With it, every step of the pipeline (camera, encoder, file, player, display) agrees on exactly what brightness "120" means.
This translation is never linear, and that's the whole point. Human vision is wildly more sensitive to subtle changes in dark areas than in bright ones — you can pick out a small shadow on a wall, but a small change in the brightness of the sun looks the same to you. A good transfer function exploits this by allocating most of its code values to the dark range where the eye notices, and fewer to the bright range where it doesn't. That's how 256 brightness levels (8-bit) can still look smooth on a sunlit scene.
Three transfer functions matter in practice: gamma (the old SDR standard, on every HD TV since the 1990s), PQ (the absolute-brightness curve used by HDR10, HDR10+ and Dolby Vision), and HLG (a hybrid curve designed for live HDR broadcast that's also backward-compatible with SDR TVs). Choosing the right one isn't a creative decision — it's dictated by what kind of content you're producing and where it will be viewed.

