What does "full luma" exactly do?

When right-clicking a clip, selecting "clip properties", you have under the "Advanced" tab the option "full luma (range)".
What does this exactly do?
Does it automatically stretch/shift/increase luma values in case of color casts or underexposure (automatic histogram optimizing)? Does it a general optimizing on all luma ranges or is it intelligant enough to detect which luma value should be adjusted: one of RGB or "general" white?

Or am I way off in my assumptions?

EDIT: for some videoclips I see, whit the histogram widget open, a shift to the max 255 value. For other clips nothing (seems to) happen, maybe because I already optimized the image myself?

The full luma option refers to video sources with luma recorded outside of the typical 'broadcast', 'restricted' 16 - 235 8bit range.

Dan kindly added the option for full luma a few years ago following some observations I made about problems round tripping video files with luma outside of the 16 - 235 8bit range. By default when we import a video it is handled and and displayed based on the 16 - 235 range, levels below ie: 0 to 15 and those above 235 to 255 are compressed to 0 and 255, so shadows get overly dark and highlights saturated, in the preview within kdenlive for camera sources that are full range.

Then when we render out, those levels remain in the final video, compressed shadows and saturated highlights, so there is a mismatch between the levels in the video we import compared to that exported. This only really matters for round tripping to an external application.

For any playback on DVD's, bluray and including the web like Vimeo or Youtube our video levels in the final rendered output should be in the 16 - 235 range, otherwise we see so called 'gamma shifts', 'washed out' or saturated playback depending on playback handling.

However really we want to have control of the levels adjustment in kdenlive ie: 0 - 255 into 16 - 235 so full luma option changes the handling of the files and preview / scopes are based on an alternative YCbCr to RGB calculation.

By setting the full luma on, which should only be done for camera sources known to be full range 0 - 255 or even 16 - 255 such as FS100, Nex5, HV20, HV30 and probably many more consumer cameras. Canon and Nikon DSLR's too but a little more complicated, we can export video with the levels as imported, BUT and it's a big but, that is without doing any RGB operations in kdenlive, so no effects, color correction etc. If any effects are added then the output will be restricted range again.

For me I use full luma all the time, it allows roundtripping a video edit and mainatining levels for grading in an external application that offers 32bit float precision. When it's necessary to otherwise happy with kdenlive's SOP/SAT and scopes.

This explains the full range luma bit within kdenlive:



So my assumption was wrong but I learned something new. :)