AVS Forum banner
  • Get an exclusive sneak peek into our new project. >>> Click Here
  • Our native mobile app has a new name: Fora Communities. Learn more.

Hidden calibration functionality in LG OLEDs

2767 Views 10 Replies 7 Participants Last post by  dogelition
DISCLAIMER: Don't try to actually use any of these functions on your tv unless you really really know what you're doing!

Hi,
Poking around in the internals of the LG C8 firmware, I noticed a few interesting things.

First of all, the list of supported Calman calibration commands (mostly already known, e.g. bendavid/aiopylgtv )

CAL_START
CAL_END
BRIGHTNESS_UI_DATA
CONTRAST_UI_DATA
BACKLIGHT_UI_DATA
COLOR_UI_DATA
HDR_3BY3_GAMUT_DATA
BT709_3D_LUT_DATA
BT2020_3D_LUT_DATA
1D_2_2_EN
3BY3_GAMUT_EN
BT709_3BY3_GAMUT_DATA
BT2020_3BY3_GAMUT_DATA
1D_0_45_EN
1D_DPG_EN
1D_DPG_DATA
DOLBY_CFG_DATA

Second, there is a list of supported "get" commands
GET_HDR_3BY3_GAMUT_DATA
GET_3D_LUT_DATA
GET_3BY3_GAMUT_DATA
GET_1D_DPG_DATA
GET_1D_2_2_EN
GET_1D_0_45_EN

This means it is actually possible to read FROM the tv the factory LUTs, or the LUTs which have been uploaded by e.g. some closed source commercial software which doesn't otherwise expose it.

Now what's even more interesting, there is a SECOND set of calibration commands, which are accessible by calling START_CAL with programID: 0 instead of the default 1
(for START_CAL this also has an interesting side effect of leaving tonemapping enabled in HDR modes)

This set of commands is labeled

CAL_START
CAL_END
BRIGHTNESS_UI_DATA
CONTRAST_UI_DATA
BACKLIGHT_UI_DATA
COLOR_UI_DATA
INPUT_CSC_DATA
1D_EOTF_DATA
HDR_3BY3_GAMUT_DATA
1D_OETF_DATA
1D_TONEMAP_DATA
BT709_3D_LUT_DATA
BT2020_3D_LUT_DATA
1D_LUT_0_45_EN
HUE_CORRECTION_DATA
1D_2_2_EN
BT709_3BY3_GAMUT_DATA
BT2020_3BY3_GAMUT_DATA
1D_0_45_EN
1D_DPG_DATA
1D_LUT_RGBW_EN
1D_LUT_RGBW_DATA
DOLBY_CFG_DATA

The two command tables are labeled "calman" and "svl" in the firmware.

I haven't been able to work out exactly what format or length of arrays the additional commands expect, or what they do yet, but I'll bet that if I knew what "svl" referred to it would be much easier to work it out. Any hints?
See less See more
  • Like
Reactions: 2
1 - 11 of 11 Posts
Snooping around in the Service Menu is highly discouraged because that can be a quick way to brick your tv or seriously mess it up. It also voids your warranty if you break something. The commands can vary a bit from build date, firmware version, etc so what works on one may not work correctly on another. The internal calibration commands are different from the external (user accessible) calibration settings that one normally uses to calibrate the panel. Good luck and be careful.
To be clear, these are the calibration commands which are accessible via the websockets api (e.g. what Calman uses to upload 1d or 3d luts to the tv, set tonemapping parameters for 2019 and later, upload Dolby vision config, etc)
To be clear, these are the calibration commands which are accessible via the websockets api (e.g. what Calman uses to upload 1d or 3d luts to the tv, set tonemapping parameters for 2019 and later, upload Dolby vision config, etc)
In other words, those are the external calibration commands. :)
  • Like
Reactions: 1
DISCLAIMER: Don't try to actually use any of these functions on your tv unless you really really know what you're doing!

Hi,
Poking around in the internals of the LG C8 firmware, I noticed a few interesting things.

