mdnie files - Samsung Epic 4G Touch
I spent some time last night and today trying to figure out how the /sys/etc/mdnie* files work. Most of my work was on the mdnie_tune_*_mode where * is movie, dynamic and standard. These, of course, correspond to the three modes in Settings | Display | Screen mode. The data below is from stock EL29. I don't know if other versions are the same (are they?).
What I wanted to do was to make a good red night mode. One can use ChainFire3D, but that works by just dropping the green and blue components, while what you really want to do is to convert rgb to luminance, and then use luminance to set the reg. This way, green and blue areas don't just go black, and things are much more legible.
Anyway, here are my partial findings (I am not the first to find them, since I came across an app to adjust the settings, but I couldn't find much of a write-up of how these things work--if you know a writeup, please tell me).
I suggest backing up all your /system/etc/mdnie* files before beginning.
To make the mdnie_tune_standard_mode and mdnie_tune_dynamic_mode files take effect, the corresponding mdnie_tune_ui_*_mode file must have the line 0x0001,0x0040 changed to read:
Code:
0x0001,0x0040,
The movie file already has that.
Then colors can be adjusted by editing the corresponding mdnie_tune_*_mode file. For the changes to take effect, just go to the settings and change profile to something else and back, or in a root shell do:
Code:
cat /sys/devices/virtual/mdnieset_ui/switch_mdnieset_ui/mdnieset_user_select_file_cmd > /sys/devices/virtual/mdnieset_ui/switch_mdnieset_ui/mdnieset_user_select_file_cmd
To edit colors, edit the second column of hex numbers in the mdnie_tune_*_mode file, in the lines numbered 0x00c8-0x00d3 (this is from the default mdnie_tune_standard_mode file):
Code:
0x00c8,0x0000, //kb R SCR
0x00c9,0x0000, //gc R
0x00ca,0xffff, //rm R
0x00cb,0xffff, //yw R
0x00cc,0x0000, //kb G
0x00cd,0xffff, //gc G
0x00ce,0x0000, //rm G
0x00cf,0xffff, //yw G
0x00d0,0x00ff, //kb B
0x00d1,0x00ff, //gc B
0x00d2,0x00ff, //rm B
0x00d3,0x00ff, //yw B
The first number is a register number and the second is a register value. To understand these, note that the first four lines, marked with an "R", control how screen colors map to the red subpixels on the screen; the next four, marked with a "G", control how screen colors map to the green subpixels; the last four, marked with a "B", control how screen colors map to the blue subpixels.
Each line controls the output of two colors, using these codes: k = black (#000000), b = blue (#0000ff), g = green (#00ff00), c = cyan (#00ffff), r = red (#ff0000), m = magenta (#ff00ff), y = yellow (#ffff00), w = white (#ffffff).
E.g., the line
Code:
0x00d2,0x00ff, //rm B
means that red gets a 0x00 Blue subpixel, and magenta gets a a 0xFF Blue subpixel.
For instance, a good way to turn the display black and white is:
Code:
0x00c8,0x001D, //kb R SCR
0x00c9,0x96B3, //gc R
0x00ca,0x4C69, //rm R
0x00cb,0xe2ff, //yw R
0x00cc,0x001d, //kb G
0x00cd,0x96b3, //gc G
0x00ce,0x4c69, //rm G
0x00cf,0xe2ff, //yw G
0x00d0,0x001d, //kb B
0x00d1,0x96b3, //gc B
0x00d2,0x4c69, //rm B
0x00d3,0xe2ff, //yw B
This, e.g., sends red to 4c4c4c, green to 969696, blue to 1d1d1d, black to 000000, and white to ffffff, using the formula: luminance = .2989 R + .5870 G + .114 B
For a good red screen mode, one can use the same values, but set the G and B lines all to zero:
Code:
0x00c8,0x001D, //kb R SCR
0x00c9,0x96B3, //gc R
0x00ca,0x4C69, //rm R
0x00cb,0xe2ff, //yw R
0x00cc,0x0000, //kb G
0x00cd,0x0000, //gc G
0x00ce,0x0000, //rm G
0x00cf,0x0000, //yw G
0x00d0,0x0000, //kb B
0x00d1,0x0000, //gc B
0x00d2,0x0000, //rm B
0x00d3,0x0000, //yw B
I wonder if it works exactly the same way on other Samsung mDNIe devices, like the Note, etc.
do you have work wit galaxy Note II
becauce sharpness is to weak
any ideas to edit this values to make more sharpness our screen
Related
[APP/EXPERIMENT] Yellow tint test
Ok so I just wanted some1 to test something for me. I want to know if the yellow tint can be cancelled with a gradient overlay. So done an little app to test this. Need some1 who has this yellow tint really bad and can see it very easily. Again this is just a test and may amount to nothing, I need volunteers as I don't have this defect enough to see it accurately at 20% brightness. The app is safe as there is no burn in mode yet. Just the ability to custom create a 3 point gradient from left to right with variable pixel widths for each segment. So if anyone can test that has this really bad, that would be great. IMPORTANT: This little app has no burn in method yet so completely safe. THIS IS NOT A THREAD TO ***** OR COMPLAIN AT SAMSUNG!!! All I want to know is does this cancelling gradient help. Start, Mid, End buttons set the settings panel to control the points (LEFT to RIGHT) P = position R = red G = green B = blue A = alpha So if you have a yellow tint, then you want to start with blue and alpha etc! Updated the app to default all 3 points to 119,119,119 a 255 so the starting points are the same col as the bg UPDATED
Not ment to be that user friendly at the moment If it does actually do something, then I will probably have nice sliders and ability to save setting etc. Just cant be arsed doing that if it's a none starter. Sent from my GT-I9100 using XDA Premium App
Mine has the yellow tint on the left side but I'm having trouble figuring out how to use this app. It does seem to be changing gradients.
I should have made the gradients to default to gray, will alter and put new version up later today, may do a little vid on how to use also Sent from my GT-I9100 using XDA Premium App
updated and put in 2 lines to make it easier to show you where to look
Cool app. Seems to help if you tweak it right. What exactly does the "BURN" button do?
dinan said: Cool app. Seems to help if you tweak it right. What exactly does the "BURN" button do? Click to expand... Click to collapse Well, if some1 can manage to do an inverse gradient to their yellow tint, then I would enable saving in the app, and enable burn-in, that does just that, full brightness pixel values for extended periods of time to tint the display inversely to the yellow tint, thus attempting to lessen the effect. Ideally I want some1 with a bad example tint who also has no way to return their phone to try it
Night Mode Widget (Beta)
Hi. I am a big fan of Chainfire3D night mode. But it doesn't works with JB. So i write a simple widget to change the color multipliers from main screen. It works with franco.kernel. It requires root access. When toggled night mode: Red: 200 Green: 0 Blue: 0 Day mode Red : 182 Green: 192 Blue: 200 It doesn't store previous color values. But it will as soon as possible. You can try it. It only runs echo \"red green blue\" > /sys/class/misc/colorcontrol/multiplier command. It will be available in a few hours in google play. Search for Night Mode Widget (Beta). play.google.com/store/apps/details?id=com.hankarun.nightmodewidget
Didn't work for me on CM10, Galaxy Nexus. I think the correct controls for the CM kernel are listed here: rootzwiki.com/topic/32160-cm10-color-multipliers Is this open source? I'd be happy to hack on it and test.
Share your KCAL Colour Settings
Hi All! Kindly share your KCAL settings here Like this: Kernel - my kernel - IceMan ( not for public ) OS - LineageOS build myself My settings: Red 216 Green 222 Blue 256 Saturation 65 Value 129 Contrast 129 Hue 0 Thank you!
250 240 255 40 132 (140) 132 (140) 10
Red 235 Green 248 Blue 256 Saturation 52 Value 132 Contrast 138 Hue 0 Tianma Panel
Excellent idea to open a thread like this. If anyone has a Kcal profile which makes blacks blacker, whites whiter and colors more vivid, please share your profile. :3. I'm on an LOS based rom by the way.
What app are you using to control the KCal?
techlogik said: What app are you using to control the KCal? Click to expand... Click to collapse Elementalx app its fine, but also required custom kernel for kcal.
240,240,256,50,130,132,0 Whiter screens Sent from my HTC 10 using XDA-Developers Legacy app
Hmm, I think I found a profile which I like. I used the DarkDroid profile as the base and changed one value.I only changed saturation. Red: 250 Blue: 250 Green: 256 Saturation: Default is 45 but I changed it to 65 Value: 120 Contrast: 145 Hue: 0
As different type of panel is available and implemented on our beloved HTC10, shouldn't we share what type of panel too ? it's easily available using DevCheck app I don't think applying settings from a panel to a different brand is really productive. It's like calibrating a Sony TV and applying the resulted calibrating profile to a Samsung one, just because models share the same IPS panel ? Hmmmm no ! Btw this topic is an excellent idea !)
Fre$h said: As different type of panel is available and implemented on our beloved HTC10, shouldn't we share what type of panel too ? it's easily available using DevCheck app I don't think applying settings from a panel to a different brand is really productive. It's like calibrating a Sony TV and applying the resulted calibrating profile to a Samsung one, just because models share the same IPS panel ? Hmmmm no ! Btw this topic is an excellent idea !) Click to expand... Click to collapse You are right; I have updated my post
Large border around the screen
I have a A505FN with the rom A505FNXXS4BTCA - XEF. I flashed my device with the TWRP patched and the custom splash screen. It was a success because I'm rooted now, but not whitout problem. Since I have an important border on my device. https://zupimages.net/up/20/20/uvwe.jpg I have for example + 8mm of border on the bottom of the screen..And I can't remove it. It's an important problem. I restored the rom stock, but the border remained... Could you help me ? I taped the commande in adb dumpsys display | grep mBaseDisplayInfo The answer is: mBaseDisplayInfo=DisplayInfo{"Écran intégré, displayId 0", uniqueId "local:0", app 1080 x 2340, real 1080 x 2340, largest app 1080 x 2340, smallest app 1080 x 2340, mode 1, defaultMode 1, modes [{id=1, width=1080, height=2340, fps=60.000004}], colorMode 0, supportedColorModes [0], hdrCapabilities [email protected], rotation 0, density 420 (403.411 x 404.326) dpi, layerStack 0, appVsyncOff 0, presDeadline 17666666, type BUILT_IN, address {port=0}, state DOZE_SUSPEND, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS, removeMode 0} Thank you
It seems to be normal for me, may it be you had a dark background image before? 8mm including the navigation bar? You can put your phone under some ligth and see the reel edges of the screen, if you see an extra black border then you have a problem .there is ~3mm buttom border in the A50 .
Looks normal to me
General (Ugly) Colors on boot animation (+ workaround)
Hmm ... after the December update, I have this ugly bluish colours on the boot animation screen. I think I've read somewhere that this is supposed to match the Material you theme (which I don't use as I use Nova). I digged around a bit and found that it is controlled by 4 properties: Code: persist.bootanim.color1 persist.bootanim.color2 persist.bootanim.color3 persist.bootanim.color4 They have some weird (negative) integer value determining the colors on the boot animation. Not sure exactly how to interpret the numbers. Anyway, I just find it ugly and inconsistent ... first the traditional Google logo appear in the traditional colours, then the circling G logo in another color scheme. Weird ... and ugly (my opinion). I actually managed to work around it. In my personal Magisk module, I have "resetprop" these 4 properties to an empty string (""). i.e. Code: resetprop persist.bootanim.color1 "" (do this for all 4 of them) Then, upon reboot, I get the old boot animation colours back.
On my phone, the values reverted back to the ones before I empty them after the boot. So next restarts give me weird negative colors again