A Hald CLUT is an image that has a specific color pattern on it. In this pattern all colors in the color space are represented. An application that uses the HALD CLUT image to color correct an image, takes a source image color and looks it up in the color pattern of the HALD CLUT, and the color it finds in that place is the corrected color that should replace the source color in the destination image. If the color doesn't exist in the CLUT, one can look up several colors and interpolate between them.
====
Hm ...=====Tone Map Metadata (3D Look-Up-Table) Injector
A tool for manipulating production metadata, specifically tone map metadata (3D LUT), in MP4 and MOV files. It can be used to inject 3D LUT metadata into a file or validate metadata in an existing file.
Usage
Python 3.11 must be used to run the tool. >From within the directory above
lut3d_utils:Help
python lut3d_utils -hPrints help and usage information.
Inject
python lut3d_utils -inject_lut3d -i ${input_file} -o ${output_file} -l ${lut3d_file} -p COLOUR_PRIMARIES_BT709 -t COLOUR_TRANSFER_CHARACTERISTICS_GAMMA22Loads a tone mapping (3D LUT) metadata from
lut3d_fileand inject it toinput_file(.mov or .mp4). The specifiedoutput_colour_primariesandoutput_colour_transfer_characteristicsare injected too. It saves the result tooutput_file.
input_fileandoutput_filemust not be the same file.Examine
python lut3d_utils -retrieve_lut3d -i ${input} -l ${lut3d_file}Checks if
input_filecontains 3D LUT metadata. If so, parses the metadata and prints it out. In addition, it saves the 3D LUT entries tolut3d_fileas a ".cube" file.=====
soooooo .... in theory you can use those for injecting and exporting those 3d luts in mp4/mov ..
I wonder if ffmpeg/libavformat can be teached to do this, too?