First of all, the list of supported Calman calibration commands (mostly already known, e.g. bendavid/aiopylgtv )

CAL_START
CAL_END
BRIGHTNESS_UI_DATA
CONTRAST_UI_DATA
BACKLIGHT_UI_DATA
COLOR_UI_DATA
HDR_3BY3_GAMUT_DATA
BT709_3D_LUT_DATA
BT2020_3D_LUT_DATA
1D_2_2_EN
3BY3_GAMUT_EN
BT709_3BY3_GAMUT_DATA
BT2020_3BY3_GAMUT_DATA
1D_0_45_EN
1D_DPG_EN
1D_DPG_DATA
DOLBY_CFG_DATA

Second, there is a list of supported "get" commands
GET_HDR_3BY3_GAMUT_DATA
GET_3D_LUT_DATA
GET_3BY3_GAMUT_DATA
GET_1D_DPG_DATA
GET_1D_2_2_EN
GET_1D_0_45_EN

This means it is actually possible to read FROM the tv the factory LUTs, or the LUTs which have been uploaded by e.g. some closed source commercial software which doesn't otherwise expose it.

Now what's even more interesting, there is a SECOND set of calibration commands, which are accessible by calling START_CAL with programID: 0 instead of the default 1
(for START_CAL this also has an interesting side effect of leaving tonemapping enabled in HDR modes)

This set of commands is labeled

CAL_START
CAL_END
BRIGHTNESS_UI_DATA
CONTRAST_UI_DATA
BACKLIGHT_UI_DATA
COLOR_UI_DATA
INPUT_CSC_DATA
1D_EOTF_DATA
HDR_3BY3_GAMUT_DATA
1D_OETF_DATA
1D_TONEMAP_DATA
BT709_3D_LUT_DATA
BT2020_3D_LUT_DATA
1D_LUT_0_45_EN
HUE_CORRECTION_DATA
1D_2_2_EN
BT709_3BY3_GAMUT_DATA
BT2020_3BY3_GAMUT_DATA
1D_0_45_EN
1D_DPG_DATA
1D_LUT_RGBW_EN
1D_LUT_RGBW_DATA
DOLBY_CFG_DATA

The two command tables are labeled "calman" and "svl" in the firmware.

I haven't been able to work out exactly what format or length of arrays the additional commands expect, or what they do yet, but I'll bet that if I knew what "svl" referred to it would be much easier to work it out. Any hints?
What happens if you factory reset (in-stop) one of these sets? I presume the user calibration data (such as uploaded by Calman) will be lost. Maybe "svl" refers to the factory calibration data/luts that survive a reset?
I've never done an in-stop reset on one of these. The regular factory reset from the standard settings menu resets any user calibration data as uploaded by Calman, Device Control, or aiopylgtv.
If you can figure out how to extract the factory LUTs from the TV and then reupload them that would be very useful, as currently the only way to restore the default LUTs on the C8 is to do a complete factory reset.
  • Like
Reactions: 1
Yes I know how to restore the factory luts, but this won't restore the TV to factory state, because the gamma/white balance/color gamut settings will still be locked, and the dithering behaviour (and gamma) will still be different if a 1d lut was uploaded.

I'm investigating further whether/how the internal flags which keep track of this can also be manipulated.
  • Like
Reactions: 1
This is already being done through Device Control.

The functionality being accessed through DeviceControl is the same functionality accessed by Calman and/or aiopylgtv currently, ie the "Calman" calibration commands in the first post. What I am referring to is the second set of commands, labelled "SVL" in the firmware, including e.g. OETF, EOTF, RGBW, etc. As far as I know there is no publicly available software which can make use of this functionality (nor do we even know exactly what all of it does).
"Silicon Valley Lab (SVL) is LG Electronics’ (LG) Silicon Valley-based research and development lab." (from here)

Those commands are probably only intended for internal use then.
  • Like
Reactions: 1
1 - 11 of 11 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top