[Galaxy S II Android Development] Crescendo Xenomorph:
@Dori: Please check this out, seems that AndreiLux completed it already... Is it applicable in your kernel?

Revamped and hopefully final version of mDNIe controls:

The controls work now on two levels: First we have a master sequence that overrides any and all of Samsung's settings; The master sequence is calibrated to sRGB norms on a precision level equalling and even surpassing the iPad3/4 with help of professional equipment (Spectrophotometer) and professional hands. All credit goes to Slimer777 for his incredible job in doing this.

Calibration data:

Simple report: Download

Detailed calibration report: Download

Advanced colour management report: Download

(Please note that the "before" values represent the raw screen output without use of mDNIe, these values don't represent any of the live profiles)

The master sequence works as as the calibrated base; for people not wanting to bother further with any more controls, you simply enable this and you're done. Please keep in mind that every screen is slightly different and variations in manufacturing affect image output; this works as a base calibrated as close as possible to sRGB / Rec. 709 specifications.

Second part is the register hook, it catches effect values and modifies them by applying delta values available as controls in STweaks and in /sys/class/misc/mdnie/hook_control/.

Leaving both these options will give you Samsung's default values, plus the black crush fix.

The register hook, while used on Samsung's profiles, is not capable to alter effects which are not integrated in that screen profile's value sequence, the "Movie" profile for example lacks some effects present in the "Dynamic" profile. The same is valid when having different scenarios, the "Camera" scenario will use different effects in its base than the "UI" scenario. To fully explore all possible effects, use the Master profile as it integrates all effect values known.

Each control has a master kill-switch which enables or disables the effect. This varies by profile and scenario, so you have control to only "toggle" the switch, whatever its state may be in.

Digital noise reduction - Reduces and flattens out grain. Advanced controls are found in the hook_control folder with the dnr_ prefix.

High dynamic range - A HDR effect which brings out details in dark and extremely bright scenes.

Digital edge enhancement - An edge enhancement effect. What we previously called "sharpening". Divided in controls for radius, amount and threshold. Read the Wikipedia page for more information. More advanced controls found in the sysfs under the de_ prefix.

For the above three effects, scenario consideration is taken into account. You can enable/disable them depending when you want it to be applied. Please be aware only the stock applications trigger the scenarios. I will try to enable at least the video scenario depending on when the hardware decoder is active in the future so that they are enabled also in third-party video players.

Chroma saturation control - Same as in previous version but with fixed labels.

Colour temperature control - By default this is disabled on all profiles, however, if your screen has a tint to it, this is the first control you should try to fix as it alters temperature on all channels.

The SCR controls are colour channel filters working on the Red, Green, Blue, Yellow, Cyan, Magenta, White, and Black channels.

Imagine the controls as manipulating the corners of the RGB cube:

(Credit to Wikipedia for the graphic)

By controlling the RGB coordinates of each corner/channel we can mould the cube into a different shape. At the same time the cube is projected onto a hexagon; the perimeter / angle of the hexagon represents the colour hue, the radius of the hexagon from the middle represents chroma. We can use the chroma saturation controls to "push in" each corner of the cube, while moulding the corner's directions with the RGB controls. The RGB coordinates can be transformed into the HSL space space if needed, however I didn't include this function yet as I don't feel the need for it.

STweaks has controls for the RGBYCMW channels, the K (Black) channel I left out because it makes no sense in altering it, but can be found in the sysfs folder.

Several controls have a "factory setting" switch, this are the burned in-hardware values for some controls, they overwrite the controls themselves.

Additionally to the controls exposed to STweaks, there are several other effects and modifiers exposed in the sysfs interfaces. This also includes the gamma curve controls for levels 0-255 in steps of 16.

There are also some additional unidentified configurables which I wasn't able to properly give a name to or had no effects: Dithering, ABC (Seems to give a gamma brightness boost), SCC, UC, and MCM (Colour temperature) configurables whose exact effect isn't documented.