LV colorimetry

Started by markanini, September 24, 2016, 05:13:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

markanini

On my 600D H264 uses BT.601 color matrix. Jpegs use sRGB (BT.709 equivalent). Does anyone know if LV in shoot mode uses a consistent sRGB/BT.709 colorimetry?
Gear: Canon 600D & Magic Lantern Nightly.

a1ex

Hm, so far only 5D3 and 6D are configured to use BT.709 in ML, and all others assume BT.601. I bet more recent cameras may use BT.709, although nobody checked it, to my knowledge.

This affects RGB overlays and some previews (e.g. screenshots), and it's probably not obvious to the average user.

You can find out by dumping the YUV image buffers from the Debug menu (422 format) and trying to interpret them as either 709 or 601 - the right matrix should probably match Canon's JPEG or H.264. There are converters for the 422 format around.

markanini

I placed red objects on a table and dumped the image buffers and converted with 422ToImage v1.9.2. Then loaded the jpeg into avisynth:
Y = JpegSource(source, rec=0, channel=0)
U = JpegSource(source, rec=0, channel=1).Spline36Resize(Y.width(), Y.height())
V = JpegSource(source, rec=0, channel=2).Spline36Resize(Y.width(), Y.height())
YToUV(U,V,Y)
ConvertToRGB32(matrix = "PC.601")


and compared to the last line replaced with

ConvertToRGB32(matrix = "PC.709")

The first one looked more correct. The second had red shift to yellow, which would be expected from a BT.601 image interpreted as BT.709.

The conslusion I can draw from this: 600D assumes a BT.601 output device. This may also explain why I was adding too much magenta when monitoring on my phone display which is calibrated to sRGB (which shares primaries with BT.709). In case color remapping cant be done effectively in camera I have raised the issue with Chainfire, developer of DSLR Controller: http://forum.xda-developers.com/showpost.php?p=68892617&postcount=3787
Gear: Canon 600D & Magic Lantern Nightly.

a1ex

Nice find.

Would be nice to run the same test on all other cameras (so ML should know what color matrix to use). Volunteers?

markanini

Quote from: a1ex on September 29, 2016, 10:33:13 PM
Nice find.

Would be nice to run the same test on all other cameras (so ML should know what color matrix to use). Volunteers?

What can ML do with matrix data at this point?
Gear: Canon 600D & Magic Lantern Nightly.

a1ex

Exactly what I've mentioned in first post (nothing realtime).

markanini

A custom picture style could be used for realtime. With REC PicStyle enabled you can simulate  BT.709 while setting up a shoot. Or if you skip REC PicStyle it actually becomes BT.709 conversion, just edit the file headers afterwords, you lose some color range though. Lately I'm checking the picture style hacking thread daily :)
Gear: Canon 600D & Magic Lantern Nightly.

markanini

It seems DSLR Controller dev is working on implementing color conversions for LV mirroring: http://forum.xda-developers.com/showpost.php?p=69952745&postcount=3854
Gear: Canon 600D & Magic Lantern Nightly.